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 
6 #include <KVDetector.h>
7 
9 
10 // BEGIN_HTML <!--
12 /* -->
13 <h2>KVQL1</h2>
14 <h4>digitized charge signal</h4>
15 <!-- */
16 // --> END_HTML
18 
20 
21 void KVQL1::init()
22 {
23  SetDefaultValues();
24  fChannel = kQL1;
25  SetType("QL1");
26  LoadPSAParameters();
27 }
28 
29 
30 
32 
34 {
35  init();
36 }
37 
38 
39 
40 
42 
43 KVQL1::KVQL1(const char* name) : KVSignal(name, "Charge")
44 {
45  init();
46 }
47 
48 
49 
50 
53 
55 {
56  // Destructor
57 }
58 
59 
60 
61 
69 
70 void KVQL1::Copy(TObject& obj) const
71 {
72  // This method copies the current state of 'this' object into 'obj'
73  // You should add here any member variables, for example:
74  // (supposing a member variable KVQL1::fToto)
75  // CastedObj.fToto = fToto;
76  // or
77  // CastedObj.SetToto( GetToto() );
78 
79  KVSignal::Copy(obj);
80  //KVQL1& CastedObj = (KVQL1&)obj;
81 }
82 
83 
84 
86 
88 {
89  SetChannelWidth(4);
90  SetBaseLineLength(500);
91 }
92 
93 
94 
96 
98 {
99 
100  Double_t val = GetPSAParameter("BaseLineLength");
101  SetBaseLineLength(val);
102 
103  val = GetPSAParameter("ChannelWidth");
104  SetChannelWidth(val);
105 
106  val = GetPSAParameter("TauRC");
107  SetTauRC(val);
108 
109  Double_t rise = GetPSAParameter("ShaperRiseTime");
110  val = GetPSAParameter("ShaperFlatTop");
111  SetTrapShaperParameters(rise, val);
112 
113  val = GetPSAParameter("PZCorrection");
114  SetPoleZeroCorrection((val == 1));
115 
116  val = GetPSAParameter("MinimumAmplitude");
118 }
119 
120 
121 
122 
124 
126 {
127  if (PSAHasBeenComputed()) return;
128 
129  if (!IsLongEnough()) return;
130  if (!TestWidth())
132 
133  RemoveBaseLine();
134 
139 
140  SetADCData();
141  ComputeRiseTime();
142 
143  fPSAIsDone = kTRUE;
144 
145 }
146 
147 
148 
150 
152 {
153  if (!fPSAIsDone) return;
154 
155  d->SetDetectorSignalValue(Form("%s.BaseLine", fType.Data()), fBaseLine);
156  d->SetDetectorSignalValue(Form("%s.SigmaBaseLine", fType.Data()), fSigmaBase);
157  d->SetDetectorSignalValue(Form("%s.Amplitude", fType.Data()), fAmplitude);
158  d->SetDetectorSignalValue(Form("%s.RiseTime", fType.Data()), fRiseTime);
159  d->SetDetectorSignalValue(Form("%s.RawAmplitude", fType.Data()), GetRawAmplitude());
160 }
161 
162 
163 
#define d(i)
double Double_t
constexpr Bool_t kTRUE
char name[80]
char * Form(const char *fmt,...)
Base class for detector geometry description.
Definition: KVDetector.h:160
Definition: KVQL1.h:9
KVQL1()
Definition: KVQL1.cpp:33
void init()
Definition: KVQL1.cpp:21
virtual void SetDefaultValues()
Definition: KVQL1.cpp:87
virtual void LoadPSAParameters()
Definition: KVQL1.cpp:97
virtual ~KVQL1()
Destructor.
Definition: KVQL1.cpp:54
virtual void GetPSAResult(KVDetector *) const
Definition: KVQL1.cpp:151
virtual void TreateSignal()
Definition: KVQL1.cpp:125
void Copy(TObject &obj) const
Definition: KVQL1.cpp:70
void SetTauRC(Int_t taurc)
Definition: KVSignal.h:300
Bool_t IsLongEnough() const
Definition: KVSignal.cpp:186
TString fType
string to identify the signal type : "QH1", "I2" etc ...
Definition: KVSignal.h:32
void Copy(TObject &obj) const
Definition: KVSignal.cpp:169
void ChangeChannelWidth(Double_t newwidth)
Definition: KVSignal.cpp:474
virtual void RemoveBaseLine()
Definition: KVSignal.cpp:594
Double_t fAmplitude
results of signal treatement
Definition: KVSignal.h:38
Double_t GetPSAParameter(const Char_t *parname)
DeduceFromName has to be called before.
Definition: KVSignal.cpp:341
Double_t fSigmaBase
base line rms
Definition: KVSignal.h:44
void SetPoleZeroCorrection(Bool_t with=kTRUE)
Definition: KVSignal.h:296
Double_t GetRawAmplitude() const
Definition: KVSignal.h:329
Double_t fBaseLine
base line mean value
Definition: KVSignal.h:43
void SetBaseLineLength(Int_t length, Int_t first=0)
Definition: KVSignal.h:196
Double_t ComputeAmplitude()
Compute and return the absolute value of the signal amplitude.
Definition: KVSignal.cpp:619
void SetTrapShaperParameters(Double_t rise, Double_t flat)
Definition: KVSignal.h:258
void SetADCData()
Definition: KVSignal.cpp:229
void SetChannelWidth(double width)
Definition: KVSignal.h:167
Bool_t PSAHasBeenComputed() const
Definition: KVSignal.h:159
Double_t fTauRC
tau_rc of the electronics. Used for pole zero cancellation.
Definition: KVSignal.h:54
Double_t ComputeRiseTime()
Definition: KVSignal.cpp:636
void FIR_ApplyTrapezoidal(double trise, double tflat)
different shapers (modify only fAdc)
Definition: KVSignal.cpp:839
Bool_t fWithPoleZeroCorrection
use or nor pole zero correction
Definition: KVSignal.h:58
Double_t fTrapFlatTop
flat top of the trapezoidal shaper
Definition: KVSignal.h:56
Double_t fRiseTime
rise time of the signal
Definition: KVSignal.h:39
Bool_t fPSAIsDone
indicate if PSA has been done
Definition: KVSignal.h:64
void PoleZeroSuppression(Double_t tauRC)
Definition: KVSignal.cpp:1748
Double_t fTrapRiseTime
rise time of the trapezoidal shaper
Definition: KVSignal.h:55
Bool_t TestWidth() const
Definition: KVSignal.cpp:458
Double_t GetChannelWidth() const
Definition: KVSignal.h:172
void SetAmplitudeTriggerValue(Double_t val)
Definition: KVSignal.h:347
const char * Data() const
ClassImp(TPyArg)