]>
Commit | Line | Data |
---|---|---|
f0377b23 | 1 | #ifndef ALIEMCALTrigger_H |
2 | #define ALIEMCALTrigger_H | |
59264fa6 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
f0377b23 | 5 | |
0964c2e9 | 6 | /* $Id$ */ |
0964c2e9 | 7 | |
f0377b23 | 8 | //___________________________________________________________ |
9 | // Class for trigger analysis. | |
0964c2e9 | 10 | // |
11 | // -- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN) | |
59264fa6 | 12 | // Digits are grouped in TRU's (Trigger Units). A TRU consist of 384 cells |
0964c2e9 | 13 | // ordered fNTRUPhi x fNTRUEta matrix. The algorithm searches all possible |
14 | // 2x2 and nxn (n multiple of 4) crystal combinations per each TRU, adding the | |
15 | // digits amplitude and finding the maximum. It is found is maximum is isolated. | |
16 | // Maxima are transformed in adc time samples. Each time bin is compared to the | |
17 | // trigger threshold until it is larger and then, triggers are set. | |
18 | // Thresholds need to be fixed. | |
59264fa6 | 19 | // Last 2 modules are half size in Phi, I considered that the number |
20 | // of TRU is maintained for the last modules but final decision has not | |
21 | // been taken. If different, then this must to be changed. | |
f0377b23 | 22 | // Usage: |
23 | // | |
24 | // //Inside the event loop | |
25 | // AliEMCALTrigger *tr = new AliEMCALTrigger();//Init Trigger | |
59264fa6 | 26 | // tr->SetL0Threshold(100); |
f0377b23 | 27 | // tr->SetL1JetLowPtThreshold(1000); |
28 | // tr->SetL1JetMediumPtThreshold(10000); | |
29 | // tr->SetL1JetHighPtThreshold(20000); | |
0964c2e9 | 30 | // .... |
f0377b23 | 31 | // tr->Trigger(); //Execute Trigger |
0964c2e9 | 32 | // tr->Print(""); //Print data members after calculation. |
f0377b23 | 33 | // |
34 | //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN) | |
35 | ||
36 | // --- ROOT system --- | |
37 | ||
38 | class TClonesArray ; | |
59264fa6 | 39 | #include "TMatrixD.h" |
f0377b23 | 40 | |
41 | // --- AliRoot header files --- | |
42 | #include "AliTriggerDetector.h" | |
43 | ||
44 | class AliEMCALGeometry ; | |
45 | ||
46 | class AliEMCALTrigger : public AliTriggerDetector { | |
47 | ||
48 | public: | |
59264fa6 | 49 | |
f0377b23 | 50 | AliEMCALTrigger() ; // ctor |
51 | AliEMCALTrigger(const AliEMCALTrigger & trig) ; // cpy ctor | |
c35bbfd4 | 52 | virtual ~AliEMCALTrigger(); //virtual dtor |
0964c2e9 | 53 | |
54 | ||
59264fa6 | 55 | virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor |
56 | void Print(const Option_t * opt ="") const ; | |
f0377b23 | 57 | virtual void Trigger(); //Make EMCAL trigger |
59264fa6 | 58 | |
14ce0a6e | 59 | //assignment operator for coding convention |
60 | const AliEMCALTrigger & operator = (const AliEMCALTrigger & ) {return *this;} | |
61 | ||
59264fa6 | 62 | //Getters |
0964c2e9 | 63 | Float_t Get2x2MaxAmplitude() const { return f2x2MaxAmp ; } |
64 | Float_t GetnxnMaxAmplitude() const { return fnxnMaxAmp ; } | |
65 | Int_t Get2x2CellPhi() const { return f2x2CellPhi ; } | |
66 | Int_t GetnxnCellPhi() const { return fnxnCellPhi ; } | |
67 | Int_t Get2x2CellEta() const { return f2x2CellEta ; } | |
68 | Int_t GetnxnCellEta() const { return fnxnCellEta ; } | |
69 | Int_t Get2x2SuperModule() const { return f2x2SM ; } | |
70 | Int_t GetnxnSuperModule() const { return fnxnSM ; } | |
71 | ||
72 | Int_t * GetADCValuesLowGainMax2x2Sum() { return fADCValuesLow2x2; } | |
73 | Int_t * GetADCValuesHighGainMax2x2Sum() { return fADCValuesHigh2x2; } | |
74 | Int_t * GetADCValuesLowGainMaxnxnSum() { return fADCValuesLownxn; } | |
75 | Int_t * GetADCValuesHighGainMaxnxnSum() { return fADCValuesHighnxn; } | |
76 | ||
77 | Float_t GetL0Threshold() const { return fL0Threshold ; } | |
78 | Float_t GetL1JetLowPtThreshold() const { return fL1JetLowPtThreshold ; } | |
79 | Float_t GetL1JetMediumPtThreshold() const { return fL1JetMediumPtThreshold ; } | |
80 | Float_t GetL1JetHighPtThreshold() const { return fL1JetHighPtThreshold ; } | |
81 | ||
82 | Int_t GetPatchSize() const { return fPatchSize ; } | |
83 | Int_t GetIsolPatchSize() const { return fIsolPatchSize ; } | |
84 | ||
85 | Float_t Get2x2AmpOutOfPatch() const { return f2x2AmpOutOfPatch ; } | |
86 | Float_t GetnxnAmpOutOfPatch() const { return fnxnAmpOutOfPatch ; } | |
87 | Float_t Get2x2AmpOutOfPatchThres() const { return f2x2AmpOutOfPatchThres ; } | |
88 | Float_t GetnxnAmpOutOfPatchThres() const { return fnxnAmpOutOfPatchThres ; } | |
89 | ||
90 | Bool_t Is2x2Isol() const { return fIs2x2Isol ; } | |
91 | Bool_t IsnxnIsol() const { return fIsnxnIsol ; } | |
92 | ||
93 | Bool_t IsSimulation() const { return fSimulation ; } | |
94 | Bool_t IsIsolatedInSuperModule() const { return fIsolateInSuperModule ; } | |
95 | ||
59264fa6 | 96 | //Setters |
97 | void SetDigitsList(TClonesArray * digits) | |
98 | {fDigitsList = digits ; } | |
99 | ||
100 | void SetL0Threshold(Int_t amp) | |
101 | {fL0Threshold = amp; } | |
102 | void SetL1JetLowPtThreshold(Int_t amp) | |
103 | {fL1JetLowPtThreshold = amp; } | |
104 | void SetL1JetMediumPtThreshold(Int_t amp) | |
105 | {fL1JetMediumPtThreshold = amp; } | |
106 | void SetL1JetHighPtThreshold(Int_t amp) | |
107 | {fL1JetHighPtThreshold = amp; } | |
108 | ||
0b2ec9f7 | 109 | void SetPatchSize(Int_t ps) {fPatchSize = ps ; } |
0964c2e9 | 110 | void SetIsolPatchSize(Int_t ps) {fIsolPatchSize = ps ; } |
111 | void Set2x2AmpOutOfPatchThres(Float_t th) { f2x2AmpOutOfPatchThres = th; } | |
112 | void SetnxnAmpOutOfPatchThres(Float_t th) { fnxnAmpOutOfPatchThres = th; } | |
59264fa6 | 113 | void SetSimulation(Bool_t sim ) {fSimulation = sim ; } |
0964c2e9 | 114 | void SetIsolateInSuperModule(Bool_t isol ) {fIsolateInSuperModule = isol ; } |
59264fa6 | 115 | |
f0377b23 | 116 | private: |
0964c2e9 | 117 | |
9946f2fe | 118 | void FillTRU(const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix); |
c35bbfd4 | 119 | |
0964c2e9 | 120 | Bool_t IsPatchIsolated(Int_t iPatchType, const TClonesArray * ampmods, const Int_t imod, const Int_t mtru, const Float_t maxamp, const Int_t maxphi, const Int_t maxeta) ; |
121 | ||
c35bbfd4 | 122 | void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD &max2, TMatrixD &maxn) ; |
0964c2e9 | 123 | |
9946f2fe | 124 | void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD &max2, const TMatrixD &maxn) ; |
f0377b23 | 125 | |
126 | ||
f0377b23 | 127 | private: |
9946f2fe | 128 | AliEMCALGeometry *fGeom; |
f0377b23 | 129 | |
0964c2e9 | 130 | Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped) |
131 | Int_t f2x2CellPhi ; //! upper right cell, row(phi) | |
132 | Int_t f2x2CellEta ; //! and column(eta) | |
133 | Int_t f2x2SM ; //! Super Module where maximum is found | |
134 | Float_t fnxnMaxAmp ; //! Maximum nxn added amplitude (overlapped) | |
135 | Int_t fnxnCellPhi ; //! upper right cell, row(phi) | |
136 | Int_t fnxnCellEta ; //! and column(eta) | |
137 | Int_t fnxnSM ; //! Super Module where maximum is found | |
f0377b23 | 138 | |
0b2ec9f7 | 139 | Int_t* fADCValuesHighnxn ; //! Sampled ADC high gain values for the nxn crystals amplitude sum |
140 | Int_t* fADCValuesLownxn ; //! " low gain " | |
59264fa6 | 141 | Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 " |
142 | Int_t* fADCValuesLow2x2 ; //! " low gaing " " | |
f0377b23 | 143 | |
59264fa6 | 144 | TClonesArray* fDigitsList ; //Array of digits |
145 | ||
146 | Float_t fL0Threshold ; //! L0 trigger energy threshold | |
147 | Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger energy threshold | |
148 | Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold | |
149 | Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger energy threshold | |
150 | ||
0964c2e9 | 151 | Int_t fPatchSize; //! Trigger patch factor, to be multiplied to 2x2 cells |
152 | // 0 means 2x2, 1 means 4x4, 2 means 6x6 ... | |
153 | Int_t fIsolPatchSize ; // Isolation patch size, number of rows or columns to add to | |
154 | // the 2x2 or nxn maximum amplitude patch. | |
155 | // 1 means a patch around max amplitude of 2x2 of 4x4 and around | |
156 | // max ampl patch of 4x4 of 8x8 | |
157 | ||
158 | Float_t f2x2AmpOutOfPatch; // Amplitude in isolation cone minus maximum amplitude of the reference patch | |
159 | Float_t fnxnAmpOutOfPatch; | |
160 | Float_t f2x2AmpOutOfPatchThres; // Threshold to select a trigger as isolated on f2x2AmpOutOfPatch value | |
161 | Float_t fnxnAmpOutOfPatchThres; | |
162 | Float_t fIs2x2Isol; // Patch is isolated if f2x2AmpOutOfPatchThres threshold is passed | |
163 | Float_t fIsnxnIsol ; | |
164 | ||
59264fa6 | 165 | Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction |
0964c2e9 | 166 | Bool_t fIsolateInSuperModule; //! Flag to isolate trigger patch in SuperModule or in TRU acceptance |
59264fa6 | 167 | |
9946f2fe | 168 | ClassDef(AliEMCALTrigger,0) |
59264fa6 | 169 | } ; |
170 | ||
171 | ||
f0377b23 | 172 | #endif //ALIEMCALTrigger_H |
59264fa6 | 173 |