ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
TruthParticle Class Referenceabstract

#include <TruthParticle.h>

Inheritance diagram for TruthParticle:
Collaboration diagram for TruthParticle:

Public Types

typedef ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBaseTruthParticleImpl_t
 
typedef std::size_t evtIndex_t
 
typedef TruthParticleNavigation navigable_type
 publish the type of the base class (ie: 'traits-itize' it) More...
 
typedef TruthParticleMomentum momentum_type
 publish the type of the base class (ie: 'traits-itize' it) More...
 
typedef TruthParticleBase particle_type
 publish the type of the base class (ie: 'traits-itize' it) More...
 
typedef ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBaseself_type
 publish the type of the base class (ie: 'traits-itize' it) More...
 
enum  Kind {
  P4EETAPHIM, P4IPTCOTTHPHIM, P4PTETAPHIM, P4PXPYPZE,
  UNKNOWN
}
 

Public Member Functions

 TruthParticle ()
 Default constructor. More...
 
 TruthParticle (const TruthParticle &rhs)
 Copy constructor. More...
 
 TruthParticle (HepMC::ConstGenParticlePtr genParticle, const TruthParticleContainer *container=0)
 Constructor with parameters: construct a TruthParticle from a HepMC::GenParticle and the TruthParticleContainer holding this TruthParticle. More...
 
TruthParticleoperator= (const TruthParticle &rhs)
 Assignment operator. More...
 
 ~TruthParticle ()
 Default constructor: More...
 
HepMC::ConstGenParticlePtr genMother (const std::size_t i=0) const
 Retrieve the GenParticle mother of this TruthParticle. More...
 
HepMC::ConstGenParticlePtr genParticle () const
 Retrieve the GenParticle this TruthParticle has been made from (if any) More...
 
HepMC::ConstGenParticlePtr genChild (const std::size_t i) const
 Retrieve the i-th child (GenParticle) of this TruthParticle. More...
 
const TruthParticlemother (const std::size_t i=0) const
 Retrieve the i-th mother (TruthParticle) of this TruthParticle. More...
 
const TruthParticlechild (const std::size_t i) const
 Retrieve the i-th child (TruthParticle) of this TruthParticle. More...
 
bool hasMother (const int pdgId) const
 Return true if the given PDG::id to match can be found within the parents of this TruthParticle. More...
 
bool hasChild (const int pdgId) const
 Return true if the given PDG::id to match can be found within the children of this TruthParticle. More...
 
bool hasMother (const int pdgId, std::vector< unsigned int > &indices) const
 Return true if the given PDG::id to match can be found within the parents of this TruthParticle. More...
 
bool hasChild (const int pdgId, std::vector< unsigned int > &indices) const
 Return true if the given PDG::id to match can be found within the children of this TruthParticle. More...
 
bool hasEtIsol () const
 Return true if one has filled the Et isolation infos for this TruthParticle. More...
 
double etIsol (const TruthParticleParameters::ConeSize coneIdx) const
 Return the transverse energy in a given cone size of isolation. More...
 
const TruthEtIsolations::EtIsol_tetIsol () const
 Return the transverse energies for all the isolation cones. More...
 
unsigned int nParents () const
 Number of parents of this particle. More...
 
unsigned int nDecay () const
 Number of children of this particle. More...
 
CLHEP::HepLorentzVector transformVector (const HepMC::FourVector &) const
 returns a Pointer to a CLHEP::LorentzVector from a HepMC::FourVector More...
 
CLHEP::HepLorentzVector pDecay (const std::size_t i) const
 Return the 4-vec of i-th child of this particle. More...
 
int pdgDecay (const std::size_t i) const
 Return the PDG-Id of the i-th child of this particle. More...
 
 operator const HepMC::GenParticle & () const
 conversion operator: convert a TruthParticle to its underlying HepMC::GenParticle More...
 
evtIndex_t genEventIndex () const
 
void setCharge (const ChargeType charge)
 Set the charge of this TruthParticle. More...
 
void set4Mom (const HepMC::FourVector &hlv)
 
void setGenEventIndex (size_t index)
 set the GenEvent index More...
 
const navigable_typenavigableBase () const
 access to underlying base type (INavigable-like) More...
 
navigable_typenavigableBase ()
 access to underlying base type (INavigable-like) More...
 
const momentum_typemomentumBase () const
 access to underlying base type (I4Momentum-like) More...
 
momentum_typemomentumBase ()
 access to underlying base type (I4Momentum-like) More...
 
const particle_typeparticleBase () const
 access to underlying base type (IParticle-like) More...
 
particle_typeparticleBase ()
 access to underlying base type (IParticle-like) More...
 
virtual AthenaBarCode_t getAthenaBarCode () const
 
virtual AthenaBarCodeVersion_t getVersion () const
 
virtual double px () const =0
 x component of momentum More...
 
virtual double py () const =0
 y component of momentum More...
 
virtual double pz () const =0
 z component of momentum More...
 
virtual double m () const =0
 mass More...
 
virtual double m2 () const =0
 mass squared More...
 
virtual double p () const =0
 momentum magnitude More...
 
virtual double p2 () const =0
 square of momentum magnitude More...
 
virtual double rapidity () const =0
 rapidity More...
 
virtual double eta () const =0
 pseudo rapidity More...
 
virtual double phi () const =0
 phi in [-pi,pi[ More...
 
virtual double e () const =0
 energy More...
 
virtual double et () const =0
 transverse energy defined to be e*sin(theta) More...
 
virtual double pt () const =0
 transverse momentum More...
 
virtual double iPt () const =0
 inverse of transverse momentum More...
 
virtual double cosPhi () const =0
 cosinus phi More...
 
virtual double sinPhi () const =0
 sinus phi More...
 
virtual double tanTh () const =0
 tan theta More...
 
virtual double cosTh () const =0
 cosinus theta More...
 
virtual double sinTh () const =0
 sinus theta More...
 
virtual double cotTh () const =0
 cottan theta More...
 
virtual CLHEP::HepLorentzVector hlv () const =0
 CLHEP HepLorentzVector. More...
 
virtual const I4MomentumErrorerrors () const =0
 Access to errors, if available; returns 0 if no errors. More...
 
virtual Kind kind () const =0
 tells what kind of P4XYZT this is More...
 
virtual ParticleDataType::DataType dataType () const =0
 Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}
More...
 
virtual const Trk::RecVertexorigin () const =0
 Return a RecVertex corresponding to particle Origin
More...
 
virtual const ElementLink< VxContainer > & originLink () const =0
 Return an ElementLink corresponding to particle's Origin. More...
 
virtual bool hasCharge () const =0
 method to check if charge information is available More...
 
virtual ChargeType charge () const =0
 returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface
More...
 
virtual bool hasPdgId () const =0
 method to check if particle id information is available More...
 
virtual int pdgId () const =0
 Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h
More...
 
virtual void set4Mom (const I4Momentum &p4)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
virtual void set4Mom (const I4Momentum *const p4)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
virtual void set4Mom (const CLHEP::HepLorentzVector &hlv)
 set 4Momentum (will throw exception if cannot be implemented) More...
 
virtual void set_dataType (ParticleDataType::DataType x)
 
virtual void set_charge (ChargeType x)
 
virtual void set_pdgId (int x)
 
virtual void set_origin (const VxContainer *theContainer, int index)
 
virtual void set_origin (const VxContainer *theContainer, const Trk::VxCandidate *vertex)
 
void set_origin (const ElementLink< VxContainer > &origin)
 
virtual void fillToken (INavigationToken &thisToken) const
 
virtual void fillToken (INavigationToken &thisToken, const std::any &weight) const
 
AthenaBarCode_t getAthenaBarCode () const
 
void setAthenaBarCode (AthenaBarCode_t)
 
bool hasSameAthenaBarCode (const IAthenaBarCode &) const
 
bool hasSameAthenaBarCodeExceptVersion (const IAthenaBarCode &) const
 
AthenaBarCodeVersion_t getVersion () const
 
void newVersion ()
 
void setVersion (AthenaBarCodeVersion_t newversion)
 
virtual double px () const
 x component of momentum More...
 
virtual double py () const
 y component of momentum More...
 
virtual double pz () const
 z component of momentum More...
 
virtual double m () const
 mass More...
 
virtual double m2 () const
 mass squared More...
 
virtual double p () const
 mass momentum magnitude More...
 
virtual double p2 () const
 square of momentum magnitude More...
 
virtual double rapidity () const
 rapidity More...
 
virtual double eta () const
 pseudo rapidity More...
 
virtual double phi () const
 phi in [-pi,pi[ More...
 
virtual double e () const
 energy More...
 
virtual double et () const
 transverse energy defined to be e*sin(theta) More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double iPt () const
 inverse of transverse momentum More...
 
virtual double cosPhi () const
 cosinus phi More...
 
virtual double sinPhi () const
 sinus phi More...
 
virtual double tanTh () const
 tan theta More...
 
virtual double cosTh () const
 cosinus theta More...
 
virtual double sinTh () const
 sinus theta More...
 
virtual double cotTh () const
 cottan theta More...
 
virtual CLHEP::HepLorentzVector hlv () const
 CLHEP HepLorentzVector. More...
 
virtual const I4MomentumErrorerrors () const
 Access to errors, if available; returns 0 if no errors. More...
 
virtual I4Momentum::Kind kind () const
 add Kind which tells what kind (P4XYZ) the underlying implementation has More...
 
virtual std::ostream & dump (std::ostream &out) const
 Print I4Momentum content. More...
 
virtual ParticleDataType::DataType dataType () const
 Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}
More...
 
virtual const Trk::RecVertexorigin () const
 Return a RecVertex corresponding to particle Origin
More...
 
virtual const ElementLink< VxContainer > & originLink () const
 Return an ElementLink corresponding to particle's Origin. More...
 
virtual bool hasCharge () const
 method to check if charge information is available More...
 
virtual ChargeType charge () const
 returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface
More...
 
virtual bool hasPdgId () const
 method to check if particle id information is available More...
 
virtual int pdgId () const
 Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h
More...
 
int status () const
 Forwards the HepMC::GenParticle::status() information. More...
 
const HepMC::Flow flow () const
 Forwards the HepMC::GenParticle::flow() information. More...
 
int flow (int code_index) const
 Forwards the HepMC::GenParticle::flow(idx) information. More...
 
const HepMC::Polarization polarization () const
 Forwards the HepMC::GenParticle::polarization() information. More...
 
int barcode () const
 Forwards the HepMC::GenParticle::barcode() information. More...
 
long compressedExtBarCode () const
 Forwards the HepMC::GenParticle::barcode() information. More...
 
virtual void fillToken (INavigationToken &thisToken) const
 
virtual void fillToken (INavigationToken &thisToken, const std::any &weight) const
 
AthenaBarCode_t getAthenaBarCode () const
 
void setAthenaBarCode (AthenaBarCode_t)
 
bool hasSameAthenaBarCode (const IAthenaBarCode &) const
 
bool hasSameAthenaBarCodeExceptVersion (const IAthenaBarCode &) const
 
AthenaBarCodeVersion_t getVersion () const
 
void newVersion ()
 
void setVersion (AthenaBarCodeVersion_t newversion)
 
virtual double px () const
 x component of momentum More...
 
virtual double py () const
 y component of momentum More...
 
virtual double pz () const
 z component of momentum More...
 
virtual double m () const
 mass More...
 
virtual double m2 () const
 mass squared More...
 
virtual double p () const
 mass momentum magnitude More...
 
virtual double p2 () const
 square of momentum magnitude More...
 
virtual double rapidity () const
 rapidity More...
 
virtual double eta () const
 pseudo rapidity More...
 
virtual double phi () const
 phi in [-pi,pi[ More...
 
virtual double e () const
 energy More...
 
virtual double et () const
 transverse energy defined to be e*sin(theta) More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double iPt () const
 inverse of transverse momentum More...
 
virtual double cosPhi () const
 cosinus phi More...
 
virtual double sinPhi () const
 sinus phi More...
 
virtual double tanTh () const
 tan theta More...
 
virtual double cosTh () const
 cosinus theta More...
 
virtual double sinTh () const
 sinus theta More...
 
virtual double cotTh () const
 cottan theta More...
 
virtual CLHEP::HepLorentzVector hlv () const
 CLHEP HepLorentzVector. More...
 
virtual const I4MomentumErrorerrors () const
 Access to errors, if available; returns 0 if no errors. More...
 
virtual I4Momentum::Kind kind () const
 add Kind which tells what kind (P4XYZ) the underlying implementation has More...
 
virtual std::ostream & dump (std::ostream &out) const
 Print I4Momentum content. More...
 
virtual ParticleDataType::DataType dataType () const
 Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}
More...
 
virtual const Trk::RecVertexorigin () const
 Return a RecVertex corresponding to particle Origin
More...
 
virtual const ElementLink< VxContainer > & originLink () const
 Return an ElementLink corresponding to particle's Origin. More...
 
virtual bool hasCharge () const
 method to check if charge information is available More...
 
virtual ChargeType charge () const
 returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface
More...
 
virtual bool hasPdgId () const
 method to check if particle id information is available More...
 
virtual int pdgId () const
 Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h
More...
 

Static Public Attributes

static const AthenaBarCode_t UNDEFINEDBARCODE = (AthenaBarCode_t)(-1)
 
static const AthenaBarCode_t UNDEFINEDVERSION = UNDEFINEDBARCODE
 

Protected Member Functions

void setGenParticle (HepMC::ConstGenParticlePtr particle)
 Fill the data members of ParticleBase from the GenParticle. More...
 

Protected Attributes

const TruthParticleContainerm_container
 Pointer to the collection holding ourself. More...
 
std::vector< int > m_mothers
 vector of barcodes of all the mothers of this particle. More...
 
std::vector< int > m_children
 vector of barcodes of all the children of this particle. More...
 
evtIndex_t m_nGenEventIdx
 the index of the GenEvent this particle is in More...
 

Private Attributes

TruthParticleNavigation m_nav
 The navigable part. More...
 
TruthParticleMomentum m_mom
 The 4-momentum part. More...
 
TruthParticleBase m_part
 The particle-id part. More...
 

Detailed Description

(HepMC) Monte Carlo particle.

Adds isolation information. Adapts the HepMC::GenParticle to the IParticle interface.

Definition at line 53 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

Member Typedef Documentation

◆ evtIndex_t

typedef std::size_t TruthParticle::evtIndex_t

◆ momentum_type

publish the type of the base class (ie: 'traits-itize' it)

Definition at line 52 of file ParticleImpl.h.

◆ navigable_type

publish the type of the base class (ie: 'traits-itize' it)

Definition at line 48 of file ParticleImpl.h.

◆ particle_type

publish the type of the base class (ie: 'traits-itize' it)

Definition at line 56 of file ParticleImpl.h.

◆ self_type

publish the type of the base class (ie: 'traits-itize' it)

Definition at line 62 of file ParticleImpl.h.

◆ TruthParticleImpl_t

Member Enumeration Documentation

◆ Kind

enum I4Momentum::Kind
inherited
Enumerator
P4EETAPHIM 
P4IPTCOTTHPHIM 
P4PTETAPHIM 
P4PXPYPZE 
UNKNOWN 

Definition at line 33 of file I4Momentum.h.

Constructor & Destructor Documentation

◆ TruthParticle() [1/3]

TruthParticle::TruthParticle ( )

Default constructor.

Definition at line 33 of file TruthParticle.cxx.

33  :
34  INavigable ( ),
35  I4Momentum ( ),
38  m_container ( 0 ),
39  m_mothers ( 0 ),
40  m_children ( 0 ),
41  m_nGenEventIdx ( 0 )
42 {}

◆ TruthParticle() [2/3]

TruthParticle::TruthParticle ( const TruthParticle rhs)

Copy constructor.

Definition at line 44 of file TruthParticle.cxx.

44  :
45  IAthenaBarCode ( rhs ),
46  INavigable ( rhs ),
47  I4Momentum ( rhs ),
48  INavigable4Momentum ( rhs ),
49  TruthParticleImpl_t ( rhs ),
50  m_container ( rhs.m_container ),
51  m_mothers ( rhs.m_mothers ),
52  m_children ( rhs.m_children ),
54 {}

◆ TruthParticle() [3/3]

TruthParticle::TruthParticle ( HepMC::ConstGenParticlePtr  genParticle,
const TruthParticleContainer container = 0 
)

Constructor with parameters: construct a TruthParticle from a HepMC::GenParticle and the TruthParticleContainer holding this TruthParticle.

Definition at line 56 of file TruthParticle.cxx.

57  :
58  INavigable ( ),
59  I4Momentum ( ),
62  m_container ( container ),
63  m_mothers ( 0 ),
64  m_children ( 0 ),
65  m_nGenEventIdx ( 0 )
66 {
68  m_nGenEventIdx = container ? container->genEventIdx() : 0;
69 }

◆ ~TruthParticle()

TruthParticle::~TruthParticle ( )
inline

Member Function Documentation

◆ barcode()

int TruthParticle::barcode ( ) const
inline

Forwards the HepMC::GenParticle::barcode() information.

Definition at line 304 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

305 {
306  return HepMC::barcode(genParticle());
307 }

◆ charge() [1/2]

returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface

Definition at line 248 of file ParticleImpl.h.

719 {
720  return m_part.charge();
721 }

◆ charge() [2/2]

virtual ChargeType IParticle::charge ( ) const
pure virtualinherited

returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface

Implemented in ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, Analysis::ParticleShallowClone, and ParticleBase.

◆ child()

const TruthParticle * TruthParticle::child ( const std::size_t  i) const

Retrieve the i-th child (TruthParticle) of this TruthParticle.

Definition at line 98 of file TruthParticle.cxx.

99 {
100  if ( m_children.empty() ||
101  i >= m_children.size() ||
102  nullptr == m_container ) return nullptr;
104 }

◆ compressedExtBarCode()

long TruthParticle::compressedExtBarCode ( ) const
inline

Forwards the HepMC::GenParticle::barcode() information.

Definition at line 138 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

138 { return 0; };

◆ cosPhi() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::cosPhi
inlinevirtualinherited

cosinus phi

Definition at line 188 of file ParticleImpl.h.

575 {
576  return m_mom.cosPhi();
577 }

◆ cosPhi() [2/2]

virtual double I4Momentum::cosPhi ( ) const
pure virtualinherited

◆ cosTh() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::cosTh
inlinevirtualinherited

cosinus theta

Definition at line 200 of file ParticleImpl.h.

605 {
606  return m_mom.cosTh();
607 }

◆ cosTh() [2/2]

virtual double I4Momentum::cosTh ( ) const
pure virtualinherited

◆ cotTh() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::cotTh
inlinevirtualinherited

cottan theta

Definition at line 208 of file ParticleImpl.h.

625 {
626  return m_mom.cotTh();
627 }

◆ cotTh() [2/2]

virtual double I4Momentum::cotTh ( ) const
pure virtualinherited

◆ dataType() [1/2]

Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}

IParticle interface forwarding

Definition at line 230 of file ParticleImpl.h.

679 {
680  return m_part.dataType();
681 }

◆ dataType() [2/2]

virtual ParticleDataType::DataType IParticle::dataType ( ) const
pure virtualinherited

Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}

Implemented in ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, Analysis::ParticleShallowClone, and ParticleBase.

◆ dump()

std::ostream & ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::dump ( std::ostream &  out) const
inlinevirtualinherited

Print I4Momentum content.

Implements I4Momentum.

Definition at line 221 of file ParticleImpl.h.

666 {
667  m_mom.dump ( out );
668  out << "\n";
669  m_part.dump( out );
670  return out;
671 }

◆ e() [1/2]

energy

Definition at line 172 of file ParticleImpl.h.

535 {
536  return m_mom.e();
537 }

◆ e() [2/2]

virtual double I4Momentum::e ( ) const
pure virtualinherited

◆ errors() [1/2]

Access to errors, if available; returns 0 if no errors.

Definition at line 214 of file ParticleImpl.h.

646 {
647  return m_mom.errors();
648 }

◆ errors() [2/2]

virtual const I4MomentumError* I4Momentum::errors ( ) const
pure virtualinherited

◆ et() [1/2]

transverse energy defined to be e*sin(theta)

Definition at line 176 of file ParticleImpl.h.

545 {
546  return m_mom.et();
547 }

◆ et() [2/2]

virtual double I4Momentum::et ( ) const
pure virtualinherited

◆ eta() [1/2]

pseudo rapidity

Definition at line 164 of file ParticleImpl.h.

515 {
516  return m_mom.eta();
517 }

◆ eta() [2/2]

virtual double I4Momentum::eta ( ) const
pure virtualinherited

◆ etIsol() [1/2]

const TruthEtIsolations::EtIsol_t * TruthParticle::etIsol ( ) const

Return the transverse energies for all the isolation cones.

Definition at line 188 of file TruthParticle.cxx.

189 {
190  return m_container->etIsolations( barcode() );
191 }

◆ etIsol() [2/2]

double TruthParticle::etIsol ( const TruthParticleParameters::ConeSize  coneIdx) const

Return the transverse energy in a given cone size of isolation.

Note that the size of the code must be one of the encoded sizes (see TruthParticleParamDefs.h file) and that the index is checked for out of bounds.

Definition at line 194 of file TruthParticle.cxx.

195 {
196  if ( coneIdx >= 0 && // just to be sure... as it is a signed integer...
198  return m_container->etIsol( barcode(), coneIdx );
199  } else {
200  std::string error = "WRONG index for TruthParticle::etIsol(coneIdx)";
201  throw std::out_of_range(error);
202  }
203 }

◆ fillToken() [1/2]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::fillToken ( INavigationToken thisToken) const
inlinevirtualinherited

INavigable interface forwarding

Implements INavigable.

Definition at line 104 of file ParticleImpl.h.

414 {
415  m_nav.fillToken( thisToken );
416 }

◆ fillToken() [2/2]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::fillToken ( INavigationToken thisToken,
const std::any &  weight 
) const
inlinevirtualinherited

Implements INavigable.

Definition at line 106 of file ParticleImpl.h.

425 {
426  m_nav.fillToken( thisToken, weight );
427 }

◆ flow() [1/2]

const HepMC::Flow TruthParticle::flow ( ) const
inline

Forwards the HepMC::GenParticle::flow() information.

Definition at line 289 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

290 {
291  return HepMC::flow(genParticle());
292 }

◆ flow() [2/2]

int TruthParticle::flow ( int  code_index) const
inline

Forwards the HepMC::GenParticle::flow(idx) information.

Definition at line 294 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

295 {
296  return HepMC::flow(genParticle(),code_index);
297 }

◆ genChild()

HepMC::ConstGenParticlePtr TruthParticle::genChild ( const std::size_t  i) const

Retrieve the i-th child (GenParticle) of this TruthParticle.

Definition at line 118 of file TruthParticle.cxx.

119 {
120  if ( i < m_children.size() ) {
121  auto child = this->child(i);
122  return child ? child->genParticle() : nullptr;
123  } else {
124  std::string error = "WRONG index for TruthParticle::genChild(index)";
125  throw std::out_of_range(error);
126  }
127 }

◆ genEventIndex()

evtIndex_t TruthParticle::genEventIndex ( ) const
inline

◆ genMother()

HepMC::ConstGenParticlePtr TruthParticle::genMother ( const std::size_t  i = 0) const

Retrieve the GenParticle mother of this TruthParticle.

Definition at line 107 of file TruthParticle.cxx.

108 {
109  if ( i < m_mothers.size() ) {
110  auto mother = this->mother(i);
111  return mother ? mother->genParticle() : nullptr;
112  } else {
113  std::string error = "WRONG index for TruthParticle::genMother(index)";
114  throw std::out_of_range(error);
115  }
116 }

◆ genParticle()

HepMC::ConstGenParticlePtr TruthParticle::genParticle ( ) const
inline

Retrieve the GenParticle this TruthParticle has been made from (if any)

Definition at line 279 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

280 {
281  return this->particleBase().genParticle();
282 }

◆ getAthenaBarCode() [1/2]

virtual AthenaBarCode_t IAthenaBarCode::getAthenaBarCode ( ) const
inlinevirtualinherited

◆ getAthenaBarCode() [2/2]

IAthenaBarCode interface forwarding

Definition at line 114 of file ParticleImpl.h.

754 {
756 }

◆ getVersion() [1/2]

virtual AthenaBarCodeVersion_t IAthenaBarCode::getVersion ( ) const
inlinevirtualinherited

◆ getVersion() [2/2]

Definition at line 119 of file ParticleImpl.h.

795 {
797 }

◆ hasCharge() [1/2]

bool ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::hasCharge
inlinevirtualinherited

method to check if charge information is available

Definition at line 242 of file ParticleImpl.h.

709 {
710  return m_part.hasCharge();
711 }

◆ hasCharge() [2/2]

virtual bool IParticle::hasCharge ( ) const
pure virtualinherited

◆ hasChild() [1/2]

bool TruthParticle::hasChild ( const int  pdgId) const

Return true if the given PDG::id to match can be found within the children of this TruthParticle.

Definition at line 141 of file TruthParticle.cxx.

142 {
143  const std::size_t nChildren = m_children.size();
144  for ( std::size_t iChild = 0; iChild != nChildren; ++iChild ) {
145  auto child = this->child(iChild);
146  if ( child && ( pdgId == child->pdgId() ) ) {
147  return true;
148  }
149  }
150  return false;
151 }

◆ hasChild() [2/2]

bool TruthParticle::hasChild ( const int  pdgId,
std::vector< unsigned int > &  indices 
) const

Return true if the given PDG::id to match can be found within the children of this TruthParticle.

It also fills the given vector with the indices toward the matching particles.

Definition at line 168 of file TruthParticle.cxx.

170 {
171  bool found = false;
172  const std::size_t nChildren = m_children.size();
173  for ( std::size_t iChild = 0; iChild != nChildren; ++iChild ) {
174  auto child = this->child(iChild);
175  if ( child && ( pdgId == child->pdgId() ) ) {
176  found = true;
177  indices.push_back(iChild);
178  }
179  }
180  return found;
181 }

◆ hasEtIsol()

bool TruthParticle::hasEtIsol ( ) const

Return true if one has filled the Et isolation infos for this TruthParticle.

Definition at line 183 of file TruthParticle.cxx.

184 {
185  return m_container->hasEtIsol( barcode() );
186 }

◆ hasMother() [1/2]

bool TruthParticle::hasMother ( const int  pdgId) const

Return true if the given PDG::id to match can be found within the parents of this TruthParticle.

Definition at line 129 of file TruthParticle.cxx.

130 {
131  const std::size_t nMothers = m_mothers.size();
132  for ( std::size_t iMother = 0; iMother != nMothers; ++iMother ) {
133  auto mother = this->mother(iMother);
134  if ( mother && ( pdgId == mother->pdgId() ) ) {
135  return true;
136  }
137  }
138  return false;
139 }

◆ hasMother() [2/2]

bool TruthParticle::hasMother ( const int  pdgId,
std::vector< unsigned int > &  indices 
) const

Return true if the given PDG::id to match can be found within the parents of this TruthParticle.

It also fills the given vector with the indices toward the matching particles.

Definition at line 153 of file TruthParticle.cxx.

155 {
156  bool found = false;
157  const std::size_t nMothers = m_mothers.size();
158  for ( std::size_t iMother = 0; iMother != nMothers; ++iMother ) {
159  auto mother = this->mother(iMother);
160  if ( mother && ( pdgId == mother->pdgId() ) ) {
161  found = true;
162  indices.push_back(iMother);
163  }
164  }
165  return found;
166 }

◆ hasPdgId() [1/2]

bool ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::hasPdgId
inlinevirtualinherited

method to check if particle id information is available

Definition at line 252 of file ParticleImpl.h.

729 {
730  return m_part.hasPdgId();
731 }

◆ hasPdgId() [2/2]

virtual bool IParticle::hasPdgId ( ) const
pure virtualinherited

◆ hasSameAthenaBarCode()

bool ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::hasSameAthenaBarCode ( const IAthenaBarCode bc) const
inlinevirtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 117 of file ParticleImpl.h.

775 {
777 }

◆ hasSameAthenaBarCodeExceptVersion()

bool ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::hasSameAthenaBarCodeExceptVersion ( const IAthenaBarCode bc) const
inlinevirtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 118 of file ParticleImpl.h.

◆ hlv() [1/2]

CLHEP::HepLorentzVector ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::hlv
inlinevirtualinherited

CLHEP HepLorentzVector.

Definition at line 212 of file ParticleImpl.h.

636 {
637  return m_mom.hlv();
638 }

◆ hlv() [2/2]

virtual CLHEP::HepLorentzVector I4Momentum::hlv ( ) const
pure virtualinherited

◆ iPt() [1/2]

inverse of transverse momentum

Definition at line 184 of file ParticleImpl.h.

565 {
566  return m_mom.iPt();
567 }

◆ iPt() [2/2]

virtual double I4Momentum::iPt ( ) const
pure virtualinherited

◆ kind() [1/2]

add Kind which tells what kind (P4XYZ) the underlying implementation has

Definition at line 217 of file ParticleImpl.h.

656 {
657  return m_mom.kind();
658 }

◆ kind() [2/2]

virtual Kind I4Momentum::kind ( ) const
pure virtualinherited

◆ m() [1/2]

mass

Definition at line 144 of file ParticleImpl.h.

465 {
466  return m_mom.m();
467 }

◆ m() [2/2]

virtual double I4Momentum::m ( ) const
pure virtualinherited

◆ m2() [1/2]

mass squared

Definition at line 148 of file ParticleImpl.h.

475 {
476  return m_mom.m2();
477 }

◆ m2() [2/2]

virtual double I4Momentum::m2 ( ) const
pure virtualinherited

◆ momentumBase() [1/2]

access to underlying base type (I4Momentum-like)

Definition at line 272 of file ParticleImpl.h.

853 {
854  return m_mom;
855 }

◆ momentumBase() [2/2]

access to underlying base type (I4Momentum-like)

Definition at line 95 of file ParticleImpl.h.

394 {
395  return m_mom;
396 }

◆ mother()

const TruthParticle * TruthParticle::mother ( const std::size_t  i = 0) const

Retrieve the i-th mother (TruthParticle) of this TruthParticle.

Definition at line 90 of file TruthParticle.cxx.

91 {
92  if ( m_mothers.empty() ||
93  i >= m_mothers.size() ||
94  nullptr == m_container ) return nullptr;
96 }

◆ navigableBase() [1/2]

access to underlying base type (INavigable-like)

Definition at line 268 of file ParticleImpl.h.

843 {
844  return m_nav;
845 }

◆ navigableBase() [2/2]

access to underlying base type (INavigable-like)

Definition at line 91 of file ParticleImpl.h.

384 {
385  return m_nav;
386 }

◆ nDecay()

unsigned int TruthParticle::nDecay ( ) const
inline

Number of children of this particle.

Definition at line 312 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

313 { return m_children.size(); }

◆ newVersion()

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::newVersion
inlinevirtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 120 of file ParticleImpl.h.

805 {
807 }

◆ nParents()

unsigned int TruthParticle::nParents ( ) const
inline

Number of parents of this particle.

Definition at line 309 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

310 { return m_mothers.size(); }

◆ operator const HepMC::GenParticle &()

TruthParticle::operator const HepMC::GenParticle & ( ) const
inline

conversion operator: convert a TruthParticle to its underlying HepMC::GenParticle

Definition at line 321 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

322 {
323  return *genParticle();
324 }

◆ operator=()

TruthParticle & TruthParticle::operator= ( const TruthParticle rhs)

Assignment operator.

Definition at line 71 of file TruthParticle.cxx.

72 {
73  if ( this != &rhs ) {
74  INavigable::operator=(rhs);
75  I4Momentum::operator=(rhs);
76  INavigable4Momentum::operator=(rhs);
79  m_mothers = rhs.m_mothers;
80  m_children = rhs.m_children;
82  }
83  return *this;
84 }

◆ origin() [1/2]

Return a RecVertex corresponding to particle Origin

Definition at line 234 of file ParticleImpl.h.

689 {
690  return m_part.origin();
691 }

◆ origin() [2/2]

virtual const Trk::RecVertex* IParticle::origin ( ) const
pure virtualinherited

◆ originLink() [1/2]

Return an ElementLink corresponding to particle's Origin.

Definition at line 238 of file ParticleImpl.h.

699 {
700  return m_part.originLink();
701 }

◆ originLink() [2/2]

virtual const ElementLink<VxContainer>& IParticle::originLink ( ) const
pure virtualinherited

◆ p() [1/2]

mass momentum magnitude

Definition at line 152 of file ParticleImpl.h.

485 {
486  return m_mom.p();
487 }

◆ p() [2/2]

virtual double I4Momentum::p ( ) const
pure virtualinherited

◆ p2() [1/2]

square of momentum magnitude

Definition at line 156 of file ParticleImpl.h.

495 {
496  return m_mom.p2();
497 }

◆ p2() [2/2]

virtual double I4Momentum::p2 ( ) const
pure virtualinherited

◆ particleBase() [1/2]

access to underlying base type (IParticle-like)

Definition at line 276 of file ParticleImpl.h.

863 {
864  return m_part;
865 }

◆ particleBase() [2/2]

access to underlying base type (IParticle-like)

Definition at line 99 of file ParticleImpl.h.

404 {
405  return m_part;
406 }

◆ pDecay()

CLHEP::HepLorentzVector TruthParticle::pDecay ( const std::size_t  i) const

Return the 4-vec of i-th child of this particle.

Definition at line 205 of file TruthParticle.cxx.

206 {
207  if ( i < m_children.size() ) {
208  auto child = this->child(i);
209  if ( child ) {
210  return child->hlv();
211  } else {
212  const std::string error = "Caught INVALID pointer to child in TruthParticle::pDecay call!";
213  throw std::out_of_range(error);
214  }
215  } else {
216  std::string error = "Caught INVALID pointer to child in TruthParticle::pDecay call!";
217  throw std::out_of_range(error);
218  }
219 }

◆ pdgDecay()

int TruthParticle::pdgDecay ( const std::size_t  i) const

Return the PDG-Id of the i-th child of this particle.

Definition at line 221 of file TruthParticle.cxx.

222 {
223  if ( i < m_children.size() ) {
224  auto child = this->child(i);
225  if ( child ) {
226  return child->pdgId();
227  } else {
228  const std::string error = "Caught INVALID pointer to child in TruthParticle::pdgDecay call!";
229  throw std::out_of_range(error);
230  }
231  } else {
232  const std::string error = "Caught INVALID pointer to child in TruthParticle::pdgDecay call!";
233  throw std::out_of_range(error);
234  }
235 }

◆ pdgId() [1/2]

Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h

Definition at line 257 of file ParticleImpl.h.

739 {
740  return m_part.pdgId();
741 }

◆ pdgId() [2/2]

virtual int IParticle::pdgId ( ) const
pure virtualinherited

Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h

Implemented in ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, Analysis::ParticleShallowClone, and ParticleBase.

◆ phi() [1/2]

phi in [-pi,pi[

Definition at line 168 of file ParticleImpl.h.

525 {
526  return m_mom.phi();
527 }

◆ phi() [2/2]

virtual double I4Momentum::phi ( ) const
pure virtualinherited

◆ polarization()

const HepMC::Polarization TruthParticle::polarization ( ) const
inline

◆ pt() [1/2]

transverse momentum

Definition at line 180 of file ParticleImpl.h.

555 {
556  return m_mom.pt();
557 }

◆ pt() [2/2]

virtual double I4Momentum::pt ( ) const
pure virtualinherited

◆ px() [1/2]

x component of momentum

I4Momentum interface forwarding

Definition at line 132 of file ParticleImpl.h.

435 {
436  return m_mom.px();
437 }

◆ px() [2/2]

virtual double I4Momentum::px ( ) const
pure virtualinherited

◆ py() [1/2]

y component of momentum

Definition at line 136 of file ParticleImpl.h.

445 {
446  return m_mom.py();
447 }

◆ py() [2/2]

virtual double I4Momentum::py ( ) const
pure virtualinherited

◆ pz() [1/2]

z component of momentum

Definition at line 140 of file ParticleImpl.h.

455 {
456  return m_mom.pz();
457 }

◆ pz() [2/2]

virtual double I4Momentum::pz ( ) const
pure virtualinherited

◆ rapidity() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::rapidity
inlinevirtualinherited

rapidity

Definition at line 160 of file ParticleImpl.h.

505 {
506  return m_mom.rapidity();
507 }

◆ rapidity() [2/2]

virtual double I4Momentum::rapidity ( ) const
pure virtualinherited

◆ set4Mom() [1/4]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set4Mom ( const CLHEP::HepLorentzVector &  hlv)
inlinevirtualinherited

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 285 of file ParticleImpl.h.

897 {
898  return m_mom.set4Mom( hlv );
899 }

◆ set4Mom() [2/4]

void TruthParticle::set4Mom ( const HepMC::FourVector &  hlv)
inline

◆ set4Mom() [3/4]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set4Mom ( const I4Momentum p4)
inlinevirtualinherited

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 281 of file ParticleImpl.h.

876 {
877  return m_mom.set4Mom( p4 );
878 }

◆ set4Mom() [4/4]

set 4Momentum (will throw exception if cannot be implemented)

Implements I4Momentum.

Definition at line 283 of file ParticleImpl.h.

886 {
887  return m_mom.set4Mom( p4 );
888 }

◆ set_charge()

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set_charge ( ChargeType  x)
inlinevirtualinherited

Definition at line 291 of file ParticleImpl.h.

917 {
919 }

◆ set_dataType()

Definition at line 289 of file ParticleImpl.h.

907 {
909 }

◆ set_origin() [1/3]

Definition at line 299 of file ParticleImpl.h.

959 {
961 }

◆ set_origin() [2/3]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set_origin ( const VxContainer theContainer,
const Trk::VxCandidate vertex 
)
inlinevirtualinherited

Definition at line 297 of file ParticleImpl.h.

949 {
950  m_part.set_origin(theContainer, vertex);
951 }

◆ set_origin() [3/3]

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set_origin ( const VxContainer theContainer,
int  index 
)
inlinevirtualinherited

Definition at line 295 of file ParticleImpl.h.

938 {
939  m_part.set_origin(theContainer, index);
940 }

◆ set_pdgId()

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::set_pdgId ( int  x)
inlinevirtualinherited

Definition at line 293 of file ParticleImpl.h.

927 {
928  m_part.set_pdgId(x);
929 }

◆ setAthenaBarCode()

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::setAthenaBarCode ( AthenaBarCode_t  id)
inlinevirtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 115 of file ParticleImpl.h.

764 {
766 }

◆ setCharge()

void TruthParticle::setCharge ( const ChargeType  charge)
inline

Set the charge of this TruthParticle.

Definition at line 327 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

328 {
329  this->particleBase().setCharge( charge );
330 }

◆ setGenEventIndex()

void TruthParticle::setGenEventIndex ( size_t  index)
inline

set the GenEvent index

Definition at line 338 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

338  {
340 }

◆ setGenParticle()

void TruthParticle::setGenParticle ( HepMC::ConstGenParticlePtr  particle)
protected

Fill the data members of ParticleBase from the GenParticle.

Definition at line 240 of file TruthParticle.cxx.

241 {
243 
244  if ( particle ) {
245  this->set4Mom(particle->momentum());
246 
247  // children
248  auto dcyVtx = particle->end_vertex();
249 #ifdef HEPMC3
250  m_children.reserve( dcyVtx ? dcyVtx->particles_out().size() : 0 );
251 
252  if ( dcyVtx ) {
253  for ( const auto& itr: dcyVtx->particles_out()) {
254  m_children.push_back( HepMC::barcode(itr) );
255  }//> end loop over outgoing particles
256  }//> decay vertex exists
257 
258  // parents
259  auto prodVtx = particle->production_vertex();
260  m_mothers.reserve( prodVtx ? prodVtx->particles_in().size() : 0 );
261  if ( prodVtx ) {
262  for (const auto& itr: prodVtx->particles_in()) {
263  m_mothers.push_back( HepMC::barcode(itr) );
264  }//> end loop over ingoing particles
265  }//> production vertex exists
266 #else
267 
268  m_children.reserve( dcyVtx ? dcyVtx->particles_out_size() : 0 );
269 
270  if ( dcyVtx ) {
271  for ( HepMC::GenVertex::particles_out_const_iterator itr =
272  dcyVtx->particles_out_const_begin();
273  itr != dcyVtx->particles_out_const_end();
274  ++itr ) {
275  m_children.push_back( (*itr)->barcode() );
276  }//> end loop over outgoing particles
277  }//> decay vertex exists
278 
279  // parents
280  auto prodVtx = particle->production_vertex();
281  m_mothers.reserve( prodVtx ? prodVtx->particles_in_size() : 0 );
282  if ( prodVtx ) {
283  for ( HepMC::GenVertex::particles_in_const_iterator itr =
284  prodVtx->particles_in_const_begin();
285  itr != prodVtx->particles_in_const_end();
286  ++itr ) {
287  m_mothers.push_back( (*itr)->barcode() );
288  }//> end loop over ingoing particles
289  }//> production vertex exists
290 
291 #endif
292  } else {
293  m_mothers.resize( 0 );
294  m_children.resize( 0 );
295  }
296 }

◆ setVersion()

void ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::setVersion ( AthenaBarCodeVersion_t  newversion)
inlinevirtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 121 of file ParticleImpl.h.

815 {
817 }

◆ sinPhi() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::sinPhi
inlinevirtualinherited

sinus phi

Definition at line 192 of file ParticleImpl.h.

585 {
586  return m_mom.sinPhi();
587 }

◆ sinPhi() [2/2]

virtual double I4Momentum::sinPhi ( ) const
pure virtualinherited

◆ sinTh() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::sinTh
inlinevirtualinherited

sinus theta

Definition at line 204 of file ParticleImpl.h.

615 {
616  return m_mom.sinTh();
617 }

◆ sinTh() [2/2]

virtual double I4Momentum::sinTh ( ) const
pure virtualinherited

◆ status()

int TruthParticle::status ( ) const
inline

Forwards the HepMC::GenParticle::status() information.

HepMC::GenParticle forwarding interface

Definition at line 284 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

285 {
286  return genParticle()->status();
287 }

◆ tanTh() [1/2]

double ParticleImpl< TruthParticleNavigation , TruthParticleMomentum , TruthParticleBase >::tanTh
inlinevirtualinherited

tan theta

Definition at line 196 of file ParticleImpl.h.

595 {
596  return m_mom.tanTh();
597 }

◆ tanTh() [2/2]

virtual double I4Momentum::tanTh ( ) const
pure virtualinherited

◆ transformVector()

CLHEP::HepLorentzVector TruthParticle::transformVector ( const HepMC::FourVector &  fv) const
inline

returns a Pointer to a CLHEP::LorentzVector from a HepMC::FourVector

Definition at line 332 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

333 {
334  CLHEP::HepLorentzVector hlv(fv.x(),fv.y(),fv.z(),fv.t());
335  return hlv;
336 }

Member Data Documentation

◆ m_children

std::vector<int> TruthParticle::m_children
protected

vector of barcodes of all the children of this particle.

This will be forwarded to the container holding ourself to be able to retrieve TruthParticle pointers.

Definition at line 260 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

◆ m_container

const TruthParticleContainer* TruthParticle::m_container
protected

Pointer to the collection holding ourself.

Definition at line 248 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

◆ m_mom

The 4-momentum part.

Definition at line 310 of file ParticleImpl.h.

◆ m_mothers

std::vector<int> TruthParticle::m_mothers
protected

vector of barcodes of all the mothers of this particle.

This will be forwarded to the container holding ourself to be able to retrieve TruthParticle pointers.

Definition at line 254 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

◆ m_nav

The navigable part.

Definition at line 307 of file ParticleImpl.h.

◆ m_nGenEventIdx

evtIndex_t TruthParticle::m_nGenEventIdx
protected

the index of the GenEvent this particle is in

Definition at line 263 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.

◆ m_part

The particle-id part.

Definition at line 313 of file ParticleImpl.h.

◆ UNDEFINEDBARCODE

const AthenaBarCode_t IAthenaBarCode::UNDEFINEDBARCODE = (AthenaBarCode_t)(-1)
staticinherited

Definition at line 52 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.

◆ UNDEFINEDVERSION

const AthenaBarCode_t IAthenaBarCode::UNDEFINEDVERSION = UNDEFINEDBARCODE
staticinherited

Definition at line 53 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.


The documentation for this class was generated from the following files:
TruthParticleMomentum::hlv
CLHEP::HepLorentzVector hlv() const
Definition: TruthParticleMomentum.h:269
I4Momentum
Definition: I4Momentum.h:31
TruthParticleMomentum::set4Mom
virtual void set4Mom(const I4Momentum *const theI4Mom)
set 4Momentum (will throw exception if cannot be implemented)
Definition: TruthParticleMomentum.h:283
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
TruthParticleMomentum::cotTh
double cotTh() const
Definition: TruthParticleMomentum.h:264
TruthParticleParameters::NbrOfCones
@ NbrOfCones
Definition: TruthParticleParamDefs.h:31
IAthenaBarCode::UNDEFINEDBARCODE
static const AthenaBarCode_t UNDEFINEDBARCODE
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:52
TruthParticleBase::hasPdgId
bool hasPdgId() const
method to check if particle id information is available
Definition: TruthParticleBase.h:168
TruthParticleBase::dump
std::ostream & dump(std::ostream &out) const
Print IParticle content.
Definition: TruthParticleBase.cxx:83
HepMC::polarization
Polarization polarization(const T &a)
Definition: Polarization.h:47
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::pdgId
virtual int pdgId() const
Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg....
Definition: ParticleImpl.h:738
TruthParticle::barcode
int barcode() const
Forwards the HepMC::GenParticle::barcode() information.
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:304
index
Definition: index.py:1
IAthenaBarCode::IAthenaBarCode
IAthenaBarCode()
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:59
I4Momentum::P4IPTCOTTHPHIM
@ P4IPTCOTTHPHIM
Definition: I4Momentum.h:33
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
TruthParticle::mother
const TruthParticle * mother(const std::size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle.cxx:90
TruthParticleBase::set_origin
void set_origin(const VxContainer *, int)
Definition: TruthParticleBase.h:122
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::origin
virtual const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin
Definition: ParticleImpl.h:688
TruthParticleMomentum::m
double m() const
Definition: TruthParticleMomentum.h:143
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TruthParticleContainer::genEventIdx
std::size_t genEventIdx() const
Retrieve the index (within a McEventCollection) of the HepMC::GenEvent this TruthParticleContainer is...
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:243
TruthParticleMomentum::eta
double eta() const
Definition: TruthParticleMomentum.h:189
AthenaBarCodeImpl::setAthenaBarCode
void setAthenaBarCode(AthenaBarCode_t id)
Definition: AthenaBarCodeImpl.cxx:211
TruthParticleMomentum::px
double px() const
{@ a la I4Momentum -like interface
Definition: TruthParticleMomentum.h:128
TruthParticle::genParticle
HepMC::ConstGenParticlePtr genParticle() const
Retrieve the GenParticle this TruthParticle has been made from (if any)
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:279
x
#define x
TruthParticleBase::pdgId
int pdgId() const
Return eparticle id.
Definition: TruthParticleBase.h:174
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::operator=
ParticleImpl & operator=(const ParticleImpl &rhs)
Assignment operator.
Definition: ParticleImpl.h:356
TruthParticleBase::getAthenaBarCodeImpl
const AthenaBarCodeImpl & getAthenaBarCodeImpl() const
return the (atlas) unique identifier
Definition: TruthParticleBase.h:103
TruthParticleBase::charge
ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition: TruthParticleBase.h:162
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
TruthParticleMomentum::phi
double phi() const
Definition: TruthParticleMomentum.h:204
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::m_nav
TruthParticleNavigation m_nav
The navigable part.
Definition: ParticleImpl.h:307
TruthParticleBase::set_dataType
void set_dataType(ParticleDataType::DataType)
Definition: TruthParticleBase.h:119
AthenaBarCodeImpl::newVersion
void newVersion()
Definition: AthenaBarCodeImpl.cxx:138
TruthParticleMomentum::py
double py() const
Definition: TruthParticleMomentum.h:133
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::charge
virtual ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition: ParticleImpl.h:718
TruthParticle::setGenParticle
void setGenParticle(HepMC::ConstGenParticlePtr particle)
Fill the data members of ParticleBase from the GenParticle.
Definition: TruthParticle.cxx:240
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::m_part
TruthParticleBase m_part
The particle-id part.
Definition: ParticleImpl.h:313
TruthParticleMomentum::p
double p() const
Definition: TruthParticleMomentum.h:165
HepMC::flow
int flow(const T &a, int i)
Definition: Flow.h:51
lumiFormat.i
int i
Definition: lumiFormat.py:92
TruthParticleMomentum::tanTh
double tanTh() const
Definition: TruthParticleMomentum.h:249
TruthParticleBase::hasCharge
bool hasCharge() const
method to check if charge information is available
Definition: TruthParticleBase.h:156
TruthParticle::m_children
std::vector< int > m_children
vector of barcodes of all the children of this particle.
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:260
TruthParticleBase::set_charge
void set_charge(ChargeType x)
Definition: TruthParticleBase.h:120
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
TruthParticleContainer::etIsol
double etIsol(const int barcode, const TruthParticleParameters::ConeSize coneIdx) const
Return the Et isolation for a given particle and a given cone size.
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:281
AthenaBarCodeImpl::hasSameAthenaBarCodeExceptVersion
bool hasSameAthenaBarCodeExceptVersion(const IAthenaBarCode &obj) const
Definition: AthenaBarCodeImpl.cxx:120
TruthParticleMomentum::rapidity
double rapidity() const
Definition: TruthParticleMomentum.h:179
TruthParticleBase::genParticle
HepMC::ConstGenParticlePtr genParticle() const
return the HepMC::GenParticle which is being proxied
Definition: TruthParticleBase.h:180
TruthParticleMomentum::pt
double pt() const
Definition: TruthParticleMomentum.h:226
TruthParticleMomentum::e
double e() const
Definition: TruthParticleMomentum.h:212
INavigable
Definition: INavigable.h:18
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::momentumBase
const momentum_type & momentumBase() const
access to underlying base type (I4Momentum-like)
Definition: ParticleImpl.h:393
TruthParticle::TruthParticleImpl_t
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase > TruthParticleImpl_t
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:69
ParticleImpl::hlv
virtual CLHEP::HepLorentzVector hlv() const
CLHEP HepLorentzVector.
Definition: ParticleImpl.h:635
I4Momentum::P4PTETAPHIM
@ P4PTETAPHIM
Definition: I4Momentum.h:33
TruthParticleContainer::truthParticle
const TruthParticle * truthParticle(const int barcode, std::size_t genEventIdx=0) const
return a const pointer to an TruthParticle given the barcode of the HepMC::GenParticle it is wrapping
Definition: TruthParticleContainer.cxx:64
I4Momentum::UNKNOWN
@ UNKNOWN
Definition: I4Momentum.h:33
TruthParticleBase::origin
const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin
Definition: TruthParticleBase.cxx:69
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::particleBase
const particle_type & particleBase() const
access to underlying base type (IParticle-like)
Definition: ParticleImpl.h:403
TruthParticleMomentum::m2
double m2() const
Definition: TruthParticleMomentum.h:149
TruthParticle::m_container
const TruthParticleContainer * m_container
Pointer to the collection holding ourself.
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:248
TruthParticleBase::set_pdgId
void set_pdgId(int)
Definition: TruthParticleBase.h:121
AthenaBarCodeImpl::getAthenaBarCode
AthenaBarCode_t getAthenaBarCode() const
Definition: AthenaBarCodeImpl.cxx:203
TruthParticleBase::setGenParticle
void setGenParticle(HepMC::ConstGenParticlePtr particle)
Fill the data members of ParticleBase from the GenParticle.
Definition: TruthParticleBase.h:192
TruthParticle::m_mothers
std::vector< int > m_mothers
vector of barcodes of all the mothers of this particle.
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:254
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
TruthParticleBase::setCharge
void setCharge(const ChargeType charge)
Set the charge of this TruthParticleBase.
Definition: TruthParticleBase.h:186
TruthParticleBase::dataType
ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
Definition: TruthParticleBase.h:150
TruthParticleMomentum::iPt
double iPt() const
Definition: TruthParticleMomentum.h:234
TruthParticle::child
const TruthParticle * child(const std::size_t i) const
Retrieve the i-th child (TruthParticle) of this TruthParticle.
Definition: TruthParticle.cxx:98
TruthParticle::m_nGenEventIdx
evtIndex_t m_nGenEventIdx
the index of the GenEvent this particle is in
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:263
TruthParticleMomentum::p2
double p2() const
Definition: TruthParticleMomentum.h:170
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
AthenaBarCodeImpl::hasSameAthenaBarCode
bool hasSameAthenaBarCode(const IAthenaBarCode &obj) const
Definition: AthenaBarCodeImpl.cxx:110
TruthParticleBase::originLink
const ElementLink< VxContainer > & originLink() const
Return the ElementLink to particle Origin
Definition: TruthParticleBase.cxx:76
TruthParticleMomentum::kind
I4Momentum::Kind kind() const
Definition: TruthParticleMomentum.h:88
TruthParticleMomentum::et
double et() const
Definition: TruthParticleMomentum.h:217
INavigable4Momentum
Definition: INavigable4Momentum.h:21
TruthParticleContainer::etIsolations
const TruthEtIsolations::EtIsol_t * etIsolations(const int barcode) const
return the container of Truth Et isolations for a given TruthParticle (or a HepMC::GenParticle)
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:267
TruthParticleMomentum::sinTh
double sinTh() const
Definition: TruthParticleMomentum.h:259
TruthParticleMomentum::cosTh
double cosTh() const
Definition: TruthParticleMomentum.h:254
TruthParticleMomentum::pz
double pz() const
Definition: TruthParticleMomentum.h:138
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >::m_mom
TruthParticleMomentum m_mom
The 4-momentum part.
Definition: ParticleImpl.h:310
IAthenaBarCode::UNDEFINEDVERSION
static const AthenaBarCode_t UNDEFINEDVERSION
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:53
TruthParticle::set4Mom
void set4Mom(const HepMC::FourVector &hlv)
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:222
TruthParticleMomentum::dump
std::ostream & dump(std::ostream &out) const
Print I4Momentum content.
Definition: TruthParticleMomentum.cxx:57
TruthParticleMomentum::errors
const I4MomentumError * errors() const
Definition: TruthParticleMomentum.h:85
error
Definition: IImpactPoint3dEstimator.h:70
I4Momentum::P4EETAPHIM
@ P4EETAPHIM
Definition: I4Momentum.h:33
AthenaBarCodeImpl::setVersion
void setVersion(AthenaBarCodeVersion_t newversion)
Definition: AthenaBarCodeImpl.cxx:157
TruthParticleMomentum::cosPhi
double cosPhi() const
Definition: TruthParticleMomentum.h:239
TruthParticleMomentum::sinPhi
double sinPhi() const
Definition: TruthParticleMomentum.h:244
TruthParticleContainer::hasEtIsol
bool hasEtIsol() const
tell if this TruthParticleContainer has been registered with a TruthEtIsolations container
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:255
NavigableTerminalNode::fillToken
virtual void fillToken(INavigationToken &) const
Definition: NavigableTerminalNode.h:31
AthenaBarCodeImpl::getVersion
AthenaBarCodeVersion_t getVersion() const
Definition: AthenaBarCodeImpl.cxx:131
I4Momentum::P4PXPYPZE
@ P4PXPYPZE
Definition: I4Momentum.h:33