ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Trk::AdaptiveMultiVertexFitter Class Reference

#include <AdaptiveMultiVertexFitter.h>

Inheritance diagram for Trk::AdaptiveMultiVertexFitter:
Collaboration diagram for Trk::AdaptiveMultiVertexFitter:

Public Member Functions

StatusCode initialize ()
 
StatusCode finalize ()
 
 AdaptiveMultiVertexFitter (const std::string &t, const std::string &n, const IInterface *p)
 default constructor due to Athena interface More...
 
virtual ~AdaptiveMultiVertexFitter ()
 destructor More...
 
void fit (std::vector< xAOD::Vertex * > &allVertices) const
 fit all the provided MVFVxCandidate, which have to be already properly initialized. More...
 
void addVtxToFit (xAOD::Vertex *pVtx) const
 Adds a new MVFVxCandidate to a previous multi-vertex fit and fits everything together. More...
 
void addVtxTofit (xAOD::Vertex *pVtx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

std::vector< double > collectWeights (TrackToVtxLink &tracklink) const
 Internal function to collect the weights of the tracks partecipating to all the possible vertices (needed to renormalize the probability of the track to belong to the vertex under consideration, to be provided to the AnnealingMaker class). More...
 
void prepareCompatibility (xAOD::Vertex *newvertex) const
 Internal function to prepare the compatibility information of all the tracks of the new vertex (an IP3dAtaPlane is added, which makes later the estimation of the compatibilities of the tracks to the vertex for the downweighting faster). More...
 
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...
 

Static Private Member Functions

static bool findAmongVertices (const xAOD::Vertex *vertex, const std::vector< xAOD::Vertex * > &previousVertices)
 Internal method to find a VxCandidate among a vector of VxCandidates. More...
 

Private Attributes

long int m_maxIterations
 Max number of iterations. More...
 
double m_maxDistToLinPoint
 Maximum distance of linearization point of track to actual fitted vertex before needing to relinearize (in mm) More...
 
double m_initialError
 Initial error in form of diagonal elements of the inverse of the covariance matrix (name is misleading: take the error, square it and initialize the variable with its inverse) More...
 
bool m_doSmoothing
 True if smoothing after fit iterations has to be performed: otherwise the Smoother AlgoTool provided to the fitter will be ignored. More...
 
double m_minweight
 Minimum weight a track as to have in order to be considered in the fit of one of the vertices. More...
 
double m_maxRelativeShift
 Maximum shift allowed for last iteration... More...
 
ToolHandle< Trk::IVertexLinearizedTrackFactorym_LinearizedTrackFactory
 
ToolHandle< Trk::IVertexTrackCompatibilityEstimatorm_TrackCompatibilityEstimator
 
ToolHandle< Trk::IImpactPoint3dEstimatorm_ImpactPoint3dEstimator
 
ToolHandle< Trk::IVertexUpdatorm_VertexUpdator
 
ToolHandle< Trk::IVertexSmootherm_VertexSmoother
 
ToolHandle< Trk::IVertexAnnealingMakerm_AnnealingMaker
 
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

Author
N. Giacinto Piacquadio (Freiburg ATLAS Group)

This class implements a multi vertex fitting algorithm which is adaptive and robust, quite insensitive to the presence of outliers.

The multi-vertex version of the fit is more complicate than the single-vertex version and needs the input to be provided in the form of a vector of already initialized MVFVxCandidate objects. Details of the the objects to provide in the fit() and addVtxToFit() functions.

During the multi-vertex fit all the vertices are fit, using the tracks which are contained in their respective vertex candidates. Tracks which are shared among more than one vertex get their weights adjusted dynamically iteration after iteration thanks to a Deterministic Annealing procedure, so that in the end they are dinamically assigned to the vertex they most probably belong to.

As for the single-vertex fitter, for greater modularity the algorithm is divided into 6 modules (AlgTools in Athena):

  1. LinearizedTrackFactory
  2. TrackCompatibilityEstimator 2b. ImpactPoint3dEstimator
  3. VertexUpdator
  4. VertexSmoother plus another one, which is responsible for letting the temperature go down (which implements the so called "annealing technique")
  5. AnnealingMaker

Changes:

David Shope david.nosp@m..ric.nosp@m.hard..nosp@m.shop.nosp@m.e@cer.nosp@m.n.ch (2016-04-19)

EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex, from Trk::RecVertex to xAOD::Vertex, from Trk::Vertex to Amg::Vector3D

Also, VxMultiVertex EDM has been migrated to the following:

Trk::MvfFitInfo
constraintVertex now uses xAOD::Vertex seedVertex now uses Amg::Vector3D linearizationVertex now uses Amg::Vector3D

Vertex objects stored using this class are now xAOD::Vertex

Instead of using the MVFVxCandidate class, xAOD::Vertex is employed by decorating it with the multi-vertex information:

bool isInitialized MvfFitInfo* MvfFitInfo std::Vector<VxTrackAtVertex*> VTAV

This last decoration is needed in order to be able to use MVFVxTrackAtVertex objects which have the additional information of xAOD::Vertices associated to the track and (through polymorphism) to still be able to pass them to the KalmanVertexUpdator as VxTracksAtVertex objects.

This is obviously not an ideal implementation and could be avoided if xAOD::Vertex stored a std::vector<VxTrackAtVertex*> instead of a std::vector<VxTrackAtVertex>, but I think it must remain this way until such a time as the xAOD::Vertex EDM is changed.

Definition at line 109 of file AdaptiveMultiVertexFitter.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

◆ AdaptiveMultiVertexFitter()

Trk::AdaptiveMultiVertexFitter::AdaptiveMultiVertexFitter ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

default constructor due to Athena interface

Definition at line 27 of file AdaptiveMultiVertexFitter.cxx.

28  : AthAlgTool(t, n, p)
29  , m_maxIterations(30)
30  , m_maxDistToLinPoint(0.5)
31  , m_initialError(0.0001)
32  , m_doSmoothing(false)
33  , m_minweight(0.001)
34  , m_maxRelativeShift(0.01)
35 {
36  declareProperty("MaxIterations", m_maxIterations);
37  declareProperty("MaxDistToLinPoint", m_maxDistToLinPoint);
38  declareProperty("InitialError", m_initialError);
39  declareProperty("DoSmoothing", m_doSmoothing);
40  declareProperty("MinWeight", m_minweight);
41  declareProperty("MaxRelativeShift", m_maxRelativeShift);
42  declareInterface<AdaptiveMultiVertexFitter>(this);
43 }
44 

◆ ~AdaptiveMultiVertexFitter()

Trk::AdaptiveMultiVertexFitter::~AdaptiveMultiVertexFitter ( )
virtualdefault

destructor

Member Function Documentation

◆ addVtxToFit()

void Trk::AdaptiveMultiVertexFitter::addVtxToFit ( xAOD::Vertex pVtx) const

Adds a new MVFVxCandidate to a previous multi-vertex fit and fits everything together.

Please note that the new MVFVxCandidate provided has to be properly initialized, which means it has to have already a proper seed vertex, a constraint rec vertex, a list of initialized MVFVxTrackAtVertex, each with a link to the TrackToVtxLink object, which has to be already be updated to contain also a pointer to the MVFVxCandidate among the vertex candidates the track belongs to.

There are three steps:

1) the new vertex is added to the fit (all the tracks get initialized, so that the Plane through their IP point and the seed vertex (IP3dAtAPlane) is created, to be later able to estimate in a fast way the compatibility of the tracks to their respective vertices.

2) all tracks belonging to the new vertex are scanned and all the vertices which shares tracks with the new vertex to be fit are also added to the fit.

3) the multivertex fit is performed with all the involved vertices.

This has the clear advantage that only vertices which are really affected by adding the new vertex are being refitted, improving the overall finding performance.

Definition at line 316 of file AdaptiveMultiVertexFitter.cxx.

323  {
325  "The candidate you're adding has no tracks: please fix the problem");
326  }
327  std::vector<xAOD::Vertex*>
328  allVerticesToFit; // how many vertices do you expect?
329  allVerticesToFit.reserve(10); // try 10
330  prepareCompatibility(newvertex);
331  //
332  ATH_MSG_VERBOSE("Iterating on tracks");
333  std::vector<xAOD::Vertex*> addedVerticesLastIteration;
334  std::vector<xAOD::Vertex*> addedVerticesNewIteration;
335  addedVerticesLastIteration.push_back(newvertex);
336  do {
337  for (const auto& vertexIterator : addedVerticesLastIteration) {
338  // now you have to check what are the other vertices which still have to
339  // do with your new one
340  const auto& vertexTracksAtVertex = VTAV(*vertexIterator);
341  for (const auto& thisTrack : vertexTracksAtVertex) {
342  const auto& pTheseVertices =
343  (static_cast<Trk::MVFVxTrackAtVertex*>(thisTrack))
344  ->linkToVertices()
345  ->vertices();
346  for (const auto& thisVertex : *pTheseVertices) {
347  // add the vertex if it's still not there
348  if (not findAmongVertices(thisVertex, allVerticesToFit)) {
349  allVerticesToFit.push_back(thisVertex);
350  if (thisVertex != vertexIterator) {
351  addedVerticesNewIteration.push_back(thisVertex);
352  }
353  }
354  }
355  } // iterate on tracks at considered vertex
356  } // end iteration on addedVerticesLastIteration
357 
358  addedVerticesLastIteration = addedVerticesNewIteration;
359  addedVerticesNewIteration.clear();
360  } while (not addedVerticesLastIteration.empty());
361  //
362  // now fitting everything together
363  fit(allVerticesToFit);
364 }
365 
366 void

◆ addVtxTofit()

void Trk::AdaptiveMultiVertexFitter::addVtxTofit ( xAOD::Vertex pVtx) const
inline

Definition at line 174 of file AdaptiveMultiVertexFitter.h.

174 { return addVtxToFit(pVtx);}

◆ collectWeights()

std::vector< double > Trk::AdaptiveMultiVertexFitter::collectWeights ( Trk::TrackToVtxLink tracklink) const
private

Internal function to collect the weights of the tracks partecipating to all the possible vertices (needed to renormalize the probability of the track to belong to the vertex under consideration, to be provided to the AnnealingMaker class).

The input is the TrackToVtxLink, where the weights are stored.

Definition at line 283 of file AdaptiveMultiVertexFitter.cxx.

283 {
284  ATH_MSG_DEBUG("Collecting weights for tracklink " << &tracklink);
285  // TODO: put this in a better place
286  // Prepare objects holding the decoration of xAOD::Vertex with MVF auxdata
287  // For optimization of access speed
289  "VTAV");
290  const auto& theseVertices = *(tracklink.vertices());
291  std::vector<double> myvector;
292  myvector.reserve(theseVertices.size());
293  for (const auto& pThisVertex : theseVertices) {
294  // really stupid, now you have still to find the weight value (right track
295  // in this vertex) but if you later remove tracks from candidate, you cannot
296  // do much better (maybe update on demand...)
297  const auto& trackPointersForThisVertex = VTAV(*pThisVertex);
298  for (const auto& pThisTrack : trackPointersForThisVertex) {
299  if ((static_cast<Trk::MVFVxTrackAtVertex*>(pThisTrack))
300  ->linkToVertices() == &tracklink) {
301  ATH_MSG_DEBUG("found one weight: it's : "
302  << pThisTrack->vtxCompatibility() << " for track "
303  << pThisTrack);
304  myvector.push_back(pThisTrack->vtxCompatibility());
305  break; // gain time in avoiding to look for other tracks if you already
306  // found the right one
307  }
308  }
309  }
310  return myvector;
311 }
312 
313 void

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

◆ 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

◆ finalize()

StatusCode Trk::AdaptiveMultiVertexFitter::finalize ( )

Definition at line 65 of file AdaptiveMultiVertexFitter.cxx.

◆ findAmongVertices()

bool Trk::AdaptiveMultiVertexFitter::findAmongVertices ( const xAOD::Vertex vertex,
const std::vector< xAOD::Vertex * > &  previousVertices 
)
staticprivate

Internal method to find a VxCandidate among a vector of VxCandidates.

Returns true if the vertex is found.

Definition at line 396 of file AdaptiveMultiVertexFitter.cxx.

397 {
398  return (std::find(previousVertices.begin(), previousVertices.end(), vertex) !=
399  previousVertices.end());
400 }
401 }

◆ fit()

void Trk::AdaptiveMultiVertexFitter::fit ( std::vector< xAOD::Vertex * > &  allVertices) const

fit all the provided MVFVxCandidate, which have to be already properly initialized.

The information about the Vertices to Tracks association is provided in the following way: the MVFVxCandidate contains a list of MVFVxTrackAtVertex, which contain each a TrackToVtxLink class: this class contains the information about all the vertices (MVFVxCandidate objects) the tracks belongs to and is shared among all MVFVxTrackAtVertex which represents the same track at the different vertices.

This has the clear advantage that the equivalent matrix of the assignments between vertices and tracks can be made block diagonal, so that no time is wasted in case of tracks which are clearly incompatible with some of the other vertices.

Definition at line 72 of file AdaptiveMultiVertexFitter.cxx.

91  {
92  for (auto* pThisVertex : allVertices) {
93  // now store all the "old positions"; if vertex is added for the first
94  // time this corresponds to the seed (at the same time fitted vertex will
95  // be updated with the constraint information) check if you need to
96  // reestimate compatibility + linearization
97  ATH_MSG_DEBUG("Now considering candidate with ptr " << pThisVertex);
98  relinearizations[pThisVertex] = false;
99  if (isInitialized(*pThisVertex)) {
100  ATH_MSG_DEBUG("vertex position z: " << (*pThisVertex).position()[2]);
101  oldpositions[pThisVertex] = pThisVertex->position();
102  } else {
103  isInitialized(*pThisVertex) = true;
104  ATH_MSG_DEBUG("Candidate has no position so far: using as old position "
105  "the seedVertex");
106  if (MvfFitInfo(*pThisVertex)->seedVertex() ==
107  nullptr) { // TODO: Is there a way of checking whether a decoration
108  // exists on an object?
109  ATH_MSG_ERROR("Candidate has no seed...CRASHING now!!!");
110  }
111  oldpositions[pThisVertex] = *(MvfFitInfo(*pThisVertex)->seedVertex());
112  }
113  if (MvfFitInfo(*pThisVertex)->linearizationVertex() ==
114  nullptr) { // TODO: Is there a way of checking whether a decoration
115  // exists on an object?
117  " Candidate has no linearization point...CRASHING now!!! ");
118  }
119  if ((oldpositions[pThisVertex] -
120  *MvfFitInfo(*pThisVertex)->linearizationVertex())
121  .perp() > m_maxDistToLinPoint) {
122  ATH_MSG_DEBUG("Candidate has to be relinearized ");
123  relinearizations[pThisVertex] = true;
124  prepareCompatibility(pThisVertex);
125  }
126  ATH_MSG_DEBUG("Setting the Vertex to the initial constraint");
127  // reput everything to the constraint level
128  pThisVertex->setPosition(
129  MvfFitInfo(*pThisVertex)->constraintVertex()->position());
130  pThisVertex->setCovariancePosition(
131  MvfFitInfo(*pThisVertex)->constraintVertex()->covariancePosition());
132  pThisVertex->setFitQuality(
133  MvfFitInfo(*pThisVertex)->constraintVertex()->chiSquared(),
134  MvfFitInfo(*pThisVertex)->constraintVertex()->numberDoF());
135  pThisVertex->setCovariancePosition(
136  pThisVertex->covariancePosition() * 1. /
137  float(m_AnnealingMaker->getWeight(astate, 1.)));
138  ATH_MSG_DEBUG("Running TrackCompatibilityEstimator on each track");
139  // prepare the iterators for the tracks
140  const auto& theseTrackPointersAtVtx = VTAV(*pThisVertex);
141  // iterate and update the vertex with the track information
142  for (const auto& pThisTrack : theseTrackPointersAtVtx) {
143  ATH_MSG_DEBUG("Adding compatibility info to a track of "
144  << theseTrackPointersAtVtx.size());
145  // now recover from cases where the linearization position is !=0, but
146  // you added more tracks later on...
147  if (not pThisTrack->ImpactPoint3dAtaPlane()) {
148  const bool success = m_ImpactPoint3dEstimator->addIP3dAtaPlane(
149  *pThisTrack, *MvfFitInfo(*pThisVertex)->linearizationVertex());
150  if (!success) {
152  "Adding compatibility to vertex information failed. Newton "
153  "distance finder didn't converge...");
154  }
155  }
156  // first -> estimate the compatibility of the track to the vertex
157  m_TrackCompatibilityEstimator->estimate(*pThisTrack,
158  oldpositions[pThisVertex]);
159  ATH_MSG_DEBUG("End of compatibility for a track");
160  }
161  }
162  ATH_MSG_DEBUG("Finished first candidates cycle");
163  // after having estimated the compatibility of all the vertices, you have to
164  // run again on all vertices, to compute the weights
165  for (auto* pThisVertex : allVertices) {
166  // TODO: crude and quite possibly time consuming, but best solution I
167  // could think of...
168  // updated VxTrackAtVertices are stored in VTAV decoration:
169  // so each time a vertex is to be updated with its tracks in this
170  // loop, delete VxTrackAtVertex vector and add correctly updated
171  // VxTrackAtVertex (from VTAV) to the vector just before calling
172  // the vertex updator
173  std::vector<Trk::VxTrackAtVertex>* tracksOfVertex =
174  &(pThisVertex->vxTrackAtVertex());
175  tracksOfVertex->clear();
176  // prepare the iterators for the tracks
177  const auto& theseTrackPointersAtVtx = VTAV(*pThisVertex);
179  "Beginning lin&update of vertex with pointer: " << pThisVertex);
180  for (const auto& pThisTrack : theseTrackPointersAtVtx) {
181  // set the weight according to all other track's weight
182  ATH_MSG_DEBUG("Calling collect weight for track " << pThisTrack);
183  const std::vector<double>& allweights(
184  collectWeights(*(static_cast<Trk::MVFVxTrackAtVertex*>(pThisTrack))
185  ->linkToVertices()));
186  ATH_MSG_DEBUG("The vtxcompatibility for the track is: "
187  << pThisTrack->vtxCompatibility());
188  pThisTrack->setWeight(m_AnnealingMaker->getWeight(
189  astate, pThisTrack->vtxCompatibility(), allweights));
190  ATH_MSG_DEBUG("The resulting weight for the track is "
191  << m_AnnealingMaker->getWeight(
192  astate, pThisTrack->vtxCompatibility(), allweights));
193  if (pThisTrack->weight() > m_minweight) {
194  ATH_MSG_DEBUG("check passed");
195  // now take care if linearization has been done at least once
196  if (not pThisTrack->linState()) {
197  // linearization never done so far: do it now!
198  ATH_MSG_VERBOSE("Linearizing track for the first time");
199  m_LinearizedTrackFactory->linearize(*pThisTrack,
200  oldpositions[pThisVertex]);
201  } else if (relinearizations[pThisVertex]) {
202  ATH_MSG_VERBOSE("Relinearizing track ");
203  m_LinearizedTrackFactory->linearize(*pThisTrack,
204  oldpositions[pThisVertex]);
205  MvfFitInfo(*pThisVertex)
206  ->setLinearizationVertex(
207  new Amg::Vector3D(oldpositions[pThisVertex]));
208  }
209  // now you can proceed with the update
210  ATH_MSG_DEBUG("Update of the track "
211  << pThisTrack << " to the vertex " << pThisVertex);
212  // TODO: obviously not ideal that I have to do this
213  tracksOfVertex->push_back(*pThisTrack);
214  // TODO: add() returns an xAOD::Vertex* - is it really ok to just
215  // have this line without *iter = m_VertexUpdator->add() ? Must
216  // be...
217  m_VertexUpdator->add(*pThisVertex, *pThisTrack);
218  }
219  } // iterator on tracks
220  // show some info about the position
221  ATH_MSG_DEBUG("Vertex pointer " << pThisVertex << " New position x: "
222  << pThisVertex->position().x()
223  << " y: " << pThisVertex->position().y()
224  << " z: " << pThisVertex->position().z());
225  } // iterator on Vertices
226  // call now one more step of annealing
227  if (!(m_AnnealingMaker->isEquilibrium(astate))) {
228  m_AnnealingMaker->anneal(astate);
229  }
230  // August 2009: sometimes the fitter has not converged when the annealing
231  // has finished iterate on all vertex candidates and check whether they moved
232  // significantly from last iteration
233  shiftIsSmall = true;
234  Amg::Vector3D vrtpos;
235  for (const auto& pThisVertex : allVertices) {
236  vrtpos[0] = oldpositions[pThisVertex][0] - pThisVertex->position()[0];
237  vrtpos[1] = oldpositions[pThisVertex][1] - pThisVertex->position()[1];
238  vrtpos[2] = oldpositions[pThisVertex][2] - pThisVertex->position()[2];
239  AmgSymMatrix(3) weightMatrixVertex;
240  weightMatrixVertex = pThisVertex->covariancePosition().inverse();
241  double relativeShift = vrtpos.dot(weightMatrixVertex * vrtpos);
242  if (relativeShift > m_maxRelativeShift) {
243  shiftIsSmall = false;
244  break;
245  }
246  }
247  num_steps += 1;
248  } while (num_steps < m_maxIterations &&
249  (!(m_AnnealingMaker->isEquilibrium(astate)) || !shiftIsSmall));
250 
251  if (num_steps >= m_maxIterations) {
252  ATH_MSG_DEBUG("Didn't converge fully after " << num_steps);
253  }
255  "In principle the big multivertex fit step is finished now...");
256  // TODO: I don't think that I need to fiddle with updating
257  // MVFVxTracksAtVertex - vector of VxTrackAtVertex should be available in
258  // the usual way now and be enough
259  if (m_doSmoothing) {
260  auto trackAvailable = [](const xAOD::Vertex* pV) {
261  return pV->vxTrackAtVertexAvailable() and
262  not(pV->vxTrackAtVertex()).empty();
263  };
264  for (const auto& pThisVertex : allVertices) {
265  if (trackAvailable(pThisVertex)) {
266  m_VertexSmoother->smooth(*pThisVertex);
267  }
268  }
269  } else { // TODO: I added this during xAOD migration
270  for (auto* pThisVertex : allVertices) {
271  const auto& theseTrackPointersAtVtx = VTAV(*pThisVertex);
272  for (const auto& pTrack : theseTrackPointersAtVtx) {
273  if (pTrack->initialPerigee())
274  pTrack->setPerigeeAtVertex((pTrack->initialPerigee())->clone());
275  }
276  }
277  }
278 }
279 
280 std::vector<double>

◆ initialize()

StatusCode Trk::AdaptiveMultiVertexFitter::initialize ( )

Definition at line 50 of file AdaptiveMultiVertexFitter.cxx.

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

◆ interfaceID()

static const InterfaceID& Trk::AdaptiveMultiVertexFitter::interfaceID ( )
inlinestatic

Definition at line 177 of file AdaptiveMultiVertexFitter.h.

177  {
178  return IID_AdaptiveMultiVertexFitter;
179  }

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

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

◆ prepareCompatibility()

void Trk::AdaptiveMultiVertexFitter::prepareCompatibility ( xAOD::Vertex newvertex) const
private

Internal function to prepare the compatibility information of all the tracks of the new vertex (an IP3dAtaPlane is added, which makes later the estimation of the compatibilities of the tracks to the vertex for the downweighting faster).

Further information in the TrkVertexFitterUtils package (IP3dAtAPlaneFactory class).

Definition at line 369 of file AdaptiveMultiVertexFitter.cxx.

379  {
380  return this->m_ImpactPoint3dEstimator->addIP3dAtaPlane(*thisVxTrack,
381  *seedPoint);
382  };
383  const auto& vertexTracksAtVertex = VTAV(*newvertex);
384  // std::reduce might be quicker, if compiler implemented it
385  const bool success = std::all_of(
386  vertexTracksAtVertex.begin(), vertexTracksAtVertex.end(), addImpactPoint);
387  if (not success) {
388  ATH_MSG_DEBUG("Adding compatibility to vertex information failed. Newton "
389  "distance finder didn't converge...");
390  }
391 }
392 
393 bool

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

ToolHandle<Trk::IVertexAnnealingMaker> Trk::AdaptiveMultiVertexFitter::m_AnnealingMaker
private
Initial value:
{
this,
"AnnealingMaker",
"Trk::DetAnnealingMaker"
}

Definition at line 285 of file AdaptiveMultiVertexFitter.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_doSmoothing

bool Trk::AdaptiveMultiVertexFitter::m_doSmoothing
private

True if smoothing after fit iterations has to be performed: otherwise the Smoother AlgoTool provided to the fitter will be ignored.

Definition at line 242 of file AdaptiveMultiVertexFitter.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_ImpactPoint3dEstimator

ToolHandle<Trk::IImpactPoint3dEstimator> Trk::AdaptiveMultiVertexFitter::m_ImpactPoint3dEstimator
private
Initial value:
{
this,
"ImpactPoint3dEstimator",
"Trk::ImpactPoint3dEstimator/ImpactPoint3dEstimator"
}

Definition at line 269 of file AdaptiveMultiVertexFitter.h.

◆ m_initialError

double Trk::AdaptiveMultiVertexFitter::m_initialError
private

Initial error in form of diagonal elements of the inverse of the covariance matrix (name is misleading: take the error, square it and initialize the variable with its inverse)

Definition at line 234 of file AdaptiveMultiVertexFitter.h.

◆ m_LinearizedTrackFactory

ToolHandle<Trk::IVertexLinearizedTrackFactory> Trk::AdaptiveMultiVertexFitter::m_LinearizedTrackFactory
private
Initial value:
{
this,
"LinearizedTrackFactory",
"Trk::FullLinearizedTrackFactory"
}

Definition at line 260 of file AdaptiveMultiVertexFitter.h.

◆ m_maxDistToLinPoint

double Trk::AdaptiveMultiVertexFitter::m_maxDistToLinPoint
private

Maximum distance of linearization point of track to actual fitted vertex before needing to relinearize (in mm)

Definition at line 226 of file AdaptiveMultiVertexFitter.h.

◆ m_maxIterations

long int Trk::AdaptiveMultiVertexFitter::m_maxIterations
private

Max number of iterations.

Definition at line 217 of file AdaptiveMultiVertexFitter.h.

◆ m_maxRelativeShift

double Trk::AdaptiveMultiVertexFitter::m_maxRelativeShift
private

Maximum shift allowed for last iteration...

(in terms of Delta|VecR|/sigma|VecR|)

Definition at line 258 of file AdaptiveMultiVertexFitter.h.

◆ m_minweight

double Trk::AdaptiveMultiVertexFitter::m_minweight
private

Minimum weight a track as to have in order to be considered in the fit of one of the vertices.

This should make the fit slightly faster.

Definition at line 250 of file AdaptiveMultiVertexFitter.h.

◆ m_TrackCompatibilityEstimator

ToolHandle<Trk::IVertexTrackCompatibilityEstimator> Trk::AdaptiveMultiVertexFitter::m_TrackCompatibilityEstimator
private
Initial value:
{ this,
"TrackCompatibilityEstimator",
"Trk::Chi2TrackCompatibilityEstimator" }

Definition at line 266 of file AdaptiveMultiVertexFitter.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_VertexSmoother

ToolHandle<Trk::IVertexSmoother> Trk::AdaptiveMultiVertexFitter::m_VertexSmoother
private
Initial value:
{
this,
"VertexSmoother",
"Trk::SequentialVertexSmoother"
}

Definition at line 280 of file AdaptiveMultiVertexFitter.h.

◆ m_VertexUpdator

ToolHandle<Trk::IVertexUpdator> Trk::AdaptiveMultiVertexFitter::m_VertexUpdator
private
Initial value:
{
this,
"VertexUpdator",
"Trk::KalmanVertexUpdator"
}

Definition at line 275 of file AdaptiveMultiVertexFitter.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Trk::AdaptiveMultiVertexFitter::m_initialError
double m_initialError
Initial error in form of diagonal elements of the inverse of the covariance matrix (name is misleadin...
Definition: AdaptiveMultiVertexFitter.h:234
Trk::AdaptiveMultiVertexFitter::findAmongVertices
static bool findAmongVertices(const xAOD::Vertex *vertex, const std::vector< xAOD::Vertex * > &previousVertices)
Internal method to find a VxCandidate among a vector of VxCandidates.
Definition: AdaptiveMultiVertexFitter.cxx:396
Trk::AdaptiveMultiVertexFitter::prepareCompatibility
void prepareCompatibility(xAOD::Vertex *newvertex) const
Internal function to prepare the compatibility information of all the tracks of the new vertex (an IP...
Definition: AdaptiveMultiVertexFitter.cxx:369
Trk::MVFVxTrackAtVertex
Definition: MVFVxTrackAtVertex.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::AdaptiveMultiVertexFitter::m_minweight
double m_minweight
Minimum weight a track as to have in order to be considered in the fit of one of the vertices.
Definition: AdaptiveMultiVertexFitter.h:250
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::AdaptiveMultiVertexFitter::m_ImpactPoint3dEstimator
ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator
Definition: AdaptiveMultiVertexFitter.h:269
Trk::AdaptiveMultiVertexFitter::m_maxDistToLinPoint
double m_maxDistToLinPoint
Maximum distance of linearization point of track to actual fitted vertex before needing to relineariz...
Definition: AdaptiveMultiVertexFitter.h:226
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::AdaptiveMultiVertexFitter::~AdaptiveMultiVertexFitter
virtual ~AdaptiveMultiVertexFitter()
destructor
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::AdaptiveMultiVertexFitter::m_VertexUpdator
ToolHandle< Trk::IVertexUpdator > m_VertexUpdator
Definition: AdaptiveMultiVertexFitter.h:275
beamspotman.n
n
Definition: beamspotman.py:731
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::AdaptiveMultiVertexFitter::m_TrackCompatibilityEstimator
ToolHandle< Trk::IVertexTrackCompatibilityEstimator > m_TrackCompatibilityEstimator
Definition: AdaptiveMultiVertexFitter.h:266
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::AdaptiveMultiVertexFitter::collectWeights
std::vector< double > collectWeights(TrackToVtxLink &tracklink) const
Internal function to collect the weights of the tracks partecipating to all the possible vertices (ne...
Definition: AdaptiveMultiVertexFitter.cxx:283
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::AdaptiveMultiVertexFitter::m_maxIterations
long int m_maxIterations
Max number of iterations.
Definition: AdaptiveMultiVertexFitter.h:217
Trk::AdaptiveMultiVertexFitter::m_maxRelativeShift
double m_maxRelativeShift
Maximum shift allowed for last iteration...
Definition: AdaptiveMultiVertexFitter.h:258
Trk::AdaptiveMultiVertexFitter::m_AnnealingMaker
ToolHandle< Trk::IVertexAnnealingMaker > m_AnnealingMaker
Definition: AdaptiveMultiVertexFitter.h:285
Trk::AdaptiveMultiVertexFitter::addVtxToFit
void addVtxToFit(xAOD::Vertex *pVtx) const
Adds a new MVFVxCandidate to a previous multi-vertex fit and fits everything together.
Definition: AdaptiveMultiVertexFitter.cxx:316
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::AdaptiveMultiVertexFitter::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: AdaptiveMultiVertexFitter.h:260
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
Trk::AdaptiveMultiVertexFitter::fit
void fit(std::vector< xAOD::Vertex * > &allVertices) const
fit all the provided MVFVxCandidate, which have to be already properly initialized.
Definition: AdaptiveMultiVertexFitter.cxx:72
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
dot
Definition: dot.py:1
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::AdaptiveMultiVertexFitter::m_doSmoothing
bool m_doSmoothing
True if smoothing after fit iterations has to be performed: otherwise the Smoother AlgoTool provided ...
Definition: AdaptiveMultiVertexFitter.h:242
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
Trk::AdaptiveMultiVertexFitter::m_VertexSmoother
ToolHandle< Trk::IVertexSmoother > m_VertexSmoother
Definition: AdaptiveMultiVertexFitter.h:280