CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018StsPar.cxx
Go to the documentation of this file.
1/* Copyright (C) 2017-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau, Florian Uhlig [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmMcbm2018StsPar source file -----
7// ----- Created 25/07/17 by P.-A. Loizeau -----
8// -------------------------------------------------------------------------
9
10#include "CbmMcbm2018StsPar.h"
11
12#include "FairDetParIo.h"
13#include "FairParIo.h"
14#include "FairParamList.h"
15#include <Logger.h>
16
17#include "TMath.h"
18#include "TString.h"
19
20using namespace std;
21
23const Double_t CbmMcbm2018StsPar::kdStereoAngleTan = TMath::Tan(kdStereoAngle * TMath::DegToRad());
24
25// ----- Standard constructor ------------------------------------------
26CbmMcbm2018StsPar::CbmMcbm2018StsPar(const char* name, const char* title, const char* context)
27 : FairParGenericSet(name, title, context)
28 , fuNbModules(0)
29 , fiModuleType()
30 , fiModAddress()
31 , fdModCenterPosX()
32 , fdModCenterPosY()
33 , fuNrOfDpbs(0)
34 , fiDbpIdArray()
35 , fiCrobActiveFlag()
36 , fiFebPulserFlag()
37 , fiFebModuleIdx()
38 , fiFebModuleSide()
39 , fdFebAdcGain()
40 , fdFebAdcBase()
41 , fdFebAdcThrGain()
42 , fiFebAdcThrOffs()
43{
44 detName = "Sts";
45}
46// -------------------------------------------------------------------------
47
48
49// ----- Destructor ----------------------------------------------------
51// -------------------------------------------------------------------------
52
53
54// ----- Public method clear -------------------------------------------
56{
57 status = kFALSE;
58 resetInputVersions();
59}
60// -------------------------------------------------------------------------
61
62// -------------------------------------------------------------------------
63
64void CbmMcbm2018StsPar::putParams(FairParamList* l)
65{
66 if (!l) return;
67
68 l->add("NbModules", fuNbModules);
69 l->add("ModuleType", fiModuleType);
70 l->add("ModAddress", fiModAddress);
71 l->add("ModCenterPosX", fdModCenterPosX);
72 l->add("ModCenterPosY", fdModCenterPosY);
73 l->add("NrOfDpbs", fuNrOfDpbs);
74 l->add("DbpIdArray", fiDbpIdArray);
75 l->add("CrobActiveFlag", fiCrobActiveFlag);
76
77 l->add("FebPulserFlag", fiFebPulserFlag);
78 l->add("FebModuleIdx", fiFebModuleIdx);
79 l->add("FebModuleSide", fiFebModuleSide);
80 l->add("FebAdcGain", fdFebAdcGain);
81 l->add("FebAdcBase", fdFebAdcBase);
82 l->add("FebAdcThrGain", fdFebAdcThrGain);
83 l->add("FebAdcThrOffs", fiFebAdcThrOffs);
84}
85
86// -------------------------------------------------------------------------
87
88Bool_t CbmMcbm2018StsPar::getParams(FairParamList* l)
89{
90
91 if (!l) return kFALSE;
92
93 if (!l->fill("NbModules", &fuNbModules)) return kFALSE;
94
99 if (!l->fill("ModuleType", &fiModuleType)) return kFALSE;
100 if (!l->fill("ModAddress", &fiModAddress)) return kFALSE;
101 if (!l->fill("ModCenterPosX", &fdModCenterPosX)) return kFALSE;
102 if (!l->fill("ModCenterPosY", &fdModCenterPosY)) return kFALSE;
103
104 if (!l->fill("NrOfDpbs", &fuNrOfDpbs)) return kFALSE;
105
107 if (!l->fill("DbpIdArray", &fiDbpIdArray)) return kFALSE;
108
110 if (!l->fill("CrobActiveFlag", &fiCrobActiveFlag)) return kFALSE;
111
119 if (!l->fill("FebPulserFlag", &fiFebPulserFlag)) return kFALSE;
120 if (!l->fill("FebModuleIdx", &fiFebModuleIdx)) return kFALSE;
121 if (!l->fill("FebModuleSide", &fiFebModuleSide)) return kFALSE;
122 if (!l->fill("FebAdcGain", &fdFebAdcGain)) return kFALSE;
123 if (!l->fill("FebAdcBase", &fdFebAdcBase)) return kFALSE;
124 if (!l->fill("FebAdcThrGain", &fdFebAdcThrGain)) return kFALSE;
125 if (!l->fill("FebAdcThrOffs", &fiFebAdcThrOffs)) return kFALSE;
126 /*
127 LOG(info) << "CbmMcbm2018StsPar::getParams => Values " << "\n"
128 << fuNbModules << "\n"
129 << fuNrOfDpbs;
130*/
131 return kTRUE;
132}
133// -------------------------------------------------------------------------
135{
136 if (uElink < kuNbElinksPerCrob) return kiCrobMapElinkFebIdx[uElink];
137 else {
138 LOG(warning) << "CbmMcbm2018StsPar::ElinkIdxToFebIdx => Index out of bound, "
139 << "returning crazy value!";
140 return -1;
141 } // else of if( uElink < kuNbElinksPerCrob )
142}
143// -------------------------------------------------------------------------
145{
146 if (uElink < kuNbElinksPerCrob) return kuCrobMapElinkFebA[uElink];
147 else {
148 LOG(warning) << "CbmMcbm2018StsPar::ElinkIdxToAsicIdxFebA => Index out of bound, "
149 << "returning crazy value!";
150 return 0xFFFF;
151 } // else of if( uElink < kuNbElinksPerCrob )
152}
154{
155 if (uElink < kuNbElinksPerCrob) return kuCrobMapElinkFebB[uElink];
156 else {
157 LOG(warning) << "CbmMcbm2018StsPar::ElinkIdxToAsicIdxFebB => Index out of bound, "
158 << "returning crazy value!";
159 return 0xFFFF;
160 } // else of if( uElink < kuNbElinksPerCrob )
161}
162// -------------------------------------------------------------------------
163Bool_t CbmMcbm2018StsPar::CheckModuleIndex(UInt_t uModuleIdx)
164{
165 if (uModuleIdx < fuNbModules) return kTRUE;
166 else {
167 LOG(warning) << "CbmMcbm2018StsPar::CheckModuleIndex => Index out of bound!";
168 return kFALSE;
169 } // else of if( uModuleIdx < fuNbModules )
170}
171UInt_t CbmMcbm2018StsPar::GetModuleType(UInt_t uModuleIdx)
172{
173 if (uModuleIdx < fuNbModules) return fiModuleType[uModuleIdx];
174 else {
175 LOG(warning) << "CbmMcbm2018StsPar::GetModuleType => Index out of bound, "
176 << "returning crazy value!";
177 return 0xFFFFFFFF;
178 } // else of if( uModuleIdx < fuNbModules )
179}
180UInt_t CbmMcbm2018StsPar::GetModuleAddress(UInt_t uModuleIdx)
181{
182 if (uModuleIdx < fuNbModules) return fiModAddress[uModuleIdx];
183 else {
184 LOG(warning) << "CbmMcbm2018StsPar::GetModuleAddress => Index out of bound, "
185 << "returning crazy value!";
186 return 0xFFFFFFFF;
187 } // else of if( uModuleIdx < fuNbModules )
188}
189Double_t CbmMcbm2018StsPar::GetModuleCenterPosX(UInt_t uModuleIdx)
190{
191 if (uModuleIdx < fuNbModules) return fdModCenterPosX[uModuleIdx];
192 else {
193 LOG(warning) << "CbmMcbm2018StsPar::GetModuleCenterPosX => Index out of bound, "
194 << "returning crazy value!";
195 return 3.844e11; // Fly to the Moon!
196 } // else of if( uModuleIdx < fuNbModules )
197}
198Double_t CbmMcbm2018StsPar::GetModuleCenterPosY(UInt_t uModuleIdx)
199{
200 if (uModuleIdx < fuNbModules) return fdModCenterPosY[uModuleIdx];
201 else {
202 LOG(warning) << "CbmMcbm2018StsPar::GetModuleCenterPosY => Index out of bound, "
203 << "returning crazy value!";
204 return 3.844e11; // Fly to the Moon!
205 } // else of if( uModuleIdx < fuNbModules )
206}
207// -------------------------------------------------------------------------
208UInt_t CbmMcbm2018StsPar::GetDpbId(UInt_t uDpbIdx)
209{
210 if (uDpbIdx < fuNrOfDpbs) return fiDbpIdArray[uDpbIdx];
211 else {
212 LOG(warning) << "CbmMcbm2018StsPar::GetDpbId => Index out of bound, "
213 << "returning crazy value!";
214 return 0xFFFFFFFF;
215 } // else of if( uDpbIdx < fuNrOfDpbs )
216}
217Bool_t CbmMcbm2018StsPar::IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
218{
219 if (uDpbIdx < fuNrOfDpbs) {
220 if (uCrobIdx < kuNbCrobsPerDpb) return 0 < fiCrobActiveFlag[uDpbIdx * kuNbCrobsPerDpb + uCrobIdx] ? kTRUE : kFALSE;
221 else {
222 LOG(warning) << "CbmMcbm2018StsPar::IsCrobActive => Crob Index out of bound, "
223 << "returning default inactive!";
224 return kFALSE;
225 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
226 } // if( uDpbIdx < fuNrOfDpbs )
227 else {
228 LOG(warning) << "CbmMcbm2018StsPar::IsCrobActive => Dpb Index out of bound, "
229 << "returning default inactive!";
230 return kFALSE;
231 } // else of if( uDpbIdx < fuNrOfDpbs )
232}
233Bool_t CbmMcbm2018StsPar::IsFebActive(UInt_t uFebInSystIdx)
234{
235 if (uFebInSystIdx < GetNrOfFebs()) {
236 return (-1 == fiFebModuleIdx[uFebInSystIdx] ? kFALSE : kTRUE);
237 } // if( uFebInSystIdx < GetNrOfFebs() )
238 else {
239 LOG(warning) << "CbmMcbm2018StsPar::IsFebActive => Feb Index out of bound, "
240 << "returning default inactive!";
241 return kFALSE;
242 } // else of if( uFebInSystIdx < GetNrOfFebs() )
243}
244Bool_t CbmMcbm2018StsPar::IsFebActive(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
245{
246 if (uDpbIdx < fuNrOfDpbs) {
247 if (uCrobIdx < kuNbCrobsPerDpb) {
248 if (uFebIdx < kuNbFebsPerCrob) {
249 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
250 return IsFebActive(uIdx);
251 } // if( uFebIdx < kuNbFebsPerCrob )
252 else {
253 LOG(warning) << "CbmMcbm2018StsPar::IsFebActive => Feb Index out of bound, "
254 << "returning default inactive!";
255 return kFALSE;
256 } // else of if( uFebIdx < kuNbCrobsPerDpb )
257 } // if( uCrobIdx < kuNbCrobsPerDpb )
258 else {
259 LOG(warning) << "CbmMcbm2018StsPar::IsFebActive => Crob Index out of bound, "
260 << "returning default inactive!";
261 return kFALSE;
262 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
263 } // if( uDpbIdx < fuNrOfDpbs )
264 else {
265 LOG(warning) << "CbmMcbm2018StsPar::IsFebActive => Dpb Index out of bound, "
266 << "returning default inactive!";
267 return kFALSE;
268 } // else of if( uDpbIdx < fuNrOfDpbs )
269}
270Bool_t CbmMcbm2018StsPar::IsFebPulser(UInt_t uFebInSystIdx)
271{
272 if (uFebInSystIdx < GetNrOfFebs()) {
273 return (fiFebPulserFlag[uFebInSystIdx] ? kTRUE : kFALSE);
274 } // if( uFebInSystIdx < GetNrOfFebs() )
275 else {
276 LOG(warning) << "CbmMcbm2018StsPar::IsFebPulser => Feb Index out of bound, "
277 << "returning default standard FEB!";
278 return kFALSE;
279 } // else of if( uFebInSystIdx < GetNrOfFebs() )
280}
281Bool_t CbmMcbm2018StsPar::IsFebPulser(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
282{
283 if (uDpbIdx < fuNrOfDpbs) {
284 if (uCrobIdx < kuNbCrobsPerDpb) {
285 if (uFebIdx < kuNbFebsPerCrob) {
286 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
287 return IsFebPulser(uIdx);
288 } // if( uFebIdx < kuNbFebsPerCrob )
289 else {
290 LOG(warning) << "CbmMcbm2018StsPar::IsFebPulser => Feb Index out of bound, "
291 << "returning default standard FEB!";
292 return kFALSE;
293 } // else of if( uFebIdx < kuNbCrobsPerDpb )
294 } // if( uCrobIdx < kuNbCrobsPerDpb )
295 else {
296 LOG(warning) << "CbmMcbm2018StsPar::IsFebPulser => Crob Index out of bound, "
297 << "returning default standard FEB!";
298 return kFALSE;
299 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
300 } // if( uDpbIdx < fuNrOfDpbs )
301 else {
302 LOG(warning) << "CbmMcbm2018StsPar::IsFebPulser => Dpb Index out of bound, "
303 << "returning default standard FEB!";
304 return kFALSE;
305 } // else of if( uDpbIdx < fuNrOfDpbs )
306}
307Int_t CbmMcbm2018StsPar::GetFebModuleIdx(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
308{
309 if (uDpbIdx < fuNrOfDpbs) {
310 if (uCrobIdx < kuNbCrobsPerDpb) {
311 if (uFebIdx < kuNbFebsPerCrob) {
312 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
313 return fiFebModuleIdx[uIdx];
314 } // if( uFebIdx < kuNbFebsPerCrob )
315 else {
316 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleIdx => Feb Index out of bound, "
317 << "returning default inactive!";
318 return -1;
319 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
320 } // if( uCrobIdx < kuNbCrobsPerDpb )
321 else {
322 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleIdx => Crob Index out of bound, "
323 << "returning default inactive!";
324 return -1;
325 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
326 } // if( uDpbIdx < fuNrOfDpbs )
327 else {
328 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleIdx => Dpb Index out of bound, "
329 << "returning default inactive!";
330 return -1;
331 } // else of if( uDpbIdx < fuNrOfDpbs )
332}
333Int_t CbmMcbm2018StsPar::GetFebModuleSide(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
334{
335 if (uDpbIdx < fuNrOfDpbs) {
336 if (uCrobIdx < kuNbCrobsPerDpb) {
337 if (uFebIdx < kuNbFebsPerCrob) {
338 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
339 return fiFebModuleSide[uIdx];
340 } // if( uFebIdx < kuNbFebsPerCrob )
341 else {
342 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleSide => Feb Index out of bound, "
343 << "returning default inactive!";
344 return -1;
345 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
346 } // if( uCrobIdx < kuNbCrobsPerDpb )
347 else {
348 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleSide => Crob Index out of bound, "
349 << "returning default inactive!";
350 return -1;
351 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
352 } // if( uDpbIdx < fuNrOfDpbs )
353 else {
354 LOG(warning) << "CbmMcbm2018StsPar::GetFebModuleSide => Dpb Index out of bound, "
355 << "returning default inactive!";
356 return -1;
357 } // else of if( uDpbIdx < fuNrOfDpbs )
358}
359Double_t CbmMcbm2018StsPar::GetFebAdcGain(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
360{
361 if (uDpbIdx < fuNrOfDpbs) {
362 if (uCrobIdx < kuNbCrobsPerDpb) {
363 if (uFebIdx < kuNbFebsPerCrob) {
364 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
365 return fdFebAdcGain[uIdx];
366 } // if( uFebIdx < kuNbFebsPerCrob )
367 else {
368 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcGain => Feb Index out of bound, "
369 << "returning default value!";
370 return 0.0;
371 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
372 } // if( uCrobIdx < kuNbCrobsPerDpb )
373 else {
374 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcGain => Crob Index out of bound, "
375 << "returning default value!";
376 return 0.0;
377 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
378 } // if( uDpbIdx < fuNrOfDpbs )
379 else {
380 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcGain => Dpb Index out of bound, "
381 << "returning default value!";
382 return 0.0;
383 } // else of if( uDpbIdx < fuNrOfDpbs )
384}
385Double_t CbmMcbm2018StsPar::GetFebAdcOffset(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
386{
387 if (uDpbIdx < fuNrOfDpbs) {
388 if (uCrobIdx < kuNbCrobsPerDpb) {
389 if (uFebIdx < kuNbFebsPerCrob) {
390 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
391 return (fdFebAdcBase[uIdx] + fdFebAdcThrGain[uIdx] * fiFebAdcThrOffs[uIdx]);
392 } // if( uFebIdx < kuNbFebsPerCrob )
393 else {
394 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcOffset => Feb Index out of bound, "
395 << "returning default value!";
396 return 0.0;
397 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
398 } // if( uCrobIdx < kuNbCrobsPerDpb )
399 else {
400 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcOffset => Crob Index out of bound, "
401 << "returning default value!";
402 return 0.0;
403 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
404 } // if( uDpbIdx < fuNrOfDpbs )
405 else {
406 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcOffset => Dpb Index out of bound, "
407 << "returning default value!";
408 return 0.0;
409 } // else of if( uDpbIdx < fuNrOfDpbs )
410}
411Double_t CbmMcbm2018StsPar::GetFebAdcBase(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
412{
413 if (uDpbIdx < fuNrOfDpbs) {
414 if (uCrobIdx < kuNbCrobsPerDpb) {
415 if (uFebIdx < kuNbFebsPerCrob) {
416 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
417 return fdFebAdcBase[uIdx];
418 } // if( uFebIdx < kuNbFebsPerCrob )
419 else {
420 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcBase => Feb Index out of bound, "
421 << "returning default value!";
422 return 0.0;
423 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
424 } // if( uCrobIdx < kuNbCrobsPerDpb )
425 else {
426 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcBase => Crob Index out of bound, "
427 << "returning default value!";
428 return 0.0;
429 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
430 } // if( uDpbIdx < fuNrOfDpbs )
431 else {
432 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcBase => Dpb Index out of bound, "
433 << "returning default value!";
434 return 0.0;
435 } // else of if( uDpbIdx < fuNrOfDpbs )
436}
437Double_t CbmMcbm2018StsPar::GetFebAdcThrGain(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
438{
439 if (uDpbIdx < fuNrOfDpbs) {
440 if (uCrobIdx < kuNbCrobsPerDpb) {
441 if (uFebIdx < kuNbFebsPerCrob) {
442 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
443 return fdFebAdcThrGain[uIdx];
444 } // if( uFebIdx < kuNbFebsPerCrob )
445 else {
446 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrGain => Feb Index out of bound, "
447 << "returning default value!";
448 return 0.0;
449 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
450 } // if( uCrobIdx < kuNbCrobsPerDpb )
451 else {
452 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrGain => Crob Index out of bound, "
453 << "returning default value!";
454 return 0.0;
455 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
456 } // if( uDpbIdx < fuNrOfDpbs )
457 else {
458 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrGain => Dpb Index out of bound, "
459 << "returning default value!";
460 return 0.0;
461 } // else of if( uDpbIdx < fuNrOfDpbs )
462}
463Int_t CbmMcbm2018StsPar::GetFebAdcThrOffs(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
464{
465 if (uDpbIdx < fuNrOfDpbs) {
466 if (uCrobIdx < kuNbCrobsPerDpb) {
467 if (uFebIdx < kuNbFebsPerCrob) {
468 UInt_t uIdx = (uDpbIdx * kuNbCrobsPerDpb + uCrobIdx) * kuNbFebsPerCrob + uFebIdx;
469 return fiFebAdcThrOffs[uIdx];
470 } // if( uFebIdx < kuNbFebsPerCrob )
471 else {
472 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrOffs => Feb Index out of bound, "
473 << "returning default value!";
474 return 0;
475 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
476 } // if( uCrobIdx < kuNbCrobsPerDpb )
477 else {
478 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrOffs => Crob Index out of bound, "
479 << "returning default value!";
480 return 0;
481 } // else of if( uCrobIdx < kuNbCrobsPerDpb )
482 } // if( uDpbIdx < fuNrOfDpbs )
483 else {
484 LOG(warning) << "CbmMcbm2018StsPar::GetFebAdcThrOffs => Dpb Index out of bound, "
485 << "returning default value!";
486 return 0;
487 } // else of if( uDpbIdx < fuNrOfDpbs )
488}
489// -------------------------------------------------------------------------
490/*
491Bool_t CbmMcbm2018StsPar::ComputeModuleCoordinates( UInt_t uModuleIdx, Int_t iChanN, Int_t iChanP, Double_t & dPosX, Double_t & dPosY )
492{
493 if( kFALSE == CheckModuleIndex( uModuleIdx ) )
494 return kFALSE;
495
496 dPosX = 0.0;
497 dPosY = 0.0;
498
499 Int_t iCoordN = iChanN - kiCenterStripN;
500 Int_t iCoordP = iChanP - kiCenterStripP;
501
502 dPosX = fdModCenterPosX[ uModuleIdx ] + kdCenterPosX + kdPitchMm * iCoordN;
503 dPosY = fdModCenterPosY[ uModuleIdx ] + kdCenterPosY - kdPitchMm * ( iCoordN - iCoordP ) / kdStereoAngleTan;
504}
505*/
ClassImp(CbmConverterManager)
CbmMcbm2018StsPar(const char *name="CbmMcbm2018StsPar", const char *title="Sts parameters", const char *context="Default")
UInt_t fuNbModules
Variables.
Double_t GetFebAdcGain(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
UInt_t GetDpbId(UInt_t uDpbIdx)
const UInt_t kuCrobMapElinkFebA[kuNbElinksPerCrob]
Int_t ElinkIdxToFebIdx(UInt_t uElink)
Bool_t CheckModuleIndex(UInt_t uModuleIdx)
Int_t GetFebAdcThrOffs(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
static const UInt_t kuNbCrobsPerDpb
Constants.
static const UInt_t kuNbElinksPerCrob
Int_t GetFebModuleIdx(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
Double_t GetModuleCenterPosY(UInt_t uModuleIdx)
Bool_t IsFebActive(UInt_t uFebInSystIdx)
UInt_t GetModuleType(UInt_t uModuleIdx)
Bool_t getParams(FairParamList *)
Double_t GetFebAdcOffset(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
const UInt_t kuCrobMapElinkFebB[kuNbElinksPerCrob]
Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
static const UInt_t kuNbFebsPerCrob
UInt_t ElinkIdxToAsicIdxFebA(UInt_t uElink)
void putParams(FairParamList *)
UInt_t ElinkIdxToAsicIdxFebB(UInt_t uElink)
Double_t GetFebAdcThrGain(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
static const Double_t kdStereoAngleTan
Constants assignation.
UInt_t GetModuleAddress(UInt_t uModuleIdx)
Double_t GetFebAdcBase(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
const Int_t kiCrobMapElinkFebIdx[kuNbElinksPerCrob]
Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
Bool_t IsFebPulser(UInt_t uFebInSystIdx)
Int_t GetFebModuleSide(UInt_t uDpbIdx, UInt_t uCrobIdx, UInt_t uFebIdx)
Double_t GetModuleCenterPosX(UInt_t uModuleIdx)
Hash for CbmL1LinkKey.