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) : KVSignal(name, "Charge")
42 {
43  init();
44 }
45 
46 
47 
48 
51 
53 {
54  // Destructor
55 }
56 
57 
58 
59 
67 
68 void KVQL1::Copy(TObject& obj) const
69 {
70  // This method copies the current state of 'this' object into 'obj'
71  // You should add here any member variables, for example:
72  // (supposing a member variable KVQL1::fToto)
73  // CastedObj.fToto = fToto;
74  // or
75  // CastedObj.SetToto( GetToto() );
76 
77  KVSignal::Copy(obj);
78  //KVQL1& CastedObj = (KVQL1&)obj;
79 }
80 
81 
82 
84 
86 {
87  SetChannelWidth(4);
88  SetBaseLineLength(500);
89 }
90 
91 
92 
94 
96 {
97 
98  Double_t val = GetPSAParameter("BaseLineLength");
99  SetBaseLineLength(val);
100 
101  val = GetPSAParameter("ChannelWidth");
102  SetChannelWidth(val);
103 
104  val = GetPSAParameter("TauRC");
105  SetTauRC(val);
106 
107  Double_t rise = GetPSAParameter("ShaperRiseTime");
108  val = GetPSAParameter("ShaperFlatTop");
109  SetTrapShaperParameters(rise, val);
110 
111  val = GetPSAParameter("PZCorrection");
112  SetPoleZeroCorrection((val == 1));
113 
114  val = GetPSAParameter("MinimumAmplitude");
116 }
117 
118 
119 
120 
122 
124 {
125  if (PSAHasBeenComputed()) return;
126 
127  if (!IsLongEnough()) return;
128  if (!TestWidth())
130 
131  RemoveBaseLine();
132 
137 
138  SetADCData();
139  ComputeRiseTime();
140 
141  fPSAIsDone = kTRUE;
142 
143 }
144 
145 
146 
148 
150 {
151  if (!fPSAIsDone) return;
152 
153  val.SetValue("BaseLine",fBaseLine);
154  val.SetValue("SigmaBaseLine",fSigmaBase);
155  val.SetValue("Amplitude",fAmplitude);
156  val.SetValue("RiseTime",fRiseTime);
157  val.SetValue("RawAmplitude",GetRawAmplitude());
158 }
159 
160 
double Double_t
constexpr Bool_t kTRUE
char name[80]
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:85
void Copy(TObject &obj) const override
Definition: KVQL1.cpp:68
void init()
Definition: KVQL1.cpp:19
void GetPSAResults(KVNameValueList &) const override
Definition: KVQL1.cpp:149
virtual ~KVQL1()
Destructor.
Definition: KVQL1.cpp:52
void LoadPSAParameters() override
Definition: KVQL1.cpp:95
void TreateSignal() override
Definition: KVQL1.cpp:123
void SetTauRC(Int_t taurc)
Definition: KVSignal.h:296
Bool_t IsLongEnough() const
Definition: KVSignal.cpp:185
void ChangeChannelWidth(Double_t newwidth)
Definition: KVSignal.cpp:473
virtual void RemoveBaseLine()
Definition: KVSignal.cpp:593
Double_t fAmplitude
results of signal treatement
Definition: KVSignal.h:37
Double_t GetPSAParameter(const Char_t *parname)
DeduceFromName has to be called before.
Definition: KVSignal.cpp:340
Double_t fSigmaBase
base line rms
Definition: KVSignal.h:43
void SetPoleZeroCorrection(Bool_t with=kTRUE)
Definition: KVSignal.h:292
Double_t GetRawAmplitude() const
Definition: KVSignal.h:325
Double_t fBaseLine
base line mean value
Definition: KVSignal.h:42
void SetBaseLineLength(Int_t length, Int_t first=0)
Definition: KVSignal.h:192
Double_t ComputeAmplitude()
Compute and return the absolute value of the signal amplitude.
Definition: KVSignal.cpp:618
void SetTrapShaperParameters(Double_t rise, Double_t flat)
Definition: KVSignal.h:254
void Copy(TObject &obj) const override
Definition: KVSignal.cpp:168
void SetADCData()
Definition: KVSignal.cpp:228
void SetChannelWidth(double width)
Definition: KVSignal.h:163
Bool_t PSAHasBeenComputed() const
Definition: KVSignal.h:155
Double_t fTauRC
tau_rc of the electronics. Used for pole zero cancellation.
Definition: KVSignal.h:53
Double_t ComputeRiseTime()
Definition: KVSignal.cpp:635
void FIR_ApplyTrapezoidal(double trise, double tflat)
different shapers (modify only fAdc)
Definition: KVSignal.cpp:838
Bool_t fWithPoleZeroCorrection
use or nor pole zero correction
Definition: KVSignal.h:57
Double_t fTrapFlatTop
flat top of the trapezoidal shaper
Definition: KVSignal.h:55
Double_t fRiseTime
rise time of the signal
Definition: KVSignal.h:38
Bool_t fPSAIsDone
indicate if PSA has been done
Definition: KVSignal.h:63
void PoleZeroSuppression(Double_t tauRC)
Definition: KVSignal.cpp:1747
Double_t fTrapRiseTime
rise time of the trapezoidal shaper
Definition: KVSignal.h:54
Bool_t TestWidth() const
Definition: KVSignal.cpp:457
Double_t GetChannelWidth() const
Definition: KVSignal.h:168
void SetAmplitudeTriggerValue(Double_t val)
Definition: KVSignal.h:343
ClassImp(TPyArg)