ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::LLPTruthStrategy Class Referencefinal

An ISF truth strategy for recording long lived particles to the MC truth. More...

#include <LLPTruthStrategy.h>

Inheritance diagram for ISF::LLPTruthStrategy:
Collaboration diagram for ISF::LLPTruthStrategy:

Public Member Functions

 LLPTruthStrategy (const std::string &t, const std::string &n, const IInterface *p)
 Constructor with parameters.
 ~LLPTruthStrategy ()=default
 Destructor.
virtual StatusCode initialize () override final
virtual bool pass (ITruthIncident &incident) const override final
 True if the ITruthStrategy implementationapplies to the given ITruthIncident.
virtual bool appliesToRegion (unsigned short geoID) const override final

Private Attributes

Gaudi::Property< int > m_passProcessCodeRangeLow {this, "PassProcessCodeRangeLow", 200}
 The process code range (low-high) and the category of processes that should pass this strategy.
Gaudi::Property< int > m_passProcessCodeRangeHigh {this, "PassProcessCodeRangeHigh", 299}
Gaudi::Property< int > m_passProcessCategory {this, "PassProcessCategory", 9}
IntegerArrayProperty m_regionListProperty {this, "Regions", {}}

Detailed Description

An ISF truth strategy for recording long lived particles to the MC truth.

Author
Elmar.Ritsch -at- cern.ch

Definition at line 28 of file LLPTruthStrategy.h.

Constructor & Destructor Documentation

◆ LLPTruthStrategy()

ISF::LLPTruthStrategy::LLPTruthStrategy ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor with parameters.

Constructor.

Definition at line 15 of file LLPTruthStrategy.cxx.

15 :
16 base_class(t,n,p)
17{
18}

◆ ~LLPTruthStrategy()

ISF::LLPTruthStrategy::~LLPTruthStrategy ( )
default

Destructor.

Member Function Documentation

◆ appliesToRegion()

bool ISF::LLPTruthStrategy::appliesToRegion ( unsigned short geoID) const
finaloverridevirtual

Definition at line 59 of file LLPTruthStrategy.cxx.

60{
61 return std::find( m_regionListProperty.begin(),
63 geoID ) != m_regionListProperty.end();
64}
IntegerArrayProperty m_regionListProperty

◆ initialize()

StatusCode ISF::LLPTruthStrategy::initialize ( )
finaloverridevirtual

Definition at line 21 of file LLPTruthStrategy.cxx.

22{
23 ATH_MSG_VERBOSE("Initializing ...");
24 for (auto region : m_regionListProperty.value()) {
25 if (region < AtlasDetDescr::fFirstAtlasRegion || region >= AtlasDetDescr::fNumAtlasRegions) {
26 ATH_MSG_ERROR("Unknown Region (" << region << ") specified. Please check your configuration.");
27 return StatusCode::FAILURE;
28 }
29 }
30 ATH_MSG_VERBOSE("Initialization successful.");
31 return StatusCode::SUCCESS;
32}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)

◆ pass()

bool ISF::LLPTruthStrategy::pass ( ITruthIncident & incident) const
finaloverridevirtual

True if the ITruthStrategy implementationapplies to the given ITruthIncident.

Definition at line 35 of file LLPTruthStrategy.cxx.

36{
37 const int processCode = ti.physicsProcessCode(); // == G4ProcessSubType
38 if( (processCode>m_passProcessCodeRangeLow && processCode<m_passProcessCodeRangeHigh) ){ // All kinds of decay processes are included here...
39 // Check if this is a sparticle - if not, return
40 if ( !MC::isSUSY(ti.parentPdgCode()) ) {
41 // not passed!
42 return false;
43 }
44 ATH_MSG_VERBOSE("ACHLLP: saved a truth vertex for pdg "<< ti.parentPdgCode());
45 // passed!
46 return true;
47 }
48 const int processCategory = ti.physicsProcessCategory(); // == G4ProcessType
49 if ( processCategory==m_passProcessCategory ){//save all interactions for user-defined processes, like rhadron interactions
50 ATH_MSG_VERBOSE("ACHLLP: saved a truth interaction fUserDefined for pdg " << ti.parentPdgCode());
51 // passed!
52 return true;
53 }
54 // not passed!
55 return false;
56}
Gaudi::Property< int > m_passProcessCategory
Gaudi::Property< int > m_passProcessCodeRangeLow
The process code range (low-high) and the category of processes that should pass this strategy.
Gaudi::Property< int > m_passProcessCodeRangeHigh
bool isSUSY(const T &p)

Member Data Documentation

◆ m_passProcessCategory

Gaudi::Property<int> ISF::LLPTruthStrategy::m_passProcessCategory {this, "PassProcessCategory", 9}
private

Definition at line 50 of file LLPTruthStrategy.h.

50{this, "PassProcessCategory", 9};

◆ m_passProcessCodeRangeHigh

Gaudi::Property<int> ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh {this, "PassProcessCodeRangeHigh", 299}
private

Definition at line 49 of file LLPTruthStrategy.h.

49{this, "PassProcessCodeRangeHigh", 299};

◆ m_passProcessCodeRangeLow

Gaudi::Property<int> ISF::LLPTruthStrategy::m_passProcessCodeRangeLow {this, "PassProcessCodeRangeLow", 200}
private

The process code range (low-high) and the category of processes that should pass this strategy.

Definition at line 48 of file LLPTruthStrategy.h.

48{this, "PassProcessCodeRangeLow", 200};

◆ m_regionListProperty

IntegerArrayProperty ISF::LLPTruthStrategy::m_regionListProperty {this, "Regions", {}}
private

Definition at line 52 of file LLPTruthStrategy.h.

52{this, "Regions", {}};

The documentation for this class was generated from the following files: