 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_EGAMMA_EGAMMA_HELPERS_H
9 #define COLUMNAR_EGAMMA_EGAMMA_HELPERS_H
18 namespace EgammaHelpers
29 template<ContainerIdConcept CI = ContainerId::egamma,
typename CM=ColumnarModeDefault>
49 template<ContainerIdConcept CI = ContainerId::egamma,
typename CM=ColumnarModeDefault>
97 return std::make_pair (
false, 0x0);
100 if (vertices.size() == 0)
return std::make_pair (
false, 0x0);
101 if (!vertices[0].has_value())
102 return std::make_pair (
false, 0
x1);
104 unsigned missingLinks = 0x0;
106 auto vertex = vertices[0].value();
107 bool hasTrk1 =
false;
108 bool hasTrk2 =
false;
113 if (tracks.size() > 0) {
114 if (tracks[0].has_value()) {
118 }
else missingLinks |= 0x2;
120 if (tracks.size() > 1) {
121 if (tracks[1].has_value()) {
125 }
else missingLinks |= 0x4;
VertexAccessor< std::vector< OptObjectId< ContainerId::track, CM > >, CM > m_trackParticleLinksAcc
ColumnAccessor< CI, float, CM > m_etaAcc
IsConvertedPhotonAccessor(ColumnarTool< CM > &columnarTool)
bool isConvertedPhoton(const bool excludeTRT, const float eta, const std::size_t nVertices, const ConversionType conversionType)
is the object a converted photon
float operator()(ObjectId< CI, CM > object) const
ConversionType conversionType(const bool hasTrk1, const bool hasTrk2, const std::uint8_t nSiHits1, const std::uint8_t nSiHits2)
return the photon conversion type (see EgammaEnums)
static constexpr bool isXAOD
Whether this is the xAOD mode.
ColumnAccessor< CI, float, CM > m_etaAcc
TrackAccessor< std::uint8_t, CM > m_numberOfSCTHitsAcc
a class representing a single object (electron, muons, etc.)
ColumnAccessor< CI, float, CM > m_ptAcc
Photon_v1 Photon
Definition of the current "egamma version".
std::pair< bool, unsigned > operator()(ObjectId< CI, CM > photon, bool excludeTRT) const
return whether the photon is converted, and a bitmask of missing links
EnergyAccessor(ColumnarTool< CM > &columnarTool)
the raw column accessor template class
ColumnAccessor< CI, RetypeColumn< xAOD::Type::ObjectType, std::uint16_t >, CM > m_objectTypeAcc
void resetAccessor(AccessorTemplate< CI, CT, CAM, CM > &accessor, ColumnarTool< CM > &columnBase, const std::string &name, ColumnInfo &&info={})
reset a column accessor to point to a new column
ColumnAccessor< CI, std::vector< OptObjectId< ContainerId::vertex, CM > >, CM > m_vertexLinksAcc
TrackAccessor< std::uint8_t, CM > m_numberOfPixelHitsAcc