21 #include "KFParticleBase.h"
61 void Create(
const Double_t Param[],
const Double_t Cov[], Int_t Charge, Int_t PID );
66 virtual void Clear(Option_t *option =
"") {KFParticleBase::Clear(option);}
77 void SetVtxGuess( Double_t x, Double_t y, Double_t z );
85 Double_t GetX ()
const ;
86 Double_t GetY ()
const ;
87 Double_t GetZ ()
const ;
88 Double_t GetPx ()
const ;
89 Double_t GetPy ()
const ;
90 Double_t GetPz ()
const ;
91 Double_t GetE ()
const ;
92 Double_t GetS ()
const ;
93 Short_t GetQ ()
const ;
94 Double_t GetChi2 ()
const ;
95 Short_t GetNDF ()
const ;
96 Double_t GetParameter ( Int_t i )
const ;
97 Double_t GetCovariance( Int_t i )
const ;
98 Double_t GetCovariance( Int_t i, Int_t j )
const ;
101 Double_t GetP ()
const;
102 Double_t GetPt ()
const;
103 Double_t GetEta ()
const;
104 Double_t GetPhi ()
const;
105 Double_t GetMomentum ()
const;
106 Double_t GetMass ()
const;
107 Double_t GetDecayLength ()
const;
108 Double_t GetDecayLengthXY ()
const;
109 Double_t GetLifeTime ()
const;
110 Double_t GetR ()
const;
114 Double_t GetErrX ()
const ;
115 Double_t GetErrY ()
const ;
116 Double_t GetErrZ ()
const ;
117 Double_t GetErrPx ()
const ;
118 Double_t GetErrPy ()
const ;
119 Double_t GetErrPz ()
const ;
120 Double_t GetErrE ()
const ;
121 Double_t GetErrS ()
const ;
122 Double_t GetErrP ()
const ;
123 Double_t GetErrPt ()
const ;
124 Double_t GetErrEta ()
const ;
125 Double_t GetErrPhi ()
const ;
126 Double_t GetErrMomentum ()
const ;
127 Double_t GetErrMass ()
const ;
128 Double_t GetErrDecayLength ()
const ;
129 Double_t GetErrDecayLengthXY ()
const ;
130 Double_t GetErrLifeTime ()
const ;
131 Double_t GetErrR ()
const ;
136 Int_t GetP ( Double_t &P, Double_t &SigmaP )
const ;
137 Int_t GetPt ( Double_t &Pt, Double_t &SigmaPt )
const ;
138 Int_t GetEta ( Double_t &Eta, Double_t &SigmaEta )
const ;
139 Int_t GetPhi ( Double_t &Phi, Double_t &SigmaPhi )
const ;
140 Int_t GetMomentum ( Double_t &P, Double_t &SigmaP )
const ;
141 Int_t GetMass ( Double_t &M, Double_t &SigmaM )
const ;
142 Int_t GetDecayLength ( Double_t &L, Double_t &SigmaL )
const ;
143 Int_t GetDecayLengthXY ( Double_t &L, Double_t &SigmaL )
const ;
144 Int_t GetLifeTime ( Double_t &T, Double_t &SigmaT )
const ;
145 Int_t GetR ( Double_t &R, Double_t &SigmaR )
const ;
165 Double_t & Covariance( Int_t i ) ;
166 Double_t & Covariance( Int_t i, Int_t j ) ;
168 Double_t * CovarianceMatrix() ;
177 void AddDaughter(
const KFParticle &Daughter );
181 void operator +=(
const KFParticle &Daughter );
185 void SetProductionVertex(
const KFParticle &Vtx );
189 void SetMassConstraint( Double_t Mass, Double_t SigmaMass = 0 );
193 void SetNoDecayLength();
197 void Construct(
const KFParticle *vDaughters[], Int_t NDaughters,
198 const KFParticle *ProdVtx=0, Double_t Mass=-1, Bool_t IsConstrained=0 );
209 void TransportToDecayVertex();
213 void TransportToProductionVertex();
217 void TransportToPoint(
const Double_t xyz[] );
221 void TransportToVertex(
const MVertex &v );
225 void TransportToParticle(
const KFParticle &p );
229 void TransportToDS( Double_t dS );
233 Double_t GetDStoPoint(
const Double_t xyz[] )
const ;
238 Double_t &DS, Double_t &DSp )
const ;
243 Double_t &DS, Double_t &DSp )
const ;
252 Double_t GetDistanceFromVertex(
const Double_t vtx[] )
const ;
253 Double_t GetDistanceFromVertex(
const KFParticle &Vtx )
const ;
254 Double_t GetDistanceFromVertex(
const MVertex &Vtx )
const ;
255 Double_t GetDistanceFromParticle(
const KFParticle &p )
const ;
259 Double_t GetDeviationFromVertex(
const Double_t v[],
const Double_t Cv[]=0 )
const ;
260 Double_t GetDeviationFromVertex(
const KFParticle &Vtx )
const ;
261 Double_t GetDeviationFromVertex(
const MVertex &Vtx )
const ;
262 Double_t GetDeviationFromParticle(
const KFParticle &p )
const ;
266 Bool_t GetDistanceFromVertexXY(
const Double_t vtx[], Double_t &val, Double_t &err )
const ;
267 Bool_t GetDistanceFromVertexXY(
const Double_t vtx[],
const Double_t Cv[], Double_t &val, Double_t &err )
const ;
268 Bool_t GetDistanceFromVertexXY(
const KFParticle &Vtx, Double_t &val, Double_t &err )
const ;
269 Bool_t GetDistanceFromVertexXY(
const MVertex &Vtx, Double_t &val, Double_t &err )
const ;
271 Double_t GetDistanceFromVertexXY(
const Double_t vtx[] )
const ;
272 Double_t GetDistanceFromVertexXY(
const KFParticle &Vtx )
const ;
273 Double_t GetDistanceFromVertexXY(
const MVertex &Vtx )
const ;
274 Double_t GetDistanceFromParticleXY(
const KFParticle &p )
const ;
279 Double_t GetDeviationFromVertexXY(
const Double_t v[],
const Double_t Cv[]=0 )
const ;
280 Double_t GetDeviationFromVertexXY(
const KFParticle &Vtx )
const ;
281 Double_t GetDeviationFromVertexXY(
const MVertex &Vtx )
const ;
282 Double_t GetDeviationFromParticleXY(
const KFParticle &p )
const ;
286 Double_t GetAngle (
const KFParticle &p )
const ;
287 Double_t GetAngleXY(
const KFParticle &p )
const ;
288 Double_t GetAngleRZ(
const KFParticle &p )
const ;
292 void SubtractFromVertex(
KFParticle &v )
const ;
296 void ConstructGamma(
const KFParticle &daughter1,
306 static Double_t GetFieldAlice();
310 void GetFieldValue(
const Double_t xyz[], Double_t B[] )
const ;
311 void GetDStoParticle(
const KFParticleBase &p, Double_t &DS, Double_t &DSp )
const ;
312 void Transport( Double_t dS, Double_t P[], Double_t C[] )
const ;
313 static void GetExternalTrackParam(
const KFParticleBase &p, Double_t &X, Double_t &Alpha, Double_t P[5] ) ;
320 static Double32_t fgBz;
341 inline KFParticle::KFParticle(
const KFParticle &d1,
350 inline KFParticle::KFParticle(
const KFParticle &d1,
361 inline KFParticle::KFParticle(
const KFParticle &d1,
374 inline void KFParticle::Initialize()
376 KFParticleBase::Initialize();
379 inline void KFParticle::SetVtxGuess( Double_t x, Double_t y, Double_t z )
381 KFParticleBase::SetVtxGuess(x,y,z);
384 inline Double_t KFParticle::GetX ()
const
386 return KFParticleBase::GetX();
389 inline Double_t KFParticle::GetY ()
const
391 return KFParticleBase::GetY();
394 inline Double_t KFParticle::GetZ ()
const
396 return KFParticleBase::GetZ();
399 inline Double_t KFParticle::GetPx ()
const
401 return KFParticleBase::GetPx();
404 inline Double_t KFParticle::GetPy ()
const
406 return KFParticleBase::GetPy();
409 inline Double_t KFParticle::GetPz ()
const
411 return KFParticleBase::GetPz();
414 inline Double_t KFParticle::GetE ()
const
416 return KFParticleBase::GetE();
419 inline Double_t KFParticle::GetS ()
const
421 return KFParticleBase::GetS();
424 inline Short_t KFParticle::GetQ ()
const
426 return KFParticleBase::GetQ();
429 inline Double_t KFParticle::GetChi2 ()
const
431 return KFParticleBase::GetChi2();
434 inline Short_t KFParticle::GetNDF ()
const
436 return KFParticleBase::GetNDF();
438 inline Double_t KFParticle::GetParameter ( Int_t i )
const
440 return KFParticleBase::GetParameter(i);
443 inline Double_t KFParticle::GetCovariance( Int_t i )
const
445 return KFParticleBase::GetCovariance(i);
448 inline Double_t KFParticle::GetCovariance( Int_t i, Int_t j )
const
450 return KFParticleBase::GetCovariance(i,j);
453 inline Double_t KFParticle::GetP ()
const
456 if( KFParticleBase::GetMomentum( par, err ) )
return 0;
460 inline Double_t KFParticle::GetPt ()
const
463 if( KFParticleBase::GetPt( par, err ) )
return 0;
467 inline Double_t KFParticle::GetEta ()
const
470 if( KFParticleBase::GetEta( par, err ) )
return 0;
474 inline Double_t KFParticle::GetPhi ()
const
477 if( KFParticleBase::GetPhi( par, err ) )
return 0;
481 inline Double_t KFParticle::GetMomentum ()
const
484 if( KFParticleBase::GetMomentum( par, err ) )
return 0;
488 inline Double_t KFParticle::GetMass ()
const
491 if( KFParticleBase::GetMass( par, err ) )
return 0;
495 inline Double_t KFParticle::GetDecayLength ()
const
498 if( KFParticleBase::GetDecayLength( par, err ) )
return 0;
502 inline Double_t KFParticle::GetDecayLengthXY ()
const
505 if( KFParticleBase::GetDecayLengthXY( par, err ) )
return 0;
509 inline Double_t KFParticle::GetLifeTime ()
const
512 if( KFParticleBase::GetLifeTime( par, err ) )
return 0;
516 inline Double_t KFParticle::GetR ()
const
519 if( KFParticleBase::GetR( par, err ) )
return 0;
523 inline Double_t KFParticle::GetErrX ()
const
525 return TMath::Sqrt(TMath::Abs( GetCovariance(0,0) ));
528 inline Double_t KFParticle::GetErrY ()
const
530 return TMath::Sqrt(TMath::Abs( GetCovariance(1,1) ));
533 inline Double_t KFParticle::GetErrZ ()
const
535 return TMath::Sqrt(TMath::Abs( GetCovariance(2,2) ));
538 inline Double_t KFParticle::GetErrPx ()
const
540 return TMath::Sqrt(TMath::Abs( GetCovariance(3,3) ));
543 inline Double_t KFParticle::GetErrPy ()
const
545 return TMath::Sqrt(TMath::Abs( GetCovariance(4,4) ));
548 inline Double_t KFParticle::GetErrPz ()
const
550 return TMath::Sqrt(TMath::Abs( GetCovariance(5,5) ));
553 inline Double_t KFParticle::GetErrE ()
const
555 return TMath::Sqrt(TMath::Abs( GetCovariance(6,6) ));
558 inline Double_t KFParticle::GetErrS ()
const
560 return TMath::Sqrt(TMath::Abs( GetCovariance(7,7) ));
563 inline Double_t KFParticle::GetErrP ()
const
566 if( KFParticleBase::GetMomentum( par, err ) )
return 1.e10;
570 inline Double_t KFParticle::GetErrPt ()
const
573 if( KFParticleBase::GetPt( par, err ) )
return 1.e10;
577 inline Double_t KFParticle::GetErrEta ()
const
580 if( KFParticleBase::GetEta( par, err ) )
return 1.e10;
584 inline Double_t KFParticle::GetErrPhi ()
const
587 if( KFParticleBase::GetPhi( par, err ) )
return 1.e10;
591 inline Double_t KFParticle::GetErrMomentum ()
const
594 if( KFParticleBase::GetMomentum( par, err ) )
return 1.e10;
598 inline Double_t KFParticle::GetErrMass ()
const
601 if( KFParticleBase::GetMass( par, err ) )
return 1.e10;
605 inline Double_t KFParticle::GetErrDecayLength ()
const
608 if( KFParticleBase::GetDecayLength( par, err ) )
return 1.e10;
612 inline Double_t KFParticle::GetErrDecayLengthXY ()
const
615 if( KFParticleBase::GetDecayLengthXY( par, err ) )
return 1.e10;
619 inline Double_t KFParticle::GetErrLifeTime ()
const
622 if( KFParticleBase::GetLifeTime( par, err ) )
return 1.e10;
626 inline Double_t KFParticle::GetErrR ()
const
629 if( KFParticleBase::GetR( par, err ) )
return 1.e10;
633 inline Int_t KFParticle::GetP( Double_t &P, Double_t &SigmaP )
const
635 return KFParticleBase::GetMomentum( P, SigmaP );
637 inline Int_t KFParticle::GetPt( Double_t &Pt, Double_t &SigmaPt )
const
639 return KFParticleBase::GetPt( Pt, SigmaPt );
642 inline Int_t KFParticle::GetEta( Double_t &Eta, Double_t &SigmaEta )
const
644 return KFParticleBase::GetEta( Eta, SigmaEta );
647 inline Int_t KFParticle::GetPhi( Double_t &Phi, Double_t &SigmaPhi )
const
649 return KFParticleBase::GetPhi( Phi, SigmaPhi );
652 inline Int_t KFParticle::GetMomentum( Double_t &P, Double_t &SigmaP )
const
654 return KFParticleBase::GetMomentum( P, SigmaP );
657 inline Int_t KFParticle::GetMass( Double_t &M, Double_t &SigmaM )
const
659 return KFParticleBase::GetMass( M, SigmaM );
662 inline Int_t KFParticle::GetDecayLength( Double_t &L, Double_t &SigmaL )
const
664 return KFParticleBase::GetDecayLength( L, SigmaL );
667 inline Int_t KFParticle::GetDecayLengthXY( Double_t &L, Double_t &SigmaL )
const
669 return KFParticleBase::GetDecayLengthXY( L, SigmaL );
672 inline Int_t KFParticle::GetLifeTime( Double_t &T, Double_t &SigmaT )
const
674 return KFParticleBase::GetLifeTime( T, SigmaT );
677 inline Int_t KFParticle::GetR( Double_t &R, Double_t &SigmaR )
const
679 return KFParticleBase::GetR( R, SigmaR );
681 inline Double_t & KFParticle::X()
683 return KFParticleBase::X();
686 inline Double_t & KFParticle::Y()
688 return KFParticleBase::Y();
691 inline Double_t & KFParticle::Z()
693 return KFParticleBase::Z();
696 inline Double_t & KFParticle::Px()
698 return KFParticleBase::Px();
701 inline Double_t & KFParticle::Py()
703 return KFParticleBase::Py();
706 inline Double_t & KFParticle::Pz()
708 return KFParticleBase::Pz();
711 inline Double_t & KFParticle::E()
713 return KFParticleBase::E();
716 inline Double_t & KFParticle::S()
718 return KFParticleBase::S();
721 inline Short_t & KFParticle::Q()
723 return KFParticleBase::Q();
726 inline Double_t & KFParticle::Chi2()
728 return KFParticleBase::Chi2();
731 inline Short_t & KFParticle::NDF()
733 return KFParticleBase::NDF();
736 inline Double_t & KFParticle::Parameter ( Int_t i )
738 return KFParticleBase::Parameter(i);
741 inline Double_t & KFParticle::Covariance( Int_t i )
743 return KFParticleBase::Covariance(i);
746 inline Double_t & KFParticle::Covariance( Int_t i, Int_t j )
748 return KFParticleBase::Covariance(i,j);
750 inline Double_t * KFParticle::Parameters ()
755 inline Double_t * KFParticle::CovarianceMatrix()
760 inline void KFParticle::operator +=(
const KFParticle &Daughter )
762 KFParticleBase::operator +=( Daughter );
766 inline void KFParticle::AddDaughter(
const KFParticle &Daughter )
768 KFParticleBase::AddDaughter( Daughter );
771 inline void KFParticle::SetProductionVertex(
const KFParticle &Vtx )
773 KFParticleBase::SetProductionVertex( Vtx );
776 inline void KFParticle::SetMassConstraint( Double_t Mass, Double_t SigmaMass )
778 KFParticleBase::SetMassConstraint( Mass, SigmaMass );
781 inline void KFParticle::SetNoDecayLength()
783 KFParticleBase::SetNoDecayLength();
786 inline void KFParticle::Construct(
const KFParticle *vDaughters[], Int_t NDaughters,
787 const KFParticle *ProdVtx, Double_t Mass, Bool_t IsConstrained )
789 KFParticleBase::Construct( (
const KFParticleBase**)vDaughters, NDaughters,
793 inline void KFParticle::TransportToDecayVertex()
795 KFParticleBase::TransportToDecayVertex();
798 inline void KFParticle::TransportToProductionVertex()
800 KFParticleBase::TransportToProductionVertex();
802 inline void KFParticle::TransportToPoint(
const Double_t xyz[] )
804 TransportToDS( GetDStoPoint(xyz) );
807 inline void KFParticle::TransportToVertex(
const MVertex &v )
812 inline void KFParticle::TransportToParticle(
const KFParticle &p )
815 GetDStoParticle( p, dS, dSp );
819 inline void KFParticle::TransportToDS( Double_t dS )
821 KFParticleBase::TransportToDS( dS );
824 inline Double_t KFParticle::GetDStoPoint(
const Double_t xyz[] )
const
826 return KFParticleBase::GetDStoPointBz( GetFieldAlice(), xyz );
830 inline void KFParticle::GetDStoParticle(
const KFParticle &p,
831 Double_t &DS, Double_t &DSp )
const
833 GetDStoParticleXY( p, DS, DSp );
837 inline Double_t KFParticle::GetDistanceFromVertex(
const Double_t vtx[] )
const
839 return KFParticleBase::GetDistanceFromVertex( vtx );
842 inline Double_t KFParticle::GetDeviationFromVertex(
const Double_t v[],
843 const Double_t Cv[] )
const
845 return KFParticleBase::GetDeviationFromVertex( v, Cv);
848 inline Double_t KFParticle::GetDistanceFromVertex(
const KFParticle &Vtx )
const
850 return KFParticleBase::GetDistanceFromVertex( Vtx );
853 inline Double_t KFParticle::GetDeviationFromVertex(
const KFParticle &Vtx )
const
855 return KFParticleBase::GetDeviationFromVertex( Vtx );
858 inline Double_t KFParticle::GetDistanceFromVertex(
const MVertex &Vtx )
const
860 return GetDistanceFromVertex(
KFParticle(Vtx) );
863 inline Double_t KFParticle::GetDeviationFromVertex(
const MVertex &Vtx )
const
865 return GetDeviationFromVertex(
KFParticle(Vtx) );
867 inline Double_t KFParticle::GetDistanceFromParticle(
const KFParticle &p )
const
869 return KFParticleBase::GetDistanceFromParticle( p );
871 inline Double_t KFParticle::GetDeviationFromParticle(
const KFParticle &p )
const
873 return KFParticleBase::GetDeviationFromParticle( p );
876 inline void KFParticle::SubtractFromVertex(
KFParticle &v )
const
878 KFParticleBase::SubtractFromVertex( v );
881 inline Double_t KFParticle::GetFieldAlice()
886 inline void KFParticle::GetFieldValue(
const Double_t * , Double_t B[] )
const
889 B[2] = GetFieldAlice();
893 Double_t &DS, Double_t &DSp )
const
895 GetDStoParticleXY( p, DS, DSp );
898 inline void KFParticle::GetDStoParticleXY(
const KFParticleBase &p,
899 Double_t &DS, Double_t &DSp )
const
901 KFParticleBase::GetDStoParticleBz( GetFieldAlice(), p, DS, DSp ) ;
905 inline void KFParticle::Transport( Double_t dS, Double_t P[], Double_t C[] )
const
907 KFParticleBase::TransportBz( GetFieldAlice(), dS, P, C );
910 inline void KFParticle::ConstructGamma(
const KFParticle &daughter1,
913 KFParticleBase::ConstructGammaBz( daughter1, daughter2, GetFieldAlice() );
static void SetField(Double_t Bz)