KaliVeda
Toolkit for HIC analysis
KVQH1.cpp
1 //Created by KVClassFactory on Tue Jan 13 15:11:11 2015
2 //Author: ,,,
3 
4 #include "KVQH1.h"
5 
7 
8 // BEGIN_HTML <!--
10 /* -->
11 <h2>KVQH1</h2>
12 <h4>digitized charge signal</h4>
13 <!-- */
14 // --> END_HTML
16 
18 
19 void KVQH1::init()
20 {
21  SetDefaultValues();
22  fChannel = kQH1;
23  SetType("QH1");
24  fFPGAOutputNumbers = 1;
25  LoadPSAParameters();
26 }
27 
28 
29 
31 
33 {
34  init();
35 }
36 
37 
38 
39 
41 
42 KVQH1::KVQH1(const char* name) : KVFAZIASignal(name, "Charge")
43 {
44  init();
45 }
46 
47 
48 
49 
51 
53 {
54  SetChannelWidth(10);
55  SetBaseLineLength(500);
56 }
57 
58 
59 
61 
63 {
64 
65  Double_t val = GetPSAParameter("BaseLineLength");
66  SetBaseLineLength(val);
67 
68  val = GetPSAParameter("ChannelWidth");
69  SetChannelWidth(val);
70 
71  val = GetPSAParameter("TauRC");
72  SetTauRC(val);
73 
74  Double_t rise = GetPSAParameter("ShaperRiseTime");
75  val = GetPSAParameter("ShaperFlatTop");
76  SetTrapShaperParameters(rise, val);
77 
78  val = GetPSAParameter("PZCorrection");
79  SetPoleZeroCorrection((val == 1));
80 
81  val = GetPSAParameter("MinimumAmplitude");
83 }
84 
85 
86 
87 
89 
91 {
92  if (PSAHasBeenComputed()) return;
93 
94  if (!IsLongEnough()) return;
95  if (!TestWidth())
97 
99 
104 
105  SetADCData();
106  ComputeRiseTime();
107 
108  fPSAIsDone = kTRUE;
109 
110 }
111 
112 
113 
115 
117 {
118  if (!fPSAIsDone) return;
119 
120  val.SetValue("BaseLine",fBaseLine);
121  val.SetValue("SigmaBaseLine",fSigmaBase);
122  val.SetValue("Amplitude",fAmplitude);
123  val.SetValue("RiseTime",fRiseTime);
124  val.SetValue("RawAmplitude",GetRawAmplitude());
125 }
126 
127 
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: KVQH1.h:9
void LoadPSAParameters() override
Definition: KVQH1.cpp:62
void init()
Definition: KVQH1.cpp:19
void GetPSAResults(KVNameValueList &) const override
Definition: KVQH1.cpp:116
void SetDefaultValues() override
Definition: KVQH1.cpp:52
void TreateSignal() override
Definition: KVQH1.cpp:90
KVQH1()
Definition: KVQH1.cpp:32
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)