ATLAS Offline Software
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ActsTrk::IterativePriVtxFinderTool Class Reference

#include <IterativePriVtxFinderTool.h>

Inheritance diagram for ActsTrk::IterativePriVtxFinderTool:
Collaboration diagram for ActsTrk::IterativePriVtxFinderTool:

Classes

class  TrackWrapper
 

Public Member Functions

virtual StatusCode initialize () override
 
 IterativePriVtxFinderTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor. More...
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const TrackCollection *trackTES) const override
 
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const xAOD::TrackParticleContainer *trackParticles) const override
 

Private Types

using Propagator = Acts::Propagator< Acts::EigenStepper<>, Acts::Navigator >
 
using TrackLinearizer = Acts::HelicalTrackLinearizer
 
using VertexFitter = Acts::FullBilloirVertexFitter
 
using VertexSeedFinder = Acts::TrackDensityVertexFinder
 
using VertexFinder = Acts::IterativeVertexFinder
 

Private Member Functions

const Acts::Logger & logger () const
 
std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex (const EventContext &ctx, const std::vector< std::unique_ptr< Trk::ITrackLink >> &trackVector) const
 
Trk::PerigeeactsBoundToTrkPerigee (const Acts::BoundTrackParameters &bound, const Acts::Vector3 &surfCenter) const
 
virtual const IActsTrackingGeometryTooltrackingGeometryTool () const
 

Private Attributes

std::unique_ptr< const Acts::Logger > m_logger {nullptr}
 logging instance More...
 
std::shared_ptr< VertexFinderm_vertexFinder = nullptr
 
std::shared_ptr< ATLASMagneticFieldWrapperm_bField = nullptr
 
std::shared_ptr< Propagatorm_propagator = nullptr
 
std::optional< TrackLinearizerm_linearizer = std::nullopt
 
ToolHandle< IActsTrackingGeometryToolm_trackingGeometryTool {this, "TrackingGeometryTool", "", "ActsTrackingGeometryTool"}
 
ToolHandle< IActsExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool", "", "ActsExtrapolationTool"}
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trkFilter {this, "TrackSelector", "", "InDetTrackSelectionTool"}
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
 
UnsignedIntegerProperty m_fitterMaxIterations {this, "fitterMaxIterations", 5, "Vertex fitter max. iterations"}
 
BooleanProperty m_useBeamConstraint {this, "useBeamConstraint", true, "Use beam constraint"}
 
DoubleProperty m_significanceCutSeeding {this, "significanceCutSeeding", 10, "Seeding Cut Significance"}
 
DoubleProperty m_maximumChi2cutForSeeding {this, "maximumChi2cutForSeeding", 36., "Max. Chi2 cut for seeding"}
 
UnsignedIntegerProperty m_maxVertices {this, "maxVertices", 50, "Max number of vertices"}
 
BooleanProperty m_createSplitVertices {this, "createSplitVertices", false, "Create split vertices or not"}
 
UnsignedIntegerProperty m_splitVerticesTrkInvFraction {this, "splitVerticesTrkInvFraction", 2, "Track Inv. fraction for split vertices"}
 
BooleanProperty m_reassignTracksAfterFirstFit {this, "reassignTracksAfterFirstFit", false, "Whether re-assign tracks after first vertex fit or not"}
 
BooleanProperty m_doMaxTracksCut {this, "doMaxTracksCut", false, "Whether use max. tracks cut or not"}
 
UnsignedIntegerProperty m_maxTracks {this, "maxTracks", 5000, "Max. number of tracks to use for vertex finding"}
 
DoubleProperty m_cutOffTrackWeight {this, "cutOffTrackWeight", 0.01, "Min. track weight allowed"}
 
DoubleProperty m_gaussianMaxD0Significance {this, "gaussianMaxD0Significance", 3.5, "Gaussian seeder max d0 track significance"}
 
DoubleProperty m_gaussianMaxZ0Significance {this, "gaussianMaxDZSignificance", 12.0, "Gaussian seeder max z0 track significance"}
 
UnsignedIntegerProperty m_ipEstMaxIterations {this, "ipEstMaxIterations", 20, "IpEstimator max. iterations"}
 
DoubleProperty m_ipEstPrecision {this, "ipEstPrecision", 1e-10, "IpEstimator precision"}
 

Detailed Description

Definition at line 58 of file IterativePriVtxFinderTool.h.

Member Typedef Documentation

◆ Propagator

using ActsTrk::IterativePriVtxFinderTool::Propagator = Acts::Propagator<Acts::EigenStepper<>, Acts::Navigator>
private

Definition at line 119 of file IterativePriVtxFinderTool.h.

◆ TrackLinearizer

using ActsTrk::IterativePriVtxFinderTool::TrackLinearizer = Acts::HelicalTrackLinearizer
private

Definition at line 120 of file IterativePriVtxFinderTool.h.

◆ VertexFinder

using ActsTrk::IterativePriVtxFinderTool::VertexFinder = Acts::IterativeVertexFinder
private

Definition at line 123 of file IterativePriVtxFinderTool.h.

◆ VertexFitter

using ActsTrk::IterativePriVtxFinderTool::VertexFitter = Acts::FullBilloirVertexFitter
private

Definition at line 121 of file IterativePriVtxFinderTool.h.

◆ VertexSeedFinder

using ActsTrk::IterativePriVtxFinderTool::VertexSeedFinder = Acts::TrackDensityVertexFinder
private

Definition at line 122 of file IterativePriVtxFinderTool.h.

Constructor & Destructor Documentation

◆ IterativePriVtxFinderTool()

ActsTrk::IterativePriVtxFinderTool::IterativePriVtxFinderTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor.

Definition at line 42 of file IterativePriVtxFinderTool.cxx.

45  : base_class(type, name, parent)
46 {}

Member Function Documentation

◆ actsBoundToTrkPerigee()

Trk::Perigee * ActsTrk::IterativePriVtxFinderTool::actsBoundToTrkPerigee ( const Acts::BoundTrackParameters &  bound,
const Acts::Vector3 &  surfCenter 
) const
private

Definition at line 402 of file IterativePriVtxFinderTool.cxx.

403  {
404  using namespace Acts::UnitLiterals;
405  AmgSymMatrix(5) cov = AmgSymMatrix(5)(bound.covariance()->block<5,5>(0,0));
406  cov.col(Trk::qOverP) *= 1_MeV;
407  cov.row(Trk::qOverP) *= 1_MeV;
408  Acts::ActsVector<5> params = bound.parameters().head<5>();
409  params[Trk::qOverP] *= 1_MeV;
410 
411  return new Trk::Perigee(params, Trk::PerigeeSurface(surfCenter), std::move(cov));
412 }

◆ findVertex() [1/3]

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

Definition at line 204 of file IterativePriVtxFinderTool.cxx.

206 {
207 
208  using namespace Acts::UnitLiterals;
209 
210  // Vertex finding algorithm begins
212 
213  // The output vertex containers
214  xAOD::VertexContainer* theVertexContainer = new xAOD::VertexContainer;
215  xAOD::VertexAuxContainer* theVertexAuxContainer = new xAOD::VertexAuxContainer;
216  theVertexContainer->setStore(theVertexAuxContainer);
217 
218  // bail out early with only Dummy vertex if multiplicity cut is applied and exceeded
219  if((m_doMaxTracksCut && (trackVector.size() > m_maxTracks)) || trackVector.empty()) {
220  ATH_MSG_WARNING(trackVector.size()
221  << " tracks - exceeds maximum (" << m_maxTracks
222  << "), skipping vertexing and returning only dummy...");
223  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
224  theVertexContainer->push_back(
225  dummyxAODVertex); // have to add vertex to container here first so it can use its aux store
226  dummyxAODVertex->setPosition(beamSpotHandle->beamVtx().position());
227  dummyxAODVertex->setCovariancePosition(
228  beamSpotHandle->beamVtx().covariancePosition());
229  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
230  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
231  return std::make_pair(theVertexContainer, theVertexAuxContainer);
232  }
233 
234  const Acts::Vector3& beamSpotPos = beamSpotHandle->beamVtx().position();
235  Acts::Vertex beamSpotConstraintVtx(beamSpotPos);
236  beamSpotConstraintVtx.setCovariance(beamSpotHandle->beamVtx().covariancePosition());
237 
238  std::shared_ptr<Acts::PerigeeSurface> perigeeSurface =
239  Acts::Surface::makeShared<Acts::PerigeeSurface>((trackVector[0])->parameters()->associatedSurface().transform());
240 
241  // Get the magnetic field context
242  Acts::MagneticFieldContext magFieldContext = m_extrapolationTool->getMagneticFieldContext(ctx);
243 
244  const auto& geoContext
245  = m_trackingGeometryTool->getGeometryContext(ctx).context();
246 
247  // Convert tracks to Acts::BoundParameters
248  std::vector<TrackWrapper> allTracks;
249 
250  for (const auto& trk : trackVector) {
251 
252  const auto& trkParams = trk->parameters();
253  const auto& params = trkParams->parameters();
254 
255  Acts::BoundVector actsParams;
256  actsParams << params(0), params(1), params(2), params(3), params(4)*1./(1_MeV), 0.;
257 
258  if(trkParams->covariance() == nullptr){
259  continue;
260  }
261  auto cov = *(trkParams->covariance());
262 
263  // TODO: check if the following works as well:
264  // cov->col(4) *= 1./1_MeV;
265  // cov->row(4) *= 1./1_MeV;
266  Acts::BoundSquareMatrix covMat;
267  covMat << cov(0,0) , cov(0,1) , cov(0,2) , cov(0,3) , cov(0,4) *1./(1_MeV), 0
268  , cov(1,0) , cov(1,1) , cov(1,2) , cov(1,3) , cov(1,4) *1./(1_MeV) , 0
269  , cov(2,0) , cov(2,1) , cov(2,2) , cov(2,3) , cov(2,4) *1./(1_MeV) , 0
270  , cov(3,0) , cov(3,1) , cov(3,2) , cov(3,3) , cov(3,4) *1./(1_MeV) , 0
271  , cov(4,0) *1./(1_MeV) , cov(4,1) *1./(1_MeV) , cov(4,2) *1./(1_MeV) , cov(4,3) *1./(1_MeV) , cov(4,4) *1./(1_MeV*1_MeV), 0
272  , 0. , 0. , 0. , 0., 0., 1.;
273 
274  allTracks.emplace_back(trk.get(),Acts::BoundTrackParameters(perigeeSurface, actsParams, covMat, Acts::ParticleHypothesis::pion()));
275  }
276 
277  std::vector<Acts::InputTrack> allTrackPtrs;
278  allTrackPtrs.reserve(allTracks.size());
279 
280 for(const auto& trk : allTracks){
281  allTrackPtrs.emplace_back(&trk);
282  }
283 
284  Acts::VertexingOptions vertexingOptions(geoContext,
285  magFieldContext);
286 
287  if(!m_useBeamConstraint){
288  beamSpotConstraintVtx.setPosition(Acts::Vector3::Zero());
289  beamSpotConstraintVtx.setCovariance(Acts::ActsSquareMatrix<3>::Zero());
290  }
291  vertexingOptions.useConstraintInFit = m_useBeamConstraint;
292 
293  //Adding 4th dimensional timing info to vertex constraint as needed by ACTS
294  Acts::Vector4 vtxConstraintPos;
295  Acts::SquareMatrix4 vtxConstraintCov;
296 
297  auto beamSpotCov = beamSpotHandle->beamVtx().covariancePosition();
298 
299  vtxConstraintPos << beamSpotPos(0), beamSpotPos(1), beamSpotPos(2), 0.;
300  vtxConstraintCov << beamSpotCov(0,0), beamSpotCov(0,1), beamSpotCov(0,2), 0.
301  , beamSpotCov(1,0), beamSpotCov(1,1), beamSpotCov(1,2), 0.
302  , beamSpotCov(2,0), beamSpotCov(2,1), beamSpotCov(2,2), 0.
303  , 0., 0., 0., 1.;
304 
305  vertexingOptions.constraint.setFullPosition(vtxConstraintPos);
306  vertexingOptions.constraint.setFullCovariance(vtxConstraintCov);
307 
308  auto finderState = m_vertexFinder->makeState(magFieldContext);
309 
310  auto findResult = m_vertexFinder->find(allTrackPtrs, vertexingOptions, finderState);
311 
312  if(!findResult.ok()){
313  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
314  theVertexContainer->push_back(dummyxAODVertex);
315  dummyxAODVertex->setPosition(beamSpotHandle->beamVtx().position());
316  dummyxAODVertex->setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
317  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
318  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
319 
320  return std::make_pair(theVertexContainer, theVertexAuxContainer);
321  }
322 
323  std::vector<Acts::Vertex> allVertices = *findResult;
324 
325  for(const auto& vtx : allVertices){
326  xAOD::Vertex* xAODVtx = new xAOD::Vertex;
327  xAODVtx->makePrivateStore();
328  xAODVtx->setPosition(vtx.position());
329  xAODVtx->setCovariancePosition(vtx.covariance());
330  xAODVtx->setFitQuality(vtx.fitQuality().first, vtx.fitQuality().second);
331 
332  const auto& tracks = vtx.tracks();
333  std::vector<Trk::VxTrackAtVertex>* trkAtVtxVec = &(xAODVtx->vxTrackAtVertex());
334  for(const auto& trk : tracks){
335 
336  Trk::Perigee* fittedPerigee = actsBoundToTrkPerigee(trk.fittedParams, beamSpotPos);
337  //Trk::Perigee* originalPerigee = actsBoundToTrkPerigee((trk.originalParams)->parameters(), beamSpotPos);
338  const TrackWrapper* originalParams = trk.originalParams.template as<TrackWrapper>();
339 
340  //Trk::VxTrackAtVertex trkAtVtx(trk.chi2Track, fittedPerigee, originalPerigee);
341  Trk::VxTrackAtVertex trkAtVtx(originalParams->trackLink()->clone());
342  trkAtVtx.setPerigeeAtVertex(fittedPerigee);
343  trkAtVtx.setTrackQuality(Trk::FitQuality(trk.chi2Track, trk.ndf));
344  trkAtVtx.setVtxCompatibility(trk.vertexCompatibility);
345  trkAtVtx.setWeight(trk.trackWeight);
346  trkAtVtxVec->push_back(trkAtVtx);
347 
348  const Trk::LinkToXAODTrackParticle* linkToXAODTP =
349  dynamic_cast<const Trk::LinkToXAODTrackParticle*>(originalParams->trackLink());
350  if (linkToXAODTP) {
351  xAODVtx->addTrackAtVertex(*linkToXAODTP, trk.trackWeight);
352  }
353  }
354 
355  theVertexContainer->push_back(xAODVtx);
356  }
357 
358  if (!m_createSplitVertices) {
359  if (!theVertexContainer->empty()) {
360  xAOD::Vertex* primaryVtx = theVertexContainer->front();
361  if (!primaryVtx->vxTrackAtVertex().empty()) {
363  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
364  theVertexContainer->push_back(dummyxAODVertex);
365  dummyxAODVertex->setPosition(primaryVtx->position());
366  dummyxAODVertex->setCovariancePosition(primaryVtx->covariancePosition());
367  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
368  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
369  } else {
370  primaryVtx->setVertexType(xAOD::VxType::NoVtx);
371  }
372  } else {
373  xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
374  theVertexContainer->push_back(dummyxAODVertex);
375  dummyxAODVertex->setPosition(beamSpotHandle->beamVtx().position());
376  dummyxAODVertex->setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
377  dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
378  dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
379  }
380 
381  // loop over the pile up to set it as pile up (EXCLUDE first and last
382  // vertex, do not do that in split mode)
383  for (unsigned int i = 0; i < theVertexContainer->size() - 1; i++) {
384 
386  " Vtx: " << i << " x= " << (*theVertexContainer)[i]->position().x()
387  << " y= " << (*theVertexContainer)[i]->position().y() << " z= "
388  << (*theVertexContainer)[i]->position().z() << " ntracks= "
389  << (*theVertexContainer)[i]->vxTrackAtVertex().size()
390  << " chi2= " << (*theVertexContainer)[i]->chiSquared()
391  << " ndf = " << (*theVertexContainer)[i]->numberDoF());
392  if (i > 0) {
393  (*theVertexContainer)[i]->setVertexType(xAOD::VxType::PileUp);
394  }
395  }
396  }
397 
398  return std::make_pair(theVertexContainer, theVertexAuxContainer);
399 }

◆ findVertex() [2/3]

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

Definition at line 128 of file IterativePriVtxFinderTool.cxx.

130 {
131 
133  const Trk::RecVertex& beamposition(beamSpotHandle->beamVtx());
134 
135  std::vector<std::unique_ptr<Trk::ITrackLink>> selectedTracks;
136 
137  typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
138 
139  bool selectionPassed;
140  for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); ++itr) {
141  if (m_useBeamConstraint) {
142  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &beamposition));
143  } else {
144  Trk::Vertex null(Amg::Vector3D(0, 0, 0));
145  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
146  }
147  if (selectionPassed) {
149  link.setElement(*itr);
150  auto trkPtr = std::make_unique<Trk::LinkToTrack>(link);
151  trkPtr->setStorableObject(*trackTES);
152  selectedTracks.push_back(std::move(trkPtr));
153  }
154  }
155 
156  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(ctx, std::move(selectedTracks));
157 
158  return returnContainers;
159 }

◆ findVertex() [3/3]

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

Definition at line 162 of file IterativePriVtxFinderTool.cxx.

164 {
165 
166  std::vector<std::unique_ptr<Trk::ITrackLink>> selectedTracks;
168  xAOD::Vertex beamposition;
169  beamposition.makePrivateStore();
170  beamposition.setPosition(beamSpotHandle->beamVtx().position());
171  beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
172 
173  typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
174 
175  bool selectionPassed;
176  for (TrackParticleDataVecIter itr = (*trackParticles).begin(); itr != (*trackParticles).end(); ++itr) {
177  if (m_useBeamConstraint) {
178  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &beamposition));
179  } else {
180  xAOD::Vertex null;
181  null.makePrivateStore();
182  null.setPosition(Amg::Vector3D(0, 0, 0));
183  AmgSymMatrix(3) vertexError;
184  vertexError.setZero();
185  null.setCovariancePosition(vertexError);
186  selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
187  }
188 
189  if (selectionPassed) {
191  link.setElement(*itr);
192  auto trkPtr = std::make_unique<Trk::LinkToXAODTrackParticle>(link);
193  trkPtr->setStorableObject(*trackParticles);
194  selectedTracks.push_back(std::move(trkPtr));
195  }
196  }
197 
198  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(ctx, std::move(selectedTracks));
199 
200  return returnContainers;
201 }

◆ initialize()

StatusCode ActsTrk::IterativePriVtxFinderTool::initialize ( )
overridevirtual

Definition at line 49 of file IterativePriVtxFinderTool.cxx.

50 {
51  using namespace std::literals::string_literals;
52 
54  ATH_CHECK(m_trkFilter.retrieve());
55 
56  m_logger = makeActsAthenaLogger(this, "Acts");
57 
58  ATH_MSG_INFO("Initializing ACTS Iterative Vertex Finder tool");
59  ATH_CHECK( m_trackingGeometryTool.retrieve() );
60  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry
61  = m_trackingGeometryTool->trackingGeometry();
62 
63  ATH_CHECK( m_extrapolationTool.retrieve() );
64 
65  Acts::Navigator navigator( Acts::Navigator::Config{ trackingGeometry },
66  logger().cloneWithSuffix("Navigator"));
67 
68  m_bField = std::make_shared<ATLASMagneticFieldWrapper>();
69  auto stepper = Acts::EigenStepper<>(m_bField);
70  m_propagator = std::make_shared<Propagator>(std::move(stepper),
71  std::move(navigator),
72  logger().cloneWithSuffix("Prop"));
73  // IP Estimator
74  Acts::ImpactPointEstimator::Config ipEstCfg(m_bField, m_propagator);
75  ipEstCfg.maxIterations = m_ipEstMaxIterations;
76  ipEstCfg.precision = m_ipEstPrecision;
77  Acts::ImpactPointEstimator ipEst(ipEstCfg,
78  logger().cloneWithSuffix("ImpactPointEstimator"));
79 
80  // Linearizer for Acts::BoundParameters type test
81  TrackLinearizer::Config ltConfig;
82  ltConfig.bField = m_bField;
83  ltConfig.propagator = m_propagator;
84  m_linearizer.emplace(ltConfig, logger().cloneWithSuffix("Linearizer"));
85 
86  // Full Billoir Vertex fitter setup
87  VertexFitter::Config fitterCfg;
88  fitterCfg.maxIterations = m_fitterMaxIterations;
89  fitterCfg.extractParameters.connect<&TrackWrapper::extractParameters>();
90  fitterCfg.trackLinearizer.connect<&TrackLinearizer::linearizeTrack>(&*m_linearizer);
91  VertexFitter fitter(fitterCfg, logger().cloneWithSuffix("Fitter"));
92 
93 
94  // Seed finder setup
95  // Set up Gaussian track density
96  Acts::GaussianTrackDensity::Config trackDensityConfig;
97  trackDensityConfig.d0MaxSignificance = m_gaussianMaxD0Significance;
98  trackDensityConfig.z0MaxSignificance = m_gaussianMaxZ0Significance;
99  trackDensityConfig.extractParameters.connect<&TrackWrapper::extractParameters>();
100  Acts::GaussianTrackDensity trackDensity(trackDensityConfig);
101 
102  // Vertex seed finder
103  VertexSeedFinder::Config seedFinderConfig{trackDensity};
104  auto seedFinder = std::make_shared<VertexSeedFinder>(seedFinderConfig);
105 
106  // Iterative Vertex Finder setup
107  VertexFinder::Config finderConfig(std::move(fitter),
108  std::move(seedFinder),
109  ipEst);
110  finderConfig.significanceCutSeeding = m_significanceCutSeeding;
111  finderConfig.maximumChi2cutForSeeding = m_maximumChi2cutForSeeding;
112  finderConfig.maxVertices = m_maxVertices;
113  finderConfig.createSplitVertices = m_createSplitVertices;
114  finderConfig.splitVerticesTrkInvFraction = m_splitVerticesTrkInvFraction;
115  finderConfig.reassignTracksAfterFirstFit = m_reassignTracksAfterFirstFit;
116  finderConfig.doMaxTracksCut = m_doMaxTracksCut;
117  finderConfig.maxTracks = m_maxTracks;
118  finderConfig.cutOffTrackWeight = m_cutOffTrackWeight;
119  finderConfig.extractParameters.connect<&TrackWrapper::extractParameters>();
120  finderConfig.trackLinearizer.connect<&TrackLinearizer::linearizeTrack>(&*m_linearizer);
121  m_vertexFinder = std::make_shared<VertexFinder>(std::move(finderConfig), logger().cloneWithSuffix("Finder"));
122 
123  ATH_MSG_INFO("ACTS Iterative Vertex Finder tool successfully initialized");
124  return StatusCode::SUCCESS;
125 }

◆ logger()

const Acts::Logger& ActsTrk::IterativePriVtxFinderTool::logger ( ) const
inlineprivate

Definition at line 104 of file IterativePriVtxFinderTool.h.

104 { return *m_logger; }

◆ trackingGeometryTool()

virtual const IActsTrackingGeometryTool* ActsTrk::IterativePriVtxFinderTool::trackingGeometryTool ( ) const
inlineprivatevirtual

Definition at line 114 of file IterativePriVtxFinderTool.h.

115  {
116  return m_trackingGeometryTool.get();
117  }

Member Data Documentation

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> ActsTrk::IterativePriVtxFinderTool::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 136 of file IterativePriVtxFinderTool.h.

◆ m_bField

std::shared_ptr<ATLASMagneticFieldWrapper> ActsTrk::IterativePriVtxFinderTool::m_bField = nullptr
private

Definition at line 126 of file IterativePriVtxFinderTool.h.

◆ m_createSplitVertices

BooleanProperty ActsTrk::IterativePriVtxFinderTool::m_createSplitVertices {this, "createSplitVertices", false, "Create split vertices or not"}
private

Definition at line 149 of file IterativePriVtxFinderTool.h.

◆ m_cutOffTrackWeight

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_cutOffTrackWeight {this, "cutOffTrackWeight", 0.01, "Min. track weight allowed"}
private

Definition at line 154 of file IterativePriVtxFinderTool.h.

◆ m_doMaxTracksCut

BooleanProperty ActsTrk::IterativePriVtxFinderTool::m_doMaxTracksCut {this, "doMaxTracksCut", false, "Whether use max. tracks cut or not"}
private

Definition at line 152 of file IterativePriVtxFinderTool.h.

◆ m_extrapolationTool

ToolHandle<IActsExtrapolationTool> ActsTrk::IterativePriVtxFinderTool::m_extrapolationTool {this, "ExtrapolationTool", "", "ActsExtrapolationTool"}
private

Definition at line 134 of file IterativePriVtxFinderTool.h.

◆ m_fitterMaxIterations

UnsignedIntegerProperty ActsTrk::IterativePriVtxFinderTool::m_fitterMaxIterations {this, "fitterMaxIterations", 5, "Vertex fitter max. iterations"}
private

Definition at line 142 of file IterativePriVtxFinderTool.h.

◆ m_gaussianMaxD0Significance

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_gaussianMaxD0Significance {this, "gaussianMaxD0Significance", 3.5, "Gaussian seeder max d0 track significance"}
private

Definition at line 157 of file IterativePriVtxFinderTool.h.

◆ m_gaussianMaxZ0Significance

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_gaussianMaxZ0Significance {this, "gaussianMaxDZSignificance", 12.0, "Gaussian seeder max z0 track significance"}
private

Definition at line 158 of file IterativePriVtxFinderTool.h.

◆ m_ipEstMaxIterations

UnsignedIntegerProperty ActsTrk::IterativePriVtxFinderTool::m_ipEstMaxIterations {this, "ipEstMaxIterations", 20, "IpEstimator max. iterations"}
private

Definition at line 161 of file IterativePriVtxFinderTool.h.

◆ m_ipEstPrecision

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_ipEstPrecision {this, "ipEstPrecision", 1e-10, "IpEstimator precision"}
private

Definition at line 162 of file IterativePriVtxFinderTool.h.

◆ m_linearizer

std::optional<TrackLinearizer> ActsTrk::IterativePriVtxFinderTool::m_linearizer = std::nullopt
private

Definition at line 131 of file IterativePriVtxFinderTool.h.

◆ m_logger

std::unique_ptr<const Acts::Logger> ActsTrk::IterativePriVtxFinderTool::m_logger {nullptr}
private

logging instance

Definition at line 103 of file IterativePriVtxFinderTool.h.

◆ m_maximumChi2cutForSeeding

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_maximumChi2cutForSeeding {this, "maximumChi2cutForSeeding", 36., "Max. Chi2 cut for seeding"}
private

Definition at line 147 of file IterativePriVtxFinderTool.h.

◆ m_maxTracks

UnsignedIntegerProperty ActsTrk::IterativePriVtxFinderTool::m_maxTracks {this, "maxTracks", 5000, "Max. number of tracks to use for vertex finding"}
private

Definition at line 153 of file IterativePriVtxFinderTool.h.

◆ m_maxVertices

UnsignedIntegerProperty ActsTrk::IterativePriVtxFinderTool::m_maxVertices {this, "maxVertices", 50, "Max number of vertices"}
private

Definition at line 148 of file IterativePriVtxFinderTool.h.

◆ m_propagator

std::shared_ptr<Propagator> ActsTrk::IterativePriVtxFinderTool::m_propagator = nullptr
private

Definition at line 128 of file IterativePriVtxFinderTool.h.

◆ m_reassignTracksAfterFirstFit

BooleanProperty ActsTrk::IterativePriVtxFinderTool::m_reassignTracksAfterFirstFit {this, "reassignTracksAfterFirstFit", false, "Whether re-assign tracks after first vertex fit or not"}
private

Definition at line 151 of file IterativePriVtxFinderTool.h.

◆ m_significanceCutSeeding

DoubleProperty ActsTrk::IterativePriVtxFinderTool::m_significanceCutSeeding {this, "significanceCutSeeding", 10, "Seeding Cut Significance"}
private

Definition at line 146 of file IterativePriVtxFinderTool.h.

◆ m_splitVerticesTrkInvFraction

UnsignedIntegerProperty ActsTrk::IterativePriVtxFinderTool::m_splitVerticesTrkInvFraction {this, "splitVerticesTrkInvFraction", 2, "Track Inv. fraction for split vertices"}
private

Definition at line 150 of file IterativePriVtxFinderTool.h.

◆ m_trackingGeometryTool

ToolHandle<IActsTrackingGeometryTool> ActsTrk::IterativePriVtxFinderTool::m_trackingGeometryTool {this, "TrackingGeometryTool", "", "ActsTrackingGeometryTool"}
private

Definition at line 133 of file IterativePriVtxFinderTool.h.

◆ m_trkFilter

ToolHandle<InDet::IInDetTrackSelectionTool> ActsTrk::IterativePriVtxFinderTool::m_trkFilter {this, "TrackSelector", "", "InDetTrackSelectionTool"}
private

Definition at line 135 of file IterativePriVtxFinderTool.h.

◆ m_useBeamConstraint

BooleanProperty ActsTrk::IterativePriVtxFinderTool::m_useBeamConstraint {this, "useBeamConstraint", true, "Use beam constraint"}
private

Definition at line 145 of file IterativePriVtxFinderTool.h.

◆ m_vertexFinder

std::shared_ptr<VertexFinder> ActsTrk::IterativePriVtxFinderTool::m_vertexFinder = nullptr
private

Definition at line 125 of file IterativePriVtxFinderTool.h.


The documentation for this class was generated from the following files:
ActsTrk::IterativePriVtxFinderTool::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Definition: IterativePriVtxFinderTool.h:134
query_example.row
row
Definition: query_example.py:24
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
ActsTrk::IterativePriVtxFinderTool::m_fitterMaxIterations
UnsignedIntegerProperty m_fitterMaxIterations
Definition: IterativePriVtxFinderTool.h:142
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
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
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ActsTrk::IterativePriVtxFinderTool::m_splitVerticesTrkInvFraction
UnsignedIntegerProperty m_splitVerticesTrkInvFraction
Definition: IterativePriVtxFinderTool.h:150
ActsTrk::IterativePriVtxFinderTool::m_ipEstMaxIterations
UnsignedIntegerProperty m_ipEstMaxIterations
Definition: IterativePriVtxFinderTool.h:161
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
ActsTrk::IterativePriVtxFinderTool::VertexFitter
Acts::FullBilloirVertexFitter VertexFitter
Definition: IterativePriVtxFinderTool.h:121
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
ActsTrk::IterativePriVtxFinderTool::TrackWrapper::extractParameters
static Acts::BoundTrackParameters extractParameters(const Acts::InputTrack &input)
Definition: IterativePriVtxFinderTool.h:73
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
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:50
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
xAOD::VxType::VertexType
VertexType
Vertex types.
Definition: TrackingPrimitives.h:569
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition: Tracking/Acts/ActsInterop/src/Logger.cxx:64
xAOD::Vertex_v1::setVertexType
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ActsTrk::IterativePriVtxFinderTool::m_bField
std::shared_ptr< ATLASMagneticFieldWrapper > m_bField
Definition: IterativePriVtxFinderTool.h:126
ActsTrk::IterativePriVtxFinderTool::actsBoundToTrkPerigee
Trk::Perigee * actsBoundToTrkPerigee(const Acts::BoundTrackParameters &bound, const Acts::Vector3 &surfCenter) const
Definition: IterativePriVtxFinderTool.cxx:402
ActsTrk::IterativePriVtxFinderTool::m_useBeamConstraint
BooleanProperty m_useBeamConstraint
Definition: IterativePriVtxFinderTool.h:145
ActsTrk::IterativePriVtxFinderTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: IterativePriVtxFinderTool.h:136
xAOD::Vertex_v1::addTrackAtVertex
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
Definition: Vertex_v1.cxx:314
ActsTrk::IterativePriVtxFinderTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: IterativePriVtxFinderTool.h:133
Acts
Definition: ChamberAssembleTool.h:18
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
ActsTrk::IterativePriVtxFinderTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: IterativePriVtxFinderTool.h:103
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ActsTrk::IterativePriVtxFinderTool::m_cutOffTrackWeight
DoubleProperty m_cutOffTrackWeight
Definition: IterativePriVtxFinderTool.h:154
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::LinkToXAODTrackParticle
Element link to XAOD TrackParticle.
Definition: LinkToXAODTrackParticle.h:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
ActsTrk::IterativePriVtxFinderTool::m_maximumChi2cutForSeeding
DoubleProperty m_maximumChi2cutForSeeding
Definition: IterativePriVtxFinderTool.h:147
ActsTrk::IterativePriVtxFinderTool::m_reassignTracksAfterFirstFit
BooleanProperty m_reassignTracksAfterFirstFit
Definition: IterativePriVtxFinderTool.h:151
ActsTrk::IterativePriVtxFinderTool::m_gaussianMaxZ0Significance
DoubleProperty m_gaussianMaxZ0Significance
Definition: IterativePriVtxFinderTool.h:158
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsTrk::IterativePriVtxFinderTool::m_vertexFinder
std::shared_ptr< VertexFinder > m_vertexFinder
Definition: IterativePriVtxFinderTool.h:125
head
std::string head(std::string s, const std::string &pattern)
head of a string
Definition: computils.cxx:311
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
xAOD::VxType::PileUp
@ PileUp
Pile-up vertex.
Definition: TrackingPrimitives.h:573
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::IterativePriVtxFinderTool::m_maxVertices
UnsignedIntegerProperty m_maxVertices
Definition: IterativePriVtxFinderTool.h:148
ActsTrk::IterativePriVtxFinderTool::m_gaussianMaxD0Significance
DoubleProperty m_gaussianMaxD0Significance
Definition: IterativePriVtxFinderTool.h:157
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
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:192
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
query_example.col
col
Definition: query_example.py:7
ActsTrk::IterativePriVtxFinderTool::m_linearizer
std::optional< TrackLinearizer > m_linearizer
Definition: IterativePriVtxFinderTool.h:131
ActsTrk::IterativePriVtxFinderTool::m_maxTracks
UnsignedIntegerProperty m_maxTracks
Definition: IterativePriVtxFinderTool.h:153
IDTPM::chiSquared
float chiSquared(const U &p)
Definition: TrackParametersHelper.h:128
ActsTrk::IterativePriVtxFinderTool::m_significanceCutSeeding
DoubleProperty m_significanceCutSeeding
Definition: IterativePriVtxFinderTool.h:146
y
#define y
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
ActsTrk::IterativePriVtxFinderTool::m_ipEstPrecision
DoubleProperty m_ipEstPrecision
Definition: IterativePriVtxFinderTool.h:162
ActsTrk::IterativePriVtxFinderTool::m_createSplitVertices
BooleanProperty m_createSplitVertices
Definition: IterativePriVtxFinderTool.h:149
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
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
ActsTrk::IterativePriVtxFinderTool::m_doMaxTracksCut
BooleanProperty m_doMaxTracksCut
Definition: IterativePriVtxFinderTool.h:152
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
ActsTrk::IterativePriVtxFinderTool::m_propagator
std::shared_ptr< Propagator > m_propagator
Definition: IterativePriVtxFinderTool.h:128
xAOD::Vertex_v1::setCovariancePosition
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
ActsTrk::IterativePriVtxFinderTool::logger
const Acts::Logger & logger() const
Definition: IterativePriVtxFinderTool.h:104
ActsTrk::IterativePriVtxFinderTool::m_trkFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter
Definition: IterativePriVtxFinderTool.h:135
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ActsTrk::IterativePriVtxFinderTool::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const override
Definition: IterativePriVtxFinderTool.cxx:128