ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Prompt::DecoratePLIT Class Reference

#include <DecoratePLIT.h>

Inheritance diagram for Prompt::DecoratePLIT:
Collaboration 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. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode initializeAccessors ()
 
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
 
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
 
bool passed_r22tracking_cuts (const xAOD::TrackParticle &tp, const EventContext &ctx) const
 
StatusCode decorateTrack (const xAOD::TrackParticle &track, float dr_lepton, bool isUsedForElectron, bool isUsedForMuon, const xAOD::TrackParticle *trackLep) const
 
StatusCode fillParticles (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> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel {}
 
std::shared_ptr< const FlavorTagInference::SaltModel > m_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", {}}
 
const SG::Decorator< float > m_dec_trk_dr_lepton {"dr_lepton"}
 
const SG::Decorator< char > m_dec_trk_electron_track {"electron_track"}
 
const SG::Decorator< char > m_dec_trk_muon_track {"muon_track"}
 
const SG::Decorator< float > m_dec_trk_dr_leptontrack {"dr_leptontrack"}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
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
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.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

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

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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  }

◆ decorateTrack()

StatusCode Prompt::DecoratePLIT::decorateTrack ( const xAOD::TrackParticle track,
float  dr_lepton,
bool  isUsedForElectron,
bool  isUsedForMuon,
const xAOD::TrackParticle trackLep 
) const
private

Definition at line 801 of file DecoratePLIT.cxx.

807  {
808  // Apply values to decorators
809  m_dec_trk_dr_lepton(track) = dr_lepton;
810  m_dec_trk_electron_track(track) = static_cast<char>(isUsedForElectron);
811  m_dec_trk_muon_track(track) = static_cast<char>(isUsedForMuon);
812 
813  float dr_leptontrack = -99;
814  if (trackLep) {
815  if (trackLep->pt() > 0.) {
816  dr_leptontrack = track.p4().DeltaR(trackLep->p4());
817  }
818  }
819  m_dec_trk_dr_leptontrack(track) = dr_leptontrack;
820 
821  return StatusCode::SUCCESS;
822  }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

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

Definition at line 116 of file DecoratePLIT.cxx.

116  {
119 
120  // Make sure all the decorations are added as long as tracks exist.
121  if (!tracks->empty()) {
126  }
127 
128  if (!m_electronsKey.empty()) {
129  // prepare decorators
130  // ------------------
131  std::vector<SG::WriteDecorHandle<xAOD::ElectronContainer, float>> dec_el_plit_output;
132  for (const auto& wdhk: m_dec_el_plit_output) {
133  dec_el_plit_output.emplace_back(wdhk, ctx);
134  }
136  for (const xAOD::Electron* elec : *electrons) {
137  if (!predictElec(*elec, *tracks, *caloclusters, dec_el_plit_output, ctx)) {
138  ATH_MSG_ERROR("DecoratePLIT::execute - failed to predict electron");
139  return StatusCode::FAILURE;
140  }
141  }
142  } else if (!m_muonsKey.empty()) {
143  // prepare decorators
144  // ------------------
145  std::vector<SG::WriteDecorHandle<xAOD::MuonContainer, float>> dec_mu_plit_output;
146  for (const auto& wdhk: m_dec_mu_plit_output) {
147  dec_mu_plit_output.emplace_back(wdhk, ctx);
148  }
150  for (const xAOD::Muon* muon : *muons) {
151  if (!predictMuon(*muon, *tracks, dec_mu_plit_output, ctx)) {
152  ATH_MSG_ERROR("DecoratePLIT::execute - failed to predict muon");
153  return StatusCode::FAILURE;
154  }
155  }
156  }
157 
158  return StatusCode::SUCCESS;
159  }

◆ 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
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  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ fillParticles()

StatusCode Prompt::DecoratePLIT::fillParticles ( 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 745 of file DecoratePLIT.cxx.

751  {
752  // get lepton four momentum
753  const FourMom_t lepton_p4 = lepton.p4();
754 
755  // Precompute tracks used for reconstruction
756  std::set<const xAOD::TrackParticle*> tracksUsedForElectron;
757  std::set<const xAOD::TrackParticle*> tracksUsedForMuon;
758  if (const auto* elec = dynamic_cast<const xAOD::Electron*>(&lepton)) {
759  tracksUsedForElectron = xAOD::EgammaHelpers::getTrackParticles(elec, true); // useBremAssoc = true
760  } else if (const auto* muon = dynamic_cast<const xAOD::Muon*>(&lepton)) {
761  if (muon->muonType() == xAOD::Muon::Combined && muon->inDetTrackParticleLink().isValid()) {
762  tracksUsedForMuon.insert(*(muon->inDetTrackParticleLink())); // even if the primary track should be a combined track, we still use the id for the match
763  }
764  }
765 
766  // Loop over tracks and store them
768  if (!track) {
769  ATH_MSG_ERROR("DecoratePLIT::fillParticles - null track pointer");
770  continue;
771  }
772  // check if track passed selection
773  if (!passed_r22tracking_cuts(*track, ctx)) continue;
774 
775  // decorate track
776  float dr_lepton = (lepton.p4().Pt() > 0.) ? track->p4().DeltaR(lepton.p4()) : -99;
777 
778  // do not even waste time to decorate something which is not used
779  if (dr_lepton > m_maxLepTrackdR && m_maxLepTrackdR>=0) {continue;}
780 
781  bool isUsedForElectron = tracksUsedForElectron.count(track);
782  bool isUsedForMuon = tracksUsedForMuon.count(track);
783 
784  if (!decorateTrack(*track, dr_lepton, isUsedForElectron, isUsedForMuon, trackLep)) {
785  ATH_MSG_ERROR("DecoratePLIT::fillParticles - failed to decorate track");
786  return StatusCode::FAILURE;
787  }
788 
789  parts.push_back(track);
790  }
791 
792  // Sort tracks by dR distance to lepton
793  auto SORT_TRACKLEP = [&lepton_p4](const xAOD::IParticle* a, const xAOD::IParticle* b) {
794  return a->p4().DeltaR(lepton_p4) < b->p4().DeltaR(lepton_p4);
795  };
796  std::sort(parts.begin(), parts.end(), SORT_TRACKLEP);
797 
798  return StatusCode::SUCCESS;
799  }

◆ 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  }

◆ 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 
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  }

◆ initializeAccessors()

StatusCode Prompt::DecoratePLIT::initializeAccessors ( )
private

Definition at line 161 of file DecoratePLIT.cxx.

161  {
162 
165 
168 
169  ATH_CHECK(m_acc_trk_dr_lepton.initialize());
170  ATH_CHECK(m_acc_trk_dr_leptontrack.initialize());
171  ATH_CHECK(m_acc_trk_d0.initialize());
172  ATH_CHECK(m_acc_trk_z0SinTheta.initialize());
173  ATH_CHECK(m_acc_trk_d0Uncertainty.initialize());
175  ATH_CHECK(m_acc_trk_muon_track.initialize());
176  ATH_CHECK(m_acc_trk_electron_track.initialize());
177 
178  return StatusCode::SUCCESS;
179  }

◆ 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()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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 665 of file DecoratePLIT.cxx.

666  {
667  // r22 default track selection for flavour tagging GN2 algorithm
668  constexpr float pt_minimum = 500; // MeV
669  constexpr float abs_eta_maximum = 2.5;
670  constexpr float d0_maximum = 3.5;
671  constexpr float z0_maximum= 5.0;
672  constexpr unsigned char si_hits_minimum = 8;
673  constexpr unsigned char si_shared_maximum = 1;
674  constexpr unsigned char si_holes_maximum = 2;
675  constexpr unsigned char pix_holes_maximum = 1;
676 
677  // accessors
680 
681  // get hit pixel info
682  uint8_t pix_shared = 0;
683  if(!tp.summaryValue(pix_shared,xAOD::numberOfPixelSharedHits)){
684  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelSharedHits");
685  return false;
686  }
687  uint8_t sct_shared = 0;
688  if(!tp.summaryValue(sct_shared,xAOD::numberOfSCTSharedHits)){
689  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTSharedHits");
690  return false;
691  }
692  uint8_t pix_hits = 0;
693  if(!tp.summaryValue(pix_hits,xAOD::numberOfPixelHits)){
694  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelHits");
695  return false;
696  }
697  uint8_t sct_hits = 0;
698  if(!tp.summaryValue(sct_hits,xAOD::numberOfSCTHits)){
699  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTHits");
700  return false;
701  }
702  uint8_t pix_dead = 0;
703  if(!tp.summaryValue(pix_dead,xAOD::numberOfPixelDeadSensors)){
704  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelDeadSensors");
705  return false;
706  }
707  uint8_t sct_dead = 0;
708  if(!tp.summaryValue(sct_dead,xAOD::numberOfSCTDeadSensors)){
709  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTDeadSensors");
710  return false;
711  }
712  uint8_t pix_holes = 0;
713  if(!tp.summaryValue(pix_holes,xAOD::numberOfPixelHoles)){
714  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfPixelHoles");
715  return false;
716  }
717  uint8_t sct_holes = 0;
718  if(!tp.summaryValue(sct_holes,xAOD::numberOfSCTHoles)){
719  ATH_MSG_ERROR("DecoratePLIT::passed_r22tracking_cuts - failed to retrieve xAOD::numberOfSCTHoles");
720  return false;
721  }
722 
723  if (std::abs(tp.eta()) > abs_eta_maximum)
724  return false;
725  double n_module_shared = (pix_shared + sct_shared / 2);
726  if (n_module_shared > si_shared_maximum)
727  return false;
728  if (tp.pt() <= pt_minimum)
729  return false;
730  if (std::isfinite(d0_maximum) &&
731  std::abs(acc_d0(tp)) >= d0_maximum)
732  return false;
733  if (std::isfinite(z0_maximum) &&
734  std::abs(acc_z0SinTheta(tp)) >= z0_maximum)
735  return false;
736  if (pix_hits + pix_dead + sct_hits + sct_dead < si_hits_minimum)
737  return false;
738  if ((pix_holes + sct_holes) > si_holes_maximum)
739  return false;
740  if (pix_holes > pix_holes_maximum)
741  return false;
742  return true;
743  }

◆ predictElec()

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

Definition at line 413 of file DecoratePLIT.cxx.

418  {
419  // prepare input
420  // -------------
421  std::map<std::string, FlavorTagInference::Inputs> gnn_input;
422 
423  // accessors
424  // ---------
427 
435 
436  // collect electron features
437  float elec_pt = electron.pt();
438  float elec_eta = electron.eta();
439  float elec_phi = electron.phi();
440  float elec_ptvarcone30Rel = acc_ptvarcone30(electron) / elec_pt;
441  float elec_topoetcone30Rel = acc_topoetcone30(electron) / elec_pt;
442 
443  // compute electron calorimeter cluster information
444  float elec_caloClusterSumEtRel = 0.0;
445  float sumCoreEt_large = 0.0;
446  if (electron.caloCluster()) {
447  float elec_calEta = electron.caloCluster()->eta();
448  float elec_calPhi = electron.caloCluster()->phi();
449 
450  for (const xAOD::CaloCluster *cluster: caloclusters) {
451  float deta = elec_calEta - cluster->eta();
452  float dphi = TVector2::Phi_mpi_pi(elec_calPhi - cluster->phi());
453  float dr = std::sqrt(deta*deta + dphi*dphi);
454 
455  if (dr < m_lepCalErelConeSize) {
456  sumCoreEt_large += cluster->pt();
457  }
458  }
459  }
460  elec_caloClusterSumEtRel = sumCoreEt_large / elec_pt;
461 
462  // collect best matched GSF electron track kinematics
463  const xAOD::TrackParticle *electronTrack = nullptr;
464  const xAOD::TrackParticle *bestmatchedGSFElTrack = electron.trackParticle(0);
465  if (bestmatchedGSFElTrack) {
466  electronTrack = xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(bestmatchedGSFElTrack);
467  }
468 
469  //float elec_pt_track = -99;
470  //float elec_eta_track = -99;
471  //float elec_phi_track = -99;
472  //if (electronTrack) {
473  // elec_pt_track = electronTrack->pt();
474  // elec_eta_track = electronTrack->eta();
475  // elec_phi_track = electronTrack->phi();
476  //}
477 
478  std::vector<float> electron_feat = {
479  elec_pt,
480  elec_eta,
481  elec_phi,
482  elec_ptvarcone30Rel,
483  elec_topoetcone30Rel,
484  elec_caloClusterSumEtRel};
485  std::vector<int64_t> electron_feat_dim = {1, static_cast<int64_t>(electron_feat.size())};
486 
487  // need to use the "jet_features" keyword as we are borrowing flavour tagging code
488  FlavorTagInference::Inputs electron_info (electron_feat, electron_feat_dim);
489  gnn_input.insert({"jet_features", electron_info});
490 
491  // decorate and fill track particles around the electron
492  std::vector<const xAOD::IParticle *> parts;
493  if (!fillParticles(parts, electron, electronTrack, tracks, ctx)) {
494  ATH_MSG_ERROR("DecoratePLIT::execute - failed to fill particles");
495  return StatusCode::FAILURE;
496  }
497 
498  // collect track features from track particles
499  std::vector<float> track_feat;
500  track_feat.reserve(parts.size() * static_cast<int64_t>(electron_feat.size()));
501 
502  for (const xAOD::IParticle *part: parts) {
503  const xAOD::TrackParticle *track = dynamic_cast<const xAOD::TrackParticle*>(part);
504  if (!track) {
505  ATH_MSG_ERROR("DecoratePLIT::execute - null track pointer");
506  continue;
507  }
508 
509  // dr_lepton
510  // float dr_lepton = acc_dr_lepton(*track);
511  // deta_lepton
512  float deta_lepton = track->p4().Eta() - electron.eta();
513  // dphi_lepton
514  float dphi_lepton = track->p4().DeltaPhi(electron.p4());
515  // qOverP
516  float qoverp = track->qOverP();
517  // btagIp_d0
518  float d0 = acc_d0(*track);
519  // btagIp_z0SinTheta
520  float z0SinTheta = acc_z0SinTheta(*track);
521  // btagIp_d0_significance
522  float d0Uncertainty = acc_d0Uncertainty(*track);
523  float d0_significance = -99;
524  if (std::abs(d0Uncertainty) > 0) d0_significance = d0 / d0Uncertainty;
525  // btagIp_z0SinTheta_significance
526  float z0SinThetaUncertainty = acc_z0SinThetaUncertainty(*track);
527  float z0SinTheta_significance = -99;
528  if (std::abs(z0SinThetaUncertainty) > 0) z0SinTheta_significance = z0SinTheta / z0SinThetaUncertainty;
529  // numberOfInnermostPixelLayerHits
530  uint8_t pix_innermosthits = 0;
531  if(!track->summaryValue(pix_innermosthits,xAOD::numberOfInnermostPixelLayerHits)){
532  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerHits");
533  return StatusCode::FAILURE;
534  }
535  // numberOfNextToInnermostPixelLayerHits
536  uint8_t pix_nextinnermosthits = 0;
537  if(!track->summaryValue(pix_nextinnermosthits,xAOD::numberOfNextToInnermostPixelLayerHits)){
538  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfNextToInnermostPixelLayerHits");
539  return StatusCode::FAILURE;
540  }
541  // numberOfInnermostPixelLayerSharedHits
542  uint8_t pix_innermostsharedhits = 0;
543  if(!track->summaryValue(pix_innermostsharedhits,xAOD::numberOfInnermostPixelLayerSharedHits)){
544  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSharedHits");
545  return StatusCode::FAILURE;
546  }
547  // numberOfInnermostPixelLayerSplitHits
548  uint8_t pix_innermostsplithits = 0;
549  if(!track->summaryValue(pix_innermostsplithits,xAOD::numberOfInnermostPixelLayerSplitHits)){
550  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfInnermostPixelLayerSplitHits");
551  return StatusCode::FAILURE;
552  }
553  // numberOfPixelHits
554  uint8_t pix_hits = 0;
555  if(!track->summaryValue(pix_hits,xAOD::numberOfPixelHits)){
556  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelHits");
557  return StatusCode::FAILURE;
558  }
559  // numberOfPixelSharedHits
560  uint8_t pix_shared = 0;
561  if(!track->summaryValue(pix_shared,xAOD::numberOfPixelSharedHits)){
562  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSharedHits");
563  return StatusCode::FAILURE;
564  }
565  // numberOfPixelSplitHits
566  uint8_t pix_split = 0;
567  if(!track->summaryValue(pix_split,xAOD::numberOfPixelSplitHits)){
568  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfPixelSplitHits");
569  return StatusCode::FAILURE;
570  }
571  // numberOfSCTHits
572  uint8_t sct_hits = 0;
573  if(!track->summaryValue(sct_hits,xAOD::numberOfSCTHits)){
574  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTHits");
575  return StatusCode::FAILURE;
576  }
577  // numberOfSCTSharedHits
578  uint8_t sct_shared = 0;
579  if(!track->summaryValue(sct_shared,xAOD::numberOfSCTSharedHits)){
580  ATH_MSG_ERROR("DecoratePLIT::execute - failed to retrieve xAOD::numberOfSCTSharedHits");
581  return StatusCode::FAILURE;
582  }
583  // electron_track
584  char electron_track = acc_electron_track(*track);
585 
586 
587  //track_feat.push_back(dr_lepton); // removed in the latest trainings, redundan
588  track_feat.push_back(deta_lepton);
589  track_feat.push_back(dphi_lepton);
590  track_feat.push_back(qoverp);
591  track_feat.push_back(d0);
592  track_feat.push_back(z0SinTheta);
593  track_feat.push_back(d0_significance);
594  track_feat.push_back(z0SinTheta_significance);
595  track_feat.push_back(pix_innermosthits);
596  track_feat.push_back(pix_nextinnermosthits);
597  track_feat.push_back(pix_innermostsharedhits);
598  track_feat.push_back(pix_innermostsplithits);
599  track_feat.push_back(pix_hits);
600  track_feat.push_back(pix_shared);
601  track_feat.push_back(pix_split);
602  track_feat.push_back(sct_hits);
603  track_feat.push_back(sct_shared);
604  track_feat.push_back(electron_track);
605  }
606 
607  // prepare track features for inference
608  int num_cnsts = parts.size();
609  std::vector<int64_t> track_feat_dim = {num_cnsts, m_num_track_features};
610 
611  FlavorTagInference::Inputs track_info (track_feat, track_feat_dim);
612  gnn_input.insert({"track_features", track_info});
613 
614  if (msgLvl(MSG::VERBOSE)) {
615  ATH_MSG_VERBOSE("gnn_input size = " << gnn_input.size());
616  for (auto& inp : gnn_input){
617  ATH_MSG_VERBOSE(" " + inp.first + " dim = ");
618  for (auto & dim: inp.second.second) {
620  }
621  ATH_MSG_VERBOSE(" " + inp.first + " content = ");
622  for (auto & con: inp.second.first) {
623  ATH_MSG_VERBOSE(" " + std::to_string(con));
624  }
625  }
626  }
627 
628  // run inference
629  // -------------
630  // use different model for endcap electrons
631  auto [out_f, out_vc, out_vf] = (std::abs(elec_eta) < 1.37) ? m_saltModel->runInference(gnn_input) : m_saltModel_endcap->runInference(gnn_input);
632  if (msgLvl(MSG::VERBOSE)) {
633  ATH_MSG_VERBOSE("runInference done.");
634 
635  ATH_MSG_VERBOSE("Output Float(s):");
636  for (auto& singlefloat : out_f){
637  ATH_MSG_VERBOSE(singlefloat.first + " = " << singlefloat.second);
638  }
639  ATH_MSG_VERBOSE("Output vector char(s):");
640  for (auto& vecchar : out_vc){
641  ATH_MSG_VERBOSE(vecchar.first + " = ");
642  for (auto& cc : vecchar.second){
644  }
645  }
646  ATH_MSG_VERBOSE("Output vector float(s):");
647  for (auto& vecfloat : out_vf){
648  ATH_MSG_VERBOSE(vecfloat.first + " = ");
649  for (auto& ff : vecfloat.second){
651  }
652  }
653  }
654  // filling the tagger scores
655  auto it_dec_el_plit_output = dec_el_plit_output.begin();
656  for (auto& singlefloat : out_f){
657  ATH_MSG_DEBUG("DecoratePLIT::execute - Electron output: " + singlefloat.first + " = " + std::to_string(singlefloat.second));
658  (*it_dec_el_plit_output)(electron) = singlefloat.second;
659  ++it_dec_el_plit_output;
660  }
661 
662  return StatusCode::SUCCESS;
663  }

◆ predictMuon()

StatusCode Prompt::DecoratePLIT::predictMuon ( 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 181 of file DecoratePLIT.cxx.

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

◆ 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();
383  PBASE::renounce (h);
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  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ 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 InputMakerBase, and HypoBase.

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()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
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 118 of file DecoratePLIT.h.

◆ 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 119 of file DecoratePLIT.h.

◆ 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 115 of file DecoratePLIT.h.

◆ 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 116 of file DecoratePLIT.h.

◆ 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 123 of file DecoratePLIT.h.

◆ 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 125 of file DecoratePLIT.h.

◆ 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 121 of file DecoratePLIT.h.

◆ 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 122 of file DecoratePLIT.h.

◆ 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 128 of file DecoratePLIT.h.

◆ 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 127 of file DecoratePLIT.h.

◆ 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 124 of file DecoratePLIT.h.

◆ 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 126 of file DecoratePLIT.h.

◆ 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 89 of file DecoratePLIT.h.

◆ m_caloclustersKey

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

Definition at line 109 of file DecoratePLIT.h.

◆ m_configFileVersion

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

Definition at line 82 of file DecoratePLIT.h.

◆ 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 83 of file DecoratePLIT.h.

◆ m_configPath

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

Definition at line 81 of file DecoratePLIT.h.

◆ m_dec_el_plit_output

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

Definition at line 130 of file DecoratePLIT.h.

◆ m_dec_mu_plit_output

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

Definition at line 131 of file DecoratePLIT.h.

◆ m_dec_trk_dr_lepton

const SG::Decorator<float> Prompt::DecoratePLIT::m_dec_trk_dr_lepton {"dr_lepton"}
private

Definition at line 133 of file DecoratePLIT.h.

◆ m_dec_trk_dr_leptontrack

const SG::Decorator<float> Prompt::DecoratePLIT::m_dec_trk_dr_leptontrack {"dr_leptontrack"}
private

Definition at line 136 of file DecoratePLIT.h.

◆ m_dec_trk_electron_track

const SG::Decorator<char> Prompt::DecoratePLIT::m_dec_trk_electron_track {"electron_track"}
private

Definition at line 134 of file DecoratePLIT.h.

◆ m_dec_trk_muon_track

const SG::Decorator<char> Prompt::DecoratePLIT::m_dec_trk_muon_track {"muon_track"}
private

Definition at line 135 of file DecoratePLIT.h.

◆ 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 93 of file DecoratePLIT.h.

◆ 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 87 of file DecoratePLIT.h.

◆ 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 77 of file DecoratePLIT.h.

◆ 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 85 of file DecoratePLIT.h.

◆ m_muonsKey

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

Definition at line 97 of file DecoratePLIT.h.

◆ m_num_lepton_features

int Prompt::DecoratePLIT::m_num_lepton_features {}
private

Definition at line 46 of file DecoratePLIT.h.

◆ m_num_track_features

int Prompt::DecoratePLIT::m_num_track_features {}
private

Definition at line 47 of file DecoratePLIT.h.

◆ m_saltModel

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

Definition at line 43 of file DecoratePLIT.h.

◆ m_saltModel_endcap

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

Definition at line 44 of file DecoratePLIT.h.

◆ m_TaggerName

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

Definition at line 84 of file DecoratePLIT.h.

◆ m_trackjetsKey

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

Definition at line 101 of file DecoratePLIT.h.

◆ m_tracksKey

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

Definition at line 105 of file DecoratePLIT.h.

◆ 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:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
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:745
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:262
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
Prompt::DecoratePLIT::m_acc_trk_z0SinTheta
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_z0SinTheta
Definition: DecoratePLIT.h:124
xAOD::numberOfInnermostPixelLayerSplitHits
@ numberOfInnermostPixelLayerSplitHits
number of Pixel 0th layer barrel hits split by cluster splitting
Definition: TrackingPrimitives.h:241
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:273
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::CaloCluster_v1::calE
flt_t calE() const
Geet Energy in signal state CALIBRATED.
Prompt::DecoratePLIT::decorateTrack
StatusCode decorateTrack(const xAOD::TrackParticle &track, float dr_lepton, bool isUsedForElectron, bool isUsedForMuon, const xAOD::TrackParticle *trackLep) const
Definition: DecoratePLIT.cxx:801
Prompt::DecoratePLIT::m_caloclustersKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloclustersKey
Definition: DecoratePLIT.h:109
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
Prompt::DecoratePLIT::m_electronsKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
Definition: DecoratePLIT.h:93
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Prompt::DecoratePLIT::m_configFileVersion_endcap
Gaudi::Property< std::string > m_configFileVersion_endcap
Definition: DecoratePLIT.h:83
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
SG::Decorator::getDecorationArray
container_pointer_type getDecorationArray(const AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:260
xAOD::EgammaHelpers::getTrackParticles
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.
Definition: EgammaxAODHelpers.cxx:120
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:181
Prompt::DecoratePLIT::m_dec_trk_electron_track
const SG::Decorator< char > m_dec_trk_electron_track
Definition: DecoratePLIT.h:134
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:111
str::z0SinThetaUncertainty
const std::string z0SinThetaUncertainty
Definition: BTagTrackIpAccessor.cxx:13
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Prompt::DecoratePLIT::m_dec_mu_plit_output
SG::WriteDecorHandleKeyArray< xAOD::MuonContainer > m_dec_mu_plit_output
Definition: DecoratePLIT.h:131
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
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
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:10
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Prompt::DecoratePLIT::m_acc_trk_muon_track
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_muon_track
Definition: DecoratePLIT.h:127
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
Prompt::DecoratePLIT::m_saltModel_endcap
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel_endcap
Definition: DecoratePLIT.h:44
IDTPM::z0SinTheta
float z0SinTheta(const U &p)
Definition: TrackParametersHelper.h:75
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Prompt::DecoratePLIT::initializeAccessors
StatusCode initializeAccessors()
Definition: DecoratePLIT.cxx:161
Prompt::DecoratePLIT::m_acc_trk_dr_leptontrack
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_leptontrack
Definition: DecoratePLIT.h:122
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:130
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
xAOD::numberOfPixelSharedHits
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:263
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
Prompt::DecoratePLIT::m_acc_el_ptvarcone30
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_acc_el_ptvarcone30
Definition: DecoratePLIT.h:118
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
Prompt::DecoratePLIT::m_saltModel
std::shared_ptr< const FlavorTagInference::SaltModel > m_saltModel
Definition: DecoratePLIT.h:43
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
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Prompt::DecoratePLIT::passed_r22tracking_cuts
bool passed_r22tracking_cuts(const xAOD::TrackParticle &tp, const EventContext &ctx) const
Definition: DecoratePLIT.cxx:665
Prompt::DecoratePLIT::m_dec_el_plit_output
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_dec_el_plit_output
Definition: DecoratePLIT.h:130
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Prompt::DecoratePLIT::m_configFileVersion
Gaudi::Property< std::string > m_configFileVersion
Definition: DecoratePLIT.h:82
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
python.TrackLeptonConfig.trackContainer
string trackContainer
Definition: TrackLeptonConfig.py:23
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::numberOfPixelSplitHits
@ numberOfPixelSplitHits
number of Pixel all-layer hits split by cluster splitting [unit8_t].
Definition: TrackingPrimitives.h:264
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:271
Prompt::FourMom_t
TLorentzVector FourMom_t
Definition: DecoratePLIT.h:32
Prompt::DecoratePLIT::m_tracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
Definition: DecoratePLIT.h:105
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
Prompt::DecoratePLIT::m_acc_trk_dr_lepton
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_dr_lepton
Definition: DecoratePLIT.h:121
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
beamspotman.outname
outname
Definition: beamspotman.py:410
Prompt::DecoratePLIT::m_TaggerName
Gaudi::Property< std::string > m_TaggerName
Definition: DecoratePLIT.h:84
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:249
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
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:413
xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF
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...
Definition: ElectronxAODHelpers.cxx:22
xAOD::IParticle::p4
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
xAOD::Electron_v1
Definition: Electron_v1.h:34
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:283
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
a
TList * a
Definition: liststreamerinfos.cxx:10
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:274
Prompt::DecoratePLIT::m_acc_mu_ptvarcone30TTVA
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_acc_mu_ptvarcone30TTVA
Definition: DecoratePLIT.h:115
Prompt::DecoratePLIT::m_num_track_features
int m_num_track_features
Definition: DecoratePLIT.h:47
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
xAOD::numberOfInnermostPixelLayerSharedHits
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
Definition: TrackingPrimitives.h:240
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:269
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:267
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
FlavorTagInference::Inputs
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
Definition: FlavorTagInference/FlavorTagInference/SaltModel.h:28
Prompt::DecoratePLIT::m_acc_trk_d0Uncertainty
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_acc_trk_d0Uncertainty
Definition: DecoratePLIT.h:125
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
fitman.k
k
Definition: fitman.py:528
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:238
python.handimod.cc
int cc
Definition: handimod.py:522
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
str::d0Uncertainty
const std::string d0Uncertainty
Definition: BTagTrackIpAccessor.cxx:12
ServiceHandle< ICondSvc >