Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Prompt::DecoratePromptLeptonRNN Class Reference

#include <DecoratePromptLeptonRNN.h>

Inheritance diagram for Prompt::DecoratePromptLeptonRNN:
Collaboration diagram for Prompt::DecoratePromptLeptonRNN:

Public Types

using decoratorFloatH_t = SG::WriteDecorHandle< xAOD::IParticleContainer, float >
 

Public Member Functions

 DecoratePromptLeptonRNN (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
const xAOD::TrackParticlefindMuonTrack (const xAOD::Muon *muon)
 
const xAOD::JetfindClosestTrackJet (const xAOD::TrackParticle *particle, const xAOD::JetContainer &trackJets)
 
bool compDummy (const xAOD::IParticle &particle, std::vector< decoratorFloatH_t > &decors) const
 
bool prepTrackObject (Prompt::VarHolder &p, const xAOD::TrackParticle &track, const xAOD::TrackParticle &lepton, const xAOD::Jet &trackJet, const xAOD::Vertex &priVtx, const xAOD::EventInfo event)
 
bool compScore (const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, std::vector< decoratorFloatH_t > &decors)
 
bool passTrack (Prompt::VarHolder &p)
 
StatusCode makeHist (TH1 *&h, const std::string &key, int nbin, double xmin, double xmax)
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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 > &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
 

Public Attributes

Gaudi::Property< std::string > m_outputStream {this, "outputStream", "", "Path of the ROOT output directory of the histograms for RNN debug"}
 
Gaudi::Property< std::string > m_decorationPrefixRNN {this, "decorationPrefixRNN", "", "Prefix of the name for the decorator of RNN to the lepton"}
 
Gaudi::Property< double > m_minTrackpT {this, "minTrackpT", 500.0, "pT cut config for the input tracks to RNN"}
 
Gaudi::Property< double > m_maxTrackEta {this, "maxTrackEta", 2.5, "abs(eta) cut config for the input tracks to RNN"}
 
Gaudi::Property< double > m_maxTrackZ0Sin {this, "maxTrackZ0Sin", 1.0, "Z0sin cut config for the input tracks to RNN"}
 
Gaudi::Property< double > m_minTrackLeptonDR {this, "minTrackLeptonDR", 1.0e-6, "Delta R between lepton and track cut config for the input tracks to RNN"}
 
Gaudi::Property< double > m_maxTrackLeptonDR {this, "maxTrackLeptonDR", 0.4, "Delta R between lepton and track cut config for the input tracks to RNN"}
 
Gaudi::Property< double > m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"}
 
Gaudi::Property< double > m_maxTrackSharedSiHits {this, "maxTrackSharedSiHits", 1.5, "track shared si hits cut config for the input tracks to RNN"}
 
Gaudi::Property< unsigned > m_minTrackSiHits {this, "minTrackSiHits", 6.5, "track silicon detector hits cut config for the input tracks to RNN"}
 
Gaudi::Property< unsigned > m_maxTrackSiHoles {this, "maxTrackSiHoles", 2.5, "track holes cut config for the input tracks to RNN"}
 
Gaudi::Property< unsigned > m_maxTrackPixHoles {this, "maxTrackPixHoles", 1.5, "track pixel holes cut config for the input tracks to RNN"}
 
Gaudi::Property< bool > m_debug {this, "debug", false, "debug statement"}
 
Gaudi::Property< bool > m_printTime {this, "printTime", false, "print running time, for debug"}
 
ToolHandle< IRNNToolm_toolRNN
 
ServiceHandle< ITHistSvc > m_histSvc
 
SG::ReadHandleKey< xAOD::IParticleContainerm_inputContainerLeptonKey
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_inputContainerTrackKey
 
SG::ReadHandleKey< xAOD::JetContainerm_inputContainerTrackJetKey
 
SG::ReadHandleKey< xAOD::VertexContainerm_inputContainerPrimaryVerticesKey
 
SG::ReadHandleKey< xAOD::EventInfom_eventHandleKey
 
TStopwatch m_timerEvent
 
int m_countEvent
 
std::map< std::string, TH1 * > m_hists
 
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > m_accessQuality
 
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainerm_decorHandleKeys { this, "DecorHandleKeys", {} }
 
std::unordered_map< std::string, size_t > m_decorNameMap
 

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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

DataObjIDColl m_extendedExtraObjects
 
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 58 of file DecoratePromptLeptonRNN.h.

Member Typedef Documentation

◆ decoratorFloatH_t

Definition at line 74 of file DecoratePromptLeptonRNN.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DecoratePromptLeptonRNN()

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

Definition at line 21 of file DecoratePromptLeptonRNN.cxx.

21  :
22  AthAlgorithm(name, pSvcLocator),
23  m_histSvc ("THistSvc/THistSvc", name),
24  m_countEvent(0)
25 {}

Member Function Documentation

◆ compDummy()

bool Prompt::DecoratePromptLeptonRNN::compDummy ( const xAOD::IParticle particle,
std::vector< decoratorFloatH_t > &  decors 
) const

Definition at line 436 of file DecoratePromptLeptonRNN.cxx.

438 {
439  //
440  // Fill dummy values for RNN outputs
441  //
442  for (auto& d : decors) {
443  d(particle) = -1.0;
444  }
445 
446  return true;
447 }

◆ compScore()

bool Prompt::DecoratePromptLeptonRNN::compScore ( const xAOD::IParticle particle,
const std::vector< Prompt::VarHolder > &  tracks,
std::vector< decoratorFloatH_t > &  decors 
)

Definition at line 375 of file DecoratePromptLeptonRNN.cxx.

378 {
379  //
380  // Call the RNN tool to get the RNN prediction for the leptons and decorate the lepton with those RNN scores.
381  //
382  ATH_MSG_DEBUG("compScore - number of tracks: " << tracks.size());
383 
384  for(const Prompt::VarHolder &o: tracks) {
385  ATH_MSG_DEBUG("compScore - track: LepTrackDR = " << o.getVar(Def::LepTrackDR)
386  << ", TrackJetDR = " << o.getVar(Def::TrackJetDR)
387  << ", D0Sig = " << o.getVar(Def::D0Sig)
388  << ", Z0Sin = " << o.getVar(Def::Z0Sin)
389  << ", NumberOfPIXHits = " << o.getVar(Def::NumberOfPIXHits)
390  << ", NumberOfSCTHits = " << o.getVar(Def::NumberOfSCTHits)
391  << ", PtFrac = " << o.getVar(Def::TrackPtOverTrackJetPt) );
392  }
393 
394  const std::map<std::string, double> results = m_toolRNN->computeRNNOutput(tracks);
395 
396  for(const std::pair<const std::string, double>& v: results) {
397  //
398  // Decorate muon
399  //
400 
401  ATH_MSG_DEBUG("DecoratePromptLeptonRNN compScore - " << v.first << " = " << v.second );
402 
403  auto dit = m_decorNameMap.find (v.first);
404 
405  if(dit != m_decorNameMap.end()) {
406  decors.at(dit->second)(particle) = v.second;
407  }
408  else {
409  ATH_MSG_WARNING("CompScore - unknown output label=\"" << v.first << "\"");
410  }
411 
412  if(m_debug) {
414 
415  if(hit == m_hists.end()) {
416  TH1* h = 0;
417 
418  StatusCode hist_status = makeHist(h, v.first, 100, 0.0, 1.0);
419  if (hist_status != StatusCode::SUCCESS){
420  ATH_MSG_WARNING("DecoratePromptLeptonRNN compScore - failed to make hist");
421  }
422 
423  hit = m_hists.insert(std::map<std::string, TH1*>::value_type(v.first, h)).first;
424  }
425 
426  if(hit->second) {
427  hit->second->Fill(v.second);
428  }
429  }
430  }
431 
432  return true;
433 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< 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< 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< 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< 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< 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< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< 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< 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< 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::DecoratePromptLeptonRNN::execute ( )
overridevirtual

Definition at line 72 of file DecoratePromptLeptonRNN.cxx.

73 {
74  //
75  // Process current event
76  //
77  TimerScopeHelper timer(m_timerEvent);
78 
79  const EventContext& ctx = Gaudi::Hive::currentContext();
80 
81  ATH_MSG_DEBUG("execute() - begin...");
82 
83  m_countEvent++;
84 
85  //
86  // Retrieve object containers and event info
87  //
92 
94 
95  ATH_MSG_DEBUG("Size of LeptonContainer: " << h_leptons->size());
96 
97  std::vector<decoratorFloatH_t> decors;
98  decors.reserve (m_decorHandleKeys.size());
100  decors.emplace_back (k, ctx);
101  }
102 
103  //
104  // Find default Primary Vertex
105  //
106  const xAOD::Vertex *primaryVertex = nullptr;
107 
108  for(const xAOD::Vertex *vertex: *h_vertices) {
109  if(vertex->vertexType() == xAOD::VxType::PriVtx) {
110  primaryVertex = vertex;
111  break;
112  }
113  }
114 
115  //
116  // Collect tracks
117  //
118  for(const xAOD::IParticle *lepton: *h_leptons) {
119  //
120  // Select lepton track
121  //
122  const xAOD::TrackParticle *trackLep = nullptr;
123  const xAOD::Electron *elec = dynamic_cast<const xAOD::Electron*>(lepton);
124  const xAOD::Muon *muon = dynamic_cast<const xAOD::Muon *>(lepton);
125 
126  if(elec) {
127  const xAOD::TrackParticle *bestmatchedGSFElTrack = elec->trackParticle(0);
128  if(bestmatchedGSFElTrack) {
129  trackLep = xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(bestmatchedGSFElTrack);
130  }
131  }
132  else if (muon) {
133  trackLep = findMuonTrack(muon);
134  }
135  else {
136  ATH_MSG_WARNING("execute - failed to find electron or muon: should never happen!");
137  }
138 
139  //
140  // Find closest track jet
141  //
142  const xAOD::Jet *trackJet = findClosestTrackJet(trackLep, *h_trackJets);
143 
144  if(!trackLep || !trackJet) {
145  compDummy(*lepton, decors);
146  continue;
147  }
148 
149  //
150  // Select tracks within cone around lepton track.
151  //
152  std::vector<Prompt::VarHolder > select_tracks;
153 
154  Prompt::VarHolder lepton_obj;
155 
156  if(!prepTrackObject(lepton_obj, *trackLep, *trackLep, *trackJet, *primaryVertex, *event_handle)) {
157  continue;
158  }
159 
160  //
161  // Add lepton track as one of the cone tracks.
162  //
163  select_tracks.push_back(lepton_obj);
164 
165  for(const xAOD::TrackParticle *track: *h_tracks) {
166 
167  if(!track) {
168  ATH_MSG_WARNING("Prompt::DecoratePromptLeptonRNN::execute - skip null track pointer - should never happen");
169  continue;
170  }
171 
172  Prompt::VarHolder track_obj;
173 
174  if(!prepTrackObject(track_obj, *track, *trackLep, *trackJet, *primaryVertex, *event_handle)) {
175  continue;
176  }
177 
178  if(passTrack(track_obj)) {
179  select_tracks.push_back(track_obj);
180 
181  ATH_MSG_DEBUG("Prompt::DecoratePromptLeptonRNN::execute - passed track pT= " << track->pt());
182  }
183  }
184 
185  //
186  // Sort tracks by DR distance to lepton
187  //
188  std::sort(select_tracks.begin(), select_tracks.end(), Prompt::SortObjectByVar(Def::LepTrackDR, msg()));
189 
190  //
191  // Compute RNN
192  //
193  compScore(*lepton, select_tracks, decors);
194 
195  ATH_MSG_DEBUG("DecoratePromptLeptonRNN::CompScore - " << std::endl
196  << "lepton pT= " << lepton->pt()
197  << ", number of tracks: " << select_tracks.size());
198  }
199 
200  return StatusCode::SUCCESS;
201 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode Prompt::DecoratePromptLeptonRNN::finalize ( )
overridevirtual

Definition at line 204 of file DecoratePromptLeptonRNN.cxx.

205 {
206  //
207  // Finalize output
208  //
209  if(m_printTime) {
210  //
211  // Print full time stopwatch
212  //
213  ATH_MSG_INFO("DecoratePromptLeptonRNN - total time: " << PrintResetStopWatch(m_timerEvent));
214  ATH_MSG_INFO("DecoratePromptLeptonRNN - processed " << m_countEvent << " events.");
215  }
216 
217  return StatusCode::SUCCESS;
218 }

◆ findClosestTrackJet()

const xAOD::Jet * Prompt::DecoratePromptLeptonRNN::findClosestTrackJet ( const xAOD::TrackParticle particle,
const xAOD::JetContainer trackJets 
)

Definition at line 240 of file DecoratePromptLeptonRNN.cxx.

242 {
243  //
244  // Find track jet closest to IParticle and within fixed cone
245  //
246  if(!particle) {
247  return 0;
248  }
249 
250  const xAOD::Jet *trackJet = 0;
251  double currTrackJetDR = -1.0;
252 
253  //
254  // Select track jet within cone around muon
255  //
256  for(const xAOD::Jet *jet: trackJets) {
257  const double dr = particle->p4().DeltaR(jet->p4());
258 
259  if(currTrackJetDR < 0.0 || dr < currTrackJetDR) {
260  trackJet = jet;
261  currTrackJetDR = dr;
262  }
263  }
264 
265  if(trackJet && currTrackJetDR < m_maxLepTrackJetDR) {
266  return trackJet;
267  }
268 
269  return 0;
270 }

◆ findMuonTrack()

const xAOD::TrackParticle * Prompt::DecoratePromptLeptonRNN::findMuonTrack ( const xAOD::Muon muon)

Definition at line 221 of file DecoratePromptLeptonRNN.cxx.

222 {
223  //
224  // Process muon - return true if all information present for RNN
225  //
226  if(muon->muonType() != xAOD::Muon::Combined || !muon->inDetTrackParticleLink().isValid()) {
227  return 0;
228  }
229 
230  const unsigned char quality = (*m_accessQuality)(*muon);
231 
232  ATH_MSG_DEBUG("muon pT=" << muon->pt() << " quality=" << int(quality) << " medium=" << int(xAOD::Muon::Medium));
233 
234  const xAOD::TrackParticle *trackLep = *(muon->inDetTrackParticleLink());
235 
236  return trackLep;
237 }

◆ initialize()

StatusCode Prompt::DecoratePromptLeptonRNN::initialize ( )
overridevirtual

Definition at line 28 of file DecoratePromptLeptonRNN.cxx.

29 {
30  ATH_MSG_DEBUG("Initializing DecoratePromptLeptonRNN...");
31 
32  // Initialize read/write handles
37 
39 
40  //
41  // Initialize tools and services
42  //
43  ATH_CHECK( m_histSvc.retrieve() );
44 
45  m_decorHandleKeys.clear();
46  for(const std::string &label: m_toolRNN->getOutputLabels()) {
47  const std::string key = m_decorationPrefixRNN + label;
48 
49  ATH_MSG_DEBUG("Add output RNN label: \"" << key << "\"");
50 
51  m_decorNameMap.try_emplace (label, m_decorHandleKeys.size());
53  }
54  ATH_CHECK(m_decorHandleKeys.initialize());
55 
56  ATH_MSG_DEBUG("inputContainerMuon=\"" << m_inputContainerLeptonKey << "\"");
57 
58  //
59  // Instantiate Muon quality accessors
60  //
61  m_accessQuality = std::make_unique<SG::AuxElement::ConstAccessor<unsigned char> >("quality");
62 
63  m_timerEvent.Reset();
64 
65  ATH_MSG_DEBUG("DecoratePromptLeptonRNN initialized successfully.");
66 
67  return StatusCode::SUCCESS;
68 
69 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< 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.

◆ makeHist()

StatusCode Prompt::DecoratePromptLeptonRNN::makeHist ( TH1 *&  h,
const std::string &  key,
int  nbin,
double  xmin,
double  xmax 
)

Definition at line 450 of file DecoratePromptLeptonRNN.cxx.

451 {
452  //
453  // Initiliase histogram pointer. If configured to run in validation mode, then create and register histogram
454  //
455  h = 0;
456 
457  if(m_outputStream.empty() || key.empty()) {
458  return StatusCode::SUCCESS;
459  }
460 
461  const std::string hname = name() + "_" + key;
462  const std::string hist_key = "/"+m_outputStream+"/"+hname;
463 
464  h = new TH1D(hname.c_str(), hname.c_str(), nbin, xmin, xmax);
465  h->SetDirectory(0);
466 
467  return m_histSvc->regHist(hist_key, h);
468 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< 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< 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< 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.

◆ passTrack()

bool Prompt::DecoratePromptLeptonRNN::passTrack ( Prompt::VarHolder p)

Definition at line 348 of file DecoratePromptLeptonRNN.cxx.

349 {
350  //
351  // Select cone tracks
352  //
353  if(p.getVar(Def::LepTrackDR) < m_minTrackLeptonDR) return false;
354  if(p.getVar(Def::LepTrackDR) > m_maxTrackLeptonDR) return false;
355 
356  //
357  // Kinematic track selection
358  //
359  if(p.getVar(Def::Pt) < m_minTrackpT) return false;
360  if(p.getVar(Def::AbsEta) > m_maxTrackEta) return false;
361  if(std::fabs(p.getVar(Def::Z0Sin)) > m_maxTrackZ0Sin) return false;
362 
363  //
364  // Hit quality track selection
365  //
366  if(p.getVar(Def::NumberOfSiHits) < m_minTrackSiHits) return false;
367  if(p.getVar(Def::NumberOfSharedSiHits) > m_maxTrackSharedSiHits) return false;
368  if(p.getVar(Def::NumberOfSiHoles) > m_maxTrackSiHoles) return false;
369  if(p.getVar(Def::NumberOfPixelHoles) > m_maxTrackPixHoles) return false;
370 
371  return true;
372 }

◆ prepTrackObject()

bool Prompt::DecoratePromptLeptonRNN::prepTrackObject ( Prompt::VarHolder p,
const xAOD::TrackParticle track,
const xAOD::TrackParticle lepton,
const xAOD::Jet trackJet,
const xAOD::Vertex priVtx,
const xAOD::EventInfo  event 
)

Definition at line 273 of file DecoratePromptLeptonRNN.cxx.

281 {
282  //
283  // Add xAOD::TrackParticle variables to the track object VarHolder
284  //
291 
292  if(!(track.summaryValue(numberOfPixelHits, xAOD::numberOfPixelHits))) return false;
293  if(!(track.summaryValue(numberOfSCTHits, xAOD::numberOfSCTHits))) return false;
294  if(!(track.summaryValue(numberOfPixelHoles, xAOD::numberOfPixelHoles))) return false;
295  if(!(track.summaryValue(numberOfSCTHoles, xAOD::numberOfSCTHoles))) return false;
296  if(!(track.summaryValue(numberOfPixelSharedHits, xAOD::numberOfPixelSharedHits))) return false;
297  if(!(track.summaryValue(numberOfSCTSharedHits, xAOD::numberOfSCTSharedHits))) return false;
298 
299  const uint8_t NSiHits = numberOfPixelHits + numberOfSCTHits;
300  const uint8_t NSiHoles = numberOfPixelHoles + numberOfSCTHoles;
301  const float NSiShHits = float(numberOfPixelSharedHits) + float(numberOfSCTSharedHits)/2.0;
302 
303  p.addVar(Def::Pt, track.pt());
304  p.addVar(Def::AbsEta, std::fabs(track.eta()));
307  p.addVar(Def::NumberOfSiHits, NSiHits);
308  p.addVar(Def::NumberOfSharedSiHits, NSiShHits);
309  p.addVar(Def::NumberOfSiHoles, NSiHoles);
311 
312  //
313  // Add lepton - jet variables to VarHolder
314  //
315  double PtFrac = -99.;
316 
317  if(track.pt() > 0.0 && trackJet.pt() > 0.0) {
318  PtFrac = track.pt() / trackJet.pt();
319  }
320 
322  p.addVar(Def::TrackJetDR, track.p4().DeltaR(trackJet.p4()));
323  p.addVar(Def::LepTrackDR, track.p4().DeltaR(lepton.p4()));
324 
325  //
326  // Add Impact Parameters
327  //
328  double d0_significance = -99.;
329  double Z0Sin = 0.0;
330 
331  if(track.definingParametersCovMatrixVec().size() > 0 && track.definingParametersCovMatrixVec().at(0) > 0.0) {
332  d0_significance = xAOD::TrackingHelpers::d0significance(&track,
333  event.beamPosSigmaX(),
334  event.beamPosSigmaY(),
335  event.beamPosSigmaXY());
336  }
337 
338  const double deltaZ0 = track.z0() + track.vz() - priVtx.z();
339  Z0Sin = deltaZ0*std::sin(track.theta());
340 
341  p.addVar(Def::Z0Sin, Z0Sin);
342  p.addVar(Def::D0Sig, d0_significance);
343 
344  return true;
345 }

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

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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_accessQuality

std::unique_ptr<SG::AuxElement::ConstAccessor<unsigned char> > Prompt::DecoratePromptLeptonRNN::m_accessQuality

Definition at line 150 of file DecoratePromptLeptonRNN.h.

◆ m_countEvent

int Prompt::DecoratePromptLeptonRNN::m_countEvent

Definition at line 146 of file DecoratePromptLeptonRNN.h.

◆ m_debug

Gaudi::Property<bool> Prompt::DecoratePromptLeptonRNN::m_debug {this, "debug", false, "debug statement"}

Definition at line 115 of file DecoratePromptLeptonRNN.h.

◆ m_decorationPrefixRNN

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonRNN::m_decorationPrefixRNN {this, "decorationPrefixRNN", "", "Prefix of the name for the decorator of RNN to the lepton"}

Definition at line 100 of file DecoratePromptLeptonRNN.h.

◆ m_decorHandleKeys

SG::WriteDecorHandleKeyArray<xAOD::IParticleContainer> Prompt::DecoratePromptLeptonRNN::m_decorHandleKeys { this, "DecorHandleKeys", {} }

Definition at line 152 of file DecoratePromptLeptonRNN.h.

◆ m_decorNameMap

std::unordered_map<std::string, size_t> Prompt::DecoratePromptLeptonRNN::m_decorNameMap

Definition at line 154 of file DecoratePromptLeptonRNN.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventHandleKey

SG::ReadHandleKey<xAOD::EventInfo> Prompt::DecoratePromptLeptonRNN::m_eventHandleKey
Initial value:
{
this, "EventHandleKey", "EventInfo"
}

Definition at line 140 of file DecoratePromptLeptonRNN.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_hists

std::map<std::string, TH1*> Prompt::DecoratePromptLeptonRNN::m_hists

Definition at line 148 of file DecoratePromptLeptonRNN.h.

◆ m_histSvc

ServiceHandle<ITHistSvc> Prompt::DecoratePromptLeptonRNN::m_histSvc

Definition at line 123 of file DecoratePromptLeptonRNN.h.

◆ m_inputContainerLeptonKey

SG::ReadHandleKey<xAOD::IParticleContainer> Prompt::DecoratePromptLeptonRNN::m_inputContainerLeptonKey
Initial value:
{
this, "inputContainerLepton", "",
"Container's name of the lepton that you want to decorate"
}

Definition at line 126 of file DecoratePromptLeptonRNN.h.

◆ m_inputContainerPrimaryVerticesKey

SG::ReadHandleKey<xAOD::VertexContainer> Prompt::DecoratePromptLeptonRNN::m_inputContainerPrimaryVerticesKey
Initial value:
{
this, "inputContainerPrimaryVertices", "", "Primary vertex container name"
}

Definition at line 136 of file DecoratePromptLeptonRNN.h.

◆ m_inputContainerTrackJetKey

SG::ReadHandleKey<xAOD::JetContainer> Prompt::DecoratePromptLeptonRNN::m_inputContainerTrackJetKey
Initial value:
{
this, "inputContainerTrackJet", "", "Track Jet container name"
}

Definition at line 133 of file DecoratePromptLeptonRNN.h.

◆ m_inputContainerTrackKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> Prompt::DecoratePromptLeptonRNN::m_inputContainerTrackKey
Initial value:
{
this, "inputContainerTrack", "", "Track container name"
}

Definition at line 130 of file DecoratePromptLeptonRNN.h.

◆ m_maxLepTrackJetDR

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"}

Definition at line 108 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackEta

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackEta {this, "maxTrackEta", 2.5, "abs(eta) cut config for the input tracks to RNN"}

Definition at line 103 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackLeptonDR

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackLeptonDR {this, "maxTrackLeptonDR", 0.4, "Delta R between lepton and track cut config for the input tracks to RNN"}

Definition at line 107 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackPixHoles

Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_maxTrackPixHoles {this, "maxTrackPixHoles", 1.5, "track pixel holes cut config for the input tracks to RNN"}

Definition at line 113 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackSharedSiHits

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackSharedSiHits {this, "maxTrackSharedSiHits", 1.5, "track shared si hits cut config for the input tracks to RNN"}

Definition at line 110 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackSiHoles

Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_maxTrackSiHoles {this, "maxTrackSiHoles", 2.5, "track holes cut config for the input tracks to RNN"}

Definition at line 112 of file DecoratePromptLeptonRNN.h.

◆ m_maxTrackZ0Sin

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_maxTrackZ0Sin {this, "maxTrackZ0Sin", 1.0, "Z0sin cut config for the input tracks to RNN"}

Definition at line 104 of file DecoratePromptLeptonRNN.h.

◆ m_minTrackLeptonDR

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_minTrackLeptonDR {this, "minTrackLeptonDR", 1.0e-6, "Delta R between lepton and track cut config for the input tracks to RNN"}

Definition at line 106 of file DecoratePromptLeptonRNN.h.

◆ m_minTrackpT

Gaudi::Property<double> Prompt::DecoratePromptLeptonRNN::m_minTrackpT {this, "minTrackpT", 500.0, "pT cut config for the input tracks to RNN"}

Definition at line 102 of file DecoratePromptLeptonRNN.h.

◆ m_minTrackSiHits

Gaudi::Property<unsigned> Prompt::DecoratePromptLeptonRNN::m_minTrackSiHits {this, "minTrackSiHits", 6.5, "track silicon detector hits cut config for the input tracks to RNN"}

Definition at line 111 of file DecoratePromptLeptonRNN.h.

◆ m_outputStream

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonRNN::m_outputStream {this, "outputStream", "", "Path of the ROOT output directory of the histograms for RNN debug"}

Definition at line 99 of file DecoratePromptLeptonRNN.h.

◆ m_printTime

Gaudi::Property<bool> Prompt::DecoratePromptLeptonRNN::m_printTime {this, "printTime", false, "print running time, for debug"}

Definition at line 116 of file DecoratePromptLeptonRNN.h.

◆ m_timerEvent

TStopwatch Prompt::DecoratePromptLeptonRNN::m_timerEvent

Definition at line 145 of file DecoratePromptLeptonRNN.h.

◆ m_toolRNN

ToolHandle<IRNNTool> Prompt::DecoratePromptLeptonRNN::m_toolRNN
Initial value:
{
this, "toolRNN", "defaultToolRNN", "Dedicated tool for RNN prediction"
}

Definition at line 119 of file DecoratePromptLeptonRNN.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:262
Prompt::Def::LepTrackDR
@ LepTrackDR
Definition: VarHolder.h:75
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
Prompt::DecoratePromptLeptonRNN::m_decorHandleKeys
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_decorHandleKeys
Definition: DecoratePromptLeptonRNN.h:153
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
Prompt::Def::NumberOfSCTHits
@ NumberOfSCTHits
Definition: VarHolder.h:79
Prompt::DecoratePromptLeptonRNN::m_decorNameMap
std::unordered_map< std::string, size_t > m_decorNameMap
Definition: DecoratePromptLeptonRNN.h:154
Prompt::DecoratePromptLeptonRNN::m_decorationPrefixRNN
Gaudi::Property< std::string > m_decorationPrefixRNN
Definition: DecoratePromptLeptonRNN.h:100
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:557
Prompt::Def::NumberOfSiHits
@ NumberOfSiHits
Definition: VarHolder.h:80
Prompt::DecoratePromptLeptonRNN::m_accessQuality
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > m_accessQuality
Definition: DecoratePromptLeptonRNN.h:150
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
Prompt::DecoratePromptLeptonRNN::m_outputStream
Gaudi::Property< std::string > m_outputStream
Definition: DecoratePromptLeptonRNN.h:99
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
hist_file_dump.d
d
Definition: hist_file_dump.py:143
Prompt::DecoratePromptLeptonRNN::compDummy
bool compDummy(const xAOD::IParticle &particle, std::vector< decoratorFloatH_t > &decors) const
Definition: DecoratePromptLeptonRNN.cxx:436
Prompt::VarHolder
Definition: VarHolder.h:112
xAOD::TrackingHelpers::d0significance
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Definition: TrackParticlexAODHelpers.cxx:42
Prompt::DecoratePromptLeptonRNN::m_inputContainerTrackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputContainerTrackKey
Definition: DecoratePromptLeptonRNN.h:130
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Prompt::DecoratePromptLeptonRNN::m_countEvent
int m_countEvent
Definition: DecoratePromptLeptonRNN.h:146
Prompt::DecoratePromptLeptonRNN::m_minTrackLeptonDR
Gaudi::Property< double > m_minTrackLeptonDR
Definition: DecoratePromptLeptonRNN.h:106
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:260
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:55
Prompt::DecoratePromptLeptonRNN::m_minTrackSiHits
Gaudi::Property< unsigned > m_minTrackSiHits
Definition: DecoratePromptLeptonRNN.h:111
Prompt::DecoratePromptLeptonRNN::prepTrackObject
bool prepTrackObject(Prompt::VarHolder &p, const xAOD::TrackParticle &track, const xAOD::TrackParticle &lepton, const xAOD::Jet &trackJet, const xAOD::Vertex &priVtx, const xAOD::EventInfo event)
Definition: DecoratePromptLeptonRNN.cxx:273
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Prompt::DecoratePromptLeptonRNN::findClosestTrackJet
const xAOD::Jet * findClosestTrackJet(const xAOD::TrackParticle *particle, const xAOD::JetContainer &trackJets)
Definition: DecoratePromptLeptonRNN.cxx:240
Prompt::DecoratePromptLeptonRNN::m_inputContainerTrackJetKey
SG::ReadHandleKey< xAOD::JetContainer > m_inputContainerTrackJetKey
Definition: DecoratePromptLeptonRNN.h:133
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Prompt::PrintResetStopWatch
std::string PrintResetStopWatch(TStopwatch &watch)
Definition: PromptUtils.cxx:244
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
Prompt::Def::Z0Sin
@ Z0Sin
Definition: VarHolder.h:86
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Prompt::Def::NumberOfPIXHits
@ NumberOfPIXHits
Definition: VarHolder.h:78
Prompt::Def::PtFrac
@ PtFrac
Definition: VarHolder.h:71
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Prompt::DecoratePromptLeptonRNN::m_maxTrackZ0Sin
Gaudi::Property< double > m_maxTrackZ0Sin
Definition: DecoratePromptLeptonRNN.h:104
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Prompt::DecoratePromptLeptonRNN::makeHist
StatusCode makeHist(TH1 *&h, const std::string &key, int nbin, double xmin, double xmax)
Definition: DecoratePromptLeptonRNN.cxx:450
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:129
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:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
Prompt::Def::D0Sig
@ D0Sig
Definition: VarHolder.h:87
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Prompt::DecoratePromptLeptonRNN::m_eventHandleKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventHandleKey
Definition: DecoratePromptLeptonRNN.h:140
xmin
double xmin
Definition: listroot.cxx:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Prompt::Def::NumberOfSiHoles
@ NumberOfSiHoles
Definition: VarHolder.h:82
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
Prompt::DecoratePromptLeptonRNN::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: DecoratePromptLeptonRNN.h:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Prompt::DecoratePromptLeptonRNN::m_hists
std::map< std::string, TH1 * > m_hists
Definition: DecoratePromptLeptonRNN.h:148
add-xsec-uncert-quadrature-N.results
dictionary results
Definition: add-xsec-uncert-quadrature-N.py:39
Prompt::DecoratePromptLeptonRNN::m_printTime
Gaudi::Property< bool > m_printTime
Definition: DecoratePromptLeptonRNN.h:116
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::Vertex_v1::z
float z() const
Returns the z position.
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::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:271
Prompt::DecoratePromptLeptonRNN::m_maxTrackPixHoles
Gaudi::Property< unsigned > m_maxTrackPixHoles
Definition: DecoratePromptLeptonRNN.h:113
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
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
Prompt::DecoratePromptLeptonRNN::m_inputContainerLeptonKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_inputContainerLeptonKey
Definition: DecoratePromptLeptonRNN.h:126
Prompt::SortObjectByVar
Definition: PromptUtils.h:127
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
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
Prompt::DecoratePromptLeptonRNN::m_timerEvent
TStopwatch m_timerEvent
Definition: DecoratePromptLeptonRNN.h:145
xAOD::Electron_v1
Definition: Electron_v1.h:34
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Prompt::Def::NumberOfSharedSiHits
@ NumberOfSharedSiHits
Definition: VarHolder.h:81
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::Jet_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Jet_v1.cxx:71
Prompt::Def::Pt
@ Pt
Definition: VarHolder.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
LikeEnum::Medium
@ Medium
Definition: LikelihoodEnums.h:14
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
SG::makeContDecorKey
std::string makeContDecorKey(const std::string &cont, const std::string &decor)
Make a StoreGate key from container and decoration name.
Definition: DecorKeyHelpers.cxx:59
Prompt::Def::TrackPtOverTrackJetPt
@ TrackPtOverTrackJetPt
Definition: VarHolder.h:85
Prompt::DecoratePromptLeptonRNN::m_debug
Gaudi::Property< bool > m_debug
Definition: DecoratePromptLeptonRNN.h:115
python.TrackLeptonConfig.quality
quality
Definition: TrackLeptonConfig.py:16
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Prompt::Def::TrackJetDR
@ TrackJetDR
Definition: VarHolder.h:84
xmax
double xmax
Definition: listroot.cxx:61
Prompt::DecoratePromptLeptonRNN::compScore
bool compScore(const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, std::vector< decoratorFloatH_t > &decors)
Definition: DecoratePromptLeptonRNN.cxx:375
Prompt::Def::NumberOfPixelHoles
@ NumberOfPixelHoles
Definition: VarHolder.h:83
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
Prompt::DecoratePromptLeptonRNN::findMuonTrack
const xAOD::TrackParticle * findMuonTrack(const xAOD::Muon *muon)
Definition: DecoratePromptLeptonRNN.cxx:221
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:269
Prompt::DecoratePromptLeptonRNN::m_inputContainerPrimaryVerticesKey
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerPrimaryVerticesKey
Definition: DecoratePromptLeptonRNN.h:136
Prompt::DecoratePromptLeptonRNN::m_minTrackpT
Gaudi::Property< double > m_minTrackpT
Definition: DecoratePromptLeptonRNN.h:102
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Prompt::DecoratePromptLeptonRNN::m_maxTrackSiHoles
Gaudi::Property< unsigned > m_maxTrackSiHoles
Definition: DecoratePromptLeptonRNN.h:112
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Prompt::DecoratePromptLeptonRNN::m_maxTrackSharedSiHits
Gaudi::Property< double > m_maxTrackSharedSiHits
Definition: DecoratePromptLeptonRNN.h:110
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
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Prompt::DecoratePromptLeptonRNN::m_toolRNN
ToolHandle< IRNNTool > m_toolRNN
Definition: DecoratePromptLeptonRNN.h:119
Prompt::DecoratePromptLeptonRNN::m_maxLepTrackJetDR
Gaudi::Property< double > m_maxLepTrackJetDR
Definition: DecoratePromptLeptonRNN.h:108
xAOD::Jet_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: Jet_v1.cxx:44
Prompt::Def::AbsEta
@ AbsEta
Definition: VarHolder.h:77
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Prompt::DecoratePromptLeptonRNN::m_maxTrackEta
Gaudi::Property< double > m_maxTrackEta
Definition: DecoratePromptLeptonRNN.h:103
Prompt::DecoratePromptLeptonRNN::passTrack
bool passTrack(Prompt::VarHolder &p)
Definition: DecoratePromptLeptonRNN.cxx:348
Prompt::DecoratePromptLeptonRNN::m_maxTrackLeptonDR
Gaudi::Property< double > m_maxTrackLeptonDR
Definition: DecoratePromptLeptonRNN.h:107
fitman.k
k
Definition: fitman.py:528
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37