KaliVeda
Toolkit for HIC analysis
KVINDRACsITotLightReconstructor.h
1 
4 #ifndef __KVINDRACSITOTLIGHTRECONSTRUCTOR_H
5 #define __KVINDRACSITOTLIGHTRECONSTRUCTOR_H
6 
7 #include "KVDetectorSignal.h"
8 
9 #include <KVINDRADetector.h>
10 
23 #define NOT_CALCULATED 0
24 #define CALCULATED_WITH_GAIN_CORRECTION 1
25 #define NO_GAIN_CORRECTION 4
26 #define NEGATIVE_PEDESTAL_CORRECTED_VALUE 15
27 #define CALCULATION_NOT_CONVERGED 12
28 
30  KVDetectorSignal* fFast = nullptr;
31  KVDetectorSignal* fSlow = nullptr;
32 
39  /* Cette variable n'est pas utilisee, et ne figure pas dans e.g. le fortran de la 4eme campagne
40  Float_t pre=0.4318;
41  */
46 
47  void Calculate() const;
48 
49  UInt_t GetStatusLumiere() const;
50  Bool_t LightIsGood() const;
51 
52 public:
55  : KVDetectorSignal("TotLight", det),
56  fFast(det->GetDetectorSignal("R_PedCor")),
57  fSlow(det->GetDetectorSignal("L_PedCor")),
58  fLumTotStatus(NOT_CALCULATED), tau(20)
59  {
60  p0 = 400;
61  p1 = 900;
62  eps = 1.e-4;
63  /* Cette variable n'est pas utilisee, et ne figure pas dans e.g. le fortran de la 4eme campagne
64  Float_t pre=0.4318;
65  */
66  c1 = 1.5;
67  tau0 = 390.;
68  tau1 = 1590.;
69  tau2 = 3090.;
70  int ring = det->GetRingNumber();
71  int module = det->GetModuleNumber();
72  /****************************************************************************
73  * Definition of PM rise-time constant tau
74  * Comment based on a note from Bernard Borderie:
75  * rings 11-16 use PM bases with a different component, thus tau is 60 nsec
76  * ring 16, module 5 is an exception, it has a tau of 20 nsec !!
77  * ring 5, module 11 is also an exception, it has a tau of 60 nsec !!
78  * (all others have tau=20ns)
79  */
80  if (ring >= 11 && ring <= 16)
81  tau = 60.;
82  if (ring == 16 && module == 5)
83  tau = 20.;
84  if (ring == 5 && module == 11)
85  tau = 60.;
86  /****************************************************************************/
87  if (ring > 3) {
88  c2 = 2.2;
89  }
90  else {
91  c2 = 3.3;
92  }
93  if (det) SetTitle(Form("Signal %s calculated from signals %s and %s of detector %s", GetName(), fFast->GetName(), fSlow->GetName(), GetDetector()->GetName()));
94  }
95 
96  Double_t GetValue(const KVNameValueList& = "") const
97  {
98  Calculate();
100  }
101  void Reset()
102  {
103  set_value(0);
104  fLumTotStatus = NOT_CALCULATED;
105  }
106  Int_t GetStatus(const TString&) const;
107 
108  Bool_t IsRaw() const
109  {
113  return kFALSE;
114  }
115 
116  ClassDef(KVINDRACsITotLightReconstructor, 1) //Calculation of light output from fast and slow components for INDRA CsI detectors
117 };
118 
119 #endif
int Int_t
unsigned int UInt_t
bool Bool_t
constexpr Bool_t kFALSE
double Double_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
Base class for output signal data produced by a detector.
virtual Double_t GetValue(const KVNameValueList &params="") const
void set_value(double x)
const KVDetector * GetDetector() const
Calculation of light output from fast and slow components for INDRA CsI detectors.
Double_t tau
ring/module-dependent 'tau' of PM base in ns
Double_t GetValue(const KVNameValueList &="") const
KVINDRACsITotLightReconstructor(const KVINDRADetector *det)
KVDetectorSignal * fSlow
pedestal corrected fast component, "R_PedCor"
UInt_t fLumTotStatus
pedestal corrected slow component, "L_PedCor"
Base class for detectors of INDRA array.
UInt_t GetRingNumber() const
UInt_t GetModuleNumber() const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void SetTitle(const char *title="")
const char * GetName() const override