ATLAS Offline Software
TrkVKalVrtFitter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // TrkVKalVrtFitter.h
6 //
7 #ifndef TRKVKALVRTFITTER_VKALVRTFITTER_H
8 #define TRKVKALVRTFITTER_VKALVRTFITTER_H
9 // Normal STL and physical vectors
10 // Gaudi includes
11 #include "GaudiKernel/ToolHandle.h"
12 //
13 // Interfaces
14 #include "TrkVertexFitterInterfaces/IVertexFitter.h" //base class
15 #include "TrkVKalVrtFitter/ITrkVKalVrtFitter.h" //base class
16 #include "TrkVKalVrtFitter/IVertexCascadeFitter.h" //base class
17 
19 // MagField cache
23 #include "TrkVKalVrtFitter/IVKalState.h" //base class
24 #include "TrkVKalVrtFitter/VKalAtlasMagFld.h" //for Trk::VKalAtlasMagFld (member)
25 #include "TrkVKalVrtFitter/VKalExtPropagator.h" //for Trk::VKalExtPropagator (member)
26 
27 #include "TrkVKalVrtCore/TrkVKalVrtCore.h" //for VKalVrtControl (member)
28 //
29 class IChronoStatSvc;
30 class EventContext;
31 
32 namespace Trk{
33 
34 
35  enum { NTrMaxVFit=200 };
36  typedef std::vector<double> dvect;
37  class IExtrapolator;
38  class IMagneticFieldTool;
39  class Track;
40  class TrackParticleBase;
41 
44  std::vector<int> trkInVrt; // positions of participating tracks in common track list
45  std::vector<VertexID> pseudoInVrt; // VertexIDs of pseudos
46  double Mass;
47  };
48 
49  struct cascadeV{ // general description of vertex in cascade
50  VertexID vID; // vertex ID - used everywhere
51  std::vector<int> trkInVrt; // list of tracks attached to vertex directly
52  VertexID outPointingV; // to which vertex it points
53  std::vector<VertexID> inPointingV; // which vertices points to it
54  VertexID mergedTO; // merged to another vertex (not separate anymore)
55  std::vector<VertexID> mergedIN; // vertices attached to current
58  ~cascadeV() = default;
59  };
60 
61 
62 //------------------------------------------------------------------------
63  //Tool should not be used reentrantly or used publically
64  class TrkVKalVrtFitter : public extends<AthAlgTool, IVertexFitter,
65  ITrkVKalVrtFitter,
66  IVertexCascadeFitter>
67  {
68  friend class VKalExtPropagator;
69  public:
70 
71  // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext
74 
75  virtual StatusCode initialize() override final;
76  virtual StatusCode finalize() override final;
77 
78  TrkVKalVrtFitter(const std::string& t, const std::string& name, const IInterface* parent);
79  virtual ~TrkVKalVrtFitter();
80 
81  //
82  // IVertexFitter interface
83  //
84 
85  virtual xAOD::Vertex* fit(
86  const std::vector<const TrackParameters*>& perigeeList,
87  const Amg::Vector3D& startingPoint) const override final;
88 
89  virtual xAOD::Vertex* fit(
90  const std::vector<const TrackParameters*>& perigeeList,
91  const std::vector<const NeutralParameters*>& /*neutralPerigeeList*/,
92  const Amg::Vector3D& startingPoint) const override final;
93 
94  virtual xAOD::Vertex* fit(
95  const std::vector<const TrackParameters*>& perigeeList,
96  const xAOD::Vertex& constraint) const override final;
97 
98  virtual xAOD::Vertex* fit(
99  const std::vector<const TrackParameters*>& perigeeList,
100  const std::vector<const NeutralParameters*>& /*neutralPerigeeList*/,
101  const xAOD::Vertex& constraint) const override final;
102 
103  virtual std::unique_ptr<xAOD::Vertex> fit(
104  const EventContext& ctx,
105  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
106  const Amg::Vector3D& startingPoint) const override final;
107 
108  virtual xAOD::Vertex* fit(
109  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
110  const xAOD::Vertex& constraint) const override final;
111 
112  virtual xAOD::Vertex* fit(
113  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
114  const std::vector<const xAOD::NeutralParticle*>& vectorNeu,
115  const Amg::Vector3D& startingPoint) const override final;
116 
117  virtual xAOD::Vertex* fit(
118  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
119  const std::vector<const xAOD::NeutralParticle*>& vectorNeu,
120  const xAOD::Vertex& constraint) const override final;
121 
122  virtual xAOD::Vertex* fit(
123  const std::vector<const TrackParameters*>&) const override final;
124 
125  virtual xAOD::Vertex* fit(
127  const std::vector<const Trk::NeutralParameters*>&) const override final;
128 
129 
130  /*-------------- Additional xAOD interfaces -------------*/
131  xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
132  const Amg::Vector3D& constraint,
133  IVKalState& istate) const;
134  xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
135  const xAOD::Vertex& constraint,
136  IVKalState& istate) const;
137 //
138 // Cascade fitter interface
139 //
142  std::span<const double> particleMass,
143  IVKalState& istate,
144  double massConstraint = 0.) const override final;
145 
147  std::span<const double> particleMass,
148  IVKalState& istate,
149  double massConstraint = 0.) const override final;
150 
152  std::span<const double> particleMass,
153  const std::vector<VertexID>& precedingVertices,
154  IVKalState& istate,
155  double massConstraint = 0.) const override final;
156 
158  const Vertex* primVertex = 0,
159  bool FirstDecayAtPV = false) const override final;
160 
163  const std::vector<const xAOD::TrackParticle*>& tracksInConstraint,
164  const std::vector<VertexID>& verticesInConstraint,
165  IVKalState& istate,
166  double massConstraint) const override final;
167 
168  //------ specific VKalVrt staff
169 
170  virtual std::unique_ptr<IVKalState> makeState(
171  const EventContext& ctx) const override final;
172 
176  Amg::Vector3D& Vertex,
177  TLorentzVector& Momentum,
178  long int& Charge,
180  dvect& Chi2PerTrk,
181  std::vector<std::vector<double>>& TrkAtVrt,
182  double& Chi2,
183  IVKalState& istate,
184  bool ifCovV0 = false) const override final;
185 
187  const std::vector<const Perigee*>&,
188  Amg::Vector3D& Vertex,
189  TLorentzVector& Momentum,
190  long int& Charge,
192  dvect& Chi2PerTrk,
193  std::vector<std::vector<double>>& TrkAtVrt,
194  double& Chi2,
195  IVKalState& istate,
196  bool ifCovV0 = false) const override final;
197 
201  Amg::Vector3D& Vertex,
202  TLorentzVector& Momentum,
203  long int& Charge,
205  dvect& Chi2PerTrk,
206  std::vector<std::vector<double>>& TrkAtVrt,
207  double& Chi2,
208  IVKalState& istate,
209  bool ifCovV0 = false) const override final;
210  //------
212  const TLorentzVector& Momentum,
213  const dvect& CovVrtMom,
214  const long int& Charge,
215  dvect& Perigee,
216  dvect& CovPerigee,
217  IVKalState& istate) const override final;
218  //-----
219  virtual StatusCode VKalVrtFitFast(
221  Amg::Vector3D& Vertex, double &minDZ,
222  IVKalState& istate) const;
223 
226  Amg::Vector3D& Vertex,
227  IVKalState& istate) const override final;
228 
229  virtual StatusCode VKalVrtFitFast(
231  Amg::Vector3D& Vertex,
232  IVKalState& istate) const override final;
233 
234  virtual std::unique_ptr<Trk::Perigee>
235  CreatePerigee(const std::vector<double>& VKPerigee,
236  const std::vector<double>& VKCov,
237  IVKalState& istate) const override final;
238 
240  dvect& Weights,
241  const IVKalState& istate) const override final;
242 
243  virtual StatusCode VKalGetFullCov(long int,
244  dvect& CovMtx,
245  IVKalState& istate,
246  bool = false) const override final;
247 
249  double& Mass,
250  double& MassError,
251  const IVKalState& istate) const override final;
252 
253  virtual void setApproximateVertex(double X,
254  double Y,
255  double Z,
256  IVKalState& istate) const override final;
257 
258  virtual void setMassForConstraint(double Mass,
259  IVKalState& istate) const override final;
260 
261  virtual void setMassForConstraint(double Mass,
262  std::span<const int>,
263  IVKalState& istate) const override final;
264 
265  virtual void setRobustness(int, IVKalState& istate) const override final;
266 
267  virtual void setRobustScale(double, IVKalState& istate) const override final;
268 
269  virtual void setCnstType(int, IVKalState& istate) const override final;
270 
271  virtual void setVertexForConstraint(const xAOD::Vertex&,
272  IVKalState& istate) const override final;
273 
274  virtual void setVertexForConstraint(double X,
275  double Y,
276  double Z,
277  IVKalState& istate) const override final;
278 
279  virtual void setCovVrtForConstraint(double XX,
280  double XY,
281  double YY,
282  double XZ,
283  double YZ,
284  double ZZ,
285  IVKalState& istate) const override final;
286 
287  virtual void setMassInputParticles(const std::vector<double>&,
288  IVKalState& istate) const override final;
289 
290  virtual double VKalGetImpact(const xAOD::TrackParticle*,
292  const long int Charge,
293  dvect& Impact,
294  dvect& ImpactError,
295  IVKalState& istate) const override final;
296 
297  virtual double VKalGetImpact(const Trk::Perigee*,
299  const long int Charge,
300  dvect& Impact,
301  dvect& ImpactError,
302  IVKalState& istate) const override final;
303 
304  virtual double VKalGetImpact(const xAOD::TrackParticle*,
306  const long int Charge,
307  dvect& Impact,
308  dvect& ImpactError) const override final;
309 
310  virtual double VKalGetImpact(const Trk::Perigee*,
312  const long int Charge,
313  dvect& Impact,
314  dvect& ImpactError) const override final;
315 
316  //
317  // ATLAS related code
318  //
319  private:
320  SimpleProperty<int> m_Robustness;
321  SimpleProperty<double> m_RobustScale;
322  SimpleProperty<double> m_cascadeCnstPrecision;
323  SimpleProperty<double> m_massForConstraint;
324  SimpleProperty<int> m_IterationNumber;
325  SimpleProperty<double> m_IterationPrecision;
326  SimpleProperty<double> m_IDsizeR;
327  SimpleProperty<double> m_IDsizeZ;
331 
332  ToolHandle<IExtrapolator> m_extPropagator; // External propagator
333  // Read handle for conditions object to get the field cache
334  SG::ReadCondHandleKey<AtlasFieldCacheCondObj>
336  "AtlasFieldCacheCondObj",
337  "fieldCondObj",
338  "Name of the Magnetic Field key" };
339  SimpleProperty<bool> m_firstMeasuredPoint;
340  SimpleProperty<bool> m_firstMeasuredPointLimit;
341  SimpleProperty<bool> m_makeExtendedVertex;
342  SimpleProperty<bool> m_useFixedField;
343 
345 
354  void initCnstList();
355 
356  // Track material effects control
357  //
359  {
360  // Track reference point(hit) in global ATLAS frame
363  int TrkID;
365  double prtMass;
366  Amg::Vector3D trkSavedLocalVertex; // Local VKalVrtCore vertex
367  };
368 
370  {
371  public:
372  int m_cascadeSize = 0;
373  std::vector<const xAOD::TrackParticle*> m_partListForCascade;
374 
375  std::vector<double> m_partMassForCascade;
376  std::vector<PartialMassConstraint> m_partMassCnstForCascade;
377  //
378  std::vector<cascadeV> m_cascadeVList; // list of cascade vertex objects
379  };
380 
381  class State : public IVKalState
382  {
383  public:
384  //
385  // Origin of global reference frame.
386  // (0,0,0) by default but can be changed by input tracks
387  //
388  double m_refFrameX = 0;
389  double m_refFrameY = 0;
390  double m_refFrameZ = 0;
391  std::vector<TrkMatControl> m_trkControl;
392 
393  //
394  // Arrays needed for fitting kernel
395  //
396  double m_apar[NTrMaxVFit][5]; // used only for fit preparation
397  double m_awgt[NTrMaxVFit][15]; // used only for fit preparation
398  long int m_ich[NTrMaxVFit];
399  double m_parfs[NTrMaxVFit][3];
400 
403  const EventContext* m_eventContext = nullptr;
405 
407 
408  double m_save_xyzfit[3]; // Save vertex after successful fit
409 
410  int m_FitStatus = 0; /* Fit Status flag*/
411  /* =0 - no fit. All "after fit" routines fail*/
412  /* >1 - good fit. "After fit" routines work*/
413 
414  //
415  // Array for full error matrix
416  //
417  std::vector<double> m_ErrMtx;
418 
419  int m_planeCnstNDOF = 0; /* NDOF addition if plane constraint is used */
420  std::vector<double> m_ApproximateVertex;
421 
422  bool m_useAprioriVertex = false;
423  bool m_useThetaCnst = false;
424  bool m_usePhiCnst = false;
425  bool m_usePointingCnst = false;
426  bool m_useZPointingCnst = false;
427  bool m_usePassNear = false;
428  bool m_usePassWithTrkErr = false;
430 
431  std::vector<double> m_VertexForConstraint;
432  std::vector<double> m_CovVrtForConstraint;
433  double m_massForConstraint = -1;
434  std::vector<double> m_partMassCnst;
435  std::vector<std::vector<int>> m_partMassCnstTrk;
436  int m_Robustness = 0;
437  double m_RobustScale = 1;
438  std::vector<double> m_MassInputParticles;
439 
440  std::unique_ptr<CascadeState> m_cascadeState;
441 
444  VKalVrtControlBase(&m_fitField, nullptr, nullptr, nullptr, this))
445  {
446  m_ApproximateVertex.reserve(3);
447  }
448  };
449 
450 //-----------------------------------------------------------------
451 // Cascade related stuff
452 //
453  static void makeSimpleCascade(std::vector< std::vector<int> > &, std::vector< std::vector<int> > &,
454  CascadeState& cstate) ;
455  static void printSimpleCascade(std::vector< std::vector<int> > &, std::vector< std::vector<int> > &,
456  const CascadeState& cstate) ;
457  static int findPositions(const std::vector<int> &,const std::vector<int> &, std::vector<int> &) ;
458  static int getSimpleVIndex( const VertexID &, const CascadeState& cstate) ;
459  static int indexInV( const VertexID &, const CascadeState& cstate) ;
460  static int getCascadeNDoF (const CascadeState& cstate) ;
461 //----------------------
462 // Control variables
463 //
464 
465  double m_BMAG; /* const magnetic field if needed */
466  double m_CNVMAG; /* Conversion constant */
467 
468 
471 //
472 //
473 //
474 
475 
476 
477 //
478 // Private technical functions
479 //
481  // context-aware init of state
482  void initState (const EventContext& ctx, State& state) const;
483  // init of state for backwards compartibility - calls context-aware version. Can be removed
484  // when fully migrated to EventContext
485  void initState (State& state) const;
486 
487 //
488 //
489  static void FillMatrixP(AmgSymMatrix(5)& , std::vector<double>& ) ;
490  static void FillMatrixP(int iTrk, AmgSymMatrix(5)& , std::vector<double>& ) ;
491  static Amg::MatrixX * GiveFullMatrix(int NTrk, std::vector<double>&) ;
492  bool convertAmg5SymMtx(const AmgSymMatrix(5)*, double[15] ) const;
493 
494  void VKalTransform(double MAG,
495  double A0V,
496  double ZV,
497  double PhiV,
498  double ThetaV,
499  double PInv,
500  const double[15],
501  long int& Charge,
502  double[5],
503  double[15]) const;
504 
506  const Amg::Vector3D&,
507  const dvect&,
508  const dvect&,
509  const std::vector<dvect>&,
510  double,
511  State& state) const;
512 
513  StatusCode CvtPerigee(const std::vector<const Perigee*>& list,
514  int& ntrk,
515  State& state) const;
516 
518  std::span<const xAOD::TrackParticle* const> list,
519  int& ntrk,
520  State& state) const;
521 
523  const std::vector<const xAOD::NeutralParticle*>& list,
524  int& ntrk,
525  State& state) const;
526 
528  const std::vector<const TrackParameters*>& InpTrk,
529  int& ntrk,
530  State& state) const;
531 
533  const std::vector<const NeutralParameters*>& InpTrk,
534  int& ntrk,
535  State& state) const;
536 
537  void VKalVrtConfigureFitterCore(int NTRK, State& state) const;
538 
539  void VKalToTrkTrack(double curBMAG,
540  double vp1,
541  double vp2,
542  double vp3,
543  double& tp1,
544  double& tp2,
545  double& tp3) const;
546 
547  int VKalVrtFit3(int ntrk,
549  TLorentzVector& Momentum,
550  long int& Charge,
552  dvect& Chi2PerTrk,
553  std::vector<std::vector<double>>& TrkAtVrt,
554  double& Chi2,
555  State& state,
556  bool ifCovV0) const;
557 
558  std::unique_ptr<Perigee> CreatePerigee(double Vx,
559  double Vy,
560  double Vz,
561  const std::vector<double>& VKPerigee,
562  const std::vector<double>& VKCov,
563  State& state) const;
564 
565  //
566  //
567  static const Perigee* GetPerigee(const TrackParameters* i_ntrk) ;
568 
569  static int VKalGetNDOF(const State& state) ;
570  };
571 
572 } //end of namespace
573 
574 #endif
Trk::TrkVKalVrtFitter::State
Definition: TrkVKalVrtFitter.h:382
TMDB::Weights
std::array< float, 7 > Weights
Definition: ITileCondToolTMDB.h:14
Trk::TrkVKalVrtFitter::State::m_globalFirstHit
const TrackParameters * m_globalFirstHit
Definition: TrkVKalVrtFitter.h:406
Trk::TrkVKalVrtFitter::findPositions
static int findPositions(const std::vector< int > &, const std::vector< int > &, std::vector< int > &)
Definition: TrkCascadeFitter.cxx:787
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::TrkVKalVrtFitter::CascadeState::m_cascadeVList
std::vector< cascadeV > m_cascadeVList
Definition: TrkVKalVrtFitter.h:378
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
Trk::TrkVKalVrtFitter::CvtNeutralParameters
StatusCode CvtNeutralParameters(const std::vector< const NeutralParameters * > &InpTrk, int &ntrk, State &state) const
Definition: CvtParametersBase.cxx:179
Trk::TrkVKalVrtFitter::CvtNeutralParticle
StatusCode CvtNeutralParticle(const std::vector< const xAOD::NeutralParticle * > &list, int &ntrk, State &state) const
Definition: CvtTrackParticle.cxx:124
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
CxxUtils::span
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
Trk::TrkVKalVrtFitter::State::m_planeCnstNDOF
int m_planeCnstNDOF
Definition: TrkVKalVrtFitter.h:419
IVertexCascadeFitter.h
Trk::TrkVKalVrtFitter::m_IterationPrecision
SimpleProperty< double > m_IterationPrecision
Definition: TrkVKalVrtFitter.h:325
Trk::TrkVKalVrtFitter::m_cascadeCnstPrecision
SimpleProperty< double > m_cascadeCnstPrecision
Definition: TrkVKalVrtFitter.h:322
Trk::IVertexFitter::fit
virtual std::unique_ptr< xAOD::Vertex > fit(const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const
Interface for xAOD::TrackParticle with starting point Event Context aware interface.
Definition: IVertexFitter.h:76
Trk::TrkVKalVrtFitter::State::m_refFrameZ
double m_refFrameZ
Definition: TrkVKalVrtFitter.h:390
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::VxCascadeInfo
Definition: VxCascadeInfo.h:75
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
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
Trk::TrkVKalVrtFitter::m_useAprioriVertex
bool m_useAprioriVertex
Definition: TrkVKalVrtFitter.h:346
Trk::TrkVKalVrtFitter::initState
void initState(const EventContext &ctx, State &state) const
Definition: TrkVKalVrtFitter.cxx:223
Trk::VertexID
int VertexID
Definition: IVertexCascadeFitter.h:23
Trk::TrkVKalVrtFitter::State::m_refFrameX
double m_refFrameX
Definition: TrkVKalVrtFitter.h:388
Trk::TrkVKalVrtFitter::m_InDetExtrapolator
const IExtrapolator * m_InDetExtrapolator
Pointer to Extrapolator AlgTool.
Definition: TrkVKalVrtFitter.h:470
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
Trk::TrkVKalVrtFitter::CreatePerigee
virtual std::unique_ptr< Trk::Perigee > CreatePerigee(const std::vector< double > &VKPerigee, const std::vector< double > &VKCov, IVKalState &istate) const override final
Definition: CvtPerigee.cxx:159
Trk::TrkVKalVrtFitter::setRobustness
virtual void setRobustness(int, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:116
Trk::TrkVKalVrtFitter::VKalTransform
void VKalTransform(double MAG, double A0V, double ZV, double PhiV, double ThetaV, double PInv, const double[15], long int &Charge, double[5], double[15]) const
Definition: VKalTransform.cxx:59
Trk::cascadeV::vID
VertexID vID
Definition: TrkVKalVrtFitter.h:50
Trk::TrkVKalVrtFitter::m_useZPointingCnst
bool m_useZPointingCnst
Definition: TrkVKalVrtFitter.h:350
AtlasFieldCacheCondObj.h
Trk::TrkVKalVrtFitter::m_c_MassInputParticles
std::vector< double > m_c_MassInputParticles
Definition: TrkVKalVrtFitter.h:330
Trk::cascadeV::cascadeV
cascadeV()
Definition: TrkVKalVrtFitter.h:57
Trk::TrkVKalVrtFitter::CascadeState
Definition: TrkVKalVrtFitter.h:370
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::cascadeV
Definition: TrkVKalVrtFitter.h:49
Trk::TrkVKalVrtFitter::TrkMatControl::trkSavedLocalVertex
Amg::Vector3D trkSavedLocalVertex
Definition: TrkVKalVrtFitter.h:366
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
Trk::TrkVKalVrtFitter::State::m_partMassCnstTrk
std::vector< std::vector< int > > m_partMassCnstTrk
Definition: TrkVKalVrtFitter.h:435
Trk::VKalExtPropagator
Definition: VKalExtPropagator.h:21
Trk::TrkVKalVrtFitter::CascadeState::m_partMassForCascade
std::vector< double > m_partMassForCascade
Definition: TrkVKalVrtFitter.h:375
Trk::TrkVKalVrtFitter::m_isAtlasField
bool m_isAtlasField
Definition: TrkVKalVrtFitter.h:344
Trk::TrkVKalVrtFitter::makeSimpleCascade
static void makeSimpleCascade(std::vector< std::vector< int > > &, std::vector< std::vector< int > > &, CascadeState &cstate)
Definition: TrkCascadeFitter.cxx:180
Trk::TrkVKalVrtFitter::nextVertex
VertexID nextVertex(const std::vector< const xAOD::TrackParticle * > &list, std::span< const double > particleMass, IVKalState &istate, double massConstraint=0.) const override final
Definition: TrkCascadeFitter.cxx:97
Trk::TrkVKalVrtFitter::m_extPropagator
ToolHandle< IExtrapolator > m_extPropagator
Definition: TrkVKalVrtFitter.h:332
Trk::TrkVKalVrtFitter::CvtTrackParameters
StatusCode CvtTrackParameters(const std::vector< const TrackParameters * > &InpTrk, int &ntrk, State &state) const
Definition: CvtParametersBase.cxx:24
Trk::TrkVKalVrtFitter::TrkMatControl::prtMass
double prtMass
Definition: TrkVKalVrtFitter.h:365
Trk::TrkVKalVrtFitter::TrkMatControl::extrapolationType
int extrapolationType
Definition: TrkVKalVrtFitter.h:362
Trk::TrkVKalVrtFitter::m_useThetaCnst
bool m_useThetaCnst
Definition: TrkVKalVrtFitter.h:347
Trk::TrkVKalVrtFitter::m_fitPropagator
VKalExtPropagator * m_fitPropagator
Definition: TrkVKalVrtFitter.h:469
Trk::TrkVKalVrtFitter::VKalGetImpact
virtual double VKalGetImpact(const xAOD::TrackParticle *, const Amg::Vector3D &Vertex, const long int Charge, dvect &Impact, dvect &ImpactError, IVKalState &istate) const override final
Definition: VKalGetImpact.cxx:91
Trk::cascadeV::outPointingV
VertexID outPointingV
Definition: TrkVKalVrtFitter.h:52
Trk::TrkVKalVrtFitter::m_c_CovVrtForConstraint
std::vector< double > m_c_CovVrtForConstraint
Definition: TrkVKalVrtFitter.h:329
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
Trk::TrkVKalVrtFitter::CvtPerigee
StatusCode CvtPerigee(const std::vector< const Perigee * > &list, int &ntrk, State &state) const
Definition: CvtPerigee.cxx:25
NeutralParameters.h
Trk::TrkVKalVrtFitter::TrkMatControl::TrkPnt
const TrackParameters * TrkPnt
Definition: TrkVKalVrtFitter.h:364
Trk::TrkVKalVrtFitter::m_RobustScale
SimpleProperty< double > m_RobustScale
Definition: TrkVKalVrtFitter.h:321
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrkVKalVrtFitter::getCascadeNDoF
static int getCascadeNDoF(const CascadeState &cstate)
Definition: TrkCascadeFitter.cxx:79
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::TrkVKalVrtFitter::CascadeState::m_cascadeSize
int m_cascadeSize
Definition: TrkVKalVrtFitter.h:372
Trk::TrkVKalVrtFitter::TrkMatControl
Definition: TrkVKalVrtFitter.h:359
Trk::TrkVKalVrtFitter::State::m_FitStatus
int m_FitStatus
Definition: TrkVKalVrtFitter.h:410
Trk::TrkVKalVrtFitter::convertAmg5SymMtx
bool convertAmg5SymMtx(const AmgSymMatrix(5) *, double[15]) const
Definition: VKalTransform.cxx:26
Trk::TrkVKalVrtFitter::TrkMatControl::trkRefGlobPos
Amg::Vector3D trkRefGlobPos
Definition: TrkVKalVrtFitter.h:361
Trk::TrkVKalVrtFitter::VKalGetNDOF
static int VKalGetNDOF(const State &state)
Definition: VKalVrtFitSvc.cxx:562
Trk::TrkVKalVrtFitter::State::m_save_xyzfit
double m_save_xyzfit[3]
Definition: TrkVKalVrtFitter.h:408
Trk::TrkVKalVrtFitter::indexInV
static int indexInV(const VertexID &, const CascadeState &cstate)
Definition: TrkCascadeFitter.cxx:823
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_partMassCnst
std::vector< double > m_partMassCnst
Definition: TrkVKalVrtFitter.h:434
Trk::TrkVKalVrtFitter::fitCascade
VxCascadeInfo * fitCascade(IVKalState &istate, const Vertex *primVertex=0, bool FirstDecayAtPV=false) const override final
Definition: TrkCascadeFitter.cxx:274
Trk::TrkVKalVrtFitter::State::m_cascadeState
std::unique_ptr< CascadeState > m_cascadeState
Definition: TrkVKalVrtFitter.h:440
Trk::TrkVKalVrtFitter::State::m_vkalFitControl
VKalVrtControl m_vkalFitControl
Definition: TrkVKalVrtFitter.h:402
Trk::dvect
std::vector< double > dvect
Definition: TrkVKalVrtFitter.h:36
Trk::TrkVKalVrtFitter::m_Robustness
SimpleProperty< int > m_Robustness
Definition: TrkVKalVrtFitter.h:320
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
Trk::ErrorMatrix
Definition: ErrorMatrixCnv_p1.h:25
Trk::TrkVKalVrtFitter::VKalGetMassError
virtual StatusCode VKalGetMassError(double &Mass, double &MassError, const IVKalState &istate) const override final
Definition: VKalVrtFitSvc.cxx:534
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
Trk::TrkVKalVrtFitter::startVertex
VertexID startVertex(const std::vector< const xAOD::TrackParticle * > &list, std::span< const double > particleMass, IVKalState &istate, double massConstraint=0.) const override final
Interface for cascade fit.
Definition: TrkCascadeFitter.cxx:62
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::cascadeV::trkInVrt
std::vector< int > trkInVrt
Definition: TrkVKalVrtFitter.h:51
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::setMassForConstraint
virtual void setMassForConstraint(double Mass, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:134
Trk::TrkVKalVrtFitter::State::m_useThetaCnst
bool m_useThetaCnst
Definition: TrkVKalVrtFitter.h:423
Trk::TrkVKalVrtFitter::addMassConstraint
StatusCode addMassConstraint(VertexID Vertex, const std::vector< const xAOD::TrackParticle * > &tracksInConstraint, const std::vector< VertexID > &verticesInConstraint, IVKalState &istate, double massConstraint) const override final
Definition: TrkCascadeFitter.cxx:728
NeutralParticleFwd.h
Trk::TrkVKalVrtFitter::m_massForConstraint
SimpleProperty< double > m_massForConstraint
Definition: TrkVKalVrtFitter.h:323
Trk::TrkVKalVrtFitter::setAthenaPropagator
void setAthenaPropagator(const Trk::IExtrapolator *)
Definition: VKalExtPropagator.cxx:473
Trk::TrkVKalVrtFitter::printSimpleCascade
static void printSimpleCascade(std::vector< std::vector< int > > &, std::vector< std::vector< int > > &, const CascadeState &cstate)
Definition: TrkCascadeFitter.cxx:237
Trk::TrkVKalVrtFitter::setApproximateVertex
virtual void setApproximateVertex(double X, double Y, double Z, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:108
Trk::PartialMassConstraint::VRT
VertexID VRT
Definition: TrkVKalVrtFitter.h:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
Trk::TrkVKalVrtFitter::State::m_trkControl
std::vector< TrkMatControl > m_trkControl
Definition: TrkVKalVrtFitter.h:391
Trk::TrkVKalVrtFitter::setCnstType
virtual void setCnstType(int, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:82
Trk::TrkVKalVrtFitter::m_makeExtendedVertex
SimpleProperty< bool > m_makeExtendedVertex
Definition: TrkVKalVrtFitter.h:341
Trk::NTrMaxVFit
@ NTrMaxVFit
Definition: TrkVKalVrtFitter.h:35
Trk::TrkVKalVrtFitter::State::m_awgt
double m_awgt[NTrMaxVFit][15]
Definition: TrkVKalVrtFitter.h:397
Trk::VKalAtlasMagFld
Definition: VKalAtlasMagFld.h:17
Trk::TrkVKalVrtFitter::m_IDsizeZ
SimpleProperty< double > m_IDsizeZ
Definition: TrkVKalVrtFitter.h:327
TrkVKalVrtCore.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
jet::CompScaleVar::Mass
@ Mass
Definition: UncertaintyEnum.h:98
Trk::TrkVKalVrtFitter::State::m_useAprioriVertex
bool m_useAprioriVertex
Definition: TrkVKalVrtFitter.h:422
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
Trk::TrkVKalVrtFitter::initCnstList
void initCnstList()
Trk::cascadeV::inPointingV
std::vector< VertexID > inPointingV
Definition: TrkVKalVrtFitter.h:53
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::TrkVKalVrtFitter::finalize
virtual StatusCode finalize() override final
Definition: TrkVKalVrtFitter.cxx:125
Trk::TrkVKalVrtFitter::CascadeState::m_partListForCascade
std::vector< const xAOD::TrackParticle * > m_partListForCascade
Definition: TrkVKalVrtFitter.h:373
Trk::TrkVKalVrtFitter::State::State
State()
Definition: TrkVKalVrtFitter.h:442
xAOD::NeutralParticle
NeutralParticle_v1 NeutralParticle
Reference the current persistent version:
Definition: NeutralParticle.h:13
IVKalState.h
Base class for VKal state object.
Trk::TrkVKalVrtFitter::State::m_MassInputParticles
std::vector< double > m_MassInputParticles
Definition: TrkVKalVrtFitter.h:438
Trk::TrkVKalVrtFitter::GetPerigee
static const Perigee * GetPerigee(const TrackParameters *i_ntrk)
Definition: CvtTrackParticle.cxx:226
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::cascadeV::mergedTO
VertexID mergedTO
Definition: TrkVKalVrtFitter.h:54
Trk::TrkVKalVrtFitter::m_useFixedField
SimpleProperty< bool > m_useFixedField
Definition: TrkVKalVrtFitter.h:342
Trk::TrkVKalVrtFitter::m_firstMeasuredPointLimit
SimpleProperty< bool > m_firstMeasuredPointLimit
Definition: TrkVKalVrtFitter.h:340
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::cascadeV::~cascadeV
~cascadeV()=default
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Trk::TrkVKalVrtFitter::VKalToTrkTrack
void VKalToTrkTrack(double curBMAG, double vp1, double vp2, double vp3, double &tp1, double &tp2, double &tp3) const
Definition: VKalVrtFitSvc.cxx:406
Trk::TrkVKalVrtFitter::initialize
virtual StatusCode initialize() override final
Definition: TrkVKalVrtFitter.cxx:132
Trk::TrkVKalVrtFitter::State::m_fitField
VKalAtlasMagFld m_fitField
Definition: TrkVKalVrtFitter.h:401
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
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:221
Trk::TrkVKalVrtFitter::getSimpleVIndex
static int getSimpleVIndex(const VertexID &, const CascadeState &cstate)
Definition: TrkCascadeFitter.cxx:804
Trk::TrkVKalVrtFitter::TrkMatControl::TrkID
int TrkID
Definition: TrkVKalVrtFitter.h:363
Trk::TrkVKalVrtFitter::State::m_usePassNear
bool m_usePassNear
Definition: TrkVKalVrtFitter.h:427
Trk::TrkVKalVrtFitter::State::m_ich
long int m_ich[NTrMaxVFit]
Definition: TrkVKalVrtFitter.h:398
Trk::TrkVKalVrtFitter::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: TrkVKalVrtFitter.h:335
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::IExtrapolator
Definition: IExtrapolator.h:62
Trk::TrkVKalVrtFitter::VKalGetTrkWeights
virtual StatusCode VKalGetTrkWeights(dvect &Weights, const IVKalState &istate) const override final
Definition: VKalVrtFitSvc.cxx:546
Trk::TrkVKalVrtFitter::VKalVrtFit3
int VKalVrtFit3(int ntrk, Amg::Vector3D &Vertex, TLorentzVector &Momentum, long int &Charge, dvect &ErrorMatrix, dvect &Chi2PerTrk, std::vector< std::vector< double >> &TrkAtVrt, double &Chi2, State &state, bool ifCovV0) const
Definition: VKalVrtFitSvc.cxx:252
IVertexFitter.h
Trk::TrkVKalVrtFitter::State::m_refFrameY
double m_refFrameY
Definition: TrkVKalVrtFitter.h:389
Trk::ITrkVKalVrtFitter::makeState
virtual std::unique_ptr< IVKalState > makeState() const
Definition: ITrkVKalVrtFitter.h:51
Trk::PartialMassConstraint
Definition: TrkVKalVrtFitter.h:42
Trk::TrkVKalVrtFitter::State::m_fieldCache
MagField::AtlasFieldCache m_fieldCache
Definition: TrkVKalVrtFitter.h:404
Trk::cascadeV::mergedIN
std::vector< VertexID > mergedIN
Definition: TrkVKalVrtFitter.h:55
Trk::TrkVKalVrtFitter::State::m_Robustness
int m_Robustness
Definition: TrkVKalVrtFitter.h:436
Trk::TrkVKalVrtFitter::State::m_usePassWithTrkErr
bool m_usePassWithTrkErr
Definition: TrkVKalVrtFitter.h:428
Trk::TrkVKalVrtFitter::setRobustScale
virtual void setRobustScale(double, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:125
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::PartialMassConstraint::trkInVrt
std::vector< int > trkInVrt
Definition: TrkVKalVrtFitter.h:44
Trk::IVKalState
Definition: IVKalState.h:21
VKalAtlasMagFld.h
ITrkVKalVrtFitter.h
Trk::TrkVKalVrtFitter::CascadeState::m_partMassCnstForCascade
std::vector< PartialMassConstraint > m_partMassCnstForCascade
Definition: TrkVKalVrtFitter.h:376
Trk::TrkVKalVrtFitter::State::m_parfs
double m_parfs[NTrMaxVFit][3]
Definition: TrkVKalVrtFitter.h:399
Trk::TrkVKalVrtFitter::m_IterationNumber
SimpleProperty< int > m_IterationNumber
Definition: TrkVKalVrtFitter.h:324
Trk::TrkVKalVrtFitter::State::m_ApproximateVertex
std::vector< double > m_ApproximateVertex
Definition: TrkVKalVrtFitter.h:420
TrackParticleFwd.h
Trk::VKalVrtControl
Definition: TrkVKalVrtCore.h:44
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
Trk::cascadeV::indexInSimpleCascade
int indexInSimpleCascade
Definition: TrkVKalVrtFitter.h:56
Trk::TrkVKalVrtFitter::VKalVrtConfigureFitterCore
void VKalVrtConfigureFitterCore(int NTRK, State &state) const
Definition: SetFitOptions.cxx:17
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::TrkVKalVrtFitter::State::m_massForConstraint
double m_massForConstraint
Definition: TrkVKalVrtFitter.h:433
Trk::TrkVKalVrtFitter::VKalVrtCvtTool
virtual StatusCode VKalVrtCvtTool(const Amg::Vector3D &Vertex, const TLorentzVector &Momentum, const dvect &CovVrtMom, const long int &Charge, dvect &Perigee, dvect &CovPerigee, IVKalState &istate) const override final
Definition: VKalVrtFitSvc.cxx:364
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
Trk::VKalVrtControlBase
Definition: TrkVKalVrtCore.h:26
Trk::TrkVKalVrtFitter::CvtTrackParticle
StatusCode CvtTrackParticle(std::span< const xAOD::TrackParticle *const > list, int &ntrk, State &state) const
Definition: CvtTrackParticle.cxx:27
Trk::TrkVKalVrtFitter::State::m_eventContext
const EventContext * m_eventContext
Definition: TrkVKalVrtFitter.h:403
Trk::PartialMassConstraint::Mass
double Mass
Definition: TrkVKalVrtFitter.h:46
Trk::TrkVKalVrtFitter::m_usePassWithTrkErr
bool m_usePassWithTrkErr
Definition: TrkVKalVrtFitter.h:352
Trk::PartialMassConstraint::pseudoInVrt
std::vector< VertexID > pseudoInVrt
Definition: TrkVKalVrtFitter.h:45
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
Trk::TrkVKalVrtFitter::setMassInputParticles
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:187
Trk::TrkVKalVrtFitter::m_firstMeasuredPoint
SimpleProperty< bool > m_firstMeasuredPoint
Definition: TrkVKalVrtFitter.h:339
Trk::TrkVKalVrtFitter::m_usePassNear
bool m_usePassNear
Definition: TrkVKalVrtFitter.h:351
Trk::TrkVKalVrtFitter::State::m_usePointingCnst
bool m_usePointingCnst
Definition: TrkVKalVrtFitter.h:425
Trk::TrkVKalVrtFitter::State::m_apar
double m_apar[NTrMaxVFit][5]
Definition: TrkVKalVrtFitter.h:396
Trk::TrkVKalVrtFitter::State::m_ErrMtx
std::vector< double > m_ErrMtx
Definition: TrkVKalVrtFitter.h:417
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
VKalExtPropagator.h
Trk::TrkVKalVrtFitter::State::m_RobustScale
double m_RobustScale
Definition: TrkVKalVrtFitter.h:437
Trk::TrkVKalVrtFitter
Definition: TrkVKalVrtFitter.h:67