FairRoot/PandaRoot
PndSdsTotChargeConversion.h
Go to the documentation of this file.
1 #ifndef PNDSDSTOTCHARGECONVERSION_H
2 #define PNDSDSTOTCHARGECONVERSION_H
3 
4 #include "TRandom2.h"
5 #include <iostream>
6 #include <cmath>
8 
11 
33 {
34 public:
36  PndSdsTotChargeConversion(Int_t VerboseLevel = 0);
37 
39  PndSdsTotChargeConversion(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency = 0, Int_t VerboseLevel = 0);
40 
43 
44  void StartExecute();
45 
46  virtual Double_t ChargeToDigiValue(Double_t charge);
47  virtual Double_t DigiValueToCharge(Double_t digivalue);
48  virtual Double_t GetPileUpTime(Double_t charge);
49  virtual Double_t GetRelativeError(Double_t Charge);
50  // virtual Int_t GetTimeStamp(Double_t time);
51  virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime);
52  virtual Double_t GetTimeWalk(Double_t Charge);
54  return ftimestep/sqrt(12);
55  }
56 
57  virtual Double_t GetTimeStep(){return ftimestep;}
58 
59 
60 
61 
62 private:
64  Double_t Qt; //threshold charge [e]
65  Double_t t1e, t2e; //exact time point when signal is over threshold/under threshold again [ns]
66  Double_t ftimestep; //one time step of the clock [ns]
67  Double_t fstarttime; //absolute point when TOT begins [ns]
68  Double_t fstoptime; //absolute point when TOT ends [ns]
69  Double_t ftimeoffset; //difference between rising clock edge and when detector gets hit [ns]
70  Double_t ftimewalk; //exact time point when signal is over threshold
72  Double_t GetTotWC(); //assumes a clock which results in a quantized TOT
74  TRandom2 fRand;
75 
77 };
78 
79 #endif /* PNDSDSTOTCHARGECONVERSION_H */
virtual Double_t DigiValueToCharge(Double_t digivalue)
Converts a given digitized charge into charge in electrons.
PndSdsTotChargeConversion(Int_t VerboseLevel=0)
Default constructor.
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
ClassDef(PndSdsTotChargeConversion, 1)
virtual Double_t GetTimeWalk(Double_t Charge)
Double_t DigitizeTime(Double_t time)
returns the time in [ns] but binned to clock units
virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime)
absolute time stamp of a hit in ns (clock is taken into account)
virtual Double_t GetTimeStampErrorAfterCorrection()
Int_t a
Definition: anaLmdDigi.C:126
virtual Double_t ChargeToDigiValue(Double_t charge)
Converts a given charge in electrons into the electronics answer e.g. ToT [ns].
Double_t
virtual Double_t GetRelativeError(Double_t Charge)
double threshold
virtual Double_t GetPileUpTime(Double_t charge)
returns the time the capacitor is loaded and therefore the time this MVD pixel/strip is blind for oth...