]>
Commit | Line | Data |
---|---|---|
25354ff4 | 1 | #ifndef ALIPHOSTrigger_H |
2 | #define ALIPHOSTrigger_H | |
59264fa6 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id $ */ | |
7 | /* $Log $ */ | |
25354ff4 | 8 | |
9 | //____________________________________________________________ | |
10 | // Class for trigger analysis. | |
59264fa6 | 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. | |
bb38a8fc | 17 | // Usage: |
18 | // | |
19 | // //Inside the event loop | |
59264fa6 | 20 | // AliPHOSTrigger *tr = new AliPHOSTrigger();//Init Trigger |
21 | // tr->SetL0Threshold(100); | |
bb38a8fc | 22 | // tr->SetL1JetLowPtThreshold(1000); |
bb38a8fc | 23 | // tr->SetL1JetHighPtThreshold(20000); |
24 | // tr->Trigger(); //Execute Trigger | |
59264fa6 | 25 | // tr->Print(""); //Print results |
bb38a8fc | 26 | // |
25354ff4 | 27 | //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN) |
28 | ||
29 | // --- ROOT system --- | |
25354ff4 | 30 | |
b165f59d | 31 | class TClonesArray ; |
59264fa6 | 32 | #include "TMatrixD.h" |
b165f59d | 33 | |
25354ff4 | 34 | // --- AliRoot header files --- |
b165f59d | 35 | #include "AliTriggerDetector.h" |
36 | ||
37 | class AliPHOSGeometry ; | |
25354ff4 | 38 | |
b165f59d | 39 | class AliPHOSTrigger : public AliTriggerDetector { |
25354ff4 | 40 | |
59264fa6 | 41 | public: |
42 | ||
25354ff4 | 43 | AliPHOSTrigger() ; // ctor |
44 | AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor | |
45 | virtual ~AliPHOSTrigger() {}; //virtual dtor | |
3663622c | 46 | |
47 | ||
59264fa6 | 48 | virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor |
49 | void Print(const Option_t * opt ="") const ; | |
b165f59d | 50 | virtual void Trigger(); //Make PHOS trigger |
59264fa6 | 51 | |
52 | //Getters | |
53 | Float_t Get2x2MaxAmplitude() const {return f4x4MaxAmp ; } | |
54 | Float_t Get4x4MaxAmplitude() const {return f4x4MaxAmp ; } | |
55 | Int_t Get2x2CrystalPhi() const {return f2x2CrystalPhi ; } | |
56 | Int_t Get4x4CrystalPhi() const {return f4x4CrystalPhi ; } | |
57 | Int_t Get2x2CrystalEta() const {return f2x2CrystalEta ; } | |
58 | Int_t Get4x4CrystalEta() const {return f4x4CrystalEta ; } | |
59 | Int_t Get2x2SuperModule() const {return f2x2SM ; } | |
60 | Int_t Get4x4SuperModule() const {return f4x4SM ; } | |
61 | ||
62 | Int_t * GetADCValuesLowGainMax2x2Sum() {return fADCValuesLow2x2; } | |
63 | Int_t * GetADCValuesHighGainMax2x2Sum() {return fADCValuesHigh2x2; } | |
64 | Int_t * GetADCValuesLowGainMax4x4Sum() {return fADCValuesLow4x4; } | |
65 | Int_t * GetADCValuesHighGainMax4x4Sum() {return fADCValuesHigh4x4; } | |
66 | ||
03ecfe88 | 67 | void GetCrystalPhiEtaIndexInModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru,Int_t &ietaMod,Int_t &iphiMod, const AliPHOSGeometry *geom) const ; |
59264fa6 | 68 | |
69 | Float_t GetL0Threshold() const {return fL0Threshold ; } | |
70 | Float_t GetL1JetLowPtThreshold() const {return fL1JetLowPtThreshold ; } | |
71 | Float_t GetL1JetHighPtThreshold() const {return fL1JetHighPtThreshold ; } | |
72 | ||
73 | Int_t GetNTRU() const {return fNTRU ; } | |
74 | Int_t GetNTRUZ() const {return fNTRUZ ; } | |
75 | Int_t GetNTRUPhi() const {return fNTRUPhi ; } | |
76 | ||
77 | Bool_t IsSimulation() const {return fSimulation ; } | |
78 | ||
79 | //Setters | |
80 | ||
81 | void SetDigitsList(TClonesArray * digits) | |
82 | {fDigitsList = digits ; } | |
83 | ||
84 | ||
85 | void SetNTRU(Int_t ntru) {fNTRU = ntru ; } | |
86 | void SetNTRUZ(Int_t ntru) {fNTRUZ = ntru ; } | |
87 | void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru ; } | |
88 | ||
89 | void SetL0Threshold(Int_t amp) | |
90 | {fL0Threshold = amp ; } | |
91 | void SetL1JetLowPtThreshold(Int_t amp) | |
92 | {fL1JetLowPtThreshold = amp ; } | |
93 | void SetL1JetHighPtThreshold(Int_t amp) | |
94 | {fL1JetHighPtThreshold = amp ; } | |
95 | ||
96 | void SetSimulation(Bool_t sim ) {fSimulation = sim ; } | |
25354ff4 | 97 | |
98 | private: | |
25354ff4 | 99 | |
3663622c | 100 | AliPHOSTrigger & operator = (const AliPHOSTrigger & trig) ;//cpy assignment |
101 | ||
59264fa6 | 102 | void FillTRU(const TClonesArray * digits, const AliPHOSGeometry * geom, TClonesArray * amptru, TClonesArray * timeRtru) const ; |
103 | ||
03ecfe88 | 104 | void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus, Int_t mod, TMatrixD *ampmax2, TMatrixD *ampmax4, const AliPHOSGeometry *geom) ; |
59264fa6 | 105 | |
03ecfe88 | 106 | void SetTriggers(Int_t iMod, const TMatrixD *ampmax2,const TMatrixD *ampmax4, const AliPHOSGeometry *geom) ; |
25354ff4 | 107 | |
108 | private: | |
25354ff4 | 109 | |
59264fa6 | 110 | Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped) |
111 | Int_t f2x2CrystalPhi ; //! upper right cell, row(phi) | |
112 | Int_t f2x2CrystalEta ; //! and column(eta) | |
113 | Int_t f2x2SM ; //! Module where maximum is found | |
114 | Float_t f4x4MaxAmp ; //! Maximum 4x4 added amplitude (overlapped) | |
115 | Int_t f4x4CrystalPhi ; //! upper right cell, row(phi) | |
116 | Int_t f4x4CrystalEta ; //! and column(eta) | |
117 | Int_t f4x4SM ; //! Module where maximum is found | |
118 | ||
75ab5a70 | 119 | Int_t* fADCValuesHigh4x4 ; //! Sampled ADC high gain values for the 4x4 crystals amplitude sum |
59264fa6 | 120 | Int_t* fADCValuesLow4x4 ; //! " low gain " |
121 | Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 " | |
122 | Int_t* fADCValuesLow2x2 ; //! " low gaing " " | |
123 | ||
124 | TClonesArray* fDigitsList ; //Array of digits | |
125 | ||
126 | Float_t fL0Threshold ; //! L0 trigger energy threshold | |
127 | Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger threshold | |
128 | Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger threshold | |
129 | ||
130 | Int_t fNTRU ; //! Number of TRUs per module | |
131 | Int_t fNTRUZ ; //! Number of crystal rows per Z in one TRU | |
132 | Int_t fNTRUPhi ; //! Number of crystal rows per Phi in one TRU | |
25354ff4 | 133 | |
59264fa6 | 134 | Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction |
135 | ClassDef(AliPHOSTrigger,4) | |
25354ff4 | 136 | } ; |
137 | ||
138 | ||
139 | #endif //ALIPHOSTrigger_H |