ATLAS Offline Software
Loading...
Searching...
No Matches
CopyTruthJetParticles.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 COPYTRUTHJETPARTICLES_H
6#define COPYTRUTHJETPARTICLES_H
7
8#include "AsgTools/AsgTool.h"
16#include "AsgTools/ToolHandle.h"
20#include <vector>
21#include <map>
22
26 public:
27
29 CopyTruthJetParticles(const std::string& name);
30
32 virtual StatusCode initialize() override final;
33
35 virtual int execute() const override final;
36
37private:
40 std::vector<const xAOD::TruthParticle*>& promptLeptons,
41 std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
42
43 unsigned int getTCresult(const xAOD::TruthParticle* tp,
44 std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
45
46 bool comesFrom( const xAOD::TruthParticle* tp, const int pdgID, std::vector<int>& used_vertices ) const;
47
49 ToolHandle<IMCTruthClassifier> m_classif{this, "MCTruthClassifier", ""};
50
52 SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventKey{this, "TruthEventKey", "TruthEvents", "SG Key for input truth event container"};
53
55 SG::ReadDecorHandleKeyArray<xAOD::TruthParticleContainer> m_dressingNames{this, "DressingDecorationNames", {}, "Name of the dressed photon decoration (if one should be used)"};
56
58 SG::WriteHandleKey<ConstDataVector<xAOD::TruthParticleContainer> > m_outTruthPartKey{this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"};
59
61 Gaudi::Property<float> m_ptmin{this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"};
62
64 Gaudi::Property<float> m_maxAbsEta{this, "MaxAbsEta" , 5.};
65
66 Gaudi::Property<std::vector<int>> m_vetoPDG_IDs{this, "VetoPDG_IDs", {},
67 "List of PDG IDs (python list) to veto. Will ignore these and all children of these."};
68
69 // Options for storate
70 Gaudi::Property<bool> m_includeBSMNonInt{this, "IncludeBSMNonInteracting", false,
71 "Include noninteracting BSM particles (excluding neutrinos) in the output collection"};
72 Gaudi::Property<bool> m_includeNu{this,"IncludeNeutrinos", false,
73 "Include neutrinos in the output collection"};
74 Gaudi::Property<bool> m_includeMu{this, "IncludeMuons", false,
75 "Include muons in the output collection"};
76 Gaudi::Property<bool> m_includePromptLeptons{this, "IncludePromptLeptons", true,
77 "Include leptons from prompt decays (i.e. not from hadron decays) in the output collection"};
78 Gaudi::Property<bool> m_includePromptPhotons{this, "IncludePromptPhotons", true,
79 "Include photons from Higgs and other decays that produce isolated photons"};
80 Gaudi::Property<bool> m_chargedOnly{this, "ChargedParticlesOnly", false,
81 "Include only charged particles in the output collection" };
82 // -- added for dark jet clustering -- //
83 Gaudi::Property<bool> m_includeSM{this, "IncludeSMParts", true,
84 "Include SM particles in the output collection"};
85 Gaudi::Property<bool> m_includeDark{this, "IncludeDarkHads", false,
86 "Include dark hadrons in the output collection"};
87
88 // ATLASRECTS-8290: this is for backward compatability, remove eventually
89 Gaudi::Property<bool> m_use_barcode {
90 this, "useBarcode", false, "use barcode rather than UID"
91 };
93
94};
95
96
97#endif
#define ASG_TOOL_INTERFACE(CLASSNAME)
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector adapter that acts like it holds const pointers.
SG::ConstAccessor< int > m_uid
Gaudi::Property< bool > m_includeDark
bool comesFrom(const xAOD::TruthParticle *tp, const int pdgID, std::vector< int > &used_vertices) const
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Key for input truth event.
virtual StatusCode initialize() override final
Function initialising the tool.
Gaudi::Property< bool > m_includeSM
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
Gaudi::Property< bool > m_includeBSMNonInt
bool classifyJetInput(const xAOD::TruthParticle *tp, std::vector< const xAOD::TruthParticle * > &promptLeptons, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Redefine our own Classifier function(s).
Gaudi::Property< bool > m_includeNu
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey
Key for output truth particles.
ToolHandle< IMCTruthClassifier > m_classif
Handle on MCTruthClassifier for finding prompt leptons.
unsigned int getTCresult(const xAOD::TruthParticle *tp, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Gaudi::Property< bool > m_includePromptLeptons
Gaudi::Property< float > m_maxAbsEta
Maximum allowed eta for particles in jets.
Gaudi::Property< bool > m_includePromptPhotons
Gaudi::Property< bool > m_use_barcode
Gaudi::Property< float > m_ptmin
Minimum pT for particle selection (in MeV).
CopyTruthJetParticles(const std::string &name)
Constructor.
Gaudi::Property< bool > m_chargedOnly
virtual int execute() const override final
redefine execute so we can call our own classify()
Gaudi::Property< bool > m_includeMu
SG::ReadDecorHandleKeyArray< xAOD::TruthParticleContainer > m_dressingNames
Name of the decoration to be used for identifying FSR (dressing) photons.
IJetExecuteTool is a dual-use tool interface for generic tools, i.e. those that behave like algorithm...
Helper class to provide constant type-safe access to aux data.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
TruthParticle_v1 TruthParticle
Typedef to implementation.