Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DecoratePLIT.h
Go to the documentation of this file.
1 // This is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef PROMPT_DECORATEPLIT_H
8 #define PROMPT_DECORATEPLIT_H
9 
10 // Local
12 
13 // Tools
16 
17 // Athena
20 #include "GaudiKernel/ToolHandle.h"
23 
24 // xAOD
26 #include "xAODMuon/MuonContainer.h"
27 
28 
29 namespace Prompt {
30 
31  // Definition of the 4-momentum type
32  typedef TLorentzVector FourMom_t;
33 
35 
36  public:
37  DecoratePLIT(const std::string &name, ISvcLocator *pSvcLocator);
38 
39  virtual StatusCode initialize() override;
40  virtual StatusCode execute (const EventContext&) const override;
41 
42  private:
43  std::shared_ptr<const FlavorTagDiscriminants::SaltModel> m_saltModel{};
44  std::shared_ptr<const FlavorTagDiscriminants::SaltModel> m_saltModel_endcap{};
45 
48 
50 
51  StatusCode predictElec(const xAOD::Electron &electron,
52  const xAOD::TrackParticleContainer &tracks,
53  const xAOD::CaloClusterContainer &caloclusters,
54  std::vector<SG::WriteDecorHandle<xAOD::ElectronContainer, float>> &dec_el_plit_output,
55  const EventContext& ctx) const;
56 
57  StatusCode predictMuon(const xAOD::Muon &muon,
58  const xAOD::TrackParticleContainer &tracks,
59  std::vector<SG::WriteDecorHandle<xAOD::MuonContainer, float>> &dec_mu_plit_output,
60  const EventContext& ctx) const;
61 
62  bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext& ctx) const;
63 
65  float dr_lepton,
66  bool isUsedForElectron,
67  bool isUsedForMuon,
68  const xAOD::TrackParticle* trackLep) const;
69 
70  StatusCode fillParticles(std::vector<const xAOD::IParticle *> &parts,
71  const xAOD::IParticle &lepton,
72  const xAOD::TrackParticle *trackLep,
74  const EventContext& ctx) const;
75 
76  // Properties:
77  Gaudi::Property<std::string> m_leptonsName {
78  this, "LeptonContainerName", "",
79  "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
80  };
81  Gaudi::Property<std::string> m_configPath {this, "ConfigPath", "", "Path of the directory containing the onnx files"};
82  Gaudi::Property<std::string> m_configFileVersion {this, "ConfigFileVersion", "", "Vector of tagger score files"};
83  Gaudi::Property<std::string> m_configFileVersion_endcap {this, "ConfigFileVersion_endcap", "", "Vector of tagger score files for endcap"};
84  Gaudi::Property<std::string> m_TaggerName {this, "TaggerName", "", "Tagger name"};
85  Gaudi::Property<float> m_maxLepTrackdR{
86  this, "maxLepTrackdR", 0.4, "Maximum distance between lepton and track"};
87  Gaudi::Property<float> m_lepCalErelConeSize{
88  this, "lepCalErelConeSize", 0.15, "Cone size for relative calo cluster energy sum"};
89  Gaudi::Property<std::string> m_btagIp_prefix{
90  this, "btagIp_prefix", "btagIp_", "Prefix of b-tagging impact parameter variables (w.r.t. primary vertex)"};
91 
92  // Read/write handles
94  this, "ElectronContainerKey", "Electrons",
95  "Electron container name"
96  };
98  this, "MuonContainerKey", "Muons",
99  "Muon container name"
100  };
102  this, "TrackJetContainerKey", "AntiKtVR30Rmax4Rmin02PV0TrackJets",
103  "VR track jet container name"
104  };
106  this, "TracksContainerKey", "InDetTrackParticles",
107  "Tracks container name"
108  };
110  this, "CaloClusterContainerKey", "egammaClusters",
111  "Calo cluster container name"
112  };
113 
114  // Accessor declarations
115  SG::ReadDecorHandleKey<xAOD::MuonContainer> m_acc_mu_ptvarcone30TTVA {this, "acc_mu_ptvarcone30TTVA",m_muonsKey, "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500"};
116  SG::ReadDecorHandleKey<xAOD::MuonContainer> m_acc_mu_topoetcone30 {this, "acc_mu_topoetcone30",m_muonsKey, "topoetcone30"};
117 
120 
129 
132 
137  };
138 }
139 
140 #endif
Prompt::DecoratePLIT::m_num_lepton_features
int m_num_lepton_features
Definition: DecoratePLIT.h:46
Prompt::DecoratePLIT::fillParticles
StatusCode fillParticles(std::vector< const xAOD::IParticle * > &parts, const xAOD::IParticle &lepton, const xAOD::TrackParticle *trackLep, const xAOD::TrackParticleContainer &trackContainer, const EventContext &ctx) const
Definition: DecoratePLIT.cxx:732
Prompt::DecoratePLIT::m_acc_trk_z0SinTheta
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinTheta
Definition: DecoratePLIT.h:124
Prompt
Definition: DecoratePLIT.h:29
Prompt::DecoratePLIT::DecoratePLIT
DecoratePLIT(const std::string &name, ISvcLocator *pSvcLocator)
Definition: DecoratePLIT.cxx:15
Prompt::DecoratePLIT::decorateTrack
StatusCode decorateTrack(const xAOD::TrackParticle &track, float dr_lepton, bool isUsedForElectron, bool isUsedForMuon, const xAOD::TrackParticle *trackLep) const
Definition: DecoratePLIT.cxx:788
Prompt::DecoratePLIT::m_caloclustersKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloclustersKey
Definition: DecoratePLIT.h:109
Prompt::DecoratePLIT::initialize
virtual StatusCode initialize() override
Definition: DecoratePLIT.cxx:19
Prompt::DecoratePLIT::m_electronsKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
Definition: DecoratePLIT.h:93
Prompt::DecoratePLIT::m_configFileVersion_endcap
Gaudi::Property< std::string > m_configFileVersion_endcap
Definition: DecoratePLIT.h:83
ParticleTest.tp
tp
Definition: ParticleTest.py:25
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
Prompt::DecoratePLIT::execute
virtual StatusCode execute(const EventContext &) const override
Definition: DecoratePLIT.cxx:110
Prompt::DecoratePLIT::m_dec_trk_dr_lepton
const SG::Decorator< float > m_dec_trk_dr_lepton
Definition: DecoratePLIT.h:133
Prompt::DecoratePLIT::predictMuon
StatusCode predictMuon(const xAOD::Muon &muon, const xAOD::TrackParticleContainer &tracks, std::vector< SG::WriteDecorHandle< xAOD::MuonContainer, float >> &dec_mu_plit_output, const EventContext &ctx) const
Definition: DecoratePLIT.cxx:175
Prompt::DecoratePLIT::m_dec_trk_electron_track
const SG::Decorator< char > m_dec_trk_electron_track
Definition: DecoratePLIT.h:134
Prompt::DecoratePLIT::m_dec_mu_plit_output
SG::WriteDecorHandleKeyArray< xAOD::MuonContainer > m_dec_mu_plit_output
Definition: DecoratePLIT.h:131
SG::ReadHandleKey< xAOD::ElectronContainer >
Prompt::DecoratePLIT::m_acc_trk_z0SinThetaUncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinThetaUncertainty
Definition: DecoratePLIT.h:126
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
Prompt::DecoratePLIT::m_acc_trk_muon_track
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_muon_track
Definition: DecoratePLIT.h:127
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
Prompt::DecoratePLIT::initializeAccessors
StatusCode initializeAccessors()
Definition: DecoratePLIT.cxx:155
Prompt::DecoratePLIT::m_acc_trk_dr_leptontrack
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_leptontrack
Definition: DecoratePLIT.h:122
Prompt::DecoratePLIT::m_acc_mu_topoetcone30
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_acc_mu_topoetcone30
Definition: DecoratePLIT.h:116
Prompt::DecoratePLIT::m_dec_trk_muon_track
const SG::Decorator< char > m_dec_trk_muon_track
Definition: DecoratePLIT.h:135
SG::Decorator< float >
ElectronContainer.h
Prompt::DecoratePLIT::m_acc_el_ptvarcone30
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_ptvarcone30
Definition: DecoratePLIT.h:118
SaltModel.h
DecoratePromptLeptonImproved.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
Prompt::DecoratePLIT::m_acc_el_topoetcone30
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_topoetcone30
Definition: DecoratePLIT.h:119
Prompt::DecoratePLIT::m_maxLepTrackdR
Gaudi::Property< float > m_maxLepTrackdR
Definition: DecoratePLIT.h:85
Prompt::DecoratePLIT::m_saltModel
std::shared_ptr< const FlavorTagDiscriminants::SaltModel > m_saltModel
Definition: DecoratePLIT.h:43
Prompt::DecoratePLIT::passed_r22tracking_cuts
bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext &ctx) const
Definition: DecoratePLIT.cxx:652
Prompt::DecoratePLIT::m_dec_el_plit_output
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_dec_el_plit_output
Definition: DecoratePLIT.h:130
Prompt::DecoratePLIT::m_configFileVersion
Gaudi::Property< std::string > m_configFileVersion
Definition: DecoratePLIT.h:82
python.TrackLeptonConfig.trackContainer
string trackContainer
Definition: TrackLeptonConfig.py:23
Prompt::FourMom_t
TLorentzVector FourMom_t
Definition: DecoratePLIT.h:32
Prompt::DecoratePLIT::m_tracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
Definition: DecoratePLIT.h:105
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Prompt::DecoratePLIT
Definition: DecoratePLIT.h:34
WriteDecorHandle.h
Handle class for adding a decoration to an object.
Prompt::DecoratePLIT::m_acc_trk_dr_lepton
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_lepton
Definition: DecoratePLIT.h:121
AthReentrantAlgorithm.h
Prompt::DecoratePLIT::m_TaggerName
Gaudi::Property< std::string > m_TaggerName
Definition: DecoratePLIT.h:84
PathResolver.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Prompt::DecoratePLIT::predictElec
StatusCode predictElec(const xAOD::Electron &electron, const xAOD::TrackParticleContainer &tracks, const xAOD::CaloClusterContainer &caloclusters, std::vector< SG::WriteDecorHandle< xAOD::ElectronContainer, float >> &dec_el_plit_output, const EventContext &ctx) const
Definition: DecoratePLIT.cxx:403
xAOD::Electron_v1
Definition: Electron_v1.h:34
MuonContainer.h
Prompt::DecoratePLIT::m_muonsKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
Definition: DecoratePLIT.h:97
Prompt::DecoratePLIT::m_dec_trk_dr_leptontrack
const SG::Decorator< float > m_dec_trk_dr_leptontrack
Definition: DecoratePLIT.h:136
Prompt::DecoratePLIT::m_lepCalErelConeSize
Gaudi::Property< float > m_lepCalErelConeSize
Definition: DecoratePLIT.h:87
Prompt::DecoratePLIT::m_configPath
Gaudi::Property< std::string > m_configPath
Definition: DecoratePLIT.h:81
Prompt::DecoratePLIT::m_acc_trk_d0
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0
Definition: DecoratePLIT.h:123
Prompt::DecoratePLIT::m_acc_trk_electron_track
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_electron_track
Definition: DecoratePLIT.h:128
Prompt::DecoratePLIT::m_acc_mu_ptvarcone30TTVA
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_acc_mu_ptvarcone30TTVA
Definition: DecoratePLIT.h:115
WriteDecorHandleKeyArray.h
Prompt::DecoratePLIT::m_num_track_features
int m_num_track_features
Definition: DecoratePLIT.h:47
Prompt::DecoratePLIT::m_btagIp_prefix
Gaudi::Property< std::string > m_btagIp_prefix
Definition: DecoratePLIT.h:89
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
Prompt::DecoratePLIT::m_acc_trk_d0Uncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0Uncertainty
Definition: DecoratePLIT.h:125
Decorator.h
Helper class to provide type-safe access to aux data.
Prompt::DecoratePLIT::m_saltModel_endcap
std::shared_ptr< const FlavorTagDiscriminants::SaltModel > m_saltModel_endcap
Definition: DecoratePLIT.h:44
Prompt::DecoratePLIT::m_leptonsName
Gaudi::Property< std::string > m_leptonsName
Definition: DecoratePLIT.h:77
Prompt::DecoratePLIT::m_trackjetsKey
SG::ReadHandleKey< xAOD::JetContainer > m_trackjetsKey
Definition: DecoratePLIT.h:101