--- calo/flight/CaloProfile/inc/CaloProfile.h 2009/06/16 14:30:09 1.5 +++ calo/flight/CaloProfile/inc/CaloProfile.h 2009/08/13 15:56:38 1.9 @@ -5,7 +5,13 @@ #ifndef caloprofile_h #define caloprofile_h +#define EMPTY -1 +#define MAX 50 + #include +#include +#include +#include #include #include #include @@ -23,11 +29,17 @@ #include #include #include +#include #include using namespace std; +struct stack{ + char data[MAX]; + int top; +}; + /** * */ @@ -107,6 +119,11 @@ Float_t etmax; Float_t asymm; Float_t X0pl; + Float_t defE0; + Float_t umax; + Float_t lmax; + TString sumax; + TString slmax; Int_t fitresult; // Bool_t no18x; @@ -115,8 +132,14 @@ Bool_t maskXO; Bool_t maskYO; // + Bool_t xyaverage; + // Float_t eplane[2][22]; // + CaloLevel2 *clp; + // + Float_t Evaluate(TString s, Float_t max); // expression must be of the form "5*t"."t+10","t-(4*t)"... + // public: // @@ -126,7 +149,10 @@ // // Double_t ccurve(Double_t *t, Double_t *par); // + void SetCaloLevel2Pointer(CaloLevel2 *cp){ clp = cp;}; + // Float_t Get_E0(){this->Fit(); return E0;}; + Float_t Get_defE0(){this->Fit(); return defE0;}; Float_t Get_a(){this->Fit(); return a;}; Float_t Get_b(){this->Fit(); return b;}; Float_t Get_errE0(){this->Fit(); return errE0;}; @@ -141,6 +167,7 @@ Float_t Get_X0pl(){this->Process(); return X0pl;}; Int_t Get_fitresult(){this->Fit(); return fitresult;}; // + void ForceNextFit(){atime=0;fatime=0;}; void Draw(); void Draw(Int_t); // @@ -151,7 +178,12 @@ void SetDebug(Bool_t d){ debug=d; }; void UsePlane18X(){ no18x=false; }; // + void UseAverage(){ xyaverage = true;}; + void UseAllMeas(){ xyaverage = false;}; + // void MaskSection(TString); + void UnMaskSection(TString); + void UnMaskSections(); 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 Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. void SetNoWpreSampler(Int_t n); @@ -159,6 +191,15 @@ void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. + void SetEnergies(Float_t myene[][22]); + // + void SetLowerLimit(Float_t l){ lmax = l; }; + void SetUpperLimit(Float_t u){ umax = u; }; + 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) + 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) + // + Float_t GetLowerLimit(){ return lmax;}; + Float_t GetUpperLimit(){ return umax;}; // void Clear(); void Clear(Option_t *option){Clear();};