ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ISF::LLPTruthStrategy Class Referencefinal

#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. More...
 
 ~LLPTruthStrategy ()=default
 Destructor. More...
 
virtual StatusCode initialize () override
 
virtual bool pass (ITruthIncident &incident) const override
 True if the ITruthStrategy implementationapplies to the given ITruthIncident. More...
 
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. More...
 
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 }

◆ ~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 }

◆ 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 }

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:
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition: AtlasRegion.h:39
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ISF::LLPTruthStrategy::m_passProcessCodeRangeLow
int m_passProcessCodeRangeLow
The process code range (low-high) and the category of processes that should pass this strategy.
Definition: LLPTruthStrategy.h:48
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::LLPTruthStrategy::m_passProcessCategory
int m_passProcessCategory
Definition: LLPTruthStrategy.h:50
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh
int m_passProcessCodeRangeHigh
Definition: LLPTruthStrategy.h:49
beamspotman.n
n
Definition: beamspotman.py:731
isSUSY
bool isSUSY(const T &p)
PDG rule 11d Fundamental supersymmetric particles are identified by adding a nonzero n to the particl...
Definition: AtlasPID.h:388
ISF::LLPTruthStrategy::m_regionListProperty
IntegerArrayProperty m_regionListProperty
Definition: LLPTruthStrategy.h:52