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