ATLAS Offline Software
BeamspotVertexPreProcessor.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
14 
17 #include "GaudiKernel/SmartDataPtr.h"
18 
19 // new xAOD, seems we need to keep old as well
21 #include "xAODTracking/Vertex.h"
23 #include "VxVertex/VxContainer.h"
24 #include "VxVertex/VxCandidate.h"
26 
27 //++ new one
28 
35 #include "TrkTrack/LinkToTrack.h"
36 #include "TrkTrack/Track.h"
39 
40 #include <cmath>
41 #include <ext/algorithm>
42 #include <functional>
43 
44 
45 namespace Trk {
46 
47 //________________________________________________________________________
49  const std::string & name,
50  const IInterface * parent)
52  , m_trackFitter("Trk::GlobalChi2Fitter/InDetTrackFitter")
53  , m_SLTrackFitter("")
54  , m_extrapolator("Trk::Extrapolator/AtlasExtrapolator")
55  , m_trkSelector("")
56  , m_BSTrackSelector("")
57  , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
58  , m_PVContainerName("PrimaryVertices")
59  , m_runOutlierRemoval(false)
60  , m_selectVertices(true)
61  , m_particleNumber(3) // 3=pion, 0=non-interacting
62  , m_doTrkSelection (true)
63  , m_doBSTrackSelection(false)
64  , m_doAssociatedToPVSelection(true)
65  , m_constraintMode(0)
66  , m_compareMethod("compareAddress")
67  , m_doBeamspotConstraint(true)
68  , m_doPrimaryVertexConstraint(false)
69  , m_doFullVertexConstraint(false)
70  , m_doNormalRefit(true)
71  , m_maxPt(0.)
72  , m_refitTracks(true)
73  , m_storeFitMatrices(true)
74  , m_useSingleFitter(false)
75  , m_BSScalingFactor(1.)
76  , m_PVScalingFactor(1.)
77  , m_minTrksInVtx(3)
78  , m_nTracks(0)
79  , m_trackTypeCounter(AlignTrack::NTrackTypes,0)
80  , m_nFailedNormalRefits(0)
81  , m_nFailedBSRefits(0)
82  , m_nFailedPVRefits(0)
83 {
84  declareInterface<IAlignTrackPreProcessor>(this);
85  declareProperty("RefitTracks", m_refitTracks );
86  declareProperty("PVContainerName", m_PVContainerName );
87  declareProperty("TrackFitter", m_trackFitter );
88  declareProperty("SLTrackFitter", m_SLTrackFitter );
89  declareProperty("UseSingleFitter", m_useSingleFitter );
90  declareProperty("Extrapolator", m_extrapolator );
91  declareProperty("TrackToVertexIPEstimatorTool", m_trackToVertexIPEstimatorTool);
92  declareProperty("RunOutlierRemoval", m_runOutlierRemoval );
93  declareProperty("AlignModuleTool", m_alignModuleTool );
94  declareProperty("ParticleNumber", m_particleNumber );
95  declareProperty("TrackSelector", m_trkSelector );
96  declareProperty("DoTrackSelection", m_doTrkSelection );
97  declareProperty("BSConstraintTrackSelector", m_BSTrackSelector );
98  declareProperty("DoBSTrackSelection", m_doBSTrackSelection );
99  declareProperty("DoAssociatedToPVSelection", m_doAssociatedToPVSelection);
100  declareProperty("DoBSConstraint", m_doBeamspotConstraint ,"Constrain tracks to the beamspot (x,y) position");
101  declareProperty("DoPVConstraint", m_doPrimaryVertexConstraint,"Constrain tracks to the associated primary vertex (x,y,z) position");
102  declareProperty("DoFullVertex", m_doFullVertexConstraint ,"Full 3D vertex constraint. Note DoPVConstraint needs to be set to true to use this option. If DoBSConstraint vertex position will be constrained to the BS" );
103  declareProperty("ConstraintMode", m_constraintMode );
104  declareProperty("StoreFitMatrices", m_storeFitMatrices );
105  declareProperty("BeamspotScalingFactor", m_BSScalingFactor );
106  declareProperty("PrimaryVertexScalingFactor",m_PVScalingFactor );
107  declareProperty("MinTrksInVtx", m_minTrksInVtx );
108  declareProperty("doNormalRefit" ,m_doNormalRefit );
109  declareProperty("maxPt" ,m_maxPt );
110 
111 
112  std::vector<std::string> defaultInterestedVertexContainers;
113  defaultInterestedVertexContainers.emplace_back("PrimaryVertices"); // MD: Maybe only the first container?
114  //defaultInterestedVertexContainers.push_back("V0UnconstrVertices"); // : does not seem to exist in files -> check later again
115  m_interestedVertexContainers = defaultInterestedVertexContainers;
116 
117  m_logStream = nullptr;
118 }
119 
120 //________________________________________________________________________
122 = default;
123 
124 //________________________________________________________________________
126 {
127  ATH_MSG_INFO("BeamspotVertexPreProcessor::initialize()");
128 
129  // configure main track selector if requested
130  if (!m_trkSelector.empty()) {
131  if (m_trkSelector.retrieve().isFailure())
132  msg(MSG::ERROR)<<"Failed to retrieve tool "<<m_trkSelector<<". No Track Selection will be done."<<endmsg;
133  else
134  ATH_MSG_INFO("Retrieved " << m_trkSelector);
135  }
136 
137  if (m_refitTracks) {
138  // configure main track fitter
139  if(m_trackFitter.retrieve().isFailure()) {
140  msg(MSG::FATAL) << "Could not get " << m_trackFitter << endmsg;
141  return StatusCode::FAILURE;
142  }
143  ATH_MSG_INFO("Retrieved " << m_trackFitter);
144 
145  // configure straight-line track fitter if requested
146  if (!m_useSingleFitter) {
147  if (m_SLTrackFitter.retrieve().isFailure()) {
148  msg(MSG::FATAL) << "Could not get " << m_SLTrackFitter << endmsg;
149  return StatusCode::FAILURE;
150  }
151  ATH_MSG_INFO("Retrieved " << m_SLTrackFitter);
152  }
153 
154  // TrackToVertexIPEstimator
155  if (m_trackToVertexIPEstimatorTool.retrieve().isFailure()) {
156  if(msgLvl(MSG::FATAL)) msg(MSG::FATAL) << "Can not retrieve TrackToVertexIPEstimator of type " << m_trackToVertexIPEstimatorTool.typeAndName() << endmsg;
157  return StatusCode::FAILURE;
158  } else {
159  ATH_MSG_INFO ( "Retrieved TrackToVertexIPEstimator Tool " << m_trackToVertexIPEstimatorTool.typeAndName() );
160  }
161 
162  // configure Atlas extrapolator
163  if (m_extrapolator.retrieve().isFailure()) {
164  msg(MSG::FATAL) << "Failed to retrieve tool "<<m_extrapolator<<endmsg;
165  return StatusCode::FAILURE;
166  }
167  ATH_MSG_INFO("Retrieved " << m_extrapolator);
168 
169  // configure beam-spot conditions service
171 
172 
173  // configure beam-spot track selector if requested
175  if(m_BSTrackSelector.empty()) {
176  msg(MSG::FATAL) << "Requested BeamSpot track selection but Track Selector not configured"<< endmsg;
177  return StatusCode::FAILURE;
178  }
179  if (m_BSTrackSelector.retrieve().isFailure()) {
180  msg(MSG::FATAL) << "Could not get " << m_BSTrackSelector<< endmsg;
181  return StatusCode::FAILURE;
182  }
183  ATH_MSG_INFO("Retrieved " << m_BSTrackSelector);
184  }
185 
186  } // end of 'if (m_refitTracks)'
187 
188  else if (m_doBeamspotConstraint) {
189  msg(MSG::FATAL)<<"Requested beam-spot constraint but RefitTracks is False."<<endmsg;
190  return StatusCode::FAILURE;
191  }
192 
194  if ( m_alignModuleTool.retrieve().isFailure() ) {
195  ATH_MSG_FATAL("Failed to retrieve tool " << m_alignModuleTool);
196  return StatusCode::FAILURE;
197  }
198  else {
199  ATH_MSG_INFO("Retrieved tool " << m_alignModuleTool);
200 
201  ATH_MSG_INFO("************************************************************************");
202  ATH_MSG_INFO("* *");
203  ATH_MSG_INFO("* You have requested the Full Vertex Constraint option. *");
204  ATH_MSG_INFO("* It is your duty to assure that all detector elements *");
205  ATH_MSG_INFO("* used for track fitting are also loaded in the alignment framework!!! *");
206  ATH_MSG_INFO("* *");
207  ATH_MSG_INFO("* Also make sure the accurate track covariance matrix *");
208  ATH_MSG_INFO("* is returned by the GlobalChi2Fitter! *");
209  ATH_MSG_INFO("* *");
210  ATH_MSG_INFO("************************************************************************");
211  }
212 
213  }
214  return StatusCode::SUCCESS;
215 }
216 
217 
218 bool CompareTwoTracks::operator()(VxTrackAtVertex vtxTrk){ // MD: took away deref*
219 
220  ITrackLink* trkLink = vtxTrk.trackOrParticleLink();
221  LinkToTrackParticleBase* linkToTrackParticle = dynamic_cast<Trk::LinkToTrackParticleBase*>(trkLink);
222  if(!linkToTrackParticle) return false;
223  const TrackParticleBase* tpb = *(linkToTrackParticle->cptr());
224 
225  const Track* originalTrk = tpb->originalTrack();
226 
227  bool equal = false;
228  // compare the addresses of these two tracks directly
229  if(m_method.find("compareAddress") != std::string::npos){
230  if (m_track == originalTrk) equal = true;
231  //std::cout << " comparing two Tracks' addresses directly, the address of the comparing track : "<< m_track <<" the address of the compared track : "<< originalTrk << " compare result : " << equal << std::endl;
232  }
233 
234  // compare the perigee parameters of these two tracks, should safer
235  if(m_method.find("comparePerigee") != std::string::npos){
236  const Trk::Perigee * measPer1 = m_track->perigeeParameters();
237  const Trk::Perigee * measPer2 = originalTrk->perigeeParameters();
238  if(! (measPer1 && measPer2 )) equal = false;
239  else{
240  float diff = std::abs(std::numeric_limits<float>::epsilon());
241  if( ( std::abs(measPer1->parameters()[Trk::d0] - measPer2->parameters()[Trk::d0]) > diff)
242  || ( std::abs(measPer1->parameters()[Trk::z0] - measPer2->parameters()[Trk::z0]) > diff)
243  || ( std::abs(measPer1->parameters()[Trk::phi] - measPer2->parameters()[Trk::phi]) > diff)
244  || ( std::abs(measPer1->parameters()[Trk::theta] - measPer2->parameters()[Trk::theta]) > diff)
245  || ( std::abs(measPer1->parameters()[Trk::qOverP] - measPer2->parameters()[Trk::qOverP]) > diff))
246  equal = false;
247  }
248  //std::cout << " comparing two Tracks' perigee parameter, the perigee of the comparing track is: "<< *measPer1 <<" the perigee of the compared track is: "<< *measPer2 << " compare result is: " << equal << std::endl;
249  }
250  return equal;
251 }
252 
253 
254 
256 
257  if(0 == vtx->vertexType()) {
258  ATH_MSG_DEBUG("this primary vertex has been rejected as type dummy");
259  return false;
260  }
261  if (vtx->numberDoF() <= 0){
262  ATH_MSG_WARNING(" VERY STRANGE!!!, this primary vertex has been rejected as non-positive DoF "<< vtx->numberDoF() <<" the type of this vertex: "<< vtx->vertexType() );
263  return false;
264  }
265  if (int(vtx->vxTrackAtVertex().size()) < m_minTrksInVtx){
266  ATH_MSG_DEBUG(" this primary vertex vxTrackAtVertex size: "<< vtx->vxTrackAtVertex().size() );
267  return false;
268  }
269  return true;
270 }
271 
272 
274 
275  if (vtx->numberDoF() <= 0){
276  ATH_MSG_WARNING(" VERY STRANGE!!! , the updated vertex has been rejected as non-positive DoF: "<< vtx->numberDoF() <<" the type of this vertex:"<< vtx->vertexType() );
277  return false;
278  }
279 
280  if (int(vtx->vxTrackAtVertex().size()) < m_minTrksInVtx){
281  ATH_MSG_DEBUG(" the updated vertex has been rejected as vxTrackAtVertex size: "<< vtx->vxTrackAtVertex().size() );
282  return false;
283  }
284 
285  if ((vtx->covariancePosition())(0,0)<=0 ||
286  (vtx->covariancePosition())(1,1)<=0 ||
287  (vtx->covariancePosition())(2,2)<=0){
288  ATH_MSG_WARNING(" VERY STRANGE!!! , this updated vertex has been rejected as negative diagonal error matrix ");
289  return false;
290  }
291  return true;
292 }
293 
294 
296 {
297  if(!vertices)
298  return false;
299 
300  xAOD::VertexContainer::const_iterator vtxEnd = vertices->end();
301  xAOD::VertexContainer::const_iterator vtxIter = vertices->begin();
302 
303  for ( ; vtxIter != vtxEnd && (*vtxIter)->vertexType() == 1; ++vtxIter ){
304  if (isAssociatedToVertex(track, *vtxIter)) return true;
305  }
306  return false;
307 }
308 
309 
310 //____________________________________________________________________________
312 {
313  if(!vertex)
314  return false;
315 
316  std::vector<VxTrackAtVertex > vertexTracks = vertex->vxTrackAtVertex();
318 
319  std::vector<VxTrackAtVertex >::const_iterator iVxTrackBegin = vertexTracks.begin();
320  std::vector<VxTrackAtVertex >::const_iterator iVxTrackEnd = vertexTracks.end();
321 
322  std::vector<VxTrackAtVertex>::const_iterator findResult = std::find_if(iVxTrackBegin, iVxTrackEnd, thisCompare);
323 
324  return findResult != iVxTrackEnd;
325 }
326 
327 
329 
330  // do clean up firstly
331  m_allTracksVector.clear();
332  const xAOD::VertexContainer* thisContainer = nullptr;
333  //xAODVertices
334  std::vector<std::string>::const_iterator strs_iter = m_interestedVertexContainers.begin();
335  std::vector<std::string>::const_iterator strs_end = m_interestedVertexContainers.end();
336 
337  for(; strs_iter != strs_end; ++strs_iter){
338 
339  if (evtStore()->contains<xAOD::VertexContainer>(*strs_iter)) {
340  if (evtStore()->retrieve(thisContainer,*strs_iter).isFailure() ) {
341  ATH_MSG_DEBUG ("Could not retrieve xAOD vertex container with key "+(*strs_iter));
342  continue;
343  }
344  else {
345 
346  xAOD::VertexContainer::const_iterator vtxEnd = thisContainer->end();
347  xAOD::VertexContainer::const_iterator vtxIter = thisContainer->begin();
348 
349  for(; vtxIter != vtxEnd; ++vtxIter){
350  if(m_selectVertices && !selectVertices(*vtxIter)) {
351  ATH_MSG_DEBUG("this vertex did not pass the primary vertex selection...");
352  continue;
353  }
354  // MD: extra check to make sure - maybe not needed?
355  if ((*vtxIter)->vxTrackAtVertexAvailable()){
356 
357  std::vector<VxTrackAtVertex> vtxTracks = (*vtxIter)->vxTrackAtVertex();
358  m_allTracksVector.emplace_back(*vtxIter,vtxTracks);
359  }
360  else {
361  ATH_MSG_DEBUG("this vertex did not pass the vxTrackAtVertexAvailable() call...");
362  continue;
363  }
364  }
365  }
366  }
367  }
368  ATH_MSG_DEBUG("m_allTracksVector size: "<<m_allTracksVector.size());
369 }
370 
371 
373 
374  const xAOD::Vertex* findVxCandidate = nullptr;
375  //VxTrackAtVertex* findVxTrack = 0;
376 
377  std::vector< std::pair< const xAOD::Vertex*, std::vector<VxTrackAtVertex> > >::const_iterator iter = m_allTracksVector.begin();
378  std::vector< std::pair< const xAOD::Vertex*, std::vector<VxTrackAtVertex> > >::const_iterator iterEnd = m_allTracksVector.end();
379 
380  for(; iter != iterEnd; ++iter){
381  std::pair< const xAOD::Vertex*, std::vector<VxTrackAtVertex> > thisPair = *iter;
382  //ATH_MSG_DEBUG(" this VxCandidate* and vector<VxTrackAtVertex*>* Pair: "<< *(thisPair.first));
383 
384  std::vector<VxTrackAtVertex>::iterator iVxTrackBegin = (thisPair.second).begin();
385  std::vector<VxTrackAtVertex>::iterator iVxTrackEnd = (thisPair.second).end();
387 
388  std::vector<VxTrackAtVertex>::iterator findResult = std::find_if(iVxTrackBegin, iVxTrackEnd, thisCompare);
389 
390  if(findResult != iVxTrackEnd){
391  ATH_MSG_DEBUG("the found VxTrackAtVertex: "<<*findResult);
392  findVxCandidate = thisPair.first;
393  //findVxTrack = findResult;
394  break;
395  }
396  }
397 
398  //if ( !(findVxCandidate && findVxTrack) )
399  // ATH_MSG_DEBUG("the track don't not belongs to any interested Vertex! ");
400 
401  return findVxCandidate;
402 }
403 
404 
406 
407  const EventContext& ctx = Gaudi::Hive::currentContext();
408  const VertexOnTrack * vot = nullptr;
409  const xAOD::Vertex* tmpVtx = nullptr;
410  const xAOD::Vertex* updatedVtx = nullptr;
411 
412  const xAOD::Vertex* findVtx = findVertexCandidate(track);
413 
414  ATH_MSG_DEBUG("findVtx in provideVotFromVertex: "<<findVtx);
415 
416  if (!( nullptr==findVtx) ) {
417  vtx = findVtx;
418 
420  updatedVtx = new xAOD::Vertex(*vtx);
421  //updatedVtx = vtx->clone(); // no clone option for xAODvertex
422  } else {
423  tmpVtx = new xAOD::Vertex(*vtx);
424  //tmpVtx = vtx->clone(); // no clone option for xAODvertex
425  updatedVtx = m_trackToVertexIPEstimatorTool->getUnbiasedVertex(track->perigeeParameters(), vtx ); // MD: new function call
426  }
427 
428 
429  if(updatedVtx){
430 
431  if(!selectUpdatedVertices(updatedVtx))
432  return vot;
433 
435  ATH_MSG_DEBUG(" updated Vertex by KalmanVertexUpdator: "<<updatedVtx);
436 
437 
439  Amg::Vector3D globPos(updatedVtx->position()); //look
440  const PerigeeSurface surface(globPos);
441  const Perigee* perigee = nullptr;
442  std::unique_ptr<const Trk::TrackParameters> tmp =
443  m_extrapolator->extrapolateTrack(ctx, *track, surface);
444  //pass ownership only if of correct type
445  if (tmp && tmp->associatedSurface().type() == Trk::SurfaceType::Perigee) {
446  perigee = static_cast<const Perigee*> (tmp.release());
447  }
448  if (!perigee) {
449  const Perigee * trackPerigee = track->perigeeParameters();
450  if ( trackPerigee && trackPerigee->associatedSurface() == surface )
451  perigee = trackPerigee->clone();
452  }
453  //if the perigee is still nonsense ...
454  if (not perigee){
455  //clean up
456  if (updatedVtx!= tmpVtx) delete updatedVtx;
457  delete tmpVtx;
458  //WARNING
459  ATH_MSG_WARNING("Perigee is nullptr in "<<__FILE__<<":"<<__LINE__);
460  //exit
461  return vot;
462  }
463 
464  // create the Jacobian matrix from Cartisian to Perigee
465  AmgMatrix(2,3) Jacobian;
466  Jacobian.setZero();
467  //perigee is dereferenced here, must not be nullptr!
468  double ptInv = 1./perigee->momentum().perp();
469  Jacobian(0,0) = -ptInv*perigee->momentum().y();
470  Jacobian(0,1) = ptInv*perigee->momentum().x();
471  Jacobian(1,2) = 1.0;
472 
473  ATH_MSG_DEBUG(" Jacobian matrix from Cartesian to Perigee: "<< Jacobian);
474 
475  AmgSymMatrix(3) vtxCov = updatedVtx->covariancePosition(); // MD: that was NULL before?
476  //std::cout << " before PV scaling : "<< vtxCov << std::endl;
477 
479  //std::cout << " after PV scaling : "<< vtxCov << std::endl;
480 
481  Amg::MatrixX errorMatrix;
483  AmgSymMatrix(3) tmpCov;
484  tmpCov.setZero();
485  tmpCov(0,0) = 1.e-10 ;
486  tmpCov(1,1) = 1.e-10;
487  tmpCov(2,2) = 1.e-10;
488  errorMatrix = Amg::MatrixX( tmpCov.similarity(Jacobian) );
489  } else {
490  errorMatrix = Amg::MatrixX( vtxCov.similarity(Jacobian) );
491  }
492  delete perigee;
493 
494  // in fact, in most of the normal situation, pointer tmpVtx and updatedVtx are the same. You can check the source code
495  // But for safety, I would like to delete them seperately
496  // sroe(2016.09.23): This would result in an illegal double delete, if they really point to the same thing!
497  // http://stackoverflow.com/questions/9169774/what-happens-in-a-double-delete
498  if (tmpVtx != updatedVtx){
499  delete updatedVtx;
500  }
501  delete tmpVtx;
502  tmpVtx=nullptr;
503  updatedVtx=nullptr;
504 
506 
507  // VertexOnTrack Object
508  vot = new VertexOnTrack(std::move(localParams), std::move(errorMatrix), surface);
509  ATH_MSG_DEBUG("the VertexOnTrack created from vertex: "<<*vot);
510  }
511  }
512 
513  return vot;
514 
515 }
516 
517 
519 
520  const EventContext& ctx = Gaudi::Hive::currentContext();
521  const VertexOnTrack * vot = nullptr;
523  Amg::Vector3D bpos = beamSpotHandle->beamPos();
524  ATH_MSG_DEBUG("beam spot: "<<bpos);
525  float beamSpotX = bpos.x();
526  float beamSpotY = bpos.y();
527  float beamSpotZ = bpos.z();
528  float beamTiltX = beamSpotHandle->beamTilt(0);
529  float beamTiltY = beamSpotHandle->beamTilt(1);
530  float beamSigmaX = m_BSScalingFactor * beamSpotHandle->beamSigma(0);
531  float beamSigmaY = m_BSScalingFactor * beamSpotHandle->beamSigma(1);
532  //float beamSigmaZ = m_scalingFactor * beamSpotHandle->beamSigma(2);
533 
534  ATH_MSG_DEBUG("running refit with beam-spot");
535 
536 
537  float z0 = track->perigeeParameters()->parameters()[Trk::z0];
538  float beamX = beamSpotX + std::tan(beamTiltX) * (z0-beamSpotZ);
539  float beamY = beamSpotY + std::tan(beamTiltY) * (z0-beamSpotZ);
540  Amg::Vector3D BSC(beamX, beamY, z0);
541  ATH_MSG_DEBUG("constructing beam point (x,y,z) = ( "<<beamX<<" , "<<beamY<<" , "<<z0<<" )");
542  std::optional<PerigeeSurface> surface = std::nullopt;
543  Amg::MatrixX errorMatrix;
544  LocalParameters beamSpotParameters;
545 
546  // covariance matrix of the beam-spot
547  AmgSymMatrix(2) beamSpotCov;
548  beamSpotCov.setZero();
549  beamSpotCov(0,0) = beamSigmaX * beamSigmaX;
550  beamSpotCov(1,1) = beamSigmaY * beamSigmaY;
551 
552  if(m_constraintMode == 0) {
553 
554  const Amg::Vector3D& globPos(BSC);
555  surface.emplace(globPos);
556 
557  // create a measurement for the beamspot
558  DefinedParameter Par0(0.,Trk::d0);
559  beamSpotParameters = LocalParameters(Par0);
560 
561  // calculate perigee parameters wrt. beam-spot
562  const Perigee* perigee = nullptr;
563  std::unique_ptr<const Trk::TrackParameters> tmp =
564  m_extrapolator->extrapolateTrack(ctx, *track, *surface);
565  // pass ownership only if of correct type
566  if (tmp && tmp->associatedSurface().type() == Trk::SurfaceType::Perigee) {
567  perigee = static_cast<const Perigee*>(tmp.release());
568  }
569 
570  if (!perigee) {
571  const Perigee * trackPerigee = track->perigeeParameters();
572  if ( trackPerigee && trackPerigee->associatedSurface() == *surface )
573  perigee = trackPerigee->clone();
574  }
575  if (not perigee){
576  //WARNING
577  ATH_MSG_WARNING("Perigee is nullptr in "<<__FILE__<<":"<<__LINE__);
578  //exit
579  return vot;
580  }
581 
582  Eigen::Matrix<double,1,2> jacobian;
583  jacobian.setZero();
584  //perigee is dereferenced here, must not be nullptr
585  double ptInv = 1./perigee->momentum().perp();
586  jacobian(0,0) = -ptInv * perigee->momentum().y();
587  jacobian(0,1) = ptInv * perigee->momentum().x();
588 
589  // MD: changed -> reversed order of matrix multiplication
590  errorMatrix = Amg::MatrixX( jacobian*(beamSpotCov*jacobian.transpose()));
591  if( errorMatrix.cols() != 1 )
592  ATH_MSG_FATAL("Similarity transpose done incorrectly");
593  delete perigee;
594  }
595  if (surface){
596  vot = new VertexOnTrack(std::move(beamSpotParameters),
597  std::move(errorMatrix),
598  *surface);
599  } else {
600  ATH_MSG_WARNING("surface is nullptr in "<<__FILE__<<":"<<__LINE__);
601  }
602  if (vot){
603  ATH_MSG_DEBUG(" the VertexOnTrack objects created from BeamSpot are " << *vot);
604  }
605 
606  return vot;
607 }
608 
609 
611 
613  Amg::Vector3D bpos = beamSpotHandle->beamPos();
614  ATH_MSG_DEBUG("beam spot: "<<bpos);
615  float beamSpotX = bpos.x();
616  float beamSpotY = bpos.y();
617  float beamSpotZ = bpos.z();
618  float beamTiltX = beamSpotHandle->beamTilt(0);
619  float beamTiltY = beamSpotHandle->beamTilt(1);
620  float beamSigmaX = m_BSScalingFactor * beamSpotHandle->beamSigma(0);
621  float beamSigmaY = m_BSScalingFactor * beamSpotHandle->beamSigma(1);
622  float beamSigmaZ = m_BSScalingFactor * beamSpotHandle->beamSigma(2);
623 
624 
625  float z0 = b->originalPosition()->z();
626  (*v)(0) = beamSpotX + std::tan(beamTiltX) * (z0-beamSpotZ);
627  (*v)(1) = beamSpotY + std::tan(beamTiltY) * (z0-beamSpotZ);
628  (*v)(2) = beamSpotZ;
629  (*q)(0,0) = beamSigmaX*beamSigmaX;
630  (*q)(1,1) = beamSigmaY*beamSigmaY;
631  (*q)(2,2) = beamSigmaZ*beamSigmaZ;
632 
633  ATH_MSG_DEBUG("VTX constraint point (x,y,z) = ( "<< (*v)[0] <<" , "<< (*v)[1] <<" , "<< (*v)[2] <<" )");
634  ATH_MSG_DEBUG("VTX constraint size (x,y,z) = ( "<< beamSigmaX <<" , "<< beamSigmaY <<" , "<< beamSigmaZ <<" )");
635 }
636 
637 const Track*
639  ToolHandle<Trk::IGlobalTrackFitter>& fitter,
640  const Track* track,
641  const VertexOnTrack* vot,
642  const ParticleHypothesis& particleHypothesis) const
643 {
644  const EventContext& ctx = Gaudi::Hive::currentContext();
645  const Track* newTrack = nullptr;
646 
647  if(vot){
648 
649  std::vector<const MeasurementBase *> measurementCollection;
650  measurementCollection.push_back(vot);
651  // add all other measurements
652  DataVector<const MeasurementBase>::const_iterator imeas = track->measurementsOnTrack()->begin();
653  DataVector<const MeasurementBase>::const_iterator imeas_end = track->measurementsOnTrack()->end();
654  for ( ; imeas != imeas_end ; ++imeas) measurementCollection.push_back(*imeas);
655 
657  // get track parameters at the vertex:
658  const PerigeeSurface& surface=vot->associatedSurface();
659  ATH_MSG_DEBUG(" Track reference surface will be: " << surface);
660  const TrackParameters* parsATvertex=m_extrapolator->extrapolateTrack(ctx, *track, surface).release();
661 
662  ATH_MSG_DEBUG(" Track will be refitted at this surface ");
663  newTrack = (fitter->fit(ctx, measurementCollection,
664  *parsATvertex, m_runOutlierRemoval, particleHypothesis)).release();
665  delete parsATvertex;
666  } else {
667  newTrack = (fitter->fit(ctx,
668  measurementCollection, *(track->trackParameters()->front()),
669  m_runOutlierRemoval, particleHypothesis)).release();
670  }
671  // delete vot;
672  }
673 
674  return newTrack;
675 }
676 
678 
679  const xAOD::VertexContainer* vertices = nullptr;
680  const xAOD::Vertex* vertex = nullptr;
681  bool haveVertex = false;
682 
683  // retrieve the primary vertex if needed
685 
686  if(evtStore()->retrieve( vertices, m_PVContainerName ).isFailure()) {
687  msg(MSG::ERROR)<<"Cannot retrieve the \'"<<m_PVContainerName<<"\' vertex collection from StoreGate"<<endmsg;
689  } else {
690  // if there is no vertex, we can't associate the tracks to it
691  if(vertices) {
692  ATH_MSG_DEBUG("Primary vertex collection for this event has "<<vertices->size()<<" vertices");
693  if (vertices->size()<2){
694  ATH_MSG_DEBUG("Only Dummy vertex present, no Primary vertices.");
695  } else {
696  vertex = (*vertices)[0];
697  haveVertex = true;
698  }
699  }
700  else
701  ATH_MSG_DEBUG("Could not retrieve primary vertex collection from the StoreGate");
702  }
703  }
704 
705 
706  if( ( m_doAssociatedToPVSelection && haveVertex && vertex && isAssociatedToPV(track,vertices) ) ||
707  ( m_doBSTrackSelection && m_BSTrackSelector->accept(*track) ) ){
708 
709  if (m_maxPt > 0 )
710  {
711  const Trk::Perigee* perigee = track->perigeeParameters();
712  if (!perigee) {
713  ATH_MSG_DEBUG("NO perigee on this track");
714  return false;
715  }
716  const double qoverP = perigee->parameters()[Trk::qOverP] * 1000.;
717  double pt = 0.;
718  if (qoverP != 0 )
719  pt = std::abs(1.0/qoverP)*sin(perigee->parameters()[Trk::theta]);
720  ATH_MSG_DEBUG( " pt : "<< pt );
721  if (pt > m_maxPt)
722  return false;
723  } //maxPt selection
724  ATH_MSG_DEBUG("this track passes the beamspot track selection, will do beamspot constraint on it ");
725  return true;
726  }
727  else return false;
728 }
729 
730 
732 
733  AlignTrack * alignTrack = nullptr;
734  const Track* newTrack = nullptr;
735  const VertexOnTrack* vot = nullptr;
736  const xAOD::Vertex* vtx = nullptr;
738  // configuration of the material effects needed for track fitter
740 
741  // initialization the GX2 track fitter
742  ToolHandle<Trk::IGlobalTrackFitter> fitter = m_trackFitter;
745 
747 
748  ATH_MSG_DEBUG( "doTrackRefit ** START ** ");
749 
751  vot = provideVotFromVertex(track, vtx);
752  if( !vot ) ATH_MSG_INFO( "VoT not found for this track! ");
753  if( !vtx ) ATH_MSG_INFO( "VTX pointer not found for this track! ");
754  if(vot){
755  newTrack = doConstraintRefit(fitter, track, vot, particleHypothesis);
757  // this track failed the PV constraint reift
758  if (!newTrack) {
760  msg(MSG::ERROR)<<"VertexConstraint track refit failed! "<<endmsg;
761  }
762  }
763  }
764 
767  if(vot){
768  newTrack = doConstraintRefit(fitter, track, vot, particleHypothesis);
770  // this track failed the BS constraint reift
771  if (!newTrack) {
773  msg(MSG::ERROR)<<"BSConstraint track refit failed! "<<endmsg;
774  }
775  }
776  }
777 
778 
779  //Refit to get full fitter covariance matrix
780  // @TODO This is a little inefficienct and should
781  // be addressed when the alignment code is made MT safe
782  if(newTrack){
783  Trk::Track* tmpTrk = fitter->alignmentFit(alignCache,*newTrack,m_runOutlierRemoval,particleHypothesis);
784  delete newTrack;
785  newTrack = tmpTrk;
786  if(!tmpTrk){
788  {
790  ATH_MSG_ERROR("VertexConstraint track refit2 failed! ");
792  {
794  ATH_MSG_ERROR("BSConstraint track refit2 failed! ");
795  }
796  }
797  }
798 
799  if(!newTrack && m_doNormalRefit){
800  newTrack = fitter->alignmentFit(alignCache,*track,m_runOutlierRemoval,particleHypothesis);
802  // this track failed the normal reift
803  if (!newTrack) {
805  msg(MSG::ERROR)<<"Normal track refit failed! "<<endmsg;
806  }
807  }
808 
809 
810 
811 
812 
813  if(newTrack) {
814  alignTrack = new AlignTrack(*newTrack);
815  // set original track pointer
816  alignTrack->setOriginalTrack(track);
817  // set the refit type
818  alignTrack->setType(type);
819 
820 
822  msg(MSG::DEBUG)<<"before refit: "<<endmsg;
823  msg(MSG::DEBUG)<< *track <<endmsg;
825 
826  msg(MSG::DEBUG)<<"after refit: "<<endmsg;
827  msg(MSG::DEBUG)<< *newTrack <<endmsg;
829  }
830 
832 
833  if (m_storeFitMatrices) {
834  alignTrack->setFullCovarianceMatrix(alignCache.m_fullCovarianceMatrix);
835  alignTrack->setDerivativeMatrix(alignCache.m_derivMatrix);
836  }
837  delete newTrack;
838 
839  if( m_doFullVertexConstraint && vtx!=nullptr && type == AlignTrack::VertexConstrained ){
840  // try to log the track-vertex association in the AlignVertex object:
841  bool ifound=false;
842  for (AlignVertex* ivtx : m_AlignVertices) {
843  if( (ivtx->originalVertex())==vtx ) {
844  ifound = true;
845  }
846  }
847  if( !ifound ) {
848  AlignVertex* avtx=new AlignVertex(vtx);
849  ATH_MSG_DEBUG(" New AlignVertex has ben created.");
850 
851  // Beam Spot constraint on the vertex:
852  if( m_doBeamspotConstraint && (xAOD::VxType::PriVtx == vtx->vertexType() || xAOD::VxType::PileUp == vtx->vertexType()) && vtx->vxTrackAtVertex().size()>4 ) { // a beam line verex
853  ATH_MSG_DEBUG(" The Beam Spot constraint will be added to the vertex.." );
854  AmgSymMatrix(3) qtemp;
855  AmgVector(3) vtemp;
856  provideVtxBeamspot(avtx, &qtemp, &vtemp);
857  (qtemp)(2,2) = 1000000.0; // disable Z constraint
858  avtx->setConstraint( &qtemp, &vtemp);
859  }
860 
861  m_AlignVertices.push_back(avtx);
862  }
863  }
864  // increment counters
866  ++m_nTracks;
867 
868  }
869  // garbage collection:
870  if(vot) delete vot;
871 
872  ATH_MSG_DEBUG( "doTrackRefit ** COMPLETED ** ");
873  return alignTrack;
874 }
875 
876 
877 
878 
879 //____________________________________________________________________________
881 {
882  ATH_MSG_DEBUG("BeamspotVertexPreProcessor::processTrackCollection()");
883 
884  if( !tracks || (tracks->empty()) )
885  return nullptr;
886 
887  // Clear the AlignVertex container (will destruct the objects it owns as well!)
888  m_AlignVertices.clear();
889 
890 
893 
894  // the output collection of AlignTracks
895  // we define it as collection of Tracks but fill AlignTracks inside
896  DataVector<Track> * newTrks = new DataVector<Track>;
897 
898  int index(0);
899  // loop over tracks
900  TrackCollection::const_iterator itr = tracks->begin();
901  TrackCollection::const_iterator itr_end = tracks->end();
902 
903  ATH_MSG_DEBUG( "Starting loop on input track collection: "<<index);
904  for ( ; itr != itr_end; ++itr, ++index) {
905  ATH_MSG_DEBUG("Processing track "<<index);
906  const Track* track = *itr;
907  AlignTrack * alignTrack = nullptr;
908  if (not track) continue;
909 
910  // check whether the track passes the basic selection
911  if (m_doTrkSelection) {
912  ATH_MSG_DEBUG( "Testing track selection on track: "<<index);
913  if ((not m_trkSelector.empty()) and (not m_trkSelector->accept(*track))) continue;
914  } // appliying track selection
915 
916  if(m_refitTracks){
917  ATH_MSG_DEBUG( "Refitting track: "<<index );
918  alignTrack = doTrackRefit(track);
919 
920  // 2nd track check after refit
921  if(alignTrack && !m_trkSelector.empty()) {
922  // refitted track loses the summary information, restoring it here
923  alignTrack->setTrackSummary( std::make_unique<Trk::TrackSummary> (*track->trackSummary()) );
924  // do not check for FullVertex tracks:
925  if( !(alignTrack->getVtx()) ) {
926  if( m_doTrkSelection && !m_trkSelector->accept(*alignTrack))
927  continue;
928  }
929  }
930  else {
931  ATH_MSG_DEBUG( "Refit of track " << index << " ended with no alignTrack" );
932  }
933  } else {
934  ATH_MSG_DEBUG( "No Track refit for track " << index << " --> building new aligntrack");
935  alignTrack = new AlignTrack(*track);
936  alignTrack->setOriginalTrack(track);
937  alignTrack->setType(AlignTrack::Original);
938  }
939  // add the new align track to the collection
940  if (alignTrack) newTrks->push_back(alignTrack);
941  } // end of loop over tracks
942 
943  ATH_MSG_INFO( "Processing of input track collection completed (size: " << tracks->size() << "). Size of the alignTrack collection: " << newTrks->size() );
944  // delete the collection if it's empty
945  if (newTrks->empty()) {
946  delete newTrks;
947  return nullptr;
948  }
949 
950  return newTrks;
951 }
952 
953 //____________________________________________________________________________
955 
956  if( !m_doFullVertexConstraint ) return;
957 
958  AlignVertex* alignVertex = alignTrack->getVtx();
959 
960  ATH_MSG_DEBUG( " In accumulateVTX ");
961  if( !alignVertex ) {
962  ATH_MSG_DEBUG( "This alignTrack is not associated to any vertex -> return. ");
963  return;
964  }
965 
966  // get pointers so we can reuse them if they're valid
967  const Amg::MatrixX * ptrWeights = alignTrack->weightMatrix();
968  const Amg::MatrixX * ptrWeightsFD = alignTrack->weightMatrixFirstDeriv();
969  const Amg::VectorX * ptrResiduals = alignTrack->residualVector();
970  const std::vector<AlignModuleDerivatives> * ptrDerivs = alignTrack->derivatives();
971 
972  // check if pointers are valid
973  if (!ptrWeights || !ptrWeightsFD || !ptrResiduals || !ptrDerivs) {
974  msg(MSG::ERROR)<<"something missing from alignTrack!"<<endmsg;
975  if (!ptrWeights) msg(MSG::ERROR)<<"no weights!"<<endmsg;
976  if (!ptrWeightsFD) msg(MSG::ERROR)<<"no weights for first deriv!"<<endmsg;
977  if (!ptrResiduals) msg(MSG::ERROR)<<"no residuals!"<<endmsg;
978  if (!ptrDerivs) msg(MSG::ERROR)<<"no derivatives!"<<endmsg;
979  return;
980  }
981 
982  // get vectors
983  const Amg::VectorX& residuals = *ptrResiduals;
984  std::vector<AlignModuleDerivatives> derivatives = *ptrDerivs;
985 
986  // get weight matrices
987  const Amg::MatrixX& weights = *ptrWeights;
988  const Amg::MatrixX& weightsFirstDeriv = *ptrWeightsFD;
989  ATH_MSG_VERBOSE("weights="<<weights);
990  ATH_MSG_VERBOSE("weightsFirstDeriv="<<weightsFirstDeriv);
991 
992  // get all alignPars and all derivatives
993  ATH_MSG_DEBUG("accumulateVTX: The derivative vector size is " << derivatives.size() );
994  std::vector<AlignModuleDerivatives>::iterator derivIt = derivatives.begin();
995  std::vector<AlignModuleDerivatives>::iterator derivIt_end = derivatives.end();
996 
997  std::vector<Amg::VectorX*> allDerivatives[3];
998  // CLHEP::HepVector* VTXDerivatives[3];
999  Amg::VectorX VTXDerivatives[3];
1000  const int WSize(weights.cols());
1001  Amg::MatrixX WF(3,WSize);
1002  std::vector<AlignModuleVertexDerivatives> derivX;
1003 
1004  for ( ; derivIt!=derivIt_end ; ++derivIt) {
1005 
1006  // get AlignModule
1007  const AlignModule* module=derivIt->first;
1008 
1009 
1010  // get alignment parameters
1011  if( module ) {
1012  Amg::MatrixX F(3,WSize);
1013  std::vector<Amg::VectorX>& deriv_vec = derivIt->second;
1014  ATH_MSG_VERBOSE( "accumulateVTX: The deriv_vec size is " << deriv_vec.size() );
1015  DataVector<AlignPar>* alignPars = m_alignModuleTool->getAlignPars(module);
1016  int nModPars = alignPars->size();
1017  if ((nModPars+3) != (int)deriv_vec.size() ) {
1018  ATH_MSG_ERROR("accumulateVTX: Derivatives w.r.t. the vertex seem to be missing");
1019  return;
1020  }
1021  for (int i=0;i<3;i++) {
1022  allDerivatives[i].push_back(&deriv_vec[nModPars+i]);
1023  for (int j=0;j<WSize;j++) {
1024  F(i,j) = deriv_vec[nModPars+i][j];
1025  }
1026  }
1027 
1028  // prepare the X object in the AlignVertex:
1029  WF += F * weights;
1030 
1031  } else {
1032  ATH_MSG_ERROR("accumulateVTX: Derivatives do not have a valid pointer to the module.");
1033  return;
1034  }
1035  }
1036 
1037 
1038  // second loop to fill the X object:
1039  derivIt = derivatives.begin();
1040  for ( ; derivIt!=derivIt_end ; ++derivIt) {
1041 
1042  // get AlignModule
1043  const AlignModule* module=derivIt->first;
1044 
1045 
1046  // get alignment parameters
1047  if( module ) {
1048  std::vector<Amg::VectorX>& deriv_vec = derivIt->second;
1049  std::vector<Amg::VectorX> drdaWF;
1050  ATH_MSG_DEBUG("accumulateVTX: The deriv_vec size is "
1051  << deriv_vec.size());
1052  DataVector<AlignPar>* alignPars = m_alignModuleTool->getAlignPars(module);
1053  int nModPars = alignPars->size();
1054  if ((nModPars + 3) != (int)deriv_vec.size()) {
1055  ATH_MSG_ERROR(
1056  "accumulateVTX: Derivatives w.r.t. the vertex seem to be missing");
1057  return;
1058  }
1059  drdaWF.reserve(nModPars);
1060  for (int i = 0; i < nModPars; i++) {
1061  drdaWF.emplace_back(2.0 * (WF)*deriv_vec[i]);
1062  }
1063  ATH_MSG_DEBUG("accumulateVTX: derivX incremented by: " << drdaWF);
1064  // now add contribution from this track to the X object:
1065  derivX.emplace_back(module,std::move(drdaWF));
1066 
1067  } else {
1068  ATH_MSG_ERROR("accumulateVTX: Derivatives do not have a valid pointer to the module.");
1069  return;
1070  }
1071  }
1072 
1073 
1074 
1075  // prepare derivatives w.r.t. the vertex position:
1076  int nmodules = allDerivatives[0].size();
1077  msg(MSG::DEBUG) << "accumulateVTX: allDerivatives size is " << nmodules << endmsg;
1078  for( int ii=0; ii<3; ++ii ) {
1079  VTXDerivatives[ii] = (*(allDerivatives[ii])[0]);
1080  for( int jj=1; jj<nmodules; ++jj ) {
1081  VTXDerivatives[ii] += (*(allDerivatives[ii])[jj]);
1082  }
1083  }
1084 
1085 
1086  AmgVector(3) vtxV;
1087  AmgSymMatrix(3) vtxM;
1088 
1089  Amg::VectorX RHM= weightsFirstDeriv * residuals;
1090  ATH_MSG_DEBUG("RHM: "<<RHM);
1091 
1092  for (int ipar=0;ipar<3;ipar++) {
1093 
1094  // calculate first derivative
1095  // CLHEP::HepMatrix derivativesT = (*(VTXDerivatives[ipar])).T();
1096  Amg::MatrixX derivativesT = (VTXDerivatives[ipar]).transpose();
1097  ATH_MSG_DEBUG("derivativesT (size "<<derivativesT.cols()<<"): "<<derivativesT);
1098 
1099  Amg::MatrixX tempV = (2.* derivativesT * RHM);
1100  vtxV[ipar] = tempV(0,0);
1101 
1102  for (int jpar=ipar;jpar<3;jpar++) {
1103 
1104  // calculate second derivatives
1105  Amg::MatrixX RHM2 = weights * (VTXDerivatives[jpar]);
1106 
1107  Amg::MatrixX tempM = (2.* derivativesT * RHM2);
1108  vtxM(ipar,jpar) = tempM(0,0);
1109 
1110  }
1111 
1112  }
1113 
1114  // increment the vtx algebra objects:
1115 
1116  alignVertex->incrementVector(vtxV);
1117  alignVertex->incrementMatrix(vtxM);
1118  // ATH_MSG_DEBUG("accumulateVTX: derivX size = "<< derivX->size());
1119  alignVertex->addDerivatives(&derivX);
1120 
1121 }
1122 
1123 
1124 //____________________________________________________________________________
1126 
1128  ATH_MSG_DEBUG("In solveVTX. Number of vertices = " << m_AlignVertices.size() );
1129  for (AlignVertex* ivtx : m_AlignVertices) {
1130  if( ivtx->Ntracks()>1 ) {
1131  ivtx->fitVertex();
1132  } else {
1133  msg(MSG::WARNING) << "This vertex contains " << ivtx->Ntracks() << " tracks. No solution possible." <<endmsg;
1134  }
1135 
1136  ATH_MSG_DEBUG( "This vertex contains " << ivtx->Ntracks() << " tracks.");
1137  if( msgLvl(MSG::DEBUG) ) ivtx->dump(msg(MSG::DEBUG));
1138  }
1139  }
1140 }
1141 
1142 //____________________________________________________________________________
1144 {
1145  if(m_logStream) {
1146 
1147  *m_logStream<<"*************************************************************"<<std::endl;
1148  *m_logStream<<"****** BeamspotVertexPreProcessor summary ******"<<std::endl;
1149  *m_logStream<<"*"<<std::endl;
1150  *m_logStream<<"* number of created AlignTracks : "<<m_nTracks<<std::endl;
1151  if(m_nTracks>0) {
1152  *m_logStream<<"* --------------------------------------------"<<std::endl;
1153  for(int i=0; i<AlignTrack::NTrackTypes; ++i) {
1154  if(m_trackTypeCounter[i]>0)
1155  *m_logStream<<"* "<<(AlignTrack::AlignTrackType)i<<": "<<m_trackTypeCounter[i]<<std::endl;
1156  }
1157  }
1158  *m_logStream<<"*"<<std::endl;
1159  *m_logStream<<"* number of failed normal refits : " << m_nFailedNormalRefits << std::endl;
1160  *m_logStream<<"* number of failed refits with primary vertex : " << m_nFailedPVRefits << std::endl;
1161  *m_logStream<<"* number of failed refits with beam-spot : " << m_nFailedBSRefits << std::endl;
1162  *m_logStream<<"*"<<std::endl;
1163  }
1164 }
1165 
1166 //____________________________________________________________________________
1168 {
1169  ATH_MSG_INFO("BeamspotVertexPreProcessor::finalize()");
1170 
1171  return StatusCode::SUCCESS;
1172 }
1173 
1174 //____________________________________________________________________________
1175 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LinkToTrack.h
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::AlignVertex
Definition: AlignVertex.h:39
Trk::BeamspotVertexPreProcessor::m_storeFitMatrices
bool m_storeFitMatrices
flag to store derivative and covariance matrices after refit
Definition: BeamspotVertexPreProcessor.h:134
Trk::AmgMatrix
AmgMatrix(3, 3) NeutralParticleParameterCalculator
Definition: NeutralParticleParameterCalculator.cxx:233
Trk::BeamspotVertexPreProcessor::m_maxPt
double m_maxPt
Max pT range for refitting tracks.
Definition: BeamspotVertexPreProcessor.h:131
Trk::BeamspotVertexPreProcessor::m_interestedVertexContainers
std::vector< std::string > m_interestedVertexContainers
Definition: BeamspotVertexPreProcessor.h:124
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::AlignTrack::setOriginalTrack
void setOriginalTrack(const Track *track)
set pointer to original track
Definition: AlignTrack.h:93
Trk::BeamspotVertexPreProcessor::m_compareMethod
std::string m_compareMethod
the method used to judge whether two tracks are the same track
Definition: BeamspotVertexPreProcessor.h:123
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
Trk::BeamspotVertexPreProcessor::m_doBeamspotConstraint
bool m_doBeamspotConstraint
do beamspot constraint
Definition: BeamspotVertexPreProcessor.h:126
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::BeamspotVertexPreProcessor::solveVTX
void solveVTX()
Definition: BeamspotVertexPreProcessor.cxx:1125
TrackParameters.h
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::BeamspotVertexPreProcessor::m_refitTracks
bool m_refitTracks
flag to refit tracks
Definition: BeamspotVertexPreProcessor.h:133
MeasurementBase.h
Trk::BeamspotVertexPreProcessor::m_AlignVertices
DataVector< AlignVertex > m_AlignVertices
collection of AlignVertices used in FullVertex constraint option
Definition: BeamspotVertexPreProcessor.h:146
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Trk::BeamspotVertexPreProcessor::isAssociatedToPV
bool isAssociatedToPV(const Track *track, const xAOD::VertexContainer *vertices)
Definition: BeamspotVertexPreProcessor.cxx:295
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::IGlobalTrackFitter::AlignmentCache::m_derivMatrix
Amg::MatrixX * m_derivMatrix
access to the matrix of derivatives used during the latest global-chi2 track fit.
Definition: IGlobalTrackFitter.h:42
PerigeeSurface.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::BeamspotVertexPreProcessor::m_trackToVertexIPEstimatorTool
ToolHandle< ITrackToVertexIPEstimator > m_trackToVertexIPEstimatorTool
Definition: BeamspotVertexPreProcessor.h:106
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
Trk::BeamspotVertexPreProcessor::m_particleNumber
int m_particleNumber
type of material interaction in extrapolation
Definition: BeamspotVertexPreProcessor.h:116
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::AlignVertex::incrementMatrix
void incrementMatrix(const AmgSymMatrix(3) vtxM)
Definition: AlignVertex.h:105
Trk::BeamspotVertexPreProcessor::m_doBSTrackSelection
bool m_doBSTrackSelection
the selection mechanism which is based on cutting the perigee parameters, pt, etc.
Definition: BeamspotVertexPreProcessor.h:118
TrackParticleBase.h
Trk::BeamspotVertexPreProcessor::m_BSScalingFactor
double m_BSScalingFactor
scaling factor on beasmpot width
Definition: BeamspotVertexPreProcessor.h:136
Trk::BeamspotVertexPreProcessor::m_selectVertices
bool m_selectVertices
do vertex selection
Definition: BeamspotVertexPreProcessor.h:115
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
Trk::AlignTrack::Unknown
@ Unknown
default type
Definition: AlignTrack.h:46
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Trk::BeamspotVertexPreProcessor::provideVotFromBeamspot
const VertexOnTrack * provideVotFromBeamspot(const Track *track) const
Definition: BeamspotVertexPreProcessor.cxx:518
Trk::BeamspotVertexPreProcessor::provideVtxBeamspot
void provideVtxBeamspot(const AlignVertex *b, AmgSymMatrix(3) *q, Amg::Vector3D *v) const
Definition: BeamspotVertexPreProcessor.cxx:610
Trk::AlignModule
Definition: AlignModule.h:45
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
Trk::AlignTrack::weightMatrixFirstDeriv
const Amg::SymMatrixX * weightMatrixFirstDeriv() const
First deriv weight matrix can be either W from Si alignment (see Eqn.
Definition: AlignTrack.h:161
Trk::z0
@ z0
Definition: ParamDefs.h:64
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
IExtrapolator.h
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
Trk::BeamspotVertexPreProcessor::accumulateVTX
void accumulateVTX(AlignTrack *alignTrack)
methods added for the full VTX fit:
Definition: BeamspotVertexPreProcessor.cxx:954
Trk::BeamspotVertexPreProcessor::m_doNormalRefit
bool m_doNormalRefit
provide tracks in the case failed BS, PV and FullVertex constraints.
Definition: BeamspotVertexPreProcessor.h:129
Trk::IAlignTrackPreProcessor::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IAlignTrackPreProcessor.h:66
Trk::BeamspotVertexPreProcessor::m_trkSelector
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkSelector
new track selector tool
Definition: BeamspotVertexPreProcessor.h:102
Trk::VxTrackAtVertex::trackOrParticleLink
const ITrackLink * trackOrParticleLink(void) const
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::AlignTrack::AlignTrackType
AlignTrackType
Definition: AlignTrack.h:45
Trk::AlignTrack::isSLTrack
bool isSLTrack() const
method to determine whether a straight line track or not
Definition: AlignTrack.cxx:263
Trk::BeamspotVertexPreProcessor::m_allTracksVector
std::vector< std::pair< const xAOD::Vertex *, std::vector< VxTrackAtVertex > > > m_allTracksVector
Definition: BeamspotVertexPreProcessor.h:125
Trk::BeamspotVertexPreProcessor::doConstraintRefit
const Track * doConstraintRefit(ToolHandle< IGlobalTrackFitter > &fitter, const Track *track, const VertexOnTrack *vot, const ParticleHypothesis &particleHypothesis) const
Definition: BeamspotVertexPreProcessor.cxx:638
LArSamples::ShapeFitter::fit
bool fit(const LArSamples::AbsShape &data, const AbsShape &reference, double &k, double &deltaT, double &chi2, const ScaledErrorData *sed=0) const
Definition: ShapeFitter.cxx:32
Trk::BeamspotVertexPreProcessor::m_doPrimaryVertexConstraint
bool m_doPrimaryVertexConstraint
do vertex constraint
Definition: BeamspotVertexPreProcessor.h:127
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
BeamspotVertexPreProcessor.h
Trk::BeamspotVertexPreProcessor::provideVotFromVertex
const VertexOnTrack * provideVotFromVertex(const Track *track, const xAOD::Vertex *&vtx) const
Definition: BeamspotVertexPreProcessor.cxx:405
Trk::AlignTrack::setFullCovarianceMatrix
void setFullCovarianceMatrix(const Amg::SymMatrixX *matrix)
Definition: AlignTrack.h:274
Trk::IGlobalTrackFitter::AlignmentCache::m_fullCovarianceMatrix
Amg::MatrixX * m_fullCovarianceMatrix
access to the global fitter's full covariance matrix.
Definition: IGlobalTrackFitter.h:45
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
Trk::BeamspotVertexPreProcessor::processTrackCollection
virtual DataVector< Track > * processTrackCollection(const DataVector< Track > *trks)
Main processing of track collection.
Definition: BeamspotVertexPreProcessor.cxx:880
Trk::BeamspotVertexPreProcessor::m_nFailedPVRefits
int m_nFailedPVRefits
Definition: BeamspotVertexPreProcessor.h:144
CxxUtils::fpcompare::equal
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:114
Track.h
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
Trk::BeamspotVertexPreProcessor::m_alignModuleTool
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignModuleTool.
Definition: BeamspotVertexPreProcessor.h:109
Trk::ParametersT::associatedSurface
virtual const S & associatedSurface() const override final
Access to the Surface method.
python.PyAthena.module
module
Definition: PyAthena.py:131
Trk::BeamspotVertexPreProcessor::m_minTrksInVtx
int m_minTrksInVtx
requirement to the minimal number of tracks in the vertex
Definition: BeamspotVertexPreProcessor.h:139
Trk::BeamspotVertexPreProcessor::m_extrapolator
ToolHandle< IExtrapolator > m_extrapolator
straight line track fitter
Definition: BeamspotVertexPreProcessor.h:100
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
AlignVertex.h
Trk::AlignTrack::derivatives
const std::vector< AlignModuleDerivatives > * derivatives() const
The Amg::VectorX is a vector of first-derivatives of the alignTSOS on the alignTrack w....
Definition: AlignTrack.h:133
Trk::AlignVertex::setConstraint
void setConstraint(AmgSymMatrix(3) *, Amg::Vector3D *)
set and get the constraint on VTX position
Definition: AlignVertex.cxx:114
Trk::CompareTwoTracks::operator()
bool operator()(VxTrackAtVertex vtxTrk)
Definition: BeamspotVertexPreProcessor.cxx:218
AlignTrack.h
Trk::IGlobalTrackFitter::AlignmentCache
Definition: IGlobalTrackFitter.h:38
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::AlignTrack::BeamspotConstrained
@ BeamspotConstrained
refitted with beamspot constraint
Definition: AlignTrack.h:49
Trk::BeamspotVertexPreProcessor::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: BeamspotVertexPreProcessor.h:111
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::CompareTwoTracks::m_method
std::string m_method
Definition: BeamspotVertexPreProcessor.h:165
Trk::theta
@ theta
Definition: ParamDefs.h:66
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
Trk::BeamspotVertexPreProcessor::m_doAssociatedToPVSelection
bool m_doAssociatedToPVSelection
the selection mechanism that only use the tracks associated to PV
Definition: BeamspotVertexPreProcessor.h:119
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
VertexOnTrack.h
TrackCollection.h
Trk::BeamspotVertexPreProcessor::m_trackTypeCounter
std::vector< int > m_trackTypeCounter
Definition: BeamspotVertexPreProcessor.h:141
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
Trk::BeamspotVertexPreProcessor::initialize
virtual StatusCode initialize()
Definition: BeamspotVertexPreProcessor.cxx:125
Trk::BeamspotVertexPreProcessor::m_doTrkSelection
bool m_doTrkSelection
to activate the preprocessor track selection
Definition: BeamspotVertexPreProcessor.h:117
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::BeamspotVertexPreProcessor::isAssociatedToVertex
bool isAssociatedToVertex(const Track *track, const xAOD::Vertex *vertex)
Definition: BeamspotVertexPreProcessor.cxx:311
VxTrackAtVertex.h
Trk::BeamspotVertexPreProcessor::prepareAllTracksVector
void prepareAllTracksVector()
Definition: BeamspotVertexPreProcessor.cxx:328
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::BeamspotVertexPreProcessor::finalize
virtual StatusCode finalize()
Definition: BeamspotVertexPreProcessor.cxx:1167
VxContainer.h
Trk::AlignTrack::getVtx
const AlignVertex * getVtx() const
set and get pointer to the associated vertex
Definition: AlignTrack.h:188
Trk::BeamspotVertexPreProcessor::m_nFailedBSRefits
int m_nFailedBSRefits
Definition: BeamspotVertexPreProcessor.h:143
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
TrackSummary.h
Trk::VertexOnTrack::associatedSurface
virtual const PerigeeSurface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: VertexOnTrack.h:117
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::BeamspotVertexPreProcessor::m_doFullVertexConstraint
bool m_doFullVertexConstraint
do GX full vertex constraint
Definition: BeamspotVertexPreProcessor.h:128
Trk::AlignTrack::residualVector
const Amg::VectorX * residualVector() const
Vector of residuals of the alignTSOS on the alignTrack, to be set by AlignTrackDresser.
Definition: AlignTrack.h:150
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Trk::BeamspotVertexPreProcessor::m_nFailedNormalRefits
int m_nFailedNormalRefits
Definition: BeamspotVertexPreProcessor.h:142
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Vertex.h
ParticleHypothesis.h
Trk::VertexOnTrack
Definition: VertexOnTrack.h:45
Trk::AlignTrack::weightMatrix
const Amg::SymMatrixX * weightMatrix() const
Weight matrix is W from Si alignment (see Eqn.
Definition: AlignTrack.h:156
LinkToTrackParticleBase.h
Trk::LinkToTrackParticleBase
Definition: LinkToTrackParticleBase.h:17
Trk::BeamspotVertexPreProcessor::m_constraintMode
unsigned int m_constraintMode
Definition: BeamspotVertexPreProcessor.h:121
VxCandidate.h
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
Trk::AlignVertex::incrementVector
void incrementVector(const Amg::Vector3D &vtxV)
increment algebra objects for this verterx:
Definition: AlignVertex.h:104
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
Trk::SurfaceType::Perigee
@ Perigee
Trk::BeamspotVertexPreProcessor::selectVertices
bool selectVertices(const xAOD::Vertex *vtx) const
Definition: BeamspotVertexPreProcessor.cxx:255
Trk::BeamspotVertexPreProcessor::BeamspotVertexPreProcessor
BeamspotVertexPreProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Definition: BeamspotVertexPreProcessor.cxx:48
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::d0
@ d0
Definition: ParamDefs.h:63
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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)
weights
Definition: herwig7_interface.h:38
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MeasurementBaseType::VertexOnTrack
@ VertexOnTrack
Definition: MeasurementBase.h:52
Trk::BeamspotVertexPreProcessor::~BeamspotVertexPreProcessor
virtual ~BeamspotVertexPreProcessor()
Trk::BeamspotVertexPreProcessor::findVertexCandidate
const xAOD::Vertex * findVertexCandidate(const Track *track) const
Definition: BeamspotVertexPreProcessor.cxx:372
Trk::AlignTrack
Definition: AlignTrack.h:41
Trk::BeamspotVertexPreProcessor::m_useSingleFitter
bool m_useSingleFitter
only use 1 fitter for refitting track
Definition: BeamspotVertexPreProcessor.h:135
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
TrackParticle.h
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:364
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::AlignTrack::Original
@ Original
not refitted, just copy constructed from original Track
Definition: AlignTrack.h:47
Trk::BeamspotVertexPreProcessor::m_trackFitter
ToolHandle< IGlobalTrackFitter > m_trackFitter
normal track fitter
Definition: BeamspotVertexPreProcessor.h:98
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::AlignTrack::NormalRefitted
@ NormalRefitted
normally refitted, without adding any pseudo-measurement
Definition: AlignTrack.h:48
Trk::BeamspotVertexPreProcessor::m_PVScalingFactor
double m_PVScalingFactor
scaling factor on primary vertex position error
Definition: BeamspotVertexPreProcessor.h:137
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::AlignTrack::doFindPerigee
void doFindPerigee() const
For the AlignTrack, if there is pseudo-measurement in the TSOS collection, the perigee will not alway...
Definition: AlignTrack.h:104
DEBUG
#define DEBUG
Definition: page_access.h:11
F
#define F(x, y, z)
Definition: MD5.cxx:112
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
IAlignModuleTool.h
Trk::BeamspotVertexPreProcessor::m_runOutlierRemoval
bool m_runOutlierRemoval
switch whether to run outlier logics or not
Definition: BeamspotVertexPreProcessor.h:114
Trk::BeamspotVertexPreProcessor::printSummary
virtual void printSummary()
Print processing summary to logfile.
Definition: BeamspotVertexPreProcessor.cxx:1143
Trk::BeamspotVertexPreProcessor::doBeamspotConstraintTrackSelection
bool doBeamspotConstraintTrackSelection(const Track *track)
Definition: BeamspotVertexPreProcessor.cxx:677
Trk::Track::setTrackSummary
void setTrackSummary(std::unique_ptr< Trk::TrackSummary > input)
Set the track summary.
Trk::AlignVertex::addDerivatives
void addDerivatives(std::vector< AlignModuleVertexDerivatives > *vec)
Definition: AlignVertex.cxx:132
extractSporadic.q
list q
Definition: extractSporadic.py:98
Trk::CompareTwoTracks
Definition: BeamspotVertexPreProcessor.h:153
Trk::AlignTrack::dumpLessTrackInfo
static void dumpLessTrackInfo(const Track &track, MsgStream &msg)
dump less track information
Definition: AlignTrack.cxx:276
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::phi
@ phi
Definition: ParamDefs.h:75
Trk::CompareTwoTracks::m_track
const Track * m_track
Definition: BeamspotVertexPreProcessor.h:166
BeamSpotData.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Trk::AlignTrack::NTrackTypes
@ NTrackTypes
total number of track types
Definition: AlignTrack.h:53
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
AthAlgTool
Definition: AthAlgTool.h:26
Trk::BeamspotVertexPreProcessor::m_PVContainerName
std::string m_PVContainerName
the name of the primary vertex container
Definition: BeamspotVertexPreProcessor.h:113
ITrackSelectorTool.h
Trk::AlignTrack::VertexConstrained
@ VertexConstrained
refitted with vertex constraint
Definition: AlignTrack.h:50
Trk::BeamspotVertexPreProcessor::m_nTracks
int m_nTracks
Definition: BeamspotVertexPreProcessor.h:140
Trk::TrackParticleBase::originalTrack
const Track * originalTrack() const
Return pointer to associated track.
Definition: TrackParticleBase.h:205
Trk::AlignTrack::setDerivativeMatrix
void setDerivativeMatrix(const Amg::MatrixX *matrix)
Definition: AlignTrack.h:269
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::BeamspotVertexPreProcessor::m_SLTrackFitter
ToolHandle< IGlobalTrackFitter > m_SLTrackFitter
Definition: BeamspotVertexPreProcessor.h:99
Trk::ParametersT::clone
virtual ParametersT< DIM, T, S > * clone() const override final
Virtual clone.
ITrackFitter.h
Trk::BeamspotVertexPreProcessor::m_BSTrackSelector
ToolHandle< InDet::IInDetTrackSelectionTool > m_BSTrackSelector
new track selector tool for tracks to be used with beam-spot constraint
Definition: BeamspotVertexPreProcessor.h:104
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
IGlobalTrackFitter.h
Trk::BeamspotVertexPreProcessor::doTrackRefit
AlignTrack * doTrackRefit(const Track *track)
Definition: BeamspotVertexPreProcessor.cxx:731
Trk::v
@ v
Definition: ParamDefs.h:78
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Trk::AlignTrack::setType
void setType(AlignTrackType type)
Definition: AlignTrack.h:97
Trk::BeamspotVertexPreProcessor::selectUpdatedVertices
bool selectUpdatedVertices(const xAOD::Vertex *updatedVtx) const
Definition: BeamspotVertexPreProcessor.cxx:273