ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_HepMC
ISF_HepMC_Tools
src
LLPTruthStrategy.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// class header include
6
#include "
LLPTruthStrategy.h
"
7
8
// ISF includes
9
#include "
ISF_Event/ITruthIncident.h
"
10
#include "
ISF_Event/ISFParticle.h
"
11
12
#include "
TruthUtils/HepMCHelpers.h
"
13
15
ISF::LLPTruthStrategy::LLPTruthStrategy
(
const
std::string& t,
const
std::string& n,
const
IInterface* p) :
16
base_class(t,n,p)
17
{
18
}
19
20
// Athena algtool's Hooks
21
StatusCode
ISF::LLPTruthStrategy::initialize
()
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
}
33
34
35
bool
ISF::LLPTruthStrategy::pass
(
ITruthIncident
& ti)
const
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
}
57
58
59
bool
ISF::LLPTruthStrategy::appliesToRegion
(
unsigned
short
geoID)
const
60
{
61
return
std::find(
m_regionListProperty
.begin(),
62
m_regionListProperty
.end(),
63
geoID ) !=
m_regionListProperty
.end();
64
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
HepMCHelpers.h
ATLAS-specific HepMC functions.
ISFParticle.h
ITruthIncident.h
LLPTruthStrategy.h
ISF::ITruthIncident
ISF interface class for TruthIncidents.
Definition
ITruthIncident.h:45
ISF::ITruthIncident::physicsProcessCategory
virtual int physicsProcessCategory() const =0
Return category of the physics process represented by the truth incident (eg hadronic,...
ISF::ITruthIncident::physicsProcessCode
virtual int physicsProcessCode() const =0
Return specific physics process code of the truth incident (eg ionisation, bremsstrahlung,...
ISF::ITruthIncident::parentPdgCode
virtual int parentPdgCode() const =0
Return the PDG Code of the parent particle.
ISF::LLPTruthStrategy::m_passProcessCategory
Gaudi::Property< int > m_passProcessCategory
Definition
LLPTruthStrategy.h:50
ISF::LLPTruthStrategy::pass
virtual bool pass(ITruthIncident &incident) const override final
True if the ITruthStrategy implementationapplies to the given ITruthIncident.
Definition
LLPTruthStrategy.cxx:35
ISF::LLPTruthStrategy::initialize
virtual StatusCode initialize() override final
Definition
LLPTruthStrategy.cxx:21
ISF::LLPTruthStrategy::LLPTruthStrategy
LLPTruthStrategy(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition
LLPTruthStrategy.cxx:15
ISF::LLPTruthStrategy::m_passProcessCodeRangeLow
Gaudi::Property< int > m_passProcessCodeRangeLow
The process code range (low-high) and the category of processes that should pass this strategy.
Definition
LLPTruthStrategy.h:48
ISF::LLPTruthStrategy::m_regionListProperty
IntegerArrayProperty m_regionListProperty
Definition
LLPTruthStrategy.h:52
ISF::LLPTruthStrategy::m_passProcessCodeRangeHigh
Gaudi::Property< int > m_passProcessCodeRangeHigh
Definition
LLPTruthStrategy.h:49
ISF::LLPTruthStrategy::appliesToRegion
virtual bool appliesToRegion(unsigned short geoID) const override final
Definition
LLPTruthStrategy.cxx:59
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition
AtlasRegion.h:33
MC::isSUSY
bool isSUSY(const T &p)
Definition
HepMCHelpers.h:630
Generated on
for ATLAS Offline Software by
1.17.0