40 , listMCTracks(nullptr)
41 , listStsTracksMatch(nullptr)
42 , listStsTracks(nullptr)
43 , listStsHits(nullptr)
44 , listMvdHits(nullptr)
45 , listMvdHitMatches(nullptr)
46 , listStsClusters(nullptr)
47 , listStsDigi(nullptr)
48 , listStsDigiMatch(nullptr)
53 outfileName(
"outCbmTrackError.root")
60 , res_STShit_y(nullptr)
61 , pull_STShit_x(nullptr)
62 , pull_STShit_y(nullptr)
66 , res_MVDhit_y(nullptr)
67 , pull_MVDhit_x(nullptr)
68 , pull_MVDhit_y(nullptr)
73 , res_AtPV_tx(nullptr)
74 , res_AtPV_ty(nullptr)
75 , res_AtPV_qp(nullptr)
79 , pull_AtPV_y(nullptr)
80 , pull_AtPV_tx(nullptr)
81 , pull_AtPV_ty(nullptr)
82 , pull_AtPV_qp(nullptr)
88 , res_AtFP_tx(nullptr)
89 , res_AtFP_ty(nullptr)
90 , res_AtFP_qp(nullptr)
94 , pull_AtFP_y(nullptr)
95 , pull_AtFP_tx(nullptr)
96 , pull_AtFP_ty(nullptr)
97 , pull_AtFP_qp(nullptr)
109 TDirectory* currentDir = gDirectory;
110 gDirectory->cd(outfileName.Data());
112 ggg =
new TH1F(
"ggg",
"ggg", 6, -0.5, 5.5);
113 q_QA =
new TProfile(
"q_QA",
"q quality", 100, 0.0, 1.0, 0.0, 100.0);
114 q_QA->GetXaxis()->SetTitle(
"p, GeV/c");
115 q_QA->GetYaxis()->SetTitle(
"Q determenition efficiency, %");
117 dp_p =
new TProfile(
"dp_p",
"dp_p", 100, 0.0, 1.0, 0.0, 5.0);
118 dp_p->GetXaxis()->SetTitle(
"p, GeV/c");
119 dp_p->GetYaxis()->SetTitle(
"#Deltap/p, %");
121 res_STShit_x =
new TH1F(
"residual_STShit_x",
"residual_STShit_x", 200, -10., 10.);
122 res_STShit_x->GetXaxis()->SetTitle(
"dX, um");
123 res_STShit_y =
new TH1F(
"residual_STShit_y",
"residual_STShit_y", 200, -10., 10.);
124 res_STShit_y->GetXaxis()->SetTitle(
"dY, um");
125 pull_STShit_x =
new TH1F(
"pull_STShit_x",
"pull_STShit_x", 100, -15., 15.);
126 pull_STShit_y =
new TH1F(
"pull_STShit_y",
"pull_STShit_y", 100, -15., 15.);
128 res_MVDhit_x =
new TH1F(
"residual_MVDhit_x",
"residual_MVDhit_x", 200, -30., 30.);
129 res_MVDhit_x->GetXaxis()->SetTitle(
"dX, um");
130 res_MVDhit_y =
new TH1F(
"residual_MVDhit_y",
"residual_MVDhit_y", 200, -30., 30.);
131 res_MVDhit_y->GetXaxis()->SetTitle(
"dY, um");
132 pull_MVDhit_x =
new TH1F(
"pull_MVDhit_x",
"pull_MVDhit_x", 100, -5., 5.);
133 pull_MVDhit_y =
new TH1F(
"pull_MVDhit_y",
"pull_MVDhit_y", 100, -5., 5.);
136 res_AtPV_x =
new TH1F(
"residual_AtPV_x",
"residual_AtPV_x", 2000, -1., 1.);
137 res_AtPV_x->GetXaxis()->SetTitle(
"dX, cm");
138 res_AtPV_y =
new TH1F(
"residual_AtPV_y",
"residual_AtPV_y", 2000, -1., 1.);
139 res_AtPV_y->GetXaxis()->SetTitle(
"dY, cm");
140 res_AtPV_tx =
new TH1F(
"residual_AtPV_tx",
"residual_AtPV_tx", 200, -0.004, 0.004);
141 res_AtPV_tx->GetXaxis()->SetTitle(
"dtx");
142 res_AtPV_ty =
new TH1F(
"residual_AtPV_ty",
"residual_AtPV_ty", 200, -0.004, 0.004);
143 res_AtPV_ty->GetXaxis()->SetTitle(
"dty");
144 res_AtPV_qp =
new TH1F(
"residual_AtPV_qp",
"residual_AtPV_qp", 200, -0.05, 0.05);
145 res_AtPV_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
147 pull_AtPV_x =
new TH1F(
"pull_AtPV_x",
"pull_AtPV_x", 100, -5., 5.);
148 pull_AtPV_y =
new TH1F(
"pull_AtPV_y",
"pull_AtPV_y", 100, -5., 5.);
149 pull_AtPV_tx =
new TH1F(
"pull_AtPV_tx",
"pull_AtPV_tx", 100, -5., 5.);
150 pull_AtPV_ty =
new TH1F(
"pull_AtPV_ty",
"pull_AtPV_ty", 100, -5., 5.);
151 pull_AtPV_qp =
new TH1F(
"pull_AtPV_qp",
"pull_AtPV_qp", 100, -5., 5.);
153 res_AtFP_x =
new TH1F(
"residual_AtFP_x",
"residual_AtFP_x", 200, -50., 50.);
154 res_AtFP_x->GetXaxis()->SetTitle(
"dX, cm");
155 res_AtFP_y =
new TH1F(
"residual_AtFP_y",
"residual_AtFP_y", 200, -400., 400.);
156 res_AtFP_y->GetXaxis()->SetTitle(
"dY, cm");
157 res_AtFP_tx =
new TH1F(
"residual_AtFP_tx",
"residual_AtFP_tx", 200, -0.004, 0.004);
158 res_AtFP_tx->GetXaxis()->SetTitle(
"dtx, GeV/c");
159 res_AtFP_ty =
new TH1F(
"residual_AtFP_ty",
"residual_AtFP_ty", 200, -0.004, 0.004);
160 res_AtFP_ty->GetXaxis()->SetTitle(
"dty, GeV/c");
161 res_AtFP_qp =
new TH1F(
"residual_AtFP_qp",
"residual_AtFP_qp", 200, -0.05, 0.05);
162 res_AtFP_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
164 pull_AtFP_x =
new TH1F(
"pull_AtFP_x",
"pull_AtFP_x", 100, -5., 5.);
165 pull_AtFP_y =
new TH1F(
"pull_AtFP_y",
"pull_AtFP_y", 100, -5., 5.);
166 pull_AtFP_tx =
new TH1F(
"pull_AtFP_tx",
"pull_AtFP_tx", 100, -5., 5.);
167 pull_AtFP_ty =
new TH1F(
"pull_AtFP_ty",
"pull_AtFP_ty", 100, -5., 5.);
168 pull_AtFP_qp =
new TH1F(
"pull_AtFP_qp",
"pull_AtFP_qp", 100, -5., 5.);
170 gDirectory = currentDir;
289 qtrack = TDatabasePDG::Instance()->GetParticle(track_mc->
GetPdgCode())->Charge() / 3.0;
295 Double_t PointPx = track_mc->
GetPx();
296 Double_t PointPy = track_mc->
GetPy();
297 Double_t PointPz = track_mc->
GetPz();
298 Double_t P_mc =
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
305 Double_t ddtx = fT[2] - PointPx / PointPz;
306 Double_t ddty = fT[3] - PointPy / PointPz;
307 Double_t ddqp = (fabs(1. / fT[4]) - P_mc) / P_mc;
308 Double_t ddqp_p = fT[4] - (qtrack /
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz));
315 if (isfinite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
319 if (isfinite(fC[0]) && fC[0] > 0) {
322 if (isfinite(fC[2]) && fC[2] > 0) {
325 if (isfinite(fC[5]) && fC[5] > 0) {
328 if (isfinite(fC[9]) && fC[9] > 0) {
331 if (isfinite(fC[14]) && fC[14] > 0) {
335 if (isfinite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
336 if (qtrack == (fabs(fT[4]) / fT[4])) {
337 q_QA->Fill(P_mc, 100.0);
340 q_QA->Fill(P_mc, 0.0);
343 if (isfinite(fC[14]) && fC[14] > 0) {
344 dp_p->Fill(P_mc, fabs(1. / fT[4]) *
sqrt(fC[14]) * 100, 1);
351 Double_t* fT = track_kf->
GetTrack();
355 Bool_t nomvdpoint = 1;
357 FairMCPoint* MCFirstPoint;
366 if ((mc_points->
MvdArray.size() == 0) && (mc_points->
StsArray.size() == 0)) {
370 if (mc_points->
MvdArray.size() > 0) {
371 MCFirstPoint = *mc_points->
MvdArray.begin();
374 MCFirstPoint = *mc_points->
StsArray.begin();
377 for (vector<CbmMvdPoint*>::iterator imvd = mc_points->
MvdArray.begin(); imvd != mc_points->
MvdArray.end(); ++imvd) {
378 MCFirstPoint = *imvd;
381 if (fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) {
387 for (vector<CbmStsPoint*>::iterator ists = mc_points->
StsArray.begin(); ists != mc_points->
StsArray.end(); ++ists) {
388 MCFirstPoint = *ists;
391 if (fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) {
403 qtrack = TDatabasePDG::Instance()->GetParticle(track_mc->
GetPdgCode())->Charge() / 3.0;
409 Double_t PointPx = MCFirstPoint->GetPx();
410 Double_t PointPy = MCFirstPoint->GetPy();
411 Double_t PointPz = MCFirstPoint->GetPz();
412 Double_t P_mc =
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
417 fT[0] - MCFirstPoint->GetX();
419 fT[1] - MCFirstPoint->GetY();
420 Double_t ddtx = fT[2] - PointPx / PointPz;
421 Double_t ddty = fT[3] - PointPy / PointPz;
422 Double_t ddqp = (fabs(1. / fT[4]) - P_mc) / P_mc;
423 Double_t ddqp_p = fT[4] - (qtrack /
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz));
430 if (isfinite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
434 if (isfinite(fC[0]) && fC[0] > 0) {
437 if (isfinite(fC[2]) && fC[2] > 0) {
440 if (isfinite(fC[5]) && fC[5] > 0) {
443 if (isfinite(fC[9]) && fC[9] > 0) {
446 if (isfinite(fC[14]) && fC[14] > 0) {
450 if (isfinite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
451 if (qtrack == (fabs(fT[4]) / fT[4])) {
452 q_QA->Fill(P_mc, 100.0);
455 q_QA->Fill(P_mc, 0.0);
458 if (isfinite(fC[14]) && fC[14] > 0) {
459 dp_p->Fill(P_mc, fabs(1. / fT[4]) *
sqrt(fC[14]) * 100, 1);
603 const bool useLinks =
607 for (
int iH = 0; iH <
listStsHits->GetEntriesFast(); iH++) {
615 vector<int> stsPointIds;
616 vector<int> stsPointIds_hit;
621 for (
int iL2 = 0; iL2 < NLinks2; iL2++) {
627 for (
int iL3 = 0; iL3 < NLinks3; iL3++) {
631 stsPointIds.push_back(stsPointId);
639 for (
int iL2 = 0; iL2 < NLinks2; iL2++) {
645 for (
int iL3 = 0; iL3 < NLinks3; iL3++) {
650 if (!find(&(stsPointIds[0]), &(stsPointIds[stsPointIds.size()]), stsPointId)) {
659 stsPointIds_hit.push_back(stsPointId);
Double_t * GetCovMatrix() override
array[6] of track parameters(x,y,tx,ty,qp,z)