BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
KFParticleSIMD.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------
2// The KFParticleSIMD class
3// .
4// @author S.Gorbunov, I.Kisel
5// @version 1.0
6// @since 13.05.07
7//
8// Class to reconstruct and store the decayed particle parameters.
9// The method is described in CBM-SOFT note 2007-003,
10// ``Reconstruction of decayed particles based on the Kalman filter'',
11// http://www.gsi.de/documents/DOC-2007-May-14-1.pdf
12//
13// This class is ALICE interface to general mathematics in KFParticleBaseSIMD
14//
15// -= Copyright &copy ALICE HLT and CBM L1 Groups =-
16//_________________________________________________________________________________
17
18#define NonhomogeneousField
19// #define HomogeneousField
20
21#ifndef KFPARTICLESIMD_H
22#define KFPARTICLESIMD_H
23
24#include "KFParticleBaseSIMD.h"
25#include "TMath.h"
26
27#ifdef HomogeneousField
28class AliVTrack;
29class AliVVertex;
30#endif
31
32#ifdef NonhomogeneousField
33#include "CbmKF.h"
36#include "L1Field.h"
37#endif
38
39class KFParticle;
40
42{
43
44 public:
45 //*
46 //* INITIALIZATION
47 //*
48
49 //* Set magnetic field for all particles
50#ifdef HomogeneousField
51 static void SetField(fvec Bz);
52#endif
53#ifdef NonhomogeneousField
54 void SetField(const L1FieldRegion& field, bool isOneEntry = 0, const int iVec = 0)
55 {
56 if (!isOneEntry)
57 fField = field;
58 else
59 fField.SetOneEntry(field, iVec);
60 }
61#endif
62 //* Constructor (empty)
63
67 , fField()
68#endif
69 {
70 ;
71 }
72
73 //* Destructor (empty)
74
76
77 //* Construction of mother particle by its 2-3-4 daughters
78
79 KFParticleSIMD(const KFParticleSIMD& d1, const KFParticleSIMD& d2, Bool_t gamma = kFALSE);
80
81 KFParticleSIMD(const KFParticleSIMD& d1, const KFParticleSIMD& d2, const KFParticleSIMD& d3);
82
84 const KFParticleSIMD& d2,
85 const KFParticleSIMD& d3,
86 const KFParticleSIMD& d4);
87
88 //* Initialisation from "cartesian" coordinates ( X Y Z Px Py Pz )
89 //* Parameters, covariance matrix, charge and PID hypothesis should be provided
90
91 void Create(const fvec Param[], const fvec Cov[], Int_t Charge, fvec mass /*Int_t PID*/);
92
93#ifdef HomogeneousField
94 //* Initialisation from ALICE track, PID hypothesis shoould be provided
95
96 KFParticleSIMD(const AliVTrack& track, Int_t PID);
97
98 //* Initialisation from VVertex
99
100 KFParticleSIMD(const AliVVertex& vertex);
101#endif
102
103#ifdef NonhomogeneousField
104 KFParticleSIMD(CbmKFTrackInterface* Track[], int NTracks, Int_t* qHypo = 0, const Int_t* pdg = 0);
105 KFParticleSIMD(CbmKFTrackInterface& Track, Int_t* qHypo = 0, const Int_t* pdg = 0);
107 void Create(CbmKFTrackInterface* Track[], int NTracks, Int_t* qHypo = 0, const Int_t* pdg = 0);
108#endif
109 KFParticleSIMD(KFParticle* part[], const int nPart = 0);
111
112 //* Initialise covariance matrix and set current parameters to 0.0
113
114 void Initialize();
115
116 //* Set decay vertex parameters for linearisation
117
118 void SetVtxGuess(fvec x, fvec y, fvec z);
119
120 //*
121 //* ACCESSORS
122 //*
123
124 //* Simple accessors
125
126 fvec GetX() const; //* x of current position
127 fvec GetY() const; //* y of current position
128 fvec GetZ() const; //* z of current position
129 fvec GetPx() const; //* x-compoment of 3-momentum
130 fvec GetPy() const; //* y-compoment of 3-momentum
131 fvec GetPz() const; //* z-compoment of 3-momentum
132 fvec GetE() const; //* energy
133 fvec GetS() const; //* decay length / momentum
134 fvec GetQ() const; //* charge
135 fvec GetChi2() const; //* chi^2
136 fvec GetNDF() const; //* Number of Degrees of Freedom
137
139
140 const fvec& X() const { return fP[0]; }
141 const fvec& Y() const { return fP[1]; }
142 const fvec& Z() const { return fP[2]; }
143 const fvec& Px() const { return fP[3]; }
144 const fvec& Py() const { return fP[4]; }
145 const fvec& Pz() const { return fP[5]; }
146 const fvec& E() const { return fP[6]; }
147 const fvec& S() const { return fP[7]; }
148 const fvec& Q() const { return fQ; }
149 const fvec& Chi2() const { return fChi2; }
150 const fvec& NDF() const { return fNDF; }
151
152 fvec GetParameter(int i) const;
153 fvec GetCovariance(int i) const;
154 fvec GetCovariance(int i, int j) const;
155
156 //* Accessors with calculations, value returned w/o error flag
157
158 fvec GetP() const; //* momentum
159 fvec GetPt() const; //* transverse momentum
160 fvec GetEta() const; //* pseudorapidity
161 fvec GetPhi() const; //* phi
162 fvec GetMomentum() const; //* momentum (same as GetP() )
163 fvec GetMass() const; //* mass
164 fvec GetDecayLength() const; //* decay length
165 fvec GetDecayLengthXY() const; //* decay length in XY
166 fvec GetLifeTime() const; //* life time
167 fvec GetR() const; //* distance to the origin
168
169 //* Accessors to estimated errors
170
171 fvec GetErrX() const; //* x of current position
172 fvec GetErrY() const; //* y of current position
173 fvec GetErrZ() const; //* z of current position
174 fvec GetErrPx() const; //* x-compoment of 3-momentum
175 fvec GetErrPy() const; //* y-compoment of 3-momentum
176 fvec GetErrPz() const; //* z-compoment of 3-momentum
177 fvec GetErrE() const; //* energy
178 fvec GetErrS() const; //* decay length / momentum
179 fvec GetErrP() const; //* momentum
180 fvec GetErrPt() const; //* transverse momentum
181 fvec GetErrEta() const; //* pseudorapidity
182 fvec GetErrPhi() const; //* phi
183 fvec GetErrMomentum() const; //* momentum
184 fvec GetErrMass() const; //* mass
185 fvec GetErrDecayLength() const; //* decay length
186 fvec GetErrDecayLengthXY() const; //* decay length in XY
187 fvec GetErrLifeTime() const; //* life time
188 fvec GetErrR() const; //* distance to the origin
189
190 //* Accessors with calculations( &value, &estimated sigma )
191 //* error flag returned (0 means no error during calculations)
192
193 fvec GetP(fvec& P, fvec& SigmaP) const; //* momentum
194 fvec GetPt(fvec& Pt, fvec& SigmaPt) const; //* transverse momentum
195 fvec GetEta(fvec& Eta, fvec& SigmaEta) const; //* pseudorapidity
196 fvec GetPhi(fvec& Phi, fvec& SigmaPhi) const; //* phi
197 fvec GetMomentum(fvec& P, fvec& SigmaP) const; //* momentum
198 fvec GetMass(fvec& M, fvec& SigmaM) const; //* mass
199 fvec GetDecayLength(fvec& L, fvec& SigmaL) const; //* decay length
200 fvec GetDecayLengthXY(fvec& L, fvec& SigmaL) const; //* decay length in XY
201 fvec GetLifeTime(fvec& T, fvec& SigmaT) const; //* life time
202 fvec GetR(fvec& R, fvec& SigmaR) const; //* R
203
204 //*
205 //* MODIFIERS
206 //*
207
208 fvec& X();
209 fvec& Y();
210 fvec& Z();
211 fvec& Px();
212 fvec& Py();
213 fvec& Pz();
214 fvec& E();
215 fvec& S();
216 fvec& Q();
217 fvec& Chi2();
218 fvec& NDF();
219
220 fvec& Parameter(int i);
221 fvec& Covariance(int i);
222 fvec& Covariance(int i, int j);
223 fvec* Parameters();
225
226 void GetKFParticle(KFParticle& Part, int iPart = 0);
227 void GetKFParticle(KFParticle* Part, int nPart = 0);
228
229 //*
230 //* CONSTRUCTION OF THE PARTICLE BY ITS DAUGHTERS AND MOTHER
231 //* USING THE KALMAN FILTER METHOD
232 //*
233
234 //* Add daughter to the particle
235
236 void AddDaughter(const KFParticleSIMD& Daughter);
237
238 //* Add daughter via += operator: ex.{ D0; D0+=Pion; D0+= Kaon; }
239
240 void operator+=(const KFParticleSIMD& Daughter);
241
242 //* Set production vertex
243
244 void SetProductionVertex(const KFParticleSIMD& Vtx);
245
246 //* Set mass constraint
247
248 void SetMassConstraint(fvec Mass, fvec SigmaMass = 0);
249
250 //* Set no decay length for resonances
251
252 void SetNoDecayLength();
253
254 //* Everything in one go
255
256 void Construct(const KFParticleSIMD* vDaughters[],
257 int nDaughters,
258 const KFParticleSIMD* ProdVtx = 0,
259 Float_t Mass = -1,
260 Bool_t IsConstrained = 0,
261 Bool_t isAtVtxGuess = 0);
262
263 //*
264 //* TRANSPORT
265 //*
266 //* ( main transportation parameter is S = SignedPath/Momentum )
267 //* ( parameters of decay & production vertices are stored locally )
268 //*
269
270 //* Transport the particle to its decay vertex
271
273
274 //* Transport the particle to its production vertex
275
277
278 //* Transport the particle close to xyz[] point
279
280 void TransportToPoint(const fvec xyz[]);
281
282 //* Transport the particle close to VVertex
283#ifdef HomogeneousField
284 void TransportToVertex(const AliVVertex& v);
285#endif
286 //* Transport the particle close to another particle p
287
288 void TransportToParticle(const KFParticleSIMD& p);
289
290 //* Transport the particle on dS parameter (SignedPath/Momentum)
291
292 void TransportToDS(fvec dS);
293
294 //* Get dS to a certain space point
295
296 fvec GetDStoPoint(const fvec xyz[]) const;
297
298 //* Get dS to other particle p (dSp for particle p also returned)
299
300 void GetDStoParticle(const KFParticleSIMD& p, fvec& DS, fvec& DSp) const;
301
302 //* Get dS to other particle p in XY-plane
303
304 void GetDStoParticleXY(const KFParticleBaseSIMD& p, fvec& DS, fvec& DSp) const;
305
306 //*
307 //* OTHER UTILITIES
308 //*
309
310 //* Calculate distance from another object [cm]
311
312 fvec GetDistanceFromVertex(const fvec vtx[]) const;
313 fvec GetDistanceFromVertex(const KFParticleSIMD& Vtx) const;
314#ifdef HomogeneousField
315 fvec GetDistanceFromVertex(const AliVVertex& Vtx) const;
316#endif
318
319 //* Calculate sqrt(Chi2/ndf) deviation from another object
320 //* ( v = [xyz]-vertex, Cv=[Cxx,Cxy,Cyy,Cxz,Cyz,Czz]-covariance matrix )
321
322 fvec GetDeviationFromVertex(const fvec v[], const fvec Cv[] = 0) const;
324#ifdef HomogeneousField
325 fvec GetDeviationFromVertex(const AliVVertex& Vtx) const;
326#endif
328
329 //* Calculate distance from another object [cm] in XY-plane
330
331 fvec GetDistanceFromVertexXY(const fvec vtx[], fvec& val, fvec& err) const;
332 fvec GetDistanceFromVertexXY(const fvec vtx[], const fvec Cv[], fvec& val, fvec& err) const;
333 fvec GetDistanceFromVertexXY(const KFParticleSIMD& Vtx, fvec& val, fvec& err) const;
334#ifdef HomogeneousField
335 fvec GetDistanceFromVertexXY(const AliVVertex& Vtx, fvec& val, fvec& err) const;
336#endif
337
338 fvec GetDistanceFromVertexXY(const fvec vtx[]) const;
340#ifdef HomogeneousField
341 fvec GetDistanceFromVertexXY(const AliVVertex& Vtx) const;
342#endif
344
345 //* Calculate sqrt(Chi2/ndf) deviation from another object in XY plane
346 //* ( v = [xyz]-vertex, Cv=[Cxx,Cxy,Cyy,Cxz,Cyz,Czz]-covariance matrix )
347
348 fvec GetDeviationFromVertexXY(const fvec v[], const fvec Cv[] = 0) const;
350#ifdef HomogeneousField
351 fvec GetDeviationFromVertexXY(const AliVVertex& Vtx) const;
352#endif
354
355 //* Calculate opennig angle between two particles
356
357 fvec GetAngle(const KFParticleSIMD& p) const;
358 fvec GetAngleXY(const KFParticleSIMD& p) const;
359 fvec GetAngleRZ(const KFParticleSIMD& p) const;
360
361 //* Subtract the particle from the vertex
362
365
366 //* Special method for creating gammas
367
368 void ConstructGamma(const KFParticleSIMD& daughter1, const KFParticleSIMD& daughter2);
369
370 // * Pseudo Proper Time of decay = (r*pt) / |pt| * M/|pt|
371 // @primVertex - primary vertex
372 // @mass - mass of the mother particle (in the case of "Hb -> JPsi" it would be JPsi mass)
373 // @*timeErr2 - squared error of the decay time. If timeErr2 = 0 it isn't calculated
374 fvec GetPseudoProperDecayTime(const KFParticleSIMD& primVertex, const fvec& mass, fvec* timeErr2 = 0) const;
375
376 protected:
377 //*
378 //* INTERNAL STUFF
379 //*
380
381 //* Method to access ALICE field
382#ifdef HomogeneousField
383 static fvec GetFieldAlice();
384#endif
385 //* Other methods required by the abstract KFParticleBaseSIMD class
386
387 void GetFieldValue(const fvec xyz[], fvec B[]) const;
388 void GetDStoParticle(const KFParticleBaseSIMD& p, fvec& DS, fvec& DSp) const;
389 void Transport(fvec dS, fvec P[], fvec C[]) const;
390 static void GetExternalTrackParam(const KFParticleBaseSIMD& p, fvec& X, fvec& Alpha, fvec P[5]);
391
392 // void GetDStoParticleALICE( const KFParticleBaseSIMD &p, fvec &DS, fvec &DS1 ) const;
393
394 private:
395#ifdef HomogeneousField
396 static fvec fgBz; //* Bz compoment of the magnetic field
397#endif
398#ifdef NonhomogeneousField
400#endif
401};
402
403//---------------------------------------------------------------------
404//
405// Inline implementation of the KFParticleSIMD methods
406//
407//---------------------------------------------------------------------
408
409#ifdef HomogeneousField
410inline void KFParticleSIMD::SetField(fvec Bz)
411{
412 fgBz = Bz;
413}
414#endif
415
417#ifdef NonhomogeneousField
418 : fField()
419#endif
420{
421 KFParticleSIMD mother;
422 mother += d1;
423 mother += d2;
424 mother += d3;
425 *this = mother;
426}
427
429 const KFParticleSIMD& d2,
430 const KFParticleSIMD& d3,
431 const KFParticleSIMD& d4)
432#ifdef NonhomogeneousField
433 : fField()
434#endif
435{
436 KFParticleSIMD mother;
437 mother += d1;
438 mother += d2;
439 mother += d3;
440 mother += d4;
441 *this = mother;
442}
443
448
450{
452}
453
455{
457}
458
460{
462}
463
465{
467}
468
470{
472}
473
475{
477}
478
480{
482}
483
485{
487}
488
490{
492}
493
495{
497}
498
500{
502}
503
505{
507}
508
513
518
519inline fvec KFParticleSIMD::GetCovariance(int i, int j) const
520{
522}
523
525{
526 fvec par, err;
527 fvec mask = KFParticleBaseSIMD::GetMomentum(par, err);
528 return ((!mask) & par);
529}
530
532{
533 fvec par, err;
534 fvec mask = KFParticleBaseSIMD::GetPt(par, err);
535 return ((!mask) & par);
536}
537
539{
540 fvec par, err;
541 fvec mask = KFParticleBaseSIMD::GetEta(par, err);
542 return ((!mask) & par);
543}
544
546{
547 fvec par, err;
548 fvec mask = KFParticleSIMD::GetPhi(par, err);
549 return ((!mask) & par);
550}
551
553{
554 fvec par, err;
555 fvec mask = KFParticleSIMD::GetMomentum(par, err);
556 return ((!mask) & par);
557}
558
560{
561 fvec par, err;
562 fvec mask = KFParticleSIMD::GetMass(par, err);
563 return ((!mask) & par);
564}
565
567{
568 fvec par, err;
569 fvec mask = KFParticleSIMD::GetDecayLength(par, err);
570 return ((!mask) & par);
571}
572
574{
575 fvec par, err;
576 fvec mask = KFParticleSIMD::GetDecayLengthXY(par, err);
577 return ((!mask) & par);
578}
579
581{
582 fvec par, err;
583 fvec mask = KFParticleSIMD::GetLifeTime(par, err);
584 return ((!mask) & par);
585}
586
588{
589 fvec par, err;
590 fvec mask = KFParticleSIMD::GetR(par, err);
591 return ((!mask) & par);
592}
593
595{
596 return sqrt(fabs(GetCovariance(0, 0)));
597}
598
600{
601 return sqrt(fabs(GetCovariance(1, 1)));
602}
603
605{
606 return sqrt(fabs(GetCovariance(2, 2)));
607}
608
610{
611 return sqrt(fabs(GetCovariance(3, 3)));
612}
613
615{
616 return sqrt(fabs(GetCovariance(4, 4)));
617}
618
620{
621 return sqrt(fabs(GetCovariance(5, 5)));
622}
623
625{
626 return sqrt(fabs(GetCovariance(6, 6)));
627}
628
630{
631 return sqrt(fabs(GetCovariance(7, 7)));
632}
633
635{
636 fvec par, err;
637 fvec mask = KFParticleSIMD::GetMomentum(par, err);
638 fvec ret(1.e10);
639 ret = (mask & ret) + ((!mask) & err);
640 return ret;
641}
642
644{
645 fvec par, err;
646 fvec mask = KFParticleSIMD::GetPt(par, err);
647 fvec ret(1.e10);
648 ret = (mask & ret) + ((!mask) & err);
649 return ret;
650}
651
653{
654 fvec par, err;
655 fvec mask = KFParticleSIMD::GetEta(par, err);
656 fvec ret(1.e10);
657 ret = (mask & ret) + ((!mask) & err);
658 return ret;
659}
660
662{
663 fvec par, err;
664 fvec mask = KFParticleSIMD::GetPhi(par, err);
665 fvec ret(1.e10);
666 ret = (mask & ret) + ((!mask) & err);
667 return ret;
668}
669
671{
672 fvec par, err;
673 fvec mask = KFParticleSIMD::GetMomentum(par, err);
674 fvec ret(1.e10);
675 ret = (mask & ret) + ((!mask) & err);
676 return ret;
677}
678
680{
681 fvec par, err;
682 fvec mask = KFParticleSIMD::GetMass(par, err);
683 fvec ret(1.e10);
684 ret = (mask & ret) + ((!mask) & err);
685 return ret;
686}
687
689{
690 fvec par, err;
691 fvec mask = KFParticleSIMD::GetDecayLength(par, err);
692 fvec ret(1.e10);
693 ret = (mask & ret) + ((!mask) & err);
694 return ret;
695}
696
698{
699 fvec par, err;
700 fvec mask = KFParticleSIMD::GetDecayLengthXY(par, err);
701 fvec ret(1.e10);
702 ret = (mask & ret) + ((!mask) & err);
703 return ret;
704}
705
707{
708 fvec par, err;
709 fvec mask = KFParticleSIMD::GetLifeTime(par, err);
710 fvec ret(1.e10);
711 ret = (mask & ret) + ((!mask) & err);
712 return ret;
713}
714
716{
717 fvec par, err;
718 fvec mask = KFParticleSIMD::GetR(par, err);
719 fvec ret(1.e10);
720 ret = (mask & ret) + ((!mask) & err);
721 return ret;
722}
723
724inline fvec KFParticleSIMD::GetP(fvec& P, fvec& SigmaP) const
725{
726 return KFParticleBaseSIMD::GetMomentum(P, SigmaP);
727}
728
729inline fvec KFParticleSIMD::GetPt(fvec& Pt, fvec& SigmaPt) const
730{
731 return KFParticleBaseSIMD::GetPt(Pt, SigmaPt);
732}
733
734inline fvec KFParticleSIMD::GetEta(fvec& Eta, fvec& SigmaEta) const
735{
736 return KFParticleBaseSIMD::GetEta(Eta, SigmaEta);
737}
738
739inline fvec KFParticleSIMD::GetPhi(fvec& Phi, fvec& SigmaPhi) const
740{
741 return KFParticleBaseSIMD::GetPhi(Phi, SigmaPhi);
742}
743
744inline fvec KFParticleSIMD::GetMomentum(fvec& P, fvec& SigmaP) const
745{
746 return KFParticleBaseSIMD::GetMomentum(P, SigmaP);
747}
748
749inline fvec KFParticleSIMD::GetMass(fvec& M, fvec& SigmaM) const
750{
751 return KFParticleBaseSIMD::GetMass(M, SigmaM);
752}
753
755{
756 return KFParticleBaseSIMD::GetDecayLength(L, SigmaL);
757}
758
760{
761 return KFParticleBaseSIMD::GetDecayLengthXY(L, SigmaL);
762}
763
764inline fvec KFParticleSIMD::GetLifeTime(fvec& T, fvec& SigmaT) const
765{
766 return KFParticleBaseSIMD::GetLifeTime(T, SigmaT);
767}
768
769inline fvec KFParticleSIMD::GetR(fvec& R, fvec& SigmaR) const
770{
771 return KFParticleBaseSIMD::GetR(R, SigmaR);
772}
773
775{
776 return KFParticleBaseSIMD::X();
777}
778
780{
781 return KFParticleBaseSIMD::Y();
782}
783
785{
786 return KFParticleBaseSIMD::Z();
787}
788
790{
791 return KFParticleBaseSIMD::Px();
792}
793
795{
796 return KFParticleBaseSIMD::Py();
797}
798
800{
801 return KFParticleBaseSIMD::Pz();
802}
803
805{
806 return KFParticleBaseSIMD::E();
807}
808
810{
811 return KFParticleBaseSIMD::S();
812}
813
815{
816 return KFParticleBaseSIMD::Q();
817}
818
820{
822}
823
825{
827}
828
833
838
840{
842}
843
845{
846 return fP;
847}
848
850{
851 return fC;
852}
853
854inline void KFParticleSIMD::operator+=(const KFParticleSIMD& Daughter)
855{
857}
858
859inline void KFParticleSIMD::AddDaughter(const KFParticleSIMD& Daughter)
860{
862}
863
868
869inline void KFParticleSIMD::SetMassConstraint(fvec Mass, fvec SigmaMass)
870{
872}
873
878
879inline void KFParticleSIMD::Construct(const KFParticleSIMD* vDaughters[],
880 int nDaughters,
881 const KFParticleSIMD* ProdVtx,
882 Float_t Mass,
883 Bool_t IsConstrained,
884 Bool_t isAtVtxGuess)
885{
886 KFParticleBaseSIMD::Construct((const KFParticleBaseSIMD**)vDaughters, nDaughters,
887 (const KFParticleBaseSIMD*)ProdVtx, Mass, IsConstrained, isAtVtxGuess);
888
889#ifdef NonhomogeneousField
890 // calculate a field region for the constructed particle
891 L1FieldValue field[3];
892 fvec zField[3] = {0, fP[2] / 2, fP[2]};
893
894 for (int iPoint = 0; iPoint < 3; iPoint++) {
895 for (int iD = 0; iD < nDaughters; ++iD) {
896 L1FieldValue b = const_cast<KFParticleSIMD*>(vDaughters[iD])->fField.Get(zField[iPoint]);
897 field[iPoint].x += b.x;
898 field[iPoint].y += b.y;
899 field[iPoint].z += b.z;
900 }
901 field[iPoint].x /= nDaughters;
902 field[iPoint].y /= nDaughters;
903 field[iPoint].z /= nDaughters;
904 }
905
906 fField.Set(field[2], zField[2], field[1], zField[1], field[0], zField[0]);
907#endif
908}
909
914
919
921{
923}
924#ifdef HomogeneousField
925inline void KFParticleSIMD::TransportToVertex(const AliVVertex& v)
926{
928}
929#endif
931{
932 fvec dS, dSp;
933 GetDStoParticle(p, dS, dSp);
934 TransportToDS(dS);
935}
936
941
942inline fvec KFParticleSIMD::GetDStoPoint(const fvec xyz[]) const
943{
944#ifdef HomogeneousField
945 return KFParticleBaseSIMD::GetDStoPointBz(GetFieldAlice(), xyz);
946#endif
947#ifdef NonhomogeneousField
949#endif
950}
951
952inline void KFParticleSIMD::GetDStoParticle(const KFParticleSIMD& p, fvec& DS, fvec& DSp) const
953{
954 GetDStoParticleXY(p, DS, DSp);
955}
956
961
962inline fvec KFParticleSIMD::GetDeviationFromVertex(const fvec v[], const fvec Cv[]) const
963{
965}
966
971
976#ifdef HomogeneousField
977inline fvec KFParticleSIMD::GetDistanceFromVertex(const AliVVertex& Vtx) const
978{
980}
981
982inline fvec KFParticleSIMD::GetDeviationFromVertex(const AliVVertex& Vtx) const
983{
985}
986#endif
991
996
1001
1006
1007#ifdef HomogeneousField
1008inline fvec KFParticleSIMD::GetFieldAlice()
1009{
1010 return fgBz;
1011}
1012#endif
1013
1014#ifdef HomogeneousField
1015inline void KFParticleSIMD::GetFieldValue(const fvec* /*xyz*/, fvec B[]) const
1016{
1017 B[0] = B[1] = 0;
1018 B[2] = GetFieldAlice();
1019}
1020#endif
1021
1022#ifdef NonhomogeneousField
1023inline void KFParticleSIMD::GetFieldValue(const fvec xyz[], fvec B[]) const
1024{
1025 L1FieldValue mB = const_cast<L1FieldRegion&>(fField).Get(xyz[2]);
1026 B[0] = mB.x;
1027 B[1] = mB.y;
1028 B[2] = mB.z;
1029}
1030#endif
1031
1032inline void KFParticleSIMD::GetDStoParticle(const KFParticleBaseSIMD& p, fvec& DS, fvec& DSp) const
1033{
1034 GetDStoParticleXY(p, DS, DSp);
1035}
1036
1038{
1039#ifdef HomogeneousField
1040 KFParticleBaseSIMD::GetDStoParticleBz(GetFieldAlice(), p, DS, DSp);
1041#endif
1042#ifdef NonhomogeneousField
1044#endif
1045 // GetDStoParticleALICE( p, DS, DSp ) ;
1046}
1047
1048inline void KFParticleSIMD::Transport(fvec dS, fvec P[], fvec C[]) const
1049{
1050#ifdef HomogeneousField
1051 KFParticleBaseSIMD::TransportBz(GetFieldAlice(), dS, P, C);
1052#endif
1053#ifdef NonhomogeneousField
1055#endif
1056}
1057
1058inline void KFParticleSIMD::ConstructGamma(const KFParticleSIMD& daughter1, const KFParticleSIMD& daughter2)
1059{
1060#ifdef HomogeneousField
1061 KFParticleBaseSIMD::ConstructGammaBz(daughter1, daughter2, GetFieldAlice());
1062#endif
1063}
1064
1065#endif
#define NonhomogeneousField
friend F32vec4 fabs(const F32vec4 &a)
Definition P4_F32vec4.h:52
__m128 v
Definition P4_F32vec4.h:1
int i
Definition P4_F32vec4.h:22
F32vec4 fvec
Definition P4_F32vec4.h:231
bool Bool_t
int Int_t
float Float_t
constexpr Bool_t kFALSE
void GetDStoParticleBz(fvec Bz, const KFParticleBaseSIMD &p, fvec &dS, fvec &dS1) const
void SubtractFromParticle(KFParticleBaseSIMD &Vtx) const
const fvec & Q() const
fvec & Covariance(Int_t i)
void ConstructGammaBz(const KFParticleBaseSIMD &daughter1, const KFParticleBaseSIMD &daughter2, fvec Bz)
fvec GetDeviationFromParticle(const KFParticleBaseSIMD &p) const
fvec GetDistanceFromParticle(const KFParticleBaseSIMD &p) const
void operator+=(const KFParticleBaseSIMD &Daughter)
fvec & Parameter(Int_t i)
fvec GetMomentum(fvec &P, fvec &SigmaP) const
const fvec & S() const
const fvec & Px() const
void SetMassConstraint(fvec Mass, fvec SigmaMass=0)
fvec GetR(fvec &R, fvec &SigmaR) const
const fvec & Py() const
void AddDaughter(const KFParticleBaseSIMD &Daughter, Bool_t isAtVtxGuess=0)
const fvec & E() const
const fvec & Pz() const
fvec GetDistanceFromVertex(const fvec vtx[]) const
const fvec & X() const
void TransportCBM(fvec dS, fvec P[], fvec C[]) const
fvec GetDecayLength(fvec &L, fvec &SigmaL) const
fvec GetDecayLengthXY(fvec &L, fvec &SigmaL) const
void SetVtxGuess(fvec x, fvec y, fvec z)
fvec GetCovariance(Int_t i) const
fvec GetDeviationFromVertex(const fvec v[], const fvec Cv[]=0) const
fvec GetLifeTime(fvec &T, fvec &SigmaT) const
void GetDStoParticleCBM(const KFParticleBaseSIMD &p, fvec &dS, fvec &dS1) const
fvec GetDStoPointCBM(const fvec xyz[]) const
fvec GetDStoPointBz(fvec Bz, const fvec xyz[]) const
const fvec & Y() const
void SetProductionVertex(const KFParticleBaseSIMD &Vtx)
void Construct(const KFParticleBaseSIMD *vDaughters[], Int_t nDaughters, const KFParticleBaseSIMD *ProdVtx=0, Float_t Mass=-1, Bool_t IsConstrained=0, Bool_t isAtVtxGuess=0)
fvec GetParameter(Int_t i) const
fvec GetPt(fvec &Pt, fvec &SigmaPt) const
void SubtractFromVertex(KFParticleBaseSIMD &Vtx) const
void TransportBz(fvec Bz, fvec dS, fvec P[], fvec C[]) const
fvec GetPhi(fvec &Phi, fvec &SigmaPhi) const
const fvec & NDF() const
const fvec & Chi2() const
fvec GetEta(fvec &Eta, fvec &SigmaEta) const
fvec GetMass(fvec &M, fvec &SigmaM) const
const fvec & Z() const
fvec GetDistanceFromParticleXY(const KFParticleSIMD &p) const
fvec GetErrPz() const
fvec GetPz() const
fvec GetQ() const
fvec GetPhi() const
fvec GetCovariance(int i) const
const fvec & S() const
fvec GetPy() const
fvec GetNDF() const
fvec GetErrP() const
void TransportToDecayVertex()
fvec GetAngle(const KFParticleSIMD &p) const
void TransportToDS(fvec dS)
fvec GetZ() const
fvec GetChi2() const
void GetFieldValue(const fvec xyz[], fvec B[]) const
fvec GetDeviationFromVertexXY(const fvec v[], const fvec Cv[]=0) const
void SubtractFromParticle(KFParticleSIMD &v) const
void GetDStoParticle(const KFParticleSIMD &p, fvec &DS, fvec &DSp) const
void Construct(const KFParticleSIMD *vDaughters[], int nDaughters, const KFParticleSIMD *ProdVtx=0, Float_t Mass=-1, Bool_t IsConstrained=0, Bool_t isAtVtxGuess=0)
fvec GetErrY() const
fvec GetDStoPoint(const fvec xyz[]) const
void Create(const fvec Param[], const fvec Cov[], Int_t Charge, fvec mass)
fvec GetDeviationFromVertex(const fvec v[], const fvec Cv[]=0) const
static void GetExternalTrackParam(const KFParticleBaseSIMD &p, fvec &X, fvec &Alpha, fvec P[5])
fvec GetPx() const
fvec GetDistanceFromParticle(const KFParticleSIMD &p) const
const fvec & Px() const
void SubtractFromVertex(KFParticleSIMD &v) const
void SetProductionVertex(const KFParticleSIMD &Vtx)
fvec GetPt() const
fvec GetR() const
const fvec & Y() const
void TransportToProductionVertex()
const fvec & E() const
fvec GetErrZ() const
fvec GetErrPt() const
void Transport(fvec dS, fvec P[], fvec C[]) const
fvec & Parameter(int i)
const fvec & Z() const
fvec GetErrS() const
void TransportToParticle(const KFParticleSIMD &p)
fvec GetMomentum() const
void operator+=(const KFParticleSIMD &Daughter)
fvec GetDeviationFromParticle(const KFParticleSIMD &p) const
fvec GetErrEta() const
fvec GetX() const
fvec GetDeviationFromParticleXY(const KFParticleSIMD &p) const
fvec GetAngleRZ(const KFParticleSIMD &p) const
fvec GetLifeTime() const
fvec GetAngleXY(const KFParticleSIMD &p) const
fvec GetErrMass() const
const fvec & NDF() const
const fvec & X() const
fvec GetPseudoProperDecayTime(const KFParticleSIMD &primVertex, const fvec &mass, fvec *timeErr2=0) const
const fvec & Q() const
fvec GetErrLifeTime() const
void SetVtxGuess(fvec x, fvec y, fvec z)
fvec GetEta() const
fvec GetErrMomentum() const
fvec GetErrPx() const
fvec GetE() const
fvec GetErrX() const
fvec GetErrPy() const
void TransportToPoint(const fvec xyz[])
Bool_t GetAtProductionVertex() const
fvec GetMass() const
L1FieldRegion fField
const fvec & Pz() const
fvec * CovarianceMatrix()
fvec GetErrR() const
const fvec & Py() const
void GetKFParticle(KFParticle &Part, int iPart=0)
fvec GetY() const
fvec GetDistanceFromVertex(const fvec vtx[]) const
fvec GetDistanceFromVertexXY(const fvec vtx[], fvec &val, fvec &err) const
fvec & Covariance(int i)
void ConstructGamma(const KFParticleSIMD &daughter1, const KFParticleSIMD &daughter2)
fvec GetP() const
fvec GetParameter(int i) const
const fvec & Chi2() const
void SetField(const L1FieldRegion &field, bool isOneEntry=0, const int iVec=0)
fvec GetDecayLengthXY() const
fvec GetS() const
void GetDStoParticleXY(const KFParticleBaseSIMD &p, fvec &DS, fvec &DSp) const
void SetMassConstraint(fvec Mass, fvec SigmaMass=0)
fvec GetErrPhi() const
fvec GetErrDecayLengthXY() const
fvec GetErrDecayLength() const
fvec GetDecayLength() const
void AddDaughter(const KFParticleSIMD &Daughter)
fvec GetErrE() const
RVec< PromoteType< T > > sqrt(const RVec< T > &v)