KaliVeda
Toolkit for HIC analysis
KVQL1.cpp
1 //Created by KVClassFactory on Tue Jan 13 15:11:11 2015
2 //Author: ,,,
3 
4 #include "KVQL1.h"
5 
7 
8 // BEGIN_HTML <!--
10 /* -->
11 <h2>KVQL1</h2>
12 <h4>digitized charge signal</h4>
13 <!-- */
14 // --> END_HTML
16 
18 
19 void KVQL1::init()
20 {
21  SetDefaultValues();
22  fChannel = kQL1;
23  SetType("QL1");
24  LoadPSAParameters();
25 }
26 
27 
28 
30 
32 {
33  init();
34 }
35 
36 
37 
38 
40 
41 KVQL1::KVQL1(const char* name) : KVFAZIASignal(name, "Charge")
42 {
43  init();
44 }
45 
46 
47 
49 
51 {
52  SetChannelWidth(4);
53  SetBaseLineLength(500);
54 }
55 
56 
57 
59 
61 {
62 
63  Double_t val = GetPSAParameter("BaseLineLength");
64  SetBaseLineLength(val);
65 
66  val = GetPSAParameter("ChannelWidth");
67  SetChannelWidth(val);
68 
69  val = GetPSAParameter("TauRC");
70  SetTauRC(val);
71 
72  Double_t rise = GetPSAParameter("ShaperRiseTime");
73  val = GetPSAParameter("ShaperFlatTop");
74  SetTrapShaperParameters(rise, val);
75 
76  val = GetPSAParameter("PZCorrection");
77  SetPoleZeroCorrection((val == 1));
78 
79  val = GetPSAParameter("MinimumAmplitude");
81 }
82 
83 
84 
85 
87 
89 {
90  if (PSAHasBeenComputed()) return;
91 
92  if (!IsLongEnough()) return;
93  if (!TestWidth())
95 
97 
102 
103  SetADCData();
104  ComputeRiseTime();
105 
106  fPSAIsDone = kTRUE;
107 
108 }
109 
110 
111 
113 
115 {
116  if (!fPSAIsDone) return;
117 
118  val.SetValue("BaseLine",fBaseLine);
119  val.SetValue("SigmaBaseLine",fSigmaBase);
120  val.SetValue("Amplitude",fAmplitude);
121  val.SetValue("RiseTime",fRiseTime);
122  val.SetValue("RawAmplitude",GetRawAmplitude());
123 }
124 
125 
double Double_t
constexpr Bool_t kTRUE
char name[80]
Double_t GetPSAParameter(const Char_t *parname) override
routines to read/change PSA parameters from configuration file or database
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
Definition: KVQL1.h:9
KVQL1()
Definition: KVQL1.cpp:31
void SetDefaultValues() override
Definition: KVQL1.cpp:50
void init()
Definition: KVQL1.cpp:19
void GetPSAResults(KVNameValueList &) const override
Definition: KVQL1.cpp:114
void LoadPSAParameters() override
Definition: KVQL1.cpp:60
void TreateSignal() override
Definition: KVQL1.cpp:88
void SetTauRC(Int_t taurc)
Definition: KVSignal.h:270
Bool_t IsLongEnough() const
Definition: KVSignal.cpp:109
void ChangeChannelWidth(Double_t newwidth)
Definition: KVSignal.cpp:286
virtual void RemoveBaseLine()
Definition: KVSignal.cpp:406
Double_t fAmplitude
results of signal treatement
Definition: KVSignal.h:17
Double_t fSigmaBase
base line rms
Definition: KVSignal.h:23
void SetPoleZeroCorrection(Bool_t with=kTRUE)
Definition: KVSignal.h:266
Double_t GetRawAmplitude() const
Definition: KVSignal.h:299
Double_t fBaseLine
base line mean value
Definition: KVSignal.h:22
void SetBaseLineLength(Int_t length, Int_t first=0)
Definition: KVSignal.h:166
Double_t ComputeAmplitude()
Compute and return the absolute value of the signal amplitude.
Definition: KVSignal.cpp:431
void SetTrapShaperParameters(Double_t rise, Double_t flat)
Definition: KVSignal.h:228
void SetADCData()
Definition: KVSignal.cpp:152
void SetChannelWidth(double width)
Definition: KVSignal.h:137
Bool_t PSAHasBeenComputed() const
Definition: KVSignal.h:129
Double_t fTauRC
tau_rc of the electronics. Used for pole zero cancellation.
Definition: KVSignal.h:33
Double_t ComputeRiseTime()
Definition: KVSignal.cpp:448
void FIR_ApplyTrapezoidal(double trise, double tflat)
different shapers (modify only fAdc)
Definition: KVSignal.cpp:651
Bool_t fWithPoleZeroCorrection
use or nor pole zero correction
Definition: KVSignal.h:37
Double_t fTrapFlatTop
flat top of the trapezoidal shaper
Definition: KVSignal.h:35
Double_t fRiseTime
rise time of the signal
Definition: KVSignal.h:18
Bool_t fPSAIsDone
indicate if PSA has been done
Definition: KVSignal.h:45
void PoleZeroSuppression(Double_t tauRC)
Definition: KVSignal.cpp:1560
Double_t fTrapRiseTime
rise time of the trapezoidal shaper
Definition: KVSignal.h:34
Bool_t TestWidth() const
Definition: KVSignal.cpp:270
Double_t GetChannelWidth() const
Definition: KVSignal.h:142
void SetAmplitudeTriggerValue(Double_t val)
Definition: KVSignal.h:317
ClassImp(TPyArg)