ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
ISF::ITruthIncident Class Referenceabstract

#include <ITruthIncident.h>

Inheritance diagram for ISF::ITruthIncident:
Collaboration diagram for ISF::ITruthIncident:

Public Member Functions

 ITruthIncident (AtlasDetDescr::AtlasRegion geoID, unsigned short numChildren)
 
AtlasDetDescr::AtlasRegion geoID ()
 Return the SimGeoID corresponding to the vertex of the truth incident. More...
 
virtual const HepMC::FourVector & position () const =0
 Return HepMC position of the truth vertex. More...
 
virtual int physicsProcessCategory () const =0
 Return category of the physics process represented by the truth incident (eg hadronic, em, ..) More...
 
virtual int physicsProcessCode () const =0
 Return specific physics process code of the truth incident (eg ionisation, bremsstrahlung, ..) More...
 
virtual double parentP2 () const =0
 Return p^2 of the parent particle. More...
 
virtual double parentPt2 () const =0
 Return pT^2 of the parent particle. More...
 
virtual double parentEkin () const =0
 Return Ekin of the parent particle. More...
 
virtual int parentPdgCode () const =0
 Return the PDG Code of the parent particle. More...
 
virtual HepMC::GenParticlePtr parentParticle ()=0
 Return the parent particle as a HepMC particle type (only called for particles that will enter the HepMC truth event) More...
 
virtual int parentStatus ()=0
 
virtual int parentBarcode ()=0
 Return the barcode of the parent particle. More...
 
virtual int parentUniqueID ()=0
 Return the unique ID of the parent particle. More...
 
virtual bool parentSurvivesIncident () const =0
 Return a boolean whether or not the parent particle survives the incident. More...
 
virtual HepMC::GenParticlePtr parentParticleAfterIncident (int newBC)=0
 Return the parent particle after the TruthIncident vertex (and assign a new barcode to it) More...
 
unsigned short numberOfChildren () const
 Return total number of child particles. More...
 
virtual double childP2 (unsigned short index) const =0
 Return p^2 of the i-th child particle. More...
 
virtual double childPt2 (unsigned short index) const =0
 Return pT^2 of the i-th child particle. More...
 
virtual double childEkin (unsigned short index) const =0
 Return Ekin of the i-th child particle. More...
 
virtual int childPdgCode (unsigned short index) const =0
 Return the PDG Code of the i-th child particle. More...
 
virtual int childBarcode (unsigned short index) const =0
 Return the barcode of the i-th child particle (if defined as part of the TruthIncident) otherwise return 0. More...
 
bool childrenP2Pass (double p2cut)
 Return true if at least one child particle passes the given p^2 cut (= at least one child with p^2 >= pt2cut) More...
 
bool childrenPt2Pass (double pt2cut)
 Return true if at least one child particle passes the given pT^2 cut (= at least one child with pT^2 >= pt2cut) More...
 
bool childrenEkinPass (double ekincut)
 Return true if at least one child particle passes the given Ekin cut (= at least one child with Ekin >= ekincut) More...
 
virtual HepMC::GenParticlePtr childParticle (unsigned short index, int bc=HepMC::UNDEFINED_ID)=0
 Return the i-th child as a HepMC particle type and assign the given Barcode to the simulator particle (only called for particles that will enter the HepMC truth event) More...
 
void setChildPassedFilters (unsigned short index)
 Record that a particular child passed a check. More...
 
bool childPassedFilters (unsigned short index) const
 Should a particular child be written out to the GenEvent. More...
 
void setPassWholeVertices (bool passWholeVertex)
 Set whether this TruthIncident should pass the vertex as a whole or individual children. More...
 
virtual ISF::InteractionClass_t interactionClassification () const
 The interaction classifications are described as follows: STD_VTX: interaction of a particle without a pre-defined decay; QS_SURV_VTX: a particle with a pre-defined decay under-going a non-destructive interaction; QS_DEST_VTX: a particle with a pre-defined decay under-going a destructive interaction other than its pre-defined decay; QS_PREDEF_VTX: a particle under-going its pre-defined decay. More...
 

Protected Attributes

int m_numChildren
 
bool m_passWholeVertex
 
std::vector< bool > m_childPassedFilters
 

Private Attributes

AtlasDetDescr::AtlasRegion m_geoID
 region that the TruthIncident is located in More...
 

Detailed Description

ISF interface class for TruthIncidents. Information regarding interactions that occur inside simulators are wrapped into dedicated TruthIncident implemenations. The ITruthIncident interface offers a layer of abstraction to the ISF framework, in order to build a MC truth record of the simulated event.

Author
Elmar.Ritsch -at- cern.ch

Definition at line 45 of file ITruthIncident.h.

Constructor & Destructor Documentation

◆ ITruthIncident()

ISF::ITruthIncident::ITruthIncident ( AtlasDetDescr::AtlasRegion  geoID,
unsigned short  numChildren 
)
inline

Definition at line 47 of file ITruthIncident.h.

47  : m_geoID(geoID),
48  m_numChildren(numChildren),
49  m_passWholeVertex(true),
50  m_childPassedFilters(numChildren,false) { };

Member Function Documentation

◆ childBarcode()

virtual int ISF::ITruthIncident::childBarcode ( unsigned short  index) const
pure virtual

Return the barcode of the i-th child particle (if defined as part of the TruthIncident) otherwise return 0.

Implemented in ISF::ISFTruthIncident, and iGeant4::Geant4TruthIncident.

◆ childEkin()

virtual double ISF::ITruthIncident::childEkin ( unsigned short  index) const
pure virtual

Return Ekin of the i-th child particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ childP2()

virtual double ISF::ITruthIncident::childP2 ( unsigned short  index) const
pure virtual

Return p^2 of the i-th child particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ childParticle()

virtual HepMC::GenParticlePtr ISF::ITruthIncident::childParticle ( unsigned short  index,
int  bc = HepMC::UNDEFINED_ID 
)
pure virtual

Return the i-th child as a HepMC particle type and assign the given Barcode to the simulator particle (only called for particles that will enter the HepMC truth event)

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ childPassedFilters()

bool ISF::ITruthIncident::childPassedFilters ( unsigned short  index) const
inline

Should a particular child be written out to the GenEvent.

Definition at line 186 of file ITruthIncident.h.

186  {
187  return m_childPassedFilters[index];
188  }

◆ childPdgCode()

virtual int ISF::ITruthIncident::childPdgCode ( unsigned short  index) const
pure virtual

Return the PDG Code of the i-th child particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ childPt2()

virtual double ISF::ITruthIncident::childPt2 ( unsigned short  index) const
pure virtual

Return pT^2 of the i-th child particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ childrenEkinPass()

bool ISF::ITruthIncident::childrenEkinPass ( double  ekincut)
inline

Return true if at least one child particle passes the given Ekin cut (= at least one child with Ekin >= ekincut)

Definition at line 170 of file ITruthIncident.h.

170  {
171  bool pass = false; // true if cut passed
172  // as soon as at a particle passes the cut -> end loop and return true
173  for ( unsigned short i=0; !(pass && m_passWholeVertex) && (i<m_numChildren); ++i) {
174  bool thispassed = (childEkin(i) >= ekincut);
175  if(thispassed) { setChildPassedFilters(i); }
176  pass |= thispassed;
177  }
178  return pass;
179  }

◆ childrenP2Pass()

bool ISF::ITruthIncident::childrenP2Pass ( double  p2cut)
inline

Return true if at least one child particle passes the given p^2 cut (= at least one child with p^2 >= pt2cut)

Definition at line 146 of file ITruthIncident.h.

146  {
147  bool pass = false; // true if cut passed
148  // as soon as at a particle passes the cut -> end loop and return true
149  for ( unsigned short i=0; !(pass && m_passWholeVertex) && (i<m_numChildren); ++i) {
150  bool thispassed = (childP2(i) >= p2cut);
151  if(thispassed) { setChildPassedFilters(i); }
152  pass |= thispassed;
153  }
154  return pass;
155  }

◆ childrenPt2Pass()

bool ISF::ITruthIncident::childrenPt2Pass ( double  pt2cut)
inline

Return true if at least one child particle passes the given pT^2 cut (= at least one child with pT^2 >= pt2cut)

Definition at line 158 of file ITruthIncident.h.

158  {
159  bool pass = false; // true if cut passed
160  // as soon as at a particle passes the cut -> end loop and return true
161  for ( unsigned short i=0; !(pass && m_passWholeVertex) && (i<m_numChildren); ++i) {
162  bool thispassed = (childPt2(i) >= pt2cut);
163  if(thispassed) { setChildPassedFilters(i); }
164  pass |= thispassed;
165  }
166  return pass;
167  }

◆ geoID()

AtlasDetDescr::AtlasRegion ISF::ITruthIncident::geoID ( )
inline

Return the SimGeoID corresponding to the vertex of the truth incident.

Definition at line 53 of file ITruthIncident.h.

53 { return m_geoID; };

◆ interactionClassification()

virtual ISF::InteractionClass_t ISF::ITruthIncident::interactionClassification ( ) const
inlinevirtual

The interaction classifications are described as follows: STD_VTX: interaction of a particle without a pre-defined decay; QS_SURV_VTX: a particle with a pre-defined decay under-going a non-destructive interaction; QS_DEST_VTX: a particle with a pre-defined decay under-going a destructive interaction other than its pre-defined decay; QS_PREDEF_VTX: a particle under-going its pre-defined decay.

Reimplemented in iGeant4::Geant4TruthIncident.

Definition at line 125 of file ITruthIncident.h.

125 {return ISF::STD_VTX;};

◆ numberOfChildren()

unsigned short ISF::ITruthIncident::numberOfChildren ( ) const
inline

Return total number of child particles.

Definition at line 139 of file ITruthIncident.h.

139  {
140  return m_numChildren;
141  }

◆ parentBarcode()

virtual int ISF::ITruthIncident::parentBarcode ( )
pure virtual

Return the barcode of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentEkin()

virtual double ISF::ITruthIncident::parentEkin ( ) const
pure virtual

Return Ekin of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentP2()

virtual double ISF::ITruthIncident::parentP2 ( ) const
pure virtual

Return p^2 of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentParticle()

virtual HepMC::GenParticlePtr ISF::ITruthIncident::parentParticle ( )
pure virtual

Return the parent particle as a HepMC particle type (only called for particles that will enter the HepMC truth event)

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentParticleAfterIncident()

virtual HepMC::GenParticlePtr ISF::ITruthIncident::parentParticleAfterIncident ( int  newBC)
pure virtual

Return the parent particle after the TruthIncident vertex (and assign a new barcode to it)

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentPdgCode()

virtual int ISF::ITruthIncident::parentPdgCode ( ) const
pure virtual

Return the PDG Code of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentPt2()

virtual double ISF::ITruthIncident::parentPt2 ( ) const
pure virtual

Return pT^2 of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentStatus()

virtual int ISF::ITruthIncident::parentStatus ( )
pure virtual

◆ parentSurvivesIncident()

virtual bool ISF::ITruthIncident::parentSurvivesIncident ( ) const
pure virtual

Return a boolean whether or not the parent particle survives the incident.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ parentUniqueID()

virtual int ISF::ITruthIncident::parentUniqueID ( )
pure virtual

Return the unique ID of the parent particle.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ physicsProcessCategory()

virtual int ISF::ITruthIncident::physicsProcessCategory ( ) const
pure virtual

Return category of the physics process represented by the truth incident (eg hadronic, em, ..)

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ physicsProcessCode()

virtual int ISF::ITruthIncident::physicsProcessCode ( ) const
pure virtual

Return specific physics process code of the truth incident (eg ionisation, bremsstrahlung, ..)

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ position()

virtual const HepMC::FourVector& ISF::ITruthIncident::position ( ) const
pure virtual

Return HepMC position of the truth vertex.

Implemented in iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ setChildPassedFilters()

void ISF::ITruthIncident::setChildPassedFilters ( unsigned short  index)
inline

Record that a particular child passed a check.

Definition at line 181 of file ITruthIncident.h.

181  {
182  m_childPassedFilters[index] = true;
183  return;
184  }

◆ setPassWholeVertices()

void ISF::ITruthIncident::setPassWholeVertices ( bool  passWholeVertex)
inline

Set whether this TruthIncident should pass the vertex as a whole or individual children.

Definition at line 190 of file ITruthIncident.h.

190  {
191  m_passWholeVertex=passWholeVertex;
192  }

Member Data Documentation

◆ m_childPassedFilters

std::vector<bool> ISF::ITruthIncident::m_childPassedFilters
protected

Definition at line 131 of file ITruthIncident.h.

◆ m_geoID

AtlasDetDescr::AtlasRegion ISF::ITruthIncident::m_geoID
private

region that the TruthIncident is located in

Definition at line 127 of file ITruthIncident.h.

◆ m_numChildren

int ISF::ITruthIncident::m_numChildren
protected

Definition at line 129 of file ITruthIncident.h.

◆ m_passWholeVertex

bool ISF::ITruthIncident::m_passWholeVertex
protected

Definition at line 130 of file ITruthIncident.h.


The documentation for this class was generated from the following file:
ISF::STD_VTX
@ STD_VTX
Definition: ITruthIncident.h:28
ISF::ITruthIncident::m_numChildren
int m_numChildren
Definition: ITruthIncident.h:129
ISF::ITruthIncident::childEkin
virtual double childEkin(unsigned short index) const =0
Return Ekin of the i-th child particle.
ISF::ITruthIncident::childP2
virtual double childP2(unsigned short index) const =0
Return p^2 of the i-th child particle.
ISF::ITruthIncident::m_geoID
AtlasDetDescr::AtlasRegion m_geoID
region that the TruthIncident is located in
Definition: ITruthIncident.h:125
lumiFormat.i
int i
Definition: lumiFormat.py:85
ISF::ITruthIncident::childPt2
virtual double childPt2(unsigned short index) const =0
Return pT^2 of the i-th child particle.
DeMoScan.index
string index
Definition: DeMoScan.py:364
ISF::ITruthIncident::m_passWholeVertex
bool m_passWholeVertex
Definition: ITruthIncident.h:130
ISF::ITruthIncident::setChildPassedFilters
void setChildPassedFilters(unsigned short index)
Record that a particular child passed a check.
Definition: ITruthIncident.h:181
ISF::ITruthIncident::m_childPassedFilters
std::vector< bool > m_childPassedFilters
Definition: ITruthIncident.h:131
ISF::ITruthIncident::geoID
AtlasDetDescr::AtlasRegion geoID()
Return the SimGeoID corresponding to the vertex of the truth incident.
Definition: ITruthIncident.h:53