16 return StatusCode::SUCCESS;
33 return StatusCode::SUCCESS;
41 const float eta = ph.
eta();
42 const float ptGeV = ph.
pt() * 1e-3f;
43 const float ptGeV_capped = std::min(ptGeV, 700.f);
45 float reta = 0.f, rphi = 0.f, weta2 = 0.f, fracs1 = 0.f, weta1 = 0.f, wtots1 = 0.f, rhad = 0.f, rhad1 = 0.f, eratio = 0.f, deltaE = 0.f;
57 vars.push_back(ptGeV_capped);
61 vars.push_back(weta2);
62 vars.push_back(fracs1);
63 vars.push_back(weta1);
64 vars.push_back(wtots1);
66 vars.push_back(rhad1);
67 vars.push_back(eratio);
68 vars.push_back(deltaE);
70 return StatusCode::SUCCESS;
77 const float eta = ph.
eta();
78 const float ptGeV = ph.
pt() * 1e-3f;
79 const float ptGeV_capped = std::min(ptGeV, 700.f);
81 float reta = 0.f, rphi = 0.f, weta2 = 0.f, fracs1 = 0.f, weta1 = 0.f, wtots1 = 0.f, rhad = 0.f, rhad1 = 0.f, eratio = 0.f, deltaE = 0.f;
93 vars.push_back(ptGeV_capped);
97 vars.push_back(weta2);
98 vars.push_back(fracs1);
99 vars.push_back(weta1);
100 vars.push_back(wtots1);
101 vars.push_back(rhad);
102 vars.push_back(rhad1);
103 vars.push_back(eratio);
104 vars.push_back(deltaE);
106 return StatusCode::SUCCESS;
117 decScore(ph) = score;
118 return StatusCode::SUCCESS;
124 score = accScore(ph);
125 return StatusCode::SUCCESS;
127 std::vector<float> vars;
135 return StatusCode::SUCCESS;
141 throw std::invalid_argument(
"PhotonBDTCalculator::evaluate called with nullptr photon");
145 const StatusCode
sc =
getScore(*photon, score);
146 if (
sc.isFailure()) {
148 throw std::runtime_error(
"PhotonBDTCalculator::evaluate failed to compute BDT score");
150 return static_cast<double>(score);
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode getScore(const xAOD::Photon &ph, float &score) const
Return the score (computes if needed if m_forceRecompute is true)
Gaudi::Property< bool > m_excludeTRT
StatusCode fillVariablesConv(const xAOD::Photon &ph, std::vector< float > &vars) const
virtual double evaluate(const xAOD::Photon *photon) const override
virtual ~PhotonBDTCalculator() override
Gaudi::Property< bool > m_forceRecompute
bool isConverted(const xAOD::Photon &ph) const
Gaudi::Property< unsigned > m_reserveVarsConv
StatusCode fillVariablesUnconv(const xAOD::Photon &ph, std::vector< float > &vars) const
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Gaudi::Property< std::string > m_decorationName
ToolHandle< PhotonSingleBDTCalculator > m_toolConv
ToolHandle< PhotonSingleBDTCalculator > m_toolUnconv
StatusCode decorate(const xAOD::Photon &ph) const
Compute and decorate the photon with the BDT score.
Gaudi::Property< unsigned > m_reserveVarsUnconv
PhotonBDTCalculator(const std::string &name)
SG::Decorator< T, ALLOC > Decorator
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool showerShapeValue(float &value, const EgammaParameters::ShowerShapeType information) const
Accessor for ShowerShape values.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Photon_v1 Photon
Definition of the current "egamma version".