ATLAS Offline Software
Loading...
Searching...
No Matches
GenericTruthStrategy.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_TOOLS_GENERICTRUTHSTRATEGY_H
6#define ISF_TOOLS_GENERICTRUTHSTRATEGY_H 1
7
8// stl includes
9#include <set>
10#include <vector>
11
12// Athena includes
15
16// ISF includes
18
19namespace ISF {
20 typedef std::vector<int> VertexTypesVector;
21 typedef std::set<int> VertexTypesSet;
22 typedef std::vector<int> PDGCodesVector;
23 typedef std::set<int> PDGCodesSet;
24
31 class GenericTruthStrategy final : public extends<AthAlgTool, ITruthStrategy> {
32
33 public:
35 GenericTruthStrategy( const std::string& t, const std::string& n, const IInterface* p );
36
39
40 // Athena algtool's Hooks
41 virtual StatusCode initialize() override final;
42
44 virtual bool pass( ITruthIncident& incident) const override final;
45
46 virtual bool appliesToRegion(unsigned short geoID) const override final;
47 private:
48 // provide either a pT or Ekin cut for the parent and child particles respectively.
49 // if none are given for either type, it will not use pT or Ekin cuts
50 // (the Pt2 variables get squared in the initialize() method)
51
54 bool m_useParentPt{true};
55 double m_parentPt2{-1.};
56 Gaudi::Property<double> m_parentPt{this, "ParentMinPt", -1.};
57 Gaudi::Property<double> m_parentEkin{this, "ParentMinEkin", -1.};
58
61 bool m_useChildPt{true};
62 double m_childPt2{-1.};
63 Gaudi::Property<double> m_childPt{this, "ChildMinPt", -1.};
64 Gaudi::Property<double> m_childEkin{this, "ChildMinEkin", -1.};
65 Gaudi::Property<bool> m_allowChildrenOrParentPass{this, "AllowChildrenOrParentPassKineticCuts", false};
66 // if set to true, kinetic cuts are passed even if only child particles pass them
67 // (used for special cases such as de-excitation)
68
70 Gaudi::Property<VertexTypesVector> m_vertexTypesVector{this, "VertexTypes", 0};
73 Gaudi::Property<int> m_vertexTypeRangeLow{this, "VertexTypeRangeLow", 0};
74 Gaudi::Property<int> m_vertexTypeRangeHigh{this, "VertexTypeRangeHigh", 0};
76
78 Gaudi::Property<PDGCodesVector> m_parentPdgCodesVector{this, "ParentPDGCodes", 0};
80
81 IntegerArrayProperty m_regionListProperty{this, "Regions", {}};
82 };
83
84}
85
86
87#endif //> !ISF_TOOLS_GENERICTRUTHSTRATEGY_H
virtual bool pass(ITruthIncident &incident) const override final
true if the ITruthStrategy implementation applies to the given ITruthIncident
virtual StatusCode initialize() override final
virtual bool appliesToRegion(unsigned short geoID) const override final
Gaudi::Property< VertexTypesVector > m_vertexTypesVector
vertex type (physics code) checks
bool m_useChildPt
child particle kinetic energy / transverse momentum cuts (pT is stored as pT^2 which allows for faste...
IntegerArrayProperty m_regionListProperty
bool m_useParentPt
parent kinetic energy / transverse momentum cuts (pT is stored as pT^2 which allows for faster compar...
Gaudi::Property< double > m_childEkin
Ekin cut.
VertexTypesSet m_vertexTypes
optimized for search
Gaudi::Property< double > m_childPt
pT momentum cut
Gaudi::Property< bool > m_allowChildrenOrParentPass
pass cuts if parent did not
Gaudi::Property< PDGCodesVector > m_parentPdgCodesVector
PDG code checks.
GenericTruthStrategy(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
~GenericTruthStrategy()=default
Destructor.
PDGCodesSet m_parentPdgCodes
optimized for search
Gaudi::Property< int > m_vertexTypeRangeLow
Gaudi::Property< double > m_parentPt
parent particle
Gaudi::Property< double > m_parentEkin
parent particle
Gaudi::Property< int > m_vertexTypeRangeHigh
ISF interface class for TruthIncidents.
ISFParticleOrderedQueue.
std::vector< int > PDGCodesVector
std::set< int > VertexTypesSet
std::set< int > PDGCodesSet
std::vector< int > VertexTypesVector
#define private