ATLAS Offline Software
Loading...
Searching...
No Matches
TruthVertexDecoratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef PARTICLEJETTOOLS_TRUTHVERTEXDECORATORALG_H
5#define PARTICLEJETTOOLS_TRUTHVERTEXDECORATORALG_H
6
13
15#include "GaudiKernel/ToolHandle.h"
20
21namespace ParticleJetTools{
22
24 public:
25 TruthVertexDecoratorAlg(const std::string& name,
26 ISvcLocator* pSvcLocator );
27
28 virtual StatusCode initialize() override;
29 virtual StatusCode execute(const EventContext& ) const override;
30
31 private:
32 Gaudi::Property<bool> m_use_barcode {
33 this, "useBarcode", false, "use barcode rather than UID"
34 };
36 // Input for truth particles and truth vertices
38 this, "truthContainer", "TruthParticles",
39 "Key for the input truth particle collection"};
40
42 this, "TruthPrimaryVertices", "TruthPrimaryVertices",
43 "Key for the input truth PV collection"};
45 this, "TruthVertices", "TruthVertices",
46 "Key for the input truth vertex collection"};
47
48 // Input for tracks and constituents
50 this, "trackContainer", "InDetTrackParticles",
51 "Key for the input track collection"};
52
54 this, "ftagTrackDecayVertexID", "ftagTrackDecayVertexID",
55 "Vertex ID that this track is the decay product of"};
57 this, "ftagTrackDecayVertexType", "ftagTrackDecayVertexType",
58 "Detailed vertex type that this track is the decay product of"};
60 this, "ftagTrackDecaySimpleVertexType", "ftagTrackDecaySimpleVertexType",
61 "Simple Vertex type that this track is the decay product of"};
63 this, "trackPDGID", "trackPDGID",
64 "PDGID of truth-matched particle"};
66 this, "trackParentPDGID", "trackParentPDGID",
67 "PDGID of truth-matched particle's parent"};
68
69 // Accessors for writing vertex info to truth particles
71 this, "ftagTPValid", "ftagTPValid",
72 "Is this truth particle physical - excludes gluons, free quarks, (bosons?)"};
73
75 this, "ftagTPDecayVertexType", "ftagTPDecayVertexType",
76 "Exclusive label for this truth particles decay type"};
78 this, "ftagTPDecaySimpleVertexType", "ftagTPDecaySimpleVertexType",
79 "Exclusive label for this truth particles decay type"};
80
82 this, "ftagTPDecayVertexID", "ftagTPDecayVertexID",
83 "ID for this truth particle vertex ID"};
85 this, "ftagTPDecayVertexParentID", "ftagTPDecayVertexParentID",
86 "ID for this truth particles parent ID"};
87 // We write charged and neutral summary at truth level - in case some decays are too
88 // low pT to be kept
90 this, "ftagTPDecayVertexNCharged", "ftagTPDecayVertexNCharged",
91 "Number of charged particles in the decay vertex"};
93 this, "ftagTPDecayVertexNNeutral", "ftagTPDecayVertexNNeutral",
94 "Number of neutral particles in the decay vertex (with pT threshold)"};
96 this, "ftagTPDecayVertexAllNCharged", "ftagTPDecayVertexAllNCharged",
97 "Number of charged particles in the decay vertex"};
99 this, "ftagTPDecayVertexAllNNeutral", "ftagTPDecayVertexAllNNeutral",
100 "Number of neutral particles in the decay vertex (no pT threshold)"};
101
103 this, "ftagTPDecayPVDistance", "ftagTPDecayPVDistance",
104 "Three distance from PV->this particle decay"};
106 this, "ftagTPDecayDistance", "ftagTPDecayDistance",
107 "Three distance from this particle creation->this particle decay"};
109 this, "ftagTPIsVertex", "ftagTPIsVertex",
110 "Is this particle a vertex (decays with >= 2 children)"};
111
113 this, "ftagTPDecayVertexIDReader", "ftagTPDecayVertexID",
114 "Accessor for the truth type label of the truth particle"};
115
116 ToolHandle<InDet::InDetTrackTruthOriginTool> m_trackTruthOriginTool {
117 this, "trackTruthOriginTool", "InDet::InDetTrackTruthOriginTool",
118 "track truth origin tool"};
119
120 Gaudi::Property<float> m_truthVertexMergeDistance {
121 this, "truthVertexMergeDistance", 1.0,
122 "Merge any truth vertices within this distance [mm]. Default 1.0 mm "
123 "folds pi0 decays (ctau ~25 nm) into their parent vertex."};
124 Gaudi::Property<float> m_truthParticleMinimumPt {
125 this, "truthParticleMinimumPt", 0,
126 "Minimum pT [MeV] for counting charged/neutral multiplicities in NCharged/NNeutral (AllNCharged/AllNNeutral have no cut)"};
127 Gaudi::Property<bool> m_alwaysKeepStableNeutrals {
128 this, "alwaysKeepStableNeutrals", true,
129 "Always keep final state neutrals"};
131 this, "alwaysKeepTracklessStableCharged", true,
132 "Always keep final state charged particles that don't have an associated track"};
133 Gaudi::Property<bool> m_alwaysKeepStableCharged {
134 this, "alwaysKeepStableCharged", true,
135 "Always keep final state charged particles, even the particle has an associated track"};
136
137 Gaudi::Property<std::string> m_truthMatchProbabilityAuxName {
138 this, "truthMatchProbabilityAuxName", "truthMatchProbability",
139 "Name of the aux variable on track which contains its TMP score"};
140 Gaudi::Property<float> m_truthMatchProbabilityCut {
141 this, "truthMatchProbabilityCut", 0.5,
142 "Tracks below this TMP value are assigned as Fakes"};
143
144 SG::AuxElement::ConstAccessor<float> m_truthMatchProbabilityAcc{"truthMatchProbability"};
145
146
147 }; // End of TruthVertexDecoratorAlg
148} // End of ParticleJetTools namespace
149#endif // PARTICLEJETTOOLS_TRUTHVERTEXDECORATORALG_H
Base class for elements of a container that can have aux data.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayType
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackTPDecayVertexType
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayDistance
TruthVertexDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayNCharged
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayPVDistance
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_acc_truth_particle_vertex_id
virtual StatusCode execute(const EventContext &) const override
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexValid
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayNNeutral
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackTPDecayVertexID
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_TruthContainerKey
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_TruthVertexContainerKey
Gaudi::Property< std::string > m_truthMatchProbabilityAuxName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackContainerKey
ToolHandle< InDet::InDetTrackTruthOriginTool > m_trackTruthOriginTool
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayID
SG::AuxElement::ConstAccessor< float > m_truthMatchProbabilityAcc
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayParentID
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_TruthPVsKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayAllNCharged
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackPDGID
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexDecayAllNNeutral
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexSimpleDecayType
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_vertexIsVertex
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackTPDecaySimpleVertexType
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParentPDGID
Helper class to provide constant type-safe access to aux data.