ATLAS Offline Software
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

typedef SG::AuxElement::Decorator< float > decoratorFloat_t
 
typedef std::map< std::string, std::unique_ptr< decoratorFloat_t > > decoratorFloatMap_t
 

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, const std::string &prefix)
 
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, const std::string &prefix)
 
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
 
decoratorFloatMap_t m_decoratorMap
 
std::map< std::string, TH1 * > m_hists
 
std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned char > > m_accessQuality
 

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 55 of file DecoratePromptLeptonRNN.h.

Member Typedef Documentation

◆ decoratorFloat_t

Definition at line 71 of file DecoratePromptLeptonRNN.h.

◆ decoratorFloatMap_t

typedef std::map<std::string, std::unique_ptr<decoratorFloat_t> > Prompt::DecoratePromptLeptonRNN::decoratorFloatMap_t

Definition at line 72 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 19 of file DecoratePromptLeptonRNN.cxx.

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

Member Function Documentation

◆ compDummy()

bool Prompt::DecoratePromptLeptonRNN::compDummy ( const xAOD::IParticle particle,
const std::string &  prefix 
)

Definition at line 426 of file DecoratePromptLeptonRNN.cxx.

428 {
429  //
430  // Fill dummy values for RNN outputs
431  //
432  for(const decoratorFloatMap_t::value_type &v: m_decoratorMap) {
433  //
434  // Decorate muon
435  //
436  const std::string dkey = prefix + v.first;
437 
438  (*v.second)(particle) = -1.0;
439  }
440 
441  return true;
442 }

◆ compScore()

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

Definition at line 362 of file DecoratePromptLeptonRNN.cxx.

365 {
366  //
367  // Call the RNN tool to get the RNN prediction for the leptons and decorate the lepton with those RNN scores.
368  //
369  ATH_MSG_DEBUG("compScore - number of tracks: " << tracks.size());
370 
371  for(const Prompt::VarHolder &o: tracks) {
372  ATH_MSG_DEBUG("compScore - track: LepTrackDR = " << o.getVar(Def::LepTrackDR)
373  << ", TrackJetDR = " << o.getVar(Def::TrackJetDR)
374  << ", D0Sig = " << o.getVar(Def::D0Sig)
375  << ", Z0Sin = " << o.getVar(Def::Z0Sin)
376  << ", NumberOfPIXHits = " << o.getVar(Def::NumberOfPIXHits)
377  << ", NumberOfSCTHits = " << o.getVar(Def::NumberOfSCTHits)
378  << ", PtFrac = " << o.getVar(Def::TrackPtOverTrackJetPt) );
379  }
380 
381  const std::map<std::string, double> results = m_toolRNN->computeRNNOutput(tracks);
382 
383  for(const std::pair<const std::string, double>& v: results) {
384  //
385  // Decorate muon
386  //
387  const std::string dkey = prefix + v.first;
388 
389  ATH_MSG_DEBUG("DecoratePromptLeptonRNN compScore - " << v.first << " = " << v.second );
390 
392 
393  // TODO: make sure this fits within the StoreGate framework
394  // for memory access
395  if(dit != m_decoratorMap.end()) {
396  (*dit->second)(particle) = v.second;
397  }
398  else {
399  ATH_MSG_WARNING("CompScore - unknown output label=\"" << dkey << "\"");
400  }
401 
402  if(m_debug) {
404 
405  if(hit == m_hists.end()) {
406  TH1* h = 0;
407 
408  StatusCode hist_status = makeHist(h, v.first, 100, 0.0, 1.0);
409  if (hist_status != StatusCode::SUCCESS){
410  ATH_MSG_WARNING("DecoratePromptLeptonRNN compScore - failed to make hist");
411  }
412 
413  hit = m_hists.insert(std::map<std::string, TH1*>::value_type(v.first, h)).first;
414  }
415 
416  if(hit->second) {
417  hit->second->Fill(v.second);
418  }
419  }
420  }
421 
422  return true;
423 }

◆ 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 67 of file DecoratePromptLeptonRNN.cxx.

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

◆ 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 191 of file DecoratePromptLeptonRNN.cxx.

192 {
193  //
194  // Finalize output
195  //
196  if(m_printTime) {
197  //
198  // Print full time stopwatch
199  //
200  ATH_MSG_INFO("DecoratePromptLeptonRNN - total time: " << PrintResetStopWatch(m_timerEvent));
201  ATH_MSG_INFO("DecoratePromptLeptonRNN - processed " << m_countEvent << " events.");
202  }
203 
204  return StatusCode::SUCCESS;
205 }

◆ findClosestTrackJet()

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

Definition at line 227 of file DecoratePromptLeptonRNN.cxx.

229 {
230  //
231  // Find track jet closest to IParticle and within fixed cone
232  //
233  if(!particle) {
234  return 0;
235  }
236 
237  const xAOD::Jet *trackJet = 0;
238  double currTrackJetDR = -1.0;
239 
240  //
241  // Select track jet within cone around muon
242  //
243  for(const xAOD::Jet *jet: trackJets) {
244  const double dr = particle->p4().DeltaR(jet->p4());
245 
246  if(currTrackJetDR < 0.0 || dr < currTrackJetDR) {
247  trackJet = jet;
248  currTrackJetDR = dr;
249  }
250  }
251 
252  if(trackJet && currTrackJetDR < m_maxLepTrackJetDR) {
253  return trackJet;
254  }
255 
256  return 0;
257 }

◆ findMuonTrack()

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

Definition at line 208 of file DecoratePromptLeptonRNN.cxx.

209 {
210  //
211  // Process muon - return true if all information present for RNN
212  //
213  if(muon->muonType() != xAOD::Muon::Combined || !muon->inDetTrackParticleLink().isValid()) {
214  return 0;
215  }
216 
217  const unsigned char quality = (*m_accessQuality)(*muon);
218 
219  ATH_MSG_DEBUG("muon pT=" << muon->pt() << " quality=" << int(quality) << " medium=" << int(xAOD::Muon::Medium));
220 
221  const xAOD::TrackParticle *trackLep = *(muon->inDetTrackParticleLink());
222 
223  return trackLep;
224 }

◆ initialize()

StatusCode Prompt::DecoratePromptLeptonRNN::initialize ( )
overridevirtual

Definition at line 26 of file DecoratePromptLeptonRNN.cxx.

27 {
28  ATH_MSG_DEBUG("Initializing DecoratePromptLeptonRNN...");
29 
30  // Initialize read/write handles
35 
37 
38  //
39  // Initialize tools and services
40  //
41  ATH_CHECK( m_histSvc.retrieve() );
42 
43  for(const std::string &label: m_toolRNN->getOutputLabels()) {
44  const std::string key = m_decorationPrefixRNN + label;
45 
46  ATH_MSG_DEBUG("Add output RNN label: \"" << key << "\"");
47 
48  m_decoratorMap.insert(decoratorFloatMap_t::value_type(key, std::make_unique<decoratorFloat_t>(key)));
49  }
50 
51  ATH_MSG_DEBUG("inputContainerMuon=\"" << m_inputContainerLeptonKey << "\"");
52 
53  //
54  // Instantiate Muon quality accessors
55  //
56  m_accessQuality = std::make_unique<SG::AuxElement::ConstAccessor<unsigned char> >("quality");
57 
58  m_timerEvent.Reset();
59 
60  ATH_MSG_DEBUG("DecoratePromptLeptonRNN initialized successfully.");
61 
62  return StatusCode::SUCCESS;
63 
64 }

◆ 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 445 of file DecoratePromptLeptonRNN.cxx.

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

◆ 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 335 of file DecoratePromptLeptonRNN.cxx.

336 {
337  //
338  // Select cone tracks
339  //
340  if(p.getVar(Def::LepTrackDR) < m_minTrackLeptonDR) return false;
341  if(p.getVar(Def::LepTrackDR) > m_maxTrackLeptonDR) return false;
342 
343  //
344  // Kinematic track selection
345  //
346  if(p.getVar(Def::Pt) < m_minTrackpT) return false;
347  if(p.getVar(Def::AbsEta) > m_maxTrackEta) return false;
348  if(std::fabs(p.getVar(Def::Z0Sin)) > m_maxTrackZ0Sin) return false;
349 
350  //
351  // Hit quality track selection
352  //
353  if(p.getVar(Def::NumberOfSiHits) < m_minTrackSiHits) return false;
354  if(p.getVar(Def::NumberOfSharedSiHits) > m_maxTrackSharedSiHits) return false;
355  if(p.getVar(Def::NumberOfSiHoles) > m_maxTrackSiHoles) return false;
356  if(p.getVar(Def::NumberOfPixelHoles) > m_maxTrackPixHoles) return false;
357 
358  return true;
359 }

◆ 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 260 of file DecoratePromptLeptonRNN.cxx.

268 {
269  //
270  // Add xAOD::TrackParticle variables to the track object VarHolder
271  //
278 
279  if(!(track.summaryValue(numberOfPixelHits, xAOD::numberOfPixelHits))) return false;
280  if(!(track.summaryValue(numberOfSCTHits, xAOD::numberOfSCTHits))) return false;
281  if(!(track.summaryValue(numberOfPixelHoles, xAOD::numberOfPixelHoles))) return false;
282  if(!(track.summaryValue(numberOfSCTHoles, xAOD::numberOfSCTHoles))) return false;
283  if(!(track.summaryValue(numberOfPixelSharedHits, xAOD::numberOfPixelSharedHits))) return false;
284  if(!(track.summaryValue(numberOfSCTSharedHits, xAOD::numberOfSCTSharedHits))) return false;
285 
286  const uint8_t NSiHits = numberOfPixelHits + numberOfSCTHits;
287  const uint8_t NSiHoles = numberOfPixelHoles + numberOfSCTHoles;
288  const float NSiShHits = float(numberOfPixelSharedHits) + float(numberOfSCTSharedHits)/2.0;
289 
290  p.addVar(Def::Pt, track.pt());
291  p.addVar(Def::AbsEta, std::fabs(track.eta()));
294  p.addVar(Def::NumberOfSiHits, NSiHits);
295  p.addVar(Def::NumberOfSharedSiHits, NSiShHits);
296  p.addVar(Def::NumberOfSiHoles, NSiHoles);
298 
299  //
300  // Add lepton - jet variables to VarHolder
301  //
302  double PtFrac = -99.;
303 
304  if(track.pt() > 0.0 && trackJet.pt() > 0.0) {
305  PtFrac = track.pt() / trackJet.pt();
306  }
307 
309  p.addVar(Def::TrackJetDR, track.p4().DeltaR(trackJet.p4()));
310  p.addVar(Def::LepTrackDR, track.p4().DeltaR(lepton.p4()));
311 
312  //
313  // Add Impact Parameters
314  //
315  double d0_significance = -99.;
316  double Z0Sin = 0.0;
317 
318  if(track.definingParametersCovMatrixVec().size() > 0 && track.definingParametersCovMatrixVec().at(0) > 0.0) {
319  d0_significance = xAOD::TrackingHelpers::d0significance(&track,
320  event.beamPosSigmaX(),
321  event.beamPosSigmaY(),
322  event.beamPosSigmaXY());
323  }
324 
325  const double deltaZ0 = track.z0() + track.vz() - priVtx.z();
326  Z0Sin = deltaZ0*std::sin(track.theta());
327 
328  p.addVar(Def::Z0Sin, Z0Sin);
329  p.addVar(Def::D0Sig, d0_significance);
330 
331  return true;
332 }

◆ 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 144 of file DecoratePromptLeptonRNN.h.

◆ m_debug

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

Definition at line 113 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 98 of file DecoratePromptLeptonRNN.h.

◆ m_decoratorMap

decoratorFloatMap_t Prompt::DecoratePromptLeptonRNN::m_decoratorMap

Definition at line 146 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 138 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 121 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 124 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 134 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 131 of file DecoratePromptLeptonRNN.h.

◆ m_inputContainerTrackKey

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

Definition at line 128 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 106 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 101 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 105 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 111 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 108 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 110 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 102 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 104 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 100 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 109 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 97 of file DecoratePromptLeptonRNN.h.

◆ m_printTime

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

Definition at line 114 of file DecoratePromptLeptonRNN.h.

◆ m_timerEvent

TStopwatch Prompt::DecoratePromptLeptonRNN::m_timerEvent

Definition at line 143 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 117 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
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
Prompt::Def::LepTrackDR
@ LepTrackDR
Definition: VarHolder.h:75
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
verify_menu_config.results
results
Definition: verify_menu_config.py:67
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_decorationPrefixRNN
Gaudi::Property< std::string > m_decorationPrefixRNN
Definition: DecoratePromptLeptonRNN.h:98
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:272
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:97
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
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:128
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:144
Prompt::DecoratePromptLeptonRNN::m_minTrackLeptonDR
Gaudi::Property< double > m_minTrackLeptonDR
Definition: DecoratePromptLeptonRNN.h:104
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
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:109
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:260
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:227
Prompt::DecoratePromptLeptonRNN::m_inputContainerTrackJetKey
SG::ReadHandleKey< xAOD::JetContainer > m_inputContainerTrackJetKey
Definition: DecoratePromptLeptonRNN.h:131
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:102
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:445
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:262
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:138
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:571
Prompt::DecoratePromptLeptonRNN::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: DecoratePromptLeptonRNN.h:121
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Prompt::DecoratePromptLeptonRNN::m_hists
std::map< std::string, TH1 * > m_hists
Definition: DecoratePromptLeptonRNN.h:148
Prompt::DecoratePromptLeptonRNN::m_printTime
Gaudi::Property< bool > m_printTime
Definition: DecoratePromptLeptonRNN.h:114
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:270
Prompt::DecoratePromptLeptonRNN::m_maxTrackPixHoles
Gaudi::Property< unsigned > m_maxTrackPixHoles
Definition: DecoratePromptLeptonRNN.h:111
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Prompt::DecoratePromptLeptonRNN::compScore
bool compScore(const xAOD::IParticle &particle, const std::vector< Prompt::VarHolder > &tracks, const std::string &prefix)
Definition: DecoratePromptLeptonRNN.cxx:362
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:124
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:228
Prompt::DecoratePromptLeptonRNN::compDummy
bool compDummy(const xAOD::IParticle &particle, const std::string &prefix)
Definition: DecoratePromptLeptonRNN.cxx:426
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:143
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
Prompt::Def::TrackPtOverTrackJetPt
@ TrackPtOverTrackJetPt
Definition: VarHolder.h:85
Prompt::DecoratePromptLeptonRNN::m_debug
Gaudi::Property< bool > m_debug
Definition: DecoratePromptLeptonRNN.h:113
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::Def::NumberOfPixelHoles
@ NumberOfPixelHoles
Definition: VarHolder.h:83
Prompt::DecoratePromptLeptonRNN::m_decoratorMap
decoratorFloatMap_t m_decoratorMap
Definition: DecoratePromptLeptonRNN.h:146
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Prompt::DecoratePromptLeptonRNN::findMuonTrack
const xAOD::TrackParticle * findMuonTrack(const xAOD::Muon *muon)
Definition: DecoratePromptLeptonRNN.cxx:208
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
Prompt::DecoratePromptLeptonRNN::m_inputContainerPrimaryVerticesKey
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerPrimaryVerticesKey
Definition: DecoratePromptLeptonRNN.h:134
Prompt::DecoratePromptLeptonRNN::m_minTrackpT
Gaudi::Property< double > m_minTrackpT
Definition: DecoratePromptLeptonRNN.h:100
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Prompt::DecoratePromptLeptonRNN::m_maxTrackSiHoles
Gaudi::Property< unsigned > m_maxTrackSiHoles
Definition: DecoratePromptLeptonRNN.h:110
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Prompt::DecoratePromptLeptonRNN::m_maxTrackSharedSiHits
Gaudi::Property< double > m_maxTrackSharedSiHits
Definition: DecoratePromptLeptonRNN.h:108
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
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:117
Prompt::DecoratePromptLeptonRNN::m_maxLepTrackJetDR
Gaudi::Property< double > m_maxLepTrackJetDR
Definition: DecoratePromptLeptonRNN.h:106
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:101
readCCLHist.float
float
Definition: readCCLHist.py:83
Prompt::DecoratePromptLeptonRNN::passTrack
bool passTrack(Prompt::VarHolder &p)
Definition: DecoratePromptLeptonRNN.cxx:335
Prompt::DecoratePromptLeptonRNN::m_maxTrackLeptonDR
Gaudi::Property< double > m_maxTrackLeptonDR
Definition: DecoratePromptLeptonRNN.h:105
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37