ATLAS Offline Software
Loading...
Searching...
No Matches
TruthQualitySelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef INDETTRACKPERFMON_TRUTHQUALITYSELECTIONTOOL_H
5#define INDETTRACKPERFMON_TRUTHQUALITYSELECTIONTOOL_H
6
7// Package includes
12
13// Framework includes
14#include "AsgTools/AsgTool.h"
16
17// STL includes
18#include <string>
19
24
25namespace IDTPM {
26
28 public virtual IDTPM::ITrackSelectionTool,
29 public asg::AsgTool {
30
31public:
32
34
35 TruthQualitySelectionTool( const std::string& name );
36
37 virtual StatusCode initialize() override;
38
39 virtual StatusCode selectTracks(
40 TrackAnalysisCollections& trkAnaColls ) override;
41
42 bool accept(const xAOD::TruthParticle* truth);
43 const xAOD::TruthParticle* getParent( const xAOD::TruthParticle* truth, int flav) const;
44 const xAOD::TruthParticle* getParentRec(const xAOD::TruthParticle* truth, int flav, int depth) const;
45private:
46
47 ToolHandle< IAthSelectionTool > m_truthTool { this, "truthTool", {}, "Main truth selection tool" };
48 ToolHandle< InDet::IInDetTrackTruthOriginTool > m_trackTruthOriginTool {
49 this, "trackTruthOriginTool", "InDet::InDetTrackTruthOriginTool", "truth track origin tool" };
50
51 FloatProperty m_minAbsEta { this, "minAbsEta", -9999., "Lower cut on |eta| for truth particles" };
52 FloatProperty m_minAbsPhi { this, "minAbsPhi", -9999., "Lower cut on |phi| for truth particles" };
53 FloatProperty m_maxAbsPhi { this, "maxAbsPhi", -9999., "Higher cut on |phi| for truth particles" };
54 FloatProperty m_minAbsD0 { this, "minAbsD0", -9999., "Lower cut on |d0| for truth particles" };
55 FloatProperty m_maxAbsD0 { this, "maxAbsD0", -9999., "Higher cut on |d0| for truth particles" };
56 FloatProperty m_minAbsZ0 { this, "minAbsZ0", -9999., "Lower cut on |z0| for truth particles" };
57 FloatProperty m_maxAbsZ0 { this, "maxAbsZ0", -9999., "Higher cut on |z0| for truth particles" };
58 FloatProperty m_minAbsQoPT { this, "minAbsQoPT", -9999., "Lower cut on |q/pt| for truth particles" };
59 FloatProperty m_maxAbsQoPT { this, "maxAbsQoPT", -9999., "Higher cut on |q/pt| for truth particles" };
60 FloatProperty m_minEta { this, "minEta", -9999., "Lower cut on eta for truth particles" };
61 FloatProperty m_maxEta { this, "maxEta", -9999., "Higher cut on eta for truth particles" };
62 FloatProperty m_minPhi { this, "minPhi", -9999., "Lower cut on phi for truth particles" };
63 FloatProperty m_maxPhi { this, "maxPhi", -9999., "Higher cut on phi for truth particles" };
64 FloatProperty m_minD0 { this, "minD0", -9999., "Lower cut on d0 for truth particles" };
65 FloatProperty m_maxD0 { this, "maxD0", -9999., "Higher cut on d0 for truth particles" };
66 FloatProperty m_minZ0 { this, "minZ0", -9999., "Lower cut on z0 for truth particles" };
67 FloatProperty m_maxZ0 { this, "maxZ0", -9999., "Higher cut on z0 for truth particles" };
68 FloatProperty m_minQoPT { this, "minQoPT", -9999., "Lower cut on q/pt for truth particles" };
69 FloatProperty m_maxQoPT { this, "maxQoPT", -9999., "Higher cut on q/pt for truth particles" };
70 BooleanProperty m_isHadron { this, "isHadron", false, "Select hadrons" };
71 BooleanProperty m_isPion { this, "isPion", false, "Select pions" };
72 BooleanProperty m_isFromB { this, "isFromB", false, "Select particles from B hadron decay" };
73 BooleanProperty m_isFromC { this, "isFromC", false, "Select particles from C hadron decay" };
74 BooleanProperty m_isFromHeavyFlav { this, "isFromHeavyFlav", false, "Select particles from heavy-flvour (B or C) hadron decay" };
75 BooleanProperty m_isFromLightFlav { this, "isFromLightFlav", false, "Select particles from light-flvour hadron decay" };
76
77 BooleanProperty m_isFromTau { this, "isFromTau", false, "Selects particles from tau hadron decay"};
78 FloatProperty m_minParentPt {this, "minParentPt", -9999., "Min cut on parent truth particles"};
79 FloatProperty m_maxParentPt {this, "maxParentPt", -9999., "Max cut on parent truth particles"};
80};
81
82} // namespace IDTPM
83
84#endif // INDETTRACKPERFMON_TRUTHQUALITYSELECTIONTOOL_H
header file for interface of selection tools in this package
header file for interface for all the various track selection tools in this package
Class to hold for each event collections needed in the TrkAnalsis.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
ASG_TOOL_CLASS(TruthQualitySelectionTool, ITrackSelectionTool)
bool accept(const xAOD::TruthParticle *truth)
virtual StatusCode selectTracks(TrackAnalysisCollections &trkAnaColls) override
const xAOD::TruthParticle * getParent(const xAOD::TruthParticle *truth, int flav) const
ToolHandle< InDet::IInDetTrackTruthOriginTool > m_trackTruthOriginTool
const xAOD::TruthParticle * getParentRec(const xAOD::TruthParticle *truth, int flav, int depth) const
TruthQualitySelectionTool(const std::string &name)
ToolHandle< IAthSelectionTool > m_truthTool
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
std::string depth
tag string for intendation
Definition fastadd.cxx:46
Athena include(s).
TruthParticle_v1 TruthParticle
Typedef to implementation.