FairRoot/PandaRoot
PndMvdCalcTot.h
Go to the documentation of this file.
1 #ifndef PNDMVDCALCTOT_H
2 #define PNDMVDCALCTOT_H
3 
4 #include "TObject.h"
5 #include "TString.h"
6 #include "TRandom2.h"
7 #include <iostream>
8 #include <iomanip>
9 
11 
32 {
33  public :
36  ftr = 100.;
37  fa = 60.;
38  fthreshold = 3000;
39  fclockfrequency = 50.;
40  ftimestep = 1. / fclockfrequency * 1000.;
42  std::cout<<"-I- <PndMvdCalcTot::PndMvdCalcTot()>: default constructor used!"<<std::endl;
43  };
44 
47  ftr = tr;
48  fa = a;
50  fclockfrequency = clockfrequency;
51  ftimestep = 1. / fclockfrequency * 1000.;
53  };
54 
57 
58  void SetStartOffset();
59 
60  Double_t GetTot(Double_t fcharge);
62  Double_t GetPileUpTime(Double_t fcharge); //returns the time the capacitor is loaded and therefore the time the hit MVD is blind for other events
63 
64  private :
65  Double_t fthreshold; //in electrons
66  Double_t ftr; //raising time [ns]
67  Double_t fa; //falling ration [e/ns]
68  Double_t Q, Qt; //max charge, threshold charge
69  Double_t t1e, t2e; //exact time point when signal is over threshold/under threshold again
70  Double_t fclockfrequency; //the frequency the readout chip works with
71  Double_t ftimestep; //one time step of the clock
72  Double_t fstarttime; //absolute point when TOT begins
73  Double_t fstoptime; //absolute point when TOT ends
74  Double_t ftimeoffset; //difference between rising clock edge and when detector gets hit
75 
76  Double_t GetTotWC(); //assumes a clock which results in a quantized TOT
77 
78  TRandom2 fRand;
79 };
80 
81 #endif /*MVDCALCTOT_H*/
PndMvdCalcTot(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency)
Main constructor.
Definition: PndMvdCalcTot.h:46
Double_t GetPileUpTime(Double_t fcharge)
Double_t fclockfrequency
Definition: PndMvdCalcTot.h:70
Double_t t2e
Definition: PndMvdCalcTot.h:69
Double_t ftimestep
Definition: PndMvdCalcTot.h:71
Double_t fthreshold
Definition: PndMvdCalcTot.h:65
TRandom2 fRand
Definition: PndMvdCalcTot.h:78
Double_t fstoptime
Definition: PndMvdCalcTot.h:73
Double_t t1e
Definition: PndMvdCalcTot.h:69
Double_t GetTot(Double_t fcharge)
Int_t a
Definition: anaLmdDigi.C:126
Double_t fstarttime
Definition: PndMvdCalcTot.h:72
void SetParameter(Double_t tr, Double_t a, Double_t threshold)
Double_t
Double_t ftimeoffset
Definition: PndMvdCalcTot.h:74
Double_t ftr
Definition: PndMvdCalcTot.h:66
double threshold
~PndMvdCalcTot()
Destructor.
Definition: PndMvdCalcTot.h:56
void SetStartOffset()
Double_t GetTotWC()
PndMvdCalcTot()
Default constructor.
Definition: PndMvdCalcTot.h:35
Class to calculate the time over threshold.
Definition: PndMvdCalcTot.h:31