Go to the documentation of this file.
11 #include "FairRootManager.h"
13 #include "TClonesArray.h"
15 #include "TMatrixTSym.h"
27 : fHits(), fMvdHitsArray(0), fStsHitsArray(0), fIsInitialised(0) {}
31 FairRootManager*
rootMgr = FairRootManager::Instance();
33 cout <<
"-E- CbmStsKFTrackFitter::Init(): "
34 <<
"ROOT manager is not instantiated!" << endl;
39 cout <<
"-W- CbmStsKFTrackFitter::Init: "
40 <<
"no STS hits array" << endl;
45 cout <<
"-W- CbmStsKFTrackFitter::Init: "
46 <<
"no MVD hits array" << endl;
61 fHits.resize(NMvdHits + NStsHits);
63 for (Int_t
i = 0;
i < NMvdHits;
i++) {
70 for (Int_t
i = 0;
i < NStsHits;
i++) {
72 fHits[NMvdHits +
i].Create(
85 for (Int_t
i = 0;
i < 6;
i++)
106 for (
int i = 0;
i < 6;
i++)
108 for (
int i = 0;
i < 15;
i++)
110 c[0] = c[2] = c[5] = c[9] = c[14] = 100.;
125 FairTrackParam* e_track) {
136 FairTrackParam* e_track) {
143 if (z <= fpar->GetZ()) {
146 }
else if (z < fpar->GetZ() + 0.1) {
149 }
else if (lpar->GetZ() <= z) {
152 }
else if (lpar->GetZ() - 0.1 < z) {
167 FairRootManager* fManger = FairRootManager::Instance();
172 vtx =
reinterpret_cast<CbmVertex*
>(fManger->GetObject(
"PrimaryVertex."));
173 if (
nullptr == vtx) {
174 vtx =
reinterpret_cast<CbmVertex*
>(fManger->GetObject(
"PrimaryVertex"));
178 <<
"-W- CbmStsKFTrackFitter::GetChiToVertex: No Primary Vertex found!"
189 Double_t Cv[3] = {tmp(0, 0), tmp(0, 1), tmp(1, 1)};
202 FairTrackParam* v_track) {
204 if (!track || !vtx || !v_track)
return ret;
220 for (
int i = 0;
i < 6;
i++)
221 ok = ok &&
finite(t[
i]) && TMath::Abs(t[
i]) < 1.e5;
222 for (
int i = 0;
i < 15;
i++)
226 ok = ok && (c[0] > 0);
227 ok = ok && (c[2] > 0);
228 ok = ok && (c[5] > 0);
229 ok = ok && (c[9] > 0);
230 ok = ok && (c[14] > 0);
233 Double_t c00 = TMath::Sqrt(c[0]);
234 Double_t c11 = TMath::Sqrt(c[2]);
235 Double_t c22 = TMath::Sqrt(c[5]);
236 Double_t c33 = TMath::Sqrt(c[9]);
237 Double_t c44 = TMath::Sqrt(c[14]);
238 Double_t a = c11 * c00;
239 if (c[1] > a) c[1] = a;
240 if (c[1] < -a) c[1] = -a;
242 if (c[3] > a) c[3] = a;
243 if (c[3] < -a) c[3] = -a;
245 if (c[4] > a) c[4] = a;
246 if (c[4] < -a) c[4] = -a;
248 if (c[6] > a) c[6] = a;
249 if (c[6] < -a) c[6] = -a;
251 if (c[7] > a) c[7] = a;
252 if (c[7] < -a) c[7] = -a;
254 if (c[8] > a) c[8] = a;
255 if (c[8] < -a) c[8] = -a;
257 if (c[10] > a) c[10] = a;
258 if (c[10] < -a) c[10] = -a;
260 if (c[11] > a) c[11] = a;
261 if (c[11] < -a) c[11] = -a;
263 if (c[12] > a) c[12] = a;
264 if (c[12] < -a) c[12] = -a;
266 if (c[13] > a) c[13] = a;
267 if (c[13] < -a) c[13] = -a;
270 for (
int i = 0;
i < 6;
i++)
272 for (
int i = 0;
i < 15;
i++)
274 c[0] = c[2] = c[5] = c[9] = c[14] = 100.;
const FairTrackParam * GetParamLast() const
void Extrapolate(CbmStsTrack *track, Double_t z, FairTrackParam *e_track)
void SetKFHits(CbmKFTrack &T, CbmStsTrack *track)
friend F32vec4 sqrt(const F32vec4 &a)
void SetPID(Int_t pidHypo)
static FairRootManager * rootMgr
Double_t * GetTrack()
Is it electron.
Double_t GetChiToVertex(CbmStsTrack *track, CbmVertex *vtx=0)
void GetTrackParam(FairTrackParam &track)
void Fit2Vertex(CbmKFVertexInterface &vtx)
void SetParamLast(const FairTrackParam *par)
Int_t DoFit(CbmStsTrack *track, Int_t pidHypo=211)
virtual Int_t GetNofHits() const
Int_t GetNofMvdHits() const
Double_t & GetRefChi2()
array[15] of covariance matrix
data class for a reconstructed 3-d hit in the STS
static Double_t getDeviation(Double_t x, Double_t y, Double_t C[], Double_t vx, Double_t vy, Double_t Cv[]=0)
void SetStsTrack(CbmStsTrack &track, bool first=1)
Data class for STS tracks.
Int_t & GetRefNDF()
Chi^2 after fit.
ClassImp(CbmStsKFTrackFitter)
Int_t GetHitIndex(Int_t iHit) const
Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
void SetPidHypo(Int_t pid)
Bool_t CheckTrack(CbmKFTrack &T)
TClonesArray * fMvdHitsArray
const FairTrackParam * GetParamFirst() const
std::vector< CbmKFStsHit > fHits
TClonesArray * fStsHitsArray
void GetStsTrack(CbmStsTrack &track, bool first=1)
Double_t FitToVertex(CbmStsTrack *track, CbmVertex *vtx, FairTrackParam *v_track)
Int_t GetMvdHitIndex(Int_t iHit) const
Int_t Propagate(Double_t z_out, Double_t QP0)
void CovMatrix(TMatrixFSym &covMat) const
Int_t Fit(Bool_t downstream=1)
void SetTrackParam(const FairTrackParam &track)
std::vector< CbmKFHit * > fHits
Int_t Extrapolate(Double_t z, Double_t *QP0=0)
Access to i-th hit.