1 #ifndef ALIEMCALTrigger_H
2 #define ALIEMCALTrigger_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //___________________________________________________________
9 // Class for trigger analysis.
10 // Digits are grouped in TRU's (Trigger Units). A TRU consist of 384 cells
11 // ordered fNTRUPhi x fNTRUZ. The algorithm searches all possible
12 // 4x4 crystal combinations per each TRU, adding the digits amplitude and
13 // finding the maximum. Maximums are transformed in adc time samples.
14 // Each time bin is compared to the trigger threshold until it is larger
15 // and then, triggers are set. Thresholds need to be fixed.
16 // Last 2 modules are half size in Phi, I considered that the number
17 // of TRU is maintained for the last modules but final decision has not
18 // been taken. If different, then this must to be changed.
21 // //Inside the event loop
22 // AliEMCALTrigger *tr = new AliEMCALTrigger();//Init Trigger
23 // tr->SetL0Threshold(100);
24 // tr->SetL1JetLowPtThreshold(1000);
25 // tr->SetL1JetMediumPtThreshold(10000);
26 // tr->SetL1JetHighPtThreshold(20000);
27 // tr->Trigger(); //Execute Trigger
28 // tr->Print(""); //Print results
30 //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
32 // --- ROOT system ---
37 // --- AliRoot header files ---
38 #include "AliTriggerDetector.h"
40 class AliEMCALGeometry ;
42 class AliEMCALTrigger : public AliTriggerDetector {
46 AliEMCALTrigger() ; // ctor
47 AliEMCALTrigger(const AliEMCALTrigger & trig) ; // cpy ctor
48 virtual ~AliEMCALTrigger() {}; //virtual dtor
49 virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor
50 void Print(const Option_t * opt ="") const ;
51 virtual void Trigger(); //Make EMCAL trigger
53 //assignment operator for coding convention
54 const AliEMCALTrigger & operator = (const AliEMCALTrigger & ) {return *this;}
57 Float_t Get2x2MaxAmplitude() const {return f2x2MaxAmp ; }
58 Float_t Get4x4MaxAmplitude() const {return f4x4MaxAmp ; }
59 Int_t Get2x2CellPhi() const {return f2x2CellPhi ; }
60 Int_t Get4x4CellPhi() const {return f4x4CellPhi ; }
61 Int_t Get2x2CellEta() const {return f2x2CellEta ; }
62 Int_t Get4x4CellEta() const {return f4x4CellEta ; }
63 Int_t Get2x2SuperModule() const {return f2x2SM ; }
64 Int_t Get4x4SuperModule() const {return f4x4SM ; }
66 Int_t * GetADCValuesLowGainMax2x2Sum() {return fADCValuesLow2x2; }
67 Int_t * GetADCValuesHighGainMax2x2Sum() {return fADCValuesHigh2x2; }
68 Int_t * GetADCValuesLowGainMax4x4Sum() {return fADCValuesLow4x4; }
69 Int_t * GetADCValuesHighGainMax4x4Sum() {return fADCValuesHigh4x4; }
71 Float_t GetL0Threshold() const {return fL0Threshold ; }
72 Float_t GetL1JetLowPtThreshold() const {return fL1JetLowPtThreshold ; }
73 Float_t GetL1JetMediumPtThreshold()const {return fL1JetMediumPtThreshold ; }
74 Float_t GetL1JetHighPtThreshold() const {return fL1JetHighPtThreshold ; }
76 Bool_t IsSimulation() const {return fSimulation ; }
79 void SetDigitsList(TClonesArray * digits)
80 {fDigitsList = digits ; }
82 void SetL0Threshold(Int_t amp)
83 {fL0Threshold = amp; }
84 void SetL1JetLowPtThreshold(Int_t amp)
85 {fL1JetLowPtThreshold = amp; }
86 void SetL1JetMediumPtThreshold(Int_t amp)
87 {fL1JetMediumPtThreshold = amp; }
88 void SetL1JetHighPtThreshold(Int_t amp)
89 {fL1JetHighPtThreshold = amp; }
91 void SetSimulation(Bool_t sim ) {fSimulation = sim ; }
95 void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD *ampmax2, TMatrixD *ampmax4, AliEMCALGeometry * geom) ;
98 void SetTriggers(const Int_t iSM, const TMatrixD *ampmax2, const TMatrixD *ampmax4, AliEMCALGeometry *geom) ;
102 Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped)
103 Int_t f2x2CellPhi ; //! upper right cell, row(phi)
104 Int_t f2x2CellEta ; //! and column(eta)
105 Int_t f2x2SM ; //! Super Module where maximum is found
106 Float_t f4x4MaxAmp ; //! Maximum 4x4 added amplitude (overlapped)
107 Int_t f4x4CellPhi ; //! upper right cell, row(phi)
108 Int_t f4x4CellEta ; //! and column(eta)
109 Int_t f4x4SM ; //! Super Module where maximum is found
111 Int_t* fADCValuesHigh4x4 ; //! Sampled ADC high gain values for the 4x4 crystals amplitude sum
112 Int_t* fADCValuesLow4x4 ; //! " low gain "
113 Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 "
114 Int_t* fADCValuesLow2x2 ; //! " low gaing " "
116 TClonesArray* fDigitsList ; //Array of digits
118 Float_t fL0Threshold ; //! L0 trigger energy threshold
119 Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger energy threshold
120 Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold
121 Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger energy threshold
123 Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction
125 ClassDef(AliEMCALTrigger,1)
129 #endif //ALIEMCALTrigger_H