ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_HepMC
ISF_HepMC_Tools
src
ValidationTruthStrategy.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 "
ValidationTruthStrategy.h
"
7
8
// ISF includes
9
#include "
ISF_Event/ITruthIncident.h
"
10
#include "
ISF_Event/ISFParticle.h
"
11
13
ISF::ValidationTruthStrategy::ValidationTruthStrategy
(
const
std::string& t,
const
std::string& n,
const
IInterface* p) :
14
base_class(t,n,p)
15
{
16
}
17
18
// Athena algtool's Hooks
19
StatusCode
ISF::ValidationTruthStrategy::initialize
()
20
{
21
ATH_MSG_VERBOSE
(
"Initializing ..."
);
22
23
// (*) setup parent particle cuts
24
// -> compute p^2 for fast comparison
25
m_minParentP2
=
m_minParentP
*
m_minParentP
;
26
27
for
(
auto
region :
m_regionListProperty
.value()) {
28
if
(region < AtlasDetDescr::fFirstAtlasRegion || region >=
AtlasDetDescr::fNumAtlasRegions
) {
29
ATH_MSG_ERROR
(
"Unknown Region ("
<< region <<
") specified. Please check your configuration."
);
30
return
StatusCode::FAILURE;
31
}
32
}
33
34
return
StatusCode::SUCCESS;
35
}
36
37
bool
ISF::ValidationTruthStrategy::pass
(
ITruthIncident
& ti)
const
{
38
39
// parent particle check
40
bool
pass
= ( ti.
parentP2
() >=
m_minParentP2
);
41
42
return
pass
;
43
}
44
45
bool
ISF::ValidationTruthStrategy::appliesToRegion
(
unsigned
short
geoID)
const
46
{
47
return
std::find(
m_regionListProperty
.begin(),
48
m_regionListProperty
.end(),
49
geoID ) !=
m_regionListProperty
.end();
50
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ISFParticle.h
ITruthIncident.h
ValidationTruthStrategy.h
ISF::ITruthIncident
ISF interface class for TruthIncidents.
Definition
ITruthIncident.h:45
ISF::ITruthIncident::parentP2
virtual double parentP2() const =0
Return p^2 of the parent particle.
ISF::ValidationTruthStrategy::pass
virtual bool pass(ITruthIncident &incident) const override final
true if the ITruthStrategy implementation applies to the given ITruthIncident
Definition
ValidationTruthStrategy.cxx:37
ISF::ValidationTruthStrategy::m_minParentP
Gaudi::Property< double > m_minParentP
minimum parent particle momentum
Definition
ValidationTruthStrategy.h:45
ISF::ValidationTruthStrategy::appliesToRegion
virtual bool appliesToRegion(unsigned short geoID) const override final
Definition
ValidationTruthStrategy.cxx:45
ISF::ValidationTruthStrategy::initialize
virtual StatusCode initialize() override final
Definition
ValidationTruthStrategy.cxx:19
ISF::ValidationTruthStrategy::m_minParentP2
double m_minParentP2
cuts on the parent particle
Definition
ValidationTruthStrategy.h:44
ISF::ValidationTruthStrategy::m_regionListProperty
Gaudi::Property< std::vector< int > > m_regionListProperty
Definition
ValidationTruthStrategy.h:46
ISF::ValidationTruthStrategy::ValidationTruthStrategy
ValidationTruthStrategy(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition
ValidationTruthStrategy.cxx:13
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition
AtlasRegion.h:33
Generated on
for ATLAS Offline Software by
1.17.0