23#ifdef HomogeneousField
25#include "AliVVertex.h"
28#ifdef NonhomogeneousField
29#include "CbmKFTrack.h"
30#include "CbmKFVertex.h"
33#ifdef HomogeneousField
62 for (
int i = 0;
i < 21;
i++)
71#ifdef NonhomogeneousField
87 double c2 = 1. / (1. + a * a + b * b);
92 double pz =
sqrt(p2 * c2);
95 double H[3] = {-px * c2, -py * c2, -pz * pq};
106 double cxpz = H[0] * V[3] + H[1] * V[6] + H[2] * V[10];
107 double cypz = H[0] * V[4] + H[1] * V[7] + H[2] * V[11];
108 double capz = H[0] * V[5] + H[1] * V[8] + H[2] * V[12];
109 double cbpz = H[0] * V[8] + H[1] * V[9] + H[2] * V[13];
111 double cpzpz = H[0] * H[0] * V[5] + H[1] * H[1] * V[9] + H[2] * H[2] * V[14]
112 + 2 * (H[0] * H[1] * V[8] + H[0] * H[2] * V[12] + H[1] * H[2] * V[13]);
122 C[6] = V[3] * pz + a * cxpz;
123 C[7] = V[4] * pz + a * cypz;
125 C[9] = V[5] * pz * pz + 2 * a * pz * capz + a * a * cpzpz;
126 C[10] = V[6] * pz + b * cxpz;
127 C[11] = V[7] * pz + b * cypz;
129 C[13] = V[8] * pz * pz + a * pz * cbpz + b * pz * capz + a * b * cpzpz;
130 C[14] = V[9] * pz * pz + 2 * b * pz * cbpz + b * b * cpzpz;
134 C[18] = capz * pz + a * cpzpz;
135 C[19] = cbpz * pz + b * cpzpz;
138 Double_t Charge = (qp > 0.) ? 1 : ((qp < 0) ? -1 : 0);
146 mass = (particlePDG) ? particlePDG->
Mass() : 0.13957;
149 Create(r, C, Charge, mass);
170#ifdef HomogeneousField
176 track.PxPyPz(
fP + 3);
178 track.GetCovarianceXYZPxPyPz(
fC);
181 Double_t mass = (particlePDG) ? particlePDG->
Mass() : 0.13957;
191 vertex.GetCovarianceMatrix(
fC);
192 fChi2 = vertex.GetChi2();
193 fNDF = 2 * vertex.GetNContributors() - 3;
217 P[0] = p.
GetY() * cosA - p.
GetX() * sinA;
220 P[3] = p.
GetPz() * pti;
221 P[4] = p.
GetQ() * pti;
254 val = dy * ex - dx * ey;
259 Double_t h3 = (dy * ey + dx * ex) * ey / pt;
260 Double_t h4 = -(dy * ey + dx * ex) * ex / pt;
275 err += h0 * (h0 * Cv[0] + h1 * Cv[1]) + h1 * (h0 * Cv[1] + h1 * Cv[2]);
295#ifdef HomogeneousField
319#ifdef HomogeneousField
334 Double_t mP[8], mC[36], mP1[8], mC1[36];
353 Double_t sigmaS = .1 + 10. *
TMath::Sqrt((d[0] * d[0] + d[1] * d[1]) / (mP1[3] * mP1[3] + mP1[4] * mP1[4]));
355 Double_t h[2] = {mP1[3] * sigmaS, mP1[4] * sigmaS};
357 mC1[0] += h[0] * h[0];
358 mC1[1] += h[1] * h[0];
359 mC1[2] += h[1] * h[1];
371 if (problem || err < 1.e-20)
385#ifdef HomogeneousField
402 Double_t mP[8], mC[36], mP1[8], mC1[36];
410 a = (mP[3] * mP1[3] + mP[4] * mP1[4] + mP[5] * mP1[5]) /
n;
424 Double_t mP[8], mC[36], mP1[8], mC1[36];
432 a = (mP[3] * mP1[3] + mP[4] * mP1[4]) /
n;
446 Double_t mP[8], mC[36], mP1[8], mC1[36];
456 a = (nr * n1r + mP[5] * mP1[5]) /
n;
519 const Double_t mipt2derivative = mipt2 * (1 - 2 *
Px() *
Px() * ipt2);
520 const Double_t f2 = dx * mipt2derivative;
521 const Double_t f3 = -dy * mipt2derivative;
539 *timeErr2 = f5 * mC55 * f5 + f5 * mC54 * f4 + f4 * mC44 * f4 + f3 * mC33 * f3 + f3 * mC32 * f2 + f3 * mC31 * f1
540 + f3 * mC30 * f0 + f2 * mC22 * f2 + f2 * mC21 * f1 + f2 * mC20 * f0 + f1 * mC11 * f1
541 + f1 * mC10 * f0 + f0 * mC00 * f0;
543 return (dx *
Px() + dy *
Py()) * mipt2;
Double_t GetMass()
Information not to be changed.
Double_t * GetTrack()
Is it electron.
Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
virtual Double_t & GetRefY()
virtual Double_t & GetRefX()
I/O parameters for vertex fit routines.
virtual Double_t & GetRefZ()
virtual Double_t & GetRefChi2()
Array[6] of covariance matrix.
virtual Int_t & GetRefNDF()
Chi^2 after fit.
virtual Double_t * GetCovMatrix()
Bool_t fAtProductionVertex
void ConstructGamma(const KFParticle &daughter1, const KFParticle &daughter2)
void GetDStoParticleXY(const KFParticleBase &p, Double_t &DS, Double_t &DSp) const
Bool_t GetDistanceFromVertexXY(const Double_t vtx[], Double_t &val, Double_t &err) const
static void GetExternalTrackParam(const KFParticleBase &p, Double_t &X, Double_t &Alpha, Double_t P[5])
const Double_t & Px() const
Double_t GetDeviationFromVertexXY(const Double_t v[], const Double_t Cv[]=0) const
Double_t GetDeviationFromParticleXY(const KFParticle &p) const
void Transport(Double_t dS, Double_t P[], Double_t C[]) const
const Double_t & Y() const
const Double_t & Py() const
Double_t GetAngle(const KFParticle &p) const
Double_t GetPseudoProperDecayTime(const KFParticle &primVertex, const Double_t &mass, Double_t *timeErr2=0) const
Double_t GetDistanceFromParticleXY(const KFParticle &p) const
Double_t GetAngleXY(const KFParticle &p) const
Double_t GetAngleRZ(const KFParticle &p) const
const Double_t & X() const
Double_t GetDStoPoint(const Double_t xyz[]) const
void GetDStoParticle(const KFParticle &p, Double_t &DS, Double_t &DSp) const
Double_t GetCovariance(int i) const
void Create(const Double_t Param[], const Double_t Cov[], Int_t Charge, Double_t mass)
static TDatabasePDG * Instance()
TParticlePDG * GetParticle(const char *name) const
RVec< PromoteType< T > > sqrt(const RVec< T > &v)
*brief user defined string literal for JSON values *sa std::size_t n
Double_t ATan2(Double_t y, Double_t x)
Double_t Sqrt(Double_t x)