PandaRoot
PndSdsTotChargeConversion.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 #ifndef PNDSDSTOTCHARGECONVERSION_H
14 #define PNDSDSTOTCHARGECONVERSION_H
15 
16 #include "TRandom.h"
17 #include <iostream>
18 #include <cmath>
19 #include "PndSdsChargeConversion.h"
20 
23 
44  public:
46  PndSdsTotChargeConversion(Int_t VerboseLevel = 0);
47 
49  PndSdsTotChargeConversion(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency = 0, Int_t VerboseLevel = 0);
50 
53 
54  void StartExecute();
55 
56  virtual Double_t ChargeToDigiValue(Double_t charge);
57  virtual Double_t DigiValueToCharge(Double_t digivalue);
58  virtual Double_t GetPileUpTime(Double_t charge);
59  virtual Double_t GetRelativeError(Double_t Charge);
60  // virtual Int_t GetTimeStamp(Double_t time);
61  virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime);
62  virtual Double_t GetTimeWalk(Double_t Charge);
63  virtual Double_t GetTimeStampErrorAfterCorrection() { return ftimestep / sqrt(12); }
64 
65  virtual Double_t GetTimeStep() { return ftimestep; }
66 
67  private:
68  Double_t fthreshold; //[e]
69  Double_t Qt; // threshold charge [e]
70  Double_t t1e, t2e; // exact time point when signal is over threshold/under threshold again [ns]
71  Double_t ftimestep; // one time step of the clock [ns]
72  Double_t fstarttime; // absolute point when TOT begins [ns]
73  Double_t fstoptime; // absolute point when TOT ends [ns]
74  Double_t ftimeoffset; // difference between rising clock edge and when detector gets hit [ns]
75  Double_t ftimewalk; // exact time point when signal is over threshold
76  Int_t fVerboseLevel;
77  Double_t GetTotWC(); // assumes a clock which results in a quantized TOT
78  Double_t DigitizeTime(Double_t time);
79 
80  ClassDef(PndSdsTotChargeConversion, 1);
81 };
82 
83 #endif /* PNDSDSTOTCHARGECONVERSION_H */
virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime)
absolute time stamp of a hit in ns (clock is taken into account)
PndSdsTotChargeConversion(Int_t VerboseLevel=0)
Default constructor.
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:40
virtual Double_t DigiValueToCharge(Double_t digivalue)
Converts a given digitized charge into charge in electrons.
virtual Double_t GetTimeStampErrorAfterCorrection()
virtual Double_t ChargeToDigiValue(Double_t charge)
Converts a given charge in electrons into the electronics answer e.g. ToT [ns].
virtual Double_t GetTimeWalk(Double_t Charge)
virtual Double_t GetRelativeError(Double_t Charge)
virtual Double_t GetPileUpTime(Double_t charge)
returns the time the capacitor is loaded and therefore the time this MVD pixel/strip is blind for oth...