FairRoot/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 "TRandom2.h"
19 #include "Math/Interpolator.h"
20 #include "Math/InterpolationTypes.h"
22 #include "TVectorT.h"
23 
24 class PndSdsFE: public TObject {
25 public:
27  {
29  };
30 
31  PndSdsFE(PndSdsFE& other):TObject(other),
35  fFunction(other.fFunction),
37  fThreshold(other.fThreshold),
39  fToF(other.fToF),
40  fEventTime(other.fEventTime),
41  fTimeOffSet(other.fTimeOffSet),
42  fTimeStep(other.fTimeStep),
44  fRand(other.fRand),
45  i(other.i),
46  stepsize(other.stepsize),
48  fTot_list(other.fTot_list),
49  inter(other.inter)
50  {};
51 // PndSdsFE(double charingtime, double constcurrent, double threshold, double frequency, int verbose);
52  virtual ~PndSdsFE();
53 
54  virtual double GetTotFromCharge(Double_t charge); // Calculates the ToT value from the charge
55  virtual double GetChargeFromTot(double tot); // Calculates the charge from the tot value
56  virtual double GetTimeWalkFromCharge(double charge); // Calculates the TimeWalk from the charge
57  virtual double GetTimeWalkFromTot(double tot); // Calculates the TimeWalk from the TOT value
58  virtual double GetTimeBackToBaseline(double charge); // Calculates the time from start of the signal till the signal is fBaselineEpsilon close to baseline
59  virtual double GetTimeStamp(double eventtime, double tof, double charge); // Calculates the TimeStamp of the signal
60  virtual double GetTimeStep(){return fTimeStep;}
61  virtual void SetParameter(TString parName, double parValue);
62  virtual void SetThreshold(double threshold){fThreshold = threshold;}
63 
65  {
66  if (this != &other) // protect against invalid self-assignment
67  {
71  fFunction=other.fFunction;
73  fThreshold=other.fThreshold;
75  fToF=other.fToF;
76  fEventTime=other.fEventTime;
78  fTimeStep=other.fTimeStep;
80  fRand=other.fRand;
81  i=other.i;
82  stepsize=other.stepsize;
84  fTot_list=other.fTot_list;
85  inter=other.inter;
86  }
87  return *this;
88  };
89 protected:
90 
91  double DigitizeTime(double time);
92  void CalcTimeOffSet();
93  void CreateInterpolatorList(); // Creates the Interpolatorlist for GetTotFromCharge calculation
94  void SaveInterpolatorList(std::vector<double> charge, std::vector<double> tot);
95  void LoadInterpolatorList();
96  void GetInterpolatorList();
97 
98 
100 
103 
104  TF1 *fFunction;
105  double fMaximumAmplitude; // Saves position of the maximum amplitude of the signal
106  double fThreshold; // Threshold for Signal from Parameter database
107  double fBaselineEpsilon; //
108  double fToF; // Time of Flight from MC
109  double fEventTime; // EventTime from MC
110  double fTimeOffSet; // Random offset
111  double fTimeStep;
112  double fFunctionRange; //Range of the function. max 100 fC => 624 150.9 e => max.tot 10503 ns (with thr.= 1100 e)
113  TRandom2 fRand;
114  int i;
115  double stepsize;
116 
117  std::vector<double> fCharge_list;
118  std::vector<double> fTot_list;
119  ROOT::Math::Interpolator *inter;
120 
121 private:
122 
123 
124 
125 
126  ClassDef(PndSdsFE,1);
127 };
128 
129 #endif /* PndSdsFE_H_ */
virtual void SetThreshold(double threshold)
Definition: PndSdsFE.h:62
void CreateInterpolatorList()
Definition: PndSdsFE.cxx:104
virtual double GetTimeStamp(double eventtime, double tof, double charge)
Definition: PndSdsFE.cxx:95
double fBaselineEpsilon
Definition: PndSdsFE.h:107
virtual double GetChargeFromTot(double tot)
Definition: PndSdsFE.cxx:65
virtual double GetTotFromCharge(Double_t charge)
Definition: PndSdsFE.cxx:26
virtual ~PndSdsFE()
Definition: PndSdsFE.cxx:16
double fEventTime
Definition: PndSdsFE.h:109
PndSdsFE(PndSdsFE &other)
Definition: PndSdsFE.h:31
virtual double GetTimeStep()
Definition: PndSdsFE.h:60
virtual double GetTimeWalkFromCharge(double charge)
Definition: PndSdsFE.cxx:77
std::vector< double > fCharge_list
Definition: PndSdsFE.h:117
int i
Definition: PndSdsFE.h:114
PndSdsFE()
Definition: PndSdsFE.h:26
virtual void SetParameter(TString parName, double parValue)
Definition: PndSdsFE.cxx:22
ROOT::Math::Interpolator * inter
Definition: PndSdsFE.h:119
virtual double GetTimeBackToBaseline(double charge)
Definition: PndSdsFE.cxx:84
void CalcTimeOffSet()
Definition: PndSdsFE.cxx:100
TF1 * fFunction
Definition: PndSdsFE.h:104
Double_t
void LoadInterpolatorList()
Definition: PndSdsFE.cxx:198
double fMaximumAmplitude
Definition: PndSdsFE.h:105
std::vector< double > fTot_list
Definition: PndSdsFE.h:118
void GetInterpolatorList()
Definition: PndSdsFE.cxx:175
void SaveInterpolatorList(std::vector< double > charge, std::vector< double > tot)
Definition: PndSdsFE.cxx:136
ClassDef(PndSdsFE, 1)
double fTimeStep
Definition: PndSdsFE.h:111
virtual double GetTimeWalkFromTot(double tot)
Definition: PndSdsFE.cxx:69
double threshold
double DigitizeTime(double time)
Definition: PndSdsFE.cxx:90
double fToF
Definition: PndSdsFE.h:108
int fNumberOfMaxElectons
Definition: PndSdsFE.h:102
double fTimeOffSet
Definition: PndSdsFE.h:110
PndSdsFE & operator=(PndSdsFE &other)
Definition: PndSdsFE.h:64
TRandom2 fRand
Definition: PndSdsFE.h:113
double fFunctionRange
Definition: PndSdsFE.h:112
PndSdsFEAmpModelSimple * fFrontEndModel
Definition: PndSdsFE.h:99
int fNumberOfSupportPoints
Definition: PndSdsFE.h:101
double fThreshold
Definition: PndSdsFE.h:106
double stepsize
Definition: PndSdsFE.h:115