5 |
#ifndef caloprofile_h |
#ifndef caloprofile_h |
6 |
#define caloprofile_h |
#define caloprofile_h |
7 |
|
|
8 |
|
#define EMPTY -1 |
9 |
|
#define MAX 50 |
10 |
|
|
11 |
#include <iostream> |
#include <iostream> |
12 |
|
#include <stdio.h> |
13 |
|
#include <string.h> |
14 |
|
#include <ctype.h> |
15 |
#include <TTree.h> |
#include <TTree.h> |
16 |
#include <TFriendElement.h> |
#include <TFriendElement.h> |
17 |
#include <TChain.h> |
#include <TChain.h> |
29 |
#include <TSystemDirectory.h> |
#include <TSystemDirectory.h> |
30 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
31 |
#include <TF1.h> |
#include <TF1.h> |
32 |
|
#include <TGraphErrors.h> |
33 |
|
|
34 |
#include <PamLevel2.h> |
#include <PamLevel2.h> |
35 |
|
|
36 |
using namespace std; |
using namespace std; |
37 |
|
|
38 |
|
struct stack{ |
39 |
|
char data[MAX]; |
40 |
|
int top; |
41 |
|
}; |
42 |
|
|
43 |
/** |
/** |
44 |
* |
* |
45 |
*/ |
*/ |
57 |
UInt_t atime; |
UInt_t atime; |
58 |
// |
// |
59 |
Float_t estrip[2][22][96]; |
Float_t estrip[2][22][96]; |
60 |
|
TString suf; |
61 |
// |
// |
62 |
|
|
63 |
public: |
public: |
81 |
void Print(); |
void Print(); |
82 |
void Print(Option_t *option){Print();}; |
void Print(Option_t *option){Print();}; |
83 |
// |
// |
84 |
ClassDef(CaloLat,1); |
void SetSuffix(TString suffix){ suf = suffix;}; |
85 |
|
// |
86 |
|
ClassDef(CaloLat,2); |
87 |
}; |
}; |
88 |
|
|
89 |
/** |
/** |
122 |
Float_t etmax; |
Float_t etmax; |
123 |
Float_t asymm; |
Float_t asymm; |
124 |
Float_t X0pl; |
Float_t X0pl; |
125 |
|
Float_t defE0; |
126 |
|
Float_t umax; |
127 |
|
Float_t lmax; |
128 |
|
TString sumax; |
129 |
|
TString slmax; |
130 |
Int_t fitresult; |
Int_t fitresult; |
131 |
// |
// |
132 |
Bool_t no18x; |
Bool_t no18x; |
135 |
Bool_t maskXO; |
Bool_t maskXO; |
136 |
Bool_t maskYO; |
Bool_t maskYO; |
137 |
// |
// |
138 |
|
Bool_t xyaverage; |
139 |
|
// |
140 |
Float_t eplane[2][22]; |
Float_t eplane[2][22]; |
141 |
// |
// |
142 |
|
CaloLevel2 *clp; |
143 |
|
// |
144 |
|
Float_t Evaluate(TString s, Float_t tmax, Float_t X0pl ); // expression must be of the form "tmax+2.*X0pl", "5*tmax"."tmax+10","tmax-(4*tmax)+3.*X0pl"... |
145 |
|
// |
146 |
|
TString suf; |
147 |
|
|
148 |
public: |
public: |
149 |
// |
// |
153 |
// |
// |
154 |
// Double_t ccurve(Double_t *t, Double_t *par); |
// Double_t ccurve(Double_t *t, Double_t *par); |
155 |
// |
// |
156 |
|
void SetCaloLevel2Pointer(CaloLevel2 *cp){ clp = cp;}; |
157 |
|
// |
158 |
Float_t Get_E0(){this->Fit(); return E0;}; |
Float_t Get_E0(){this->Fit(); return E0;}; |
159 |
|
Float_t Get_defE0(){this->Fit(); return defE0;}; |
160 |
Float_t Get_a(){this->Fit(); return a;}; |
Float_t Get_a(){this->Fit(); return a;}; |
161 |
Float_t Get_b(){this->Fit(); return b;}; |
Float_t Get_b(){this->Fit(); return b;}; |
162 |
Float_t Get_errE0(){this->Fit(); return errE0;}; |
Float_t Get_errE0(){this->Fit(); return errE0;}; |
171 |
Float_t Get_X0pl(){this->Process(); return X0pl;}; |
Float_t Get_X0pl(){this->Process(); return X0pl;}; |
172 |
Int_t Get_fitresult(){this->Fit(); return fitresult;}; |
Int_t Get_fitresult(){this->Fit(); return fitresult;}; |
173 |
// |
// |
174 |
|
void ForceNextFit(){atime=0;fatime=0;}; |
175 |
void Draw(); |
void Draw(); |
176 |
void Draw(Int_t); |
void Draw(Int_t); |
177 |
// |
// |
182 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
183 |
void UsePlane18X(){ no18x=false; }; |
void UsePlane18X(){ no18x=false; }; |
184 |
// |
// |
185 |
|
void UseAverage(){ xyaverage = true;}; |
186 |
|
void UseAllMeas(){ xyaverage = false;}; |
187 |
|
// |
188 |
void MaskSection(TString); |
void MaskSection(TString); |
189 |
|
void UnMaskSection(TString); |
190 |
|
void UnMaskSections(); |
191 |
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); |
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); |
192 |
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
193 |
void SetNoWpreSampler(Int_t n); |
void SetNoWpreSampler(Int_t n); |
195 |
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
196 |
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
197 |
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
198 |
|
void SetEnergies(Float_t myene[][22]); |
199 |
|
// |
200 |
|
void SetLowerLimit(Float_t l){ lmax = l; }; |
201 |
|
void SetUpperLimit(Float_t u){ umax = u; }; |
202 |
|
void SetLowerLimit(TString sl){ slmax = sl; };// expression must be of the form "5*t"."t+10","t-(4*t)"... where t will be replaced by the fitted maximum (X0) |
203 |
|
void SetUpperLimit(TString su){ sumax = su; };// expression must be of the form "5*t"."t+10","t-(4*t)"... where t will be replaced by the fitted maximum (X0) |
204 |
|
// |
205 |
|
Float_t GetLowerLimit(){ return lmax;}; |
206 |
|
Float_t GetUpperLimit(){ return umax;}; |
207 |
|
// |
208 |
|
void SetSuffix(TString suffix){ suf = suffix;}; |
209 |
// |
// |
210 |
void Clear(); |
void Clear(); |
211 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |
216 |
void Print(); |
void Print(); |
217 |
void Print(Option_t *option){Print();}; |
void Print(Option_t *option){Print();}; |
218 |
// |
// |
219 |
ClassDef(CaloLong,2); |
ClassDef(CaloLong,3); |
220 |
}; |
}; |
221 |
|
|
222 |
/** |
/** |
239 |
Int_t smax[23]; |
Int_t smax[23]; |
240 |
Int_t smay[23]; |
Int_t smay[23]; |
241 |
// |
// |
242 |
|
TString suf; |
243 |
|
|
244 |
public: |
public: |
245 |
// |
// |
258 |
void Delete(); |
void Delete(); |
259 |
void Delete(Option_t *option){Delete();}; |
void Delete(Option_t *option){Delete();}; |
260 |
// |
// |
261 |
|
void SetSuffix(TString suffix){ suf = suffix;}; |
262 |
|
// |
263 |
void Process(); ///< Process data |
void Process(); ///< Process data |
264 |
void Print(); |
void Print(); |
265 |
void Print(Option_t *option){Print();}; |
void Print(Option_t *option){Print();}; |
266 |
// |
// |
267 |
ClassDef(Calo2D,1); |
ClassDef(Calo2D,2); |
268 |
}; |
}; |
269 |
|
|
270 |
#endif |
#endif |