37 return Type::Electron;
54 if(
trackAcc.isAvailable( *
this ) ) {
69 return *( links[
index ] );
83 trackParticleLinks, setTrackParticleLinks )
97 if(!
acc->isAvailable( *
this) ){
101 value = ( *acc )( *this );
107 if(!
acc )
throw std::runtime_error(
"Unknown/Unavailable Track to Calo Match type requested" );
108 return ( *
acc )( *this );
115 if( !
acc )
return false;
117 ( *acc )( *this ) =
value;
122 const std::array<double, 4> &deltaEta,
123 const std::array<double, 4> &
deltaPhi,
124 const std::array<double, 4> &deltaPhiRescaled,
125 const double deltaPhiLast
148 if (!tempTrackParticle)
return false;
149 return tempTrackParticle->
summaryValue(value,information);
155 if (!tempTrackParticle)
return false;
156 return tempTrackParticle->
summaryValue(value,information);
161 if (!tempTrackParticle) {
162 throw std::runtime_error(
"TrackParticle not available" );
165 if(!tempTrackParticle->
summaryValue(value,information)){
166 throw std::runtime_error(
"Unknown/Unavailable Int Track Summary type requested" );
173 if (!tempTrackParticle) {
174 throw std::runtime_error(
"TrackParticle not available" );
177 if(!tempTrackParticle->
summaryValue(value,information)){
178 throw std::runtime_error(
"Unknown/Unavailable Float Track Summary type requested" );
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
void makePrivateStore()
Create a new (empty) private store for this object.
SG::Accessor< T, ALLOC > Accessor
Egamma_v1()
Default constructor.
Egamma_v1 & operator=(const Egamma_v1 &eg)
Assignment Operator. Using the assignment of SG::AuxElement.
bool trackCaloMatchValue(float &value, const EgammaParameters::TrackCaloMatchType information) const
Accessor for Track to Calo Match Values.
std::vector< ElementLink< TrackParticleContainer > > TPELVec_t
Helper type definition.
float trackParticleSummaryFloatValue(const SummaryType information, int index=0) const
Electron_v1 & operator=(const Electron_v1 &el)
Assignment Operator. Ends up using the assignment of AuxElement for the store.
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.
const TPELVec_t & trackParticleLinks() const
Get all the track particles.
bool trackParticleSummaryValue(uint8_t &value, const SummaryType information, int index=0) const
Accessor to the matching track(s) float information (index = 0 is the best match) If 'information' is...
size_t nTrackParticles() const
Return the number xAOD::TrackParticles that match the electron candidate.
bool setTrackCaloMatchValue(const float value, const EgammaParameters::TrackCaloMatchType information)
Set method for Track to Calo Match values.
const ElementLink< TrackParticleContainer > & trackParticleLink(size_t index=0) const
ElementLink to the xAOD::TrackParticle/s that match the electron candidate.
Electron_v1()
Default constructor. No store is attached.
uint8_t trackParticleSummaryIntValue(const SummaryType information, int index=0) const
Accessor to the matching track(s) int information (index = 0 is the best match) Will lead to an excep...
virtual double m() const override final
The invariant mass of the particle.
bool setTrackCaloMatchValues(const std::array< double, 4 > &deltaEta, const std::array< double, 4 > &deltaPhi, const std::array< double, 4 > &deltaPhiRescaled, const double deltaPhiLast)
Convinience wrapper for setTrackCaloMatchValue.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
constexpr double electronMassInMeV
the mass of the electron (in MeV)
@ deltaPhiRescaled0
difference between the cluster phi (presampler) and the eta of the track extrapolated to the presampl...
@ deltaPhi3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
@ deltaPhiFromLastMeasurement
difference between the cluster phi (sampling 2) and the eta of the track extrapolated from the last m...
@ deltaPhiRescaled1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
@ deltaPhi1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
@ deltaPhiRescaled3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
@ deltaEta0
difference between the cluster eta (presampler) and the eta of the track extrapolated to the presampl...
@ deltaPhi0
difference between the cluster phi (presampler) and the eta of the track extrapolated to the presampl...
@ deltaEta3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setStrategy setMatchFlag ElementLink< TrackParticleContainer >
static const SG::AuxElement::Accessor< Vertex_v1::TrackParticleLinks_t > trackAcc("trackParticleLinks")
Accessor for the track links.
const SG::AuxElement::Accessor< float > * trackCaloMatchAccessorV1(xAOD::EgammaParameters::TrackCaloMatchType type)
Helper function for managing Egamma Accessor objects.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
TrackParticle_v1 TrackParticle
Reference the current persistent version:
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
SummaryType
Enumerates the different types of information stored in Summary.