ATLAS Offline Software
Loading...
Searching...
No Matches
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
27
28
29namespace 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 FlavorTagInference::SaltModel> m_saltModel{};
44 std::shared_ptr<const FlavorTagInference::SaltModel> m_saltModel_endcap{};
45
48
49 StatusCode initializeAccessors();
50
55 const xAOD::Electron &electron,
56 const xAOD::TrackParticleContainer &tracks,
57 const xAOD::CaloClusterContainer &caloclusters,
58 std::vector<SG::WriteDecorHandle<xAOD::ElectronContainer, float>> &dec_el_plit_output,
59 const EventContext& ctx) const;
60
65 const xAOD::Muon &muon,
66 const xAOD::TrackParticleContainer &tracks,
67 std::vector<SG::WriteDecorHandle<xAOD::MuonContainer, float>> &dec_mu_plit_output,
68 const EventContext& ctx) const;
69
70 bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext& ctx) const;
71
76 const xAOD::TrackParticle& track,
77 float dr_lepton,
78 bool isUsedForElectron,
79 bool isUsedForMuon,
80 const xAOD::TrackParticle* trackLep) const;
81
86 std::vector<const xAOD::IParticle *> &parts,
87 const xAOD::IParticle &lepton,
88 const xAOD::TrackParticle *trackLep,
89 const xAOD::TrackParticleContainer &trackContainer,
90 const EventContext& ctx) const;
91
92 // Properties:
93 Gaudi::Property<std::string> m_leptonsName {
94 this, "LeptonContainerName", "",
95 "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
96 };
97 Gaudi::Property<std::string> m_configPath {this, "ConfigPath", "", "Path of the directory containing the onnx files"};
98 Gaudi::Property<std::string> m_configFileVersion {this, "ConfigFileVersion", "", "Vector of tagger score files"};
99 Gaudi::Property<std::string> m_configFileVersion_endcap {this, "ConfigFileVersion_endcap", "", "Vector of tagger score files for endcap"};
100 Gaudi::Property<std::string> m_TaggerName {this, "TaggerName", "", "Tagger name"};
101 Gaudi::Property<float> m_maxLepTrackdR{
102 this, "maxLepTrackdR", 0.4, "Maximum distance between lepton and track"};
103 Gaudi::Property<float> m_lepCalErelConeSize{
104 this, "lepCalErelConeSize", 0.15, "Cone size for relative calo cluster energy sum"};
105 Gaudi::Property<std::string> m_btagIp_prefix{
106 this, "btagIp_prefix", "btagIp_", "Prefix of b-tagging impact parameter variables (w.r.t. primary vertex)"};
107
108 // Read/write handles
110 this, "ElectronContainerKey", "Electrons",
111 "Electron container name"
112 };
114 this, "MuonContainerKey", "Muons",
115 "Muon container name"
116 };
118 this, "TrackJetContainerKey", "AntiKtVR30Rmax4Rmin02PV0TrackJets",
119 "VR track jet container name"
120 };
122 this, "TracksContainerKey", "InDetTrackParticles",
123 "Tracks container name"
124 };
126 this, "CaloClusterContainerKey", "egammaClusters",
127 "Calo cluster container name"
128 };
129
130 // Accessor declarations
131 SG::ReadDecorHandleKey<xAOD::MuonContainer> m_acc_mu_ptvarcone30TTVA {this, "acc_mu_ptvarcone30TTVA",m_muonsKey, "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500"};
133
136
145
148
153
154 };
155}
156
157#endif
Handle class for adding a decoration to an object.
Helper class to provide type-safe access to aux data.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< xAOD::JetContainer > m_trackjetsKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_dr_leptontrack
StatusCode initializeAccessors()
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_ptvarcone30
Gaudi::Property< std::string > m_leptonsName
StatusCode decorateTrack(SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_lepton, SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_leptontrack, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_electron_track, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_muon_track, const xAOD::TrackParticle &track, float dr_lepton, bool isUsedForElectron, bool isUsedForMuon, const xAOD::TrackParticle *trackLep) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloclustersKey
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel_endcap
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_dec_el_plit_output
Gaudi::Property< float > m_lepCalErelConeSize
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext &ctx) const
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_acc_mu_topoetcone30
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_acc_mu_ptvarcone30TTVA
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_topoetcone30
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_muon_track
Gaudi::Property< std::string > m_configPath
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinThetaUncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0Uncertainty
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel
Gaudi::Property< float > m_maxLepTrackdR
StatusCode predictElec(SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_lepton, SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_leptontrack, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_electron_track, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_muon_track, 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
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_dr_lepton
SG::WriteDecorHandleKeyArray< xAOD::MuonContainer > m_dec_mu_plit_output
DecoratePLIT(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinTheta
StatusCode fillParticles(SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_lepton, SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_leptontrack, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_electron_track, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_muon_track, std::vector< const xAOD::IParticle * > &parts, const xAOD::IParticle &lepton, const xAOD::TrackParticle *trackLep, const xAOD::TrackParticleContainer &trackContainer, const EventContext &ctx) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_lepton
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_electron_track
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_electron_track
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
StatusCode predictMuon(SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_lepton, SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > &dec_trk_dr_leptontrack, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_electron_track, SG::WriteDecorHandle< xAOD::TrackParticleContainer, char > &dec_trk_muon_track, const xAOD::Muon &muon, const xAOD::TrackParticleContainer &tracks, std::vector< SG::WriteDecorHandle< xAOD::MuonContainer, float > > &dec_mu_plit_output, const EventContext &ctx) const
Gaudi::Property< std::string > m_TaggerName
Gaudi::Property< std::string > m_configFileVersion_endcap
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_leptontrack
Gaudi::Property< std::string > m_btagIp_prefix
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_muon_track
virtual StatusCode execute(const EventContext &) const override
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
Gaudi::Property< std::string > m_configFileVersion
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
Class providing the definition of the 4-vector interface.
TLorentzVector FourMom_t
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Electron_v1 Electron
Definition of the current "egamma version".