]>
Commit | Line | Data |
---|---|---|
0e46b9ae | 1 | #ifndef ALITOFTRIGGER_H |
2 | #define ALITOFTRIGGER_H | |
3 | ||
cd82ed2f | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
cd82ed2f | 9 | ///////////////////////////////////////////////// |
0e46b9ae | 10 | // // |
11 | // TOF Trigger Detector Class // | |
12 | // // | |
cd82ed2f | 13 | ///////////////////////////////////////////////// |
14 | ||
15 | #include "AliTriggerDetector.h" | |
c93255fe | 16 | #include "AliLog.h" |
6786addd | 17 | #include "TTree.h" |
cd82ed2f | 18 | |
ee51d470 | 19 | class AliTOFrawData; |
c06f660b | 20 | class AliTOFTriggerMask; |
ee51d470 | 21 | |
cd82ed2f | 22 | class AliTOFTrigger : public AliTriggerDetector |
23 | { | |
24 | public: | |
25 | AliTOFTrigger(); // constructor | |
372be75e | 26 | AliTOFTrigger(Int_t HighMultTh, Int_t ppMBTh, Int_t MultiMuonTh, Int_t UPTh, Float_t deltaminpsi, Float_t deltamaxpsi, Float_t deltaminro, Float_t deltamaxro, Int_t stripWindow,Float_t startTimeWindow=0.0,Float_t widthTimeWindow=25.); //constructor with parameters |
c06f660b | 27 | virtual ~AliTOFTrigger(); // destructor |
cd82ed2f | 28 | virtual void CreateInputs(); |
29 | virtual void Trigger(); | |
30 | Int_t GetHighMultTh() const {return fHighMultTh;} | |
31 | Int_t GetppMBTh() const {return fppMBTh;} | |
32 | Int_t GetMultiMuonTh() const {return fMultiMuonTh;} | |
33 | Int_t GetUPTh() const {return fUPTh;} | |
34 | Float_t Getdeltaminpsi() const {return fdeltaminpsi;} | |
35 | Float_t Getdeltamaxpsi() const {return fdeltamaxpsi;} | |
36 | Float_t Getdeltaminro() const {return fdeltaminro;} | |
37 | Float_t Getdeltamaxro() const {return fdeltamaxro;} | |
38 | Int_t GetstripWindow() const {return fstripWindow;} | |
39 | ||
6786addd | 40 | static void LoadActiveMask(); // Load active channel trigger mask |
5cd96e39 | 41 | void GetMapMatrix(Bool_t map[][24]) const; |
42e171ac | 42 | void GetMap(Bool_t **map) const; |
ee51d470 | 43 | //void PrintMap(); // to be checked because of warning problems |
5cd96e39 | 44 | void GetTRDmapMatrix(Bool_t map[][8]) const; |
42e171ac | 45 | void GetTRDmap(Bool_t **map) const; |
ee51d470 | 46 | Bool_t GetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); |
47 | Bool_t GetBit(Int_t *detind); | |
48 | void SetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); | |
49 | void SetBit(Int_t *detind); | |
50 | void ResetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); | |
51 | void ResetBit(Int_t *detind); | |
52 | ||
53 | ||
cd82ed2f | 54 | void SetHighMultTh(Int_t HighMultTh){fHighMultTh = HighMultTh;} |
55 | void SetppMBTh(Int_t ppMBTh){fppMBTh = ppMBTh;} | |
56 | void SetMultiMuonTh(Int_t MultiMuonTh){fMultiMuonTh = MultiMuonTh;} | |
57 | void SetUPTh(Int_t UPTh){fUPTh = UPTh;} | |
58 | void Setdeltaminpsi(Float_t deltaminpsi){fdeltaminpsi = deltaminpsi;} | |
59 | void Setdeltamaxpsi(Float_t deltamaxpsi){fdeltamaxpsi = deltamaxpsi;} | |
60 | void Setdeltaminro(Float_t deltaminro){fdeltaminro = deltaminro;} | |
61 | void Setdeltamaxro(Float_t deltamaxro){fdeltamaxro = deltamaxro;} | |
62 | void SetstripWindow(Int_t stripWindow){fstripWindow = stripWindow;} | |
63 | ||
c06f660b | 64 | Bool_t Return(Int_t i){if(i==0) return fSel1; |
65 | else if(i==1) return fSel2; | |
66 | else if(i==2) return fSel3; | |
67 | else if(i==3) return fSel4; | |
8fa5c3a3 | 68 | else { AliWarning(Form(" Index out of range: %d not in [0,3]",i)); return kFALSE; } |
c06f660b | 69 | }; |
70 | ||
372be75e | 71 | Float_t GetStartTimeWindow() const {return fStartTimeHit;}; // in ns |
72 | Float_t GetTimeWidthWindow() const {return fTimeWidthTrigger;}; // in ns | |
73 | void SetStartTimeWindow(Float_t val) {fStartTimeHit = val;}; // in ns | |
74 | void SetTimeWidthWindow(Float_t val) {fTimeWidthTrigger = val;}; // in ns | |
75 | ||
c06f660b | 76 | Int_t GetNumberOfCrateOn(){return fNCrateOn;}; |
77 | Int_t GetNumberOfMaxipadOn(){return fNMaxipadOn;}; | |
78 | Int_t GetNumberOfMaxipadOnAll(){return fNMaxipadOnAll;}; | |
79 | Bool_t *GetLTMarray(){return fLTMarray;}; | |
ee51d470 | 80 | void CreateCTTMMatrix(); |
cd82ed2f | 81 | void CreateLTMMatrix(); |
ee51d470 | 82 | void CreateLTMMatrixFromDigits(); |
83 | void CreateLTMMatrixFromRaw(AliRawReader *fRawReader); | |
6786addd | 84 | |
85 | static AliTOFTriggerMask *GetTOFTriggerMap() {return fTOFTrigMap;} | |
86 | static void PrepareTOFMapFromRaw(AliRawReader *fRawReader,Int_t deltaBC=13600); | |
87 | static void PrepareTOFMapFromDigit(TTree *treeD); | |
cd82ed2f | 88 | private: |
89 | ||
90 | enum{ | |
91 | kNLTM = 72, //Number of LTM | |
92 | kNLTMchannels = 48, //Number of channels in a LTM | |
93 | kNCTTM = 36, //Number of CTTM per TOF side | |
ee51d470 | 94 | kNCTTMchannels = 24, //Number of channels in a CTTM |
95 | kNLTMtoTRDchannels = 8 //Number of channels in a CTTM | |
cd82ed2f | 96 | }; |
97 | ||
6786addd | 98 | static AliTOFTriggerMask *fTOFTrigMap; // class with the TOF trigger map |
99 | static AliTOFTriggerMask *fTOFTrigMask; // class with the TOF trigger mask | |
372be75e | 100 | |
c06f660b | 101 | AliTOFTrigger& operator=(const AliTOFTrigger &/*source*/); // ass. op. |
9a838fb7 | 102 | AliTOFTrigger(const AliTOFTrigger & tr); |
c06f660b | 103 | |
ee51d470 | 104 | void GetCTTMIndex(Int_t *detind, Int_t *indexCTTM); |
6786addd | 105 | static void GetLTMIndex(const Int_t * const detind, Int_t *LTMIndex); |
c06f660b | 106 | Bool_t fLTMmatrix[kNLTM][kNLTMchannels]; //LTM matrix |
107 | Bool_t fLTMarray[kNCTTM]; //LTM array for UPpurposes | |
ee51d470 | 108 | Bool_t fCTTMmatrixFront[kNCTTM][kNCTTMchannels];//CTTM matrix for TOP FPGA |
109 | Bool_t fCTTMmatrixBack[kNCTTM][kNCTTMchannels]; //CTTM matrix for BOTTOM FPGA | |
cd82ed2f | 110 | Int_t fHighMultTh; //threshold for High Multiplicity trigger |
111 | Int_t fppMBTh; //threshold for pp Minimum Bias trigger | |
112 | Int_t fMultiMuonTh; //threshold for Multi Muon trigger | |
113 | Int_t fUPTh; //threshold for Ultra-Per coll trigger | |
114 | Float_t fdeltaminpsi; //min delta phi for J/psi decay (UP trigger) | |
115 | Float_t fdeltamaxpsi; //max delta phi for J/psi decay (UP trigger) | |
116 | Float_t fdeltaminro; //min delta phi for ro decay (UP trigger) | |
117 | Float_t fdeltamaxro; //max delta phi for ro decay (UP trigger) | |
118 | Int_t fstripWindow; //strip window for triggering | |
119 | ||
c06f660b | 120 | Bool_t fSel1,fSel2,fSel3,fSel4; // ppMB, PbPbMB2, PbPbMB3, PbPbUP |
121 | ||
122 | UInt_t fPowerMask[kNCTTMchannels+1]; // mask for 24 TDC channels | |
123 | ||
124 | Int_t fNCrateOn; // number of crate fired | |
125 | Int_t fNMaxipadOn; // number of Maxipad fired | |
126 | Int_t fNMaxipadOnAll; // number of Maxipad fired w/o TDC dead mask | |
c06f660b | 127 | |
372be75e | 128 | // aggiungere larghezza finestra temporale e tempo0 in ns |
129 | Float_t fStartTimeHit; // time window start after channel equalization (subtraction of the minimal time per channel default 0 ns) | |
130 | Float_t fTimeWidthTrigger; // time window width (default 25 ns) | |
131 | ||
6786addd | 132 | ClassDef(AliTOFTrigger,3) // TOF Trigger Detector class |
cd82ed2f | 133 | }; |
134 | #endif | |
c06f660b | 135 |