PandaRoot
PndMvdCalcTot.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 PNDMVDCALCTOT_H
14 #define PNDMVDCALCTOT_H
15 
16 #include "FairLogger.h"
17 #include "TObject.h"
18 #include "TString.h"
19 #include "TRandom.h"
20 #include <iostream>
21 #include <iomanip>
22 
24 
45  public:
48  {
49  ftr = 100.;
50  fa = 60.;
51  fthreshold = 3000;
52  fclockfrequency = 50.;
53  ftimestep = 1. / fclockfrequency * 1000.;
55  LOG(info) << " <PndMvdCalcTot::PndMvdCalcTot()>: default constructor used!";
56  };
57 
59  PndMvdCalcTot(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency)
60  {
61  ftr = tr;
62  fa = a;
63  fthreshold = threshold;
64  fclockfrequency = clockfrequency;
65  ftimestep = 1. / fclockfrequency * 1000.;
67  };
68 
71 
72  void SetStartOffset();
73 
74  Double_t GetTot(Double_t fcharge);
75  void SetParameter(Double_t tr, Double_t a, Double_t threshold);
76  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
77 
78  private:
79  Double_t fthreshold; // in electrons
80  Double_t ftr; // raising time [ns]
81  Double_t fa; // falling ration [e/ns]
82  Double_t Q, Qt; // max charge, threshold charge
83  Double_t t1e, t2e; // exact time point when signal is over threshold/under threshold again
84  Double_t fclockfrequency; // the frequency the readout chip works with
85  Double_t ftimestep; // one time step of the clock
86  Double_t fstarttime; // absolute point when TOT begins
87  Double_t fstoptime; // absolute point when TOT ends
88  Double_t ftimeoffset; // difference between rising clock edge and when detector gets hit
89 
90  Double_t GetTotWC(); // assumes a clock which results in a quantized TOT
91 
92 };
93 
94 #endif /*MVDCALCTOT_H*/
PndMvdCalcTot(Double_t tr, Double_t a, Double_t threshold, Double_t clockfrequency)
Main constructor.
Definition: PndMvdCalcTot.h:59
Double_t GetPileUpTime(Double_t fcharge)
Double_t GetTot(Double_t fcharge)
void SetParameter(Double_t tr, Double_t a, Double_t threshold)
~PndMvdCalcTot()
Destructor.
Definition: PndMvdCalcTot.h:70
void SetStartOffset()
PndMvdCalcTot()
Default constructor.
Definition: PndMvdCalcTot.h:47
Class to calculate the time over threshold.
Definition: PndMvdCalcTot.h:44