--- calo/flight/CaloProfile/inc/CaloProfile.h 2007/11/26 08:44:34 1.2 +++ calo/flight/CaloProfile/inc/CaloProfile.h 2008/09/22 20:08:10 1.3 @@ -5,8 +5,7 @@ #ifndef caloprofile_h #define caloprofile_h -#include - +#include #include #include #include @@ -24,7 +23,8 @@ #include #include #include -#include + +#include using namespace std; @@ -86,6 +86,30 @@ UInt_t OBT; UInt_t PKT; UInt_t atime; + UInt_t fOBT; + UInt_t fPKT; + UInt_t fatime; + // + Int_t N; + Int_t NC; + Bool_t sel; + Bool_t cont; + Int_t mask18b; + // + Float_t chi2; + Float_t ndf; + Float_t E0; + Float_t a; + Float_t b; + Float_t errE0; + Float_t erra; + Float_t errb; + Float_t etmax; + Float_t asymm; + Float_t X0pl; + Int_t fitresult; + // + Bool_t no18x; // Float_t eplane[2][22]; // @@ -93,6 +117,26 @@ public: // // + void Fit(); + void Fit(Bool_t draw); + // + // Double_t ccurve(Double_t *t, Double_t *par); + // + Float_t Get_E0(){this->Fit(); return E0;}; + Float_t Get_a(){this->Fit(); return a;}; + Float_t Get_b(){this->Fit(); return b;}; + Float_t Get_errE0(){this->Fit(); return errE0;}; + Float_t Get_erra(){this->Fit(); return erra;}; + Float_t Get_errb(){this->Fit(); return errb;}; + Float_t Get_chi2(){this->Fit(); return chi2;}; + Float_t Get_ndf(){this->Fit(); return ndf;}; + Float_t Get_nchi2(){this->Fit(); if ( ndf > 0 ) return (chi2/ndf); return 0;}; + Float_t Get_tmax(){this->Fit(); if ( b != 0 ) return ((a-1.)/b); return 0;}; + 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;}; + // void Draw(); void Draw(Int_t); // @@ -101,6 +145,59 @@ ~CaloLong(){ Delete(); }; // void SetDebug(Bool_t d){ debug=d; }; + void UsePlane18X(){ no18x=false; }; + // + 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); + 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 Clear(); + void Clear(Option_t *option){Clear();}; + void Delete(); + void Delete(Option_t *option){Delete();}; + // + void Process(); ///< Process data + void Print(); + void Print(Option_t *option){Print();}; + // + ClassDef(CaloLong,2); +}; + +/** + * + */ +class Calo2D : public TObject { + + private: + // + PamLevel2 *L2; + Bool_t debug; + // + // needed to avoid reprocessing the same event over and over to obtain the variables + // + UInt_t OBT; + UInt_t PKT; + UInt_t atime; + // + Float_t estrip[23][96][96]; + Int_t smax[23]; + Int_t smay[23]; + // + + public: + // + // + void Draw(); + void Draw(Int_t); + // + Calo2D(); + Calo2D(PamLevel2 *L2); + ~Calo2D(){ Delete(); }; + // + void SetDebug(Bool_t d){ debug=d; }; // void Clear(); void Clear(Option_t *option){Clear();}; @@ -111,7 +208,7 @@ void Print(); void Print(Option_t *option){Print();}; // - ClassDef(CaloLong,1); + ClassDef(Calo2D,1); }; #endif