17 #ifndef KFParticleBASE_H
18 #define KFParticleBASE_H
24 virtual void GetFieldValue(
const Double_t xyz[], Double_t B[])
const = 0;
31 virtual Double_t GetDStoPoint(
const Double_t xyz[] )
const = 0;
34 Double_t &DS, Double_t &DSp )
const = 0;
36 virtual void Transport( Double_t dS, Double_t P[], Double_t C[] )
const = 0;
41 void Initialize(
const Double_t Param[],
const Double_t Cov[], Int_t Charge, Double_t Mass, Int_t PID = 0);
44 virtual void Clear(Option_t * =
"");
46 void SetVtxGuess( Double_t x, Double_t y, Double_t z );
47 void SetID(Int_t
id=0) {fID = id;}
48 void SetParentID(Int_t
id=0) {fParentID = id;}
50 Int_t GetID()
const {
return fID;}
51 Int_t GetParentID()
const {
return fParentID;}
52 Double_t GetX ()
const {
return fP[0]; }
53 Double_t GetY ()
const {
return fP[1]; }
54 Double_t GetZ ()
const {
return fP[2]; }
55 Double_t GetPx ()
const {
return fP[3]; }
56 Double_t GetPy ()
const {
return fP[4]; }
57 Double_t GetPz ()
const {
return fP[5]; }
58 Double_t GetE ()
const {
return fP[6]; }
59 Double_t GetS ()
const {
return fP[7]; }
60 Short_t GetQ ()
const {
return fQ; }
61 Double_t GetChi2 ()
const {
return fChi2; }
62 Short_t GetNDF ()
const {
return fNDF; }
64 const Double_t *GetParameter()
const {
return fP;}
65 Double_t GetParameter ( Int_t i )
const {
return fP[i];}
66 const Double_t *GetCovariance()
const {
return fC;}
67 Double_t GetCovariance( Int_t i )
const {
return fC[i]; }
68 Double_t GetCovariance( Int_t i, Int_t j )
const {
return fC[IJ(i,j)]; }
73 Int_t GetMomentum ( Double_t &P, Double_t &SigmaP )
const ;
74 Int_t GetPt ( Double_t &Pt, Double_t &SigmaPt )
const ;
75 Int_t GetEta ( Double_t &Eta, Double_t &SigmaEta )
const ;
76 Int_t GetPhi ( Double_t &Phi, Double_t &SigmaPhi )
const ;
77 Int_t GetMass ( Double_t &M, Double_t &SigmaM )
const ;
78 Int_t GetDecayLength ( Double_t &L, Double_t &SigmaL )
const ;
79 Int_t GetDecayLengthXY ( Double_t &L, Double_t &SigmaL )
const ;
80 Int_t GetLifeTime ( Double_t &T, Double_t &SigmaT )
const ;
81 Int_t GetR ( Double_t &R, Double_t &SigmaR )
const ;
87 Double_t & X () {
return fP[0]; }
88 Double_t & Y () {
return fP[1]; }
89 Double_t & Z () {
return fP[2]; }
90 Double_t & Px () {
return fP[3]; }
91 Double_t & Py () {
return fP[4]; }
92 Double_t & Pz () {
return fP[5]; }
93 Double_t & E () {
return fP[6]; }
94 Double_t & S () {
return fP[7]; }
95 Short_t & Q () {
return fQ; }
96 Double_t & Chi2 () {
return fChi2; }
97 Short_t & NDF () {
return fNDF; }
99 Double_t &
Parameter ( Int_t i ) {
return fP[i]; }
100 Double_t & Covariance( Int_t i ) {
return fC[i]; }
101 Double_t & Covariance( Int_t i, Int_t j ) {
return fC[IJ(i,j)]; }
124 void SetMassConstraint( Double_t Mass, Double_t SigmaMass = 0 );
128 void SetNoDecayLength();
133 void Construct(
const KFParticleBase *vDaughters[], Int_t NDaughters,
134 const KFParticleBase *ProdVtx=0, Double_t Mass=-1, Bool_t IsConstrained=0 );
147 void TransportToDecayVertex();
151 void TransportToProductionVertex();
155 void TransportToDS( Double_t dS );
159 Double_t GetDStoPointBz( Double_t Bz,
const Double_t xyz[] )
const;
162 Double_t &dS, Double_t &dS1 )
const ;
166 void TransportBz( Double_t Bz, Double_t dS, Double_t P[], Double_t C[] )
const;
167 void TransportCBM( Double_t dS, Double_t P[], Double_t C[] )
const;
176 Double_t GetDistanceFromVertex(
const Double_t vtx[] )
const;
177 Double_t GetDistanceFromVertex(
const KFParticleBase &Vtx )
const;
178 Double_t GetDistanceFromParticle(
const KFParticleBase &p )
const;
183 Double_t GetDeviationFromVertex(
const Double_t v[],
184 const Double_t Cv[]=0 )
const;
185 Double_t GetDeviationFromVertex(
const KFParticleBase &Vtx )
const;
186 Double_t GetDeviationFromParticle(
const KFParticleBase &p )
const;
197 virtual void Print(Option_t *opt=
"")
const;
198 Int_t IdTruth()
const {
return fIdTruth;}
199 Int_t QaTruth()
const {
return fQuality; }
200 Int_t IdParentMcVx()
const {
return fIdParentMcVx;}
201 Int_t IdParentVx()
const {
return IdParentMcVx();}
203 void SetIdTruth(Int_t idtru,Int_t qatru=0) {
fIdTruth = (UShort_t) idtru; fQuality = (UShort_t) qatru;}
204 void SetIdParentMcVx(Int_t
id) {fIdParentMcVx = id;}
205 void SetPDG ( Int_t pdg ) { fPDG = pdg; }
206 Int_t GetPDG ()
const {
return fPDG; }
209 static Int_t IJ( Int_t i, Int_t j ){
210 return ( j<=i ) ? i*(i+1)/2+j :j*(j+1)/2+i;
213 Double_t & Cij( Int_t i, Int_t j ){
return fC[IJ(i,j)]; }
215 void Convert( Bool_t ToProduction );
216 void TransportLine( Double_t S, Double_t P[], Double_t C[] )
const ;
217 Double_t GetDStoPointLine(
const Double_t xyz[] )
const;
219 static Bool_t InvertSym3(
const Double_t A[], Double_t Ainv[] );
220 static void InvertCholetsky3(Double_t a[6]);
222 static void MultQSQt(
const Double_t Q[],
const Double_t S[],
225 static Double_t GetSCorrection(
const Double_t Part[],
const Double_t XYZ[] );
227 void GetMeasurement(
const Double_t XYZ[], Double_t m[], Double_t V[] )
const ;
238 Double32_t fSFromDecay;
239 Bool_t fAtProductionVertex;
246 UShort_t fIdParentMcVx;
251 std::ostream& operator<<(std::ostream& os,
KFParticleBase const & particle);
Double32_t fVtxGuess[3]
Flag shows that the particle error along its trajectory is taken from production vertex.
Bool_t fIsLinearized
Guess for the position of the decay vertex ( used for linearisation of equations ) ...
UShort_t fIdTruth
Flag shows that the guess is present.