ATLAS Offline Software
Loading...
Searching...
No Matches
TruthTrackSelector.h
Go to the documentation of this file.
1
12
13#ifndef IDTPM2_TRUTHTRACKSELECTOR_H
14#define IDTPM2_TRUTHTRACKSELECTOR_H
15
16// Package includes
18#include "AncestorFinder.h"
19
20// Framework includes
21// #include "InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h"
23
26
27#include <string>
28#include <memory>
29
30
31
32namespace IDTPM2 {
33
35
36public:
37
39
40 TruthTrackSelector( const std::string& name );
41
42 virtual StatusCode initialize() override;
43
44 bool selectTrack( const TrackView& t ) const;
45
46 const xAOD::TruthParticle* getParent( const xAOD::TruthParticle* truth, int flav, int depth=0 ) const;
47
48private:
49
50 ToolHandle< IAthSelectionTool > m_truthTool { this, "truthTool", {}, "Main truth selection tool" };
51
52 std::unique_ptr<IFinder<xAOD::TruthParticle> > m_ancestorFinder = 0;
53
56 // ToolHandle< InDet::IInDetTrackTruthOriginTool > m_trackTruthOriginTool {
57 // this, "trackTruthOriginTool", "InDet::InDetTrackTruthOriginTool", "truth track origin tool" };
58
59 Gaudi::Property<ConfiguredValue<int>> m_pdgId { this, "PdgId", {}, "pdgid is the required particle" };
60
61 Gaudi::Property<ConfiguredValue<int>> m_fromHadronPdgId { this, "FromHadronPdgId", {}, "pdgid is the species of hadron, ie MB::b for a B hadron etc"};
62 Gaudi::Property<ConfiguredValue<int>> m_fromPdgId { this, "FromPdgId", {}, "pdgid is the required ancestor" };
63
64 Gaudi::Property<bool> m_useTruthTool { this, "UseTruthTool", false, "use the offline truth tool" };
65
66 Gaudi::Property<bool> m_isHadron { this, "isHadron", false, "Select hadrons" };
67 Gaudi::Property<bool> m_isPion { this, "isPion", false, "Select pions" };
68
70 // BooleanProperty m_isFromB { this, "isFromB", false, "Select particles from B hadron decay" };
71 // BooleanProperty m_isFromC { this, "isFromC", false, "Select particles from C hadron decay" };
72 Gaudi::Property<bool> m_isFromHeavyFlavour { this, "isFromHeavyFlavour", false, "Select particles from heavy-flvour (B || C) hadron decay" };
73 Gaudi::Property<bool> m_isFromLightFlavour { this, "isFromLightFlavour", false, "Select particles from light-flvour hadron decay" };
74
76 // BooleanProperty m_isFromTau { this, "isFromTau", false, "Selects particles from tau hadron decay"};
77
79 Gaudi::Property<ConfiguredValue<float>> m_minParentPt {this, "minParentPt", {}, "Min cut on parent truth particles"};
80 Gaudi::Property<ConfiguredValue<float>> m_maxParentPt {this, "maxParentPt", {}, "Max cut on parent truth particles"};
81};
82
83} // namespace IDTPM2
84
85#endif // IDTPM2_TRUTHTRACKSELECTOR_H
emacs: this is -*- c++ -*-
emacs: this is -*- c++ -*-
header file for interface of selection tools in this package
GenericTrackSelector(const std::string &name)
const xAOD::TruthParticle * getParent(const xAOD::TruthParticle *truth, int flav, int depth=0) const
Gaudi::Property< bool > m_isFromLightFlavour
Gaudi::Property< bool > m_isHadron
bool selectTrack(const TrackView &t) const
Gaudi::Property< ConfiguredValue< int > > m_pdgId
This here is never used, so comment it out for the time being in case it is important.
Gaudi::Property< ConfiguredValue< int > > m_fromPdgId
Gaudi::Property< bool > m_isFromHeavyFlavour
set with parent pdgid = 4 or 5
Gaudi::Property< bool > m_useTruthTool
ASG_TOOL_CLASS(TruthTrackSelector, ITrackSelector)
Gaudi::Property< ConfiguredValue< float > > m_maxParentPt
std::unique_ptr< IFinder< xAOD::TruthParticle > > m_ancestorFinder
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Gaudi::Property< ConfiguredValue< int > > m_fromHadronPdgId
TruthTrackSelector(const std::string &name)
Gaudi::Property< bool > m_isPion
Gaudi::Property< ConfiguredValue< float > > m_minParentPt
set with parent pdgid = 15
ToolHandle< IAthSelectionTool > m_truthTool
forward declaration required for function prototype
Definition TrackView.h:43
std::string depth
tag string for intendation
Definition fastadd.cxx:46
Search the ancestor history, looking for an ancestor that satifies the predicate ....
Definition AnalysisR4.h:31
TruthParticle_v1 TruthParticle
Typedef to implementation.