Adding TDC channel delays to the calib object.
[u/mrichter/AliRoot.git] / VZERO / AliVZEROTriggerData.h
CommitLineData
a08520b8 1#ifndef ALIVZEROTRIGGERDATA_H\r
2#define ALIVZEROTRIGGERDATA_H\r
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights\r
4 * reserved. \r
5 *\r
6 * See cxx source for full Copyright notice \r
7 */\r
e370cdfe 8\r
9// Class AliVZEROTriggerData\r
10// -------------------------\r
11// Retrieves and hold the FEE parameters\r
12// The parameters are recieved from the shuttle \r
13// AliVZEROTriggerData is then used in the AliVZEROTriggerSimulator\r
14//\r
a08520b8 15\r
16#include <TNamed.h>\r
17\r
e370cdfe 18#include "AliVZERODataFEE.h"\r
19\r
20\r
a08520b8 21class AliVZEROTriggerData : public TNamed {\r
22public:\r
23 AliVZEROTriggerData();\r
24 AliVZEROTriggerData(Int_t nRun, UInt_t startTime, UInt_t endTime);\r
25 ~AliVZEROTriggerData();\r
a08520b8 26 \r
27 void FillData(AliVZERODataFEE * data);\r
28\r
29 // ----- Setters -----\r
30\r
31 void SetClk1Win1(UShort_t* clks);\r
32 void SetClk1Win1(UShort_t clk, Int_t board);\r
33 void SetClk2Win1(UShort_t* clks);\r
34 void SetClk2Win1(UShort_t clk, Int_t board);\r
35 \r
36 void SetClk1Win2(UShort_t* clks);\r
37 void SetClk1Win2(UShort_t clk, Int_t board);\r
38 void SetClk2Win2(UShort_t* clks);\r
39 void SetClk2Win2(UShort_t clk, Int_t board);\r
40 \r
41 void SetDelayClk1Win1(UShort_t* delays);\r
42 void SetDelayClk1Win1(UShort_t delay, Int_t board);\r
43 void SetDelayClk2Win1(UShort_t* delays);\r
44 void SetDelayClk2Win1(UShort_t delay, Int_t board);\r
45 \r
46 void SetDelayClk1Win2(UShort_t* delays);\r
47 void SetDelayClk1Win2(UShort_t delay, Int_t board);\r
48 void SetDelayClk2Win2(UShort_t* delays);\r
49 void SetDelayClk2Win2(UShort_t delay, Int_t board);\r
50 \r
51 void SetLatchWin1(UShort_t *latchs);\r
52 void SetLatchWin1(UShort_t latch, Int_t board);\r
53 void SetLatchWin2(UShort_t *latchs);\r
54 void SetLatchWin2(UShort_t latch, Int_t board);\r
55 \r
56 void SetResetWin1(UShort_t *resets);\r
57 void SetResetWin1(UShort_t reset, Int_t board);\r
58 void SetResetWin2(UShort_t *resets);\r
59 void SetResetWin2(UShort_t reset, Int_t board);\r
60 \r
61 void SetPedestalSubtraction(Bool_t *peds);\r
62 void SetPedestalSubtraction(Bool_t ped, Int_t board);\r
63 \r
64 void SetBBAThreshold(UShort_t th) {fBBAThreshold = th;};\r
65 void SetBBCThreshold(UShort_t th) {fBBCThreshold = th;};\r
66\r
67 void SetBGAThreshold(UShort_t th) {fBGAThreshold = th;};\r
68 void SetBGCThreshold(UShort_t th) {fBGCThreshold = th;};\r
69\r
70 void SetBBAForBGThreshold(UShort_t th) {fBBAForBGThreshold = th;};\r
71 void SetBBCForBGThreshold(UShort_t th) {fBBCForBGThreshold = th;};\r
72 \r
73 void SetCentralityV0AThrLow(UShort_t th) {fCentralityVOAThrLow = th;};\r
74 void SetCentralityV0AThrHigh(UShort_t th) {fCentralityVOAThrHigh = th;};\r
75 \r
76 void SetCentralityV0CThrLow(UShort_t th) {fCentralityVOCThrLow = th;};\r
77 void SetCentralityV0CThrHigh(UShort_t th) {fCentralityVOCThrHigh = th;};\r
78 \r
79 void SetMultV0AThrLow(UShort_t th) {fMultV0AThrLow = th;};\r
80 void SetMultV0AThrHigh(UShort_t th) {fMultV0AThrHigh = th;};\r
81 \r
82 void SetMultV0CThrLow(UShort_t th) {fMultV0CThrLow = th;};\r
83 void SetMultV0CThrHigh(UShort_t th) {fMultV0CThrHigh = th;};\r
84 \r
85 void SetTriggerSelected(UShort_t trigger, Int_t output);\r
86 \r
87 void SetEnableCharge(Bool_t val, Int_t board, Int_t channel);\r
88 void SetEnableTiming(Bool_t val, Int_t board, Int_t channel);\r
89 void SetDiscriThr(UShort_t val, Int_t board, Int_t channel);\r
90 void SetDelayHit(UShort_t val, Int_t board, Int_t channel);\r
91 void SetPedestal(UShort_t val, Int_t integrator, Int_t board, Int_t channel);\r
92 void SetPedestalCut(UShort_t val, Int_t integrator, Int_t board, Int_t channel);\r
93\r
94 \r
95 // ----- Getters -----\r
96 \r
97 UShort_t * GetClk1Win1() const {return (UShort_t*)fClk1Win1;};\r
4bc15c46 98 UShort_t GetClk1Win1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fClk1Win1[board]:0);};\r
a08520b8 99 UShort_t * GetClk2Win1() const {return (UShort_t*)fClk2Win1;};\r
4bc15c46 100 UShort_t GetClk2Win1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fClk2Win1[board]:0);};\r
a08520b8 101\r
102 UShort_t * GetClk1Win2() const {return (UShort_t*)fClk1Win2;};\r
4bc15c46 103 UShort_t GetClk1Win2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fClk1Win2[board]:0);};\r
a08520b8 104 UShort_t * GetClk2Win2() const {return (UShort_t*)fClk2Win2;};\r
4bc15c46 105 UShort_t GetClk2Win2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fClk2Win2[board]:0);};\r
a08520b8 106\r
107 UShort_t * GetDelayClk1Win1() const {return (UShort_t*)fDelayClk1Win1;};\r
4bc15c46 108 UShort_t GetDelayClk1Win1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fDelayClk1Win1[board]:0);};\r
a08520b8 109 UShort_t * GetDelayClk2Win1() const {return (UShort_t*)fDelayClk2Win1;};\r
4bc15c46 110 UShort_t GetDelayClk2Win1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fDelayClk2Win1[board]:0);};\r
a08520b8 111 \r
112 UShort_t * GetDelayClk1Win2() const {return (UShort_t*)fDelayClk1Win2;};\r
4bc15c46 113 UShort_t GetDelayClk1Win2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fDelayClk1Win2[board]:0);};\r
a08520b8 114 UShort_t * GetDelayClk2Win2() const {return (UShort_t*)fDelayClk2Win2;};\r
4bc15c46 115 UShort_t GetDelayClk2Win2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fDelayClk2Win2[board]:0);};\r
a08520b8 116 \r
117 UShort_t * GetLatchWin1() const {return (UShort_t*)fLatchWin1;};\r
4bc15c46 118 UShort_t GetLatchWin1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fLatchWin1[board]:0);};\r
a08520b8 119 UShort_t * GetLatchWin2() const {return (UShort_t*)fLatchWin2;};\r
4bc15c46 120 UShort_t GetLatchWin2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fLatchWin2[board]:0);};\r
a08520b8 121 \r
122 UShort_t * GetResetWin1() const {return (UShort_t*)fResetWin1;};\r
4bc15c46 123 UShort_t GetResetWin1(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fResetWin1[board]:0);};\r
a08520b8 124 UShort_t * GetResetWin2() const {return (UShort_t*)fResetWin2;};\r
4bc15c46 125 UShort_t GetResetWin2(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fResetWin2[board]:0);};\r
a08520b8 126 \r
127 Bool_t * GetPedestalSubtraction() const {return (Bool_t*) fPedestalSubtraction;};\r
4bc15c46 128 Bool_t GetPedestalSubtraction(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fPedestalSubtraction[board]:0);};\r
a08520b8 129\r
130 UShort_t GetBBAThreshold() const {return fBBAThreshold;};\r
131 UShort_t GetBBCThreshold() const {return fBBCThreshold;};\r
132\r
133 UShort_t GetBGAThreshold() const {return fBGAThreshold;};\r
134 UShort_t GetBGCThreshold() const {return fBGCThreshold;};\r
135\r
136 UShort_t GetBBAForBGThreshold() const {return fBBAForBGThreshold;};\r
137 UShort_t GetBBCForBGThreshold() const {return fBBCForBGThreshold;};\r
138 \r
139 UShort_t GetCentralityV0AThrLow() const {return fCentralityVOAThrLow;};\r
140 UShort_t GetCentralityV0AThrHigh() const {return fCentralityVOAThrHigh;};\r
141 \r
142 UShort_t GetCentralityV0CThrLow() const {return fCentralityVOCThrLow;};\r
143 UShort_t GetCentralityV0CThrHigh() const {return fCentralityVOCThrHigh;};\r
144\r
145 UShort_t GetMultV0AThrLow() const {return fMultV0AThrLow;};\r
146 UShort_t GetMultV0AThrHigh() const {return fMultV0AThrHigh;};\r
147\r
148 UShort_t GetMultV0CThrLow() const {return fMultV0CThrLow;};\r
149 UShort_t GetMultV0CThrHigh() const {return fMultV0CThrHigh;};\r
150\r
4bc15c46 151 UShort_t GetTriggerSelected(Int_t output) const {return ((output>=0 && output<kNTriggerOutputs)?fTriggerSelected[output]:0);};\r
a08520b8 152 \r
153 Bool_t GetEnableCharge(Int_t board, Int_t channel);\r
154 Bool_t GetEnableTiming(Int_t board, Int_t channel);\r
155 UShort_t GetDiscriThr(Int_t board, Int_t channel);\r
156 UShort_t GetDelayHit(Int_t board, Int_t channel);\r
157 UShort_t GetPedestal(Int_t integrator, Int_t board, Int_t channel);\r
158 UShort_t GetPedestalCut(Int_t integrator, Int_t board, Int_t channel);\r
159\r
160 enum {\r
161 kNCIUBoards = AliVZERODataFEE::kNCIUBoards,\r
162 kNAliases = AliVZERODataFEE::kNAliases,\r
163 kNTriggerOutputs = 5,\r
164 kNChannels = 8\r
165 };\r
166 \r
167private:\r
f3051e80 168 AliVZEROTriggerData(const AliVZEROTriggerData &/*triggerData*/);\r
169 AliVZEROTriggerData& operator= (const AliVZEROTriggerData &/*triggerData*/);\r
a08520b8 170 \r
171 UShort_t fClk1Win1[kNCIUBoards]; //Profil of the Clock 1 of the Window 1 (BB window)\r
172 UShort_t fClk2Win1[kNCIUBoards]; //Profil of the Clock 2 of the Window 1 (BB window)\r
173 UShort_t fClk1Win2[kNCIUBoards]; //Profil of the Clock 1 of the Window 2 (BG window)\r
174 UShort_t fClk2Win2[kNCIUBoards]; //Profil of the Clock 2 of the Window 2 (BG window)\r
175 UShort_t fDelayClk1Win1[kNCIUBoards]; // Delays of the Clock 1 of the Window 1 (BB window)\r
176 UShort_t fDelayClk2Win1[kNCIUBoards]; // Delays of the Clock 2 of the Window 1 (BB window)\r
177 UShort_t fDelayClk1Win2[kNCIUBoards]; // Delays of the Clock 1 of the Window 2 (BG window)\r
178 UShort_t fDelayClk2Win2[kNCIUBoards]; // Delays of the Clock 2 of the Window 2 (BG window)\r
179 UShort_t fLatchWin1[kNCIUBoards]; //Profil of the Clock of the Latch signal of Window 1 (BB window)\r
180 UShort_t fLatchWin2[kNCIUBoards]; //Profil of the Clock of the Latch signal of Window 2 (BG window)\r
181 UShort_t fResetWin1[kNCIUBoards]; //Profil of the Clock of the Reset signal of Window 1 (BB window)\r
182 UShort_t fResetWin2[kNCIUBoards]; //Profil of the Clock of the Reset signal of Window 2 (BG window)\r
183 Bool_t fPedestalSubtraction[kNCIUBoards]; // Flag to en(dis)able pedestal subtraction before centrality trigger calculation\r
184 UShort_t fBBAThreshold; // Minimum bias Threshold in number of channel hit for V0A\r
185 UShort_t fBBCThreshold; // Minimum bias Threshold in number of channel hit for V0C\r
186 UShort_t fBGAThreshold; // Beam Gas Threshold in number of channel hit for V0A\r
187 UShort_t fBGCThreshold; // Beam Gas Threshold in number of channel hit for V0C\r
188 UShort_t fBBAForBGThreshold; // BBA threshold for Beam Gas triggers (i.e. BBA and BGC)\r
189 UShort_t fBBCForBGThreshold; // BBC threshold for Beam Gas triggers (i.e. BBC and BGA)\r
190 UShort_t fCentralityVOAThrLow; // Threshold used for centrality triggers (i.e. CTA1 and CTC1)\r
191 UShort_t fCentralityVOAThrHigh; // Threshold used for centrality triggers (i.e. CTA2 and CTC2)\r
192 UShort_t fCentralityVOCThrLow; // Threshold used for centrality triggers (i.e. CTA1 and CTC1)\r
193 UShort_t fCentralityVOCThrHigh; // Threshold used for centrality triggers (i.e. CTA2 and CTC2)\r
194 UShort_t fMultV0AThrLow; // Threshold used for multiplicity triggers (i.e. MTA and MTC)\r
195 UShort_t fMultV0AThrHigh; // Threshold used for multiplicity triggers (i.e. MTA and MTC)\r
196 UShort_t fMultV0CThrLow; // Threshold used for multiplicity triggers (i.e. MTA and MTC)\r
197 UShort_t fMultV0CThrHigh; // Threshold used for multiplicity triggers (i.e. MTA and MTC)\r
198 UShort_t fTriggerSelected[kNTriggerOutputs]; // Triggers selected on the 5 outputs to CTP\r
199 Bool_t fEnableCharge[kNCIUBoards][kNChannels]; // Flag to know is a channel is participating to the Charge triggers\r
200 Bool_t fEnableTiming[kNCIUBoards][kNChannels]; // Flag to know is a channel is participating to the Timing triggers\r
201 UShort_t fDiscriThr[kNCIUBoards][kNChannels]; // Threshold of each discriminator\r
202 UShort_t fDelayHit[kNCIUBoards][kNChannels]; // Individual delays of each channel \r
203 UShort_t fPedestalOdd[kNCIUBoards][kNChannels]; // Pedestals for the Odd integrators\r
204 UShort_t fPedestalEven[kNCIUBoards][kNChannels]; // Pedestals for the Even integrators\r
205 UShort_t fPedestalCutOdd[kNCIUBoards][kNChannels]; // Pedestals Cut for the Odd integrators\r
206 UShort_t fPedestalCutEven[kNCIUBoards][kNChannels]; // Pedestals Cut for the Even integrators\r
207\r
208 Int_t fRun; // Run number\r
209 Int_t fStartTime; // Start time\r
210 Int_t fEndTime; // End time\r
211 TString fAliasNames[kNAliases]; // aliases for DCS data\r
212 Bool_t fIsProcessed; // bool to know processing status\r
213 \r
e370cdfe 214 Bool_t IsClkValid(UShort_t clock) const;\r
5978520a 215 void SetParameter(TString name, Int_t val);\r
a08520b8 216 \r
217 \r
21eb8497 218 ClassDef( AliVZEROTriggerData, 2 ) \r
a08520b8 219\r
220};\r
221\r
222#endif // ALIVZEROTRIGGERDATA_H\r
e370cdfe 223\r
224\r