|
ATLAS Offline Software
|
These functions are for calculating variables used by the MVA calibration.
More...
These functions are for calculating variables used by the MVA calibration.
These functions are for building the maps of functions.
The user can use the functions
◆ funcMap_t
◆ compute_calibHitsShowerDepth()
float egammaMVAFunctions::compute_calibHitsShowerDepth |
( |
const std::array< float, 4 > & |
cl, |
|
|
float |
eta |
|
) |
| |
|
inline |
◆ compute_cl_e()
◆ compute_cl_eta()
◆ compute_cl_etaCalo()
Definition at line 51 of file egammaMVAFunctions.h.
54 throw std::runtime_error(
"etaCalo not found in CaloCluster object");
◆ compute_cl_etas1()
◆ compute_cl_etas2()
◆ compute_cl_phi()
◆ compute_cl_phiCalo()
Definition at line 58 of file egammaMVAFunctions.h.
61 throw std::runtime_error(
"phiCalo not found in CaloCluster object");
◆ compute_convtrk1nPixHits()
Definition at line 233 of file egammaMVAFunctions.h.
233 {
return compute_convtrkXhits<0, xAOD::numberOfPixelHits>(ph); }
◆ compute_convtrk1nSCTHits()
Definition at line 235 of file egammaMVAFunctions.h.
235 {
return compute_convtrkXhits<0, xAOD::numberOfSCTHits>(ph); }
◆ compute_convtrk2nPixHits()
Definition at line 234 of file egammaMVAFunctions.h.
234 {
return compute_convtrkXhits<1, xAOD::numberOfPixelHits>(ph); }
◆ compute_convtrk2nSCTHits()
Definition at line 236 of file egammaMVAFunctions.h.
236 {
return compute_convtrkXhits<1, xAOD::numberOfSCTHits>(ph); }
◆ compute_convtrkXhits()
template<int itrack, xAOD::SummaryType summary>
◆ compute_correctedcl_calibHitsShowerDepth()
◆ compute_correctedcl_Eacc()
◆ compute_correctedcl_Es0()
◆ compute_correctedcl_Es1()
◆ compute_correctedcl_Es2()
◆ compute_correctedcl_Es3()
◆ compute_correctedcl_f0()
◆ compute_el_author()
◆ compute_el_charge()
◆ compute_el_refittedTrack_qoverp()
◆ compute_el_tracketa()
◆ compute_el_trackpt()
◆ compute_el_trackz0()
◆ compute_ph_convFlag()
Definition at line 148 of file egammaMVAFunctions.h.
150 if (original == 3)
return 2;
151 else if (original != 0)
return 1;
152 else return original;
◆ compute_pt1conv()
◆ compute_pt2conv()
◆ compute_ptconv()
This ptconv is the old one used by MVACalib.
Definition at line 180 of file egammaMVAFunctions.h.
186 if (vx->trackParticle(0))
sum += vx->trackParticle(0)->p4();
187 if (vx->trackParticle(1))
sum += vx->trackParticle(1)->p4();
◆ compute_ptconv_decor()
This ptconv function uses the vertex decorations.
Definition at line 170 of file egammaMVAFunctions.h.
176 return vx ? std::hypot(accPx(*vx), accPy(*vx)) : 0.0;
◆ compute_rawcl_calibHitsShowerDepth()
◆ compute_rawcl_Eacc()
◆ compute_rawcl_Es0()
◆ compute_rawcl_Es1()
◆ compute_rawcl_Es2()
◆ compute_rawcl_Es3()
◆ compute_rawcl_f0()
◆ getPtAtFirstMeasurement()
Definition at line 156 of file egammaMVAFunctions.h.
159 for (
unsigned int i = 0;
i <
tp->numberOfParameters(); ++
i) {
161 return hypot(
tp->parameterPX(
i),
tp->parameterPY(
i));
◆ initializeClusterFuncs()
void egammaMVAFunctions::initializeClusterFuncs |
( |
funcMap_t & |
funcLibrary, |
|
|
const std::string & |
prefix, |
|
|
bool |
useLayerCorrected |
|
) |
| |
Definition at line 146 of file egammaMVAFunctions.cxx.
175 funcLibrary[
prefix +
"_phiModCalo1"] = funcLibrary[
"phiModCalo1"] =
180 const double pi_divisor = std::abs(
eta) < 1.425 ? 512. : 384.;
183 if (
phi > 0.)
return std::fmod(
phi,
pi / pi_divisor);
184 else return std::fmod((2 *
pi +
phi),
pi / pi_divisor);
186 else return std::fmod((
pi -
phi),
pi / pi_divisor);
196 {
return std::fmod(2.*TMath::Pi()+
compute_cl_phi(*
cl),TMath::Pi()/32.)-TMath::Pi()/64.0; };
198 if (useLayerCorrected) {
◆ initializeConvertedPhotonFuncs()
std::unique_ptr< funcMap_t > egammaMVAFunctions::initializeConvertedPhotonFuncs |
( |
bool |
useLayerCorrected | ) |
|
A function to build the map for converted photons.
Definition at line 72 of file egammaMVAFunctions.cxx.
74 auto funcLibraryPtr = std::make_unique<funcMap_t>();
111 return std::max(pt1, pt2)/(pt1+pt2);
116 if (useLayerCorrected) {
140 return funcLibraryPtr;
◆ initializeEgammaFuncs()
void egammaMVAFunctions::initializeEgammaFuncs |
( |
funcMap_t & |
funcLibrary, |
|
|
const std::string & |
prefix, |
|
|
bool |
useLayerCorrected |
|
) |
| |
◆ initializeElectronFuncs()
std::unique_ptr< funcMap_t > egammaMVAFunctions::initializeElectronFuncs |
( |
bool |
useLayerCorrected | ) |
|
A function to build the map for electrons.
Definition at line 34 of file egammaMVAFunctions.cxx.
37 auto funcLibraryPtr = std::make_unique<funcMap_t>();
55 return funcLibraryPtr;
◆ initializeUnconvertedPhotonFuncs()
std::unique_ptr< funcMap_t > egammaMVAFunctions::initializeUnconvertedPhotonFuncs |
( |
bool |
useLayerCorrected | ) |
|
A function to build the map for uncoverted photons.
Definition at line 59 of file egammaMVAFunctions.cxx.
61 auto funcLibraryPtr = std::make_unique<funcMap_t>();
67 return funcLibraryPtr;
float compute_el_trackz0(const xAOD::Electron &el)
float compute_rawcl_Eacc(const xAOD::CaloCluster &cl)
float compute_cl_phiCalo(const xAOD::CaloCluster &cluster)
virtual double phi() const
The azimuthal angle ( ) of the particle.
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
std::unordered_map< std::string, std::function< float(const xAOD::Egamma *, const xAOD::CaloCluster *)> > funcMap_t
Define the map type since it's long.
@ e033
uncalibrated energy (sum of cells) in presampler in a 3x3 window in cells in eta X phi
Scalar phi() const
phi method
@ e2ts1
2nd max in strips calc by summing 3 strips
Helper class to provide type-safe access to aux data.
Scalar eta() const
pseudorapidity method
@ asy1
uncorr asymmetry in 3 strips in the 1st sampling
@ e235
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x5
float compute_cl_e(const xAOD::CaloCluster &cluster)
float compute_correctedcl_calibHitsShowerDepth(const xAOD::CaloCluster &cl)
@ ecore
core energy in em calo E(core) = E0(3x3) + E1(15x2) + E2(5x5) + E3(3x5)
float compute_ptconv(const xAOD::Photon *ph)
This ptconv is the old one used by MVACalib.
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
float compute_el_trackpt(const xAOD::Electron &el)
float compute_cl_eta(const xAOD::CaloCluster &cluster)
@ f1core
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
float getPtAtFirstMeasurement(const xAOD::TrackParticle *tp)
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
float compute_correctedcl_Es0(const xAOD::CaloCluster &cl)
@ e333
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x3
@ f3
fraction of energy reconstructed in 3rd sampling
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
@ e1152
uncalibrated energy (sum of cells) in strips in a 15x2 window in cells in eta X phi
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
Description of a calorimeter cluster.
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
float compute_pt2conv(const xAOD::Photon *ph)
float compute_calibHitsShowerDepth(const std::array< float, 4 > &cl, float eta)
float compute_el_tracketa(const xAOD::Electron &el)
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
float compute_correctedcl_Es2(const xAOD::CaloCluster &cl)
virtual double eta() const
The pseudorapidity ( ) of the particle.
float compute_correctedcl_f0(const xAOD::CaloCluster &cl)
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
@ pos7
Difference between the track and the shower positions: sum_{i=i_m-7}^{i=i_m+7}E_i x (i-i_m) / sum_{i=...
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
@ poscs2
relative position in eta within cell in 2nd sampling
void initializeClusterFuncs(funcMap_t &funcLibrary, const std::string &prefix, bool useLayerCorrected)
@ e011
uncalibrated energy (sum of cells) in presampler in a 1x1 window in cells in eta X phi
float compute_el_refittedTrack_qoverp(const xAOD::Electron &el)
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
float compute_rawcl_Es1(const xAOD::CaloCluster &cl)
float compute_rawcl_f0(const xAOD::CaloCluster &cl)
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
float compute_cl_etaCalo(const xAOD::CaloCluster &cluster)
std::array< float, 4 > get_MVAradius(float eta)
helper function to compute shower depth
float compute_correctedcl_Eacc(const xAOD::CaloCluster &cl)
@ e377
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
float compute_rawcl_calibHitsShowerDepth(const xAOD::CaloCluster &cl)
@ poscs1
relative position in eta within cell in 1st sampling
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
@ barys1
barycentre in sampling 1 calculated in 3 strips
@ PHICALOFRAME
Phi in the calo frame (for egamma)
float compute_cl_phi(const xAOD::CaloCluster &cluster)
Class describing a Vertex.
void initializeEgammaFuncs(funcMap_t &funcLibrary, const std::string &prefix, bool useLayerCorrected)
@ e255
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 5x5
@ e337
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x7
@ r33over37allcalo
1-ratio of energy in 3x3 over 3x7 cells; E(3x3) = E0(1x1) + E1(3x1) + E2(3x3) + E3(3x3); E(3x7) = E0(...
float compute_pt1conv(const xAOD::Photon *ph)
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
float compute_correctedcl_Es3(const xAOD::CaloCluster &cl)
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
@ widths1
same as egammaParameters::weta1 but without corrections on particle impact point inside the cell
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
@ e132
uncalibrated energy (sum of cells) in strips in a 3x2 window in cells in eta X phi
float compute_correctedcl_Es1(const xAOD::CaloCluster &cl)
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
float compute_rawcl_Es2(const xAOD::CaloCluster &cl)
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
float compute_rawcl_Es3(const xAOD::CaloCluster &cl)
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
@ ETACALOFRAME
Eta in the calo frame (for egamma)
@ widths2
same as egammaParameters::weta2 but without corrections on particle impact point inside the cell
float compute_rawcl_Es0(const xAOD::CaloCluster &cl)
@ e335
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x5
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
@ emaxs1
energy of strip with maximal energy deposit
virtual double e() const
The total energy of the particle.
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
@ pos
difference between shower cell and predicted track in +/- 1 cells
float compute_el_charge(const xAOD::Electron &el)
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...