PandaRoot
PndSdsFE.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * SdsFEAmpModel.h
15  *
16  * Created on: Apr 4, 2011
17  * Author: esch
18  *
19  * Class to calculate ToT, TimeWalk, TimeStamp and Time till the signal is back to baseline from a TF1 amplifier model.
20  *
21  *
22  */
23 
24 #ifndef PndSdsFE_H_
25 #define PndSdsFE_H_
26 #include "TObject.h"
27 #include "PndSdsFEAmpModelSimple.h"
28 #include "TMath.h"
29 #include "TF1.h"
30 #include "TRandom.h"
31 #include "Math/Interpolator.h"
32 #include "Math/InterpolationTypes.h"
34 #include "TVectorT.h"
35 
36 class PndSdsFE : public TObject {
37  public:
41  {
43  };
44 
49  fCharge_list(other.fCharge_list), fTot_list(other.fTot_list), inter(other.inter){};
50  // PndSdsFE(double charingtime, double constcurrent, double threshold, double frequency, int verbose);
51  virtual ~PndSdsFE();
52 
53  virtual double GetTotFromCharge(Double_t charge); // Calculates the ToT value from the charge
54  virtual double GetChargeFromTot(double tot); // Calculates the charge from the tot value
55  virtual double GetTimeWalkFromCharge(double charge); // Calculates the TimeWalk from the charge
56  virtual double GetTimeWalkFromTot(double tot); // Calculates the TimeWalk from the TOT value
57  virtual double GetTimeBackToBaseline(double charge); // Calculates the time from start of the signal till the signal is fBaselineEpsilon close to baseline
58  virtual double GetTimeStamp(double eventtime, double tof, double charge); // Calculates the TimeStamp of the signal
59  virtual double GetTimeStep() { return fTimeStep; }
60  virtual void SetParameter(TString parName, double parValue);
61  virtual void SetThreshold(double threshold) { fThreshold = threshold; }
62 
64  {
65  if (this != &other) // protect against invalid self-assignment
66  {
70  fFunction = other.fFunction;
72  fThreshold = other.fThreshold;
74  fToF = other.fToF;
75  fEventTime = other.fEventTime;
76  fTimeOffSet = other.fTimeOffSet;
77  fTimeStep = other.fTimeStep;
79  i = other.i;
80  stepsize = other.stepsize;
81  fCharge_list = other.fCharge_list;
82  fTot_list = other.fTot_list;
83  inter = other.inter;
84  }
85  return *this;
86  };
87 
88  protected:
89  double DigitizeTime(double time);
90  void CalcTimeOffSet();
91  void CreateInterpolatorList(); // Creates the Interpolatorlist for GetTotFromCharge calculation
92  void SaveInterpolatorList(std::vector<double> charge, std::vector<double> tot);
93  void LoadInterpolatorList();
94  void GetInterpolatorList();
95 
97 
100 
101  TF1 *fFunction;
102  double fMaximumAmplitude; // Saves position of the maximum amplitude of the signal
103  double fThreshold; // Threshold for Signal from Parameter database
104  double fBaselineEpsilon; //
105  double fToF; // Time of Flight from MC
106  double fEventTime; // EventTime from MC
107  double fTimeOffSet; // Random offset
108  double fTimeStep;
109  double fFunctionRange; // Range of the function. max 100 fC => 624 150.9 e => max.tot 10503 ns (with thr.= 1100 e)
110  int i;
111  double stepsize;
112 
113  std::vector<double> fCharge_list;
114  std::vector<double> fTot_list;
115  ROOT::Math::Interpolator *inter;
116 
117  private:
118  ClassDef(PndSdsFE, 1);
119 };
120 
121 #endif /* PndSdsFE_H_ */
virtual void SetThreshold(double threshold)
Definition: PndSdsFE.h:61
void CreateInterpolatorList()
double fBaselineEpsilon
Definition: PndSdsFE.h:104
double fEventTime
Definition: PndSdsFE.h:106
virtual void SetParameter(TString parName, double parValue)
PndSdsFE(PndSdsFE &other)
Definition: PndSdsFE.h:45
virtual double GetTimeStep()
Definition: PndSdsFE.h:59
std::vector< double > fCharge_list
Definition: PndSdsFE.h:113
int i
Definition: PndSdsFE.h:110
PndSdsFE()
Definition: PndSdsFE.h:38
virtual double GetTimeWalkFromCharge(double charge)
ROOT::Math::Interpolator * inter
Definition: PndSdsFE.h:115
virtual double GetTimeWalkFromTot(double tot)
void CalcTimeOffSet()
TF1 * fFunction
Definition: PndSdsFE.h:101
void LoadInterpolatorList()
double fMaximumAmplitude
Definition: PndSdsFE.h:102
std::vector< double > fTot_list
Definition: PndSdsFE.h:114
void GetInterpolatorList()
void SaveInterpolatorList(std::vector< double > charge, std::vector< double > tot)
double fTimeStep
Definition: PndSdsFE.h:108
virtual ~PndSdsFE()
double DigitizeTime(double time)
double fToF
Definition: PndSdsFE.h:105
int fNumberOfMaxElectons
Definition: PndSdsFE.h:99
double fTimeOffSet
Definition: PndSdsFE.h:107
PndSdsFE & operator=(PndSdsFE &other)
Definition: PndSdsFE.h:63
virtual double GetTimeStamp(double eventtime, double tof, double charge)
double fFunctionRange
Definition: PndSdsFE.h:109
PndSdsFEAmpModelSimple * fFrontEndModel
Definition: PndSdsFE.h:96
int fNumberOfSupportPoints
Definition: PndSdsFE.h:98
virtual double GetChargeFromTot(double tot)
double fThreshold
Definition: PndSdsFE.h:103
virtual double GetTotFromCharge(Double_t charge)
double stepsize
Definition: PndSdsFE.h:111
virtual double GetTimeBackToBaseline(double charge)