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> |
34 |
|
|
35 |
using namespace std; |
using namespace std; |
36 |
|
|
37 |
|
struct stack{ |
38 |
|
char data[MAX]; |
39 |
|
int top; |
40 |
|
}; |
41 |
|
|
42 |
/** |
/** |
43 |
* |
* |
44 |
*/ |
*/ |
118 |
Float_t etmax; |
Float_t etmax; |
119 |
Float_t asymm; |
Float_t asymm; |
120 |
Float_t X0pl; |
Float_t X0pl; |
121 |
|
Float_t defE0; |
122 |
|
Float_t umax; |
123 |
|
Float_t lmax; |
124 |
|
TString sumax; |
125 |
|
TString slmax; |
126 |
Int_t fitresult; |
Int_t fitresult; |
127 |
// |
// |
128 |
Bool_t no18x; |
Bool_t no18x; |
129 |
|
Bool_t maskXE; |
130 |
|
Bool_t maskYE; |
131 |
|
Bool_t maskXO; |
132 |
|
Bool_t maskYO; |
133 |
// |
// |
134 |
Float_t eplane[2][22]; |
Float_t eplane[2][22]; |
135 |
// |
// |
136 |
|
CaloLevel2 *clp; |
137 |
|
// |
138 |
|
Float_t Evaluate(TString s, Float_t max); // expression must be of the form "5*t"."t+10","t-(4*t)"... |
139 |
|
// |
140 |
|
|
141 |
public: |
public: |
142 |
// |
// |
146 |
// |
// |
147 |
// Double_t ccurve(Double_t *t, Double_t *par); |
// Double_t ccurve(Double_t *t, Double_t *par); |
148 |
// |
// |
149 |
|
void SetCaloLevel2Pointer(CaloLevel2 *cp){ clp = cp;}; |
150 |
|
// |
151 |
Float_t Get_E0(){this->Fit(); return E0;}; |
Float_t Get_E0(){this->Fit(); return E0;}; |
152 |
|
Float_t Get_defE0(){this->Fit(); return defE0;}; |
153 |
Float_t Get_a(){this->Fit(); return a;}; |
Float_t Get_a(){this->Fit(); return a;}; |
154 |
Float_t Get_b(){this->Fit(); return b;}; |
Float_t Get_b(){this->Fit(); return b;}; |
155 |
Float_t Get_errE0(){this->Fit(); return errE0;}; |
Float_t Get_errE0(){this->Fit(); return errE0;}; |
164 |
Float_t Get_X0pl(){this->Process(); return X0pl;}; |
Float_t Get_X0pl(){this->Process(); return X0pl;}; |
165 |
Int_t Get_fitresult(){this->Fit(); return fitresult;}; |
Int_t Get_fitresult(){this->Fit(); return fitresult;}; |
166 |
// |
// |
167 |
|
void ForceNextFit(){atime=0;fatime=0;}; |
168 |
void Draw(); |
void Draw(); |
169 |
void Draw(Int_t); |
void Draw(Int_t); |
170 |
// |
// |
175 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
176 |
void UsePlane18X(){ no18x=false; }; |
void UsePlane18X(){ no18x=false; }; |
177 |
// |
// |
178 |
|
void MaskSection(TString); |
179 |
|
void UnMaskSection(TString); |
180 |
|
void UnMaskSections(); |
181 |
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); |
182 |
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. |
183 |
void SetNoWpreSampler(Int_t n); |
void SetNoWpreSampler(Int_t n); |
185 |
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
186 |
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. |
187 |
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. |
188 |
|
void SetEnergies(Float_t myene[][22]); |
189 |
|
// |
190 |
|
void SetLowerLimit(Float_t l){ lmax = l; }; |
191 |
|
void SetUpperLimit(Float_t u){ umax = u; }; |
192 |
|
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) |
193 |
|
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) |
194 |
|
// |
195 |
|
Float_t GetLowerLimit(){ return lmax;}; |
196 |
|
Float_t GetUpperLimit(){ return umax;}; |
197 |
// |
// |
198 |
void Clear(); |
void Clear(); |
199 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |