5 |
#ifndef caloprofile_h |
#ifndef caloprofile_h |
6 |
#define caloprofile_h |
#define caloprofile_h |
7 |
|
|
8 |
#include <PamLevel2.h> |
#include <iostream> |
|
|
|
9 |
#include <TTree.h> |
#include <TTree.h> |
10 |
#include <TFriendElement.h> |
#include <TFriendElement.h> |
11 |
#include <TChain.h> |
#include <TChain.h> |
23 |
#include <TSystemDirectory.h> |
#include <TSystemDirectory.h> |
24 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
25 |
#include <TF1.h> |
#include <TF1.h> |
26 |
#include <iostream> |
|
27 |
|
#include <PamLevel2.h> |
28 |
|
|
29 |
using namespace std; |
using namespace std; |
30 |
|
|
86 |
UInt_t OBT; |
UInt_t OBT; |
87 |
UInt_t PKT; |
UInt_t PKT; |
88 |
UInt_t atime; |
UInt_t atime; |
89 |
|
UInt_t fOBT; |
90 |
|
UInt_t fPKT; |
91 |
|
UInt_t fatime; |
92 |
|
// |
93 |
|
Int_t N; |
94 |
|
Int_t NC; |
95 |
|
Bool_t sel; |
96 |
|
Bool_t cont; |
97 |
|
Int_t mask18b; |
98 |
|
// |
99 |
|
Float_t chi2; |
100 |
|
Float_t ndf; |
101 |
|
Float_t E0; |
102 |
|
Float_t a; |
103 |
|
Float_t b; |
104 |
|
Float_t errE0; |
105 |
|
Float_t erra; |
106 |
|
Float_t errb; |
107 |
|
Float_t etmax; |
108 |
|
Float_t asymm; |
109 |
|
Float_t X0pl; |
110 |
|
Int_t fitresult; |
111 |
|
// |
112 |
|
Bool_t no18x; |
113 |
|
Bool_t maskXE; |
114 |
|
Bool_t maskYE; |
115 |
|
Bool_t maskXO; |
116 |
|
Bool_t maskYO; |
117 |
// |
// |
118 |
Float_t eplane[2][22]; |
Float_t eplane[2][22]; |
119 |
// |
// |
120 |
|
CaloLevel2 *clp; |
121 |
|
// |
122 |
|
|
123 |
public: |
public: |
124 |
// |
// |
125 |
// |
// |
126 |
|
void Fit(); |
127 |
|
void Fit(Bool_t draw); |
128 |
|
// |
129 |
|
// Double_t ccurve(Double_t *t, Double_t *par); |
130 |
|
// |
131 |
|
void SetCaloLevel2Pointer(CaloLevel2 *cp){ clp = cp;}; |
132 |
|
// |
133 |
|
Float_t Get_E0(){this->Fit(); return E0;}; |
134 |
|
Float_t Get_a(){this->Fit(); return a;}; |
135 |
|
Float_t Get_b(){this->Fit(); return b;}; |
136 |
|
Float_t Get_errE0(){this->Fit(); return errE0;}; |
137 |
|
Float_t Get_erra(){this->Fit(); return erra;}; |
138 |
|
Float_t Get_errb(){this->Fit(); return errb;}; |
139 |
|
Float_t Get_chi2(){this->Fit(); return chi2;}; |
140 |
|
Float_t Get_ndf(){this->Fit(); return ndf;}; |
141 |
|
Float_t Get_nchi2(){this->Fit(); if ( ndf > 0 ) return (chi2/ndf); return 0;}; |
142 |
|
Float_t Get_tmax(){this->Fit(); if ( b != 0 ) return ((a-1.)/b); return 0;}; |
143 |
|
Float_t Get_asymm(){this->Fit(); return asymm;}; |
144 |
|
Float_t Get_exptmax(){this->Process(); return etmax;}; |
145 |
|
Float_t Get_X0pl(){this->Process(); return X0pl;}; |
146 |
|
Int_t Get_fitresult(){this->Fit(); return fitresult;}; |
147 |
|
// |
148 |
|
void ForceNextFit(){atime=0;fatime=0;}; |
149 |
void Draw(); |
void Draw(); |
150 |
void Draw(Int_t); |
void Draw(Int_t); |
151 |
// |
// |
154 |
~CaloLong(){ Delete(); }; |
~CaloLong(){ Delete(); }; |
155 |
// |
// |
156 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
157 |
|
void UsePlane18X(){ no18x=false; }; |
158 |
|
// |
159 |
|
void MaskSection(TString); |
160 |
|
void UnMaskSection(TString); |
161 |
|
void UnMaskSections(); |
162 |
|
void Selection(){sel = true; cont = false;}; ///< Set selection mode: planes from 1 to 22-N are used, plane 18 - N is masked if "emulate18" variable is true (DEFAULT); |
163 |
|
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
164 |
|
void SetNoWpreSampler(Int_t n); |
165 |
|
void SetNoWcalo(Int_t n); |
166 |
|
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
167 |
|
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
168 |
|
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
169 |
|
void SetEnergies(Float_t myene[][22]); |
170 |
|
// |
171 |
|
void Clear(); |
172 |
|
void Clear(Option_t *option){Clear();}; |
173 |
|
void Delete(); |
174 |
|
void Delete(Option_t *option){Delete();}; |
175 |
|
// |
176 |
|
void Process(); ///< Process data |
177 |
|
void Print(); |
178 |
|
void Print(Option_t *option){Print();}; |
179 |
|
// |
180 |
|
ClassDef(CaloLong,2); |
181 |
|
}; |
182 |
|
|
183 |
|
/** |
184 |
|
* |
185 |
|
*/ |
186 |
|
class Calo2D : public TObject { |
187 |
|
|
188 |
|
private: |
189 |
|
// |
190 |
|
PamLevel2 *L2; |
191 |
|
Bool_t debug; |
192 |
|
// |
193 |
|
// needed to avoid reprocessing the same event over and over to obtain the variables |
194 |
|
// |
195 |
|
UInt_t OBT; |
196 |
|
UInt_t PKT; |
197 |
|
UInt_t atime; |
198 |
|
// |
199 |
|
Float_t estrip[23][96][96]; |
200 |
|
Int_t smax[23]; |
201 |
|
Int_t smay[23]; |
202 |
|
// |
203 |
|
|
204 |
|
public: |
205 |
|
// |
206 |
|
// |
207 |
|
void Draw(); |
208 |
|
void Draw(Int_t); |
209 |
|
// |
210 |
|
Calo2D(); |
211 |
|
Calo2D(PamLevel2 *L2); |
212 |
|
~Calo2D(){ Delete(); }; |
213 |
|
// |
214 |
|
void SetDebug(Bool_t d){ debug=d; }; |
215 |
// |
// |
216 |
void Clear(); |
void Clear(); |
217 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |
222 |
void Print(); |
void Print(); |
223 |
void Print(Option_t *option){Print();}; |
void Print(Option_t *option){Print();}; |
224 |
// |
// |
225 |
ClassDef(CaloLong,1); |
ClassDef(Calo2D,1); |
226 |
}; |
}; |
227 |
|
|
228 |
#endif |
#endif |