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