KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVINDRACsITotLightReconstructor.h
Go to the documentation of this file.
1 
4 #ifndef __KVINDRACSITOTLIGHTRECONSTRUCTOR_H
5 #define __KVINDRACSITOTLIGHTRECONSTRUCTOR_H
6 
7 #include "KVDetectorSignal.h"
8 
9 #include <KVINDRADetector.h>
10 
22 #define NOT_CALCULATED 0
23 #define CALCULATED_WITH_GAIN_CORRECTION 1
24 #define NO_GAIN_CORRECTION 4
25 #define NEGATIVE_PEDESTAL_CORRECTED_VALUE 15
26 #define CALCULATION_NOT_CONVERGED 12
27 
29  KVDetectorSignal* fFast = nullptr;
30  KVDetectorSignal* fSlow = nullptr;
31 
38  /* Cette variable n'est pas utilisee, et ne figure pas dans e.g. le fortran de la 4eme campagne
39  Float_t pre=0.4318;
40  */
45 
46  void Calculate() const;
47 
48  UInt_t GetStatusLumiere() const;
49  Bool_t LightIsGood() const;
50 
51 public:
54  : KVDetectorSignal("TotLight", det),
55  fFast(det->GetDetectorSignal("R_PedCor")),
56  fSlow(det->GetDetectorSignal("L_PedCor")),
58  {
59  p0 = 400;
60  p1 = 900;
61  eps = 1.e-4;
62  /* Cette variable n'est pas utilisee, et ne figure pas dans e.g. le fortran de la 4eme campagne
63  Float_t pre=0.4318;
64  */
65  c1 = 1.5;
66  tau0 = 390.;
67  tau1 = 1590.;
68  tau2 = 3090.;
69  int ring = det->GetRingNumber();
70  int module = det->GetModuleNumber();
71  /****************************************************************************
72  * Definition of PM rise-time constant tau
73  * Comment based on a note from Bernard Borderie:
74  * rings 11-16 use PM bases with a different component, thus tau is 60 nsec
75  * ring 16, module 5 is an exception, it has a tau of 20 nsec !!
76  * ring 5, module 11 is also an exception, it has a tau of 60 nsec !!
77  * (all others have tau=20ns)
78  */
79  if (ring >= 11 && ring <= 16)
80  tau = 60.;
81  if (ring == 16 && module == 5)
82  tau = 20.;
83  if (ring == 5 && module == 11)
84  tau = 60.;
85  /****************************************************************************/
86  if (ring > 3) {
87  c2 = 2.2;
88  }
89  else {
90  c2 = 3.3;
91  }
92  if (det) SetTitle(Form("Signal %s calculated from signals %s and %s of detector %s", GetName(), fFast->GetName(), fSlow->GetName(), GetDetector()->GetName()));
93  }
94 
95  Double_t GetValue(const KVNameValueList& = "") const
96  {
97  Calculate();
99  }
100  void Reset()
101  {
102  set_value(0);
104  }
105  Int_t GetStatus(const TString&) const;
106 
107  Bool_t IsRaw() const
108  {
112  return kFALSE;
113  }
114 
115  ClassDef(KVINDRACsITotLightReconstructor, 1) //Calculation of light output from fast and slow components for INDRA CsI detectors
116 };
117 
118 #endif
int Int_t
unsigned int UInt_t
#define NOT_CALCULATED
status values for calculation of total light output
const Bool_t kFALSE
bool Bool_t
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 const char * GetName() const
virtual void SetTitle(const char *title="")