FairRoot/PandaRoot
PndSdsChargeConversion.h
Go to the documentation of this file.
1 #ifndef PNDSDSCHARGECONVERSION_H
2 #define PNDSDSCHARGECONVERSION_H
3 
6 
7 #include <map>
8 #include "TObject.h"
9 #include "TString.h"
10 #include "PndSdsDigi.h"
11 
13 
14 class PndSdsChargeConversion : public TObject
15  {
16  public :
17 
20  virtual void StartExecute(){};
21  virtual void EndExecute(){};
22  virtual Double_t ChargeToDigiValue(Double_t Charge) = 0;
25  virtual Double_t GetRelativeError(Double_t Charge) = 0;
26  virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime) = 0;
27  virtual Double_t GetTimeWalk(Double_t ){return 0;}; //charge //[R.K.03/2017] unused variable(s) ///< Time between hit in detector and the time stamp assigned to the hit
28 // virtual Double_t GetTimeWalk(Int_t tot){
29 // return GetTimeWalk(DigiValueToCharge(tot));
30 // }
32  return 1;
33  }
34 
35  virtual Double_t GetTimeStep(){return 0;};
36 
38  it=fParams.find(param);
39  if (it == fParams.end()){
40  Error("GetParameter(TString param)","No parameter named: %s",param.Data());
41  return -1;
42  }
43  return it->second;
44  };
45  void SetParameter(TString param, Double_t value){
46  if (value < 0 ) Error("SetParameter(TString param, Double_t value)","invalid value for param: %s", param.Data());
47  fParams.insert(std::pair<TString, Double_t>(param, value));
48  };
49 
50  private :
51  std::map<TString, Double_t> fParams;
52  std::map<TString, Double_t>::iterator it;
54 
55 
57  };
58 #endif /* PNDSDSCHARGECONVERSION_H */
std::map< TString, Double_t >::iterator it
TClonesArray * digi
Base class for Digi information.
Definition: PndSdsDigi.h:29
ClassDef(PndSdsChargeConversion, 2)
virtual Double_t GetTimeStep()
virtual Double_t GetRelativeError(Double_t Charge)=0
virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime)=0
absolute time stamp of a hit in ns (clock is taken into account)
virtual Double_t DigiValueToCharge(Double_t digi)=0
Converts a given digitized charge into charge in electrons.
Double_t
PndSdsChargeConversion(ConvType type)
Double_t GetParameter(TString param)
virtual Double_t GetTimeStampErrorAfterCorrection()
virtual Double_t ChargeToDigiValue(Double_t Charge)=0
Converts a given charge in electrons into the electronics answer e.g. ToT [ns].
std::map< TString, Double_t > fParams
virtual Double_t GetTimeWalk(Double_t)
void SetParameter(TString param, Double_t value)