ATLAS Offline Software
Loading...
Searching...
No Matches
Prompt::DecoratePLIT Class Reference

#include <DecoratePLIT.h>

Inheritance diagram for Prompt::DecoratePLIT:

Public Member Functions

 DecoratePLIT (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode initializeAccessors ()
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
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
bool passed_r22tracking_cuts (const xAOD::TrackParticle &tp, const EventContext &ctx) const
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
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
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::shared_ptr< const FlavorTagInference::SaltModelm_saltModel {}
std::shared_ptr< const FlavorTagInference::SaltModelm_saltModel_endcap {}
int m_num_lepton_features {}
int m_num_track_features {}
Gaudi::Property< std::string > m_leptonsName
Gaudi::Property< std::string > m_configPath {this, "ConfigPath", "", "Path of the directory containing the onnx files"}
Gaudi::Property< std::string > m_configFileVersion {this, "ConfigFileVersion", "", "Vector of tagger score files"}
Gaudi::Property< std::string > m_configFileVersion_endcap {this, "ConfigFileVersion_endcap", "", "Vector of tagger score files for endcap"}
Gaudi::Property< std::string > m_TaggerName {this, "TaggerName", "", "Tagger name"}
Gaudi::Property< float > m_maxLepTrackdR
Gaudi::Property< float > m_lepCalErelConeSize
Gaudi::Property< std::string > m_btagIp_prefix
SG::ReadHandleKey< xAOD::ElectronContainerm_electronsKey
SG::ReadHandleKey< xAOD::MuonContainerm_muonsKey
SG::ReadHandleKey< xAOD::JetContainerm_trackjetsKey
SG::ReadHandleKey< xAOD::TrackParticleContainerm_tracksKey
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloclustersKey
SG::ReadDecorHandleKey< xAOD::MuonContainerm_acc_mu_ptvarcone30TTVA {this, "acc_mu_ptvarcone30TTVA",m_muonsKey, "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500"}
SG::ReadDecorHandleKey< xAOD::MuonContainerm_acc_mu_topoetcone30 {this, "acc_mu_topoetcone30",m_muonsKey, "topoetcone30"}
SG::ReadDecorHandleKey< xAOD::ElectronContainerm_acc_el_ptvarcone30 {this,"acc_el_ptvarcone30",m_electronsKey, "ptvarcone30"}
SG::ReadDecorHandleKey< xAOD::ElectronContainerm_acc_el_topoetcone30 {this,"acc_el_topoetcone30",m_electronsKey, "topoetcone30"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_dr_lepton {this, "acc_trk_dr_lepton",m_tracksKey, "dr_lepton"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_dr_leptontrack {this, "acc_trk_dr_leptontrack",m_tracksKey, "dr_leptontrack"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_d0 {this,"acc_trk_d0", m_tracksKey, m_btagIp_prefix + "d0"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_z0SinTheta {this, "acc_trk_z0SinTheta", m_tracksKey, m_btagIp_prefix + "z0SinTheta"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_d0Uncertainty {this, "acc_trk_d0Uncertainty", m_tracksKey, m_btagIp_prefix + "d0Uncertainty"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_z0SinThetaUncertainty {this, "acc_trk_z0SinThetaUncertainty", m_tracksKey, m_btagIp_prefix + "z0SinThetaUncertainty"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_muon_track {this, "acc_trk_muon_track", m_tracksKey, "muon_track"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_acc_trk_electron_track {this,"acc_trk_electron_track", m_tracksKey, "electron_track"}
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainerm_dec_el_plit_output {this, "PLITelOutput", {}}
SG::WriteDecorHandleKeyArray< xAOD::MuonContainerm_dec_mu_plit_output {this, "PLITmuOutput", {}}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_dec_trk_dr_lepton {this, "dec_trk_dr_lepton", m_tracksKey, "dr_lepton"}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_dec_trk_electron_track {this, "dec_trk_electron_track", m_tracksKey, "electron_track"}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_dec_trk_muon_track {this, "dec_trk_muon_track", m_tracksKey, "muon_track"}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_dec_trk_dr_leptontrack {this, "dec_trk_dr_leptontrack", m_tracksKey, "dr_leptontrack"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 34 of file DecoratePLIT.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DecoratePLIT()

Prompt::DecoratePLIT::DecoratePLIT ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 15 of file DecoratePLIT.cxx.

16 : AthReentrantAlgorithm(name, pSvcLocator)
17 {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorateTrack()

StatusCode Prompt::DecoratePLIT::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
private

Definition at line 835 of file DecoratePLIT.cxx.

845 {
846 // Apply values to decorators
847 dec_trk_dr_lepton(track) = dr_lepton;
848 dec_trk_electron_track(track) = static_cast<char>(isUsedForElectron);
849 dec_trk_muon_track(track) = static_cast<char>(isUsedForMuon);
850
851 float dr_leptontrack = -99;
852 if (trackLep) {
853 if (trackLep->pt() > 0.) {
854 dr_leptontrack = track.p4().DeltaR(trackLep->p4());
855 }
856 }
857 dec_trk_dr_leptontrack(track) = dr_leptontrack;
858
859 return StatusCode::SUCCESS;
860 }
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Prompt::DecoratePLIT::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 116 of file DecoratePLIT.cxx.

116 {
117 SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_tracksKey, ctx);
118 SG::ReadHandle<xAOD::CaloClusterContainer> caloclusters(m_caloclustersKey, ctx);
119
120 // Define decorators
121 SG::WriteDecorHandle<xAOD::TrackParticleContainer, float> dec_trk_dr_lepton{m_dec_trk_dr_lepton, ctx};
122 SG::WriteDecorHandle<xAOD::TrackParticleContainer, char> dec_trk_electron_track{m_dec_trk_electron_track, ctx};
123 SG::WriteDecorHandle<xAOD::TrackParticleContainer, char> dec_trk_muon_track{m_dec_trk_muon_track, ctx};
124 SG::WriteDecorHandle<xAOD::TrackParticleContainer, float> dec_trk_dr_leptontrack{m_dec_trk_dr_leptontrack, ctx};
125
126 // Make sure the decorations are filled for every track
127 for (const xAOD::TrackParticle* track : *tracks) {
128 dec_trk_dr_lepton(*track) = -999.0;
129 dec_trk_dr_leptontrack(*track) = -999.0;
130 dec_trk_electron_track(*track) = static_cast<char>(false);
131 dec_trk_muon_track(*track) = static_cast<char>(false);
132 }
133
134 if (!m_electronsKey.empty()) {
135 // prepare decorators
136 // ------------------
137 std::vector<SG::WriteDecorHandle<xAOD::ElectronContainer, float>> dec_el_plit_output;
138 for (const auto& wdhk: m_dec_el_plit_output) {
139 dec_el_plit_output.emplace_back(wdhk, ctx);
140 }
141 SG::ReadHandle<xAOD::ElectronContainer> electrons(m_electronsKey, ctx);
142 for (const xAOD::Electron* elec : *electrons) {
143 if (!predictElec(dec_trk_dr_lepton, dec_trk_dr_leptontrack, dec_trk_electron_track, dec_trk_muon_track,
144 *elec, *tracks, *caloclusters, dec_el_plit_output, ctx)) {
145 ATH_MSG_ERROR("DecoratePLIT::execute - failed to predict electron");
146 return StatusCode::FAILURE;
147 }
148 }
149 } else if (!m_muonsKey.empty()) {
150 // prepare decorators
151 // ------------------
152 std::vector<SG::WriteDecorHandle<xAOD::MuonContainer, float>> dec_mu_plit_output;
153 for (const auto& wdhk: m_dec_mu_plit_output) {
154 dec_mu_plit_output.emplace_back(wdhk, ctx);
155 }
156 SG::ReadHandle<xAOD::MuonContainer> muons(m_muonsKey, ctx);
157 for (const xAOD::Muon* muon : *muons) {
158 if (!predictMuon(dec_trk_dr_lepton, dec_trk_dr_leptontrack, dec_trk_electron_track, dec_trk_muon_track,
159 *muon, *tracks, dec_mu_plit_output, ctx)) {
160 ATH_MSG_ERROR("DecoratePLIT::execute - failed to predict muon");
161 return StatusCode::FAILURE;
162 }
163 }
164 }
165
166 return StatusCode::SUCCESS;
167 }
#define ATH_MSG_ERROR(x)
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_dr_leptontrack
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloclustersKey
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_dec_el_plit_output
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trk_muon_track
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
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
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ fillParticles()

StatusCode Prompt::DecoratePLIT::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
private

Definition at line 774 of file DecoratePLIT.cxx.

784 {
785 // get lepton four momentum
786 const FourMom_t lepton_p4 = lepton.p4();
787
788 // Precompute tracks used for reconstruction
789 std::set<const xAOD::TrackParticle*> tracksUsedForElectron;
790 std::set<const xAOD::TrackParticle*> tracksUsedForMuon;
791 if (const auto* elec = dynamic_cast<const xAOD::Electron*>(&lepton)) {
792 tracksUsedForElectron = xAOD::EgammaHelpers::getTrackParticles(elec, true); // useBremAssoc = true
793 } else if (const auto* muon = dynamic_cast<const xAOD::Muon*>(&lepton)) {
794 if (muon->muonType() == xAOD::Muon::Combined && muon->inDetTrackParticleLink().isValid()) {
795 tracksUsedForMuon.insert(*(muon->inDetTrackParticleLink())); // even if the primary track should be a combined track, we still use the id for the match
796 }
797 }
798
799 // Loop over tracks and store them
800 for (const xAOD::TrackParticle *track: trackContainer) {
801 if (!track) {
802 ATH_MSG_ERROR("DecoratePLIT::fillParticles - null track pointer");
803 continue;
804 }
805 // check if track passed selection
806 if (!passed_r22tracking_cuts(*track, ctx)) continue;
807
808 // decorate track
809 float dr_lepton = (lepton.p4().Pt() > 0.) ? track->p4().DeltaR(lepton.p4()) : -99;
810
811 // do not even waste time to decorate something which is not used
812 if (dr_lepton > m_maxLepTrackdR && m_maxLepTrackdR>=0) {continue;}
813
814 bool isUsedForElectron = tracksUsedForElectron.count(track);
815 bool isUsedForMuon = tracksUsedForMuon.count(track);
816
817 if (!decorateTrack(dec_trk_dr_lepton, dec_trk_dr_leptontrack, dec_trk_electron_track, dec_trk_muon_track,
818 *track, dr_lepton, isUsedForElectron, isUsedForMuon, trackLep)) {
819 ATH_MSG_ERROR("DecoratePLIT::fillParticles - failed to decorate track");
820 return StatusCode::FAILURE;
821 }
822
823 parts.push_back(track);
824 }
825
826 // Sort tracks by dR distance to lepton
827 auto SORT_TRACKLEP = [&lepton_p4](const xAOD::IParticle* a, const xAOD::IParticle* b) {
828 return a->p4().DeltaR(lepton_p4) < b->p4().DeltaR(lepton_p4);
829 };
830 std::sort(parts.begin(), parts.end(), SORT_TRACKLEP);
831
832 return StatusCode::SUCCESS;
833 }
static Double_t a
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
bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext &ctx) const
Gaudi::Property< float > m_maxLepTrackdR
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
TLorentzVector FourMom_t
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode Prompt::DecoratePLIT::initialize ( )
overridevirtual

Definition at line 19 of file DecoratePLIT.cxx.

19 {
20 ATH_MSG_DEBUG("Initializing DecoratePLIT " << name() );
21 ATH_MSG_DEBUG("m_leptonsName = " << m_leptonsName);
22
23 ATH_MSG_DEBUG("Initializing " << m_electronsKey);
24 ATH_MSG_DEBUG("Initializing " << m_muonsKey);
25 ATH_MSG_DEBUG("Initializing " << m_trackjetsKey);
26 ATH_MSG_DEBUG("Initializing " << m_tracksKey);
27 ATH_MSG_DEBUG("Initializing " << m_caloclustersKey);
28
29 ATH_CHECK(m_electronsKey.initialize(m_leptonsName == "Electrons"));
30 ATH_CHECK(m_muonsKey.initialize(m_leptonsName == "Muons"));
31 ATH_CHECK(m_trackjetsKey.initialize());
32 ATH_CHECK(m_tracksKey.initialize());
33 ATH_CHECK(m_caloclustersKey.initialize());
34
35 // initialise accessors
37
38 // Load and initialize the neural network model from the given file path.
39 if(m_leptonsName == "Electrons") {
40 std::string fullPathToOnnxFile = PathResolverFindCalibFile(m_configPath.value() + m_configFileVersion.value());
41 m_saltModel = std::make_shared<FlavorTagInference::SaltModel>(fullPathToOnnxFile);
42
43 std::string fullPathToOnnxFile_endcap = PathResolverFindCalibFile(m_configPath.value() + m_configFileVersion_endcap.value());
44 m_saltModel_endcap = std::make_shared<FlavorTagInference::SaltModel>(fullPathToOnnxFile_endcap);
45
48
49 // set up decorators using a dummy query of the onnx model
50 std::map<std::string, FlavorTagInference::Inputs> gnn_input;
51
52 std::vector<float> elec_feat(m_num_lepton_features, 0.);
53 std::vector<int64_t> elec_feat_dim = {1, static_cast<int64_t>(elec_feat.size())};
54 FlavorTagInference::Inputs elec_info (elec_feat, elec_feat_dim);
55 gnn_input.insert({"jet_features", elec_info}); // need to use the "jet_features" keyword as we are borrowing flavour tagging code
56
57 std::vector<float> track_feat(m_num_track_features, 0.);
58 std::vector<int64_t> track_feat_dim = {1, m_num_track_features};
59 FlavorTagInference::Inputs track_info(track_feat, track_feat_dim);
60 gnn_input.insert({"track_features", track_info});
61
62 auto [out_f, out_vc, out_vf] = m_saltModel->runInference(gnn_input); // the dummy evaluation
63
64 std::vector<std::string> output_names;
65 for (auto& singlefloat : out_f){
66 ATH_MSG_DEBUG("Found Electron output: "+singlefloat.first);
67 std::string outname = m_electronsKey.key()+"." + m_TaggerName + "_" + (singlefloat.first.find("elxpromp") != std::string::npos ? "PLITel_pelxpromp" : "PLITel_pnpxall" );
68 ATH_MSG_DEBUG("Decorating as "+outname);
69 output_names.push_back(outname);
70 }
71 ATH_CHECK(m_dec_el_plit_output.assign(output_names));
72 ATH_CHECK(m_dec_el_plit_output.initialize());
73 }
74 else if (m_leptonsName == "Muons") {
75 std::string fullPathToOnnxFile = PathResolverFindCalibFile(m_configPath.value() + m_configFileVersion.value());
76 m_saltModel = std::make_shared<FlavorTagInference::SaltModel>(fullPathToOnnxFile);
77
80
81 // set up decorators using a dummy query of the onnx model
82 std::map<std::string, FlavorTagInference::Inputs> gnn_input;
83
84 std::vector<float> muon_feat(m_num_lepton_features, 0.);
85 std::vector<int64_t> muon_feat_dim = {1, static_cast<int64_t>(muon_feat.size())};
86 FlavorTagInference::Inputs muon_info (muon_feat, muon_feat_dim);
87 gnn_input.insert({"jet_features", muon_info}); // need to use the "jet_features" keyword as we are borrowing flavour tagging code
88
89 std::vector<float> track_feat(m_num_track_features, 0.);
90 std::vector<int64_t> track_feat_dim = {1, m_num_track_features};
91 FlavorTagInference::Inputs track_info(track_feat, track_feat_dim);
92 gnn_input.insert({"track_features", track_info});
93
94 auto [out_f, out_vc, out_vf] = m_saltModel->runInference(gnn_input); // the dummy evaluation
95
96 std::vector<std::string> output_names;
97 for (auto& singlefloat : out_f){
98 ATH_MSG_DEBUG("Found Muon output: "+singlefloat.first);
99 std::string outname = m_muonsKey.key()+"." + m_TaggerName + "_" + (singlefloat.first.find("muxpromp") != std::string::npos ? "TPLTmu_pmuxpromp" : "TPLTmu_pnpxall" );
100 ATH_MSG_DEBUG("Decorating as "+outname);
101 output_names.push_back(outname);
102 }
103 ATH_CHECK(m_dec_mu_plit_output.assign(output_names));
104 ATH_CHECK(m_dec_mu_plit_output.initialize());
105 }
106 else {
107 ATH_MSG_ERROR(" ==> topology is not recognised! aborting.");
108 return StatusCode::FAILURE;
109 }
110
111 ATH_MSG_INFO("DecoratePLIT " << name() << " initialization done." );
112
113 return StatusCode::SUCCESS;
114 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
SG::ReadHandleKey< xAOD::JetContainer > m_trackjetsKey
StatusCode initializeAccessors()
Gaudi::Property< std::string > m_leptonsName
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel_endcap
Gaudi::Property< std::string > m_configPath
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel
Gaudi::Property< std::string > m_TaggerName
Gaudi::Property< std::string > m_configFileVersion_endcap
Gaudi::Property< std::string > m_configFileVersion
std::pair< std::vector< float >, std::vector< int64_t > > Inputs

◆ initializeAccessors()

StatusCode Prompt::DecoratePLIT::initializeAccessors ( )
private

Definition at line 169 of file DecoratePLIT.cxx.

169 {
170
171 ATH_CHECK(m_acc_mu_ptvarcone30TTVA.initialize(!m_muonsKey.empty()));
172 ATH_CHECK(m_acc_mu_topoetcone30.initialize(!m_muonsKey.empty()));
173
174 ATH_CHECK(m_acc_el_ptvarcone30.initialize(!m_electronsKey.empty()));
175 ATH_CHECK(m_acc_el_topoetcone30.initialize(!m_electronsKey.empty()));
176
177 ATH_CHECK(m_acc_trk_dr_lepton.initialize());
179 ATH_CHECK(m_acc_trk_d0.initialize());
180 ATH_CHECK(m_acc_trk_z0SinTheta.initialize());
183 ATH_CHECK(m_acc_trk_muon_track.initialize());
185
186 ATH_CHECK(m_dec_trk_dr_lepton.initialize());
188 ATH_CHECK(m_dec_trk_muon_track.initialize());
190
195
196 return StatusCode::SUCCESS;
197
198 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_ptvarcone30
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0
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::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinThetaUncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0Uncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinTheta
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_lepton
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_electron_track
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_leptontrack
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_muon_track

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ passed_r22tracking_cuts()

bool Prompt::DecoratePLIT::passed_r22tracking_cuts ( const xAOD::TrackParticle & tp,
const EventContext & ctx ) const
private

Definition at line 694 of file DecoratePLIT.cxx.

695 {
696 // r22 default track selection for flavour tagging GN2 algorithm
697 constexpr float pt_minimum = 500; // MeV
698 constexpr float abs_eta_maximum = 2.5;
699 constexpr float d0_maximum = 3.5;
700 constexpr float z0_maximum= 5.0;
701 constexpr unsigned char si_hits_minimum = 8;
702 constexpr unsigned char si_shared_maximum = 1;
703 constexpr unsigned char si_holes_maximum = 2;
704 constexpr unsigned char pix_holes_maximum = 1;
705
706 // accessors
707 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_d0{m_acc_trk_d0, ctx};
708 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_z0SinTheta{m_acc_trk_z0SinTheta, ctx};
709
710 // get hit pixel info
711 uint8_t pix_shared = 0;
713 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelSharedHits");
714 return false;
715 }
716 uint8_t sct_shared = 0;
717 if(!tp.summaryValue(sct_shared,xAOD::numberOfSCTSharedHits)){
718 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTSharedHits");
719 return false;
720 }
721 uint8_t pix_hits = 0;
722 if(!tp.summaryValue(pix_hits,xAOD::numberOfPixelHits)){
723 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelHits");
724 return false;
725 }
726 uint8_t sct_hits = 0;
727 if(!tp.summaryValue(sct_hits,xAOD::numberOfSCTHits)){
728 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTHits");
729 return false;
730 }
731 uint8_t pix_dead = 0;
733 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelDeadSensors");
734 return false;
735 }
736 uint8_t sct_dead = 0;
738 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTDeadSensors");
739 return false;
740 }
741 uint8_t pix_holes = 0;
742 if(!tp.summaryValue(pix_holes,xAOD::numberOfPixelHoles)){
743 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelHoles");
744 return false;
745 }
746 uint8_t sct_holes = 0;
747 if(!tp.summaryValue(sct_holes,xAOD::numberOfSCTHoles)){
748 ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTHoles");
749 return false;
750 }
751
752 if (std::abs(tp.eta()) > abs_eta_maximum)
753 return false;
754 double n_module_shared = (pix_shared + sct_shared / 2);
755 if (n_module_shared > si_shared_maximum)
756 return false;
757 if (tp.pt() <= pt_minimum)
758 return false;
759 if (std::isfinite(d0_maximum) &&
760 std::abs(acc_d0(tp)) >= d0_maximum)
761 return false;
762 if (std::isfinite(z0_maximum) &&
763 std::abs(acc_z0SinTheta(tp)) >= z0_maximum)
764 return false;
765 if (pix_hits + pix_dead + sct_hits + sct_dead < si_hits_minimum)
766 return false;
767 if ((pix_holes + sct_holes) > si_holes_maximum)
768 return false;
769 if (pix_holes > pix_holes_maximum)
770 return false;
771 return true;
772 }
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].

◆ predictElec()

StatusCode Prompt::DecoratePLIT::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
private

Definition at line 437 of file DecoratePLIT.cxx.

446 {
447 // prepare input
448 // -------------
449 std::map<std::string, FlavorTagInference::Inputs> gnn_input;
450
451 // accessors
452 // ---------
453 SG::ReadDecorHandle<xAOD::ElectronContainer, float> acc_ptvarcone30{m_acc_el_ptvarcone30, ctx};
454 SG::ReadDecorHandle<xAOD::ElectronContainer, float> acc_topoetcone30{m_acc_el_topoetcone30, ctx};
455
456 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_dr_lepton{m_acc_trk_dr_lepton, ctx};
457 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_dr_leptontrack{m_acc_trk_dr_leptontrack, ctx};
458 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_d0{m_acc_trk_d0, ctx};
459 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_z0SinTheta{m_acc_trk_z0SinTheta, ctx};
460 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_d0Uncertainty{m_acc_trk_d0Uncertainty, ctx};
461 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_z0SinThetaUncertainty{m_acc_trk_z0SinThetaUncertainty, ctx};
462 SG::ReadDecorHandle<xAOD::TrackParticleContainer, char> acc_electron_track{m_acc_trk_electron_track, ctx};
463
464 // collect electron features
465 float elec_pt = electron.pt();
466 float elec_eta = electron.eta();
467 float elec_phi = electron.phi();
468 float elec_ptvarcone30Rel = acc_ptvarcone30(electron) / elec_pt;
469 float elec_topoetcone30Rel = acc_topoetcone30(electron) / elec_pt;
470
471 // compute electron calorimeter cluster information
472 float elec_caloClusterSumEtRel = 0.0;
473 float sumCoreEt_large = 0.0;
474 if (electron.caloCluster()) {
475 float elec_calEta = electron.caloCluster()->eta();
476 float elec_calPhi = electron.caloCluster()->phi();
477
478 for (const xAOD::CaloCluster *cluster: caloclusters) {
479 float deta = elec_calEta - cluster->eta();
480 float dphi = TVector2::Phi_mpi_pi(elec_calPhi - cluster->phi());
481 float dr = std::sqrt(deta*deta + dphi*dphi);
482
483 if (dr < m_lepCalErelConeSize) {
484 sumCoreEt_large += cluster->pt();
485 }
486 }
487 }
488 elec_caloClusterSumEtRel = sumCoreEt_large / elec_pt;
489
490 // collect best matched GSF electron track kinematics
491 const xAOD::TrackParticle *electronTrack = nullptr;
492 const xAOD::TrackParticle *bestmatchedGSFElTrack = electron.trackParticle(0);
493 if (bestmatchedGSFElTrack) {
494 electronTrack = xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(bestmatchedGSFElTrack);
495 }
496
497 //float elec_pt_track = -99;
498 //float elec_eta_track = -99;
499 //float elec_phi_track = -99;
500 //if (electronTrack) {
501 // elec_pt_track = electronTrack->pt();
502 // elec_eta_track = electronTrack->eta();
503 // elec_phi_track = electronTrack->phi();
504 //}
505
506 std::vector<float> electron_feat = {
507 elec_pt,
508 elec_eta,
509 elec_phi,
510 elec_ptvarcone30Rel,
511 elec_topoetcone30Rel,
512 elec_caloClusterSumEtRel};
513 std::vector<int64_t> electron_feat_dim = {1, static_cast<int64_t>(electron_feat.size())};
514
515 // need to use the "jet_features" keyword as we are borrowing flavour tagging code
516 FlavorTagInference::Inputs electron_info (electron_feat, electron_feat_dim);
517 gnn_input.insert({"jet_features", electron_info});
518
519 // decorate and fill track particles around the electron
520 std::vector<const xAOD::IParticle *> parts;
521 if (!fillParticles(dec_trk_dr_lepton, dec_trk_dr_leptontrack, dec_trk_electron_track, dec_trk_muon_track,
522 parts, electron, electronTrack, tracks, ctx)) {
523 ATH_MSG_ERROR("DecoratePLIT::execute - failed to fill particles");
524 return StatusCode::FAILURE;
525 }
526
527 // collect track features from track particles
528 std::vector<float> track_feat;
529 track_feat.reserve(parts.size() * static_cast<int64_t>(electron_feat.size()));
530
531 for (const xAOD::IParticle *part: parts) {
532 const xAOD::TrackParticle *track = dynamic_cast<const xAOD::TrackParticle*>(part);
533 if (!track) {
534 ATH_MSG_ERROR("DecoratePLIT::execute - null track pointer");
535 continue;
536 }
537
538 // dr_lepton
539 // float dr_lepton = acc_dr_lepton(*track);
540 // deta_lepton
541 float deta_lepton = track->p4().Eta() - electron.eta();
542 // dphi_lepton
543 float dphi_lepton = track->p4().DeltaPhi(electron.p4());
544 // qOverP
545 float qoverp = track->qOverP();
546 // btagIp_d0
547 float d0 = acc_d0(*track);
548 // btagIp_z0SinTheta
549 float z0SinTheta = acc_z0SinTheta(*track);
550 // btagIp_d0_significance
551 float d0Uncertainty = acc_d0Uncertainty(*track);
552 float d0_significance = -99;
553 if (std::abs(d0Uncertainty) > 0) d0_significance = d0 / d0Uncertainty;
554 // btagIp_z0SinTheta_significance
555 float z0SinThetaUncertainty = acc_z0SinThetaUncertainty(*track);
556 float z0SinTheta_significance = -99;
557 if (std::abs(z0SinThetaUncertainty) > 0) z0SinTheta_significance = z0SinTheta / z0SinThetaUncertainty;
558 // numberOfInnermostPixelLayerHits
559 uint8_t pix_innermosthits = 0;
560 if(!track->summaryValue(pix_innermosthits,xAOD::numberOfInnermostPixelLayerHits)){
561 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerHits");
562 return StatusCode::FAILURE;
563 }
564 // numberOfNextToInnermostPixelLayerHits
565 uint8_t pix_nextinnermosthits = 0;
566 if(!track->summaryValue(pix_nextinnermosthits,xAOD::numberOfNextToInnermostPixelLayerHits)){
567 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfNextToInnermostPixelLayerHits");
568 return StatusCode::FAILURE;
569 }
570 // numberOfInnermostPixelLayerSharedHits
571 uint8_t pix_innermostsharedhits = 0;
572 if(!track->summaryValue(pix_innermostsharedhits,xAOD::numberOfInnermostPixelLayerSharedHits)){
573 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSharedHits");
574 return StatusCode::FAILURE;
575 }
576 // numberOfInnermostPixelLayerSplitHits
577 uint8_t pix_innermostsplithits = 0;
578 if(!track->summaryValue(pix_innermostsplithits,xAOD::numberOfInnermostPixelLayerSplitHits)){
579 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSplitHits");
580 return StatusCode::FAILURE;
581 }
582 // numberOfPixelHits
583 uint8_t pix_hits = 0;
584 if(!track->summaryValue(pix_hits,xAOD::numberOfPixelHits)){
585 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelHits");
586 return StatusCode::FAILURE;
587 }
588 // numberOfPixelSharedHits
589 uint8_t pix_shared = 0;
590 if(!track->summaryValue(pix_shared,xAOD::numberOfPixelSharedHits)){
591 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSharedHits");
592 return StatusCode::FAILURE;
593 }
594 // numberOfPixelSplitHits
595 uint8_t pix_split = 0;
596 if(!track->summaryValue(pix_split,xAOD::numberOfPixelSplitHits)){
597 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSplitHits");
598 return StatusCode::FAILURE;
599 }
600 // numberOfSCTHits
601 uint8_t sct_hits = 0;
602 if(!track->summaryValue(sct_hits,xAOD::numberOfSCTHits)){
603 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTHits");
604 return StatusCode::FAILURE;
605 }
606 // numberOfSCTSharedHits
607 uint8_t sct_shared = 0;
608 if(!track->summaryValue(sct_shared,xAOD::numberOfSCTSharedHits)){
609 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTSharedHits");
610 return StatusCode::FAILURE;
611 }
612 // electron_track
613 char electron_track = acc_electron_track(*track);
614
615
616 //track_feat.push_back(dr_lepton); // removed in the latest trainings, redundan
617 track_feat.push_back(deta_lepton);
618 track_feat.push_back(dphi_lepton);
619 track_feat.push_back(qoverp);
620 track_feat.push_back(d0);
621 track_feat.push_back(z0SinTheta);
622 track_feat.push_back(d0_significance);
623 track_feat.push_back(z0SinTheta_significance);
624 track_feat.push_back(pix_innermosthits);
625 track_feat.push_back(pix_nextinnermosthits);
626 track_feat.push_back(pix_innermostsharedhits);
627 track_feat.push_back(pix_innermostsplithits);
628 track_feat.push_back(pix_hits);
629 track_feat.push_back(pix_shared);
630 track_feat.push_back(pix_split);
631 track_feat.push_back(sct_hits);
632 track_feat.push_back(sct_shared);
633 track_feat.push_back(electron_track);
634 }
635
636 // prepare track features for inference
637 int num_cnsts = parts.size();
638 std::vector<int64_t> track_feat_dim = {num_cnsts, m_num_track_features};
639
640 FlavorTagInference::Inputs track_info (track_feat, track_feat_dim);
641 gnn_input.insert({"track_features", track_info});
642
643 if (msgLvl(MSG::VERBOSE)) {
644 ATH_MSG_VERBOSE("gnn_input size = " << gnn_input.size());
645 for (auto& inp : gnn_input){
646 ATH_MSG_VERBOSE(" " + inp.first + " dim = ");
647 for (auto & dim: inp.second.second) {
648 ATH_MSG_VERBOSE(" " + std::to_string(dim));
649 }
650 ATH_MSG_VERBOSE(" " + inp.first + " content = ");
651 for (auto & con: inp.second.first) {
652 ATH_MSG_VERBOSE(" " + std::to_string(con));
653 }
654 }
655 }
656
657 // run inference
658 // -------------
659 // use different model for endcap electrons
660 auto [out_f, out_vc, out_vf] = (std::abs(elec_eta) < 1.37) ? m_saltModel->runInference(gnn_input) : m_saltModel_endcap->runInference(gnn_input);
661 if (msgLvl(MSG::VERBOSE)) {
662 ATH_MSG_VERBOSE("runInference done.");
663
664 ATH_MSG_VERBOSE("Output Float(s):");
665 for (auto& singlefloat : out_f){
666 ATH_MSG_VERBOSE(singlefloat.first + " = " << singlefloat.second);
667 }
668 ATH_MSG_VERBOSE("Output vector char(s):");
669 for (auto& vecchar : out_vc){
670 ATH_MSG_VERBOSE(vecchar.first + " = ");
671 for (auto& cc : vecchar.second){
672 ATH_MSG_VERBOSE(cc);
673 }
674 }
675 ATH_MSG_VERBOSE("Output vector float(s):");
676 for (auto& vecfloat : out_vf){
677 ATH_MSG_VERBOSE(vecfloat.first + " = ");
678 for (auto& ff : vecfloat.second){
679 ATH_MSG_VERBOSE(ff);
680 }
681 }
682 }
683 // filling the tagger scores
684 auto it_dec_el_plit_output = dec_el_plit_output.begin();
685 for (auto& singlefloat : out_f){
686 ATH_MSG_DEBUG("DecoratePLIT::execute - Electron output: " + singlefloat.first + " = " + std::to_string(singlefloat.second));
687 (*it_dec_el_plit_output)(electron) = singlefloat.second;
688 ++it_dec_el_plit_output;
689 }
690
691 return StatusCode::SUCCESS;
692 }
#define ATH_MSG_VERBOSE(x)
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< float > m_lepCalErelConeSize
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
float z0SinTheta(const U &p)
const std::string d0Uncertainty
const std::string z0SinThetaUncertainty
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ numberOfInnermostPixelLayerSplitHits
number of Pixel 0th layer barrel hits split by cluster splitting
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer

◆ predictMuon()

StatusCode Prompt::DecoratePLIT::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
private

Definition at line 200 of file DecoratePLIT.cxx.

208 {
209 // set up accessors
210 // ---------------
211 SG::ReadDecorHandle<xAOD::MuonContainer, float> acc_ptvarcone30TTVA{m_acc_mu_ptvarcone30TTVA, ctx};
212 SG::ReadDecorHandle<xAOD::MuonContainer, float> acc_topoetcone30{m_acc_mu_topoetcone30, ctx};
213
214 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_dr_lepton{m_acc_trk_dr_lepton, ctx};
215 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_dr_leptontrack{m_acc_trk_dr_leptontrack, ctx};
216 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_d0{m_acc_trk_d0, ctx};
217 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_z0SinTheta{m_acc_trk_z0SinTheta, ctx};
218 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_d0Uncertainty{m_acc_trk_d0Uncertainty, ctx};
219 SG::ReadDecorHandle<xAOD::TrackParticleContainer, float> acc_z0SinThetaUncertainty{m_acc_trk_z0SinThetaUncertainty, ctx};
220 SG::ReadDecorHandle<xAOD::TrackParticleContainer, char> acc_muon_track{m_acc_trk_muon_track, ctx};
221
222 // prepare input
223 // -------------
224 std::map<std::string, FlavorTagInference::Inputs> gnn_input;
225
226 // collect muon features
227 float muon_pt = muon.pt();
228 float muon_eta = muon.eta();
229 float muon_phi = muon.phi();
230
231 float muon_ptvarcone30TTVARel = acc_ptvarcone30TTVA(muon) / muon_pt;
232 float muon_topoetcone30Rel = acc_topoetcone30(muon) / muon_pt;
233
234 float muon_caloClusterERel = -99;
235 const xAOD::CaloCluster* cluster = muon.cluster();
236 if (cluster) {
237 float energyloss = 0;
238 if (!muon.parameter(energyloss,xAOD::Muon::EnergyLoss)) {
239 ATH_MSG_WARNING("DecoratePLIT::execute - failed to retrieve energy loss");
240 return StatusCode::FAILURE;
241 }
242 float calE = cluster->calE();
243 // TODO: in future trainings, we need to prevent negative energy loss values
244 // keeping it as is for now, since latest trainings have been done without this check
245 // only protecting against zero energy loss
246 if (std::abs(energyloss) != 0)
247 muon_caloClusterERel = calE / energyloss;
248 }
249
250 // package muon features for inference
251 std::vector<float> muon_feat = {
252 muon_pt,
253 muon_eta,
254 muon_phi,
255 muon_ptvarcone30TTVARel,
256 muon_topoetcone30Rel,
257 muon_caloClusterERel};
258 std::vector<int64_t> muon_feat_dim = {1, static_cast<int64_t>(muon_feat.size())};
259
260 // need to use the "jet_features" keyword as we are borrowing flavour tagging code
261 FlavorTagInference::Inputs muon_info (muon_feat, muon_feat_dim);
262 gnn_input.insert({"jet_features", muon_info});
263
264 // decorate and fill track particles around the muon
265 const xAOD::TrackParticle *muonTrack = muon.primaryTrackParticle();
266 std::vector<const xAOD::IParticle *> parts;
267
268 if(!fillParticles(dec_trk_dr_lepton, dec_trk_dr_leptontrack, dec_trk_electron_track, dec_trk_muon_track,
269 parts, muon, muonTrack, tracks, ctx)) {
270 ATH_MSG_ERROR("DecoratePLIT::execute - failed to fill particles");
271 return StatusCode::FAILURE;
272 }
273
274 // extract track features from track particles
275 std::vector<float> track_feat;
276 track_feat.reserve(parts.size() * static_cast<int64_t>(muon_feat.size()));
277
278 // loop over parts and fill track_feat vector
279 for (const xAOD::IParticle *part: parts) {
280 const xAOD::TrackParticle *track = dynamic_cast<const xAOD::TrackParticle*>(part);
281
282 // deta_lepton
283 float deta_lepton = track->p4().Eta() - muon.eta();
284 // dphi_lepton
285 float dphi_lepton = track->p4().DeltaPhi(muon.p4());
286 // qOverP
287 float qoverp = track->qOverP();
288 // btagIp_d0
289 float d0 = acc_d0(*track);
290 // btagIp_z0SinTheta
291 float z0SinTheta = acc_z0SinTheta(*track);
292 // btagIp_d0Uncertainty
293 float d0Uncertainty = acc_d0Uncertainty(*track);
294 // btagIp_z0SinThetaUncertainty
295 float z0SinThetaUncertainty = acc_z0SinThetaUncertainty(*track);
296 // btagIp_d0_significance
297 float d0_significance = -99;
298 if (abs(d0Uncertainty) > 0) d0_significance = d0 / d0Uncertainty;
299 // btagIp_z0SinTheta_significance
300 float z0SinTheta_significance = -99;
301 if (std::abs(z0SinThetaUncertainty) > 0) z0SinTheta_significance = z0SinTheta / z0SinThetaUncertainty;
302 // numberOfPixelHits
303 uint8_t pix_hits = 0;
304 if(!track->summaryValue(pix_hits,xAOD::numberOfPixelHits)){
305 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelHits");
306 return StatusCode::FAILURE;
307 }
308 // numberOfInnermostPixelLayerHits
309 uint8_t pix_innermosthits = 0;
310 if(!track->summaryValue(pix_innermosthits,xAOD::numberOfInnermostPixelLayerHits)){
311 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerHits");
312 return StatusCode::FAILURE;
313 }
314 // numberOfNextToInnermostPixelLayerHits
315 uint8_t pix_nextinnermosthits = 0;
316 if(!track->summaryValue(pix_nextinnermosthits,xAOD::numberOfNextToInnermostPixelLayerHits)){
317 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfNextToInnermostPixelLayerHits");
318 return StatusCode::FAILURE;
319 }
320 // numberOfInnermostPixelLayerSharedHits
321 uint8_t pix_innermostsharedhits = 0;
322 if(!track->summaryValue(pix_innermostsharedhits,xAOD::numberOfInnermostPixelLayerSharedHits)){
323 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSharedHits");
324 return StatusCode::FAILURE;
325 }
326 // numberOfInnermostPixelLayerSplitHits
327 uint8_t pix_innermostsplithits = 0;
328 if(!track->summaryValue(pix_innermostsplithits,xAOD::numberOfInnermostPixelLayerSplitHits)){
329 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSplitHits");
330 return StatusCode::FAILURE;
331 }
332 // numberOfPixelSharedHits
333 uint8_t pix_shared = 0;
334 if(!track->summaryValue(pix_shared,xAOD::numberOfPixelSharedHits)){
335 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSharedHits");
336 return StatusCode::FAILURE;
337 }
338 // numberOfPixelSplitHits
339 uint8_t pix_split = 0;
340 if(!track->summaryValue(pix_split,xAOD::numberOfPixelSplitHits)){
341 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSplitHits");
342 return StatusCode::FAILURE;
343 }
344 // numberOfSCTHits
345 uint8_t sct_hits = 0;
346 if(!track->summaryValue(sct_hits,xAOD::numberOfSCTHits)){
347 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTHits");
348 return StatusCode::FAILURE;
349 }
350 // numberOfSCTSharedHits
351 uint8_t sct_shared = 0;
352 if(!track->summaryValue(sct_shared,xAOD::numberOfSCTSharedHits)){
353 ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTSharedHits");
354 return StatusCode::FAILURE;
355 }
356 // muon_track
357 char muon_track = acc_muon_track(*track);
358
359 track_feat.push_back(deta_lepton);
360 track_feat.push_back(dphi_lepton);
361 track_feat.push_back(qoverp);
362 track_feat.push_back(d0);
363 track_feat.push_back(z0SinTheta);
364 //track_feat.push_back(d0Uncertainty); // removed in the latest trainings, redundant
365 //track_feat.push_back(z0SinThetaUncertainty); // removed in the latest trainings, redundant
366 track_feat.push_back(d0_significance);
367 track_feat.push_back(z0SinTheta_significance);
368 track_feat.push_back(pix_hits);
369 track_feat.push_back(pix_innermosthits);
370 track_feat.push_back(pix_nextinnermosthits);
371 track_feat.push_back(pix_innermostsharedhits);
372 track_feat.push_back(pix_innermostsplithits);
373 track_feat.push_back(pix_shared);
374 track_feat.push_back(pix_split);
375 track_feat.push_back(sct_hits);
376 track_feat.push_back(sct_shared);
377 track_feat.push_back(muon_track);
378 }
379
380 // prepare track features for inference
381 int num_cnsts = parts.size();
382 std::vector<int64_t> track_feat_dim = {num_cnsts, m_num_track_features};
383
384 FlavorTagInference::Inputs track_info(track_feat, track_feat_dim);
385 gnn_input.insert({"track_features", track_info});
386
387 if (msgLvl(MSG::VERBOSE)) {
388 ATH_MSG_VERBOSE("gnn_input size = " << gnn_input.size());
389 for (auto& inp : gnn_input){
390 ATH_MSG_VERBOSE(" " + inp.first + " dim = ");
391 for (auto & dim: inp.second.second) {
392 ATH_MSG_VERBOSE(" " + std::to_string(dim));
393 }
394 ATH_MSG_VERBOSE(" " + inp.first + " content = ");
395 for (auto & con: inp.second.first) {
396 ATH_MSG_VERBOSE(" " + std::to_string(con));
397 }
398 }
399 }
400
401 // run inference
402 // -------------
403 auto [out_f, out_vc, out_vf] = m_saltModel->runInference(gnn_input);
404 if (msgLvl(MSG::VERBOSE)) {
405 ATH_MSG_VERBOSE("runInference done.");
406
407 ATH_MSG_VERBOSE("Output Float(s):");
408 for (auto& singlefloat : out_f){
409 ATH_MSG_VERBOSE(singlefloat.first + " = " << singlefloat.second);
410 }
411 ATH_MSG_VERBOSE("Output vector char(s):");
412 for (auto& vecchar : out_vc){
413 ATH_MSG_VERBOSE(vecchar.first + " = ");
414 for (auto& cc : vecchar.second){
415 ATH_MSG_VERBOSE(cc);
416 }
417 }
418 ATH_MSG_VERBOSE("Output vector float(s):");
419 for (auto& vecfloat : out_vf){
420 ATH_MSG_VERBOSE(vecfloat.first + " = ");
421 for (auto& ff : vecfloat.second){
422 ATH_MSG_VERBOSE(ff);
423 }
424 }
425 }
426 // filling the tagger scores
427 auto it_dec_mu_plit_output = dec_mu_plit_output.begin();
428 for (auto& singlefloat : out_f){
429 ATH_MSG_DEBUG("DecoratePLIT::execute - Muon output: " + singlefloat.first + " = " + std::to_string(singlefloat.second));
430 (*it_dec_mu_plit_output)(muon) = singlefloat.second;
431 ++it_dec_mu_plit_output;
432 }
433
434 return StatusCode::SUCCESS;
435 }
#define ATH_MSG_WARNING(x)
flt_t calE() const
Geet Energy in signal state CALIBRATED.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_acc_el_ptvarcone30

SG::ReadDecorHandleKey<xAOD::ElectronContainer> Prompt::DecoratePLIT::m_acc_el_ptvarcone30 {this,"acc_el_ptvarcone30",m_electronsKey, "ptvarcone30"}
private

Definition at line 134 of file DecoratePLIT.h.

134{this,"acc_el_ptvarcone30",m_electronsKey, "ptvarcone30"};

◆ m_acc_el_topoetcone30

SG::ReadDecorHandleKey<xAOD::ElectronContainer> Prompt::DecoratePLIT::m_acc_el_topoetcone30 {this,"acc_el_topoetcone30",m_electronsKey, "topoetcone30"}
private

Definition at line 135 of file DecoratePLIT.h.

135{this,"acc_el_topoetcone30",m_electronsKey, "topoetcone30"};

◆ m_acc_mu_ptvarcone30TTVA

SG::ReadDecorHandleKey<xAOD::MuonContainer> Prompt::DecoratePLIT::m_acc_mu_ptvarcone30TTVA {this, "acc_mu_ptvarcone30TTVA",m_muonsKey, "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500"}
private

Definition at line 131 of file DecoratePLIT.h.

131{this, "acc_mu_ptvarcone30TTVA",m_muonsKey, "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500"};

◆ m_acc_mu_topoetcone30

SG::ReadDecorHandleKey<xAOD::MuonContainer> Prompt::DecoratePLIT::m_acc_mu_topoetcone30 {this, "acc_mu_topoetcone30",m_muonsKey, "topoetcone30"}
private

Definition at line 132 of file DecoratePLIT.h.

132{this, "acc_mu_topoetcone30",m_muonsKey, "topoetcone30"};

◆ m_acc_trk_d0

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_d0 {this,"acc_trk_d0", m_tracksKey, m_btagIp_prefix + "d0"}
private

Definition at line 139 of file DecoratePLIT.h.

139{this,"acc_trk_d0", m_tracksKey, m_btagIp_prefix + "d0"};
Gaudi::Property< std::string > m_btagIp_prefix

◆ m_acc_trk_d0Uncertainty

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_d0Uncertainty {this, "acc_trk_d0Uncertainty", m_tracksKey, m_btagIp_prefix + "d0Uncertainty"}
private

Definition at line 141 of file DecoratePLIT.h.

141{this, "acc_trk_d0Uncertainty", m_tracksKey, m_btagIp_prefix + "d0Uncertainty"};

◆ m_acc_trk_dr_lepton

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_dr_lepton {this, "acc_trk_dr_lepton",m_tracksKey, "dr_lepton"}
private

Definition at line 137 of file DecoratePLIT.h.

137{this, "acc_trk_dr_lepton",m_tracksKey, "dr_lepton"};

◆ m_acc_trk_dr_leptontrack

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_dr_leptontrack {this, "acc_trk_dr_leptontrack",m_tracksKey, "dr_leptontrack"}
private

Definition at line 138 of file DecoratePLIT.h.

138{this, "acc_trk_dr_leptontrack",m_tracksKey, "dr_leptontrack"};

◆ m_acc_trk_electron_track

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_electron_track {this,"acc_trk_electron_track", m_tracksKey, "electron_track"}
private

Definition at line 144 of file DecoratePLIT.h.

144{this,"acc_trk_electron_track", m_tracksKey, "electron_track"};

◆ m_acc_trk_muon_track

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_muon_track {this, "acc_trk_muon_track", m_tracksKey, "muon_track"}
private

Definition at line 143 of file DecoratePLIT.h.

143{this, "acc_trk_muon_track", m_tracksKey, "muon_track"};

◆ m_acc_trk_z0SinTheta

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_z0SinTheta {this, "acc_trk_z0SinTheta", m_tracksKey, m_btagIp_prefix + "z0SinTheta"}
private

Definition at line 140 of file DecoratePLIT.h.

140{this, "acc_trk_z0SinTheta", m_tracksKey, m_btagIp_prefix + "z0SinTheta"};

◆ m_acc_trk_z0SinThetaUncertainty

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_acc_trk_z0SinThetaUncertainty {this, "acc_trk_z0SinThetaUncertainty", m_tracksKey, m_btagIp_prefix + "z0SinThetaUncertainty"}
private

Definition at line 142 of file DecoratePLIT.h.

142{this, "acc_trk_z0SinThetaUncertainty", m_tracksKey, m_btagIp_prefix + "z0SinThetaUncertainty"};

◆ m_btagIp_prefix

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_btagIp_prefix
private
Initial value:
{
this, "btagIp_prefix", "btagIp_", "Prefix of b-tagging impact parameter variables (w.r.t. primary vertex)"}

Definition at line 105 of file DecoratePLIT.h.

105 {
106 this, "btagIp_prefix", "btagIp_", "Prefix of b-tagging impact parameter variables (w.r.t. primary vertex)"};

◆ m_caloclustersKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> Prompt::DecoratePLIT::m_caloclustersKey
private
Initial value:
{
this, "CaloClusterContainerKey", "egammaClusters",
"Calo cluster container name"
}

Definition at line 125 of file DecoratePLIT.h.

125 {
126 this, "CaloClusterContainerKey", "egammaClusters",
127 "Calo cluster container name"
128 };

◆ m_configFileVersion

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_configFileVersion {this, "ConfigFileVersion", "", "Vector of tagger score files"}
private

Definition at line 98 of file DecoratePLIT.h.

98{this, "ConfigFileVersion", "", "Vector of tagger score files"};

◆ m_configFileVersion_endcap

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_configFileVersion_endcap {this, "ConfigFileVersion_endcap", "", "Vector of tagger score files for endcap"}
private

Definition at line 99 of file DecoratePLIT.h.

99{this, "ConfigFileVersion_endcap", "", "Vector of tagger score files for endcap"};

◆ m_configPath

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_configPath {this, "ConfigPath", "", "Path of the directory containing the onnx files"}
private

Definition at line 97 of file DecoratePLIT.h.

97{this, "ConfigPath", "", "Path of the directory containing the onnx files"};

◆ m_dec_el_plit_output

SG::WriteDecorHandleKeyArray<xAOD::ElectronContainer> Prompt::DecoratePLIT::m_dec_el_plit_output {this, "PLITelOutput", {}}
private

Definition at line 146 of file DecoratePLIT.h.

146{this, "PLITelOutput", {}};

◆ m_dec_mu_plit_output

SG::WriteDecorHandleKeyArray<xAOD::MuonContainer> Prompt::DecoratePLIT::m_dec_mu_plit_output {this, "PLITmuOutput", {}}
private

Definition at line 147 of file DecoratePLIT.h.

147{this, "PLITmuOutput", {}};

◆ m_dec_trk_dr_lepton

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_dec_trk_dr_lepton {this, "dec_trk_dr_lepton", m_tracksKey, "dr_lepton"}
private

Definition at line 149 of file DecoratePLIT.h.

149{this, "dec_trk_dr_lepton", m_tracksKey, "dr_lepton"};

◆ m_dec_trk_dr_leptontrack

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_dec_trk_dr_leptontrack {this, "dec_trk_dr_leptontrack", m_tracksKey, "dr_leptontrack"}
private

Definition at line 152 of file DecoratePLIT.h.

152{this, "dec_trk_dr_leptontrack", m_tracksKey, "dr_leptontrack"};

◆ m_dec_trk_electron_track

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_dec_trk_electron_track {this, "dec_trk_electron_track", m_tracksKey, "electron_track"}
private

Definition at line 150 of file DecoratePLIT.h.

150{this, "dec_trk_electron_track", m_tracksKey, "electron_track"};

◆ m_dec_trk_muon_track

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_dec_trk_muon_track {this, "dec_trk_muon_track", m_tracksKey, "muon_track"}
private

Definition at line 151 of file DecoratePLIT.h.

151{this, "dec_trk_muon_track", m_tracksKey, "muon_track"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_electronsKey

SG::ReadHandleKey<xAOD::ElectronContainer> Prompt::DecoratePLIT::m_electronsKey
private
Initial value:
{
this, "ElectronContainerKey", "Electrons",
"Electron container name"
}

Definition at line 109 of file DecoratePLIT.h.

109 {
110 this, "ElectronContainerKey", "Electrons",
111 "Electron container name"
112 };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_lepCalErelConeSize

Gaudi::Property<float> Prompt::DecoratePLIT::m_lepCalErelConeSize
private
Initial value:
{
this, "lepCalErelConeSize", 0.15, "Cone size for relative calo cluster energy sum"}

Definition at line 103 of file DecoratePLIT.h.

103 {
104 this, "lepCalErelConeSize", 0.15, "Cone size for relative calo cluster energy sum"};

◆ m_leptonsName

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_leptonsName
private
Initial value:
{
this, "LeptonContainerName", "",
"Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
}

Definition at line 93 of file DecoratePLIT.h.

93 {
94 this, "LeptonContainerName", "",
95 "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
96 };

◆ m_maxLepTrackdR

Gaudi::Property<float> Prompt::DecoratePLIT::m_maxLepTrackdR
private
Initial value:
{
this, "maxLepTrackdR", 0.4, "Maximum distance between lepton and track"}

Definition at line 101 of file DecoratePLIT.h.

101 {
102 this, "maxLepTrackdR", 0.4, "Maximum distance between lepton and track"};

◆ m_muonsKey

SG::ReadHandleKey<xAOD::MuonContainer> Prompt::DecoratePLIT::m_muonsKey
private
Initial value:
{
this, "MuonContainerKey", "Muons",
"Muon container name"
}

Definition at line 113 of file DecoratePLIT.h.

113 {
114 this, "MuonContainerKey", "Muons",
115 "Muon container name"
116 };

◆ m_num_lepton_features

int Prompt::DecoratePLIT::m_num_lepton_features {}
private

Definition at line 46 of file DecoratePLIT.h.

46{};

◆ m_num_track_features

int Prompt::DecoratePLIT::m_num_track_features {}
private

Definition at line 47 of file DecoratePLIT.h.

47{};

◆ m_saltModel

std::shared_ptr<const FlavorTagInference::SaltModel> Prompt::DecoratePLIT::m_saltModel {}
private

Definition at line 43 of file DecoratePLIT.h.

43{};

◆ m_saltModel_endcap

std::shared_ptr<const FlavorTagInference::SaltModel> Prompt::DecoratePLIT::m_saltModel_endcap {}
private

Definition at line 44 of file DecoratePLIT.h.

44{};

◆ m_TaggerName

Gaudi::Property<std::string> Prompt::DecoratePLIT::m_TaggerName {this, "TaggerName", "", "Tagger name"}
private

Definition at line 100 of file DecoratePLIT.h.

100{this, "TaggerName", "", "Tagger name"};

◆ m_trackjetsKey

SG::ReadHandleKey<xAOD::JetContainer> Prompt::DecoratePLIT::m_trackjetsKey
private
Initial value:
{
this, "TrackJetContainerKey", "AntiKtVR30Rmax4Rmin02PV0TrackJets",
"VR track jet container name"
}

Definition at line 117 of file DecoratePLIT.h.

117 {
118 this, "TrackJetContainerKey", "AntiKtVR30Rmax4Rmin02PV0TrackJets",
119 "VR track jet container name"
120 };

◆ m_tracksKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePLIT::m_tracksKey
private
Initial value:
{
this, "TracksContainerKey", "InDetTrackParticles",
"Tracks container name"
}

Definition at line 121 of file DecoratePLIT.h.

121 {
122 this, "TracksContainerKey", "InDetTrackParticles",
123 "Tracks container name"
124 };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: