ATLAS Offline Software
Loading...
Searching...
No Matches
CopyTruthJetParticles.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef COPYTRUTHJETPARTICLES_H
6#define COPYTRUTHJETPARTICLES_H
7
8#include "AsgTools/AsgTool.h"
15#include "AsgTools/ToolHandle.h"
19#include <vector>
20#include <map>
21
25 public:
26
28 CopyTruthJetParticles(const std::string& name);
29
31 virtual StatusCode initialize() override final;
32
34 virtual int execute() const override final;
35
36private:
39 std::vector<const xAOD::TruthParticle*>& promptLeptons,
40 std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
41
42 unsigned int getTCresult(const xAOD::TruthParticle* tp,
43 std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
44
45 bool comesFrom( const xAOD::TruthParticle* tp, const int pdgID, std::vector<int>& used_vertices ) const;
46
48 ToolHandle<IMCTruthClassifier> m_classif{this, "MCTruthClassifier", ""};
49
51 SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleKey{this, "TruthParticleKey", "TruthParticles", "SG Key for input truth particle container"};
52
54 SG::ReadDecorHandleKeyArray<xAOD::TruthParticleContainer> m_dressingNames{this, "DressingDecorationNames", {}, "Name of the dressed photon decoration (if one should be used)"};
55
57 SG::WriteHandleKey<ConstDataVector<xAOD::TruthParticleContainer> > m_outTruthPartKey{this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"};
58
60 Gaudi::Property<float> m_ptmin{this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"};
61
63 Gaudi::Property<float> m_maxAbsEta{this, "MaxAbsEta" , 5.};
64
65 Gaudi::Property<std::vector<int>> m_vetoPDG_IDs{this, "VetoPDG_IDs", {},
66 "List of PDG IDs (python list) to veto. Will ignore these and all children of these."};
67
68 // Options for storate
69 Gaudi::Property<bool> m_includeBSMNonInt{this, "IncludeBSMNonInteracting", false,
70 "Include noninteracting BSM particles (excluding neutrinos) in the output collection"};
71 Gaudi::Property<bool> m_includeNu{this,"IncludeNeutrinos", false,
72 "Include neutrinos in the output collection"};
73 Gaudi::Property<bool> m_includeMu{this, "IncludeMuons", false,
74 "Include muons in the output collection"};
75 Gaudi::Property<bool> m_includePromptLeptons{this, "IncludePromptLeptons", true,
76 "Include leptons from prompt decays (i.e. not from hadron decays) in the output collection"};
77 Gaudi::Property<bool> m_includePromptPhotons{this, "IncludePromptPhotons", true,
78 "Include photons from Higgs and other decays that produce isolated photons"};
79 Gaudi::Property<bool> m_chargedOnly{this, "ChargedParticlesOnly", false,
80 "Include only charged particles in the output collection" };
81 // -- added for dark jet clustering -- //
82 Gaudi::Property<bool> m_includeSM{this, "IncludeSMParts", true,
83 "Include SM particles in the output collection"};
84 Gaudi::Property<bool> m_includeDark{this, "IncludeDarkHads", false,
85 "Include dark hadrons in the output collection"};
86
87 // ATLASRECTS-8290: this is for backward compatability, remove eventually
88 Gaudi::Property<bool> m_use_barcode {
89 this, "useBarcode", false, "use barcode rather than UID"
90 };
92
93};
94
95
96#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
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
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleKey
Key for input truth event.
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.