41 incomingParticleLinks,
42 setIncomingParticleLinks )
46 incomingParticleLinksAcc(
"incomingParticleLinks" );
51 if( ! incomingParticleLinksAcc.isAvailable( *
this ) ) {
57 return incomingParticleLinksAcc( *this ).size();
61 std::vector<const TruthParticle*>
res;
66 std::vector<const TruthParticle*>
res;
73 if( ( ! incomingParticleLinksAcc.isAvailable( *
this ) ) ||
74 ( incomingParticleLinksAcc( *this ).size() <=
index ) ) {
79 const TPLink_t& ipl = incomingParticleLinksAcc( *
this )[
index ];
90 incomingParticleLinksAcc( *this ).push_back( link );
96 incomingParticleLinksAcc( *this ).clear();
101 outgoingParticleLinks,
102 setOutgoingParticleLinks )
106 outgoingParticleLinksAcc(
"outgoingParticleLinks" );
111 if( ! outgoingParticleLinksAcc.isAvailable( *
this ) ) {
117 return outgoingParticleLinksAcc( *this ).size();
123 if( ( ! outgoingParticleLinksAcc.isAvailable( *
this ) ) ||
124 ( outgoingParticleLinksAcc( *this ).size() <=
index ) ) {
129 const TPLink_t& opl = outgoingParticleLinksAcc( *
this )[
index ];
140 outgoingParticleLinksAcc( *this ).push_back( link );
146 outgoingParticleLinksAcc( *this ).clear();
168 return std::sqrt(
x() *
x() +
y() *
y() );
198 return Type::TruthVertex;
204 if( incomingParticleLinksAcc.isAvailableWritable( *
this ) ) {
205 TPLinks_t::iterator itr = incomingParticleLinksAcc( *this ).begin();
206 TPLinks_t::iterator end = incomingParticleLinksAcc( *this ).end();
207 for( ; itr != end; ++itr ) {
213 if( outgoingParticleLinksAcc.isAvailableWritable( *
this ) ) {
214 TPLinks_t::iterator itr = outgoingParticleLinksAcc( *this ).begin();
215 TPLinks_t::iterator end = outgoingParticleLinksAcc( *this ).end();
216 for( ; itr != end; ++itr ) {
#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.
std::pair< std::vector< unsigned int >, bool > res
bool isValid() const
Test to see if the link can be dereferenced.
SG::Accessor< T, ALLOC > Accessor
AuxElement()
Default constructor.
Class describing a truth vertex in the MC record.
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
void addOutgoingParticleLink(const TPLink_t &link)
Add one outgoing particle.
float z() const
Vertex longitudinal distance along the beam line form the origin.
float eta() const
Vertex pseudorapidity.
FourVec_t v4() const
The full 4-vector of the vertex.
float y() const
Vertex y displacement.
void clearIncomingParticleLinks()
Remove all incoming particles.
TruthVertex_v1()
Default constructor.
float phi() const
Vertex azimuthal angle.
Type::ObjectType type() const
The type of the object as a simple enumeration.
ElementLink< TruthParticleContainer > TPLink_t
Type of one truth particle link.
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
float t() const
Vertex time.
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
float perp() const
Vertex transverse distance from the beam line.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourVec_t
Base 4 Momentum type for TruthVector.
size_t nOutgoingParticles() const
Get the number of outgoing particles.
TLorentzVector FourVec_t
The 4-vector type.
size_t nIncomingParticles() const
Get the number of incoming particles.
void toPersistent()
Function making sure that the object is ready for persistification.
float x() const
Vertex x displacement.
std::vector< const TruthParticle * > particles_in() const
Get the incoming particles.
void addIncomingParticleLink(const TPLink_t &link)
Add one incoming particle.
void clearOutgoingParticleLinks()
Remove all outgoing particles.
std::vector< TPLink_t > TPLinks_t
Type used to save the links to incoming and outgoing particles.
GenVecFourVec_t genvecV4() const
The full 4-vector of the particle : GenVector form.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TruthParticle_v1 TruthParticle
Typedef to implementation.
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1