1 #ifndef ALIPHOSTrigger_H
2 #define ALIPHOSTrigger_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 //____________________________________________________________
10 // Class for trigger analysis.
11 // Digits are grouped in TRU's (Trigger Units). A TRU consist of 16x28
12 // crystals ordered fNTRUPhi x fNTRUZ. The algorithm searches all possible
13 // 4x4 crystal combinations per each TRU, adding the digits amplitude and
14 // finding the maximum. Maximums are transformed in ADC time samples.
15 // Each time bin is compared to the trigger threshold until it is larger
16 // and then, triggers are set. Thresholds need to be fixed.
19 // //Inside the event loop
20 // AliPHOSTrigger *tr = new AliPHOSTrigger();//Init Trigger
21 // tr->SetL0Threshold(100);
22 // tr->SetL1JetLowPtThreshold(1000);
23 // tr->SetL1JetHighPtThreshold(20000);
24 // tr->Trigger(); //Execute Trigger
25 // tr->Print(""); //Print results
27 //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
29 // --- ROOT system ---
34 // --- AliRoot header files ---
35 #include "AliTriggerDetector.h"
37 class AliPHOSGeometry ;
39 class AliPHOSTrigger : public AliTriggerDetector {
43 AliPHOSTrigger() ; // ctor
44 AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor
45 virtual ~AliPHOSTrigger() {}; //virtual dtor
46 virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor
47 void Print(const Option_t * opt ="") const ;
48 virtual void Trigger(); //Make PHOS trigger
51 Float_t Get2x2MaxAmplitude() const {return f4x4MaxAmp ; }
52 Float_t Get4x4MaxAmplitude() const {return f4x4MaxAmp ; }
53 Int_t Get2x2CrystalPhi() const {return f2x2CrystalPhi ; }
54 Int_t Get4x4CrystalPhi() const {return f4x4CrystalPhi ; }
55 Int_t Get2x2CrystalEta() const {return f2x2CrystalEta ; }
56 Int_t Get4x4CrystalEta() const {return f4x4CrystalEta ; }
57 Int_t Get2x2SuperModule() const {return f2x2SM ; }
58 Int_t Get4x4SuperModule() const {return f4x4SM ; }
60 Int_t * GetADCValuesLowGainMax2x2Sum() {return fADCValuesLow2x2; }
61 Int_t * GetADCValuesHighGainMax2x2Sum() {return fADCValuesHigh2x2; }
62 Int_t * GetADCValuesLowGainMax4x4Sum() {return fADCValuesLow4x4; }
63 Int_t * GetADCValuesHighGainMax4x4Sum() {return fADCValuesHigh4x4; }
65 void GetCrystalPhiEtaIndexInModuleFromTRUIndex(const Int_t itru,const Int_t iphitru,const Int_t ietatru,Int_t &ietaMod,Int_t &iphiMod, const AliPHOSGeometry *geom) const ;
67 Float_t GetL0Threshold() const {return fL0Threshold ; }
68 Float_t GetL1JetLowPtThreshold() const {return fL1JetLowPtThreshold ; }
69 Float_t GetL1JetHighPtThreshold() const {return fL1JetHighPtThreshold ; }
71 Int_t GetNTRU() const {return fNTRU ; }
72 Int_t GetNTRUZ() const {return fNTRUZ ; }
73 Int_t GetNTRUPhi() const {return fNTRUPhi ; }
75 Bool_t IsSimulation() const {return fSimulation ; }
79 void SetDigitsList(TClonesArray * digits)
80 {fDigitsList = digits ; }
83 void SetNTRU(Int_t ntru) {fNTRU = ntru ; }
84 void SetNTRUZ(Int_t ntru) {fNTRUZ = ntru ; }
85 void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru ; }
87 void SetL0Threshold(Int_t amp)
88 {fL0Threshold = amp ; }
89 void SetL1JetLowPtThreshold(Int_t amp)
90 {fL1JetLowPtThreshold = amp ; }
91 void SetL1JetHighPtThreshold(Int_t amp)
92 {fL1JetHighPtThreshold = amp ; }
94 void SetSimulation(Bool_t sim ) {fSimulation = sim ; }
98 void FillTRU(const TClonesArray * digits, const AliPHOSGeometry * geom, TClonesArray * amptru, TClonesArray * timeRtru) const ;
100 void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus, const Int_t mod, TMatrixD *ampmax2, TMatrixD *ampmax4, const AliPHOSGeometry *geom) ;
102 void SetTriggers(const Int_t iMod, const TMatrixD *ampmax2,const TMatrixD *ampmax4, const AliPHOSGeometry *geom) ;
106 Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped)
107 Int_t f2x2CrystalPhi ; //! upper right cell, row(phi)
108 Int_t f2x2CrystalEta ; //! and column(eta)
109 Int_t f2x2SM ; //! Module where maximum is found
110 Float_t f4x4MaxAmp ; //! Maximum 4x4 added amplitude (overlapped)
111 Int_t f4x4CrystalPhi ; //! upper right cell, row(phi)
112 Int_t f4x4CrystalEta ; //! and column(eta)
113 Int_t f4x4SM ; //! Module where maximum is found
115 Int_t* fADCValuesHigh4x4 ; //! Sampled ADC high gain values for the 4x4 crystals amplitude sum
116 Int_t* fADCValuesLow4x4 ; //! " low gain "
117 Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 "
118 Int_t* fADCValuesLow2x2 ; //! " low gaing " "
120 TClonesArray* fDigitsList ; //Array of digits
122 Float_t fL0Threshold ; //! L0 trigger energy threshold
123 Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger threshold
124 Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger threshold
126 Int_t fNTRU ; //! Number of TRUs per module
127 Int_t fNTRUZ ; //! Number of crystal rows per Z in one TRU
128 Int_t fNTRUPhi ; //! Number of crystal rows per Phi in one TRU
130 Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction
131 ClassDef(AliPHOSTrigger,4)
135 #endif //ALIPHOSTrigger_H