PandaRoot
PndSdsFE.h
Go to the documentation of this file.
1 /*
2  * SdsFEAmpModel.h
3  *
4  * Created on: Apr 4, 2011
5  * Author: esch
6  *
7  * Class to calculate ToT, TimeWalk, TimeStamp and Time till the signal is back to baseline from a TF1 amplifier model.
8  *
9  *
10  */
11 
12 #ifndef PndSdsFE_H_
13 #define PndSdsFE_H_
14 #include "TObject.h"
15 #include "PndSdsFEAmpModelSimple.h"
16 #include "TMath.h"
17 #include "TF1.h"
18 #include "TRandom.h"
19 #include "Math/Interpolator.h"
20 #include "Math/InterpolationTypes.h"
22 #include "TVectorT.h"
23 
24 class PndSdsFE : public TObject {
25  public:
29  {
31  };
32 
37  fCharge_list(other.fCharge_list), fTot_list(other.fTot_list), inter(other.inter){};
38  // PndSdsFE(double charingtime, double constcurrent, double threshold, double frequency, int verbose);
39  virtual ~PndSdsFE();
40 
41  virtual double GetTotFromCharge(Double_t charge); // Calculates the ToT value from the charge
42  virtual double GetChargeFromTot(double tot); // Calculates the charge from the tot value
43  virtual double GetTimeWalkFromCharge(double charge); // Calculates the TimeWalk from the charge
44  virtual double GetTimeWalkFromTot(double tot); // Calculates the TimeWalk from the TOT value
45  virtual double GetTimeBackToBaseline(double charge); // Calculates the time from start of the signal till the signal is fBaselineEpsilon close to baseline
46  virtual double GetTimeStamp(double eventtime, double tof, double charge); // Calculates the TimeStamp of the signal
47  virtual double GetTimeStep() { return fTimeStep; }
48  virtual void SetParameter(TString parName, double parValue);
49  virtual void SetThreshold(double threshold) { fThreshold = threshold; }
50 
52  {
53  if (this != &other) // protect against invalid self-assignment
54  {
58  fFunction = other.fFunction;
60  fThreshold = other.fThreshold;
62  fToF = other.fToF;
63  fEventTime = other.fEventTime;
64  fTimeOffSet = other.fTimeOffSet;
65  fTimeStep = other.fTimeStep;
67  i = other.i;
68  stepsize = other.stepsize;
69  fCharge_list = other.fCharge_list;
70  fTot_list = other.fTot_list;
71  inter = other.inter;
72  }
73  return *this;
74  };
75 
76  protected:
77  double DigitizeTime(double time);
78  void CalcTimeOffSet();
79  void CreateInterpolatorList(); // Creates the Interpolatorlist for GetTotFromCharge calculation
80  void SaveInterpolatorList(std::vector<double> charge, std::vector<double> tot);
81  void LoadInterpolatorList();
82  void GetInterpolatorList();
83 
85 
88 
89  TF1 *fFunction;
90  double fMaximumAmplitude; // Saves position of the maximum amplitude of the signal
91  double fThreshold; // Threshold for Signal from Parameter database
92  double fBaselineEpsilon; //
93  double fToF; // Time of Flight from MC
94  double fEventTime; // EventTime from MC
95  double fTimeOffSet; // Random offset
96  double fTimeStep;
97  double fFunctionRange; // Range of the function. max 100 fC => 624 150.9 e => max.tot 10503 ns (with thr.= 1100 e)
98  int i;
99  double stepsize;
100 
101  std::vector<double> fCharge_list;
102  std::vector<double> fTot_list;
103  ROOT::Math::Interpolator *inter;
104 
105  private:
106  ClassDef(PndSdsFE, 1);
107 };
108 
109 #endif /* PndSdsFE_H_ */
virtual void SetThreshold(double threshold)
Definition: PndSdsFE.h:49
void CreateInterpolatorList()
double fBaselineEpsilon
Definition: PndSdsFE.h:92
double fEventTime
Definition: PndSdsFE.h:94
virtual void SetParameter(TString parName, double parValue)
PndSdsFE(PndSdsFE &other)
Definition: PndSdsFE.h:33
virtual double GetTimeStep()
Definition: PndSdsFE.h:47
std::vector< double > fCharge_list
Definition: PndSdsFE.h:101
int i
Definition: PndSdsFE.h:98
PndSdsFE()
Definition: PndSdsFE.h:26
virtual double GetTimeWalkFromCharge(double charge)
ROOT::Math::Interpolator * inter
Definition: PndSdsFE.h:103
virtual double GetTimeWalkFromTot(double tot)
void CalcTimeOffSet()
TF1 * fFunction
Definition: PndSdsFE.h:89
void LoadInterpolatorList()
double fMaximumAmplitude
Definition: PndSdsFE.h:90
std::vector< double > fTot_list
Definition: PndSdsFE.h:102
void GetInterpolatorList()
void SaveInterpolatorList(std::vector< double > charge, std::vector< double > tot)
double fTimeStep
Definition: PndSdsFE.h:96
virtual ~PndSdsFE()
double DigitizeTime(double time)
double fToF
Definition: PndSdsFE.h:93
int fNumberOfMaxElectons
Definition: PndSdsFE.h:87
double fTimeOffSet
Definition: PndSdsFE.h:95
PndSdsFE & operator=(PndSdsFE &other)
Definition: PndSdsFE.h:51
virtual double GetTimeStamp(double eventtime, double tof, double charge)
double fFunctionRange
Definition: PndSdsFE.h:97
PndSdsFEAmpModelSimple * fFrontEndModel
Definition: PndSdsFE.h:84
int fNumberOfSupportPoints
Definition: PndSdsFE.h:86
virtual double GetChargeFromTot(double tot)
double fThreshold
Definition: PndSdsFE.h:91
virtual double GetTotFromCharge(Double_t charge)
double stepsize
Definition: PndSdsFE.h:99
virtual double GetTimeBackToBaseline(double charge)