CbmRoot
CbmTrdRawToDigiR.cxx
Go to the documentation of this file.
1 // Includes from TRD
2 #include "CbmTrdRawToDigiR.h"
3 #include "CbmTrdAddress.h"
4 #include "CbmTrdDigi.h"
5 #include "TMath.h"
6 //#include "CbmSpadicRawMessage22.h"
7 #include <string>
8 
9 
10 #include "assert.h"
11 #include <TFile.h>
12 #include <TProfile.h>
13 #include <TProfile2D.h>
14 #include <chrono>
15 #include <iostream>
16 #include <vector>
17 
18 using namespace std::chrono;
19 
20 //_________________________________________________________________________________
22  : TObject()
23  , fSampleMask()
24  , fElookupSmall()
25  , fElookupAsym()
26  , fElookupA()
27  , fElookupBig()
28  , fElookup() {}
29 
30 //_________________________________________________________________________________
32  : TObject()
33  , fSampleMask()
34  , fElookupSmall()
35  , fElookupAsym()
36  , fElookupA()
37  , fElookupBig()
38  , fElookup() {
39  SetReadFile(readfile);
40 }
41 
42 
43 //_________________________________________________________________________________
44 CbmTrdRawToDigiR::CbmTrdRawToDigiR(Double_t cal, Double_t tau, Int_t mode)
45  : TObject()
46  , fSampleMask()
47  , fElookupSmall()
48  , fElookupAsym()
49  , fElookupA()
50  , fElookupBig()
51  , fElookup() {
52  SetCalibration(cal);
53  SetTau(tau);
54  SetRecoMode(mode);
55  SetPars(mode, cal, tau, fSampleMask);
56 }
57 
58 
59 //_________________________________________________________________________________
61  Double_t tau,
62  std::vector<Int_t> mask)
63  : TObject()
64  , fSampleMask()
65  , fElookupSmall()
66  , fElookupAsym()
67  , fElookupA()
68  , fElookupBig()
69  , fElookup() {
70  SetCalibration(cal);
71  SetTau(tau);
72  SetRecoMask(mask);
73  SetPars(fRecoMode, cal, tau, mask);
74 }
75 
76 
77 void CbmTrdRawToDigiR::SetPars(Int_t mode,
78  Double_t cal,
79  Double_t tau,
80  std::vector<Int_t> mask) {
81 
82  //default
83  if (mode == 0) {
84  for (UInt_t i = 0; i <= mask.size(); i++)
85  fSampleMask.push_back(mask[i]);
86  fCalibration = cal;
87  fTau = tau;
88  Double_t sum = 0;
89  for (UInt_t i = 0; i < mask.size(); i++)
90  sum += fCalibration
92  fEReco = sum;
93  FillLookUps();
94  }
95  if (mode == 1) {
96  for (Int_t i = fMaxBin; i <= fMaxBin; i++)
97  fSampleMask.push_back(i);
98  fCalibration = cal;
99  fTau = tau;
100  fLookUp = 0;
101  Double_t sum = 0;
102  for (UInt_t i = 0; i < fSampleMask.size(); i++)
103  sum +=
106  fEReco = sum;
107  auto start = high_resolution_clock::now();
108  FillLookUps();
109  auto stop = high_resolution_clock::now();
110  auto duration = duration_cast<microseconds>(stop - start);
111  if (fDebug)
112  std::cout << std::endl
113  << std::endl
114  << "filling took: " << duration.count() << " microseconds "
115  << std::endl
116  << fEReco << std::endl
117  << std::endl
118  << std::endl;
119  }
120  if (mode == 2) {
121  Double_t sum = 0;
122  for (UInt_t i = 0; i < fSampleMask.size(); i++)
123  sum +=
126  fEReco = sum;
127  auto start = high_resolution_clock::now();
128  FillLookUps();
129  auto stop = high_resolution_clock::now();
130  auto duration = duration_cast<microseconds>(stop - start);
131  if (fDebug)
132  std::cout << std::endl
133  << std::endl
134  << "filling took: " << duration.count() << " microseconds "
135  << std::endl
136  << fEReco << std::endl
137  << std::endl
138  << std::endl;
139  }
140 }
141 
142 
144  //default
145  Double_t sum = 0;
146  for (UInt_t i = 0; i < fSampleMask.size(); i++)
147  sum +=
150  fEReco = sum;
151  auto start = high_resolution_clock::now();
152  if (fReadFile == "")
154  else
156  if (fLookUp == 4) FillLookUps("");
157  auto stop = high_resolution_clock::now();
158  auto duration = duration_cast<microseconds>(stop - start);
159  if (fDebug)
160  std::cout << std::endl
161  << std::endl
162  << "filling took: " << duration.count() << " microseconds "
163  << std::endl
164  << fEReco << std::endl
165  << std::endl
166  << std::endl;
167  // if(fShapingOrder == 1) {SetMaxBin(2+fPresamples);SetMinBin(1+fPresamples);}
168  // if(fShapingOrder == 2) SetMaxBin(4+fPresamples);
169 }
170 
171 
172 void CbmTrdRawToDigiR::FillLookUps(std::string write) {
173 
174  if (fLookUp == 1) {
175  for (Int_t shift = 0.; shift < CbmTrdDigi::Clk(CbmTrdDigi::kSPADIC);
176  shift++) {
177  Double_t sum = 0;
178  for (Int_t i = fMinBin; i <= fMaxBin; i++)
179  sum += fCalibration
180  * CalcResponse(
182  fEReco = sum;
183  Float_t temp =
186 
187  for (Int_t max = 0; max < fDynamicRange; max++) {
188  Float_t energy = max * 1.0 / temp;
189  Int_t a = energy * fCalibration
191  + shift);
192  Int_t b = energy * fCalibration
193  * CalcResponse(
195 
196  Int_t mina = a - fExtrapolate * a;
197  Int_t maxa = a + fExtrapolate * a;
198  Int_t minb = b - fExtrapolate * b;
199  Int_t maxb = b + fExtrapolate * b;
200  if (!(fElookupAsym[max][a][b] > 0)) fElookupAsym[max][a][b] = shift;
201  fElookupSmall[shift][max] = energy;
202  if (fDebug)
203  fQA->CreateHist("Asym", 512, -12.0, 500.0, 512, -12.0, 500.0);
204  if (fDebug && max == 200 && fQA->GetCont2D("Asym", a, b) == 0.)
205  fQA->Fill("Asym", a, b, shift);
206  if (fDebug) fQA->CreateHist("Look", 63, -0.5, 62.5, 512, -12.0, 500.0);
207  if (fDebug) fQA->Fill("Look", shift, max, energy);
208  Int_t extrapolate = 0;
209  while (true) {
210  extrapolate++;
211  if ((b - extrapolate) <= minb || (a - extrapolate) <= mina) break;
212  if (fElookupAsym[max][a - extrapolate][b - extrapolate] > 0) continue;
213  fElookupAsym[max][a - extrapolate][b - extrapolate] =
214  fElookupAsym[max][a][b];
215  if (fDebug && max == 200)
216  fQA->Fill("Asym",
217  a - extrapolate,
218  b - extrapolate,
219  fElookupAsym[max][a][b]);
220  Int_t count = 1;
221  if (!(fElookupAsym[max][a - extrapolate - count][b - extrapolate]
222  > 0)) {
223  fElookupAsym[max][a - extrapolate - count][b - extrapolate] =
224  fElookupAsym[max][a - extrapolate][b - extrapolate];
225  if (fDebug && max == 200)
226  fQA->Fill("Asym",
227  a - extrapolate - count,
228  b - extrapolate,
229  fElookupAsym[max][a][b]);
230  count++;
231  }
232  count = 1;
233  if (!(fElookupAsym[max][a - extrapolate + count][b - extrapolate]
234  > 0)) {
235  fElookupAsym[max][a - extrapolate + count][b - extrapolate] =
236  fElookupAsym[max][a - extrapolate][b - extrapolate];
237  if (fDebug && max == 200)
238  fQA->Fill("Asym",
239  a - extrapolate + count,
240  b - extrapolate,
241  fElookupAsym[max][a][b]);
242  count++;
243  }
244  }
245  extrapolate = 0;
246  while (true) {
247  extrapolate++;
248  if ((b + extrapolate) >= maxb || (a + extrapolate) >= maxa) break;
249  if (fElookupAsym[max][a + extrapolate][b + extrapolate] > 0) continue;
250  fElookupAsym[max][a + extrapolate][b + extrapolate] =
251  fElookupAsym[max][a][b];
252  if (fDebug && max == 200)
253  fQA->Fill("Asym",
254  a + extrapolate,
255  b + extrapolate,
256  fElookupAsym[max][a][b]);
257  Int_t count = 1;
258  if (!(fElookupAsym[max][a + extrapolate - count][b + extrapolate]
259  > 0)) {
260  fElookupAsym[max][a + extrapolate - count][b + extrapolate] =
261  fElookupAsym[max][a + extrapolate][b + extrapolate];
262  if (fDebug && max == 200)
263  fQA->Fill("Asym",
264  a + extrapolate - count,
265  b + extrapolate,
266  fElookupAsym[max][a][b]);
267  count++;
268  }
269  count = 1;
270  if (!(fElookupAsym[max][a + extrapolate + count][b + extrapolate]
271  > 0)) {
272  fElookupAsym[max][a + extrapolate + count][b + extrapolate] =
273  fElookupAsym[max][a + extrapolate][b + extrapolate];
274  if (fDebug && max == 200)
275  fQA->Fill("Asym",
276  a + extrapolate + count,
277  b + extrapolate,
278  fElookupAsym[max][a][b]);
279  count++;
280  }
281  }
282  }
283  }
284  if (write != "") WriteMaps(write);
285  }
286  if (fLookUp == 2) {
287  for (Int_t shift = 0.; shift < CbmTrdDigi::Clk(CbmTrdDigi::kSPADIC);
288  shift++) {
289  Double_t sum = 0;
290  for (Int_t i = fMinBin; i <= fMaxBin; i++)
291  sum += fCalibration
292  * CalcResponse(
294  fEReco = sum;
295  Float_t temp =
298  Int_t extrapolate = 0;
299  for (Int_t max = 0; max < fDynamicRange; max++) {
300  Float_t energy = max * 1.0 / temp;
301  Int_t a = energy * fCalibration
303  + shift);
304  Int_t b = energy * fCalibration
305  * CalcResponse(
307 
308  Int_t mina = a - fExtrapolate * a;
309  Int_t maxa = a + fExtrapolate * a;
310  Int_t minb = b - fExtrapolate * b;
311  Int_t maxb = b + fExtrapolate * b;
312  if (!(fElookupAsym[max][a][b] > 0)) fElookupAsym[max][a][b] = shift;
313  sum = 0.;
314  for (UInt_t i = 0; i < fSampleMask.size(); i++)
315  sum +=
316  energy * fCalibration
318  + shift);
319 
320  fElookupSmall[shift][sum] = energy;
321  if (fDebug)
322  fQA->CreateHist("Asym", 512, -12.0, 500.0, 512, -12.0, 500.0);
323  if (fDebug && max == 200 && fQA->GetCont2D("Asym", a, b) == 0.)
324  fQA->Fill("Asym", a, b, shift);
325  if (fDebug) fQA->CreateHist("Look", 63, -0.5, 62.5, 512, -12.0, 2000.0);
326  if (fDebug) fQA->Fill("Look", shift, sum, energy);
327  extrapolate = 0;
328  while (true) {
329  extrapolate++;
330  if ((b - extrapolate) <= minb || (a - extrapolate) <= mina) break;
331  if (fElookupAsym[max][a - extrapolate][b - extrapolate] > 0) continue;
332  fElookupAsym[max][a - extrapolate][b - extrapolate] =
333  fElookupAsym[max][a][b];
334  if (fDebug && max == 200)
335  fQA->Fill("Asym",
336  a - extrapolate,
337  b - extrapolate,
338  fElookupAsym[max][a][b]);
339  Int_t count = 1;
340  if (!(fElookupAsym[max][a - extrapolate - count][b - extrapolate]
341  > 0)) {
342  fElookupAsym[max][a - extrapolate - count][b - extrapolate] =
343  fElookupAsym[max][a - extrapolate][b - extrapolate];
344  if (fDebug && max == 200)
345  fQA->Fill("Asym",
346  a - extrapolate - count,
347  b - extrapolate,
348  fElookupAsym[max][a][b]);
349  count++;
350  }
351  count = 1;
352  if (!(fElookupAsym[max][a - extrapolate + count][b - extrapolate]
353  > 0)) {
354  fElookupAsym[max][a - extrapolate + count][b - extrapolate] =
355  fElookupAsym[max][a - extrapolate][b - extrapolate];
356  if (fDebug && max == 200)
357  fQA->Fill("Asym",
358  a - extrapolate + count,
359  b - extrapolate,
360  fElookupAsym[max][a][b]);
361  count++;
362  }
363  }
364  extrapolate = 0;
365  while (true) {
366  extrapolate++;
367  if ((b + extrapolate) >= maxb || (a + extrapolate) >= maxa) break;
368  if (fElookupAsym[max][a + extrapolate][b + extrapolate] > 0) continue;
369  fElookupAsym[max][a + extrapolate][b + extrapolate] =
370  fElookupAsym[max][a][b];
371  if (fDebug && max == 200)
372  fQA->Fill("Asym",
373  a + extrapolate,
374  b + extrapolate,
375  fElookupAsym[max][a][b]);
376  Int_t count = 1;
377  if (!(fElookupAsym[max][a + extrapolate - count][b + extrapolate]
378  > 0)) {
379  fElookupAsym[max][a + extrapolate - count][b + extrapolate] =
380  fElookupAsym[max][a + extrapolate][b + extrapolate];
381  if (fDebug && max == 200)
382  fQA->Fill("Asym",
383  a + extrapolate - count,
384  b + extrapolate,
385  fElookupAsym[max][a][b]);
386  count++;
387  }
388  count = 1;
389  if (!(fElookupAsym[max][a + extrapolate + count][b + extrapolate]
390  > 0)) {
391  fElookupAsym[max][a + extrapolate + count][b + extrapolate] =
392  fElookupAsym[max][a + extrapolate][b + extrapolate];
393  if (fDebug && max == 200)
394  fQA->Fill("Asym",
395  a + extrapolate + count,
396  b + extrapolate,
397  fElookupAsym[max][a][b]);
398  count++;
399  }
400  }
401  }
402  }
403  if (write != "") WriteMaps(write);
404  }
405  if (fLookUp == 4) {
406  for (Int_t max = 0; max < fDynamicRange; max++) {
407  Float_t energy =
408  max
409  / (fCalibration
411  fElookup[max] = energy;
412  }
413  } else {
414  Int_t range = fDynamicRange * fSampleMask.size();
415  for (Int_t n = 0; n <= range; n++) {
416  Float_t value = n / fEReco;
417  fElookup[n] = value;
418  }
419  }
420 }
421 
422 
423 void CbmTrdRawToDigiR::ReadMaps(std::string file) {
424  if (fLookUp == 3) {
425  TFile f(file.data(), "OPEN");
426  TProfile2D* h;
427  h = (TProfile2D*) f.Get("MAX ADC");
428  for (Int_t x = 1; x <= h->GetNbinsX(); x++) {
429  for (Int_t y = 1; y <= h->GetNbinsY(); y++) {
430  fElookupSmall[h->GetXaxis()->GetBinCenter(x)]
431  [h->GetYaxis()->GetBinCenter(y)] = h->GetBinContent(x, y);
432  if (fDebug)
433  fQA->CreateHist("Read Small", 63, -0.5, 62.5, 512, -12., 500.);
434  if (fDebug)
435  fQA->Fill("Read Small",
436  h->GetXaxis()->GetBinCenter(x),
437  h->GetYaxis()->GetBinCenter(y),
438  h->GetBinContent(x, y));
439  }
440  }
441  h = (TProfile2D*) f.Get("ASYM MAP");
442  for (Int_t x = 1; x <= h->GetNbinsX(); x++) {
443  for (Int_t y = 1; y <= h->GetNbinsY(); y++) {
444  fElookupA[h->GetXaxis()->GetBinCenter(x)]
445  [h->GetYaxis()->GetBinCenter(y)] = h->GetBinContent(x, y);
446  if (fDebug)
447  fQA->CreateHist("Read Asym", 512, 0., 512., 512, -12., 500.);
448  if (fDebug)
449  fQA->Fill("Read Asym",
450  h->GetXaxis()->GetBinCenter(x),
451  h->GetYaxis()->GetBinCenter(y),
452  h->GetBinContent(x, y));
453  }
454  }
455  f.Close();
456  }
457  if (fLookUp == 4) {
458  TFile f(file.data(), "OPEN");
459  TProfile2D* h;
460  h = (TProfile2D*) f.Get("MAX ADC");
461  for (Int_t x = 1; x <= h->GetNbinsX(); x++) {
462  for (Int_t y = 1; y <= h->GetNbinsY(); y++) {
463  fElookupSmall[h->GetXaxis()->GetBinCenter(x)]
464  [h->GetYaxis()->GetBinCenter(y)] = h->GetBinContent(x, y);
465  if (fDebug)
466  fQA->CreateHist("Read Small", 63, -0.5, 62.5, 512, -12., 500.);
467  if (fDebug)
468  fQA->Fill("Read Small",
469  h->GetXaxis()->GetBinCenter(x),
470  h->GetYaxis()->GetBinCenter(y),
471  h->GetBinContent(x, y));
472  }
473  }
474  h = (TProfile2D*) f.Get("ASYM MAP");
475  for (Int_t x = 1; x <= h->GetNbinsX(); x++) {
476  for (Int_t y = 1; y <= h->GetNbinsY(); y++) {
477  fElookupA[h->GetXaxis()->GetBinCenter(x)]
478  [h->GetYaxis()->GetBinCenter(y)] = h->GetBinContent(x, y);
479  if (fDebug)
480  fQA->CreateHist("Read Asym", 512, 0., 512., 512, -12., 500.);
481  if (fDebug)
482  fQA->Fill("Read Asym",
483  h->GetXaxis()->GetBinCenter(x),
484  h->GetYaxis()->GetBinCenter(y),
485  h->GetBinContent(x, y));
486  }
487  }
488  f.Close();
489  }
490 }
491 
492 CbmTrdDigi* CbmTrdRawToDigiR::MakeDigi(std::vector<Int_t> samples,
493  Int_t channel,
494  Int_t uniqueModuleId,
495  ULong64_t time,
496  Bool_t FN) {
497  Float_t digicharge = 0;
498  Int_t samplesum = 0;
499  for (size_t i = 0; i < fSampleMask.size(); i++) {
500  samplesum += samples[fSampleMask[i]];
501  }
502  if (fReadFile == "") {
503  if (fLookUp == 1) {
504  digicharge =
505  fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]]
506  [samples[fHighBin]]][samples[fMaxBin]];
507  }
508  if (fLookUp == 2) {
509  digicharge =
510  fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]]
511  [samples[fHighBin]]][samplesum];
512  } else {
513  digicharge = fElookup[samplesum];
514  }
515  } else {
516  if (fLookUp == 3) {
517  digicharge = fElookupSmall[fElookupA[samples[fMinBin]][samples[fMaxBin]]]
518  [samples[fMaxBin]];
519  }
520  if (fLookUp == 4 && !FN) {
521  digicharge = fElookupSmall[fElookupA[samples[fMinBin]][samples[fMaxBin]]]
522  [samples[fMaxBin]];
523  }
524  if (fLookUp == 4 && FN) { digicharge = fElookup[samples[fMaxBin]]; }
525  }
526 
527  CbmTrdDigi* digi =
528  new CbmTrdDigi(channel, uniqueModuleId, digicharge, time, 0, 0);
529 
530  return digi;
531 }
532 
533 Float_t CbmTrdRawToDigiR::GetTimeShift(std::vector<Int_t> samples) {
534 
535  Float_t shift = 0;
536  if (fReadFile == "") {
537  if (fLookUp == 1) {
538  shift =
539  fElookupAsym[samples[fMaxBin]][samples[fMinBin]][samples[fHighBin]];
540  } else {
541  return 0.;
542  }
543  } else {
544  if (fLookUp == 3) { shift = fElookupA[samples[fMinBin]][samples[fMaxBin]]; }
545  if (fLookUp == 4) { shift = fElookupA[samples[fMinBin]][samples[fMaxBin]]; }
546  }
547 
548  return shift;
549 }
550 
551 Double_t CbmTrdRawToDigiR::GetCharge(std::vector<Int_t> samples, Int_t shift) {
552 
553  Float_t charge = 0;
554  if (fReadFile == "") {
555  if (fLookUp == 1) {
556  if (shift > -1)
557  charge = fElookupSmall[shift][samples[fMaxBin]];
558  else
559  charge =
560  fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]]
561  [samples[fHighBin]]][samples[fMaxBin]];
562  }
563  if (fLookUp == 2) {
564  Int_t samplesum = 0;
565  for (size_t i = 0; i < fSampleMask.size(); i++) {
566  samplesum += samples[fSampleMask[i]];
567  }
568  if (shift > -1)
569  charge = fElookupSmall[shift][samples[fMaxBin]];
570  else
571  charge =
572  fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]]
573  [samples[fHighBin]]][samples[fMaxBin]];
574  } else {
575  return 0.;
576  }
577  } else {
578  if (fLookUp == 3) {
579  if (shift > -1)
580  charge = fElookupSmall[shift][samples[fMaxBin]];
581  else
582  charge = fElookupSmall[fElookupA[samples[fMinBin]][samples[fMaxBin]]]
583  [samples[fMaxBin]];
584  }
585  if (fLookUp == 4) {
586  if (shift > -1)
587  charge = fElookupSmall[shift][samples[fMaxBin]];
588  else
589  charge = fElookupSmall[fElookupA[samples[fMinBin]][samples[fMaxBin]]]
590  [samples[fMaxBin]];
591  }
592  }
593 
594  return charge;
595 }
596 
597 
598 //_______________________________________________________________________________
599 Double_t CbmTrdRawToDigiR::CalcResponse(Double_t t) {
600 
601  if (fShapingOrder == 1) return (t / fTau) * TMath::Exp(-(t / fTau));
602  if (fShapingOrder == 2)
603  return (t / fTau) * (t / fTau) * TMath::Exp(-(t / fTau));
604 
605  return 0.;
606 }
CbmTrdRawToDigiR::SetCalibration
void SetCalibration(Double_t cal)
Definition: CbmTrdRawToDigiR.h:48
CbmTrdCheckUtil::GetCont2D
Double_t GetCont2D(std::string name, Double_t x, Double_t y)
Definition: CbmTrdCheckUtil.h:129
h
Generates beam ions for transport simulation.
Definition: CbmBeamGenerator.h:17
CbmTrdRawToDigiR::fDynamicRange
Int_t fDynamicRange
Definition: CbmTrdRawToDigiR.h:82
f
float f
Definition: L1/vectors/P4_F32vec4.h:24
CbmTrdAddress.h
Helper class to convert unique channel ID back and forth.
CbmTrdRawToDigiR::fRecoMode
Int_t fRecoMode
Definition: CbmTrdRawToDigiR.h:80
CbmTrdRawToDigiR::SetRecoMode
void SetRecoMode(Int_t mode)
Definition: CbmTrdRawToDigiR.h:50
CbmTrdRawToDigiR::CbmTrdRawToDigiR
CbmTrdRawToDigiR()
default Constructor with messages
Definition: CbmTrdRawToDigiR.cxx:21
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmTrdRawToDigiR::fElookupAsym
std::map< Int_t, std::map< Int_t, std::map< Int_t, Int_t > > > fElookupAsym
Definition: CbmTrdRawToDigiR.h:107
CbmTrdRawToDigiR::fElookupSmall
std::map< Int_t, std::map< Int_t, Float_t > > fElookupSmall
Definition: CbmTrdRawToDigiR.h:106
CbmTrdRawToDigiR::fExtrapolate
Float_t fExtrapolate
Definition: CbmTrdRawToDigiR.h:90
CbmTrdRawToDigiR::fElookup
std::map< Int_t, Float_t > fElookup
Definition: CbmTrdRawToDigiR.h:110
CbmTrdRawToDigiR::fLookUp
Int_t fLookUp
Definition: CbmTrdRawToDigiR.h:95
CbmTrdRawToDigiR::fEReco
Double_t fEReco
Definition: CbmTrdRawToDigiR.h:77
CbmTrdRawToDigiR::SetPars
void SetPars(Int_t mode, Double_t cal, Double_t tau, std::vector< Int_t > mask)
Definition: CbmTrdRawToDigiR.cxx:77
CbmTrdRawToDigiR::GetCharge
Double_t GetCharge(std::vector< Int_t > samples, Int_t shift=-1)
Definition: CbmTrdRawToDigiR.cxx:551
CbmTrdRawToDigiR::fWriteFile
std::string fWriteFile
Definition: CbmTrdRawToDigiR.h:101
CbmTrdRawToDigiR::fQA
CbmTrdCheckUtil * fQA
Definition: CbmTrdRawToDigiR.h:104
CbmTrdDigi.h
CbmTrdRawToDigiR::GetTimeShift
Float_t GetTimeShift(std::vector< Int_t > samples)
Definition: CbmTrdRawToDigiR.cxx:533
CbmTrdDigi::Clk
static Float_t Clk(CbmTrdAsicType ty)
DAQ clock accessor for each ASIC.
Definition: CbmTrdDigi.h:87
CbmTrdRawToDigiR::fSampleMask
std::vector< Int_t > fSampleMask
Definition: CbmTrdRawToDigiR.h:92
CbmTrdCheckUtil::CreateHist
void CreateHist(std::string name, Int_t xbins, Double_t xlow, Double_t xhigh, Int_t ybins=0, Double_t ylow=1., Double_t yhigh=1.)
Definition: CbmTrdCheckUtil.cxx:33
CbmTrdCheckUtil::Fill
void Fill(std::string name, Double_t x, Double_t y=9999.)
Definition: CbmTrdCheckUtil.cxx:114
CbmTrdRawToDigiR::Init
void Init()
Definition: CbmTrdRawToDigiR.cxx:143
CbmTrdRawToDigiR::fHighBin
Int_t fHighBin
Definition: CbmTrdRawToDigiR.h:83
CbmTrdRawToDigiR::fTau
Double_t fTau
Definition: CbmTrdRawToDigiR.h:79
CbmTrdRawToDigiR::WriteMaps
void WriteMaps(std::string file="")
Definition: CbmTrdRawToDigiR.h:63
CbmTrdRawToDigiR::fDebug
Bool_t fDebug
Definition: CbmTrdRawToDigiR.h:97
CbmTrdDigi::kSPADIC
@ kSPADIC
Definition: CbmTrdDigi.h:16
CbmTrdRawToDigiR::fShapingOrder
Int_t fShapingOrder
Definition: CbmTrdRawToDigiR.h:81
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdRawToDigiR::fCalibration
Double_t fCalibration
Definition: CbmTrdRawToDigiR.h:75
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdRawToDigiR::ReadMaps
void ReadMaps(std::string file="")
Definition: CbmTrdRawToDigiR.cxx:423
CbmTrdDigi
Definition: CbmTrdDigi.h:14
CbmTrdRawToDigiR::SetTau
void SetTau(Double_t tau)
Definition: CbmTrdRawToDigiR.h:49
CbmTrdRawToDigiR::CalcResponse
Double_t CalcResponse(Double_t t)
Definition: CbmTrdRawToDigiR.cxx:599
CbmTrdRawToDigiR::fReadFile
std::string fReadFile
Definition: CbmTrdRawToDigiR.h:100
CbmTrdRawToDigiR::fElookupA
std::map< Int_t, std::map< Int_t, Int_t > > fElookupA
Definition: CbmTrdRawToDigiR.h:108
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmTrdRawToDigiR::MakeDigi
CbmTrdDigi * MakeDigi(std::vector< Int_t > samples, Int_t channel, Int_t uniqueModuleId, ULong64_t time, Bool_t FN=false)
Definition: CbmTrdRawToDigiR.cxx:492
CbmTrdRawToDigiR::SetReadFile
void SetReadFile(std::string file)
Definition: CbmTrdRawToDigiR.h:54
CbmTrdRawToDigiR::fMaxBin
Int_t fMaxBin
Definition: CbmTrdRawToDigiR.h:87
CbmTrdRawToDigiR::SetRecoMask
void SetRecoMask(std::vector< Int_t > mask)
Definition: CbmTrdRawToDigiR.h:52
CbmTrdRawToDigiR::FillLookUps
void FillLookUps(std::string write="")
Definition: CbmTrdRawToDigiR.cxx:172
CbmTrdRawToDigiR.h
CbmTrdRawToDigiR::fMinBin
Int_t fMinBin
Definition: CbmTrdRawToDigiR.h:88