]>
Commit | Line | Data |
---|---|---|
3191f471 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id: AliVZEROCalibData.cxx, */ | |
17 | ||
18 | ///////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // class for VZERO calibration // | |
21 | // // | |
22 | ///////////////////////////////////////////////////////////////////////////// | |
23 | ||
706506da | 24 | #include <TMath.h> |
d5deaaa5 | 25 | #include <TObjString.h> |
26 | #include <TMap.h> | |
706506da | 27 | |
d5deaaa5 | 28 | #include "AliDCSValue.h" |
3191f471 | 29 | #include "AliVZEROCalibData.h" |
32c24147 | 30 | #include "AliVZERODataDCS.h" |
31 | #include "AliLog.h" | |
3191f471 | 32 | |
33 | ClassImp(AliVZEROCalibData) | |
34 | ||
35 | //________________________________________________________________ | |
36 | AliVZEROCalibData::AliVZEROCalibData() | |
37 | { | |
2f09013f | 38 | // default constructor |
39 | ||
40 | for(int t=0; t<64; t++) { | |
41 | fMeanHV[t] = 100.0; | |
42 | fWidthHV[t] = 0.0; | |
992e9cba | 43 | fTimeOffset[t] = 5.0; |
2f09013f | 44 | fTimeGain[t] = 1.0; |
45 | fDeadChannel[t]= kFALSE; | |
6e2c3e87 | 46 | fDiscriThr[t] = 2.5; |
2f09013f | 47 | } |
48 | for(int t=0; t<128; t++) { | |
49 | fPedestal[t] = 0.0; | |
50 | fSigma[t] = 0.0; | |
51 | fADCmean[t] = 0.0; | |
52 | fADCsigma[t] = 0.0; | |
53 | fGain[t] = 1.0; | |
54 | } | |
55 | for(int i=0; i<kNCIUBoards ;i++) { | |
56 | fTimeResolution[i] = 25./256.; // Default time resolution | |
57 | fWidthResolution[i] = 25./64.; // Default time width resolution | |
32cd3fdc | 58 | fMatchWindow[i] = 4; |
59 | fSearchWindow[i] = 16; | |
60 | fTriggerCountOffset[i] = 3247; | |
61 | fRollOver[i] = 3563; | |
2f09013f | 62 | } |
d5deaaa5 | 63 | |
3191f471 | 64 | } |
65 | ||
a3c86e1f | 66 | //________________________________________________________________ |
67 | void AliVZEROCalibData::Reset() | |
68 | { | |
d7a5c700 | 69 | // reset |
a3c86e1f | 70 | } |
71 | ||
3191f471 | 72 | //________________________________________________________________ |
73 | AliVZEROCalibData::AliVZEROCalibData(const char* name) | |
74 | { | |
32c24147 | 75 | // Constructor |
2f09013f | 76 | TString namst = "Calib_"; |
77 | namst += name; | |
78 | SetName(namst.Data()); | |
79 | SetTitle(namst.Data()); | |
80 | for(int t=0; t<64; t++) { | |
81 | fMeanHV[t] = 100.0; | |
82 | fWidthHV[t] = 0.0; | |
992e9cba | 83 | fTimeOffset[t] = 5.0; |
2f09013f | 84 | fTimeGain[t] = 1.0; |
85 | fDeadChannel[t]= kFALSE; | |
6e2c3e87 | 86 | fDiscriThr[t] = 2.5; |
2f09013f | 87 | } |
88 | for(int t=0; t<128; t++) { | |
89 | fPedestal[t] = 0.0; | |
90 | fSigma[t] = 0.0; | |
91 | fADCmean[t] = 0.0; | |
92 | fADCsigma[t] = 0.0; | |
93 | fGain[t] = 1.0; | |
94 | } | |
95 | for(int i=0; i<kNCIUBoards ;i++) { | |
96 | fTimeResolution[i] = 25./256.; // Default time resolution in ns / channel | |
97 | fWidthResolution[i] = 25./64.; // Default time width resolution in ns / channel | |
32cd3fdc | 98 | fMatchWindow[i] = 4; |
99 | fSearchWindow[i] = 16; | |
100 | fTriggerCountOffset[i] = 3247; | |
101 | fRollOver[i] = 3563; | |
2f09013f | 102 | } |
3191f471 | 103 | |
104 | } | |
105 | ||
106 | //________________________________________________________________ | |
107 | AliVZEROCalibData::AliVZEROCalibData(const AliVZEROCalibData& calibda) : | |
108 | TNamed(calibda) | |
109 | { | |
110 | // copy constructor | |
111 | ||
112 | SetName(calibda.GetName()); | |
113 | SetTitle(calibda.GetName()); | |
114 | ||
fae0e0c0 | 115 | for(int t=0; t<128; t++) { |
3191f471 | 116 | fPedestal[t] = calibda.GetPedestal(t); |
fae0e0c0 | 117 | fSigma[t] = calibda.GetSigma(t); |
2a25ea57 | 118 | fADCmean[t] = calibda.GetADCmean(t); |
119 | fADCsigma[t] = calibda.GetADCsigma(t); | |
120 | fGain[t] = calibda.GetGain(t); } | |
fae0e0c0 | 121 | |
122 | for(int t=0; t<64; t++) { | |
d7a5c700 | 123 | fMeanHV[t] = calibda.GetMeanHV(t); |
2a25ea57 | 124 | fWidthHV[t] = calibda.GetWidthHV(t); |
125 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d5deaaa5 | 126 | fTimeGain[t] = calibda.GetTimeGain(t); |
2f09013f | 127 | fDeadChannel[t] = calibda.IsChannelDead(t); |
6e2c3e87 | 128 | fDiscriThr[t] = calibda.GetDiscriThr(t); |
d5deaaa5 | 129 | } |
130 | ||
2f09013f | 131 | for(int i=0; i<kNCIUBoards ;i++) { |
132 | fTimeResolution[i] = calibda.GetTimeResolution(i); | |
133 | fWidthResolution[i] = calibda.GetWidthResolution(i); | |
32cd3fdc | 134 | fMatchWindow[i] = calibda.GetMatchWindow(i); |
135 | fSearchWindow[i] = calibda.GetSearchWindow(i); | |
136 | fTriggerCountOffset[i] = calibda.GetTriggerCountOffset(i); | |
137 | fRollOver[i] = calibda.GetRollOver(i); | |
2f09013f | 138 | } |
3191f471 | 139 | |
140 | } | |
141 | ||
142 | //________________________________________________________________ | |
143 | AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda) | |
144 | { | |
145 | // assignment operator | |
146 | ||
147 | SetName(calibda.GetName()); | |
148 | SetTitle(calibda.GetName()); | |
149 | ||
fae0e0c0 | 150 | for(int t=0; t<128; t++) { |
3191f471 | 151 | fPedestal[t] = calibda.GetPedestal(t); |
fae0e0c0 | 152 | fSigma[t] = calibda.GetSigma(t); |
2a25ea57 | 153 | fADCmean[t] = calibda.GetADCmean(t); |
40b6a179 | 154 | fADCsigma[t] = calibda.GetADCsigma(t); |
2a25ea57 | 155 | fGain[t] = calibda.GetGain(t); } |
fae0e0c0 | 156 | |
2a25ea57 | 157 | for(int t=0; t<64; t++) { |
d7a5c700 | 158 | fMeanHV[t] = calibda.GetMeanHV(t); |
2a25ea57 | 159 | fWidthHV[t] = calibda.GetWidthHV(t); |
160 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d5deaaa5 | 161 | fTimeGain[t] = calibda.GetTimeGain(t); |
2f09013f | 162 | fDeadChannel[t] = calibda.IsChannelDead(t); |
6e2c3e87 | 163 | fDiscriThr[t] = calibda.GetDiscriThr(t); |
d5deaaa5 | 164 | } |
2f09013f | 165 | for(int i=0; i<kNCIUBoards ;i++) { |
166 | fTimeResolution[i] = calibda.GetTimeResolution(i); | |
167 | fWidthResolution[i] = calibda.GetWidthResolution(i); | |
32cd3fdc | 168 | fMatchWindow[i] = calibda.GetMatchWindow(i); |
169 | fSearchWindow[i] = calibda.GetSearchWindow(i); | |
170 | fTriggerCountOffset[i] = calibda.GetTriggerCountOffset(i); | |
171 | fRollOver[i] = calibda.GetRollOver(i); | |
2f09013f | 172 | } |
2a25ea57 | 173 | |
3191f471 | 174 | return *this; |
175 | ||
176 | } | |
177 | ||
178 | //________________________________________________________________ | |
179 | AliVZEROCalibData::~AliVZEROCalibData() | |
180 | { | |
d7a5c700 | 181 | // destructor |
3191f471 | 182 | } |
d5deaaa5 | 183 | //_____________________________________________________________________________ |
184 | void AliVZEROCalibData::FillDCSData(AliVZERODataDCS * data){ | |
185 | // Set all parameters from the data get by the shuttle | |
186 | TMap * params = data->GetFEEParameters(); | |
187 | TIter iter(params); | |
188 | TObjString* aliasName; | |
189 | ||
190 | while (( aliasName = (TObjString*) iter.Next() )) { | |
191 | AliDCSValue* aValue = (AliDCSValue*) params->GetValue(aliasName); | |
5978520a | 192 | Int_t val; |
d5deaaa5 | 193 | if(aValue) { |
692e31a4 | 194 | val = aValue->GetUInt(); |
5978520a | 195 | AliInfo(Form("%s : %d",aliasName->String().Data(), val)); |
d5deaaa5 | 196 | SetParameter(aliasName->String(),val); |
197 | } | |
198 | } | |
199 | ||
200 | SetMeanHV(data->GetMeanHV()); | |
201 | SetWidthHV(data->GetWidthHV()); | |
202 | SetDeadMap(data->GetDeadMap()); | |
203 | ||
204 | } | |
205 | //_____________________________________________________________________________ | |
5978520a | 206 | void AliVZEROCalibData::SetParameter(TString name, Int_t val){ |
d5deaaa5 | 207 | // Set given parameter |
208 | ||
209 | Int_t iBoard = -1; | |
57c7500a | 210 | Int_t iChannel = -1; |
d5deaaa5 | 211 | |
212 | TSeqCollection* nameSplit = name.Tokenize("/"); | |
213 | TObjString * boardName = (TObjString *)nameSplit->At(2); | |
214 | sscanf(boardName->String().Data(),"CIU%d",&iBoard); | |
57c7500a | 215 | |
216 | TString paramName = ((TObjString *)nameSplit->At(3))->String(); | |
217 | Char_t channel[2] ; channel[1] = '\0'; | |
218 | channel[0] = paramName[paramName.Sizeof()-2]; | |
219 | sscanf(channel,"%d",&iChannel); | |
d5deaaa5 | 220 | |
4bc15c46 | 221 | if(name.Contains("TimeResolution")) SetTimeResolution((UShort_t) val,iBoard); |
222 | else if(name.Contains("WidthResolution")) SetWidthResolution((UShort_t) val,iBoard); | |
32cd3fdc | 223 | else if(name.Contains("MatchWindow")) SetMatchWindow((UInt_t) val,iBoard); |
224 | else if(name.Contains("SearchWindow")) SetSearchWindow((UInt_t) val,iBoard); | |
225 | else if(name.Contains("TriggerCountOffset")) SetTriggerCountOffset((UInt_t) val,iBoard); | |
226 | else if(name.Contains("RollOver")) SetRollOver((UInt_t) val,iBoard); | |
57c7500a | 227 | else if(name.Contains("DelayHit")) SetTimeOffset(0.01*(Float_t)val,8*iBoard+(iChannel-1)); |
6e2c3e87 | 228 | else if(name.Contains("DiscriThr")) SetDiscriThr(((Float_t)val-2040.)/112.,8*iBoard+(iChannel-1)); |
d5deaaa5 | 229 | else AliError(Form("No Setter found for FEE parameter : %s",name.Data())); |
230 | } | |
3191f471 | 231 | |
3191f471 | 232 | //________________________________________________________________ |
32c24147 | 233 | void AliVZEROCalibData::SetPedestal(const Float_t* Pedestal) |
3191f471 | 234 | { |
fae0e0c0 | 235 | if(Pedestal) for(int t=0; t<128; t++) fPedestal[t] = Pedestal[t]; |
236 | else for(int t=0; t<128; t++) fPedestal[t] = 0.0; | |
237 | } | |
238 | ||
239 | //________________________________________________________________ | |
32c24147 | 240 | void AliVZEROCalibData::SetSigma(const Float_t* Sigma) |
fae0e0c0 | 241 | { |
242 | if(Sigma) for(int t=0; t<128; t++) fSigma[t] = Sigma[t]; | |
243 | else for(int t=0; t<128; t++) fSigma[t] = 0.0; | |
3191f471 | 244 | } |
245 | ||
246 | //________________________________________________________________ | |
32c24147 | 247 | void AliVZEROCalibData::SetADCmean(const Float_t* ADCmean) |
3191f471 | 248 | { |
2a25ea57 | 249 | if(ADCmean) for(int t=0; t<128; t++) fADCmean[t] = ADCmean[t]; |
250 | else for(int t=0; t<128; t++) fADCmean[t] = 0.0; | |
3191f471 | 251 | } |
252 | ||
40b6a179 | 253 | //________________________________________________________________ |
32c24147 | 254 | void AliVZEROCalibData::SetADCsigma(const Float_t* ADCsigma) |
40b6a179 | 255 | { |
256 | if(ADCsigma) for(int t=0; t<128; t++) fADCsigma[t] = ADCsigma[t]; | |
257 | else for(int t=0; t<128; t++) fADCsigma[t] = 0.0; | |
258 | } | |
259 | ||
fae0e0c0 | 260 | //________________________________________________________________ |
32c24147 | 261 | void AliVZEROCalibData::SetMeanHV(const Float_t* MeanHV) |
fae0e0c0 | 262 | { |
2a25ea57 | 263 | if(MeanHV) for(int t=0; t<64; t++) fMeanHV[t] = MeanHV[t]; |
264 | else for(int t=0; t<64; t++) fMeanHV[t] = 0.0; | |
fae0e0c0 | 265 | } |
266 | ||
267 | //________________________________________________________________ | |
32c24147 | 268 | void AliVZEROCalibData::SetWidthHV(const Float_t* WidthHV) |
fae0e0c0 | 269 | { |
2a25ea57 | 270 | if(WidthHV) for(int t=0; t<64; t++) fWidthHV[t] = WidthHV[t]; |
271 | else for(int t=0; t<64; t++) fWidthHV[t] = 0.0; | |
fae0e0c0 | 272 | } |
d7a5c700 | 273 | |
7495d2be | 274 | //________________________________________________________________ |
32c24147 | 275 | void AliVZEROCalibData::SetDeadMap(const Bool_t* deadMap) |
7495d2be | 276 | { |
277 | if(deadMap) for(int t=0; t<64; t++) fDeadChannel[t] = deadMap[t]; | |
278 | else for(int t=0; t<64; t++) fDeadChannel[t] = kFALSE; | |
279 | } | |
280 | ||
d7a5c700 | 281 | //________________________________________________________________ |
32c24147 | 282 | void AliVZEROCalibData::SetGain(const Float_t* Gain) |
d7a5c700 | 283 | { |
2a25ea57 | 284 | if(Gain) for(int t=0; t<128; t++) fGain[t] = Gain[t]; |
285 | else for(int t=0; t<128; t++) fGain[t] = 0.0; | |
d7a5c700 | 286 | } |
287 | ||
57c7500a | 288 | //________________________________________________________________ |
289 | void AliVZEROCalibData::SetTimeOffset(Float_t val, Int_t channel) | |
290 | { | |
291 | if((channel>=0) && (channel<64)){ | |
292 | fTimeOffset[channel]=val; | |
a70d760d | 293 | AliInfo(Form("Time offset for channel %d set to %f",channel,fTimeOffset[channel])); |
57c7500a | 294 | } |
295 | else | |
296 | AliError(Form("Channel %d is not valid",channel)); | |
297 | } | |
298 | ||
d7a5c700 | 299 | //________________________________________________________________ |
32c24147 | 300 | void AliVZEROCalibData::SetTimeOffset(const Float_t* TimeOffset) |
d7a5c700 | 301 | { |
2a25ea57 | 302 | if(TimeOffset) for(int t=0; t<64; t++) fTimeOffset[t] = TimeOffset[t]; |
992e9cba | 303 | else for(int t=0; t<64; t++) fTimeOffset[t] = 5.0; |
d7a5c700 | 304 | } |
2a25ea57 | 305 | |
306 | //________________________________________________________________ | |
32c24147 | 307 | void AliVZEROCalibData::SetTimeGain(const Float_t* TimeGain) |
2a25ea57 | 308 | { |
309 | if(TimeGain) for(int t=0; t<64; t++) fTimeGain[t] = TimeGain[t]; | |
310 | else for(int t=0; t<64; t++) fTimeGain[t] = 0.0; | |
311 | } | |
312 | ||
706506da | 313 | //_____________________________________________________________________________ |
314 | Float_t AliVZEROCalibData::GetMIPperADC(Int_t channel) const { | |
315 | ||
316 | // Computes the MIP conversion factor - MIP per ADC channel - | |
317 | // Argument passed is the PM number (aliroot numbering) | |
318 | ||
32c24147 | 319 | Float_t p0[64] = { |
706506da | 320 | 7.094891, 7.124938, 7.089708, 7.098169, 7.094482, 7.147250, 7.170978, 7.183392, |
321 | 7.145760, 7.148096, 7.153840, 7.143544, 7.186069, 7.194580, 7.203516, 7.195176, | |
322 | 7.188333, 7.198607, 7.209412, 7.226565, 7.221695, 7.205132, 7.191238, 7.227724, | |
11b348f3 | 323 | 7.232810, 7.252655, 7.230309, 7.140891, 7.273518, 7.242969, 7.252859, 7.252655, |
706506da | 324 | 7.026802, 7.079913, 7.134147, 7.092387, 7.079561, 7.072848, 7.123192, 7.003141, |
325 | 7.024667, 7.124784, 7.123442, 7.129744, 7.110671, 7.143031, 7.139439, 7.178109, | |
326 | 7.247803, 7.139396, 7.293809, 7.094454, 6.992198, 7.206448, 7.244765, 7.056197, | |
327 | 7.263595, 7.138569, 7.089582, 7.215683, 7.266183, 7.165123, 7.243276, 7.235135 }; | |
32c24147 | 328 | Float_t p1[64] = { |
706506da | 329 | 0.135569, 0.146405, 0.142425, 0.144278, 0.142307, 0.141648, 0.128477, 0.138239, |
330 | 0.144173, 0.143419, 0.143572, 0.144482, 0.138024, 0.136542, 0.135955, 0.138537, | |
331 | 0.148521, 0.141999, 0.139627, 0.130014, 0.134970, 0.135635, 0.139094, 0.140634, | |
11b348f3 | 332 | 0.137971, 0.142080, 0.142793, 0.136054, 0.142778, 0.146045, 0.139133, 0.142080, |
706506da | 333 | 0.144121, 0.142311, 0.136564, 0.142686, 0.138792, 0.166285, 0.136387, 0.155391, |
334 | 0.176082, 0.140408, 0.164738, 0.144270, 0.142766, 0.147486, 0.141951, 0.138012, | |
335 | 0.132394, 0.142849, 0.140477, 0.144592, 0.141558, 0.157646, 0.143758, 0.173385, | |
336 | 0.146489, 0.143279, 0.145230, 0.147203, 0.147333, 0.144979, 0.148597, 0.138985 }; | |
337 | ||
338 | // High Voltage retrieval from Calibration Data Base: | |
32c24147 | 339 | Float_t hv = fMeanHV[channel]; |
340 | Float_t mip = -1; | |
341 | if (hv>0) | |
342 | mip = 0.6/TMath::Exp((TMath::Log(hv) - p0[channel] )/p1[channel]); | |
343 | return mip; | |
706506da | 344 | |
345 | } | |
d5deaaa5 | 346 | //________________________________________________________________ |
347 | void AliVZEROCalibData::SetTimeResolution(UShort_t *resols){ | |
348 | // Set Time Resolution of the TDC | |
349 | if(resols) for(int t=0; t<kNCIUBoards; t++) SetTimeResolution(resols[t],t); | |
4bc15c46 | 350 | else AliError("Time Resolution not defined."); |
d5deaaa5 | 351 | |
352 | } | |
353 | //________________________________________________________________ | |
354 | void AliVZEROCalibData::SetTimeResolution(UShort_t resol, Int_t board) | |
355 | { | |
356 | // Set Time Resolution of the TDC | |
4bc15c46 | 357 | if((board>=0) && (board<kNCIUBoards)) { |
d5deaaa5 | 358 | switch(resol){ |
359 | case 0: | |
360 | fTimeResolution[board] = 25./256.; | |
361 | break; | |
362 | case 1: | |
363 | fTimeResolution[board] = 25./128.; | |
364 | break; | |
365 | case 2: | |
366 | fTimeResolution[board] = 25./64.; | |
367 | break; | |
368 | case 3: | |
369 | fTimeResolution[board] = 25./32.; | |
370 | break; | |
371 | case 4: | |
372 | fTimeResolution[board] = 25./16.; | |
373 | break; | |
374 | case 5: | |
375 | fTimeResolution[board] = 25./8.; | |
376 | break; | |
377 | case 6: | |
378 | fTimeResolution[board] = 6.25; | |
379 | break; | |
380 | case 7: | |
381 | fTimeResolution[board] = 12.5; | |
382 | break; | |
383 | } | |
4bc15c46 | 384 | AliInfo(Form("Time Resolution of board %d set to %f",board,fTimeResolution[board])); |
d5deaaa5 | 385 | } else AliError(Form("Board %d is not valid",board)); |
386 | } | |
387 | //________________________________________________________________ | |
388 | void AliVZEROCalibData::SetWidthResolution(UShort_t *resols){ | |
389 | // Set Time Width Resolution of the TDC | |
390 | if(resols) for(int t=0; t<kNCIUBoards; t++) SetWidthResolution(resols[t],t); | |
4bc15c46 | 391 | else AliError("Width Resolution not defined."); |
d5deaaa5 | 392 | |
393 | } | |
394 | //________________________________________________________________ | |
395 | void AliVZEROCalibData::SetWidthResolution(UShort_t resol, Int_t board) | |
396 | { | |
397 | // Set Time Width Resolution of the TDC | |
4bc15c46 | 398 | if((board>=0) && (board<kNCIUBoards)){ |
d5deaaa5 | 399 | switch(resol){ |
400 | case 0: | |
401 | fWidthResolution[board] = 25./256.; | |
402 | break; | |
403 | case 1: | |
404 | fWidthResolution[board] = 25./128.; | |
405 | break; | |
406 | case 2: | |
407 | fWidthResolution[board] = 25./64.; | |
408 | break; | |
409 | case 3: | |
410 | fWidthResolution[board] = 25./32.; | |
411 | break; | |
412 | case 4: | |
413 | fWidthResolution[board] = 25./16.; | |
414 | break; | |
415 | case 5: | |
416 | fWidthResolution[board] = 25./8.; | |
417 | break; | |
418 | case 6: | |
419 | fWidthResolution[board] = 6.25; | |
420 | break; | |
421 | case 7: | |
422 | fWidthResolution[board] = 12.5; | |
423 | break; | |
424 | case 8: | |
425 | fWidthResolution[board] = 25.; | |
426 | break; | |
427 | case 9: | |
428 | fWidthResolution[board] = 50.; | |
429 | break; | |
430 | case 10: | |
431 | fWidthResolution[board] = 100.; | |
432 | break; | |
433 | case 11: | |
434 | fWidthResolution[board] = 200.; | |
435 | break; | |
436 | case 12: | |
437 | fWidthResolution[board] = 400.; | |
438 | break; | |
439 | case 13: | |
440 | fWidthResolution[board] = 800.; | |
441 | break; | |
442 | ||
443 | } | |
4bc15c46 | 444 | AliInfo(Form("Width Resolution of board %d set to %f",board,fWidthResolution[board])); |
d5deaaa5 | 445 | }else AliError(Form("Board %d is not valid",board)); |
446 | } | |
706506da | 447 | |
32cd3fdc | 448 | //________________________________________________________________ |
449 | void AliVZEROCalibData::SetMatchWindow(UInt_t *windows) | |
450 | { | |
451 | // Set Match window of the HPTDC | |
452 | // The units are 25ns | |
453 | if(windows) for(Int_t b=0; b<kNCIUBoards; b++) SetMatchWindow(windows[b],b); | |
454 | else AliError("Match windows not defined."); | |
455 | } | |
456 | ||
457 | //________________________________________________________________ | |
458 | void AliVZEROCalibData::SetMatchWindow(UInt_t window, Int_t board) | |
459 | { | |
460 | // Set Match window of the HPTDC | |
461 | // The units are 25ns | |
462 | if((board>=0) && (board<kNCIUBoards)){ | |
463 | fMatchWindow[board] = window; | |
464 | AliInfo(Form("Match window of board %d set to %d",board,fMatchWindow[board])); | |
465 | } | |
466 | else | |
467 | AliError(Form("Board %d is not valid",board)); | |
468 | } | |
469 | ||
470 | //________________________________________________________________ | |
471 | void AliVZEROCalibData::SetSearchWindow(UInt_t *windows) | |
472 | { | |
473 | // Set Search window of the HPTDC | |
474 | // The units are 25ns | |
475 | if(windows) for(Int_t b=0; b<kNCIUBoards; b++) SetSearchWindow(windows[b],b); | |
476 | else AliError("Search windows not defined."); | |
477 | } | |
478 | ||
479 | //________________________________________________________________ | |
480 | void AliVZEROCalibData::SetSearchWindow(UInt_t window, Int_t board) | |
481 | { | |
482 | // Set Search window of the HPTDC | |
483 | // The units are 25ns | |
484 | if((board>=0) && (board<kNCIUBoards)){ | |
485 | fSearchWindow[board] = window; | |
486 | AliInfo(Form("Search window of board %d set to %d",board,fSearchWindow[board])); | |
487 | } | |
488 | else | |
489 | AliError(Form("Board %d is not valid",board)); | |
490 | } | |
491 | ||
492 | //________________________________________________________________ | |
493 | void AliVZEROCalibData::SetTriggerCountOffset(UInt_t *offsets) | |
494 | { | |
495 | // Set trigger-count offset of the HPTDC | |
496 | // The units are 25ns | |
497 | if(offsets) for(Int_t b=0; b<kNCIUBoards; b++) SetTriggerCountOffset(offsets[b],b); | |
498 | else AliError("Trigger count offsets not defined."); | |
499 | } | |
500 | ||
501 | //________________________________________________________________ | |
502 | void AliVZEROCalibData::SetTriggerCountOffset(UInt_t offset, Int_t board) | |
503 | { | |
504 | // Set trigger-count offsets of the HPTDC | |
505 | // The units are 25ns | |
506 | if((board>=0) && (board<kNCIUBoards)){ | |
507 | fTriggerCountOffset[board] = offset; | |
508 | AliInfo(Form("Trigger-count offset of board %d set to %d",board,fTriggerCountOffset[board])); | |
509 | } | |
510 | else | |
511 | AliError(Form("Board %d is not valid",board)); | |
512 | } | |
513 | ||
514 | //________________________________________________________________ | |
515 | void AliVZEROCalibData::SetRollOver(UInt_t *offsets) | |
516 | { | |
517 | // Set Roll-over of the HPTDC | |
518 | // The units are 25ns | |
519 | if(offsets) for(Int_t b=0; b<kNCIUBoards; b++) SetRollOver(offsets[b],b); | |
520 | else AliError("Roll-over offsets not defined."); | |
521 | } | |
522 | ||
523 | //________________________________________________________________ | |
524 | void AliVZEROCalibData::SetRollOver(UInt_t offset, Int_t board) | |
525 | { | |
526 | // Set Roll-over of the HPTDC | |
527 | // The units are 25ns | |
528 | if((board>=0) && (board<kNCIUBoards)){ | |
529 | fRollOver[board] = offset; | |
530 | AliInfo(Form("Roll-over offset of board %d set to %d",board,fRollOver[board])); | |
531 | } | |
532 | else | |
533 | AliError(Form("Board %d is not valid",board)); | |
534 | } | |
6e2c3e87 | 535 | |
536 | //________________________________________________________________ | |
537 | void AliVZEROCalibData::SetDiscriThr(Float_t thr, Int_t channel) | |
538 | { | |
539 | // Set the TDC discriminator | |
540 | // threshold values expressed in units of ADC | |
541 | if((channel>=0) && (channel<64)){ | |
542 | if (thr > 0) { | |
543 | fDiscriThr[channel]=thr; | |
544 | AliInfo(Form("Discriminator threshold for channel %d set to %f",channel,fDiscriThr[channel])); | |
545 | } | |
546 | else { | |
547 | AliWarning(Form("Ignore wrong threshold value (%f) for channel %d !",thr,channel)); | |
548 | } | |
549 | } | |
550 | else | |
551 | AliError(Form("Channel %d is not valid",channel)); | |
552 | } | |
553 | ||
554 | //________________________________________________________________ | |
555 | void AliVZEROCalibData::SetDiscriThr(const Float_t* thresholds) | |
556 | { | |
557 | // Set the TDC discriminator | |
558 | // threshold values expressed in units of ADC | |
559 | if(thresholds) for(int t=0; t<64; t++) fDiscriThr[t] = thresholds[t]; | |
560 | else for(int t=0; t<64; t++) fDiscriThr[t] = 2.5; | |
561 | } |