ATLAS Offline Software
Public Member Functions | Private 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 ()
 Destructor. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () 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 Member Functions

bool isSUSYParticle (const int absPdgID) const
 Returns true if the given |pdgID| is a SUSY particle. More...
 

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 32 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 17 of file LLPTruthStrategy.cxx.

17  :
18  base_class(t,n,p),
22 {
23  declareProperty("PassProcessCodeRangeLow" , m_passProcessCodeRangeLow=200);
24  declareProperty("PassProcessCodeRangeHigh", m_passProcessCodeRangeHigh=299);
25  declareProperty("PassProcessCategory" , m_passProcessCategory=9);
27 }

◆ ~LLPTruthStrategy()

ISF::LLPTruthStrategy::~LLPTruthStrategy ( )

Destructor.

Definition at line 30 of file LLPTruthStrategy.cxx.

31 {
32 }

Member Function Documentation

◆ appliesToRegion()

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

Definition at line 91 of file LLPTruthStrategy.cxx.

92 {
93  return std::find( m_regionListProperty.begin(),
95  geoID ) != m_regionListProperty.end();
96 }

◆ finalize()

StatusCode ISF::LLPTruthStrategy::finalize ( )
overridevirtual

Definition at line 50 of file LLPTruthStrategy.cxx.

51 {
52  ATH_MSG_VERBOSE("Finalizing ...");
53 
54  ATH_MSG_VERBOSE("Finalization successful.");
55  return StatusCode::SUCCESS;
56 }

◆ initialize()

StatusCode ISF::LLPTruthStrategy::initialize ( )
overridevirtual

Definition at line 35 of file LLPTruthStrategy.cxx.

36 {
37  ATH_MSG_VERBOSE("Initializing ...");
38 
39  for(auto region : m_regionListProperty.value()) {
40  if(region < AtlasDetDescr::fFirstAtlasRegion || region >= AtlasDetDescr::fNumAtlasRegions) {
41  ATH_MSG_ERROR("Unknown Region (" << region << ") specified. Please check your configuration.");
42  return StatusCode::FAILURE;
43  }
44  }
45 
46  ATH_MSG_VERBOSE("Initialization successful.");
47  return StatusCode::SUCCESS;
48 }

◆ isSUSYParticle()

bool ISF::LLPTruthStrategy::isSUSYParticle ( const int  absPdgID) const
private

Returns true if the given |pdgID| is a SUSY particle.

Definition at line 99 of file LLPTruthStrategy.cxx.

100 {
101  return ( (id>1000000 && id<1000007) || (id>1000010 && id<1000017) ||
102  (id>2000000 && id<2000007) || (id>2000010 && id<2000017) || // squarks and sleptons
103  (id>1000020 && id<1000026) || (id>1000034 && id<1000040) || // higgses etc
104  id==1000512 || id==1000522 || id==1000991 || id==1000993 || // R-hadrons
105  id==1000612 || id==1000622 || id==1000632 || id==1000642 || id==1000652 || id==1005211 ||
106  id==1006113 || id==1006211 || id==1006213 || id==1006223 || id==1006311 ||
107  id==1006313 || id==1006321 || id==1006323 || id==1006333 ||
108  id==1009111 || id==1009113 || id==1009211 || id==1009213 || id==1009311 ||
109  id==1009313 || id==1009321 || id==1009323 || id==1009223 || id==1009333 ||
110  id==1092112 || id==1091114 || id==1092114 || id==1092212 || id==1092214 || id==1092224 ||
111  id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334 );
112 }

◆ pass()

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

True if the ITruthStrategy implementationapplies to the given ITruthIncident.

Definition at line 58 of file LLPTruthStrategy.cxx.

58  {
59 
60  int processCode = ti.physicsProcessCode(); // == G4ProcessSubType
61  if( (processCode>m_passProcessCodeRangeLow && processCode<m_passProcessCodeRangeHigh) ){ // All kinds of decay processes are included here...
62 
63  // Check if this is a sparticle - if not, return
64  int pdg = ti.parentPdgCode();
65  if ( !isSUSYParticle( abs(pdg) ) ) {
66  // not passed!
67  return false;
68  }
69 
70  ATH_MSG_VERBOSE("ACHLLP: saved a truth vertex for pdg "<<pdg);
71 
72  // passed!
73  return true;
74  }
75 
76  int processCategory = ti.physicsProcessCategory(); // == G4ProcessType
77  if( processCategory==m_passProcessCategory ){//save all interactions for user-defined processes, like rhadron interactions
78 
79  int pdg = ti.parentPdgCode();
80  ATH_MSG_VERBOSE("ACHLLP: saved a truth interaction fUserDefined for pdg "<<pdg);
81 
82  // passed!
83  return true;
84  }
85 
86  // not passed!
87  return false;
88 }

Member Data Documentation

◆ m_passProcessCategory

int ISF::LLPTruthStrategy::m_passProcessCategory
private

Definition at line 55 of file LLPTruthStrategy.h.

◆ m_passProcessCodeRangeHigh

int ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh
private

Definition at line 54 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 53 of file LLPTruthStrategy.h.

◆ m_regionListProperty

IntegerArrayProperty ISF::LLPTruthStrategy::m_regionListProperty
private

Definition at line 57 of file LLPTruthStrategy.h.


The documentation for this class was generated from the following files:
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition: AtlasRegion.h:39
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:53
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:55
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh
int m_passProcessCodeRangeHigh
Definition: LLPTruthStrategy.h:54
beamspotman.n
n
Definition: beamspotman.py:731
ISF::LLPTruthStrategy::m_regionListProperty
IntegerArrayProperty m_regionListProperty
Definition: LLPTruthStrategy.h:57
ISF::LLPTruthStrategy::isSUSYParticle
bool isSUSYParticle(const int absPdgID) const
Returns true if the given |pdgID| is a SUSY particle.
Definition: LLPTruthStrategy.cxx:99
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15