 |
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
◆ cl_getMoment()
Definition at line 143 of file egammaMVAFunctions.h.
147 if (!
cl.retrieveMoment(
m,
tmp)) {
148 throw std::runtime_error(std::string(
"Forward-electron missing moment: ") +
name);
150 return static_cast<float>(
tmp);
◆ compute_calibHitsShowerDepth()
| float egammaMVAFunctions::compute_calibHitsShowerDepth |
( |
const std::array< float, 4 > & |
cl, |
|
|
float |
eta |
|
) |
| |
|
inline |
◆ compute_cellIndex_EMEC()
◆ compute_cellIndex_FCAL()
◆ compute_cl_centerLambda()
◆ 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_fracMax()
◆ compute_cl_lateral()
◆ compute_cl_longitudinal()
◆ 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_cl_secondDensity()
◆ compute_cl_secondLambda()
◆ compute_cl_secondR()
◆ compute_cl_secondR_fudge()
◆ compute_cl_significance()
◆ compute_cl_x()
◆ compute_cl_y()
◆ compute_cl_z()
◆ compute_convtrk1nPixHits()
Definition at line 298 of file egammaMVAFunctions.h.
298 {
return compute_convtrkXhits<0, xAOD::numberOfPixelHits>(ph); }
◆ compute_convtrk1nSCTHits()
Definition at line 300 of file egammaMVAFunctions.h.
300 {
return compute_convtrkXhits<0, xAOD::numberOfSCTHits>(ph); }
◆ compute_convtrk2nPixHits()
Definition at line 299 of file egammaMVAFunctions.h.
299 {
return compute_convtrkXhits<1, xAOD::numberOfPixelHits>(ph); }
◆ compute_convtrk2nSCTHits()
Definition at line 301 of file egammaMVAFunctions.h.
301 {
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_et()
◆ compute_eta_FCAL()
◆ compute_etaMod_EMEC()
◆ compute_etaMod_FCAL()
◆ compute_ph_convFlag()
Definition at line 213 of file egammaMVAFunctions.h.
215 if (original == 3)
return 2;
216 else if (original != 0)
return 1;
217 else return original;
◆ compute_phiMod_EMEC()
Definition at line 191 of file egammaMVAFunctions.h.
193 float phi_mod = std::fmod(
cl.phi(), cz);
194 if (phi_mod < 0) phi_mod += cz;
◆ compute_pt1conv()
◆ compute_pt2conv()
◆ compute_ptconv()
This ptconv is the old one used by MVACalib.
Definition at line 245 of file egammaMVAFunctions.h.
251 if (vx->trackParticle(0))
sum += vx->trackParticle(0)->p4();
252 if (vx->trackParticle(1))
sum += vx->trackParticle(1)->p4();
◆ compute_ptconv_decor()
This ptconv function uses the vertex decorations.
Definition at line 235 of file egammaMVAFunctions.h.
241 return vx ? std::hypot(accPx(*vx), accPy(*vx)) : 0.0;
◆ compute_R12_EMEC()
◆ 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 221 of file egammaMVAFunctions.h.
224 for (
unsigned int i = 0;
i <
tp->numberOfParameters(); ++
i) {
226 return hypot(
tp->parameterPX(
i),
tp->parameterPY(
i));
◆ initializeClusterFuncs()
| void egammaMVAFunctions::initializeClusterFuncs |
( |
funcMap_t & |
funcLibrary, |
|
|
const std::string & |
prefix, |
|
|
bool |
useLayerCorrected |
|
) |
| |
Definition at line 185 of file egammaMVAFunctions.cxx.
214 funcLibrary[
prefix +
"_phiModCalo1"] = funcLibrary[
"phiModCalo1"] =
219 const double pi_divisor = std::abs(
eta) < 1.425 ? 512. : 384.;
222 if (
phi > 0.)
return std::fmod(
phi,
pi / pi_divisor);
223 else return std::fmod((2 *
pi +
phi),
pi / pi_divisor);
225 else return std::fmod((
pi -
phi),
pi / pi_divisor);
235 {
return std::fmod(2.*TMath::Pi()+
compute_cl_phi(*
cl),TMath::Pi()/32.)-TMath::Pi()/64.0; };
237 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;
◆ initializeForwardElectronFuncs()
| std::unique_ptr< funcMap_t > egammaMVAFunctions::initializeForwardElectronFuncs |
( |
bool |
useLayerCorrected | ) |
|
NEW: A function to build the map for forward electrons.
Definition at line 143 of file egammaMVAFunctions.cxx.
144 auto funcLibraryPtr = std::make_unique<funcMap_t>();
145 funcMap_t& funcLibrary = *funcLibraryPtr;
159 if (useLayerCorrected) {
179 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;
@ SECOND_R
Second Moment in .
float compute_el_trackz0(const xAOD::Electron &el)
float compute_cl_secondR_fudge(const xAOD::Egamma &eg)
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...
float compute_cl_centerLambda(const xAOD::CaloCluster &cl)
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
float compute_cl_z(const xAOD::CaloCluster &cl)
@ e2ts1
2nd max in strips calc by summing 3 strips
float compute_phiMod_EMEC(const xAOD::CaloCluster &cl)
@ CENTER_X
Cluster Centroid ( )
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.
Scalar theta() const
theta method
float compute_cl_secondR(const xAOD::CaloCluster &cl)
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
float compute_el_trackpt(const xAOD::Electron &el)
float compute_eta_FCAL(const xAOD::CaloCluster &cl)
float energyBE(const unsigned sample, const std::uint32_t samplingPattern, const std::span< const float > e_sampl)
Get the energy in one layer of the EM Calo.
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 cl_getMoment(const xAOD::CaloCluster &cl, xAOD::CaloCluster::MomentType m, const char *name)
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
float compute_cellIndex_FCAL(const xAOD::CaloCluster &cl)
float getPtAtFirstMeasurement(const xAOD::TrackParticle *tp)
float compute_cl_x(const xAOD::CaloCluster &cl)
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
float compute_cl_secondDensity(const xAOD::CaloCluster &cl)
float compute_correctedcl_Es0(const xAOD::CaloCluster &cl)
@ SECOND_LAMBDA
Second Moment in .
@ e333
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x3
@ CENTER_Z
Cluster Centroid ( )
@ 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
@ SECOND_ENG_DENS
Second Moment in E/V.
@ 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=...
float compute_cl_y(const xAOD::CaloCluster &cl)
@ 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_etaMod_FCAL(const xAOD::CaloCluster &cl)
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_R12_EMEC(const xAOD::CaloCluster &cl)
float compute_cellIndex_EMEC(const xAOD::CaloCluster &cl)
float compute_cl_phi(const xAOD::CaloCluster &cluster)
Class describing a Vertex.
void initializeEgammaFuncs(funcMap_t &funcLibrary, const std::string &prefix, bool useLayerCorrected)
@ SIGNIFICANCE
Cluster significance.
@ 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)
float compute_etaMod_EMEC(const xAOD::CaloCluster &cl)
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
float compute_correctedcl_Es3(const xAOD::CaloCluster &cl)
@ LATERAL
Normalized lateral moment.
@ 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
@ LONGITUDINAL
Normalized longitudinal moment.
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.
@ CENTER_Y
Cluster Centroid ( )
@ 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...