ATLAS Offline Software
TrkVKalVrtFitter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Header include
7 #include "GaudiKernel/EventContext.h"
8 #include "GaudiKernel/IChronoStatSvc.h"
12 #include "TrkTrack/LinkToTrack.h"
13 #include "TrkTrack/Track.h"
19 
20 
21 //-------------------------------------------------
22 // Other stuff
23 #include<iostream>
24 
25 namespace Trk{
26 
27 
28 //
29 //Constructor--------------------------------------------------------------
31  const std::string& name,
32  const IInterface* parent):
33  base_class(type,name,parent),
34  m_Robustness(0),
35  m_RobustScale(1.),
36  m_cascadeCnstPrecision(1.e-4),
37  m_massForConstraint(-1.),
38  m_IterationNumber(0),
39  m_IterationPrecision(0),
40  m_IDsizeR(1150.),
41  m_IDsizeZ(3000.),
42  m_extPropagator(this), // Internal propagator
43  // m_extPropagator("Trk::Extrapolator/InDetExtrapolator"), // External propagator
44  m_firstMeasuredPoint(false),
45  m_firstMeasuredPointLimit(false),
46  m_makeExtendedVertex(false),
47  m_useFixedField(false),
48  m_useAprioriVertex(false),
49  m_useThetaCnst(false),
50  m_usePhiCnst(false),
51  m_usePointingCnst(false),
52  m_useZPointingCnst(false),
53  m_usePassNear(false),
54  m_usePassWithTrkErr(false),
55  m_frozenVersionForBTagging(false)
56  {
57  declareInterface<IVertexFitter>(this);
58  declareInterface<ITrkVKalVrtFitter>(this);
59  declareInterface<IVertexCascadeFitter>(this);
60 
61  m_BMAG = 1.997; /*constant ATLAS magnetic field if no exact map*/
62  m_CNVMAG = 0.29979246; /* conversion constant for MeV and MM */
63 
65  for( int i=0; i<3; i++){m_c_VertexForConstraint.push_back(0.);}
67  for( int i=0; i<6; i++){m_c_CovVrtForConstraint.push_back(0.);}
68  m_c_MassInputParticles.clear();
69 //
70  declareProperty("Robustness", m_Robustness);
71  declareProperty("RobustScale", m_RobustScale);
72  declareProperty("CascadeCnstPrecision", m_cascadeCnstPrecision);
73  declareProperty("MassForConstraint", m_massForConstraint);
74  declareProperty("IterationNumber", m_IterationNumber);
75  declareProperty("IterationPrecision", m_IterationPrecision);
76  declareProperty("IDsizeR", m_IDsizeR);
77  declareProperty("IDsizeZ", m_IDsizeZ);
78  declareProperty("VertexForConstraint", m_c_VertexForConstraint);
79  declareProperty("CovVrtForConstraint", m_c_CovVrtForConstraint);
80  declareProperty("InputParticleMasses", m_c_MassInputParticles, "List of masses of input particles (pions assumed if this list is absent)" );
81  declareProperty("Extrapolator", m_extPropagator);
82  declareProperty("useFixedField", m_useFixedField, " Use fixed magnetic field instead of exact Atlas one");
83  declareProperty("FirstMeasuredPoint", m_firstMeasuredPoint);
84  declareProperty("FirstMeasuredPointLimit", m_firstMeasuredPointLimit);
85  declareProperty("MakeExtendedVertex", m_makeExtendedVertex, "VKalVrt returns VxCandidate with full covariance matrix");
86 //
87  declareProperty("useAprioriVertexCnst", m_useAprioriVertex);
88  declareProperty("useThetaCnst", m_useThetaCnst);
89  declareProperty("usePhiCnst", m_usePhiCnst);
90  declareProperty("usePointingCnst", m_usePointingCnst);
91  declareProperty("useZPointingCnst", m_useZPointingCnst);
92  declareProperty("usePassNearCnst", m_usePassNear);
93  declareProperty("usePassWithTrkErrCnst", m_usePassWithTrkErr);
94  declareProperty("FrozenVersionForBTagging", m_frozenVersionForBTagging);
95 //
96 
97 /*--------------------------------------------------------------------------*/
98 /* New propagator object is created. It's provided to VKalVrtCore. */
99 /* VKalVrtFitter must set up Core BEFORE any call required propagation!!! */
100 /* This object is created ONLY if IExtrapolator pointer is provideded. */
101 /* see VKalExtPropagator.cxx for details */
102 /*--------------------------------------------------------------------------*/
103  m_fitPropagator = nullptr; //Pointer to VKalVrtFitter propagator object to supply to VKalVrtCore (specific interface)
104  m_InDetExtrapolator = nullptr; //Direct pointer to Athena propagator
105 
106  m_isAtlasField = false; // To allow callback and then field first call only at execute stage
107 }
108 
109 
110 //Destructor---------------------------------------------------------------
112  //log << MSG::DEBUG << "TrkVKalVrtFitter destructor called" << endmsg;
113  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"TrkVKalVrtFitter destructor called" << endmsg;
114  if(m_fitPropagator) delete m_fitPropagator;
115 }
116 
117 std::unique_ptr<IVKalState>
118 TrkVKalVrtFitter::makeState(const EventContext& ctx) const
119 {
120  auto state = std::make_unique<State>();
121  initState(ctx, *state);
122  return state;
123 }
124 
126 {
127  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"TrkVKalVrtFitter finalize() successful" << endmsg;
128  return StatusCode::SUCCESS;
129 }
130 
131 
133 {
134 
135 // Checking ROBUST algoritms
136  if(m_Robustness<0 || m_Robustness>7 ) m_Robustness=0;
137 
138 
139  if(!m_useFixedField){
140  // Read handle for AtlasFieldCacheCondObj
141  if (!m_fieldCacheCondObjInputKey.key().empty()){
142  if( (m_fieldCacheCondObjInputKey.initialize()).isSuccess() ){
143  m_isAtlasField = true;
144  ATH_MSG_DEBUG( "Found AtlasFieldCacheCondObj with key ="<< m_fieldCacheCondObjInputKey.key());
145  }else{
146  ATH_MSG_INFO( "No AtlasFieldCacheCondObj with key ="<< m_fieldCacheCondObjInputKey.key());
147  ATH_MSG_INFO( "Use fixed magnetic field instead");
148  }
149  }
150  }
151 //
152 // Only here the VKalVrtFitter propagator object is created if ATHENA propagator is provided (see setAthenaPropagator)
153 // In this case the ATHENA propagator can be used via pointers:
154 // m_InDetExtrapolator - direct access
155 // m_fitPropagator - via VKalVrtFitter object VKalExtPropagator
156 // If ATHENA propagator is not provided, only defined object is
157 // myPropagator - extern propagator from TrkVKalVrtCore
158 //
159  if (m_extPropagator.empty()){
160  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "External propagator is not supplied - use internal one"<<endmsg;
161  m_extPropagator.disable();
162  }else{
163  if (m_extPropagator.retrieve().isFailure()) {
164  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "Could not find external propagator=" <<m_extPropagator<<endmsg;
165  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "TrkVKalVrtFitter will uses internal propagator" << endmsg;
166  m_extPropagator.disable();
167  }else{
168  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "External propagator="<<m_extPropagator<<" retrieved" << endmsg;
170  }
171  }
172 
173 //
174 //
175 //
176  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "TrkVKalVrtFitter initialize() successful" << endmsg;
177  if(msgLvl(MSG::DEBUG)){
178  msg(MSG::DEBUG)<< "TrkVKalVrtFitter configuration:" << endmsg;
179  msg(MSG::DEBUG)<< " Frozen version for BTagging: "<< m_frozenVersionForBTagging <<endmsg;
180  msg(MSG::DEBUG)<< " A priori vertex constraint: "<< m_useAprioriVertex <<endmsg;
181  msg(MSG::DEBUG)<< " Angle dTheta=0 constraint: "<< m_useThetaCnst <<endmsg;
182  msg(MSG::DEBUG)<< " Angle dPhi=0 constraint: "<< m_usePhiCnst <<endmsg;
183  msg(MSG::DEBUG)<< " Pointing to other vertex constraint: "<< m_usePointingCnst <<endmsg;
184  msg(MSG::DEBUG)<< " ZPointing to other vertex constraint: "<< m_useZPointingCnst <<endmsg;
185  msg(MSG::DEBUG)<< " Comb. particle pass near other vertex:"<< m_usePassNear <<endmsg;
186  msg(MSG::DEBUG)<< " Pass near with comb.particle errors: "<< m_usePassWithTrkErr <<endmsg;
187  if(m_massForConstraint>0){
188  msg(MSG::DEBUG)<< " Mass constraint M="<< m_massForConstraint <<endmsg;
189  msg(MSG::DEBUG)<< " with particles M=";
190  for(int i=0; i<(int)m_c_MassInputParticles.size(); i++) msg(MSG::DEBUG)<<m_c_MassInputParticles[i]<<", ";
191  msg(MSG::DEBUG)<<endmsg; ;
192  }
193  if(m_IterationNumber==0){
194  msg(MSG::DEBUG)<< " Default iteration number limit 50 is used " <<endmsg;
195  } else {
196  msg(MSG::DEBUG)<< " Iteration number limit: "<< m_IterationNumber <<endmsg;
197  }
198 
199  if(m_isAtlasField){ msg(MSG::DEBUG)<< " ATLAS magnetic field is used!"<<endmsg; }
200  else { msg(MSG::DEBUG)<< " Constant magnetic field is used! B="<<m_BMAG<<endmsg; }
201 
202  if(m_InDetExtrapolator){ msg(MSG::DEBUG)<< " InDet extrapolator is used!"<<endmsg; }
203  else { msg(MSG::DEBUG)<< " Internal VKalVrt extrapolator is used!"<<endmsg;}
204 
205  if(m_Robustness) { msg(MSG::DEBUG)<< " VKalVrt uses robust algorithm! Type="<<m_Robustness<<" with Scale="<<m_RobustScale<<endmsg; }
206 
207  if(m_firstMeasuredPoint){ msg(MSG::DEBUG)<< " VKalVrt will use FirstMeasuredPoint strategy in fits with InDetExtrapolator"<<endmsg; }
208  else { msg(MSG::DEBUG)<< " VKalVrt will use Perigee strategy in fits with InDetExtrapolator"<<endmsg; }
209  if(m_firstMeasuredPointLimit){ msg(MSG::DEBUG)<< " VKalVrt will use FirstMeasuredPointLimit strategy "<<endmsg; }
210  }
211 
212 
213  return StatusCode::SUCCESS;
214 }
215 
216 
218 {
219  initState(Gaudi::Hive::currentContext(), state);
220 }
221 
222 
223 void TrkVKalVrtFitter::initState (const EventContext& ctx, State& state) const
224 
225 {
226  //----------------------------------------------------------------------
227  // New magnetic field object is created. It's provided to VKalVrtCore.
228  // VKalVrtFitter must set up Core BEFORE any call required propagation!!!
229  if (m_isAtlasField) {
230  // For the moment, use Gaudi Hive for the event context - would need to be passed in from clients
232  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
233  if (fieldCondObj == nullptr) {
234  ATH_MSG_ERROR("Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
235  return;
236  }
237  fieldCondObj->getInitializedCache (state.m_fieldCache);
238  state.m_fitField.setAtlasField(&state.m_fieldCache);
239  } else {
241  }
242  state.m_eventContext = &ctx;
246  state.m_usePhiCnst = m_usePhiCnst;
254  state.m_Robustness = m_Robustness;
258 }
259 
261 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC,
262  const Amg::Vector3D & startingPoint) const
263 {
264  State state;
265  initState (state);
266  setApproximateVertex(startingPoint.x(),
267  startingPoint.y(),
268  startingPoint.z(),
269  state);
270  std::vector<const NeutralParameters*> perigeeListN(0);
272  TLorentzVector Momentum;
273  long int Charge;
274  std::vector<double> ErrorMatrix;
275  std::vector<double> Chi2PerTrk;
276  std::vector< std::vector<double> > TrkAtVrt;
277  double Chi2;
278  StatusCode sc=VKalVrtFit( perigeeListC, perigeeListN,
279  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
280 
281  xAOD::Vertex * tmpVertex = nullptr;
282  if(sc.isSuccess()) {
283  tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
284  }
285  return tmpVertex;
286 }
287 
288 
289 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC,
290  const std::vector<const NeutralParameters*> & perigeeListN,
291  const Amg::Vector3D & startingPoint) const
292 {
293  State state;
294  initState (state);
295  setApproximateVertex(startingPoint.x(),
296  startingPoint.y(),
297  startingPoint.z(),
298  state);
300  TLorentzVector Momentum;
301  long int Charge;
302  std::vector<double> ErrorMatrix;
303  std::vector<double> Chi2PerTrk;
304  std::vector< std::vector<double> > TrkAtVrt;
305  double Chi2;
306  StatusCode sc=VKalVrtFit( perigeeListC,perigeeListN,
307  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
308 
309  xAOD::Vertex * tmpVertex = nullptr;
310  if(sc.isSuccess()) {
311  tmpVertex = makeXAODVertex( (int)perigeeListN.size(), Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
312  }
313  return tmpVertex;
314 }
315 
316 
317 
318 
319 
320 
323 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC,
324  const xAOD::Vertex & constraint) const
325 {
326  State state;
327  initState (state);
328  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<< "A priori vertex constraint is activated in VKalVrt fitter!" << endmsg;
329  Amg::Vector3D VertexIni(0.,0.,0.);
330  StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state);
331  if( sc.isSuccess()){
332  setApproximateVertex(VertexIni.x(),VertexIni.y(),VertexIni.z(),state);
333  }else{
334  setApproximateVertex(constraint.position().x(),
335  constraint.position().y(),
336  constraint.position().z(),
337  state);
338  }
339  setVertexForConstraint(constraint.position().x(),
340  constraint.position().y(),
341  constraint.position().z(),
342  state);
343  setCovVrtForConstraint(constraint.covariancePosition()(Trk::x,Trk::x),
344  constraint.covariancePosition()(Trk::y,Trk::x),
345  constraint.covariancePosition()(Trk::y,Trk::y),
346  constraint.covariancePosition()(Trk::z,Trk::x),
347  constraint.covariancePosition()(Trk::z,Trk::y),
348  constraint.covariancePosition()(Trk::z,Trk::z),
349  state);
350  state.m_useAprioriVertex=true;
351  std::vector<const NeutralParameters*> perigeeListN(0);
353  TLorentzVector Momentum;
354  long int Charge;
355  std::vector<double> ErrorMatrix;
356  std::vector<double> Chi2PerTrk;
357  std::vector< std::vector<double> > TrkAtVrt;
358  double Chi2;
359  sc=VKalVrtFit( perigeeListC, perigeeListN,
360  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
361 
362 
363  xAOD::Vertex * tmpVertex = nullptr;
364  if(sc.isSuccess()) {
365  tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
366  }
367  return tmpVertex;
368 }
369 
370 
371 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC,
372  const std::vector<const NeutralParameters*> & perigeeListN,
373  const xAOD::Vertex & constraint) const
374 {
375  State state;
376  initState (state);
377 
378  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<< "A priori vertex constraint is activated in VKalVrt fitter!" << endmsg;
379  Amg::Vector3D VertexIni(0.,0.,0.);
380  StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state);
381  if( sc.isSuccess()){
382  setApproximateVertex(VertexIni.x(),VertexIni.y(),VertexIni.z(),state);
383  }else{
384  setApproximateVertex(constraint.position().x(),
385  constraint.position().y(),
386  constraint.position().z(),
387  state);
388  }
389  setVertexForConstraint(constraint.position().x(),
390  constraint.position().y(),
391  constraint.position().z(),
392  state);
393  setCovVrtForConstraint(constraint.covariancePosition()(Trk::x,Trk::x),
394  constraint.covariancePosition()(Trk::y,Trk::x),
395  constraint.covariancePosition()(Trk::y,Trk::y),
396  constraint.covariancePosition()(Trk::z,Trk::x),
397  constraint.covariancePosition()(Trk::z,Trk::y),
398  constraint.covariancePosition()(Trk::z,Trk::z),
399  state);
400  state.m_useAprioriVertex=true;
402  TLorentzVector Momentum;
403  long int Charge;
404  std::vector<double> ErrorMatrix;
405  std::vector<double> Chi2PerTrk;
406  std::vector< std::vector<double> > TrkAtVrt;
407  double Chi2;
408  sc=VKalVrtFit( perigeeListC, perigeeListN,
409  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
410 
411 
412  xAOD::Vertex * tmpVertex = nullptr;
413  if(sc.isSuccess()) {
414  tmpVertex = makeXAODVertex( (int)perigeeListN.size(), Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
415  }
416  return tmpVertex;
417 }
418 
422 std::unique_ptr<xAOD::Vertex>
423 TrkVKalVrtFitter::fit(const EventContext& ctx,
424  const std::vector<const xAOD::TrackParticle*>& xtpListC,
425  const Amg::Vector3D& startingPoint) const
426 {
427  State state;
428  initState(ctx, state);
429  return std::unique_ptr<xAOD::Vertex>(fit(xtpListC, startingPoint, state));
430 }
431 
432 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC,
433  const Amg::Vector3D & startingPoint,
434  IVKalState& istate) const
435 {
436  assert(dynamic_cast<State*> (&istate)!=nullptr);
437  State& state = static_cast<State&> (istate);
438 
439  xAOD::Vertex * tmpVertex = nullptr;
440  setApproximateVertex(startingPoint.x(),
441  startingPoint.y(),
442  startingPoint.z(),
443  state);
444  std::vector<const xAOD::NeutralParticle*> xtpListN(0);
446  TLorentzVector Momentum;
447  long int Charge;
448  std::vector<double> ErrorMatrix;
449  std::vector<double> Chi2PerTrk;
450  std::vector< std::vector<double> > TrkAtVrt;
451  double Chi2;
452  StatusCode sc=VKalVrtFit( xtpListC, xtpListN,
453  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
454  if(sc.isSuccess()) {
455  tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
456  dvect fittrkwgt;
457  sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
458  for(int ii=0; ii<state.m_FitStatus; ii++) {
459  ElementLink<xAOD::TrackParticleContainer> TEL; TEL.setElement( xtpListC[ii] );
460  if(!fittrkwgt.empty()) tmpVertex->addTrackAtVertex(TEL,fittrkwgt[ii]);
461  else tmpVertex->addTrackAtVertex(TEL,1.);
462  }
463  }
464 
465  return tmpVertex;
466 }
467 
468 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC,
469  const std::vector<const xAOD::NeutralParticle*> & xtpListN,
470  const Amg::Vector3D & startingPoint) const
471 {
472  State state;
473  initState (state);
474  xAOD::Vertex * tmpVertex = nullptr;
475  setApproximateVertex(startingPoint.x(),
476  startingPoint.y(),
477  startingPoint.z(),
478  state);
480  TLorentzVector Momentum;
481  long int Charge;
482  std::vector<double> ErrorMatrix;
483  std::vector<double> Chi2PerTrk;
484  std::vector< std::vector<double> > TrkAtVrt;
485  double Chi2;
486  StatusCode sc=VKalVrtFit( xtpListC, xtpListN,
487  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
488  if(sc.isSuccess()) {
489  tmpVertex = makeXAODVertex( (int)xtpListN.size(), Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
490  dvect fittrkwgt;
491  sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
492  for(int ii=0; ii<state.m_FitStatus; ii++) {
493  if(ii<(int)xtpListC.size()) {
494  ElementLink<xAOD::TrackParticleContainer> TEL; TEL.setElement( xtpListC[ii] );
495  if(!fittrkwgt.empty()) tmpVertex->addTrackAtVertex(TEL,fittrkwgt[ii]);
496  else tmpVertex->addTrackAtVertex(TEL,1.);
497  }else{
499  if(!fittrkwgt.empty()) tmpVertex->addNeutralAtVertex(TEL,fittrkwgt[ii]);
500  else tmpVertex->addNeutralAtVertex(TEL,1.);
501  }
502  }
503  }
504 
505  return tmpVertex;
506 }
507 
510 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC,
511  const xAOD::Vertex & constraint) const
512 {
513  State state;
514  initState (state);
515  return fit (xtpListC, constraint, state);
516 }
517 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC,
518  const xAOD::Vertex & constraint,
519  IVKalState& istate) const
520 {
521  assert(dynamic_cast<State*> (&istate)!=nullptr);
522  State& state = static_cast<State&> (istate);
523 
524  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<< "A priori vertex constraint is activated in VKalVrt fitter!" << endmsg;
525  xAOD::Vertex * tmpVertex = nullptr;
526  setApproximateVertex(constraint.position().x(), constraint.position().y(),constraint.position().z(),state);
527  setVertexForConstraint(constraint.position().x(),
528  constraint.position().y(),
529  constraint.position().z(),
530  state);
531  setCovVrtForConstraint(constraint.covariancePosition()(Trk::x,Trk::x),
532  constraint.covariancePosition()(Trk::y,Trk::x),
533  constraint.covariancePosition()(Trk::y,Trk::y),
534  constraint.covariancePosition()(Trk::z,Trk::x),
535  constraint.covariancePosition()(Trk::z,Trk::y),
536  constraint.covariancePosition()(Trk::z,Trk::z),
537  state);
538  state.m_useAprioriVertex=true;
539  std::vector<const xAOD::NeutralParticle*> xtpListN(0);
541  TLorentzVector Momentum;
542  long int Charge;
543  std::vector<double> ErrorMatrix;
544  std::vector<double> Chi2PerTrk;
545  std::vector< std::vector<double> > TrkAtVrt;
546  double Chi2;
547  StatusCode sc=VKalVrtFit( xtpListC, xtpListN,
548  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
549  if(sc.isSuccess()) {
550  tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix,Chi2PerTrk, TrkAtVrt, Chi2, state );
551  dvect fittrkwgt;
552  sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
553  for(int ii=0; ii<state.m_FitStatus; ii++) {
554  ElementLink<xAOD::TrackParticleContainer> TEL; TEL.setElement( xtpListC[ii] );
555  if(!fittrkwgt.empty()) tmpVertex->addTrackAtVertex(TEL,fittrkwgt[ii]);
556  else tmpVertex->addTrackAtVertex(TEL,1.);
557  }
558  }
559 
560  return tmpVertex;
561 }
562 
563 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC,
564  const std::vector<const xAOD::NeutralParticle*> & xtpListN,
565  const xAOD::Vertex & constraint) const
566 {
567  State state;
568  initState (state);
569 
570  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<< "A priori vertex constraint is activated in VKalVrt fitter!" << endmsg;
571  xAOD::Vertex * tmpVertex = nullptr;
572  setApproximateVertex(constraint.position().x(), constraint.position().y(),constraint.position().z(),state);
573  setVertexForConstraint(constraint.position().x(),
574  constraint.position().y(),
575  constraint.position().z(),
576  state);
577  setCovVrtForConstraint(constraint.covariancePosition()(Trk::x,Trk::x),
578  constraint.covariancePosition()(Trk::y,Trk::x),
579  constraint.covariancePosition()(Trk::y,Trk::y),
580  constraint.covariancePosition()(Trk::z,Trk::x),
581  constraint.covariancePosition()(Trk::z,Trk::y),
582  constraint.covariancePosition()(Trk::z,Trk::z),
583  state);
584  state.m_useAprioriVertex=true;
586  TLorentzVector Momentum;
587  long int Charge;
588  std::vector<double> ErrorMatrix;
589  std::vector<double> Chi2PerTrk;
590  std::vector< std::vector<double> > TrkAtVrt;
591  double Chi2;
592  StatusCode sc=VKalVrtFit( xtpListC, xtpListN,
593  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
594  if(sc.isSuccess()){
595  tmpVertex = makeXAODVertex( (int)xtpListN.size(), Vertex, ErrorMatrix,Chi2PerTrk, TrkAtVrt, Chi2, state );
596  dvect fittrkwgt;
597  sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
598  for(int ii=0; ii<state.m_FitStatus; ii++) {
599  if(ii<(int)xtpListC.size()) {
600  ElementLink<xAOD::TrackParticleContainer> TEL; TEL.setElement( xtpListC[ii] );
601  if(!fittrkwgt.empty()) tmpVertex->addTrackAtVertex(TEL,fittrkwgt[ii]);
602  else tmpVertex->addTrackAtVertex(TEL,1.);
603  }else{
605  if(!fittrkwgt.empty()) tmpVertex->addNeutralAtVertex(TEL,fittrkwgt[ii]);
606  else tmpVertex->addNeutralAtVertex(TEL,1.);
607  }
608  }
609  }
610 
611  return tmpVertex;
612 }
613 
614 
615 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC) const
616 {
617  State state;
618  initState (state);
619  Amg::Vector3D VertexIni(0.,0.,0.);
620  StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state);
621  if( sc.isSuccess()) setApproximateVertex(VertexIni.x(),VertexIni.y(),VertexIni.z(),state);
622  std::vector<const NeutralParameters*> perigeeListN(0);
624  TLorentzVector Momentum;
625  long int Charge;
626  std::vector<double> ErrorMatrix;
627  std::vector<double> Chi2PerTrk;
628  std::vector< std::vector<double> > TrkAtVrt;
629  double Chi2;
630  sc=VKalVrtFit( perigeeListC, perigeeListN,
631  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
632 
633  xAOD::Vertex * tmpVertex = nullptr;
634  if(sc.isSuccess()) {
635  tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
636  }
637  return tmpVertex;
638 }
639 
640 xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> & perigeeListC,
641  const std::vector<const NeutralParameters*> & perigeeListN) const
642 {
643  State state;
644  initState (state);
645  Amg::Vector3D VertexIni(0.,0.,0.);
646  StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state);
647  if( sc.isSuccess()) setApproximateVertex(VertexIni.x(),VertexIni.y(),VertexIni.z(),state);
649  TLorentzVector Momentum;
650  long int Charge;
651  std::vector<double> ErrorMatrix;
652  std::vector<double> Chi2PerTrk;
653  std::vector< std::vector<double> > TrkAtVrt;
654  double Chi2;
655  sc=VKalVrtFit( perigeeListC, perigeeListN,
656  Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
657 
658  xAOD::Vertex * tmpVertex = nullptr;
659  if(sc.isSuccess()) {
660  tmpVertex = makeXAODVertex( (int)perigeeListN.size(), Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
661  }
662  return tmpVertex;
663 }
664 
665 
666 
667 /* Filling of 3x3 HepSymMatrix with content of symmetric matrix
668  in packed form vector<double> (6x6 - 21 elem)
669  (VxVyVzPxPyPz) */
670 
671 // Fills 5x5 matrix. Input Matrix is track covariance only.
672 void TrkVKalVrtFitter::FillMatrixP(AmgSymMatrix(5)& CovMtx, std::vector<double> & Matrix)
673 {
674  CovMtx.setIdentity();
675  if( Matrix.size() < 21) return;
676  CovMtx(0,0) = 0;
677  CovMtx(1,1) = 0;
678  CovMtx(2,2)= Matrix[ 9];
679  CovMtx.fillSymmetric(2,3,Matrix[13]);
680  CovMtx(3,3)= Matrix[14];
681  CovMtx.fillSymmetric(2,4,Matrix[18]);
682  CovMtx.fillSymmetric(3,4,Matrix[19]);
683  CovMtx(4,4)= Matrix[20];
684 }
685 
686 // Fills 5x5 matrix. Input Matrix is a full covariance
687 void TrkVKalVrtFitter::FillMatrixP(int iTrk, AmgSymMatrix(5)& CovMtx, std::vector<double> & Matrix)
688 {
689  int iTmp=(iTrk+1)*3;
690  int NContent = Matrix.size();
691  CovMtx.setIdentity(); //Clean matrix for the beginning, then fill needed elements
692  CovMtx(0,0) = 0;
693  CovMtx(1,1) = 0;
694  int pnt = (iTmp+1)*iTmp/2 + iTmp; if( pnt > NContent ) return;
695  CovMtx(2,2) = Matrix[pnt];
696  pnt = (iTmp+1+1)*(iTmp+1)/2 + iTmp; if( pnt+1 > NContent ){ CovMtx.setIdentity(); return; }
697  CovMtx.fillSymmetric(2,3,Matrix[pnt]);
698  CovMtx(3,3) = Matrix[pnt+1];
699  pnt = (iTmp+2+1)*(iTmp+2)/2 + iTmp; if( pnt+2 > NContent ){ CovMtx.setIdentity(); return; }
700  CovMtx.fillSymmetric(2,4,Matrix[pnt]);
701  CovMtx.fillSymmetric(3,4,Matrix[pnt+1]);
702  CovMtx(4,4) = Matrix[pnt+2];
703 }
704 
705 
706 
707 Amg::MatrixX * TrkVKalVrtFitter::GiveFullMatrix(int NTrk, std::vector<double> & Matrix)
708 {
709  Amg::MatrixX * mtx = new Amg::MatrixX(3+3*NTrk,3+3*NTrk);
710  long int ij=0;
711  for(int i=1; i<=(3+3*NTrk); i++){
712  for(int j=1; j<=i; j++){
713  if(i==j){ (*mtx)(i-1,j-1)=Matrix[ij];}
714  else { (*mtx).fillSymmetric(i-1,j-1,Matrix[ij]);}
715  ij++;
716  }
717  }
718  return mtx;
719 }
720 
721 
722 
724  const Amg::Vector3D& Vertex, const std::vector<double> & fitErrorMatrix,
725  const std::vector<double> & Chi2PerTrk, const std::vector< std::vector<double> >& TrkAtVrt,
726  double Chi2,
727  State& state) const
728 {
729  long int NTrk = state.m_FitStatus;
730  long int Ndf = VKalGetNDOF(state)+state.m_planeCnstNDOF;
731 
732  xAOD::Vertex * tmpVertex=new xAOD::Vertex();
733  tmpVertex->makePrivateStore();
734  tmpVertex->setPosition(Vertex);
735  tmpVertex->setFitQuality(Chi2, (float)Ndf);
736 
737  std::vector<VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex();
738  tmpVTAV.clear();
739  std::vector <double> CovFull;
740  StatusCode sc = VKalGetFullCov( NTrk, CovFull, state);
741  int covarExist=0; if( sc.isSuccess() ) covarExist=1;
742 
743  std::vector<float> floatErrMtx;
744  if( m_makeExtendedVertex && covarExist ) {
745  floatErrMtx.resize(CovFull.size());
746  for(int i=0; i<(int)CovFull.size(); i++) floatErrMtx[i]=CovFull[i];
747  }else{
748  floatErrMtx.resize(fitErrorMatrix.size());
749  for(int i=0; i<(int)fitErrorMatrix.size(); i++) floatErrMtx[i]=fitErrorMatrix[i];
750  }
751  tmpVertex->setCovariance(floatErrMtx);
752 
753  for(int ii=0; ii<NTrk ; ii++) {
754  AmgSymMatrix(5) CovMtxP;
755  if(covarExist){ FillMatrixP( ii, CovMtxP, CovFull );}
756  else { CovMtxP.setIdentity();}
757  Perigee * tmpChargPer=nullptr;
758  NeutralPerigee * tmpNeutrPer=nullptr;
759  if(ii<NTrk-Neutrals){
760  tmpChargPer = new Perigee( 0.,0., TrkAtVrt[ii][0],
761  TrkAtVrt[ii][1],
762  TrkAtVrt[ii][2],
763  PerigeeSurface(Vertex), std::move(CovMtxP) );
764  }else{
765  tmpNeutrPer = new NeutralPerigee( 0.,0., TrkAtVrt[ii][0],
766  TrkAtVrt[ii][1],
767  TrkAtVrt[ii][2],
769  std::move(CovMtxP) );
770  }
771  tmpVTAV.emplace_back(Chi2PerTrk[ii], tmpChargPer, tmpNeutrPer );
772  }
773 
774  return tmpVertex;
775 }
776 
777 
778 } // End Of Namespace
Matrix
Definition: Trigger/TrigT1/TrigT1RPChardware/TrigT1RPChardware/Matrix.h:15
Trk::TrkVKalVrtFitter::State
Definition: TrkVKalVrtFitter.h:382
Trk::TrkVKalVrtFitter::~TrkVKalVrtFitter
virtual ~TrkVKalVrtFitter()
Definition: TrkVKalVrtFitter.cxx:111
LinkToTrack.h
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Trk::y
@ y
Definition: ParamDefs.h:56
Trk::TrkVKalVrtFitter::VKalVrtFit
virtual StatusCode VKalVrtFit(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::NeutralParticle * > &, Amg::Vector3D &Vertex, TLorentzVector &Momentum, long int &Charge, dvect &ErrorMatrix, dvect &Chi2PerTrk, std::vector< std::vector< double >> &TrkAtVrt, double &Chi2, IVKalState &istate, bool ifCovV0=false) const override final
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
Trk::TrkVKalVrtFitter::State::m_useZPointingCnst
bool m_useZPointingCnst
Definition: TrkVKalVrtFitter.h:426
Trk::TrkVKalVrtFitter::makeXAODVertex
xAOD::Vertex * makeXAODVertex(int, const Amg::Vector3D &, const dvect &, const dvect &, const std::vector< dvect > &, double, State &state) const
Definition: TrkVKalVrtFitter.cxx:723
Trk::TrkVKalVrtFitter::State::m_planeCnstNDOF
int m_planeCnstNDOF
Definition: TrkVKalVrtFitter.h:419
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
Trk::TrkVKalVrtFitter::m_IterationPrecision
SimpleProperty< double > m_IterationPrecision
Definition: TrkVKalVrtFitter.h:325
Trk::TrkVKalVrtFitter::m_cascadeCnstPrecision
SimpleProperty< double > m_cascadeCnstPrecision
Definition: TrkVKalVrtFitter.h:322
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::TrkVKalVrtFitter::m_c_VertexForConstraint
std::vector< double > m_c_VertexForConstraint
Definition: TrkVKalVrtFitter.h:328
Trk::TrkVKalVrtFitter::setVertexForConstraint
virtual void setVertexForConstraint(const xAOD::Vertex &, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:152
Trk::TrkVKalVrtFitter::setCovVrtForConstraint
virtual void setCovVrtForConstraint(double XX, double XY, double YY, double XZ, double YZ, double ZZ, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:178
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
Trk::TrkVKalVrtFitter::m_useAprioriVertex
bool m_useAprioriVertex
Definition: TrkVKalVrtFitter.h:346
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Trk::TrkVKalVrtFitter::initState
void initState(const EventContext &ctx, State &state) const
Definition: TrkVKalVrtFitter.cxx:223
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::TrkVKalVrtFitter::m_InDetExtrapolator
const IExtrapolator * m_InDetExtrapolator
Pointer to Extrapolator AlgTool.
Definition: TrkVKalVrtFitter.h:470
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
Trk::TrkVKalVrtFitter::m_useZPointingCnst
bool m_useZPointingCnst
Definition: TrkVKalVrtFitter.h:350
Trk::TrkVKalVrtFitter::m_c_MassInputParticles
std::vector< double > m_c_MassInputParticles
Definition: TrkVKalVrtFitter.h:330
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::TrkVKalVrtFitter::FillMatrixP
static void FillMatrixP(AmgSymMatrix(5)&, std::vector< double > &)
Definition: TrkVKalVrtFitter.cxx:672
Trk::TrkVKalVrtFitter::m_BMAG
double m_BMAG
Definition: TrkVKalVrtFitter.h:465
Trk::TrkVKalVrtFitter::VKalVrtFitFast
virtual StatusCode VKalVrtFitFast(std::span< const xAOD::TrackParticle *const >, Amg::Vector3D &Vertex, double &minDZ, IVKalState &istate) const
Definition: VKalVrtFitFastSvc.cxx:56
TrackParticleBase.h
Trk::TrkVKalVrtFitter::m_isAtlasField
bool m_isAtlasField
Definition: TrkVKalVrtFitter.h:344
Trk::TrkVKalVrtFitter::m_extPropagator
ToolHandle< IExtrapolator > m_extPropagator
Definition: TrkVKalVrtFitter.h:332
Trk::TrkVKalVrtFitter::m_useThetaCnst
bool m_useThetaCnst
Definition: TrkVKalVrtFitter.h:347
Trk::TrkVKalVrtFitter::m_fitPropagator
VKalExtPropagator * m_fitPropagator
Definition: TrkVKalVrtFitter.h:469
Trk::TrkVKalVrtFitter::m_c_CovVrtForConstraint
std::vector< double > m_c_CovVrtForConstraint
Definition: TrkVKalVrtFitter.h:329
IExtrapolator.h
Trk::VKalAtlasMagFld::setAtlasField
void setAtlasField(MagField::AtlasFieldCache *)
Definition: VKalAtlasMagFld.cxx:44
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
Trk::TrkVKalVrtFitter::m_RobustScale
SimpleProperty< double > m_RobustScale
Definition: TrkVKalVrtFitter.h:321
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Trk::TrkVKalVrtFitter::State::m_FitStatus
int m_FitStatus
Definition: TrkVKalVrtFitter.h:410
Trk::Perigee
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:33
xAOD::Vertex_v1::setCovariance
void setCovariance(const std::vector< float > &value)
Sets the covariance matrix as a simple vector of values.
Trk::TrkVKalVrtFitter::VKalGetNDOF
static int VKalGetNDOF(const State &state)
Definition: VKalVrtFitSvc.cxx:562
Trk::TrkVKalVrtFitter::VKalGetFullCov
virtual StatusCode VKalGetFullCov(long int, dvect &CovMtx, IVKalState &istate, bool=false) const override final
Definition: VKalVrtFitSvc.cxx:434
Trk::TrkVKalVrtFitter::State::m_vkalFitControl
VKalVrtControl m_vkalFitControl
Definition: TrkVKalVrtFitter.h:402
Trk::dvect
std::vector< double > dvect
Definition: TrkVKalVrtFitter.h:36
TrkVKalVrtFitter.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::TrkVKalVrtFitter::m_Robustness
SimpleProperty< int > m_Robustness
Definition: TrkVKalVrtFitter.h:320
Trk::ErrorMatrix
Definition: ErrorMatrixCnv_p1.h:25
Track.h
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
xAOD::Vertex_v1::addTrackAtVertex
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
Definition: Vertex_v1.cxx:314
Trk::TrkVKalVrtFitter::m_CNVMAG
double m_CNVMAG
Definition: TrkVKalVrtFitter.h:466
Trk::TrkVKalVrtFitter::m_IDsizeR
SimpleProperty< double > m_IDsizeR
Definition: TrkVKalVrtFitter.h:326
Trk::TrkVKalVrtFitter::State::m_useThetaCnst
bool m_useThetaCnst
Definition: TrkVKalVrtFitter.h:423
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrkVKalVrtFitter::m_massForConstraint
SimpleProperty< double > m_massForConstraint
Definition: TrkVKalVrtFitter.h:323
Trk::TrkVKalVrtFitter::setAthenaPropagator
void setAthenaPropagator(const Trk::IExtrapolator *)
Definition: VKalExtPropagator.cxx:473
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::TrkVKalVrtFitter::setApproximateVertex
virtual void setApproximateVertex(double X, double Y, double Z, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:108
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::NeutralPerigee
ParametersT< NeutralParametersDim, Neutral, PerigeeSurface > NeutralPerigee
Definition: NeutralParameters.h:31
Trk::TrkVKalVrtFitter::m_makeExtendedVertex
SimpleProperty< bool > m_makeExtendedVertex
Definition: TrkVKalVrtFitter.h:341
Trk::TrkVKalVrtFitter::m_IDsizeZ
SimpleProperty< double > m_IDsizeZ
Definition: TrkVKalVrtFitter.h:327
TrkVKalVrtCore.h
Trk::VKalVrtControlBase::vk_objProp
const basePropagator * vk_objProp
Definition: TrkVKalVrtCore.h:38
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VxTrackAtVertex.h
Trk::TrkVKalVrtFitter::State::m_useAprioriVertex
bool m_useAprioriVertex
Definition: TrkVKalVrtFitter.h:422
Trk::TrkVKalVrtFitter::finalize
virtual StatusCode finalize() override final
Definition: TrkVKalVrtFitter.cxx:125
Trk::TrkVKalVrtFitter::State::m_MassInputParticles
std::vector< double > m_MassInputParticles
Definition: TrkVKalVrtFitter.h:438
Trk::TrkVKalVrtFitter::State::m_frozenVersionForBTagging
bool m_frozenVersionForBTagging
Definition: TrkVKalVrtFitter.h:429
Trk::TrkVKalVrtFitter::State::m_usePhiCnst
bool m_usePhiCnst
Definition: TrkVKalVrtFitter.h:424
Trk::TrkVKalVrtFitter::m_useFixedField
SimpleProperty< bool > m_useFixedField
Definition: TrkVKalVrtFitter.h:342
LinkToTrackParticleBase.h
Trk::TrkVKalVrtFitter::m_firstMeasuredPointLimit
SimpleProperty< bool > m_firstMeasuredPointLimit
Definition: TrkVKalVrtFitter.h:340
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrkVKalVrtFitter::initialize
virtual StatusCode initialize() override final
Definition: TrkVKalVrtFitter.cxx:132
Trk::TrkVKalVrtFitter::State::m_fitField
VKalAtlasMagFld m_fitField
Definition: TrkVKalVrtFitter.h:401
Trk::TrkVKalVrtFitter::GiveFullMatrix
static Amg::MatrixX * GiveFullMatrix(int NTrk, std::vector< double > &)
Definition: TrkVKalVrtFitter.cxx:707
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::TrkVKalVrtFitter::State::m_usePassNear
bool m_usePassNear
Definition: TrkVKalVrtFitter.h:427
Trk::TrkVKalVrtFitter::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: TrkVKalVrtFitter.h:335
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::TrkVKalVrtFitter::TrkVKalVrtFitter
TrkVKalVrtFitter(const std::string &t, const std::string &name, const IInterface *parent)
Definition: TrkVKalVrtFitter.cxx:30
Trk::TrkVKalVrtFitter::VKalGetTrkWeights
virtual StatusCode VKalGetTrkWeights(dvect &Weights, const IVKalState &istate) const override final
Definition: VKalVrtFitSvc.cxx:546
NeutralParticleContainer.h
xAOD::Vertex_v1::addNeutralAtVertex
void addNeutralAtVertex(const ElementLink< NeutralParticleContainer > &tr, float weight=1.0)
Add a new neutral to the vertex.
Definition: Vertex_v1.cxx:323
Trk::TrkVKalVrtFitter::State::m_fieldCache
MagField::AtlasFieldCache m_fieldCache
Definition: TrkVKalVrtFitter.h:404
VertexContainer.h
Trk::TrkVKalVrtFitter::State::m_Robustness
int m_Robustness
Definition: TrkVKalVrtFitter.h:436
Trk::TrkVKalVrtFitter::State::m_usePassWithTrkErr
bool m_usePassWithTrkErr
Definition: TrkVKalVrtFitter.h:428
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::IVKalState
Definition: IVKalState.h:21
Trk::TrkVKalVrtFitter::m_IterationNumber
SimpleProperty< int > m_IterationNumber
Definition: TrkVKalVrtFitter.h:324
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
Trk::TrkVKalVrtFitter::State::m_massForConstraint
double m_massForConstraint
Definition: TrkVKalVrtFitter.h:433
Trk::TrkVKalVrtFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override final
Interface for MeasuredPerigee with starting point.
Definition: TrkVKalVrtFitter.cxx:261
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
Trk::x
@ x
Definition: ParamDefs.h:55
Trk::TrkVKalVrtFitter::State::m_eventContext
const EventContext * m_eventContext
Definition: TrkVKalVrtFitter.h:403
Trk::TrkVKalVrtFitter::m_usePassWithTrkErr
bool m_usePassWithTrkErr
Definition: TrkVKalVrtFitter.h:352
Trk::TrkVKalVrtFitter::m_usePointingCnst
bool m_usePointingCnst
Definition: TrkVKalVrtFitter.h:349
Trk::TrkVKalVrtFitter::m_usePhiCnst
bool m_usePhiCnst
Definition: TrkVKalVrtFitter.h:348
Trk::TrkVKalVrtFitter::State::m_CovVrtForConstraint
std::vector< double > m_CovVrtForConstraint
Definition: TrkVKalVrtFitter.h:432
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::TrkVKalVrtFitter::m_firstMeasuredPoint
SimpleProperty< bool > m_firstMeasuredPoint
Definition: TrkVKalVrtFitter.h:339
Trk::TrkVKalVrtFitter::m_usePassNear
bool m_usePassNear
Definition: TrkVKalVrtFitter.h:351
TrackParticleContainer.h
Trk::TrkVKalVrtFitter::State::m_usePointingCnst
bool m_usePointingCnst
Definition: TrkVKalVrtFitter.h:425
Trk::TrkVKalVrtFitter::m_frozenVersionForBTagging
bool m_frozenVersionForBTagging
Definition: TrkVKalVrtFitter.h:353
Trk::TrkVKalVrtFitter::State::m_VertexForConstraint
std::vector< double > m_VertexForConstraint
Definition: TrkVKalVrtFitter.h:431
Trk::TrkVKalVrtFitter::makeState
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final
Definition: TrkVKalVrtFitter.cxx:118
Trk::TrkVKalVrtFitter::State::m_RobustScale
double m_RobustScale
Definition: TrkVKalVrtFitter.h:437