ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::ITruthIncident Class Referenceabstract

ISF interface class for TruthIncidents. More...

#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.
virtual const HepMC::FourVector & position () const =0
 Return HepMC position of the truth vertex.
virtual int physicsProcessCategory () const =0
 Return category of the physics process represented by the truth incident (eg hadronic, em, ..)
virtual int physicsProcessCode () const =0
 Return specific physics process code of the truth incident (eg ionisation, bremsstrahlung, ..)
virtual double parentP2 () const =0
 Return p^2 of the parent particle.
virtual double parentPt2 () const =0
 Return pT^2 of the parent particle.
virtual double parentEkin () const =0
 Return Ekin of the parent particle.
virtual int parentPdgCode () const =0
 Return the PDG Code of the parent particle.
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)
virtual int parentStatus ()=0
virtual int parentBarcode ()=0
 Return the barcode of the parent particle.
virtual int parentUniqueID ()=0
 Return the unique ID of the parent particle.
virtual bool parentSurvivesIncident () const =0
 Return a boolean whether or not the parent particle survives the incident.
virtual HepMC::GenParticlePtr parentParticleAfterIncident (int newBC)=0
 Return the parent particle after the TruthIncident vertex (and assign a new barcode to it)
unsigned short numberOfChildren () const
 Return total number of child particles.
virtual double childP2 (unsigned short index) const =0
 Return p^2 of the i-th child particle.
virtual double childPt2 (unsigned short index) const =0
 Return pT^2 of the i-th child particle.
virtual double childEkin (unsigned short index) const =0
 Return Ekin of the i-th child particle.
virtual int childPdgCode (unsigned short index) const =0
 Return the PDG Code of the i-th child particle.
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.
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)
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)
bool childrenEkinPass (double ekincut)
 Return true if at least one child particle passes the given Ekin cut (= at least one child with Ekin >= ekincut)
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)
void setChildPassedFilters (unsigned short index)
 Record that a particular child passed a check.
bool childPassedFilters (unsigned short index) const
 Should a particular child be written out to the GenEvent.
void setPassWholeVertices (bool passWholeVertex)
 Set whether this TruthIncident should pass the vertex as a whole or individual children.
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.

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

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),
50 m_childPassedFilters(numChildren,false) { };
AtlasDetDescr::AtlasRegion geoID()
Return the SimGeoID corresponding to the vertex of the truth incident.
std::vector< bool > m_childPassedFilters
AtlasDetDescr::AtlasRegion m_geoID
region that the TruthIncident is located in

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 iGeant4::Geant4TruthIncident, and ISF::ISFTruthIncident.

◆ 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 {
188 }
str index
Definition DeMoScan.py:362

◆ 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 }
void setChildPassedFilters(unsigned short index)
Record that a particular child passed a check.
virtual double childEkin(unsigned short index) const =0
Return Ekin of the i-th child particle.

◆ 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 }
virtual double childP2(unsigned short index) const =0
Return p^2 of the i-th child particle.

◆ 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 }
virtual double childPt2(unsigned short index) const =0
Return pT^2 of the i-th child particle.

◆ 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 {
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: