BmnRoot
Loading...
Searching...
No Matches
KFParticle.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------
2// The KFParticle 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 KFParticleBase
14//
15// -= Copyright &copy ALICE HLT and CBM L1 Groups =-
16//_________________________________________________________________________________
17
18#define NonhomogeneousField
19//#define HomogeneousField
20
21#ifndef ALIKFPARTICLE_H
22#define ALIKFPARTICLE_H
23
24#include "KFParticleBase.h"
25#include "TMath.h"
26
27#ifdef HomogeneousField
28class AliVTrack;
29class AliVVertex;
30#endif
31
32#ifdef NonhomogeneousField
33#include "CbmKF.h"
36#endif
37
39{
40
41 public:
42
43 //*
44 //* INITIALIZATION
45 //*
46
47 //* Set magnetic field for all particles
48#ifdef HomogeneousField
49 static void SetField( Double_t Bz );
50#endif
51 //* Constructor (empty)
52
54
55 //* Destructor (empty)
56
58
59 //* Construction of mother particle by its 2-3-4 daughters
60
61 KFParticle( const KFParticle &d1, const KFParticle &d2, Bool_t gamma = kFALSE );
62
63 KFParticle( const KFParticle &d1, const KFParticle &d2,
64 const KFParticle &d3 );
65
66 KFParticle( const KFParticle &d1, const KFParticle &d2,
67 const KFParticle &d3, const KFParticle &d4 );
68
69 //* Initialisation from "cartesian" coordinates ( X Y Z Px Py Pz )
70 //* Parameters, covariance matrix, charge and PID hypothesis should be provided
71
72 void Create( const Double_t Param[], const Double_t Cov[], Int_t Charge, Double_t mass /*Int_t PID*/ );
73
74#ifdef HomogeneousField
75 //* Initialisation from ALICE track, PID hypothesis shoould be provided
76
77 KFParticle( const AliVTrack &track, Int_t PID );
78
79 //* Initialisation from VVertex
80
81 KFParticle( const AliVVertex &vertex );
82#endif
83
84#ifdef NonhomogeneousField
85 KFParticle( CbmKFTrackInterface* Track, Double_t *z0=0, Int_t *qHypo=0, Int_t *PID=0 );
87#endif
88
89 void CleanDaughtersId() { fDaughtersIds.clear(); }
90 void SetNDaughters( int n ) { fDaughtersIds.reserve(n); }
91 void AddDaughter( int id ){ fDaughtersIds.push_back(id); }
92
93
94 //* Initialise covariance matrix and set current parameters to 0.0
95
96 void Initialize();
97
98 //* Set decay vertex parameters for linearisation
99
100 void SetVtxGuess( Double_t x, Double_t y, Double_t z );
101
102 //*
103 //* ACCESSORS
104 //*
105
106 //* Simple accessors
107
108 Double_t GetX () const ; //* x of current position
109 Double_t GetY () const ; //* y of current position
110 Double_t GetZ () const ; //* z of current position
111 Double_t GetPx () const ; //* x-compoment of 3-momentum
112 Double_t GetPy () const ; //* y-compoment of 3-momentum
113 Double_t GetPz () const ; //* z-compoment of 3-momentum
114 Double_t GetE () const ; //* energy
115 Double_t GetS () const ; //* decay length / momentum
116 Int_t GetQ () const ; //* charge
117 Double_t GetChi2 () const ; //* chi^2
118 Int_t GetNDF () const ; //* Number of Degrees of Freedom
119
122
123#ifdef NonhomogeneousField
124 float* GetFieldCoeff() { return fieldRegion; }
125 void SetFieldCoeff(float c, int i) { fieldRegion[i] = c; }
126#endif
127
128 const Double_t& X () const { return fP[0]; }
129 const Double_t& Y () const { return fP[1]; }
130 const Double_t& Z () const { return fP[2]; }
131 const Double_t& Px () const { return fP[3]; }
132 const Double_t& Py () const { return fP[4]; }
133 const Double_t& Pz () const { return fP[5]; }
134 const Double_t& E () const { return fP[6]; }
135 const Double_t& S () const { return fP[7]; }
136 const Int_t & Q () const { return fQ; }
137 const Double_t& Chi2 () const { return fChi2; }
138 const Int_t & NDF () const { return fNDF; }
139
140 Double_t GetParameter ( int i ) const ;
141 Double_t GetCovariance( int i ) const ;
142 Double_t GetCovariance( int i, int j ) const ;
143
144 //* Accessors with calculations, value returned w/o error flag
145
146 Double_t GetP () const; //* momentum
147 Double_t GetPt () const; //* transverse momentum
148 Double_t GetEta () const; //* pseudorapidity
149 Double_t GetPhi () const; //* phi
150 Double_t GetMomentum () const; //* momentum (same as GetP() )
151 Double_t GetMass () const; //* mass
152 Double_t GetDecayLength () const; //* decay length
153 Double_t GetDecayLengthXY () const; //* decay length in XY
154 Double_t GetLifeTime () const; //* life time
155 Double_t GetR () const; //* distance to the origin
156
157 //* Accessors to estimated errors
158
159 Double_t GetErrX () const ; //* x of current position
160 Double_t GetErrY () const ; //* y of current position
161 Double_t GetErrZ () const ; //* z of current position
162 Double_t GetErrPx () const ; //* x-compoment of 3-momentum
163 Double_t GetErrPy () const ; //* y-compoment of 3-momentum
164 Double_t GetErrPz () const ; //* z-compoment of 3-momentum
165 Double_t GetErrE () const ; //* energy
166 Double_t GetErrS () const ; //* decay length / momentum
167 Double_t GetErrP () const ; //* momentum
168 Double_t GetErrPt () const ; //* transverse momentum
169 Double_t GetErrEta () const ; //* pseudorapidity
170 Double_t GetErrPhi () const ; //* phi
171 Double_t GetErrMomentum () const ; //* momentum
172 Double_t GetErrMass () const ; //* mass
173 Double_t GetErrDecayLength () const ; //* decay length
174 Double_t GetErrDecayLengthXY () const ; //* decay length in XY
175 Double_t GetErrLifeTime () const ; //* life time
176 Double_t GetErrR () const ; //* distance to the origin
177
178 //* Accessors with calculations( &value, &estimated sigma )
179 //* error flag returned (0 means no error during calculations)
180
181 int GetP ( Double_t &P, Double_t &SigmaP ) const ; //* momentum
182 int GetPt ( Double_t &Pt, Double_t &SigmaPt ) const ; //* transverse momentum
183 int GetEta ( Double_t &Eta, Double_t &SigmaEta ) const ; //* pseudorapidity
184 int GetPhi ( Double_t &Phi, Double_t &SigmaPhi ) const ; //* phi
185 int GetMomentum ( Double_t &P, Double_t &SigmaP ) const ; //* momentum
186 int GetMass ( Double_t &M, Double_t &SigmaM ) const ; //* mass
187 int GetDecayLength ( Double_t &L, Double_t &SigmaL ) const ; //* decay length
188 int GetDecayLengthXY ( Double_t &L, Double_t &SigmaL ) const ; //* decay length in XY
189 int GetLifeTime ( Double_t &T, Double_t &SigmaT ) const ; //* life time
190 int GetR ( Double_t &R, Double_t &SigmaR ) const ; //* R
191 Double_t GetRapidity() const { return 0.5*TMath::Log((fP[6] + fP[5])/(fP[6] - fP[5])); }
192 Double_t GetTheta() const { return TMath::ATan2(GetPt(),fP[5]); }
193
194
195 //*
196 //* MODIFIERS
197 //*
198
199 Double_t & X () ;
200 Double_t & Y () ;
201 Double_t & Z () ;
202 Double_t & Px () ;
203 Double_t & Py () ;
204 Double_t & Pz () ;
205 Double_t & E () ;
206 Double_t & S () ;
207 Int_t & Q () ;
208 Double_t & Chi2 () ;
209 Int_t & NDF () ;
210
211 Double_t & Parameter ( int i ) ;
212 Double_t & Covariance( int i ) ;
213 Double_t & Covariance( int i, int j ) ;
214 Double_t * Parameters () ;
215 Double_t * CovarianceMatrix() ;
216
217 //*
218 //* CONSTRUCTION OF THE PARTICLE BY ITS DAUGHTERS AND MOTHER
219 //* USING THE KALMAN FILTER METHOD
220 //*
221
222
223 //* Add daughter to the particle
224
225 void AddDaughter( const KFParticle &Daughter );
226
227 //* Add daughter via += operator: ex.{ D0; D0+=Pion; D0+= Kaon; }
228
229 void operator +=( const KFParticle &Daughter );
230
231 //* Set production vertex
232
233 void SetProductionVertex( const KFParticle &Vtx );
234
235 //* Set mass constraint
236
237 void SetMassConstraint( Double_t Mass, Double_t SigmaMass = 0 );
238
239 //* Set no decay length for resonances
240
241 void SetNoDecayLength();
242
243 //* Everything in one go
244
245 void Construct( const KFParticle *vDaughters[], int nDaughters,
246 const KFParticle *ProdVtx=0, Double_t Mass=-1, Bool_t IsConstrained=0 );
247
248 //*
249 //* TRANSPORT
250 //*
251 //* ( main transportation parameter is S = SignedPath/Momentum )
252 //* ( parameters of decay & production vertices are stored locally )
253 //*
254
255 //* Transport the particle to its decay vertex
256
258
259 //* Transport the particle to its production vertex
260
262
263 //* Transport the particle close to xyz[] point
264
265 void TransportToPoint( const Double_t xyz[] );
266
267 //* Transport the particle close to VVertex
268#ifdef HomogeneousField
269 void TransportToVertex( const AliVVertex &v );
270#endif
271 //* Transport the particle close to another particle p
272
273 void TransportToParticle( const KFParticle &p );
274
275 //* Transport the particle on dS parameter (SignedPath/Momentum)
276
277 void TransportToDS( Double_t dS );
278
279 //* Get dS to a certain space point
280
281 Double_t GetDStoPoint( const Double_t xyz[] ) const ;
282
283 //* Get dS to other particle p (dSp for particle p also returned)
284
285 void GetDStoParticle( const KFParticle &p,
286 Double_t &DS, Double_t &DSp ) const ;
287
288 //* Get dS to other particle p in XY-plane
289
290 void GetDStoParticleXY( const KFParticleBase &p,
291 Double_t &DS, Double_t &DSp ) const ;
292
293 //*
294 //* OTHER UTILITIES
295 //*
296
297
298 //* Calculate distance from another object [cm]
299
300 Double_t GetDistanceFromVertex( const Double_t vtx[] ) const ;
301 Double_t GetDistanceFromVertex( const KFParticle &Vtx ) const ;
302#ifdef HomogeneousField
303 Double_t GetDistanceFromVertex( const AliVVertex &Vtx ) const ;
304#endif
305 Double_t GetDistanceFromParticle( const KFParticle &p ) const ;
306
307 //* Calculate sqrt(Chi2/ndf) deviation from another object
308 //* ( v = [xyz]-vertex, Cv=[Cxx,Cxy,Cyy,Cxz,Cyz,Czz]-covariance matrix )
309
310 Double_t GetDeviationFromVertex( const Double_t v[], const Double_t Cv[]=0 ) const ;
311 Double_t GetDeviationFromVertex( const KFParticle &Vtx ) const ;
312#ifdef HomogeneousField
313 Double_t GetDeviationFromVertex( const AliVVertex &Vtx ) const ;
314#endif
315 Double_t GetDeviationFromParticle( const KFParticle &p ) const ;
316
317 //* Calculate distance from another object [cm] in XY-plane
318
319 Bool_t GetDistanceFromVertexXY( const Double_t vtx[], Double_t &val, Double_t &err ) const ;
320 Bool_t GetDistanceFromVertexXY( const Double_t vtx[], const Double_t Cv[], Double_t &val, Double_t &err ) const ;
321 Bool_t GetDistanceFromVertexXY( const KFParticle &Vtx, Double_t &val, Double_t &err ) const ;
322#ifdef HomogeneousField
323 Bool_t GetDistanceFromVertexXY( const AliVVertex &Vtx, Double_t &val, Double_t &err ) const ;
324#endif
325
326 Double_t GetDistanceFromVertexXY( const Double_t vtx[] ) const ;
327 Double_t GetDistanceFromVertexXY( const KFParticle &Vtx ) const ;
328#ifdef HomogeneousField
329 Double_t GetDistanceFromVertexXY( const AliVVertex &Vtx ) const ;
330#endif
331 Double_t GetDistanceFromParticleXY( const KFParticle &p ) const ;
332
333 //* Calculate sqrt(Chi2/ndf) deviation from another object in XY plane
334 //* ( v = [xyz]-vertex, Cv=[Cxx,Cxy,Cyy,Cxz,Cyz,Czz]-covariance matrix )
335
336 Double_t GetDeviationFromVertexXY( const Double_t v[], const Double_t Cv[]=0 ) const ;
337 Double_t GetDeviationFromVertexXY( const KFParticle &Vtx ) const ;
338#ifdef HomogeneousField
339 Double_t GetDeviationFromVertexXY( const AliVVertex &Vtx ) const ;
340#endif
341 Double_t GetDeviationFromParticleXY( const KFParticle &p ) const ;
342
343 //* Calculate opennig angle between two particles
344
345 Double_t GetAngle ( const KFParticle &p ) const ;
346 Double_t GetAngleXY( const KFParticle &p ) const ;
347 Double_t GetAngleRZ( const KFParticle &p ) const ;
348
349 //* Subtract the particle from the vertex
350
351 void SubtractFromVertex( KFParticle &v ) const ;
352
353 //* Special method for creating gammas
354
355 void ConstructGamma( const KFParticle &daughter1,
356 const KFParticle &daughter2 );
357
358 // * Pseudo Proper Time of decay = (r*pt) / |pt| * M/|pt|
359 // @primVertex - primary vertex
360 // @mass - mass of the mother particle (in the case of "Hb -> JPsi" it would be JPsi mass)
361 // @*timeErr2 - squared error of the decay time. If timeErr2 = 0 it isn't calculated
362 Double_t GetPseudoProperDecayTime( const KFParticle &primVertex, const Double_t& mass, Double_t* timeErr2 = 0 ) const;
363
364 protected:
365
366 //*
367 //* INTERNAL STUFF
368 //*
369
370 //* Method to access ALICE field
371#ifdef HomogeneousField
372 static Double_t GetFieldAlice();
373#endif
374 //* Other methods required by the abstract KFParticleBase class
375
376 void GetFieldValue( const Double_t xyz[], Double_t B[] ) const ;
377 void GetDStoParticle( const KFParticleBase &p, Double_t &DS, Double_t &DSp )const ;
378 void Transport( Double_t dS, Double_t P[], Double_t C[] ) const ;
379 static void GetExternalTrackParam( const KFParticleBase &p, Double_t &X, Double_t &Alpha, Double_t P[5] ) ;
380
381 //void GetDStoParticleALICE( const KFParticleBase &p, Double_t &DS, Double_t &DS1 ) const;
382
383
384 private:
385#ifdef HomogeneousField
386 static Double_t fgBz; //* Bz compoment of the magnetic field
387#endif
388#ifdef NonhomogeneousField
389 float fieldRegion[10];
390#endif
391
392 ClassDef( KFParticle, 1 );
393};
394
395
396
397//---------------------------------------------------------------------
398//
399// Inline implementation of the KFParticle methods
400//
401//---------------------------------------------------------------------
402
403#ifdef HomogeneousField
404inline void KFParticle::SetField( Double_t Bz )
405{
406 fgBz = Bz;
407}
408#endif
409
411 const KFParticle &d2,
412 const KFParticle &d3 )
413{
414 KFParticle mother;
415 mother+= d1;
416 mother+= d2;
417 mother+= d3;
418 *this = mother;
419}
420
422 const KFParticle &d2,
423 const KFParticle &d3,
424 const KFParticle &d4 )
425{
426 KFParticle mother;
427 mother+= d1;
428 mother+= d2;
429 mother+= d3;
430 mother+= d4;
431 *this = mother;
432}
433
434
439
440inline void KFParticle::SetVtxGuess( Double_t x, Double_t y, Double_t z )
441{
443}
444
445inline Double_t KFParticle::GetX () const
446{
447 return KFParticleBase::GetX();
448}
449
450inline Double_t KFParticle::GetY () const
451{
452 return KFParticleBase::GetY();
453}
454
455inline Double_t KFParticle::GetZ () const
456{
457 return KFParticleBase::GetZ();
458}
459
460inline Double_t KFParticle::GetPx () const
461{
462 return KFParticleBase::GetPx();
463}
464
465inline Double_t KFParticle::GetPy () const
466{
467 return KFParticleBase::GetPy();
468}
469
470inline Double_t KFParticle::GetPz () const
471{
472 return KFParticleBase::GetPz();
473}
474
475inline Double_t KFParticle::GetE () const
476{
477 return KFParticleBase::GetE();
478}
479
480inline Double_t KFParticle::GetS () const
481{
482 return KFParticleBase::GetS();
483}
484
485inline Int_t KFParticle::GetQ () const
486{
487 return KFParticleBase::GetQ();
488}
489
490inline Double_t KFParticle::GetChi2 () const
491{
492 return KFParticleBase::GetChi2();
493}
494
495inline Int_t KFParticle::GetNDF () const
496{
497 return KFParticleBase::GetNDF();
498}
499
500inline Double_t KFParticle::GetParameter ( int i ) const
501{
503}
504
505inline Double_t KFParticle::GetCovariance( int i ) const
506{
508}
509
510inline Double_t KFParticle::GetCovariance( int i, int j ) const
511{
513}
514
515
516inline Double_t KFParticle::GetP () const
517{
518 Double_t par, err;
519 if( KFParticleBase::GetMomentum( par, err ) ) return 0;
520 else return par;
521}
522
523inline Double_t KFParticle::GetPt () const
524{
525 Double_t par, err;
526 if( KFParticleBase::GetPt( par, err ) ) return 0;
527 else return par;
528}
529
530inline Double_t KFParticle::GetEta () const
531{
532 Double_t par, err;
533 if( KFParticleBase::GetEta( par, err ) ) return 0;
534 else return par;
535}
536
537inline Double_t KFParticle::GetPhi () const
538{
539 Double_t par, err;
540 if( KFParticleBase::GetPhi( par, err ) ) return 0;
541 else return par;
542}
543
544inline Double_t KFParticle::GetMomentum () const
545{
546 Double_t par, err;
547 if( KFParticleBase::GetMomentum( par, err ) ) return 0;
548 else return par;
549}
550
551inline Double_t KFParticle::GetMass () const
552{
553 Double_t par, err;
554 if( KFParticleBase::GetMass( par, err ) ) return 0;
555 else return par;
556}
557
558inline Double_t KFParticle::GetDecayLength () const
559{
560 Double_t par, err;
561 if( KFParticleBase::GetDecayLength( par, err ) ) return 0;
562 else return par;
563}
564
565inline Double_t KFParticle::GetDecayLengthXY () const
566{
567 Double_t par, err;
568 if( KFParticleBase::GetDecayLengthXY( par, err ) ) return 0;
569 else return par;
570}
571
572inline Double_t KFParticle::GetLifeTime () const
573{
574 Double_t par, err;
575 if( KFParticleBase::GetLifeTime( par, err ) ) return 0;
576 else return par;
577}
578
579inline Double_t KFParticle::GetR () const
580{
581 Double_t par, err;
582 if( KFParticleBase::GetR( par, err ) ) return 0;
583 else return par;
584}
585
586inline Double_t KFParticle::GetErrX () const
587{
588 return TMath::Sqrt(TMath::Abs( GetCovariance(0,0) ));
589}
590
591inline Double_t KFParticle::GetErrY () const
592{
593 return TMath::Sqrt(TMath::Abs( GetCovariance(1,1) ));
594}
595
596inline Double_t KFParticle::GetErrZ () const
597{
598 return TMath::Sqrt(TMath::Abs( GetCovariance(2,2) ));
599}
600
601inline Double_t KFParticle::GetErrPx () const
602{
603 return TMath::Sqrt(TMath::Abs( GetCovariance(3,3) ));
604}
605
606inline Double_t KFParticle::GetErrPy () const
607{
608 return TMath::Sqrt(TMath::Abs( GetCovariance(4,4) ));
609}
610
611inline Double_t KFParticle::GetErrPz () const
612{
613 return TMath::Sqrt(TMath::Abs( GetCovariance(5,5) ));
614}
615
616inline Double_t KFParticle::GetErrE () const
617{
618 return TMath::Sqrt(TMath::Abs( GetCovariance(6,6) ));
619}
620
621inline Double_t KFParticle::GetErrS () const
622{
623 return TMath::Sqrt(TMath::Abs( GetCovariance(7,7) ));
624}
625
626inline Double_t KFParticle::GetErrP () const
627{
628 Double_t par, err;
629 if( KFParticleBase::GetMomentum( par, err ) ) return 1.e10;
630 else return err;
631}
632
633inline Double_t KFParticle::GetErrPt () const
634{
635 Double_t par, err;
636 if( KFParticleBase::GetPt( par, err ) ) return 1.e10;
637 else return err;
638}
639
640inline Double_t KFParticle::GetErrEta () const
641{
642 Double_t par, err;
643 if( KFParticleBase::GetEta( par, err ) ) return 1.e10;
644 else return err;
645}
646
647inline Double_t KFParticle::GetErrPhi () const
648{
649 Double_t par, err;
650 if( KFParticleBase::GetPhi( par, err ) ) return 1.e10;
651 else return err;
652}
653
654inline Double_t KFParticle::GetErrMomentum () const
655{
656 Double_t par, err;
657 if( KFParticleBase::GetMomentum( par, err ) ) return 1.e10;
658 else return err;
659}
660
661inline Double_t KFParticle::GetErrMass () const
662{
663 Double_t par, err;
664 if( KFParticleBase::GetMass( par, err ) ) return 1.e10;
665 else return err;
666}
667
668inline Double_t KFParticle::GetErrDecayLength () const
669{
670 Double_t par, err;
671 if( KFParticleBase::GetDecayLength( par, err ) ) return 1.e10;
672 else return err;
673}
674
675inline Double_t KFParticle::GetErrDecayLengthXY () const
676{
677 Double_t par, err;
678 if( KFParticleBase::GetDecayLengthXY( par, err ) ) return 1.e10;
679 else return err;
680}
681
682inline Double_t KFParticle::GetErrLifeTime () const
683{
684 Double_t par, err;
685 if( KFParticleBase::GetLifeTime( par, err ) ) return 1.e10;
686 else return err;
687}
688
689inline Double_t KFParticle::GetErrR () const
690{
691 Double_t par, err;
692 if( KFParticleBase::GetR( par, err ) ) return 1.e10;
693 else return err;
694}
695
696
697inline int KFParticle::GetP( Double_t &P, Double_t &SigmaP ) const
698{
699 return KFParticleBase::GetMomentum( P, SigmaP );
700}
701
702inline int KFParticle::GetPt( Double_t &Pt, Double_t &SigmaPt ) const
703{
704 return KFParticleBase::GetPt( Pt, SigmaPt );
705}
706
707inline int KFParticle::GetEta( Double_t &Eta, Double_t &SigmaEta ) const
708{
709 return KFParticleBase::GetEta( Eta, SigmaEta );
710}
711
712inline int KFParticle::GetPhi( Double_t &Phi, Double_t &SigmaPhi ) const
713{
714 return KFParticleBase::GetPhi( Phi, SigmaPhi );
715}
716
717inline int KFParticle::GetMomentum( Double_t &P, Double_t &SigmaP ) const
718{
719 return KFParticleBase::GetMomentum( P, SigmaP );
720}
721
722inline int KFParticle::GetMass( Double_t &M, Double_t &SigmaM ) const
723{
724 return KFParticleBase::GetMass( M, SigmaM );
725}
726
727inline int KFParticle::GetDecayLength( Double_t &L, Double_t &SigmaL ) const
728{
729 return KFParticleBase::GetDecayLength( L, SigmaL );
730}
731
732inline int KFParticle::GetDecayLengthXY( Double_t &L, Double_t &SigmaL ) const
733{
734 return KFParticleBase::GetDecayLengthXY( L, SigmaL );
735}
736
737inline int KFParticle::GetLifeTime( Double_t &T, Double_t &SigmaT ) const
738{
739 return KFParticleBase::GetLifeTime( T, SigmaT );
740}
741
742inline int KFParticle::GetR( Double_t &R, Double_t &SigmaR ) const
743{
744 return KFParticleBase::GetR( R, SigmaR );
745}
746
747inline Double_t & KFParticle::X()
748{
749 return KFParticleBase::X();
750}
751
752inline Double_t & KFParticle::Y()
753{
754 return KFParticleBase::Y();
755}
756
757inline Double_t & KFParticle::Z()
758{
759 return KFParticleBase::Z();
760}
761
762inline Double_t & KFParticle::Px()
763{
764 return KFParticleBase::Px();
765}
766
767inline Double_t & KFParticle::Py()
768{
769 return KFParticleBase::Py();
770}
771
772inline Double_t & KFParticle::Pz()
773{
774 return KFParticleBase::Pz();
775}
776
777inline Double_t & KFParticle::E()
778{
779 return KFParticleBase::E();
780}
781
782inline Double_t & KFParticle::S()
783{
784 return KFParticleBase::S();
785}
786
787inline Int_t & KFParticle::Q()
788{
789 return KFParticleBase::Q();
790}
791
792inline Double_t & KFParticle::Chi2()
793{
794 return KFParticleBase::Chi2();
795}
796
797inline Int_t & KFParticle::NDF()
798{
799 return KFParticleBase::NDF();
800}
801
802inline Double_t & KFParticle::Parameter ( int i )
803{
805}
806
807inline Double_t & KFParticle::Covariance( int i )
808{
810}
811
812inline Double_t & KFParticle::Covariance( int i, int j )
813{
814 return KFParticleBase::Covariance(i,j);
815}
816
817inline Double_t * KFParticle::Parameters ()
818{
819 return fP;
820}
821
823{
824 return fC;
825}
826
827
828inline void KFParticle::operator +=( const KFParticle &Daughter )
829{
830 KFParticleBase::operator +=( Daughter );
831}
832
833
834inline void KFParticle::AddDaughter( const KFParticle &Daughter )
835{
836 KFParticleBase::AddDaughter( Daughter );
837}
838
843
844inline void KFParticle::SetMassConstraint( Double_t Mass, Double_t SigmaMass )
845{
846 KFParticleBase::SetMassConstraint( Mass, SigmaMass );
847}
848
853
854inline void KFParticle::Construct( const KFParticle *vDaughters[], int nDaughters,
855 const KFParticle *ProdVtx, Double_t Mass, Bool_t IsConstrained )
856{
857 KFParticleBase::Construct( ( const KFParticleBase**)vDaughters, nDaughters,
858 ( const KFParticleBase*)ProdVtx, Mass, IsConstrained );
859}
860
865
870
871inline void KFParticle::TransportToPoint( const Double_t xyz[] )
872{
874}
875#ifdef HomogeneousField
876inline void KFParticle::TransportToVertex( const AliVVertex &v )
877{
879}
880#endif
882{
883 Double_t dS, dSp;
884 GetDStoParticle( p, dS, dSp );
885 TransportToDS( dS );
886}
887
888inline void KFParticle::TransportToDS( Double_t dS )
889{
891}
892
893inline Double_t KFParticle::GetDStoPoint( const Double_t xyz[] ) const
894{
895#ifdef HomogeneousField
896 return KFParticleBase::GetDStoPointBz( GetFieldAlice(), xyz );
897#endif
898#ifdef NonhomogeneousField
900#endif
901}
902
903
905 Double_t &DS, Double_t &DSp ) const
906{
907 GetDStoParticleXY( p, DS, DSp );
908}
909
910
911inline Double_t KFParticle::GetDistanceFromVertex( const Double_t vtx[] ) const
912{
914}
915
916inline Double_t KFParticle::GetDeviationFromVertex( const Double_t v[],
917 const Double_t Cv[] ) const
918{
920}
921
922inline Double_t KFParticle::GetDistanceFromVertex( const KFParticle &Vtx ) const
923{
925}
926
927inline Double_t KFParticle::GetDeviationFromVertex( const KFParticle &Vtx ) const
928{
930}
931#ifdef HomogeneousField
932inline Double_t KFParticle::GetDistanceFromVertex( const AliVVertex &Vtx ) const
933{
934 return GetDistanceFromVertex( KFParticle(Vtx) );
935}
936
937inline Double_t KFParticle::GetDeviationFromVertex( const AliVVertex &Vtx ) const
938{
939 return GetDeviationFromVertex( KFParticle(Vtx) );
940}
941#endif
942inline Double_t KFParticle::GetDistanceFromParticle( const KFParticle &p ) const
943{
945}
946
947inline Double_t KFParticle::GetDeviationFromParticle( const KFParticle &p ) const
948{
950}
951
956
957#ifdef HomogeneousField
958inline Double_t KFParticle::GetFieldAlice()
959{
960 return fgBz;
961}
962#endif
963
964#ifdef HomogeneousField
965inline void KFParticle::GetFieldValue( const Double_t * /*xyz*/, Double_t B[] ) const
966{
967 B[0] = B[1] = 0;
968 B[2] = GetFieldAlice();
969}
970#endif
971
972#ifdef NonhomogeneousField
973inline void KFParticle::GetFieldValue( const Double_t xyz[], Double_t B[] ) const
974{
975 FairField *MF = CbmKF::Instance()->GetMagneticField();
976 MF->GetFieldValue( xyz, B );
977}
978#endif
979
981 Double_t &DS, Double_t &DSp )const
982{
983 GetDStoParticleXY( p, DS, DSp );
984}
985
987 Double_t &DS, Double_t &DSp ) const
988{
989#ifdef HomogeneousField
990 KFParticleBase::GetDStoParticleBz( GetFieldAlice(), p, DS, DSp ) ;
991#endif
992#ifdef NonhomogeneousField
994#endif
995 //GetDStoParticleALICE( p, DS, DSp ) ;
996}
997
998inline void KFParticle::Transport( Double_t dS, Double_t P[], Double_t C[] ) const
999{
1000#ifdef HomogeneousField
1001 KFParticleBase::TransportBz( GetFieldAlice(), dS, P, C );
1002#endif
1003#ifdef NonhomogeneousField
1004 KFParticleBase::TransportCBM( dS, P, C );
1005#endif
1006}
1007
1008inline void KFParticle::ConstructGamma( const KFParticle &daughter1,
1009 const KFParticle &daughter2 )
1010{
1011#ifdef HomogeneousField
1012 KFParticleBase::ConstructGammaBz( daughter1, daughter2, GetFieldAlice() );
1013#endif
1014}
1015
1016#endif
const Float_t z0
Definition BmnMwpcHit.cxx:6
__m128 v
Definition P4_F32vec4.h:1
int i
Definition P4_F32vec4.h:22
static CbmKF * Instance()
Definition CbmKF.h:35
BmnNewFieldMap * GetMagneticField()
Definition CbmKF.h:73
Int_t GetNDF() const
void SetProductionVertex(const KFParticleBase &Vtx)
const Int_t & Q() const
Int_t GetPhi(Double_t &Phi, Double_t &SigmaPhi) const
const Double_t & Y() const
const Double_t & S() const
Double_t GetPz() const
void GetDStoParticleBz(Double_t Bz, const KFParticleBase &p, Double_t &dS, Double_t &dS1) const
Double_t GetDStoPointCBM(const Double_t xyz[]) const
void AddDaughter(const KFParticleBase &Daughter)
Double_t GetE() const
Int_t GetLifeTime(Double_t &T, Double_t &SigmaT) const
Int_t GetEta(Double_t &Eta, Double_t &SigmaEta) const
Int_t GetDecayLength(Double_t &L, Double_t &SigmaL) const
Int_t GetR(Double_t &R, Double_t &SigmaR) const
const Double_t & Z() const
void TransportCBM(Double_t dS, Double_t P[], Double_t C[]) const
Int_t GetMomentum(Double_t &P, Double_t &SigmaP) const
Double_t GetY() const
void SubtractFromVertex(KFParticleBase &Vtx) const
const Double_t & E() const
Double_t & Parameter(Int_t i)
Bool_t fAtProductionVertex
Double_t GetDistanceFromVertex(const Double_t vtx[]) const
Double_t GetDStoPointBz(Double_t Bz, const Double_t xyz[]) const
void GetDStoParticleCBM(const KFParticleBase &p, Double_t &dS, Double_t &dS1) const
Double_t GetPx() const
const Double_t & Pz() const
Double_t GetZ() const
Int_t GetQ() const
Double_t GetDistanceFromParticle(const KFParticleBase &p) const
void operator+=(const KFParticleBase &Daughter)
Double_t GetS() const
Double_t GetDeviationFromParticle(const KFParticleBase &p) const
Double_t GetCovariance(Int_t i) const
void SetVtxGuess(Double_t x, Double_t y, Double_t z)
const Double_t & Chi2() const
const Double_t & Px() const
std::vector< int > fDaughtersIds
Int_t GetMass(Double_t &M, Double_t &SigmaM) const
void TransportToProductionVertex()
Double_t GetPy() const
Double_t GetChi2() const
void TransportBz(Double_t Bz, Double_t dS, Double_t P[], Double_t C[]) const
const Double_t & X() const
Int_t GetDecayLengthXY(Double_t &L, Double_t &SigmaL) const
Double_t GetParameter(Int_t i) const
const Double_t & Py() const
Double_t GetX() const
void Construct(const KFParticleBase *vDaughters[], Int_t nDaughters, const KFParticleBase *ProdVtx=0, Double_t Mass=-1, Bool_t IsConstrained=0)
void SetMassConstraint(Double_t Mass, Double_t SigmaMass=0)
Double_t GetDeviationFromVertex(const Double_t v[], const Double_t Cv[]=0) const
const Int_t & NDF() const
Double_t fC[36]
void ConstructGammaBz(const KFParticleBase &daughter1, const KFParticleBase &daughter2, double Bz)
Double_t & Covariance(Int_t i)
void TransportToDS(Double_t dS)
Int_t GetPt(Double_t &Pt, Double_t &SigmaPt) const
void ConstructGamma(const KFParticle &daughter1, const KFParticle &daughter2)
Double_t GetErrE() const
Definition KFParticle.h:616
Double_t GetY() const
Definition KFParticle.h:450
void GetDStoParticleXY(const KFParticleBase &p, Double_t &DS, Double_t &DSp) const
Definition KFParticle.h:986
Bool_t GetDistanceFromVertexXY(const Double_t vtx[], Double_t &val, Double_t &err) const
Double_t GetZ() const
Definition KFParticle.h:455
static void GetExternalTrackParam(const KFParticleBase &p, Double_t &X, Double_t &Alpha, Double_t P[5])
const Double_t & Px() const
Definition KFParticle.h:131
void TransportToDecayVertex()
Definition KFParticle.h:861
float * GetFieldCoeff()
Definition KFParticle.h:124
const Double_t & Pz() const
Definition KFParticle.h:133
Double_t * CovarianceMatrix()
Definition KFParticle.h:822
Double_t GetPx() const
Definition KFParticle.h:460
Double_t GetDeviationFromVertexXY(const Double_t v[], const Double_t Cv[]=0) const
Double_t GetPhi() const
Definition KFParticle.h:537
Double_t GetErrZ() const
Definition KFParticle.h:596
Double_t GetTheta() const
Definition KFParticle.h:192
Double_t GetDeviationFromParticleXY(const KFParticle &p) const
Double_t * Parameters()
Definition KFParticle.h:817
void SetAtProductionVertex(Bool_t b)
Definition KFParticle.h:121
void GetFieldValue(const Double_t xyz[], Double_t B[]) const
Definition KFParticle.h:973
void Transport(Double_t dS, Double_t P[], Double_t C[]) const
Definition KFParticle.h:998
const Double_t & Y() const
Definition KFParticle.h:129
const Double_t & S() const
Definition KFParticle.h:135
void CleanDaughtersId()
Definition KFParticle.h:89
Double_t GetErrP() const
Definition KFParticle.h:626
Double_t GetMass() const
Definition KFParticle.h:551
Double_t GetErrMomentum() const
Definition KFParticle.h:654
const Int_t & NDF() const
Definition KFParticle.h:138
void SetProductionVertex(const KFParticle &Vtx)
Definition KFParticle.h:839
const Double_t & Py() const
Definition KFParticle.h:132
Int_t GetNDF() const
Definition KFParticle.h:495
Double_t GetAngle(const KFParticle &p) const
Double_t GetDecayLengthXY() const
Definition KFParticle.h:565
Double_t GetDeviationFromVertex(const Double_t v[], const Double_t Cv[]=0) const
Definition KFParticle.h:916
Double_t GetPseudoProperDecayTime(const KFParticle &primVertex, const Double_t &mass, Double_t *timeErr2=0) const
Double_t GetErrPhi() const
Definition KFParticle.h:647
const Int_t & Q() const
Definition KFParticle.h:136
void SetVtxGuess(Double_t x, Double_t y, Double_t z)
Definition KFParticle.h:440
Double_t GetErrR() const
Definition KFParticle.h:689
void SetMassConstraint(Double_t Mass, Double_t SigmaMass=0)
Definition KFParticle.h:844
Double_t GetErrS() const
Definition KFParticle.h:621
const Double_t & E() const
Definition KFParticle.h:134
Double_t GetErrEta() const
Definition KFParticle.h:640
void TransportToParticle(const KFParticle &p)
Definition KFParticle.h:881
void TransportToDS(Double_t dS)
Definition KFParticle.h:888
Double_t GetEta() const
Definition KFParticle.h:530
Double_t GetMomentum() const
Definition KFParticle.h:544
Double_t GetDistanceFromVertex(const Double_t vtx[]) const
Definition KFParticle.h:911
Double_t GetDeviationFromParticle(const KFParticle &p) const
Definition KFParticle.h:947
Double_t & Parameter(int i)
Definition KFParticle.h:802
void AddDaughter(int id)
Definition KFParticle.h:91
Double_t GetDistanceFromParticleXY(const KFParticle &p) const
void SubtractFromVertex(KFParticle &v) const
Definition KFParticle.h:952
Double_t GetErrDecayLength() const
Definition KFParticle.h:668
Double_t GetAngleXY(const KFParticle &p) const
Double_t GetErrPy() const
Definition KFParticle.h:606
void Initialize()
Definition KFParticle.h:435
Double_t GetP() const
Definition KFParticle.h:516
Double_t GetAngleRZ(const KFParticle &p) const
Double_t GetChi2() const
Definition KFParticle.h:490
const Double_t & X() const
Definition KFParticle.h:128
void TransportToProductionVertex()
Definition KFParticle.h:866
Double_t GetPz() const
Definition KFParticle.h:470
Double_t GetErrDecayLengthXY() const
Definition KFParticle.h:675
Double_t & Covariance(int i)
Definition KFParticle.h:807
Bool_t GetAtProductionVertex() const
Definition KFParticle.h:120
Double_t GetDStoPoint(const Double_t xyz[]) const
Definition KFParticle.h:893
void SetFieldCoeff(float c, int i)
Definition KFParticle.h:125
Double_t GetErrY() const
Definition KFParticle.h:591
Double_t GetErrMass() const
Definition KFParticle.h:661
Double_t GetErrPx() const
Definition KFParticle.h:601
const Double_t & Z() const
Definition KFParticle.h:130
void SetNDaughters(int n)
Definition KFParticle.h:90
Int_t GetQ() const
Definition KFParticle.h:485
Double_t GetDistanceFromParticle(const KFParticle &p) const
Definition KFParticle.h:942
void GetDStoParticle(const KFParticle &p, Double_t &DS, Double_t &DSp) const
Definition KFParticle.h:904
void SetNoDecayLength()
Definition KFParticle.h:849
const Double_t & Chi2() const
Definition KFParticle.h:137
Double_t GetCovariance(int i) const
Definition KFParticle.h:505
Double_t GetX() const
Definition KFParticle.h:445
Double_t GetParameter(int i) const
Definition KFParticle.h:500
Double_t GetR() const
Definition KFParticle.h:579
Double_t GetS() const
Definition KFParticle.h:480
void Construct(const KFParticle *vDaughters[], int nDaughters, const KFParticle *ProdVtx=0, Double_t Mass=-1, Bool_t IsConstrained=0)
Definition KFParticle.h:854
Double_t GetDecayLength() const
Definition KFParticle.h:558
Double_t GetErrPt() const
Definition KFParticle.h:633
Double_t GetE() const
Definition KFParticle.h:475
void TransportToPoint(const Double_t xyz[])
Definition KFParticle.h:871
void operator+=(const KFParticle &Daughter)
Definition KFParticle.h:828
Double_t GetPt() const
Definition KFParticle.h:523
Double_t GetErrLifeTime() const
Definition KFParticle.h:682
Double_t GetPy() const
Definition KFParticle.h:465
Double_t GetErrPz() const
Definition KFParticle.h:611
Double_t GetErrX() const
Definition KFParticle.h:586
Double_t GetLifeTime() const
Definition KFParticle.h:572
void Create(const Double_t Param[], const Double_t Cov[], Int_t Charge, Double_t mass)
Double_t GetRapidity() const
Definition KFParticle.h:191