PandaRoot
PndSdsTimeWalkCorrSimple.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  * PndSdsTimeWalkCorrSimple.h
15  *
16  * Created on: Aug 26, 2010
17  * Author: esch
18  *
19  * This class calculates the TimeWalkCorrection from TOT time
20  * using a triangular model of the signal
21  * (see PndSdsTotChargeConversion)
22  * _____________________________________________
23  * t_r*m-Q_thr-t_tot*m | / t_r*m-Q_thr-t_tot*m \ 2 |
24  * Q(tot) = - --------------------- + \ || ------------------- | + t_r*Q_thr*m
25  * 2 \| \ 2 /
26  * Q_thr
27  * t_tw(Q) = -------- * t_r
28  * Q(tot)
29  *
30  *
31  * Params from Parameter Database:
32  * ------------------------------
33  * t_r = rising time of the signal
34  * Q_thr = threshold charge
35  * m = constatnt current to unload the capacitor
36  *
37  */
38 
39 #ifndef PNDSDSTIMEWALKCORRSIMPLE_H_
40 #define PNDSDSTIMEWALKCORRSIMPLE_H_
41 
42 #include "PndSdsTimeWalkCorr.h"
43 #include <iostream>
44 #include <cmath>
45 
47  public:
49 
50  PndSdsTimeWalkCorrSimple(Double_t risingtime, Double_t constcurrent, Double_t thr, Double_t frequency, Int_t verblevel);
51 
52  virtual ~PndSdsTimeWalkCorrSimple();
53 
54  virtual Double_t CorrectionTimeWalk(Double_t tot);
55  virtual Double_t GetCharge() { return fCharge; };
56 
57  private:
58  Double_t fRisingTime; // ns
59  Double_t fConstantCurrent; // e/ns
60  Double_t fTimeOverThreshold; // ns
61  Double_t fThreshold; // e
62  Double_t fFrequency; // MHz
63  Int_t fVerboseLevel;
64  Double_t fCharge; // e
65  Double_t fTimeWalk; // ns
66  Double_t CalculateCharge(Double_t);
67  Double_t CalculateTimeWalk(Double_t);
68 
69  ClassDef(PndSdsTimeWalkCorrSimple, 1);
70 };
71 
72 #endif /* PNDSDSTIMEWALKCORRSIMPLE_H_ */
virtual Double_t CorrectionTimeWalk(Double_t tot)
virtual ~PndSdsTimeWalkCorrSimple()