****************************************************************************** * Code provided by the trigger group to study the potential effect * * of tightening the trigger: trigger, which is based on ITC(TPC) * * information and ECAL energy deposit (DBL_C_E2). * * See Minutes of the Two Photon Meeting on Wednesday 23, June 1999: * * http://alephwww.cern.ch/LEP2ANALYSIS/photon/Minutes/2-photon_99_06_23.html * * ... and news by Putzer + change by Leibenguth (and to or) * * (IMPORTANT: This version of the code replaces the one of July 5, 1999 * * and of July 9, 1999 !!!) * * (Armin Boehrer, July 23, 1999) * ****************************************************************************** TO WHOM IT MAY CONCERN ====================== Dear Collaborators, as you probably know, the trigger and the physics groups are supposed to study the effects on rate and physics potential - especially for Searches and 2-Gamma-Physics - due to the proposed changes for the triggers 28 : Track_Count2 30 : Double_Charged_E2 and report on the findings during the SIENA ALEPH week. The proposal is to VETO events, which are triggered by these triggers only, if there are more than NNNN ECAL modules above trigger threshold 2. NNNN is not yet fixed; it may vary between 4 and 8 To facilitate these studies for the members of the physics groups a subroutine (X1TEST) is enclosed which provides the necessary information and allows to study the events which would not anymore appear on POT/DST. The Heidelberg LVL1 Trigger Group ============= A L P H A J O B E X A M P L E ========================== C----------------------------------------------------------------------- SUBROUTINE QUINIT C---------------------------------------------------------------------- INCLUDE '/aleph/phy/qcde.inc' INCLUDE '/aleph/phy/qmacro.inc' END c----------------------------------------------------------------------- C---------------------------------------------------------------------- SUBROUTINE QUEVNT(QT,KT,QV,KV) C---------------------------------------------------------------------- INCLUDE '/aleph/phy/qcde.inc' Logical TstDbg INCLUDE '/aleph/phy/qmacro.inc' DATA IENTRY/0/ C TstDbg =.True. IF (TstDbg) Then Write(6,*) '===> New Event; Run = ',KRUN,' Event = ',KEVT EndIf C C** ** Get the Trigger decisions and the Number of ECAL Modules C** with Energies above Threshold 2 C CALL X1TEST(TSTDBG,ITR28,ITR30,NECMO,ILVL3,ICODE,LV3TR) C Event cannot be analyzed If (Itr30.lt.0) Return C====================================================================== c====================================================================== C C============ Here comes the part needed to study the possible effect C on physics. Place your own code at the corresponding place. C If ((Itr28+Itr30).Eq.0) Then C C - None of these Trigger conditions fulfilled C (Hence no change) C ElseIf (Itr28.eq.3.or.Itr30.eq.3) Then ! GL changes and by or C It's sufficient to have only one of them C with a other trigger and not both of them C C - Other Triggers conditions are also fulfilled C C (Proposed modification will have no C effect on physics) C Else C C - Study the effect due to changes in the Triggers 28 and 30 C If (Necmo.gt.4) Then C ======> This is the proposed new cut. C (Final value to be decided) C Vary this cut (between 4 and 8) C and study the effect on your C physics analyses. EndIf EndIf Return End SUBROUTINE X1TEST(TSTDBG,ITR28,ITR30,NECMO,ILVL3,ICODE,LV3TR) C ---------------------------------------------------------------------- C C. C. - Author : A. Putzer - 99/06/28 C. C! - Test the effect of the proposed modification for the C! - 2-gamma triggers (Bits 27 + 29) C. C C TSTDBG (INPUT) : = DebugFlag C C ITR28 (Output) : = -1 (No trigger information available) C = 0 (TRACK COUNT2 trigger (old) not fulfilled) C = 1 (TRACK COUNT2 trigger (old) fulfilled; exclusive) C = 2 (TRACK COUNT2 trigger (old) fulfilled; + 30 only) C = 3 (TRACK COUNT2 trigger (old) fulfilled; else) C C ITR30 (Output) : = -1 (No trigger information available) C = 0 (2GAMMA trigger (old) not fulfilled) C = 1 (2GAMMA trigger (old) fulfilled; exclusive) C = 2 (2GAMMA trigger (old) fulfilled; + 28 only) C = 3 (2GAMMA trigger (old) fulfilled; else) C C NECMO (output) : = -1 (No trigger information available) C = Number of ECAL modules above Treshold 2 C C ILVL3 (Output) : = -1 (No trigger information available) C = 0 (LVL3 decision No) C = 1 (LVL3 decision Yes) C C ICODE (Output) : = -1 (No trigger information available) C = 32 Good Trigger C = 33 Rejected but transmitted C = 34 No Trigger Match C = 35 Rejected, some percentage transmitted C = 36 Calibratio trigger C = 37 Process Error C = 38 Not accepted C C LV3TR (Output) = -1 (No trigger information available) C = Tested Trigger Number C C. C. Banks : X1RG and EVEH are read C. *IF .NOT.DOC ----------------------------------------------------- C INCLUDE '/aleph/phy/bcs.inc' Logical TstDbg C. C ---------------------------------------------------------------------- C. DATA MASK28/ZF7FFFFFF/ DATA MASK30/ZDFFFFFFF/ DATA MASKOR/ZD7FFFFFF/ C ITR28 = -1 ITR30 = -1 NECMO = -1 ILVL3 = -1 ICODE = -1 LV3TR = -1 C C. C- *** Check if the trigger ReadOut Register bank ('X1RG') is there C. NX1RG = NAMIND('X1RG') KX1RG = IW(NX1RG) IF (KX1RG.EQ.0) GOTO 999 ITR28 = 0 ITR30 = 0 KX1RG = KX1RG + LMHLEN NRO = IW(KX1RG) NCO = IW(KX1RG-1) C- Do 100 I = 1, NRO C C *** Row with Trigger Bits C IF (IW(KX1RG+1).EQ.INTCHA('TPR ')) THEN C C Trigger Decision Mask C IEVMK = IW(KX1RG+4) C C Check if Trigger 28 is fulfilled C IF (BTEST(IEVMK,27).NE.0) THEN ITR28 = 1 C C Exclusive or inclusive ? C IF (IAND(IEVMK,MASK28).NE.0) ITR28 = 3 C C Together with Trigger 30 only ? C IF (IAND(IEVMK,MASKOR).EQ.0.AND.ITR28.EQ.3) + ITR28 = 2 EndIf C C Check if Trigger 30 is fulfilled C If (BTEST(IEVMK,29).NE.0) Then ITR30 = 1 C C Exclusive or inclusive ? C IF (IAND(IEVMK,MASK30).NE.0) ITR30 = 3 C C Together with Trigger 28 only ? C IF (IAND(IEVMK,MASKOR).EQ.0.AND.ITR30.EQ.3) + ITR30 = 2 EndiF C C *** Row with threshold bits for ECW2 C ElseIf (IW(KX1RG+1).EQ.INTCHA('ECW2')) Then NECMO = 0 Do JJ = 0,71,2 LL = JJ IPATT = IW(KX1RG+2) If (JJ.GT.63) Then LL = JJ - 64 IPATT = IW(KX1RG+4) ElseIf (JJ.GT.31) Then LL = JJ - 32 IPATT = IW(KX1RG+3) Else LL = JJ Ipatt = IW(KX1RG+2) EndIf C C Count ECAL Modules if there is an odd/even Coincidence C If ((Btest(Ipatt,LL)+Btest(Ipatt,ll+1)).eq.2) Then NECMO = NECMO + 1 Endif EndDo EndIf KX1RG = KX1RG + NCO 100 Continue IF (TstDbg) Then Write (6,*) ' Trigger 28 : ',ITR28,' Trigger 30 : ', + ITR30,' Nr. of Ecal Modules : ',NECMO EndIf C C Get LVL3 Information C KNEVEH = NAMIND('EVEH') IEVEH = IW(KNEVEH) L3DEC = IW(IEVEH+8) ILVL3 = ibits(L3DEC,0,1) ICODE = ibits(L3DEC,16,8) LV3TR = ibits(L3DEC,2,6) If (TstDbg) Then Write (6,*) ' Lvl3 Decision : ',ILVL3,' Accept Code : ' + ,ICODE,' Trigger Tested : ',LV3TR EndIf 999 Continue Return End