8#ifndef XAODPFLOW_VERSIONS_PFO_V1_H
9#define XAODPFLOW_VERSIONS_PFO_V1_H
14#include "AthLinks/ElementLink.h"
28#include "Math/Vector4D.h"
50 virtual double pt()
const;
52 virtual double eta()
const;
54 virtual double phi()
const;
56 virtual double m()
const;
58 virtual double e()
const;
66 virtual Type::ObjectType
type()
const;
71 typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double> >
GenVecFourMom_t;
92 virtual double ptEM()
const;
94 virtual double etaEM()
const;
96 virtual double phiEM()
const;
98 virtual double mEM()
const;
100 virtual double eEM()
const;
127 template<
class T>
void setAttribute(
const std::string& AttributeType,
const T& anAttribute) ;
129 template<
class T>
bool attribute(
const std::string& AttributeType, T& anAttribute)
const;
std::vector< size_t > vec
An STL vector of pointers that by default owns its pointed-to elements.
#define DATAVECTOR_BASE(T, BASE)
Declare base class info to DataVector.
ElementLink implementation for ROOT usage.
MomentType
Enums to identify different moments.
Class providing the definition of the 4-vector interface.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Class describing a particle flow object.
bool setTrackLink(const ElementLink< xAOD::TrackParticleContainer > &theTrack)
Set a track constituent - does NOT append to existing container.
unsigned int nCaloCluster() const
Find out how many CaloCluster are linked.
virtual double ptEM() const
get EM scale pt
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector version.
bool getAttributeName_FromClusterMoment(xAOD::PFODetails::PFOAttributes &myAttribute, xAOD::CaloCluster::MomentType &momentType) const
Map from cluster moment name onto PFOAttribute name.
bool addClusterLink(const ElementLink< xAOD::CaloClusterContainer > &theCluster)
Add a cluster constituent appends to existing container.
void setAttribute(PFODetails::PFOAttributes AttributeType, const T &anAttribute)
Set a PFO Variable via enum - overwrite is allowed.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector version)
bool getClusterMoment(float &theMoment, xAOD::CaloCluster::MomentType momentType) const
Accessor for cluster moments.
PFO_v1()
Default constructor.
virtual double rapidity() const
The true rapidity (y) of the particle.
bool isCharged() const
is a charged PFO
bool attribute(const std::string &AttributeType, T &anAttribute) const
Get a PFO Variable via string.
bool setAssociatedParticleLinks(PFODetails::PFOParticleType ParticleType, const std::vector< ElementLink< IParticleContainer > > &theParticles)
Set a vector of PFO constituent particle types via enum - overwrite is allowed.
TLorentzVector GetVertexCorrectedFourVec(const xAOD::Vertex &vertexToCorrectTo) const
Correct 4-vector to point at a vertex.
bool setClusterLink(const ElementLink< xAOD::CaloClusterContainer > &theCluster)
Set a cluster constituent - does NOT append to existing container.
float centerMag() const
get CenterMag moment needed for vertex correction
static const int s_floatCompressionFactor
this defines the factor to compress floats by
FourMom_t p4EM() const
get EM scale 4-vector
GenVecFourMom_t genvecP4EM() const
get EM scale 4-vector
virtual double eEM() const
get EM scale energy
bool associatedParticles(PFODetails::PFOParticleType ParticleType, std::vector< const IParticle * > &theParticles) const
get a vector of PFO constituent particle types via enum
void setCenterMag(float CenterMag)
set CenterMag moment needed for vertex correction
bool isJetETMissFloatForCompression(xAOD::PFODetails::PFOAttributes AttributeType) const
Performs a check as to whether a variable should be compressed.
float bdtPi0Score() const
get BDT Score used to classify clusters as Pi0 like or not
void VertexCorrectTheFourVector(const TVector3 &vertexToCorrectTo, TLorentzVector &theFourVector) const
This does the vertex correction of neutral PFO.
void convertLink(ElementLink< IParticleContainer > &IParticleLink, const ElementLink< T > &templateLink)
Convert a generic link to an IParticleLink - perhaps this will go in a dedicated helper tool?
bool getClusterMomentFromPFO(float &theMoment, xAOD::CaloCluster::MomentType momentType) const
Gives access to cluster moments direct from the PFO - getClusterMoment calls this,...
virtual double etaEM() const
get EM scale eta
virtual FourMom_t p4() const
The full 4-momentum of the particle.
void setP4(const FourMom_t &vec)
set the 4-vec
void setBDTPi0Score(float BDTPi0Score)
set BDT Score used to classify clusters as Pi0 like or not
virtual double eta() const
The pseudorapidity ( ) of the particle.
TLorentzVector GetVertexCorrectedEMFourVec(const xAOD::Vertex &vertexToCorrectTo) const
Correct EM scale 4-vector to point at a vertex.
PFO_v1 & operator=(const PFO_v1 &other)=default
bool setAssociatedParticleLink(PFODetails::PFOParticleType ParticleType, const ElementLink< IParticleContainer > &theParticle)
Set an IParticle constituent via enum - does NOT append to existing container.
void toPersistent()
prepare all links for persistification
void setAttribute(const std::string &AttributeType, const T &anAttribute)
Set a PFO Variable via string - overwrite is allowed.
virtual double m() const
The invariant mass of the particle.
void setP4EM(const FourMom_t &p4EM)
set EM scale 4-vector
const xAOD::Vertex * vertex() const
Retrieve a const pointer to the xAOD::Vertex a charged PFO is associated to.
bool addAssociatedParticleLink(PFODetails::PFOParticleType ParticleType, const ElementLink< IParticleContainer > &theParticle)
Add an IParticle constituent via enum - appends to existing container.
virtual double phiEM() const
get EM scale phi
void setCharge(float charge)
set charge of PFO
virtual double e() const
The total energy of the particle.
float charge() const
get charge of PFO
virtual double mEM() const
get EM scale mass
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
bool setVertexLink(const ElementLink< xAOD::VertexContainer > &theVertexLink)
Set a vertex link.
virtual double pt() const
The transverse momentum ( ) of the particle.
const CaloCluster * cluster(unsigned int index) const
Retrieve a const pointer to a CaloCluster.
PFOParticleType
This enum is used to label the associated particles to the PFO object.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
IParticleLink_v1 IParticleLink
Define the latest version of the IParticleLink class.