--- calo/flight/CaloProfile/inc/CaloProfile.h 2008/09/22 20:08:10 1.3 +++ calo/flight/CaloProfile/inc/CaloProfile.h 2009/09/10 12:53:56 1.12 @@ -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; +}; + /** * */ @@ -45,6 +57,7 @@ UInt_t atime; // Float_t estrip[2][22][96]; + TString suf; // public: @@ -68,7 +81,9 @@ void Print(); void Print(Option_t *option){Print();}; // - ClassDef(CaloLat,1); + void SetSuffix(TString suffix){ suf = suffix;}; + // + ClassDef(CaloLat,2); }; /** @@ -107,12 +122,32 @@ 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; + Bool_t maskXE; + Bool_t maskYE; + Bool_t maskXO; + Bool_t maskYO; + // + Bool_t xyaverage; + // + Bool_t heavytail; + Float_t letmax; + Float_t lmipth; // Float_t eplane[2][22]; // + CaloLevel2 *clp; + // + 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"... + // + TString suf; public: // @@ -122,7 +157,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;}; @@ -135,8 +173,12 @@ Float_t Get_asymm(){this->Fit(); return asymm;}; Float_t Get_exptmax(){this->Process(); return etmax;}; Float_t Get_X0pl(){this->Process(); return X0pl;}; - Int_t Get_fitresult(){this->Fit(); return fitresult;}; // + Float_t Get_letmax(){ return letmax;}; + Float_t Get_lmipth(){ return lmipth;}; + Int_t Get_fitresult(){this->Fit(); return fitresult;}; + // + void ForceNextFit(){atime=0;fatime=0;}; void Draw(); void Draw(Int_t); // @@ -147,12 +189,34 @@ 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); void SetNoWcalo(Int_t n); + 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) + // + void Setletmax(Float_t l){ letmax = l;}; + void Setlmipth(Float_t l){ lmipth = l;}; + void HeavyTail(Bool_t b){ heavytail=b;}; + // + Float_t GetLowerLimit(){ return lmax;}; + Float_t GetUpperLimit(){ return umax;}; + // + void SetSuffix(TString suffix){ suf = suffix;}; // void Clear(); void Clear(Option_t *option){Clear();}; @@ -163,7 +227,7 @@ void Print(); void Print(Option_t *option){Print();}; // - ClassDef(CaloLong,2); + ClassDef(CaloLong,3); }; /** @@ -186,6 +250,7 @@ Int_t smax[23]; Int_t smay[23]; // + TString suf; public: // @@ -204,11 +269,13 @@ void Delete(); void Delete(Option_t *option){Delete();}; // + void SetSuffix(TString suffix){ suf = suffix;}; + // void Process(); ///< Process data void Print(); void Print(Option_t *option){Print();}; // - ClassDef(Calo2D,1); + ClassDef(Calo2D,2); }; #endif