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
InDet::InDetIterativePriVxFinderTool Class Reference

#include <InDetIterativePriVxFinderTool.h>

Inheritance diagram for InDet::InDetIterativePriVxFinderTool:
Collaboration diagram for InDet::InDetIterativePriVxFinderTool:

Public Member Functions

 InDetIterativePriVxFinderTool (const std::string &t, const std::string &n, const IInterface *p)
 Constructor. More...
 
virtual ~InDetIterativePriVxFinderTool ()
 Destructor. More...
 
virtual StatusCode initialize () override
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const TrackCollection *trackTES) const override
 Find vertex from Trk::TrackCollection. More...
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const xAOD::TrackParticleContainer *trackParticles) const override
 Find vertex from xAOD::TrackParticleContainer. More...
 
virtual StatusCode finalize () override
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const TrackCollection *trackTES) const=0
 Finding method. More...
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const xAOD::TrackParticleContainer *trackParticles) const=0
 Finding method. More...
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const TrackCollection *trackTES) const
 Finding method. More...
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const xAOD::TrackParticleContainer *trackParticles) const
 Finding method. 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
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const TrackCollection *trackTES) const
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const xAOD::TrackParticleContainer *trackParticles) 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::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const std::vector< Trk::ITrackLink * > &trackVector) const
 
void removeCompatibleTracks (xAOD::Vertex *myxAODVertex, std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
 
void removeAllFrom (std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
 
double compatibility (const Trk::TrackParameters &measPerigee, const xAOD::Vertex &vertex) const
 
void SGError (const std::string &errService)
 
virtual void printParameterSettings ()
 Internal method to print the parameters setting. 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 void countTracksAndNdf (xAOD::Vertex *myxAODVertex, double &ndf, int &ntracks)
 

Private Attributes

ToolHandle< Trk::IVertexFitterm_iVertexFitter
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trkFilter
 
ToolHandle< Trk::IVertexSeedFinderm_SeedFinder
 
ToolHandle< Trk::IImpactPoint3dEstimatorm_ImpactPoint3dEstimator
 
ToolHandle< Trk::IVertexLinearizedTrackFactorym_LinearizedTrackFactory
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey
 
bool m_useBeamConstraint
 
double m_significanceCutSeeding
 
double m_maximumChi2cutForSeeding
 
double m_maxVertices
 
bool m_createSplitVertices
 
int m_splitVerticesTrkInvFraction
 Integer: 1. More...
 
bool m_reassignTracksAfterFirstFit
 
bool m_doMaxTracksCut
 
unsigned int m_maxTracks
 
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
Giacinto Piacquadio (Freiburg University)

This class provides an implementation for a primary vertex finding tool, which uses the Adaptive Vertex Fitter to reject outliers not belonging to the primary vertex interaction.


Changes:

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

EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex

findVertex will now always return an xAOD::VertexContainer, even when using a TrackCollection or a TrackParticleBaseCollection as input.

Dave Casper dcasp.nosp@m.er@u.nosp@m.ci.ed.nosp@m.u (2018-03-28) Migrate beam spot service to conditions handle

Definition at line 68 of file InDetIterativePriVxFinderTool.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

◆ InDetIterativePriVxFinderTool()

InDet::InDetIterativePriVxFinderTool::InDetIterativePriVxFinderTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Constructor.

Definition at line 58 of file InDetIterativePriVxFinderTool.cxx.

61 {
62  declareInterface<IVertexFinder>(this);
63  declareProperty("useBeamConstraint", m_useBeamConstraint);
64  declareProperty("significanceCutSeeding", m_significanceCutSeeding);
65  declareProperty("maximumChi2cutForSeeding", m_maximumChi2cutForSeeding);
66  declareProperty("maxVertices", m_maxVertices);
67  declareProperty("createSplitVertices", m_createSplitVertices);
68  declareProperty("splitVerticesTrkInvFraction",
70  "inverse fraction to split tracks (1:N)");
71  declareProperty("reassignTracksAfterFirstFit", m_reassignTracksAfterFirstFit);
72  declareProperty("doMaxTracksCut", m_doMaxTracksCut);
73  declareProperty("MaxTracks", m_maxTracks);
74 }
75 
77 
80 {
82  ATH_MSG_FATAL(" Split vertices cannot be obtained if beam spot constraint "
83  "is true! Change settings...");
84  return StatusCode::FAILURE;
85  }

◆ ~InDetIterativePriVxFinderTool()

InDet::InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ compatibility()

double InDet::InDetIterativePriVxFinderTool::compatibility ( const Trk::TrackParameters measPerigee,
const xAOD::Vertex vertex 
) const
private

Definition at line 850 of file InDetIterativePriVxFinderTool.cxx.

872 {
873  // remove all perigeesToFit and go on...
874 
875  std::vector<Trk::ITrackLink*>::iterator seedBegin = seedTracks.begin();
876  std::vector<Trk::ITrackLink*>::iterator seedEnd = seedTracks.end();
877 

◆ countTracksAndNdf()

void InDet::InDetIterativePriVxFinderTool::countTracksAndNdf ( xAOD::Vertex myxAODVertex,
double &  ndf,
int &  ntracks 
)
staticprivate

Definition at line 920 of file InDetIterativePriVxFinderTool.cxx.

926  {
927  if ((*tracksIter).weight() > 0.01) {
928  ntracks += 1;
929  }
930  }
931  }
932 }
933 
934 void
936  xAOD::Vertex* myxAODVertex,
937  std::vector<const Trk::TrackParameters*>& perigeesToFit,
938  std::vector<Trk::ITrackLink*>& seedTracks) const
939 {
940  // now you have your new vertex with its new tracks
941  // now you have to get the compatibility also of all tracks which DIDN'T
942  // BELONG to the vertex!
943  std::vector<Trk::VxTrackAtVertex>* tracksAtVertex =

◆ 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 InDet::InDetIterativePriVxFinderTool::finalize ( )
overridevirtual

Definition at line 830 of file InDetIterativePriVxFinderTool.cxx.

834 {

◆ findVertex() [1/9]

std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > InDet::InDetIterativePriVxFinderTool::findVertex ( const EventContext &  ctx,
const std::vector< Trk::ITrackLink * > &  trackVector 
) const
private

Definition at line 255 of file InDetIterativePriVxFinderTool.cxx.

268  {
269  ATH_MSG_WARNING(trackVector.size()
270  << " tracks - exceeds maximum (" << m_maxTracks
271  << "), skipping vertexing and returning only dummy...");
272  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
273  theVertexContainer->push_back(
274  dummyxAODVertex); // have to add vertex to container here first so it can
275  // use its aux store
276  dummyxAODVertex->setPosition(beamSpot->beamVtx().position());
277  dummyxAODVertex->setCovariancePosition(
278  beamSpot->beamVtx().covariancePosition());
279  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
280  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
281  return std::make_pair(theVertexContainer, theVertexAuxContainer);
282  }
283 
284  int iterations = 0;
285  unsigned int seedtracknumber = seedTracks.size();
286 
287  // used to store seed info
288  Amg::Vector3D actualVertex;
289 
290  // prepare iterators for tracks only necessary for seeding
293 
294  do {
295 
296  seedBegin = seedTracks.begin();
297  seedEnd = seedTracks.end();
298 
299  if (seedtracknumber == 0) {
300  ATH_MSG_DEBUG(" New iteration. No tracks available after track selection "
301  "for seeding. No finding done.");
302  break;
303  }
304 
305  ATH_MSG_DEBUG("ITERATION NUMBER " << iterations);
306 
307  // now find a new SEED
308 
309  std::vector<const Trk::TrackParameters*> perigeeList;
310  for (std::vector<Trk::ITrackLink*>::iterator seedtrkAtVtxIter = seedBegin;
311  seedtrkAtVtxIter != seedEnd;
312  ++seedtrkAtVtxIter) {
313  perigeeList.push_back((*seedtrkAtVtxIter)->parameters());
314  }
315 
316  xAOD::Vertex theconstraint;
317  if (m_useBeamConstraint && beamSpot != nullptr) {
318  theconstraint =
319  xAOD::Vertex(); // Default constructor creates a private store
320  theconstraint.setPosition(beamSpot->beamVtx().position());
321  theconstraint.setCovariancePosition(
322  beamSpot->beamVtx().covariancePosition());
323  theconstraint.setFitQuality(
324  beamSpot->beamVtx().fitQuality().chiSquared(),
325  beamSpot->beamVtx().fitQuality().doubleNumberDoF());
326  actualVertex = m_SeedFinder->findSeed(perigeeList, &theconstraint);
327  } else {
328  actualVertex = m_SeedFinder->findSeed(perigeeList);
329  Amg::MatrixX looseConstraintCovariance(3, 3);
330  looseConstraintCovariance.setIdentity();
331  looseConstraintCovariance = looseConstraintCovariance * 1e+8;
332  theconstraint = xAOD::Vertex();
333  theconstraint.setPosition(actualVertex);
334  theconstraint.setCovariancePosition(looseConstraintCovariance);
335  theconstraint.setFitQuality(0., -3.);
336  }
337 
338  if (msgLvl(MSG::DEBUG)) {
339  msg(MSG::DEBUG) << " seed at x: " << actualVertex.x()
340  << " at y: " << actualVertex.y()
341  << " at z: " << actualVertex.z() << endmsg;
342  }
343 
344  if (actualVertex.z() == 0.) {
345  break;
346  }
347 
348  // now question (remove tracks which are too far away??? I think so...)
349  std::vector<const Trk::TrackParameters*> perigeesToFit;
350  std::vector<const Trk::TrackParameters*> perigeesToFitSplitVertex;
351 
352  int numberOfTracks(perigeeList.size());
353 
354  std::vector<const Trk::TrackParameters*>::const_iterator perigeeListBegin =
355  perigeeList.begin();
356  std::vector<const Trk::TrackParameters*>::const_iterator perigeeListEnd =
357  perigeeList.end();
358 
359  int counter = 0;
360 
361  for (std::vector<const Trk::TrackParameters*>::const_iterator
362  perigeeListIter = perigeeListBegin;
363  perigeeListIter != perigeeListEnd;
364  ++perigeeListIter) {
365  if (numberOfTracks <= 2) {
366  perigeesToFit.push_back(*perigeeListIter);
367  counter += 1;
368  } else if (numberOfTracks <= 4 && !m_createSplitVertices) {
369  perigeesToFit.push_back(*perigeeListIter);
370  counter += 1;
371  } else if (numberOfTracks <= 4 * m_splitVerticesTrkInvFraction &&
373  // few tracks are left, put them into the fit regardless their position!
375  perigeesToFit.push_back(*perigeeListIter);
376  counter += 1;
377  } else {
378  perigeesToFitSplitVertex.push_back(*perigeeListIter);
379  counter += 1;
380  }
381  } else { // check first whether it is not too far away!
382  double distance = 0.;
383  try {
384  std::unique_ptr<Trk::PlaneSurface> mySurface =
385  m_ImpactPoint3dEstimator->Estimate3dIP(
386  *perigeeListIter, &actualVertex, distance);
388  msg(MSG::WARNING) << " ImpactPoint3dEstimator failed to find minimum "
389  "distance between track and vertex seed: "
390  << err.p << endmsg;
391  }
392 
393  if (distance < 0) {
394  msg(MSG::WARNING)
395  << " Distance between track and seed vtx is negative: " << distance
396  << endmsg;
397  }
398 
399  const Trk::TrackParameters* myPerigee = (*perigeeListIter);
400 
401  // very approximate error
402  double error = 0.;
403 
404  if (myPerigee && myPerigee->covariance()) {
405  error = std::sqrt((*myPerigee->covariance())(Trk::d0, Trk::d0) +
406  (*myPerigee->covariance())(Trk::z0, Trk::z0));
407  } // end of the security check
408 
409  if (error == 0.) {
410  msg(MSG::ERROR) << " Error is zero! " << distance << endmsg;
411  error = 1.;
412  }
413 
417  perigeesToFit.push_back(*perigeeListIter);
418  counter += 1;
419  } else {
420  perigeesToFitSplitVertex.push_back(*perigeeListIter);
421  counter += 1;
422  }
423  }
424  }
425  }
426 
427  if (perigeesToFit.empty()) {
428  ATH_MSG_DEBUG(" No good seed found. Exiting search for vertices...");
429  break;
430  }
431 
432  // now you have perigeeToFit and perigeeToFitSplitVertices
433  // AND HERE YOU DO THE FIT
434  // to reassign vertices you look ino what is already in myVxCandidate
435  // you do it only ONCE!
436 
437  xAOD::Vertex* myxAODVertex = nullptr;
438  xAOD::Vertex* myxAODSplitVertex = nullptr;
439 
440  if (m_useBeamConstraint && !perigeesToFit.empty()) {
441  myxAODVertex = m_iVertexFitter->fit(perigeesToFit, theconstraint);
442  } else if (!m_useBeamConstraint && perigeesToFit.size() > 1) {
443  myxAODVertex = m_iVertexFitter->fit(perigeesToFit);
444  }
445  if (m_createSplitVertices && perigeesToFitSplitVertex.size() > 1) {
446  myxAODSplitVertex = m_iVertexFitter->fit(perigeesToFitSplitVertex);
447  }
448 
449  double ndf = 0.;
450  int ntracks = 0;
451  countTracksAndNdf(myxAODVertex, ndf, ntracks);
452 
453  double ndfSplitVertex = 0.;
454  int ntracksSplitVertex = 0;
455  countTracksAndNdf(myxAODSplitVertex, ndfSplitVertex, ntracksSplitVertex);
456 
457  bool goodVertex = myxAODVertex != nullptr &&
458  ((!m_useBeamConstraint && ndf > 0 && ntracks >= 2) ||
459  (m_useBeamConstraint && ndf > 3 && ntracks >= 2));
460 
461  if (msgLvl(MSG::DEBUG)) {
462  msg(MSG::DEBUG) << " xAOD::Vertex is pointer: " << myxAODVertex
463  << " ndf = " << ndf << " ntracks (with weight>0.01) "
464  << ntracks << " beam constraint "
465  << (m_useBeamConstraint ? "yes" : "no") << endmsg;
466  }
467 
468  if (!goodVertex) {
469  removeAllFrom(perigeesToFit, seedTracks);
470  } else {
472  // now you HAVE a good vertex
473  // but you want to add the tracks which you missed...
474 
475  int numberOfAddedTracks = 0;
476 
477  // iterate on remaining vertices and cross-check if tracks need to be
478  // attached to new vertex
479  xAOD::VertexContainer::iterator vxBegin = theVertexContainer->begin();
480  xAOD::VertexContainer::iterator vxEnd = theVertexContainer->end();
481 
482  for (xAOD::VertexContainer::iterator vxIter = vxBegin; vxIter != vxEnd;
483  ++vxIter) {
484  // now iterate on tracks at vertex
485 
486  std::vector<Trk::VxTrackAtVertex>* myVxTracksAtVtx =
487  (&(*vxIter)->vxTrackAtVertex());
488 
489  if (!myVxTracksAtVtx)
490  continue;
491 
493  myVxTracksAtVtx->begin();
495  myVxTracksAtVtx->end();
496 
498  tracksBegin;
499  tracksIter != tracksEnd;) {
500  // only try with tracks which are not too tightly assigned to
501  // another vertex
502  if ((*tracksIter).weight() > 0.01) {
503  ++tracksIter;
504  continue;
505  }
506 
507  const Trk::TrackParameters* trackPerigee =
508  (*tracksIter).initialPerigee();
509 
510  if (trackPerigee == nullptr) {
511  msg(MSG::ERROR) << " Cast to perigee gives 0 pointer " << endmsg;
512  }
513 
514  double chi2_newvtx = compatibility(*trackPerigee, *myxAODVertex);
515  double chi2_oldvtx = compatibility(*trackPerigee, *(*vxIter));
516 
517  bool remove = false;
518 
519  if (chi2_newvtx < chi2_oldvtx) {
520  ATH_MSG_DEBUG(" Found track of old vertex (chi2= "
521  << chi2_oldvtx
522  << ") more compatible to new one (chi2= "
523  << chi2_newvtx << ")");
524 
525  perigeesToFit.push_back(trackPerigee);
526  // but you need to re-add it to the seedTracks too...
527 
528  bool isFound = false;
529 
531  origTracks.begin();
533  origTracks.end();
534 
535  for (std::vector<Trk::ITrackLink*>::iterator origIter = origBegin;
536  origIter != origEnd;
537  ++origIter) {
538  if ((*origIter)->parameters() == trackPerigee) {
539  isFound = true;
540  seedTracks.push_back(*origIter);
541  break;
542  }
543  }
544  if (!isFound) {
545  ATH_MSG_WARNING(" Cannot find old perigee to re-add back to "
546  "seed tracks... ");
547  }
548 
549  numberOfAddedTracks += 1;
550 
551  remove = true;
552  }
553 
554  if (remove) {
555  // now you have to delete the track from the old vertex...
556  // easy???
557  tracksIter = myVxTracksAtVtx->erase(tracksIter);
558  tracksBegin = myVxTracksAtVtx->begin();
559  tracksEnd = myVxTracksAtVtx->end();
560  } else {
561  ++tracksIter;
562  }
563  } // end of iterating on tracks
564  } // end of iterating on already found vertices in event
565 
566  // now you have to delete the previous xAOD::Vertex, do a new fit, then
567  // check if you still have a good vertex
568 
569  if (numberOfAddedTracks > 0) {
570  delete myxAODVertex;
571  myxAODVertex = nullptr;
572 
573  if (m_useBeamConstraint && !perigeesToFit.empty()) {
574  myxAODVertex = m_iVertexFitter->fit(perigeesToFit, theconstraint);
575  } else if (!m_useBeamConstraint && perigeesToFit.size() > 1) {
576  myxAODVertex = m_iVertexFitter->fit(perigeesToFit);
577  }
578 
579  ndf = 0.;
580  ntracks = 0;
581  countTracksAndNdf(myxAODVertex, ndf, ntracks);
582 
583  goodVertex = myxAODVertex != nullptr &&
584  ((!m_useBeamConstraint && ndf > 0 && ntracks >= 2) ||
585  (m_useBeamConstraint && ndf > 3 && ntracks >= 2));
586 
587  ATH_MSG_DEBUG(" Refitted xAODVertex is pointer: "
588  << myxAODVertex << " ndf = " << ndf
589  << " ntracks (with weight>0.01) " << ntracks
590  << " beam constraint "
591  << (m_useBeamConstraint ? "yes" : "no"));
592 
593  if (!goodVertex) {
594  removeAllFrom(perigeesToFit, seedTracks);
595  ATH_MSG_DEBUG(" Adding tracks resulted in an invalid vertex. "
596  "Should be rare. ");
597  }
598  } // end if tracks were added...
599  } // end reassign tracks from previous vertices and refitting if needed
600 
601  // need to re-ask goodVertex since it can be changed in the mean time
602  if (goodVertex) {
603  removeCompatibleTracks(myxAODVertex, perigeesToFit, seedTracks);
604  }
605  } // end else case on if not good Vertex
606 
607  bool goodSplitVertex = false;
608 
609  if (m_createSplitVertices) {
610  goodSplitVertex = myxAODSplitVertex != nullptr && ndfSplitVertex > 0 &&
611  ntracksSplitVertex >= 2;
612 
613  ATH_MSG_DEBUG(" xAODSplitVertex is pointer: "
614  << myxAODSplitVertex << " ndf = " << ndfSplitVertex
615  << " ntracks (with weight>0.01) " << ntracksSplitVertex);
616 
617  if (!goodSplitVertex) {
618  removeAllFrom(perigeesToFitSplitVertex, seedTracks);
619  } else {
621  myxAODSplitVertex, perigeesToFitSplitVertex, seedTracks);
622 
623  } // end else if not good Vertex
624  } // end if create split vertices
625 
626  if (!m_createSplitVertices) {
627  if (goodVertex) {
628  theVertexContainer->push_back(myxAODVertex);
629  } else {
630  if (myxAODVertex) {
631  delete myxAODVertex;
632  myxAODVertex = nullptr;
633  }
634  }
635  } else {
636  if (goodVertex) {
637  // type does not seem to be set earlier
638  myxAODVertex->setVertexType(xAOD::VxType::PriVtx);
639  theVertexContainer->push_back(myxAODVertex);
640  } else {
641  if (myxAODVertex) {
642  delete myxAODVertex;
643  myxAODVertex = nullptr;
644  }
645 
646  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
647  theVertexContainer->push_back(
648  dummyxAODVertex); // have to add vertex to container here first so it
649  // can use its aux store
650  dummyxAODVertex->setPosition(beamSpot->beamVtx().position());
651  dummyxAODVertex->setCovariancePosition(
652  beamSpot->beamVtx().covariancePosition());
653  dummyxAODVertex->vxTrackAtVertex() =
654  std::vector<Trk::VxTrackAtVertex>();
655  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
656  }
657  if (goodSplitVertex) {
658  // type does not seem to be set earlier
659  myxAODSplitVertex->setVertexType(xAOD::VxType::PriVtx);
660  theVertexContainer->push_back(myxAODSplitVertex);
661  } else {
662  if (myxAODSplitVertex) {
663  delete myxAODSplitVertex;
664  myxAODSplitVertex = nullptr;
665  }
666 
667  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
668  theVertexContainer->push_back(
669  dummyxAODVertex); // have to add vertex to container here first so it
670  // can use its aux store
671  dummyxAODVertex->setPosition(beamSpot->beamVtx().position());
672  dummyxAODVertex->setCovariancePosition(
673  beamSpot->beamVtx().covariancePosition());
674  dummyxAODVertex->vxTrackAtVertex() =
675  std::vector<Trk::VxTrackAtVertex>();
676  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
677  }
678  }
679 
680  ++iterations;
681  } while (seedTracks.size() > 1 && iterations < m_maxVertices);
682 
683  if (iterations == m_maxVertices) {
684  ATH_MSG_DEBUG("Reached maximum iterations, have "<<iterations<<" vertices");
685  }
686  else if (iterations > m_maxVertices) {
687  ATH_MSG_WARNING("Exceeded maximum iterations, have "<<iterations<<" vertices, m_maxVertices = "<<m_maxVertices);
688  }
689 
690  // unfortunately you have still a problem with the track to links!!!
691 
692  //---- add dummy vertex at the end
693  //------------------------------------------------------//
694  //---- if one or more vertices are already there: let dummy have same position
695  // as primary vertex
696  if (!m_createSplitVertices) {
697  if (!theVertexContainer->empty()) {
698  xAOD::Vertex* primaryVtx = theVertexContainer->front();
699  if (!primaryVtx->vxTrackAtVertex().empty()) {
701  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
702  theVertexContainer->push_back(
703  dummyxAODVertex); // have to add vertex to container here first so it
704  // can use its aux store
705  dummyxAODVertex->setPosition(primaryVtx->position());
706  dummyxAODVertex->setCovariancePosition(
707  primaryVtx->covariancePosition());
708  dummyxAODVertex->vxTrackAtVertex() =
709  std::vector<Trk::VxTrackAtVertex>();
710  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
711  } else {
712  primaryVtx->setVertexType(xAOD::VxType::NoVtx);
713  }
714  }
715  //---- if no vertex is there let dummy be at beam spot
716 
717  else if (theVertexContainer->empty()) {
718  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
719  theVertexContainer->push_back(
720  dummyxAODVertex); // have to add vertex to container here first so it
721  // can use its aux store
722  dummyxAODVertex->setPosition(beamSpot->beamVtx().position());
723  dummyxAODVertex->setCovariancePosition(
724  beamSpot->beamVtx().covariancePosition());
725  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
726  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
727  }
728  // loop over the pile up to set it as pile up (EXCLUDE first and last
729  // vertex, do not do that in split mode)
730  for (unsigned int i = 0; i < theVertexContainer->size() - 1; i++) {
731 
733  " Vtx: " << i << " x= " << (*theVertexContainer)[i]->position().x()
734  << " y= " << (*theVertexContainer)[i]->position().y() << " z= "
735  << (*theVertexContainer)[i]->position().z() << " ntracks= "
736  << (*theVertexContainer)[i]->vxTrackAtVertex().size()
737  << " chi2= " << (*theVertexContainer)[i]->chiSquared()
738  << " ndf = " << (*theVertexContainer)[i]->numberDoF());
739  if (i > 0) {
740  (*theVertexContainer)[i]->setVertexType(xAOD::VxType::PileUp);
741  }
742  }
743  }
744 
745  xAOD::VertexContainer::iterator vxBegin = theVertexContainer->begin();
746  xAOD::VertexContainer::iterator vxEnd = theVertexContainer->end();
747 
748  // prepare iterators for tracks only necessary for seeding
749  std::vector<Trk::ITrackLink*>::iterator origtrkbegin = origTracks.begin();
750  std::vector<Trk::ITrackLink*>::iterator origtrkend = origTracks.end();
751 
752  for (xAOD::VertexContainer::iterator vxIter = vxBegin; vxIter != vxEnd;
753  ++vxIter) {
754  std::vector<Trk::VxTrackAtVertex>* myVxTracksAtVtx =
755  &((*vxIter)->vxTrackAtVertex());
756 
757  if (!myVxTracksAtVtx)
758  continue;
759 
761  myVxTracksAtVtx->begin();
763  myVxTracksAtVtx->end();
764 
765  bool found = false;
766 
767  for (std::vector<Trk::VxTrackAtVertex>::iterator tracksIter = tracksBegin;
768  tracksIter != tracksEnd;
769  ++tracksIter) {
770 
771  // now look for corresponding ITrackLink
772  for (std::vector<Trk::ITrackLink*>::iterator origtrkiter = origtrkbegin;
773  origtrkiter != origtrkend;
774  ++origtrkiter) {
775  if ((*origtrkiter)->parameters() == (*tracksIter).initialPerigee()) {
776  found = true;
777 
778  // assigning the input track to the fitted vertex through
779  // VxTrackAtVertices vector
780  (*tracksIter).setOrigTrack(*origtrkiter);
781 
782  // See if the trklink is to an xAOD::TrackParticle
783  Trk::LinkToXAODTrackParticle* linkToXAODTP = nullptr;
784  Trk::ITrackLink* tmpLink = (*tracksIter).trackOrParticleLink();
785  if (tmpLink->type() == Trk::ITrackLink::ToxAODTrackParticle) {
786  linkToXAODTP = static_cast<Trk::LinkToXAODTrackParticle*>(tmpLink);
787  }
788 
789  // If track is an xAOD::TrackParticle, set directly in xAOD::Vertex
790  if (linkToXAODTP) {
791  (*vxIter)->addTrackAtVertex(*linkToXAODTP, (*tracksIter).weight());
792  }
793 
794  origTracks.erase(origtrkiter);
795  origtrkbegin = origTracks.begin();
796  origtrkend = origTracks.end();
797  break;
798  }
799  }
800  if (!found) {
801  ATH_MSG_ERROR(" Cannot find vector element to fix links (step 4)! ");
802  }
803  } // end iterate on tracks at vtx
804  } // end iterate on vertices
805 
806  for (std::vector<Trk::ITrackLink*>::iterator origtrkiter = origtrkbegin;
807  origtrkiter != origtrkend;
808  ++origtrkiter) {
809  if ((*origtrkiter) != 0) {
810  delete *origtrkiter;
811  *origtrkiter = 0;
812  }
813  }
814 
815  return std::make_pair(theVertexContainer, theVertexAuxContainer);
816 }
817 
820 {
821  return StatusCode::SUCCESS;
822 }
823 
824 void
826 {
827  ATH_MSG_DEBUG("VxPrimary initialize(): Parametersettings "

◆ findVertex() [2/9]

std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > InDet::InDetIterativePriVxFinderTool::findVertex ( const EventContext &  ctx,
const TrackCollection trackTES 
) const
overridevirtual

Find vertex from Trk::TrackCollection.

Parameters
EventContext
inputtrack container
Returns
a pair of newly created container and auxiliary store

Implements InDet::IVertexFinder.

Definition at line 150 of file InDetIterativePriVxFinderTool.cxx.

155  {
156 
157  if (m_useBeamConstraint && beamSpot != nullptr) {
158  Trk::RecVertex beamPosition{ beamSpot->beamVtx() };
159  selectionPassed =
160  static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
161  } else {
162  Trk::Vertex null(Amg::Vector3D(0, 0, 0));
163  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
164  }
165  if (selectionPassed) {
167  link.setElement(*itr);
168  Trk::LinkToTrack* linkTT = new Trk::LinkToTrack(link);
169  linkTT->setStorableObject(*trackTES);
170  selectedTracks.push_back(linkTT);
171  }
172  }
173 
174  ATH_MSG_DEBUG("Of " << trackTES->size() << " tracks " << selectedTracks.size()
175  << " survived the preselection.");
176 
177  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
178  returnContainers = findVertex(ctx, selectedTracks);
179 
180  return returnContainers;
181 }
182 
183 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
185  const EventContext& ctx,
186  const xAOD::TrackParticleContainer* trackParticles) const
187 {
188  ATH_MSG_DEBUG(" Number of input tracks before track selection: "
189  << trackParticles->size());
190 
192  const InDet::BeamSpotData* beamSpot = *beamSpotHandle;

◆ findVertex() [3/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex

Finding method.

Has as input a track collection and as output a VxContainer.

◆ findVertex() [4/9]

std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > InDet::InDetIterativePriVxFinderTool::findVertex ( const EventContext &  ctx,
const xAOD::TrackParticleContainer trackParticles 
) const
overridevirtual

Find vertex from xAOD::TrackParticleContainer.

Parameters
EventContext
inputtrack particle container
Returns
a pair of newly created container and auxiliary store

Implements InDet::IVertexFinder.

Definition at line 195 of file InDetIterativePriVxFinderTool.cxx.

202  {
203 
204  if (m_useBeamConstraint && beamSpot != nullptr) {
205  xAOD::Vertex beamPosition;
206  beamPosition.makePrivateStore();
207  beamPosition.setPosition(beamSpot->beamVtx().position());
208  beamPosition.setCovariancePosition(
209  beamSpot->beamVtx().covariancePosition());
210  selectionPassed =
211  static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
212  } else {
213 
214  xAOD::Vertex null;
215  null.makePrivateStore();
216  null.setPosition(Amg::Vector3D(0, 0, 0));
217  AmgSymMatrix(3) vertexError;
218  vertexError.setZero();
219  null.setCovariancePosition(vertexError);
220  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
221  }
222 
223  if (selectionPassed) {
225  link.setElement(*itr);
228  linkTT->setStorableObject(*trackParticles);
229  selectedTracks.push_back(linkTT);
230  }
231  }
232 
233  ATH_MSG_DEBUG("Of " << trackParticles->size() << " tracks "
234  << selectedTracks.size()
235  << " survived the preselection.");
236 
237  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
238  returnContainers = findVertex(ctx, selectedTracks);
239 
240  return returnContainers;
241 }
242 
243 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
245  const EventContext& ctx,
246  const std::vector<Trk::ITrackLink*>& trackVector) const
247 {
249  const InDet::BeamSpotData* beamSpot = *beamSpotHandle;
250  // two things need to be added
251  // 1) the seeding mechanism
252  // 2) the iterative removal of tracks

◆ findVertex() [5/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex

Finding method.

Has as input a track collection and as output a VxContainer.

◆ findVertex() [6/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex
inline

Finding method.

Has as input a track collection and as output a VxContainer.

Definition at line 100 of file IVertexFinder.h.

◆ findVertex() [7/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex ( const TrackCollection trackTES) const
inlinevirtualinherited

Definition at line 100 of file IVertexFinder.h.

◆ findVertex() [8/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex
inline

Finding method.

Has as input a track collection and as output a VxContainer.

Definition at line 106 of file IVertexFinder.h.

◆ findVertex() [9/9]

virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDet::IVertexFinder::findVertex ( const xAOD::TrackParticleContainer trackParticles) const
inlinevirtualinherited

Definition at line 106 of file IVertexFinder.h.

◆ initialize()

StatusCode InDet::InDetIterativePriVxFinderTool::initialize ( )
overridevirtual

Definition at line 90 of file InDetIterativePriVxFinderTool.cxx.

93  {
94  ATH_MSG_FATAL("Failed to retrieve tool " << m_SeedFinder);
95  return StatusCode::FAILURE;
96  }
97 
98  if (m_LinearizedTrackFactory.retrieve().isFailure()) {
99  ATH_MSG_FATAL("Failed to retrieve tool " << m_LinearizedTrackFactory);
100  return StatusCode::FAILURE;
101  }
102 
103  if (m_ImpactPoint3dEstimator.retrieve().isFailure()) {
104  ATH_MSG_FATAL("Failed to retrieve tool " << m_ImpactPoint3dEstimator);
105  return StatusCode::FAILURE;
106  }
107 
109 
110  if (m_trkFilter.retrieve().isFailure()) {
111  ATH_MSG_ERROR(" Unable to retrieve " << m_trkFilter);
112  return StatusCode::FAILURE;
113  }
114 
115  // since some parameters special to an inherited class this method
116  // will be overloaded by the inherited class
118 
119  return StatusCode::SUCCESS;
120 }
121 
122 namespace {
123 struct xAODVertex_pair
124 {
125  double first;
127  xAODVertex_pair(double p1, xAOD::Vertex* p2)
128  : first(p1)
129  , second(p2)
130  {}
131  bool operator<(const xAODVertex_pair& other) const

◆ 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& InDet::IVertexFinder::interfaceID ( )
inlinestaticinherited

Definition at line 73 of file IVertexFinder.h.

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

◆ printParameterSettings()

void InDet::InDetIterativePriVxFinderTool::printParameterSettings ( )
privatevirtual

Internal method to print the parameters setting.

Definition at line 836 of file InDetIterativePriVxFinderTool.cxx.

842 {

◆ removeAllFrom()

void InDet::InDetIterativePriVxFinderTool::removeAllFrom ( std::vector< const Trk::TrackParameters * > &  perigeesToFit,
std::vector< Trk::ITrackLink * > &  seedTracks 
) const
private

Definition at line 880 of file InDetIterativePriVxFinderTool.cxx.

886  {
887 
888  bool found = false;
889 
890  for (std::vector<Trk::ITrackLink*>::iterator seedIter = seedTracks.begin();
891  seedIter != seedEnd;
892  ++seedIter) {
893  if ((*seedIter)->parameters() == *perigeesToFitIter) {
894  found = true;
895  seedTracks.erase(seedIter);
896  seedBegin = seedTracks.begin();
897  seedEnd = seedTracks.end();
898  break;
899  }
900  }
901  if (!found) {
903  " Cannot find vector element to delete when removing BAD vertex! ");
904  }
905  } // for cycle
906 }
907 
908 void
910  double& ndf,
911  int& ntracks)
912 {
913  if (myxAODVertex) {
914  ndf = myxAODVertex->numberDoF();
915 
916  std::vector<Trk::VxTrackAtVertex> myVxTracksAtVtx =
917  myxAODVertex->vxTrackAtVertex();

◆ removeCompatibleTracks()

void InDet::InDetIterativePriVxFinderTool::removeCompatibleTracks ( xAOD::Vertex myxAODVertex,
std::vector< const Trk::TrackParameters * > &  perigeesToFit,
std::vector< Trk::ITrackLink * > &  seedTracks 
) const
private

Definition at line 946 of file InDetIterativePriVxFinderTool.cxx.

962  {
963 
964  bool found = false;
965 
966  for (std::vector<Trk::ITrackLink*>::iterator seedIter = seedBegin;
967  seedIter != seedEnd;
968  ++seedIter) {
969  if ((*seedIter)->parameters() == (*tracksAtVertexIter).initialPerigee()) {
970  found = true;
971  if ((*tracksAtVertexIter).weight() > 0.01) {
972  seedTracks.erase(seedIter);
973  seedBegin = seedTracks.begin();
974  seedEnd = seedTracks.end();
975  }
976  break;
977  }
978  }
979 
980  if (!found) {
981  ATH_MSG_ERROR(" Cannot find vector element to delete (step 1)! ");
982  }
983 
984  found = false;
986  perigeesToFitBegin;
987  perigeesToFitIter != perigeesToFitEnd;
988  ++perigeesToFitIter) {
989  if (*perigeesToFitIter == (*tracksAtVertexIter).initialPerigee()) {
990  found = true;
991  if ((*tracksAtVertexIter).weight() > 0.01) {
992  perigeesToFit.erase(perigeesToFitIter);
993  perigeesToFitBegin = perigeesToFit.begin();
994  perigeesToFitEnd = perigeesToFit.end();
995  }
996  break;
997  }
998  }
999 
1000  if (!found) {
1001  ATH_MSG_ERROR(" Cannot find vector element to delete (step 2)! ");
1002  }
1003  } // finishing iterating on tracks at vertex
1004 
1005  std::vector<Trk::VxTrackAtVertex>* myVxTracksAtVertex =
1006  &(myxAODVertex->vxTrackAtVertex());
1007 
1009  myVxTracksAtVertex->begin();
1011  myVxTracksAtVertex->end();
1012 
1014  perigeesToFitBegin;
1015  perigeesToFitIter != perigeesToFitEnd;
1016  ++perigeesToFitIter) {
1017  bool found = false;
1018 
1019  // compute the chi2 with respect to the last fitted vertex!
1020  //(easy since track was NOT used in the last vertex fit...)
1021 
1022  const Trk::TrackParameters* myPerigee = (*perigeesToFitIter);
1023 
1024  if (myPerigee == nullptr) {
1025  ATH_MSG_ERROR(" Cast to perigee gives null pointer ");
1026  return;
1027  }
1028 
1029  double chi2 = compatibility(*myPerigee, *myxAODVertex);
1030 
1031  // check if still sufficiently compatible to previous vertex
1032  //(CAN BE VERY LOOSE TO BE CONSERVATIVE AGAINST FAR OUTLIERS)
1035  seedTracks.begin();
1036  seedIter != seedEnd;
1037  ++seedIter) {
1038  if ((*seedIter)->parameters() == *perigeesToFitIter) {
1039  found = true;
1040  seedTracks.erase(seedIter);
1041  seedBegin = seedTracks.begin();
1042  seedEnd = seedTracks.end();
1043  break;
1044  }
1045  }
1046 
1047  if (!found) {
1048  ATH_MSG_ERROR(" Cannot find vector element to delete (step 3)! ");
1049  }
1050  } else {
1051  // look if the track is attached to the vertex. If this is the case you
1052  // should delete the track from the vertex!
1053  for (std::vector<Trk::VxTrackAtVertex>::iterator tracksIter = tracksBegin;
1054  tracksIter != tracksEnd;
1055  ++tracksIter) {
1056  if ((*tracksIter).initialPerigee() == *perigeesToFitIter) {
1057  // delete *tracksIter;
1058  // delete has to happen BEFORE the erase (because the iterator will
1059  // point to the next object in the vector AFTER the erase!)
1060  myVxTracksAtVertex->erase(tracksIter);
1061  tracksBegin = myVxTracksAtVertex->begin();
1062  tracksEnd = myVxTracksAtVertex->end();
1063  found = true;
1064  break;
1065  }
1066  }
1067  }
1068  } // iterate on all perigeesToFit
1069 }
1070 
1071 } // end namespace InDet

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

◆ SGError()

void InDet::InDetIterativePriVxFinderTool::SGError ( const std::string &  errService)
private

Definition at line 844 of file InDetIterativePriVxFinderTool.cxx.

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

SG::ReadCondHandleKey<InDet::BeamSpotData> InDet::InDetIterativePriVxFinderTool::m_beamSpotKey
private
Initial value:
{
this,
"BeamSpotKey",
"BeamSpotData",
"SG key for beam spot"
}

Definition at line 150 of file InDetIterativePriVxFinderTool.h.

◆ m_createSplitVertices

bool InDet::InDetIterativePriVxFinderTool::m_createSplitVertices
private

Definition at line 162 of file InDetIterativePriVxFinderTool.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_doMaxTracksCut

bool InDet::InDetIterativePriVxFinderTool::m_doMaxTracksCut
private

Definition at line 168 of file InDetIterativePriVxFinderTool.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> InDet::InDetIterativePriVxFinderTool::m_ImpactPoint3dEstimator
private
Initial value:
{
this,
"ImpactPoint3dEstimator",
"Trk::ImpactPoint3dEstimator"
}

Definition at line 138 of file InDetIterativePriVxFinderTool.h.

◆ m_iVertexFitter

ToolHandle<Trk::IVertexFitter> InDet::InDetIterativePriVxFinderTool::m_iVertexFitter
private
Initial value:
{ this,
"VertexFitterTool",
"Trk::AdaptiveVertexFitter" }

Definition at line 126 of file InDetIterativePriVxFinderTool.h.

◆ m_LinearizedTrackFactory

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

Definition at line 144 of file InDetIterativePriVxFinderTool.h.

◆ m_maximumChi2cutForSeeding

double InDet::InDetIterativePriVxFinderTool::m_maximumChi2cutForSeeding
private

Definition at line 159 of file InDetIterativePriVxFinderTool.h.

◆ m_maxTracks

unsigned int InDet::InDetIterativePriVxFinderTool::m_maxTracks
private

Definition at line 169 of file InDetIterativePriVxFinderTool.h.

◆ m_maxVertices

double InDet::InDetIterativePriVxFinderTool::m_maxVertices
private

Definition at line 160 of file InDetIterativePriVxFinderTool.h.

◆ m_reassignTracksAfterFirstFit

bool InDet::InDetIterativePriVxFinderTool::m_reassignTracksAfterFirstFit
private

Definition at line 166 of file InDetIterativePriVxFinderTool.h.

◆ m_SeedFinder

ToolHandle<Trk::IVertexSeedFinder> InDet::InDetIterativePriVxFinderTool::m_SeedFinder
private
Initial value:
{ this,
"SeedFinder",
"Trk::ZScanSeedFinder" }

Definition at line 135 of file InDetIterativePriVxFinderTool.h.

◆ m_significanceCutSeeding

double InDet::InDetIterativePriVxFinderTool::m_significanceCutSeeding
private

Definition at line 158 of file InDetIterativePriVxFinderTool.h.

◆ m_splitVerticesTrkInvFraction

int InDet::InDetIterativePriVxFinderTool::m_splitVerticesTrkInvFraction
private

Integer: 1.

/fraction of tracks to be assigned to the tag split vertex

Definition at line 163 of file InDetIterativePriVxFinderTool.h.

◆ m_trkFilter

ToolHandle<InDet::IInDetTrackSelectionTool> InDet::InDetIterativePriVxFinderTool::m_trkFilter
private
Initial value:
{
this,
"TrackSelector",
"InDet::InDetTrackSelection"
}

Definition at line 129 of file InDetIterativePriVxFinderTool.h.

◆ m_useBeamConstraint

bool InDet::InDetIterativePriVxFinderTool::m_useBeamConstraint
private

Definition at line 157 of file InDetIterativePriVxFinderTool.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.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
operator<
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
InDet::InDetIterativePriVxFinderTool::m_maxVertices
double m_maxVertices
Definition: InDetIterativePriVxFinderTool.h:160
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
InDet::InDetIterativePriVxFinderTool::m_splitVerticesTrkInvFraction
int m_splitVerticesTrkInvFraction
Integer: 1.
Definition: InDetIterativePriVxFinderTool.h:163
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
InDet::InDetIterativePriVxFinderTool::m_useBeamConstraint
bool m_useBeamConstraint
Definition: InDetIterativePriVxFinderTool.h:157
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::InDetIterativePriVxFinderTool::countTracksAndNdf
static void countTracksAndNdf(xAOD::Vertex *myxAODVertex, double &ndf, int &ntracks)
Definition: InDetIterativePriVxFinderTool.cxx:920
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
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
InDet::InDetIterativePriVxFinderTool::m_reassignTracksAfterFirstFit
bool m_reassignTracksAfterFirstFit
Definition: InDetIterativePriVxFinderTool.h:166
Trk::z0
@ z0
Definition: ParamDefs.h:70
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
InDet::InDetIterativePriVxFinderTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetIterativePriVxFinderTool.h:150
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::InDetIterativePriVxFinderTool::finalize
virtual StatusCode finalize() override
Definition: InDetIterativePriVxFinderTool.cxx:830
x
#define x
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
InDet::InDetIterativePriVxFinderTool::removeAllFrom
void removeAllFrom(std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
Definition: InDetIterativePriVxFinderTool.cxx:880
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::VxType::VertexType
VertexType
Vertex types.
Definition: TrackingPrimitives.h:569
InDet::InDetIterativePriVxFinderTool::m_createSplitVertices
bool m_createSplitVertices
Definition: InDetIterativePriVxFinderTool.h:162
PixelModuleFeMask_create_db.remove
string remove
Definition: PixelModuleFeMask_create_db.py:83
xAOD::Vertex_v1::setVertexType
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
InDet::InDetIterativePriVxFinderTool::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: InDetIterativePriVxFinderTool.h:144
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
error::ImpactPoint3dEstimatorProblem
Definition: IImpactPoint3dEstimator.h:72
InDet::InDetIterativePriVxFinderTool::printParameterSettings
virtual void printParameterSettings()
Internal method to print the parameters setting.
Definition: InDetIterativePriVxFinderTool.cxx:836
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
Trk::LinkToTrack
AUTO - An Undocumented Tracking Object.
Definition: LinkToTrack.h:20
Trk::LinkToXAODTrackParticle
Element link to XAOD TrackParticle.
Definition: LinkToXAODTrackParticle.h:33
InDet::InDetIterativePriVxFinderTool::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: InDetIterativePriVxFinderTool.h:126
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< xAOD::TrackParticle_v1 >
InDet::InDetIterativePriVxFinderTool::m_significanceCutSeeding
double m_significanceCutSeeding
Definition: InDetIterativePriVxFinderTool.h:158
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
InDet::InDetIterativePriVxFinderTool::m_maxTracks
unsigned int m_maxTracks
Definition: InDetIterativePriVxFinderTool.h:169
InDet::InDetIterativePriVxFinderTool::m_maximumChi2cutForSeeding
double m_maximumChi2cutForSeeding
Definition: InDetIterativePriVxFinderTool.h:159
xAOD::VxType::PileUp
@ PileUp
Pile-up vertex.
Definition: TrackingPrimitives.h:573
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::d0
@ d0
Definition: ParamDefs.h:69
InDet::InDetIterativePriVxFinderTool::m_doMaxTracksCut
bool m_doMaxTracksCut
Definition: InDetIterativePriVxFinderTool.h:168
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
InDet::InDetIterativePriVxFinderTool::removeCompatibleTracks
void removeCompatibleTracks(xAOD::Vertex *myxAODVertex, std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
Definition: InDetIterativePriVxFinderTool.cxx:946
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IDTPM::chiSquared
float chiSquared(const U &p)
Definition: TrackParametersHelper.h:136
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
InDet::InDetIterativePriVxFinderTool::m_ImpactPoint3dEstimator
ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator
Definition: InDetIterativePriVxFinderTool.h:138
InDet::InDetIterativePriVxFinderTool::initialize
virtual StatusCode initialize() override
Definition: InDetIterativePriVxFinderTool.cxx:90
InDet::BeamSpotData
Definition: BeamSpotData.h:21
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
InDet::InDetIterativePriVxFinderTool::m_SeedFinder
ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder
Definition: InDetIterativePriVxFinderTool.h:135
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
y
#define y
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:402
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::PriVtx
@ PriVtx
Primary Vertex.
Definition: VertexType.h:27
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
test_pyathena.counter
counter
Definition: test_pyathena.py:15
InDet::InDetIterativePriVxFinderTool::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const override
Find vertex from Trk::TrackCollection.
Definition: InDetIterativePriVxFinderTool.cxx:150
error
Definition: IImpactPoint3dEstimator.h:70
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
InDet::InDetIterativePriVxFinderTool::compatibility
double compatibility(const Trk::TrackParameters &measPerigee, const xAOD::Vertex &vertex) const
Definition: InDetIterativePriVxFinderTool.cxx:850
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::Vertex_v1::setCovariancePosition
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
fitman.k
k
Definition: fitman.py:528
InDet::InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool
virtual ~InDetIterativePriVxFinderTool()
Destructor.
InDet::InDetIterativePriVxFinderTool::m_trkFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter
Definition: InDetIterativePriVxFinderTool.h:129