]>
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" |
cd82ed2f | 17 | |
ee51d470 | 18 | class AliTOFrawData; |
c06f660b | 19 | class AliTOFTriggerMask; |
ee51d470 | 20 | |
cd82ed2f | 21 | class AliTOFTrigger : public AliTriggerDetector |
22 | { | |
23 | public: | |
24 | AliTOFTrigger(); // constructor | |
25 | 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); //constructor with parameters | |
c06f660b | 26 | virtual ~AliTOFTrigger(); // destructor |
cd82ed2f | 27 | virtual void CreateInputs(); |
28 | virtual void Trigger(); | |
29 | Int_t GetHighMultTh() const {return fHighMultTh;} | |
30 | Int_t GetppMBTh() const {return fppMBTh;} | |
31 | Int_t GetMultiMuonTh() const {return fMultiMuonTh;} | |
32 | Int_t GetUPTh() const {return fUPTh;} | |
33 | Float_t Getdeltaminpsi() const {return fdeltaminpsi;} | |
34 | Float_t Getdeltamaxpsi() const {return fdeltamaxpsi;} | |
35 | Float_t Getdeltaminro() const {return fdeltaminro;} | |
36 | Float_t Getdeltamaxro() const {return fdeltamaxro;} | |
37 | Int_t GetstripWindow() const {return fstripWindow;} | |
38 | ||
c06f660b | 39 | void LoadActiveMask(); // Load active channel trigger mask |
5cd96e39 | 40 | void GetMapMatrix(Bool_t map[][24]) const; |
42e171ac | 41 | void GetMap(Bool_t **map) const; |
ee51d470 | 42 | //void PrintMap(); // to be checked because of warning problems |
5cd96e39 | 43 | void GetTRDmapMatrix(Bool_t map[][8]) const; |
42e171ac | 44 | void GetTRDmap(Bool_t **map) const; |
ee51d470 | 45 | Bool_t GetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); |
46 | Bool_t GetBit(Int_t *detind); | |
47 | void SetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); | |
48 | void SetBit(Int_t *detind); | |
49 | void ResetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); | |
50 | void ResetBit(Int_t *detind); | |
51 | ||
52 | ||
cd82ed2f | 53 | void SetHighMultTh(Int_t HighMultTh){fHighMultTh = HighMultTh;} |
54 | void SetppMBTh(Int_t ppMBTh){fppMBTh = ppMBTh;} | |
55 | void SetMultiMuonTh(Int_t MultiMuonTh){fMultiMuonTh = MultiMuonTh;} | |
56 | void SetUPTh(Int_t UPTh){fUPTh = UPTh;} | |
57 | void Setdeltaminpsi(Float_t deltaminpsi){fdeltaminpsi = deltaminpsi;} | |
58 | void Setdeltamaxpsi(Float_t deltamaxpsi){fdeltamaxpsi = deltamaxpsi;} | |
59 | void Setdeltaminro(Float_t deltaminro){fdeltaminro = deltaminro;} | |
60 | void Setdeltamaxro(Float_t deltamaxro){fdeltamaxro = deltamaxro;} | |
61 | void SetstripWindow(Int_t stripWindow){fstripWindow = stripWindow;} | |
62 | ||
c06f660b | 63 | Bool_t Return(Int_t i){if(i==0) return fSel1; |
64 | else if(i==1) return fSel2; | |
65 | else if(i==2) return fSel3; | |
66 | else if(i==3) return fSel4; | |
8fa5c3a3 | 67 | else { AliWarning(Form(" Index out of range: %d not in [0,3]",i)); return kFALSE; } |
c06f660b | 68 | }; |
69 | ||
70 | Int_t GetNumberOfCrateOn(){return fNCrateOn;}; | |
71 | Int_t GetNumberOfMaxipadOn(){return fNMaxipadOn;}; | |
72 | Int_t GetNumberOfMaxipadOnAll(){return fNMaxipadOnAll;}; | |
73 | Bool_t *GetLTMarray(){return fLTMarray;}; | |
ee51d470 | 74 | void CreateCTTMMatrix(); |
cd82ed2f | 75 | void CreateLTMMatrix(); |
ee51d470 | 76 | void CreateLTMMatrixFromDigits(); |
77 | void CreateLTMMatrixFromRaw(AliRawReader *fRawReader); | |
cd82ed2f | 78 | private: |
79 | ||
80 | enum{ | |
81 | kNLTM = 72, //Number of LTM | |
82 | kNLTMchannels = 48, //Number of channels in a LTM | |
83 | kNCTTM = 36, //Number of CTTM per TOF side | |
ee51d470 | 84 | kNCTTMchannels = 24, //Number of channels in a CTTM |
85 | kNLTMtoTRDchannels = 8 //Number of channels in a CTTM | |
cd82ed2f | 86 | }; |
87 | ||
c06f660b | 88 | AliTOFTrigger& operator=(const AliTOFTrigger &/*source*/); // ass. op. |
9a838fb7 | 89 | AliTOFTrigger(const AliTOFTrigger & tr); |
c06f660b | 90 | |
ee51d470 | 91 | void GetCTTMIndex(Int_t *detind, Int_t *indexCTTM); |
42e171ac | 92 | void GetLTMIndex(const Int_t * const detind, Int_t *LTMIndex); |
c06f660b | 93 | Bool_t fLTMmatrix[kNLTM][kNLTMchannels]; //LTM matrix |
94 | Bool_t fLTMarray[kNCTTM]; //LTM array for UPpurposes | |
ee51d470 | 95 | Bool_t fCTTMmatrixFront[kNCTTM][kNCTTMchannels];//CTTM matrix for TOP FPGA |
96 | Bool_t fCTTMmatrixBack[kNCTTM][kNCTTMchannels]; //CTTM matrix for BOTTOM FPGA | |
cd82ed2f | 97 | Int_t fHighMultTh; //threshold for High Multiplicity trigger |
98 | Int_t fppMBTh; //threshold for pp Minimum Bias trigger | |
99 | Int_t fMultiMuonTh; //threshold for Multi Muon trigger | |
100 | Int_t fUPTh; //threshold for Ultra-Per coll trigger | |
101 | Float_t fdeltaminpsi; //min delta phi for J/psi decay (UP trigger) | |
102 | Float_t fdeltamaxpsi; //max delta phi for J/psi decay (UP trigger) | |
103 | Float_t fdeltaminro; //min delta phi for ro decay (UP trigger) | |
104 | Float_t fdeltamaxro; //max delta phi for ro decay (UP trigger) | |
105 | Int_t fstripWindow; //strip window for triggering | |
106 | ||
c06f660b | 107 | Bool_t fSel1,fSel2,fSel3,fSel4; // ppMB, PbPbMB2, PbPbMB3, PbPbUP |
108 | ||
109 | UInt_t fPowerMask[kNCTTMchannels+1]; // mask for 24 TDC channels | |
110 | ||
111 | Int_t fNCrateOn; // number of crate fired | |
112 | Int_t fNMaxipadOn; // number of Maxipad fired | |
113 | Int_t fNMaxipadOnAll; // number of Maxipad fired w/o TDC dead mask | |
114 | AliTOFTriggerMask *fTOFTrigMask; // class with the TOF trigger mask | |
115 | ||
cd82ed2f | 116 | ClassDef(AliTOFTrigger,1) // TOF Trigger Detector class |
117 | }; | |
118 | #endif | |
c06f660b | 119 |