ATLAS Offline Software
CopyTruthJetParticles.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef COPYTRUTHJETPARTICLES_H
6 #define COPYTRUTHJETPARTICLES_H
7 
9 #include "AsgTools/ToolHandle.h"
13 #include <vector>
14 #include <map>
15 
18 public:
19 
21  CopyTruthJetParticles(const std::string& name);
22 
24  virtual StatusCode initialize();
25 
26 
28  virtual int execute() const;
29 
32  std::vector<const xAOD::TruthParticle*>& promptLeptons,
33  std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
34 
35  // metadata check
36  int setBarCodeFromMetaDataCheck() const;
37 
39  bool classify(const xAOD::TruthParticle* ) const {return false;}
40 
41 private:
42 
43  // Options for storate
44  Gaudi::Property<bool> m_includeBSMNonInt{this, "IncludeBSMNonInteracting", false,
45  "Include noninteracting BSM particles (excluding neutrinos) in the output collection"};
46  Gaudi::Property<bool> m_includeNu{this,"IncludeNeutrinos", false,
47  "Include neutrinos in the output collection"};
48  Gaudi::Property<bool> m_includeMu{this, "IncludeMuons", false,
49  "Include muons in the output collection"};
50  Gaudi::Property<bool> m_includePromptLeptons{this, "IncludePromptLeptons", true,
51  "Include leptons from prompt decays (i.e. not from hadron decays) in the output collection"};
52  Gaudi::Property<bool> m_includePromptPhotons{this, "IncludePromptPhotons", true,
53  "Include photons from Higgs and other decays that produce isolated photons"};
54  Gaudi::Property<bool> m_chargedOnly{this, "ChargedParticlesOnly", false,
55  "Include only charged particles in the output collection" };
56  // -- added for dark jet clustering -- //
57  Gaudi::Property<bool> m_includeSM{this, "IncludeSMParts", true,
58  "Include SM particles in the output collection"};
59  Gaudi::Property<bool> m_includeDark{this, "IncludeDarkHads", false,
60  "Include dark hadrons in the output collection"};
61 
62  unsigned int getTCresult(const xAOD::TruthParticle* tp,
63  std::map<const xAOD::TruthParticle*,unsigned int>& tc_results) const;
64 
66  Gaudi::Property<float> m_maxAbsEta{this, "MaxAbsEta" , 5.};
67 
68  Gaudi::Property<std::vector<int>> m_vetoPDG_IDs{this, "VetoPDG_IDs", {},
69  "List of PDG IDs (python list) to veto. Will ignore these and all children of these."};
70  bool comesFrom( const xAOD::TruthParticle* tp, const int pdgID, std::vector<int>& used_vertices ) const;
71 
73  Gaudi::Property<std::string> m_dressingName{this, "DressingDecorationName", "",
74  "Name of the dressed photon decoration (if one should be used)"};
75 
77  ToolHandle<IMCTruthClassifier> m_classif{this, "MCTruthClassifier", ""};
78 };
79 
80 
81 #endif
PropertyWrapper.h
CopyTruthJetParticles::m_chargedOnly
Gaudi::Property< bool > m_chargedOnly
Definition: CopyTruthJetParticles.h:54
CopyTruthJetParticles::m_includeSM
Gaudi::Property< bool > m_includeSM
Definition: CopyTruthJetParticles.h:57
CopyTruthJetParticles::comesFrom
bool comesFrom(const xAOD::TruthParticle *tp, const int pdgID, std::vector< int > &used_vertices) const
Definition: CopyTruthJetParticles.cxx:248
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
ParticleTest.tp
tp
Definition: ParticleTest.py:25
IJetExecuteTool
IJetExecuteTool is a dual-use tool interface for generic tools, i.e. those that behave like algorithm...
Definition: IJetExecuteTool.h:19
CopyTruthJetParticles::m_maxAbsEta
Gaudi::Property< float > m_maxAbsEta
Maximum allowed eta for particles in jets.
Definition: CopyTruthJetParticles.h:66
CopyTruthJetParticles::m_includeDark
Gaudi::Property< bool > m_includeDark
Definition: CopyTruthJetParticles.h:59
CopyTruthJetParticles::m_includeMu
Gaudi::Property< bool > m_includeMu
Definition: CopyTruthJetParticles.h:48
CopyTruthJetParticles::classify
bool classify(const xAOD::TruthParticle *) const
The base classify() is not used.
Definition: CopyTruthJetParticles.h:39
IMCTruthClassifier.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
CopyTruthJetParticles::setBarCodeFromMetaDataCheck
int setBarCodeFromMetaDataCheck() const
Definition: CopyTruthJetParticles.cxx:133
CopyTruthJetParticles::m_includePromptLeptons
Gaudi::Property< bool > m_includePromptLeptons
Definition: CopyTruthJetParticles.h:50
CopyTruthJetParticles::m_dressingName
Gaudi::Property< std::string > m_dressingName
Name of the decoration to be used for identifying FSR (dressing) photons.
Definition: CopyTruthJetParticles.h:73
CopyTruthJetParticles::execute
virtual int execute() const
redefine execute so we can call our own classify() with the barcode offset for the current event.
Definition: CopyTruthJetParticles.cxx:157
CopyTruthJetParticles::m_includePromptPhotons
Gaudi::Property< bool > m_includePromptPhotons
Definition: CopyTruthJetParticles.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CopyTruthJetParticles::m_includeBSMNonInt
Gaudi::Property< bool > m_includeBSMNonInt
Definition: CopyTruthJetParticles.h:44
CopyTruthJetParticles::m_classif
ToolHandle< IMCTruthClassifier > m_classif
Handle on MCTruthClassifier for finding prompt leptons.
Definition: CopyTruthJetParticles.h:77
CopyTruthJetParticles::classifyJetInput
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)
Definition: CopyTruthJetParticles.cxx:47
CopyTruthParticles.h
CopyTruthJetParticles::m_vetoPDG_IDs
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
Definition: CopyTruthJetParticles.h:68
CopyTruthJetParticles::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: CopyTruthJetParticles.cxx:36
CopyTruthParticles
Definition: CopyTruthParticles.h:18
CopyTruthJetParticles::getTCresult
unsigned int getTCresult(const xAOD::TruthParticle *tp, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Definition: CopyTruthJetParticles.cxx:123
CopyTruthJetParticles
Definition: CopyTruthJetParticles.h:16
ToolHandle.h
CopyTruthJetParticles::m_includeNu
Gaudi::Property< bool > m_includeNu
Definition: CopyTruthJetParticles.h:46
TruthParticle.h
CopyTruthJetParticles::CopyTruthJetParticles
CopyTruthJetParticles(const std::string &name)
Constructor.
Definition: CopyTruthJetParticles.cxx:34