--- calo/flight/CaloEnergy/inc/CaloEnergy.h 2009/07/29 12:59:37 1.5 +++ calo/flight/CaloEnergy/inc/CaloEnergy.h 2009/08/18 09:24:50 1.9 @@ -16,7 +16,9 @@ #include #include #include + #include +#include #include @@ -69,6 +71,12 @@ Float_t fXEen_maxplane; ///< total energy [MIP] used for energy determination as given by section XE Float_t fYEen_maxplane; ///< total energy [MIP] used for energy determination as given by section YE // + Float_t xomax_en; ///< energy at plane of maximum of section XO + Float_t xemax_en; ///< energy at plane of maximum of section XE + Float_t yomax_en; ///< energy at plane of maximum of section YO + Float_t yemax_en; ///< energy at plane of maximum of section YE + // + // Float_t xe1; ///< position of strip 1 section XE Float_t xe2; ///< position of strip 32 section XE Float_t xe3; ///< position of strip 33 section XE @@ -97,6 +105,9 @@ Float_t ye5; ///< position of strip 65 section YE Float_t ye6; ///< position of strip 96 section YE // Float_t z4; + Float_t track_coordx[22][2]; + Float_t track_coordy[22][2]; + // Float_t trk_z[22][2]; ///< Z position of calorimeter planes Float_t en; ///< energy [mip] for decodeestrip Int_t view; ///< view for decodeestrip @@ -114,6 +125,11 @@ Float_t en_yep[11]; ///< detected energy [MIP] for each plane of section YE Float_t enstrip[2][22][96]; ///< detected energy [MIP] for each strip of calorimeter // + Float_t encol[2][3]; + Int_t fColumn; + // + Float_t x0max; ///< plane of maximum given externally (only test purpose) + // Bool_t fXosel; ///< true if event is contained in section XO Bool_t fXesel; ///< true if event is contained in section XE Bool_t fYosel; ///< true if event is contained in section YO @@ -133,6 +149,7 @@ Bool_t indep; ///< flag to switch between INDEPENDENT or COHERENT mode, default false - COHERENT mode selected // CaloPreSampler *cp; ///< pointer to calopresampler object (object constructed only when invoking method UseCaloPreSampler() , default: use level2 data). + CaloLong *clong; ///< pointer to calolong object (object constructed only when invoking method UseLongFit(), default use energy up to maximum). // void DefineGeometry(); ///< called by constructors to fill geometrical variables (like xe1 etc). void Set(); ///< called by contructors to define default variables @@ -173,19 +190,23 @@ Float_t GetCount(){ return fCount;}; ///< returns the number of section inside acceptance for this event (equal to the number of given section in coherent mode) // Float_t GetMaxplane(){ return fMax_plane;}; ///< returns the average max plane [0,11] (independent mode) or last plane for energy measurement [0,43] (coherent mode) + Float_t GetEnergyAtMaxplane(TString section); ///< returns the energy at the plane of maximum for section "section" // - Float_t GetMaxEnergy(){ return((fXEen_maxplane+fYOen_maxplane+fYEen_maxplane+fXOen_maxplane));}; ///< returns the total energy [MIP] before conversion + Float_t GetMaxEnergy(); ///< returns the total energy [MIP] before conversion Float_t GetMaxEnergy(TString section); ///< returns the total energy [MIP] before conversion for section "section" Int_t GetMaxplane(TString section); ///< returns the plane of maximum (independent mode) or the last used plane (coherent mode) for section "section" // - void UseLongitudinalFitEnergy(){ fPl = 0; fLong = true;}; ///< use or not the longitudinal fit to determine the energy (NOT IMPLEMENTED YET) + void UseLongFit();///< use or not the longitudinal fit to determine the energy + CaloLong* GetCaloLong(){return clong;}; ///< Get calolong object. void UseMeasuredEnergyUpToMax(){ fLong = false;}; ///< use the measured energy to determine the maximum (default) // - void SetMargin(Float_t margin){fM = margin + 0.096; fM1 = margin - 0.122 - 0.096; if ( fM1 < 0. ) fM1 = 0.;}; ///< set the margin from the border of the silicon sensor (not from the first strip), set the same margin for both the directions - void SetMarginStripDirection(Float_t margin){fM = margin + 0.096;}; ///< set the margin from the border of the silicon sensor (not from the first strip) in the strip direction - void SetMarginStripReading(Float_t margin){fM1 = margin -0.122 - 0.096;}; ///< set the margin from the border of the silicon sensor (not from the first strip) in the strip reading direction + void SetMargin(Float_t margin){fM = margin ; fM1 = margin - 0.122 - 0.096 + 0.096; if ( fM1 < 0. ) fM1 = 0.;}; ///< set the margin from the border of the silicon sensor (not from the first strip), set the same margin for both the directions + void SetMarginStripDirection(Float_t margin){fM = margin ;}; ///< set the margin from the border of the silicon sensor (not from the first strip) in the strip direction + void SetMarginStripReading(Float_t margin){fM1 = margin -0.122 - 0.096 + 0.096;}; ///< set the margin from the border of the silicon sensor (not from the first strip) in the strip reading direction void SetRadius(Int_t strip){fRad = strip;}; ///< set the radius of the cylinder void SetMaxPlaneOffset(Int_t noplanes){fPl = noplanes;}; ///< set the number of dE/dx measurements to be used after the maximum + void SetX0max(Float_t xm){ x0max = xm;}; ///< set the plane of maximum from external source X0 (test purpose only) + void SetRigX0max(Float_t rig){ x0max = -0.5+log(rig/0.0076);}; ///< set the plane of maximum from external source rigidity (GeV) (test purpose only) // void SetMinimumContainment(Int_t plane); ///< set the last plane [0,11] for which the trajectory MUST be contained in all the sections. Default 1000 means all the planes, if less than 10 events can be only partially contained in a section (NB: THIS INTRODUCE AN ENERGY DEPENDENT SELECTION CONTAINMENT EFFICIENCY) void SetMinimumContainment(TString section, Int_t plane); ///< set the last plane [0,11] for which the trajectory MUST be contained in section "section". Default 1000 means all the planes, if less than 10 events can be only partially contained in a section (NB: THIS INTRODUCE AN ENERGY DEPENDENT SELECTION CONTAINMENT EFFICIENCY) @@ -201,6 +222,17 @@ void UseCaloPreSampler(); ///< use pre-sampler routine to refit the track (level2 default fitting could be wrong, in this case we force "shower fitting" in the DV library). CaloPreSampler* GetCaloPreSampler(){return cp;}; ///< Get pre-sampler object. // + Float_t *Get_track_coordx(){ return *track_coordx;}; ///< X position of the track for all the planes and views + Float_t *Get_track_coordy(){ return *track_coordy;}; ///< Y position of the track for all the planes and views + // + Float_t Get_track_coordx(Int_t i, Int_t j){ return track_coordx[i][j];}; ///< X position of the track for plane i and view j + Float_t Get_track_coordy(Int_t i, Int_t j){ return track_coordy[i][j];}; ///< X position of the track for plane i and view j + // + Float_t *Get_encol(){ return *encol;}; ///< integrated energy over columns [MIP] + Float_t Get_encol(Int_t i, Int_t j){ return encol[i][j];}; ///< integrated energy over view i and column j [MIP] + // + Int_t Get_column(){return fColumn;}; ///< number of column which contains the track + // ClassDef(CaloEnergy,1); };