2#include "GaudiKernel/SystemOfUnits.h"
18 return StatusCode::SUCCESS;
27 if( !input.roi )
return false;
28 if( input.photons.empty() )
return false;
30 for (
const auto& ph : input.photons )
51 unsigned PassedCuts=0;
55 PassedCuts = PassedCuts + 1;
57 if ( std::abs( roi->
eta() ) > 2.6 ) {
58 ATH_MSG_DEBUG(
"REJECT The photon had eta coordinates beyond the EM fiducial volume : "
59 << roi->
eta() <<
"; stop the chain now" );
66 double etaRef = roi->
eta();
67 double phiRef = roi->
phi();
69 if ( std::abs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
79 float absEta = std::abs( pClus->eta() );
84 float dEta = pClus->eta() - etaRef;
86 float dPhi = std::abs( pClus->phi() - phiRef );
87 dPhi = ( dPhi <
M_PI ? dPhi : 2*
M_PI - dPhi );
88 float ET = pClus->et();
93 ATH_MSG_DEBUG(
"Photon : " << absEta <<
" outside eta range " );
96 PassedCuts = PassedCuts + 1;
99 if ( cutIndex == -1 ) {
105 PassedCuts = PassedCuts + 1;
109 if ( ET <
m_eTthr[cutIndex] ) {
113 PassedCuts = PassedCuts + 1;
119 ATH_MSG_DEBUG(
"Photon : eta=" << pClus->eta() <<
" roi eta=" << etaRef <<
" DeltaEta=" << dEta
126 PassedCuts = PassedCuts + 1;
129 ATH_MSG_DEBUG(
": phi=" << pClus->phi() <<
" roi phi="<< phiRef <<
" DeltaPhi="<< dPhi
136 PassedCuts = PassedCuts + 1;
140 bool pass = input.isPassed(ph,
m_pidName);
144 float Rhad1(0), Rhad(0), Reta(0), Rphi(0), e277(0), weta2c(0),
145 Eratio(0), DeltaE(0), f1(0), weta1c(0), wtot(0), fracm(0);
146 float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999), reletcone20(999);
256 const float absEta = std::abs(
eta);
257 auto binIterator = std::adjacent_find(
m_etabin.begin(),
m_etabin.end(), [=](
float left,
float right){ return left < absEta and absEta < right; } );
258 if ( binIterator ==
m_etabin.end() ) {
261 return binIterator -
m_etabin.begin();
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual double phi() const override final
Methods to retrieve data members.
virtual double eta() const override final
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
bool showerShapeValue(float &value, const EgammaParameters::ShowerShapeType information) const
Accessor for ShowerShape values.
bool isolationValue(float &value, const Iso::IsolationType information) const
old Accessor for Isolation values.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
The common trigger namespace for trigger analysis tools.
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
@ 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...
@ topoetcone20
Topo-cluster ET-sum.
@ etcone20
Calorimeter isolation.
@ ptcone20
Track isolation.
Photon_v1 Photon
Definition of the current "egamma version".