ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8// ISF includes
11
13ISF::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
20{
21 ATH_MSG_VERBOSE("Initializing ...");
22
23 // (*) setup parent particle cuts
24 // -> compute p^2 for fast comparison
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
38
39 // parent particle check
40 bool pass = ( ti.parentP2() >= m_minParentP2 );
41
42 return pass;
43}
44
45bool ISF::ValidationTruthStrategy::appliesToRegion(unsigned short geoID) const
46{
47 return std::find( m_regionListProperty.begin(),
49 geoID ) != m_regionListProperty.end();
50}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
ISF interface class for TruthIncidents.
virtual double parentP2() const =0
Return p^2 of the parent particle.
virtual bool pass(ITruthIncident &incident) const override final
true if the ITruthStrategy implementation applies to the given ITruthIncident
Gaudi::Property< double > m_minParentP
minimum parent particle momentum
virtual bool appliesToRegion(unsigned short geoID) const override final
virtual StatusCode initialize() override final
double m_minParentP2
cuts on the parent particle
Gaudi::Property< std::vector< int > > m_regionListProperty
ValidationTruthStrategy(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.