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

#include <MVATrackVertexAssociationTool.h>

Inheritance diagram for CP::MVATrackVertexAssociationTool:
Collaboration diagram for CP::MVATrackVertexAssociationTool:

Public Member Functions

 MVATrackVertexAssociationTool (const std::string &name)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual bool isCompatible (const xAOD::TrackParticle &trk, const xAOD::Vertex &vx) const override
 This function just return the decision of whether the track is matched to the Vertex Not sure whether the track is matched to best choice. More...
 
virtual bool isCompatible (const xAOD::TrackParticle &trk) const override
 
virtual xAOD::TrackVertexAssociationMap getMatchMap (std::vector< const xAOD::TrackParticle * > &trk_list, std::vector< const xAOD::Vertex * > &vx_list) const override
 
virtual xAOD::TrackVertexAssociationMap getMatchMap (const xAOD::TrackParticleContainer &trk_cont, const xAOD::VertexContainer &vx_cont) const override
 
virtual ElementLink< xAOD::VertexContainergetUniqueMatchVertexLink (const xAOD::TrackParticle &trk, const xAOD::VertexContainer &vx_cont) const override
 This functions will return the best matched vertex. More...
 
virtual const xAOD::VertexgetUniqueMatchVertex (const xAOD::TrackParticle &trk, std::vector< const xAOD::Vertex * > &vx_list) const override
 
virtual xAOD::TrackVertexAssociationMap getUniqueMatchMap (std::vector< const xAOD::TrackParticle * > &trk_list, std::vector< const xAOD::Vertex * > &vx_list) const override
 This functions related to the previous functions, will return a 2D vector to store the best matched tracks for each vertex. More...
 
virtual xAOD::TrackVertexAssociationMap getUniqueMatchMap (const xAOD::TrackParticleContainer &trk_cont, const xAOD::VertexContainer &vx_cont) const override
 
virtual void print () const
 Print the state of the tool. 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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

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

bool isMatch (const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, float &mvaOutput, const xAOD::EventInfo *evtInfo=nullptr) const
 
template<typename T , typename V >
xAOD::TrackVertexAssociationMap getMatchMapInternal (const T &trk_list, const V &vx_list) const
 
template<typename T , typename V >
xAOD::TrackVertexAssociationMap getUniqueMatchMapInternal (const T &trk_list, const V &vx_list) const
 
template<typename T >
const xAOD::VertexgetUniqueMatchVertexInternal (const xAOD::TrackParticle &trk, const T &vx_list) const
 
StatusCode initializeNetwork ()
 
float evaluateNetwork (const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt) const
 
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

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
 
The properties that can be defined via the python job options
Gaudi::Property< std::string > m_fileName {this, "NetworkFileName", "" }
 Input lwtnn network file. More...
 
Gaudi::Property< std::vector< std::string > > m_inputNames
 Vector of input variable names. More...
 
Gaudi::Property< std::vector< int > > m_inputTypes
 Vector of input variable types. More...
 
Gaudi::Property< std::string > m_outputName
 Name of the output node to cut on. More...
 
Gaudi::Property< bool > m_isSequential
 Is the network sequential or functional. More...
 
Gaudi::Property< std::string > m_wp {this, "WorkingPoint", "Tight", "TVA working point to apply."}
 TVA working point. More...
 
Gaudi::Property< float > m_cut
 TVA cut value on the output discriminant. More...
 
Gaudi::Property< bool > m_usePathResolver
 Use the PathResolver to find our input file. More...
 
Gaudi::Property< std::string > m_hardScatterDeco
 The decoration name of the ElementLink to the hardscatter vertex (found on xAOD::EventInfo) More...
 
Truly private internal data members
MVAInputEvaluator::InputSelectionMap m_inputMap
 Input variable name/type map. More...
 
MVAInputEvaluator m_inputEval
 Input variable evaluator. More...
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfo {this, "EventInfo", "EventInfo", "EventInfo key"}
 EventInfo key. More...
 
SG::ReadDecorHandleKey< xAOD::EventInfom_hardScatterDecoKey
 Hardscatter vertex link key. More...
 
std::string m_inputNodeName = ""
 Name of the input node (for functional modes) More...
 
std::unique_ptr< lwt::LightweightNeuralNetwork > m_network
 Network as implemented using lwtnn. More...
 
std::unique_ptr< lwt::LightweightGraph > m_graph
 

Detailed Description

Definition at line 36 of file MVATrackVertexAssociationTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MVATrackVertexAssociationTool()

CP::MVATrackVertexAssociationTool::MVATrackVertexAssociationTool ( const std::string &  name)

Definition at line 36 of file MVATrackVertexAssociationTool.cxx.

36  :
37  AsgTool(name) {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ evaluateNetwork()

float CP::MVATrackVertexAssociationTool::evaluateNetwork ( const xAOD::TrackParticle trk,
const xAOD::Vertex vx,
const xAOD::EventInfo evt 
) const
private

Definition at line 276 of file MVATrackVertexAssociationTool.cxx.

276  {
277 
278  // Evaluate our inputs
279  std::map<std::string, double> input;
280  m_inputEval.eval(trk, vx, evt, input);
281 
282  // Evaluate our network
283  std::map<std::string, double> output;
284  // For sequential:
285  if (m_isSequential) {
286  output = m_network->compute(input);
287  }
288  // For functional:
289  else {
290  std::map<std::string, std::map<std::string, double>> wrappedInput;
291  wrappedInput[m_inputNodeName] = input;
292  output = m_graph->compute(wrappedInput);
293  }
294 
295  return output[m_outputName];
296 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getMatchMap() [1/2]

xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getMatchMap ( const xAOD::TrackParticleContainer trk_cont,
const xAOD::VertexContainer vx_cont 
) const
overridevirtual

Implements CP::ITrackVertexAssociationTool.

Definition at line 101 of file MVATrackVertexAssociationTool.cxx.

101  {
102  return getMatchMapInternal(trkCont, vxCont);
103 }

◆ getMatchMap() [2/2]

xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getMatchMap ( std::vector< const xAOD::TrackParticle * > &  trk_list,
std::vector< const xAOD::Vertex * > &  vx_list 
) const
overridevirtual

Implements CP::ITrackVertexAssociationTool.

Definition at line 97 of file MVATrackVertexAssociationTool.cxx.

97  {
98  return getMatchMapInternal(trk_list, vx_list);
99 }

◆ getMatchMapInternal()

template<typename T , typename V >
xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getMatchMapInternal ( const T &  trk_list,
const V &  vx_list 
) const
private

Definition at line 158 of file MVATrackVertexAssociationTool.cxx.

158  {
159 
161 
162  for (const auto *vertex : vx_list) {
164  trktovxlist.clear();
165  trktovxlist.reserve(trk_list.size());
166  for (const auto *track : trk_list) {
167  if (isCompatible(*track, *vertex)) {
168  trktovxlist.push_back(track);
169  }
170  }
171  trktovxmap[vertex] = trktovxlist;
172  }
173 
174  return trktovxmap;
175 }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getUniqueMatchMap() [1/2]

xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getUniqueMatchMap ( const xAOD::TrackParticleContainer trk_cont,
const xAOD::VertexContainer vx_cont 
) const
overridevirtual

Implements CP::ITrackVertexAssociationTool.

Definition at line 122 of file MVATrackVertexAssociationTool.cxx.

122  {
123  return getUniqueMatchMapInternal(trkCont, vxCont);
124 }

◆ getUniqueMatchMap() [2/2]

xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getUniqueMatchMap ( std::vector< const xAOD::TrackParticle * > &  trk_list,
std::vector< const xAOD::Vertex * > &  vx_list 
) const
overridevirtual

This functions related to the previous functions, will return a 2D vector to store the best matched tracks for each vertex.

Implements CP::ITrackVertexAssociationTool.

Definition at line 118 of file MVATrackVertexAssociationTool.cxx.

118  {
119  return getUniqueMatchMapInternal(trk_list, vx_list);
120 }

◆ getUniqueMatchMapInternal()

template<typename T , typename V >
xAOD::TrackVertexAssociationMap CP::MVATrackVertexAssociationTool::getUniqueMatchMapInternal ( const T &  trk_list,
const V &  vx_list 
) const
private

Definition at line 202 of file MVATrackVertexAssociationTool.cxx.

202  {
203 
205 
206  // Initialize map
207  for (const auto *vertex : vx_list) {
209  trktovxlist.clear();
210  trktovxlist.reserve(trk_list.size());
211  trktovxmap[vertex] = trktovxlist;
212  }
213 
214  // Perform matching
215  for (const auto *track : trk_list) {
216  const xAOD::Vertex* vx_match = getUniqueMatchVertexInternal(*track, vx_list);
217  if (vx_match) {
218  // Found matched vertex
219  trktovxmap[vx_match].push_back(track);
220  }
221  }
222 
223  return trktovxmap;
224 }

◆ getUniqueMatchVertex()

const xAOD::Vertex * CP::MVATrackVertexAssociationTool::getUniqueMatchVertex ( const xAOD::TrackParticle trk,
std::vector< const xAOD::Vertex * > &  vx_list 
) const
overridevirtual

Implements CP::ITrackVertexAssociationTool.

Definition at line 105 of file MVATrackVertexAssociationTool.cxx.

105  {
106  return getUniqueMatchVertexInternal(trk, vx_list);
107 }

◆ getUniqueMatchVertexInternal()

template<typename T >
const xAOD::Vertex * CP::MVATrackVertexAssociationTool::getUniqueMatchVertexInternal ( const xAOD::TrackParticle trk,
const T &  vx_list 
) const
private

Definition at line 178 of file MVATrackVertexAssociationTool.cxx.

178  {
179 
180  bool match;
181  float mvaOutput;
182  float maxValue = -1.0; // MVA output ranges between 0 and 1
183  const xAOD::Vertex* bestMatchVertex = nullptr;
184 
185  for (const auto *vertex : vx_list) {
186  match = isMatch(trk, *vertex, mvaOutput);
187  if (match && (maxValue < mvaOutput)) {
188  maxValue = mvaOutput;
189  bestMatchVertex = vertex;
190  }
191  }
192 
193  // check if get the matched Vertex, for the tracks not used in vertex fit
194  if (!bestMatchVertex) {
195  ATH_MSG_DEBUG("Could not find any matched vertex for this track.");
196  }
197 
198  return bestMatchVertex;
199 }

◆ getUniqueMatchVertexLink()

ElementLink< xAOD::VertexContainer > CP::MVATrackVertexAssociationTool::getUniqueMatchVertexLink ( const xAOD::TrackParticle trk,
const xAOD::VertexContainer vxCont 
) const
overridevirtual

This functions will return the best matched vertex.

Implements CP::ITrackVertexAssociationTool.

Definition at line 109 of file MVATrackVertexAssociationTool.cxx.

109  {
111  const xAOD::Vertex* vx_tmp = getUniqueMatchVertexInternal(trk, vxCont);
112  if (vx_tmp) {
113  vx_link_tmp.toContainedElement(vxCont, vx_tmp);
114  }
115  return vx_link_tmp;
116 }

◆ initialize()

StatusCode CP::MVATrackVertexAssociationTool::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 39 of file MVATrackVertexAssociationTool.cxx.

39  {
40 
41  // Init EventInfo and hardscatter vertex link deco
44  ATH_CHECK(m_hardScatterDecoKey.initialize());
45 
46  // Init network
47  StatusCode initNetworkStatus = initializeNetwork();
48  if (initNetworkStatus != StatusCode::SUCCESS) {
49  return initNetworkStatus;
50  }
51 
52  // Map our working point to a cut on the MVA output discriminant
53  if (m_wp == "Tight") {
54  m_cut = 0.85;
55  }
56  else if (m_wp == "Custom") {
57  // Nothing to do here
58  }
59  else {
60  ATH_MSG_ERROR("Invalid TVA working point \"" << m_wp << "\" - for a custom configuration, please provide \"Custom\" for the \"WorkingPoint\" property.");
61  return StatusCode::FAILURE;
62  }
63 
64  // Some extra printout for Custom
65  if (m_wp == "Custom") {
66  ATH_MSG_INFO("TVA working point \"Custom\" provided - tool properties are initialized to default values unless explicitly set by the user.");
67  }
68  else {
69  ATH_MSG_INFO("TVA working point \"" << m_wp << "\" provided - tool properties have been configured accordingly.");
70  }
71 
72  ATH_MSG_DEBUG("Cut on MVA output discriminant: " << m_cut);
73 
74  return StatusCode::SUCCESS;
75 }

◆ initializeNetwork()

StatusCode CP::MVATrackVertexAssociationTool::initializeNetwork ( )
private

Definition at line 226 of file MVATrackVertexAssociationTool.cxx.

226  {
227 
228  // Load our input evaluator
229  if (m_inputNames.size() != m_inputTypes.size()) {
230  ATH_MSG_ERROR("Size of input variable names (" + std::to_string(m_inputNames.size()) + ") does not equal size of input variable types (" + std::to_string(m_inputTypes.size()) + ").");
231  return StatusCode::FAILURE;
232  }
233  m_inputMap.clear();
234  for (std::size_t i = 0; i < m_inputNames.size(); i++) {
236  }
238 
239  // Load our input file
240  std::string fileName;
241  if (m_usePathResolver) {
243  if (fileName.empty()) {
244  ATH_MSG_ERROR("Could not find input network file: " + m_fileName);
245  return StatusCode::FAILURE;
246  }
247  }
248  else {
250  }
251  std::ifstream netFile(fileName);
252  if (!netFile) {
253  ATH_MSG_ERROR("Could not properly open input network file: " + fileName);
254  return StatusCode::FAILURE;
255  }
256 
257  // For sequential:
258  if (m_isSequential) {
259  lwt::JSONConfig netDef = lwt::parse_json(netFile);
260  m_network = std::make_unique<lwt::LightweightNeuralNetwork>(netDef.inputs, netDef.layers, netDef.outputs);
261  }
262  // For functional:
263  else {
264  lwt::GraphConfig netDef = lwt::parse_json_graph(netFile);
265  if (netDef.inputs.size() != 1) {
266  ATH_MSG_ERROR("Network in file \"" + fileName + "\" has more than 1 input node: # of input nodes = " + std::to_string(netDef.inputs.size()));
267  return StatusCode::FAILURE;
268  }
269  m_inputNodeName = netDef.inputs[0].name;
270  m_graph = std::make_unique<lwt::LightweightGraph>(netDef);
271  }
272 
273  return StatusCode::SUCCESS;
274 }

◆ inputHandles()

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

◆ isCompatible() [1/2]

bool CP::MVATrackVertexAssociationTool::isCompatible ( const xAOD::TrackParticle trk) const
overridevirtual

Implements CP::ITrackVertexAssociationTool.

Definition at line 82 of file MVATrackVertexAssociationTool.cxx.

82  {
83  const EventContext& ctx = Gaudi::Hive::currentContext();
85  if (!evt.isValid()) {
86  throw std::runtime_error("ERROR in CP::MVATrackVertexAssociationTool::isCompatible : could not retrieve xAOD::EventInfo!");
87  }
89  const ElementLink<xAOD::VertexContainer>& vtxLink = hardScatterDeco(*evt);
90  if (!vtxLink.isValid()) {
91  throw std::runtime_error("ERROR in CP::MVATrackVertexAssociationTool::isCompatible : hardscatter vertex link is not valid!");
92  }
93  float mvaOutput = -1.;
94  return isMatch(trk, **vtxLink, mvaOutput, evt.get());
95 }

◆ isCompatible() [2/2]

bool CP::MVATrackVertexAssociationTool::isCompatible ( const xAOD::TrackParticle trk,
const xAOD::Vertex vx 
) const
overridevirtual

This function just return the decision of whether the track is matched to the Vertex Not sure whether the track is matched to best choice.

Implements CP::ITrackVertexAssociationTool.

Definition at line 77 of file MVATrackVertexAssociationTool.cxx.

77  {
78  float mvaOutput = -1.;
79  return isMatch(trk, vx, mvaOutput);
80 }

◆ isMatch()

bool CP::MVATrackVertexAssociationTool::isMatch ( const xAOD::TrackParticle trk,
const xAOD::Vertex vx,
float &  mvaOutput,
const xAOD::EventInfo evtInfo = nullptr 
) const
private

Definition at line 130 of file MVATrackVertexAssociationTool.cxx.

130  {
131 
132  const EventContext& ctx = Gaudi::Hive::currentContext();
133 
134  // Fake vertex, return false
135  if (vx.vertexType() == xAOD::VxType::NoVtx) {
136  return false;
137  }
138 
139  // Retrieve our EventInfo
140  const xAOD::EventInfo* evt = nullptr;
141  if (!evtInfo) {
143  if (!evttmp.isValid()) {
144  throw std::runtime_error("ERROR in CP::MVATrackVertexAssociationTool::isMatch : could not retrieve xAOD::EventInfo!");
145  }
146  evt = evttmp.get();
147  }
148  else {
149  evt = evtInfo;
150  }
151 
152  // Evaluate our network and compare against our TVA cut (">= cut" := associated)
153  mvaOutput = this->evaluateNetwork(trk, vx, *evt);
154  return (mvaOutput >= m_cut);
155 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::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< AlgTool > >::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.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

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

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_cut

Gaudi::Property<float> CP::MVATrackVertexAssociationTool::m_cut
private
Initial value:
{this, "OutputCut" , -1.0,
"TVA cut value on the output value (set manually with \"Custom\" WP)."}

TVA cut value on the output discriminant.

Definition at line 111 of file MVATrackVertexAssociationTool.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfo

SG::ReadHandleKey<xAOD::EventInfo> CP::MVATrackVertexAssociationTool::m_eventInfo {this, "EventInfo", "EventInfo", "EventInfo key"}
private

EventInfo key.

Definition at line 136 of file MVATrackVertexAssociationTool.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fileName

Gaudi::Property<std::string> CP::MVATrackVertexAssociationTool::m_fileName {this, "NetworkFileName", "" }
private

Input lwtnn network file.

Definition at line 89 of file MVATrackVertexAssociationTool.h.

◆ m_graph

std::unique_ptr<lwt::LightweightGraph> CP::MVATrackVertexAssociationTool::m_graph
private

Definition at line 147 of file MVATrackVertexAssociationTool.h.

◆ m_hardScatterDeco

Gaudi::Property<std::string> CP::MVATrackVertexAssociationTool::m_hardScatterDeco
private
Initial value:
{this, "HardScatterLinkDeco", "hardScatterVertexLink",
"The decoration name of the ElementLink to the hardscatter vertex (found on xAOD::EventInfo)"}

The decoration name of the ElementLink to the hardscatter vertex (found on xAOD::EventInfo)

Definition at line 119 of file MVATrackVertexAssociationTool.h.

◆ m_hardScatterDecoKey

SG::ReadDecorHandleKey<xAOD::EventInfo> CP::MVATrackVertexAssociationTool::m_hardScatterDecoKey
private
Initial value:
{this, "VertexScatterKey", "" ,
"Overwrriten in the configuration step by the <HardScatterLinkDeco> property"}

Hardscatter vertex link key.

Definition at line 139 of file MVATrackVertexAssociationTool.h.

◆ m_inputEval

MVAInputEvaluator CP::MVATrackVertexAssociationTool::m_inputEval
private

Input variable evaluator.

Definition at line 133 of file MVATrackVertexAssociationTool.h.

◆ m_inputMap

MVAInputEvaluator::InputSelectionMap CP::MVATrackVertexAssociationTool::m_inputMap
private

Input variable name/type map.

Definition at line 130 of file MVATrackVertexAssociationTool.h.

◆ m_inputNames

Gaudi::Property<std::vector<std::string> > CP::MVATrackVertexAssociationTool::m_inputNames
private
Initial value:
{this, "InputNames", {},
"Vector of the network's input variable names (std::vector<std::string>)." }

Vector of input variable names.

Definition at line 92 of file MVATrackVertexAssociationTool.h.

◆ m_inputNodeName

std::string CP::MVATrackVertexAssociationTool::m_inputNodeName = ""
private

Name of the input node (for functional modes)

Definition at line 143 of file MVATrackVertexAssociationTool.h.

◆ m_inputTypes

Gaudi::Property<std::vector<int> > CP::MVATrackVertexAssociationTool::m_inputTypes
private
Initial value:
{this,"InputTypes", {},
"Vector of the network's input variable evaluator types (std::vector<CP::MVAEvaluatorInput::Input>)."}

Vector of input variable types.

Definition at line 96 of file MVATrackVertexAssociationTool.h.

◆ m_isSequential

Gaudi::Property<bool> CP::MVATrackVertexAssociationTool::m_isSequential
private
Initial value:
{this, "IsSequential", true,
"Is the network sequential (true) or functional (false)."}

Is the network sequential or functional.

Definition at line 104 of file MVATrackVertexAssociationTool.h.

◆ m_network

std::unique_ptr<lwt::LightweightNeuralNetwork> CP::MVATrackVertexAssociationTool::m_network
private

Network as implemented using lwtnn.

Definition at line 146 of file MVATrackVertexAssociationTool.h.

◆ m_outputName

Gaudi::Property<std::string> CP::MVATrackVertexAssociationTool::m_outputName
private
Initial value:
{this, "OutputNodeName", "",
"Name of the output node to cut on for TVA."}

Name of the output node to cut on.

Definition at line 100 of file MVATrackVertexAssociationTool.h.

◆ m_usePathResolver

Gaudi::Property<bool> CP::MVATrackVertexAssociationTool::m_usePathResolver
private
Initial value:
{this, "UsePathResolver", true,
"Use the PathResolver for finding the input lwtnn network file."}

Use the PathResolver to find our input file.

Definition at line 115 of file MVATrackVertexAssociationTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wp

Gaudi::Property<std::string> CP::MVATrackVertexAssociationTool::m_wp {this, "WorkingPoint", "Tight", "TVA working point to apply."}
private

TVA working point.

Definition at line 108 of file MVATrackVertexAssociationTool.h.


The documentation for this class was generated from the following files:
CP::MVATrackVertexAssociationTool::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
EventInfo key.
Definition: MVATrackVertexAssociationTool.h:136
CP::MVATrackVertexAssociationTool::m_inputMap
MVAInputEvaluator::InputSelectionMap m_inputMap
Input variable name/type map.
Definition: MVATrackVertexAssociationTool.h:130
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
maxValue
#define maxValue(current, test)
Definition: CompoundLayerMaterialCreator.h:22
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::MVATrackVertexAssociationTool::m_isSequential
Gaudi::Property< bool > m_isSequential
Is the network sequential or functional.
Definition: MVATrackVertexAssociationTool.h:104
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::MVATrackVertexAssociationTool::initializeNetwork
StatusCode initializeNetwork()
Definition: MVATrackVertexAssociationTool.cxx:226
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
xAOD::TrackVertexAssociationMap
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
Definition: TrackVertexAssociationMap.h:19
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CP::MVAInputEvaluator::eval
void eval(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt, std::map< std::string, double > &input) const
Definition: MVAInputEvaluator.cxx:435
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CP::MVATrackVertexAssociationTool::m_inputNames
Gaudi::Property< std::vector< std::string > > m_inputNames
Vector of input variable names.
Definition: MVATrackVertexAssociationTool.h:92
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
lwtDev::parse_json
JSONConfig parse_json(std::istream &json)
Definition: parse_json.cxx:42
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
CP::MVATrackVertexAssociationTool::m_outputName
Gaudi::Property< std::string > m_outputName
Name of the output node to cut on.
Definition: MVATrackVertexAssociationTool.h:100
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CP::MVATrackVertexAssociationTool::getMatchMapInternal
xAOD::TrackVertexAssociationMap getMatchMapInternal(const T &trk_list, const V &vx_list) const
Definition: MVATrackVertexAssociationTool.cxx:158
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
CP::MVATrackVertexAssociationTool::m_cut
Gaudi::Property< float > m_cut
TVA cut value on the output discriminant.
Definition: MVATrackVertexAssociationTool.h:111
lumiFormat.i
int i
Definition: lumiFormat.py:85
CP::MVATrackVertexAssociationTool::m_network
std::unique_ptr< lwt::LightweightNeuralNetwork > m_network
Network as implemented using lwtnn.
Definition: MVATrackVertexAssociationTool.h:146
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CP::MVAInputEvaluator::load
void load(const MVAInputEvaluator::InputSelectionMap &selection)
Definition: MVAInputEvaluator.cxx:428
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
CP::MVATrackVertexAssociationTool::getUniqueMatchMapInternal
xAOD::TrackVertexAssociationMap getUniqueMatchMapInternal(const T &trk_list, const V &vx_list) const
Definition: MVATrackVertexAssociationTool.cxx:202
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
CP::MVATrackVertexAssociationTool::m_wp
Gaudi::Property< std::string > m_wp
TVA working point.
Definition: MVATrackVertexAssociationTool.h:108
CP::MVATrackVertexAssociationTool::m_inputTypes
Gaudi::Property< std::vector< int > > m_inputTypes
Vector of input variable types.
Definition: MVATrackVertexAssociationTool.h:96
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CP::MVATrackVertexAssociationTool::m_fileName
Gaudi::Property< std::string > m_fileName
Input lwtnn network file.
Definition: MVATrackVertexAssociationTool.h:89
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge.output
output
Definition: merge.py:17
CP::MVATrackVertexAssociationTool::m_inputNodeName
std::string m_inputNodeName
Name of the input node (for functional modes)
Definition: MVATrackVertexAssociationTool.h:143
xAOD::TrackVertexAssociationList
std::vector< const xAOD::TrackParticle * > TrackVertexAssociationList
Definition: TrackVertexAssociationMap.h:18
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
CP::MVATrackVertexAssociationTool::m_hardScatterDecoKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_hardScatterDecoKey
Hardscatter vertex link key.
Definition: MVATrackVertexAssociationTool.h:139
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
CP::MVATrackVertexAssociationTool::m_inputEval
MVAInputEvaluator m_inputEval
Input variable evaluator.
Definition: MVATrackVertexAssociationTool.h:133
lwtDev::parse_json_graph
GraphConfig parse_json_graph(std::istream &json)
Definition: parse_json.cxx:71
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CP::MVATrackVertexAssociationTool::isMatch
bool isMatch(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, float &mvaOutput, const xAOD::EventInfo *evtInfo=nullptr) const
Definition: MVATrackVertexAssociationTool.cxx:130
CP::MVATrackVertexAssociationTool::evaluateNetwork
float evaluateNetwork(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt) const
Definition: MVATrackVertexAssociationTool.cxx:276
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::MVATrackVertexAssociationTool::isCompatible
virtual bool isCompatible(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx) const override
This function just return the decision of whether the track is matched to the Vertex Not sure whether...
Definition: MVATrackVertexAssociationTool.cxx:77
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CP::MVAInputEvaluator::Input
Input
Definition: MVAInputEvaluator.h:33
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CP::MVATrackVertexAssociationTool::getUniqueMatchVertexInternal
const xAOD::Vertex * getUniqueMatchVertexInternal(const xAOD::TrackParticle &trk, const T &vx_list) const
Definition: MVATrackVertexAssociationTool.cxx:178
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
SG::DataProxy
Definition: DataProxy.h:44
CP::MVATrackVertexAssociationTool::m_usePathResolver
Gaudi::Property< bool > m_usePathResolver
Use the PathResolver to find our input file.
Definition: MVATrackVertexAssociationTool.h:115
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CP::MVATrackVertexAssociationTool::m_graph
std::unique_ptr< lwt::LightweightGraph > m_graph
Definition: MVATrackVertexAssociationTool.h:147
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
CP::MVATrackVertexAssociationTool::m_hardScatterDeco
Gaudi::Property< std::string > m_hardScatterDeco
The decoration name of the ElementLink to the hardscatter vertex (found on xAOD::EventInfo)
Definition: MVATrackVertexAssociationTool.h:119
fitman.k
k
Definition: fitman.py:528