16 |
#include <TSystemFile.h> |
#include <TSystemFile.h> |
17 |
#include <TSystemDirectory.h> |
#include <TSystemDirectory.h> |
18 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
19 |
|
|
20 |
#include <CaloPreSampler.h> |
#include <CaloPreSampler.h> |
21 |
|
#include <CaloProfile.h> |
22 |
|
|
23 |
#include <iostream> |
#include <iostream> |
24 |
|
|
31 |
|
|
32 |
private: |
private: |
33 |
// |
// |
34 |
PamLevel2 *L2; |
PamLevel2 *L2; ///< PamLevel2 object |
35 |
Bool_t debug; ///< debug flag |
Bool_t debug; ///< debug flag |
36 |
// |
// |
37 |
// needed to avoid reprocessing the same event over and over to obtain the variables |
// needed to avoid reprocessing the same event over and over to obtain the variables |
71 |
Float_t fXEen_maxplane; ///< total energy [MIP] used for energy determination as given by section XE |
Float_t fXEen_maxplane; ///< total energy [MIP] used for energy determination as given by section XE |
72 |
Float_t fYEen_maxplane; ///< total energy [MIP] used for energy determination as given by section YE |
Float_t fYEen_maxplane; ///< total energy [MIP] used for energy determination as given by section YE |
73 |
// |
// |
74 |
|
Float_t xomax_en; ///< energy at plane of maximum of section XO |
75 |
|
Float_t xemax_en; ///< energy at plane of maximum of section XE |
76 |
|
Float_t yomax_en; ///< energy at plane of maximum of section YO |
77 |
|
Float_t yemax_en; ///< energy at plane of maximum of section YE |
78 |
|
// |
79 |
|
// |
80 |
Float_t xe1; ///< position of strip 1 section XE |
Float_t xe1; ///< position of strip 1 section XE |
81 |
Float_t xe2; ///< position of strip 32 section XE |
Float_t xe2; ///< position of strip 32 section XE |
82 |
Float_t xe3; ///< position of strip 33 section XE |
Float_t xe3; ///< position of strip 33 section XE |
105 |
Float_t ye5; ///< position of strip 65 section YE |
Float_t ye5; ///< position of strip 65 section YE |
106 |
Float_t ye6; ///< position of strip 96 section YE |
Float_t ye6; ///< position of strip 96 section YE |
107 |
// Float_t z4; |
// Float_t z4; |
108 |
|
Float_t track_coordx[22][2]; |
109 |
|
Float_t track_coordy[22][2]; |
110 |
|
// |
111 |
Float_t trk_z[22][2]; ///< Z position of calorimeter planes |
Float_t trk_z[22][2]; ///< Z position of calorimeter planes |
112 |
Float_t en; ///< energy [mip] for decodeestrip |
Float_t en; ///< energy [mip] for decodeestrip |
113 |
Int_t view; ///< view for decodeestrip |
Int_t view; ///< view for decodeestrip |
124 |
Float_t en_xop[11]; ///< detected energy [MIP] for each plane of section XO |
Float_t en_xop[11]; ///< detected energy [MIP] for each plane of section XO |
125 |
Float_t en_yep[11]; ///< detected energy [MIP] for each plane of section YE |
Float_t en_yep[11]; ///< detected energy [MIP] for each plane of section YE |
126 |
Float_t enstrip[2][22][96]; ///< detected energy [MIP] for each strip of calorimeter |
Float_t enstrip[2][22][96]; ///< detected energy [MIP] for each strip of calorimeter |
127 |
|
// |
128 |
|
Float_t x0max; ///< plane of maximum given externally (only test purpose) |
129 |
// |
// |
130 |
Bool_t fXosel; ///< true if event is contained in section XO |
Bool_t fXosel; ///< true if event is contained in section XO |
131 |
Bool_t fXesel; ///< true if event is contained in section XE |
Bool_t fXesel; ///< true if event is contained in section XE |
146 |
Bool_t indep; ///< flag to switch between INDEPENDENT or COHERENT mode, default false - COHERENT mode selected |
Bool_t indep; ///< flag to switch between INDEPENDENT or COHERENT mode, default false - COHERENT mode selected |
147 |
// |
// |
148 |
CaloPreSampler *cp; ///< pointer to calopresampler object (object constructed only when invoking method UseCaloPreSampler() , default: use level2 data). |
CaloPreSampler *cp; ///< pointer to calopresampler object (object constructed only when invoking method UseCaloPreSampler() , default: use level2 data). |
149 |
|
CaloLong *clong; ///< pointer to calolong object (object constructed only when invoking method UseLongFit(), default use energy up to maximum). |
150 |
// |
// |
151 |
void DefineGeometry(); ///< called by constructors to fill geometrical variables (like xe1 etc). |
void DefineGeometry(); ///< called by constructors to fill geometrical variables (like xe1 etc). |
152 |
void Set(); ///< called by contructors to define default variables |
void Set(); ///< called by contructors to define default variables |
187 |
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 GetCount(){ return fCount;}; ///< returns the number of section inside acceptance for this event (equal to the number of given section in coherent mode) |
188 |
// |
// |
189 |
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 GetMaxplane(){ return fMax_plane;}; ///< returns the average max plane [0,11] (independent mode) or last plane for energy measurement [0,43] (coherent mode) |
190 |
|
Float_t GetEnergyAtMaxplane(TString section); ///< returns the energy at the plane of maximum for section "section" |
191 |
// |
// |
192 |
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 |
193 |
Float_t GetMaxEnergy(TString section); ///< returns the total energy [MIP] before conversion for section "section" |
Float_t GetMaxEnergy(TString section); ///< returns the total energy [MIP] before conversion for section "section" |
194 |
Int_t GetMaxplane(TString section); ///< returns the plane of maximum (independent mode) or the last used plane (coherent mode) 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" |
195 |
// |
// |
196 |
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 |
197 |
|
CaloLong* GetCaloLong(){return clong;}; ///< Get calolong object. |
198 |
void UseMeasuredEnergyUpToMax(){ fLong = false;}; ///< use the measured energy to determine the maximum (default) |
void UseMeasuredEnergyUpToMax(){ fLong = false;}; ///< use the measured energy to determine the maximum (default) |
199 |
// |
// |
200 |
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 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 |
201 |
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 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 |
202 |
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 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 |
203 |
void SetRadius(Int_t strip){fRad = strip;}; ///< set the radius of the cylinder |
void SetRadius(Int_t strip){fRad = strip;}; ///< set the radius of the cylinder |
204 |
void SetMaxPlaneOffset(Int_t noplanes){fPl = noplanes;}; ///< set the number of dE/dx measurements to be used after the maximum |
void SetMaxPlaneOffset(Int_t noplanes){fPl = noplanes;}; ///< set the number of dE/dx measurements to be used after the maximum |
205 |
|
void SetX0max(Float_t xm){ x0max = xm;}; ///< set the plane of maximum from external source X0 (test purpose only) |
206 |
|
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) |
207 |
// |
// |
208 |
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(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) |
209 |
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) |
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) |
219 |
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). |
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). |
220 |
CaloPreSampler* GetCaloPreSampler(){return cp;}; ///< Get pre-sampler object. |
CaloPreSampler* GetCaloPreSampler(){return cp;}; ///< Get pre-sampler object. |
221 |
// |
// |
222 |
|
Float_t Get_track_coordx(Int_t i, Int_t j){ return track_coordx[i][j];}; |
223 |
|
Float_t Get_track_coordy(Int_t i, Int_t j){ return track_coordy[i][j];}; |
224 |
|
// |
225 |
ClassDef(CaloEnergy,1); |
ClassDef(CaloEnergy,1); |
226 |
}; |
}; |
227 |
|
|