KaliVeda
Toolkit for HIC analysis
KVCurrentSignal.cpp
1 //Created by KVClassFactory on Tue Jan 13 15:11:11 2015
2 //Author: ,,,
3 
4 #include "KVCurrentSignal.h"
5 #include "TMath.h"
6 #include "TEnv.h"
7 #include "KVDataSet.h"
8 
10 
11 // BEGIN_HTML <!--
13 /* -->
14 <h2>KVCurrentSignal</h2>
15 <h4>digitized intensity signal</h4>
16 <!-- */
17 // --> END_HTML
19 
21 
22 void KVCurrentSignal::init()
23 {
24  SetDefaultValues();
25 }
26 
27 
28 
30 
32 {
33  init();
34 }
35 
36 
37 
38 
40 
41 KVCurrentSignal::KVCurrentSignal(const char* name) : KVSignal(name, "Current")
42 {
43  SetType(name);
44  init();
45 }
46 
47 
48 
49 
52 
54 {
55  // Destructor
56 }
57 
58 
59 
60 
68 
70 {
71  // This method copies the current state of 'this' object into 'obj'
72  // You should add here any member variables, for example:
73  // (supposing a member variable KVCurrentSignal::fToto)
74  // CastedObj.fToto = fToto;
75  // or
76  // CastedObj.SetToto( GetToto() );
77 
78  KVSignal::Copy(obj);
79  //KVCurrentSignal& CastedObj = (KVCurrentSignal&)obj;
80 }
81 
82 
83 
85 
87 {
88  SetChannelWidth(4.);
90 }
91 
92 
93 
107 
109 {
110 
111 // TString spar;
112 // Double_t lval;
113 // //BaseLineLength
114 // spar.Form("%s.%s.BaseLineLength",dettype,GetName());
115 // if (gDataSet) lval = gDataSet->GetDataSetEnv(spar.Data(),0.0);
116 // else lval = gEnv->GetValue(spar.Data(),0.0);
117 // SetBaseLineLength(lval);
118 // //ChannelWidth
119 // spar.Form("%s.%s.ChannelWidth",dettype,GetName());
120 // if (gDataSet) lval = gDataSet->GetDataSetEnv(spar.Data(),0.0);
121 // else lval = gEnv->GetValue(spar.Data(),0.0);
122 // SetChannelWidth(lval);
123 }
124 
125 
126 /*
127 KVPSAResult *KVCurrentSignal::TreateSignal()
128 {
129  if (GetN()==0) {
130  //Info("TreateSignal","Empty signal %s",GetName());
131  return 0;
132  }
133  KVPSAResult* psa = new KVPSAResult(GetName());
134  psa->SetValue(Form("%s.%s.RawAmplitude",fDetName.Data(),fType.Data()),GetRawAmplitude());
135  if (fAdc.fN==0) SetADCData();
136 
137  fBaseLine = FindMedia(fFirstBL, fLastBL);
138  fSigmaBase = FindSigma2(fFirstBL, fLastBL);
139 
140  Add(-1.*fBaseLine);
141  ComputeAmplitude();
142 
143  // storing result
144  psa->SetValue(Form("%s.%s.BaseLine", fDetName.Data(), fType.Data()), fBaseLine);
145  psa->SetValue(Form("%s.%s.SigmaBaseLine", fDetName.Data(), fType.Data()), TMath::Sqrt(fSigmaBase));
146  psa->SetValue(Form("%s.%s.Amplitude", fDetName.Data(), fType.Data()), fAmplitude);
147 
148  return psa;
149 
150 }
151 */
152 
char name[80]
virtual ~KVCurrentSignal()
Destructor.
void Copy(TObject &obj) const
virtual void SetDefaultValues()
virtual void LoadPSAParameters()
void Copy(TObject &obj) const
Definition: KVSignal.cpp:169
void SetBaseLineLength(Int_t length, Int_t first=0)
Definition: KVSignal.h:196
void SetType(const Char_t *type)
Definition: KVSignal.h:94
void SetChannelWidth(double width)
Definition: KVSignal.h:167
ClassImp(TPyArg)