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
virtual bool pass (ITruthIncident &incident) const override
 True if the ITruthStrategy implementationapplies to the given ITruthIncident.
virtual bool appliesToRegion (unsigned short geoID) const override

Private Attributes

int m_passProcessCodeRangeLow
 The process code range (low-high) and the category of processes that should pass this strategy.
int m_passProcessCodeRangeHigh
int m_passProcessCategory
IntegerArrayProperty m_regionListProperty

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),
20{
21 declareProperty("PassProcessCodeRangeLow" , m_passProcessCodeRangeLow=200);
22 declareProperty("PassProcessCodeRangeHigh", m_passProcessCodeRangeHigh=299);
23 declareProperty("PassProcessCategory" , m_passProcessCategory=9);
24 declareProperty("Regions" , m_regionListProperty );
25}
int m_passProcessCodeRangeLow
The process code range (low-high) and the category of processes that should pass this strategy.
IntegerArrayProperty m_regionListProperty

◆ ~LLPTruthStrategy()

ISF::LLPTruthStrategy::~LLPTruthStrategy ( )
default

Destructor.

Member Function Documentation

◆ appliesToRegion()

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

Definition at line 67 of file LLPTruthStrategy.cxx.

68{
69 return std::find( m_regionListProperty.begin(),
71 geoID ) != m_regionListProperty.end();
72}

◆ initialize()

StatusCode ISF::LLPTruthStrategy::initialize ( )
overridevirtual

Definition at line 29 of file LLPTruthStrategy.cxx.

30{
31 ATH_MSG_VERBOSE("Initializing ...");
32 for (auto region : m_regionListProperty.value()) {
33 if (region < AtlasDetDescr::fFirstAtlasRegion || region >= AtlasDetDescr::fNumAtlasRegions) {
34 ATH_MSG_ERROR("Unknown Region (" << region << ") specified. Please check your configuration.");
35 return StatusCode::FAILURE;
36 }
37 }
38 ATH_MSG_VERBOSE("Initialization successful.");
39 return StatusCode::SUCCESS;
40}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)

◆ pass()

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

True if the ITruthStrategy implementationapplies to the given ITruthIncident.

Definition at line 43 of file LLPTruthStrategy.cxx.

44{
45 const int processCode = ti.physicsProcessCode(); // == G4ProcessSubType
46 if( (processCode>m_passProcessCodeRangeLow && processCode<m_passProcessCodeRangeHigh) ){ // All kinds of decay processes are included here...
47 // Check if this is a sparticle - if not, return
48 if ( !MC::isSUSY(ti.parentPdgCode()) ) {
49 // not passed!
50 return false;
51 }
52 ATH_MSG_VERBOSE("ACHLLP: saved a truth vertex for pdg "<< ti.parentPdgCode());
53 // passed!
54 return true;
55 }
56 const int processCategory = ti.physicsProcessCategory(); // == G4ProcessType
57 if ( processCategory==m_passProcessCategory ){//save all interactions for user-defined processes, like rhadron interactions
58 ATH_MSG_VERBOSE("ACHLLP: saved a truth interaction fUserDefined for pdg " << ti.parentPdgCode());
59 // passed!
60 return true;
61 }
62 // not passed!
63 return false;
64}
bool isSUSY(const T &p)

Member Data Documentation

◆ m_passProcessCategory

int ISF::LLPTruthStrategy::m_passProcessCategory
private

Definition at line 50 of file LLPTruthStrategy.h.

◆ m_passProcessCodeRangeHigh

int ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh
private

Definition at line 49 of file LLPTruthStrategy.h.

◆ m_passProcessCodeRangeLow

int ISF::LLPTruthStrategy::m_passProcessCodeRangeLow
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.

◆ m_regionListProperty

IntegerArrayProperty ISF::LLPTruthStrategy::m_regionListProperty
private

Definition at line 52 of file LLPTruthStrategy.h.


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