PandaRoot
PndSdsTotChargeConversion.h
Go to the documentation of this file.
1 #ifndef PNDSDSTOTCHARGECONVERSION_H
2 #define PNDSDSTOTCHARGECONVERSION_H
3 
4 #include "TRandom.h"
5 #include <iostream>
6 #include <cmath>
8 
11 
32  public:
34  PndSdsTotChargeConversion(Int_t VerboseLevel = 0);
35 
37  PndSdsTotChargeConversion(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency = 0, Int_t VerboseLevel = 0);
38 
41 
42  void StartExecute();
43 
44  virtual Double_t ChargeToDigiValue(Double_t charge);
45  virtual Double_t DigiValueToCharge(Double_t digivalue);
46  virtual Double_t GetPileUpTime(Double_t charge);
47  virtual Double_t GetRelativeError(Double_t Charge);
48  // virtual Int_t GetTimeStamp(Double_t time);
49  virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime);
50  virtual Double_t GetTimeWalk(Double_t Charge);
51  virtual Double_t GetTimeStampErrorAfterCorrection() { return ftimestep / sqrt(12); }
52 
53  virtual Double_t GetTimeStep() { return ftimestep; }
54 
55  private:
56  Double_t fthreshold; //[e]
57  Double_t Qt; // threshold charge [e]
58  Double_t t1e, t2e; // exact time point when signal is over threshold/under threshold again [ns]
59  Double_t ftimestep; // one time step of the clock [ns]
60  Double_t fstarttime; // absolute point when TOT begins [ns]
61  Double_t fstoptime; // absolute point when TOT ends [ns]
62  Double_t ftimeoffset; // difference between rising clock edge and when detector gets hit [ns]
63  Double_t ftimewalk; // exact time point when signal is over threshold
64  Int_t fVerboseLevel;
65  Double_t GetTotWC(); // assumes a clock which results in a quantized TOT
66  Double_t DigitizeTime(Double_t time);
67 
68  ClassDef(PndSdsTotChargeConversion, 1);
69 };
70 
71 #endif /* PNDSDSTOTCHARGECONVERSION_H */
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)
PndSdsTotChargeConversion(Int_t VerboseLevel=0)
Default constructor.
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:28
virtual Double_t DigiValueToCharge(Double_t digivalue)
Converts a given digitized charge into charge in electrons.
virtual Double_t GetTimeStampErrorAfterCorrection()
virtual Double_t ChargeToDigiValue(Double_t charge)
Converts a given charge in electrons into the electronics answer e.g. ToT [ns].
virtual Double_t GetTimeWalk(Double_t Charge)
virtual Double_t GetRelativeError(Double_t Charge)
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...