ATLAS Offline Software
Loading...
Searching...
No Matches
TrkVKalVrtFitter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
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//
29class IChronoStatSvc;
30class EventContext;
31
32namespace Trk{
33
34
35 enum { NTrMaxVFit=200 };
36 typedef std::vector<double> dvect;
37 class IExtrapolator;
38 class IMagneticFieldTool;
39 class Track;
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//
141 const std::vector<const xAOD::TrackParticle*>& list,
142 std::span<const double> particleMass,
143 IVKalState& istate,
144 double massConstraint = 0.) const override final;
145
146 VertexID nextVertex(const std::vector<const xAOD::TrackParticle*>& list,
147 std::span<const double> particleMass,
148 IVKalState& istate,
149 double massConstraint = 0.) const override final;
150
151 VertexID nextVertex(const std::vector<const xAOD::TrackParticle*>& list,
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
161 StatusCode addMassConstraint(
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
171 const EventContext& ctx) const override final;
172
173 virtual StatusCode VKalVrtFit(
174 const std::vector<const xAOD::TrackParticle*>&,
175 const std::vector<const xAOD::NeutralParticle*>&,
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
186 virtual StatusCode VKalVrtFit(
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
198 virtual StatusCode VKalVrtFit(
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 //------
211 virtual StatusCode VKalVrtCvtTool(const Amg::Vector3D& Vertex,
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(
220 std::span<const xAOD::TrackParticle* const>,
221 Amg::Vector3D& Vertex, double &minDZ,
222 IVKalState& istate) const;
223
224 virtual StatusCode VKalVrtFitFast(
225 const std::span<const xAOD::TrackParticle* const>,
227 IVKalState& istate) const override final;
228
229 virtual StatusCode VKalVrtFitFast(
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
239 virtual StatusCode VKalGetTrkWeights(
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
248 virtual StatusCode VKalGetMassError(
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
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 Gaudi::Property<int> m_Robustness{this, "Robustness", 0};
321 Gaudi::Property<double> m_RobustScale{this, "RobustScale", 1.0};
322 Gaudi::Property<double> m_cascadeCnstPrecision{this, "CascadeCnstPrecision", 1.e-4};
323 Gaudi::Property<double> m_massForConstraint{this, "MassForConstraint", -1.0};
324 Gaudi::Property<int> m_IterationNumber{this, "IterationNumber", 0};
325 Gaudi::Property<double> m_IterationPrecision{this, "IterationPrecision", 0.0};
326 Gaudi::Property<double> m_IDsizeR{this, "IDsizeR", 1150.0};
327 Gaudi::Property<double> m_IDsizeZ{this, "IDsizeZ", 3000.0};
328 Gaudi::Property<double> m_MSsizeR{this, "MSsizeR", 8000.0};
329 Gaudi::Property<double> m_MSsizeZ{this, "MSsizeZ", 10000.0};
330 Gaudi::Property<std::vector<double>> m_c_VertexForConstraint{this, "VertexForConstraint", {0,0,0}};
331 Gaudi::Property<std::vector<double>> m_c_CovVrtForConstraint{this, "CovVrtForConstraint", {0,0,0,0,0,0}};
332 Gaudi::Property<std::vector<double>> m_c_MassInputParticles{this, "InputParticleMasses", {}, "List of masses of input particles (pions assumed if absent)"};
333
334 ToolHandle<IExtrapolator> m_extPropagator{this, "Extrapolator", "", "External propagator"};
335 // Read handle for conditions object to get the field cache
338 "AtlasFieldCacheCondObj",
339 "fieldCondObj",
340 "Name of the Magnetic Field key" };
341 Gaudi::Property<bool> m_firstMeasuredPoint{this, "FirstMeasuredPoint", false, "Use FirstMeasuredPoint strategy in fits"};
342 Gaudi::Property<bool> m_firstMeasuredPointLimit{this, "FirstMeasuredPointLimit", false, "Use FirstMeasuredPointLimit strategy"};
343 Gaudi::Property<bool> m_firstMeasuredRadiusLimit{this, "FirstMeasuredRadiusLimit", false,
344 "Use radius of FirstMeasuredRadiusLimit as maximal vertex radius"};
345 Gaudi::Property<bool> m_makeExtendedVertex{this, "MakeExtendedVertex", false, "Return VxCandidate with full covariance matrix"};
346 Gaudi::Property<bool> m_useFixedField{this, "useFixedField", false, "Use fixed magnetic field instead of exact Atlas one"};
347
348 bool m_isAtlasField{false}; // To allow callback and then field first call only at execute stage
349
350 Gaudi::Property<bool> m_useAprioriVertex{this, "useAprioriVertexCnst", false, "Use a priori vertex constraint"};
351 Gaudi::Property<bool> m_useThetaCnst{this, "useThetaCnst", false, "Use angle dTheta=0 constraint"};
352 Gaudi::Property<bool> m_usePhiCnst{this, "usePhiCnst", false, "Use angle dPhi=0 constraint"};
353 Gaudi::Property<bool> m_usePointingCnst{this, "usePointingCnst", false, "Use pointing to other vertex constraint"};
354 Gaudi::Property<bool> m_useZPointingCnst{this, "useZPointingCnst", false, "Use ZPointing to other vertex constraint"};
355 Gaudi::Property<bool> m_usePassNear{this, "usePassNearCnst", false, "Use combined particle pass near other vertex constraint"};
356 Gaudi::Property<bool> m_usePassWithTrkErr{this, "usePassWithTrkErrCnst", false, "Use pass near with combined particle errors constraint"};
357 Gaudi::Property<bool> m_frozenVersionForBTagging{this, "FrozenVersionForBTagging", false, "Frozen version for BTagging"};
358 Gaudi::Property<bool> m_allowUltraDisplaced{this, "allowUltraDisplaced", false, "Allow ultra displaced vertices"};
360
361 // Track material effects control
362 //
364 {
365 // Track reference point(hit) in global ATLAS frame
368 int TrkID;
370 double prtMass;
371 Amg::Vector3D trkSavedLocalVertex; // Local VKalVrtCore vertex
372 };
373
375 {
376 public:
378 std::vector<const xAOD::TrackParticle*> m_partListForCascade;
379
380 std::vector<double> m_partMassForCascade;
381 std::vector<PartialMassConstraint> m_partMassCnstForCascade;
382 //
383 std::vector<cascadeV> m_cascadeVList; // list of cascade vertex objects
384 };
385
386 class State : public IVKalState
387 {
388 public:
389 //
390 // Origin of global reference frame.
391 // (0,0,0) by default but can be changed by input tracks
392 //
393 double m_refFrameX = 0;
394 double m_refFrameY = 0;
395 double m_refFrameZ = 0;
396 std::vector<TrkMatControl> m_trkControl;
397
398 //
399 // Arrays needed for fitting kernel
400 //
401 double m_apar[NTrMaxVFit][5]{}; // used only for fit preparation
402 double m_awgt[NTrMaxVFit][15]{}; // used only for fit preparation
403 long int m_ich[NTrMaxVFit]{};
404 double m_parfs[NTrMaxVFit][3]{};
405
408 const EventContext* m_eventContext = nullptr;
410
412
413 double m_save_xyzfit[3]{}; // Save vertex after successful fit
414
415 int m_FitStatus = 0; /* Fit Status flag*/
416 /* =0 - no fit. All "after fit" routines fail*/
417 /* >1 - good fit. "After fit" routines work*/
418
419 //
420 // Array for full error matrix
421 //
422 std::vector<double> m_ErrMtx;
423
424 int m_planeCnstNDOF = 0; /* NDOF addition if plane constraint is used */
425 std::vector<double> m_ApproximateVertex;
426
427 bool m_useAprioriVertex = false;
428 bool m_useThetaCnst = false;
429 bool m_usePhiCnst = false;
430 bool m_usePointingCnst = false;
431 bool m_useZPointingCnst = false;
432 bool m_usePassNear = false;
436
437 std::vector<double> m_VertexForConstraint;
438 std::vector<double> m_CovVrtForConstraint;
440 std::vector<double> m_partMassCnst;
441 std::vector<std::vector<int>> m_partMassCnstTrk;
443 double m_RobustScale = 1;
444 std::vector<double> m_MassInputParticles;
445 double m_parPlaneCnst[4]{};
446 double m_cnstRadius{};
447 double m_cnstRadiusRef[2]{};
448
449
450 std::unique_ptr<CascadeState> m_cascadeState;
451
454 VKalVrtControlBase(&m_fitField, nullptr, nullptr, nullptr, this))
455 {
456 m_ApproximateVertex.reserve(3);
457 }
458 };
459
460//-----------------------------------------------------------------
461// Cascade related stuff
462//
463 static void makeSimpleCascade(std::vector< std::vector<int> > &, std::vector< std::vector<int> > &,
464 CascadeState& cstate) ;
465 static void printSimpleCascade(std::vector< std::vector<int> > &, std::vector< std::vector<int> > &,
466 const CascadeState& cstate) ;
467 static int findPositions(const std::vector<int> &,const std::vector<int> &, std::vector<int> &) ;
468 static int getSimpleVIndex( const VertexID &, const CascadeState& cstate) ;
469 static int indexInV( const VertexID &, const CascadeState& cstate) ;
470 static int getCascadeNDoF (const CascadeState& cstate) ;
471//----------------------
472// Control variables
473//
474
475 double m_BMAG{1.997}; /* const magnetic field if needed */
476 double m_CNVMAG{0.29979246}; /* conversion constant for MeV and MM */
477
478
481//
482//
483//
484
485
486
487//
488// Private technical functions
489//
491 // context-aware init of state
492 void initState (const EventContext& ctx, State& state) const;
493 // init of state for backwards compartibility - calls context-aware version. Can be removed
494 // when fully migrated to EventContext
495 void initState (State& state) const;
496
497//
498//
499 static void FillMatrixP(AmgSymMatrix(5)& , std::vector<double>& ) ;
500 static void FillMatrixP(int iTrk, AmgSymMatrix(5)& , std::vector<double>& ) ;
501 static Amg::MatrixX * GiveFullMatrix(int NTrk, std::vector<double>&) ;
502 bool convertAmg5SymMtx(const AmgSymMatrix(5)*, double[15] ) const;
503
504 void VKalTransform(double MAG,
505 double A0V,
506 double ZV,
507 double PhiV,
508 double ThetaV,
509 double PInv,
510 const double[15],
511 long int& Charge,
512 double[5],
513 double[15]) const;
514
516 const Amg::Vector3D&,
517 const dvect&,
518 const dvect&,
519 const std::vector<dvect>&,
520 double,
521 State& state) const;
522
523 StatusCode CvtPerigee(const std::vector<const Perigee*>& list,
524 int& ntrk,
525 State& state) const;
526
527 StatusCode CvtTrackParticle(
528 std::span<const xAOD::TrackParticle* const> list,
529 int& ntrk,
530 State& state) const;
531
532 StatusCode CvtNeutralParticle(
533 const std::vector<const xAOD::NeutralParticle*>& list,
534 int& ntrk,
535 State& state) const;
536
537 StatusCode CvtTrackParameters(
538 const std::vector<const TrackParameters*>& InpTrk,
539 int& ntrk,
540 State& state) const;
541
542 StatusCode CvtNeutralParameters(
543 const std::vector<const NeutralParameters*>& InpTrk,
544 int& ntrk,
545 State& state) const;
546
547 void VKalVrtConfigureFitterCore(int NTRK, State& state) const;
548
549 void VKalToTrkTrack(double curBMAG,
550 double vp1,
551 double vp2,
552 double vp3,
553 double& tp1,
554 double& tp2,
555 double& tp3) const;
556
557 int VKalVrtFit3(int ntrk,
559 TLorentzVector& Momentum,
560 long int& Charge,
562 dvect& Chi2PerTrk,
563 std::vector<std::vector<double>>& TrkAtVrt,
564 double& Chi2,
565 State& state,
566 bool ifCovV0) const;
567
568 std::unique_ptr<Perigee> CreatePerigee(double Vx,
569 double Vy,
570 double Vz,
571 const std::vector<double>& VKPerigee,
572 const std::vector<double>& VKCov,
573 State& state) const;
574
575 //
576 //
577 static const Perigee* GetPerigee(const TrackParameters* i_ntrk) ;
578
579 static int VKalGetNDOF(const State& state) ;
580 };
581
582} //end of namespace
583
584#endif
#define AmgSymMatrix(dim)
Base class for VKal state object.
Eigen::Matrix< double, 3, 1 > Vector3D
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Support class for PropertyMgr.
Definition Property.h:23
Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about p...
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const =0
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.
std::vector< const xAOD::TrackParticle * > m_partListForCascade
std::vector< double > m_partMassForCascade
std::vector< PartialMassConstraint > m_partMassCnstForCascade
std::vector< cascadeV > m_cascadeVList
std::vector< double > m_partMassCnst
std::vector< double > m_MassInputParticles
MagField::AtlasFieldCache m_fieldCache
std::vector< double > m_ApproximateVertex
double m_apar[NTrMaxVFit][5]
std::vector< double > m_VertexForConstraint
double m_awgt[NTrMaxVFit][15]
std::vector< double > m_CovVrtForConstraint
double m_parfs[NTrMaxVFit][3]
std::vector< std::vector< int > > m_partMassCnstTrk
std::unique_ptr< CascadeState > m_cascadeState
const TrackParameters * m_globalFirstHit
std::vector< double > m_ErrMtx
const EventContext * m_eventContext
std::vector< TrkMatControl > m_trkControl
static int getSimpleVIndex(const VertexID &, const CascadeState &cstate)
virtual std::unique_ptr< Trk::Perigee > CreatePerigee(const std::vector< double > &VKPerigee, const std::vector< double > &VKCov, IVKalState &istate) const override final
StatusCode CvtTrackParameters(const std::vector< const TrackParameters * > &InpTrk, int &ntrk, State &state) const
void VKalVrtConfigureFitterCore(int NTRK, State &state) const
TrkVKalVrtFitter(const std::string &t, const std::string &name, const IInterface *parent)
const IExtrapolator * m_InDetExtrapolator
Pointer to Extrapolator AlgTool.
Gaudi::Property< bool > m_makeExtendedVertex
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
VertexID nextVertex(const std::vector< const xAOD::TrackParticle * > &list, std::span< const double > particleMass, IVKalState &istate, double massConstraint=0.) const override final
static int indexInV(const VertexID &, const CascadeState &cstate)
Gaudi::Property< double > m_MSsizeZ
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
virtual void setCnstType(int, IVKalState &istate) const override final
bool convertAmg5SymMtx(const AmgSymMatrix(5) *, double[15]) const
static Amg::MatrixX * GiveFullMatrix(int NTrk, std::vector< double > &)
Gaudi::Property< bool > m_usePhiCnst
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
virtual void setCovVrtForConstraint(double XX, double XY, double YY, double XZ, double YZ, double ZZ, IVKalState &istate) const override final
virtual StatusCode VKalVrtFitFast(std::span< const xAOD::TrackParticle *const >, Amg::Vector3D &Vertex, double &minDZ, IVKalState &istate) const
StatusCode CvtPerigee(const std::vector< const Perigee * > &list, int &ntrk, State &state) const
virtual StatusCode VKalGetMassError(double &Mass, double &MassError, const IVKalState &istate) const override final
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
virtual void setVertexForConstraint(const xAOD::Vertex &, IVKalState &istate) const override final
Gaudi::Property< bool > m_usePointingCnst
Gaudi::Property< double > m_IDsizeZ
static int findPositions(const std::vector< int > &, const std::vector< int > &, std::vector< int > &)
ToolHandle< IExtrapolator > m_extPropagator
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
Gaudi::Property< int > m_IterationNumber
static const Perigee * GetPerigee(const TrackParameters *i_ntrk)
Gaudi::Property< bool > m_allowUltraDisplaced
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override final
Interface for MeasuredPerigee with starting point.
Gaudi::Property< double > m_RobustScale
static void makeSimpleCascade(std::vector< std::vector< int > > &, std::vector< std::vector< int > > &, CascadeState &cstate)
void initState(const EventContext &ctx, State &state) const
virtual StatusCode initialize() override final
Gaudi::Property< std::vector< double > > m_c_CovVrtForConstraint
xAOD::Vertex * makeXAODVertex(int, const Amg::Vector3D &, const dvect &, const dvect &, const std::vector< dvect > &, double, State &state) const
virtual StatusCode VKalGetFullCov(long int, dvect &CovMtx, IVKalState &istate, bool=false) const override final
Gaudi::Property< double > m_massForConstraint
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.
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
Gaudi::Property< bool > m_frozenVersionForBTagging
Gaudi::Property< bool > m_firstMeasuredPoint
Gaudi::Property< int > m_Robustness
virtual double VKalGetImpact(const xAOD::TrackParticle *, const Amg::Vector3D &Vertex, const long int Charge, dvect &Impact, dvect &ImpactError, IVKalState &istate) const override final
static void printSimpleCascade(std::vector< std::vector< int > > &, std::vector< std::vector< int > > &, const CascadeState &cstate)
virtual StatusCode VKalGetTrkWeights(dvect &Weights, const IVKalState &istate) const override final
static int VKalGetNDOF(const State &state)
Gaudi::Property< bool > m_usePassWithTrkErr
Gaudi::Property< double > m_cascadeCnstPrecision
static void FillMatrixP(AmgSymMatrix(5)&, std::vector< double > &)
Gaudi::Property< bool > m_useZPointingCnst
Gaudi::Property< bool > m_useAprioriVertex
Gaudi::Property< bool > m_firstMeasuredRadiusLimit
Gaudi::Property< bool > m_useFixedField
virtual StatusCode finalize() override final
VxCascadeInfo * fitCascade(IVKalState &istate, const Vertex *primVertex=0, bool FirstDecayAtPV=false) const override final
StatusCode CvtTrackParticle(std::span< const xAOD::TrackParticle *const > list, int &ntrk, State &state) const
Gaudi::Property< bool > m_usePassNear
VKalExtPropagator * m_fitPropagator
friend class VKalExtPropagator
virtual void setApproximateVertex(double X, double Y, double Z, IVKalState &istate) const override final
Gaudi::Property< std::vector< double > > m_c_MassInputParticles
Gaudi::Property< std::vector< double > > m_c_VertexForConstraint
virtual void setMassForConstraint(double Mass, IVKalState &istate) const override final
Gaudi::Property< double > m_IterationPrecision
Gaudi::Property< double > m_IDsizeR
Gaudi::Property< bool > m_firstMeasuredPointLimit
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final
virtual void setRobustness(int, IVKalState &istate) const override final
StatusCode CvtNeutralParticle(const std::vector< const xAOD::NeutralParticle * > &list, int &ntrk, State &state) const
Gaudi::Property< double > m_MSsizeR
StatusCode addMassConstraint(VertexID Vertex, const std::vector< const xAOD::TrackParticle * > &tracksInConstraint, const std::vector< VertexID > &verticesInConstraint, IVKalState &istate, double massConstraint) const override final
void VKalToTrkTrack(double curBMAG, double vp1, double vp2, double vp3, double &tp1, double &tp2, double &tp3) const
void setAthenaPropagator(const Trk::IExtrapolator *)
virtual void setRobustScale(double, IVKalState &istate) const override final
StatusCode CvtNeutralParameters(const std::vector< const NeutralParameters * > &InpTrk, int &ntrk, State &state) const
Gaudi::Property< bool > m_useThetaCnst
static int getCascadeNDoF(const CascadeState &cstate)
This class is a simplest representation of a vertex candidate.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
=============================================================================
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersBase< NeutralParametersDim, Neutral > NeutralParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
std::vector< double > dvect
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Vertex_v1 Vertex
Define the latest version of the vertex class.
std::vector< VertexID > pseudoInVrt
std::vector< int > trkInVrt
std::vector< VertexID > mergedIN
VertexID outPointingV
~cascadeV()=default
std::vector< VertexID > inPointingV
std::vector< int > trkInVrt
#define private