20#include "CbmKFTrack.h"
21#include "CbmMCTrack.h"
22#include "CbmStsTrack.h"
23#include "CbmTrackMatch.h"
24#include "FairMCPoint.h"
107 ggg =
new TH1F(
"ggg",
"ggg", 6, -0.5, 5.5);
108 q_QA =
new TProfile(
"q_QA",
"q quality", 100, 0.0, 1.0, 0.0, 100.0);
109 q_QA->GetXaxis()->SetTitle(
"p, GeV/c");
110 q_QA->GetYaxis()->SetTitle(
"Q determenition efficiency, %");
112 dp_p =
new TProfile(
"dp_p",
"dp_p", 100, 0.0, 1.0, 0.0, 5.0);
113 dp_p->GetXaxis()->SetTitle(
"p, GeV/c");
114 dp_p->GetYaxis()->SetTitle(
"#Deltap/p, %");
116 res_STShit_x =
new TH1F(
"residual_STShit_x",
"residual_STShit_x", 200, -10., 10.);
118 res_STShit_y =
new TH1F(
"residual_STShit_y",
"residual_STShit_y", 200, -10., 10.);
123 res_MVDhit_x =
new TH1F(
"residual_MVDhit_x",
"residual_MVDhit_x", 200, -30., 30.);
125 res_MVDhit_y =
new TH1F(
"residual_MVDhit_y",
"residual_MVDhit_y", 200, -30., 30.);
130 res_AtPV_x =
new TH1F(
"residual_AtPV_x",
"residual_AtPV_x", 2000, -1., 1.);
132 res_AtPV_y =
new TH1F(
"residual_AtPV_y",
"residual_AtPV_y", 2000, -1., 1.);
134 res_AtPV_tx =
new TH1F(
"residual_AtPV_tx",
"residual_AtPV_tx", 200, -0.004, 0.004);
136 res_AtPV_ty =
new TH1F(
"residual_AtPV_ty",
"residual_AtPV_ty", 200, -0.004, 0.004);
138 res_AtPV_qp =
new TH1F(
"residual_AtPV_qp",
"residual_AtPV_qp", 200, -0.05, 0.05);
139 res_AtPV_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
147 res_AtFP_x =
new TH1F(
"residual_AtFP_x",
"residual_AtFP_x", 200, -50., 50.);
149 res_AtFP_y =
new TH1F(
"residual_AtFP_y",
"residual_AtFP_y", 200, -400., 400.);
151 res_AtFP_tx =
new TH1F(
"residual_AtFP_tx",
"residual_AtFP_tx", 200, -0.004, 0.004);
153 res_AtFP_ty =
new TH1F(
"residual_AtFP_ty",
"residual_AtFP_ty", 200, -0.004, 0.004);
155 res_AtFP_qp =
new TH1F(
"residual_AtFP_qp",
"residual_AtFP_qp", 200, -0.05, 0.05);
156 res_AtFP_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
239 FairRootManager* fManger = FairRootManager::Instance();
271 MCTrackSortedArray[MvdPoint->GetTrackID()].
MvdArray.push_back(MvdPoint);
276 MCTrackSortedArray[StsPoint->GetTrackID()].
StsArray.push_back(StsPoint);
292 delete[] MCTrackSortedArray;
321 Double_t P_mc =
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
328 Double_t ddtx = fT[2] - PointPx / PointPz;
329 Double_t ddty = fT[3] - PointPy / PointPz;
331 Double_t ddqp_p = fT[4] - (qtrack /
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz));
339 if (finite(fT[4]) && (
fabs(fT[4]) > 1.e-20))
342 if (finite(fC[0]) && fC[0] > 0)
344 if (finite(fC[2]) && fC[2] > 0)
346 if (finite(fC[5]) && fC[5] > 0)
348 if (finite(fC[9]) && fC[9] > 0)
350 if (finite(fC[14]) && fC[14] > 0)
353 if (finite(fT[4]) && (
fabs(fT[4]) > 1.e-20)) {
354 if (qtrack == (
fabs(fT[4]) / fT[4]))
355 q_QA->Fill(P_mc, 100.0);
357 q_QA->Fill(P_mc, 0.0);
359 if (finite(fC[14]) && fC[14] > 0)
360 dp_p->Fill(P_mc,
fabs(1. / fT[4]) *
sqrt(fC[14]) * 100, 1);
385 MCFirstPoint = *mc_points->
MvdArray.begin();
387 MCFirstPoint = *mc_points->
StsArray.begin();
389 for (vector<CbmMvdPoint*>::iterator imvd = mc_points->
MvdArray.begin(); imvd != mc_points->
MvdArray.end(); ++imvd) {
390 MCFirstPoint = *imvd;
394 if (
fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) {
400 for (vector<CbmStsPoint*>::iterator ists = mc_points->
StsArray.begin(); ists != mc_points->
StsArray.end();
403 MCFirstPoint = *ists;
407 if (
fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) {
423 Double_t PointPx = MCFirstPoint->GetPx();
424 Double_t PointPy = MCFirstPoint->GetPy();
425 Double_t PointPz = MCFirstPoint->GetPz();
426 Double_t P_mc =
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
430 fT[0] - MCFirstPoint->GetX();
432 fT[1] - MCFirstPoint->GetY();
433 Double_t ddtx = fT[2] - PointPx / PointPz;
434 Double_t ddty = fT[3] - PointPy / PointPz;
437 fT[4] - (qtrack /
sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz));
444 if (finite(fT[4]) && (
fabs(fT[4]) > 1.e-20))
447 if (finite(fC[0]) && fC[0] > 0)
449 if (finite(fC[2]) && fC[2] > 0)
451 if (finite(fC[5]) && fC[5] > 0)
453 if (finite(fC[9]) && fC[9] > 0)
455 if (finite(fC[14]) && fC[14] > 0)
458 if (finite(fT[4]) && (
fabs(fT[4]) > 1.e-20)) {
459 if (qtrack == (
fabs(fT[4]) / fT[4]))
460 q_QA->Fill(P_mc, 100.0);
462 q_QA->Fill(P_mc, 0.0);
464 if (finite(fC[14]) && fC[14] > 0)
465 dp_p->Fill(P_mc,
fabs(1. / fT[4]) *
sqrt(fC[14]) * 100, 1);
537 res_AtPV_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
556 res_AtFP_qp->GetXaxis()->SetTitle(
"d(Q/P), c/GeV");
592 Double_t dx = (MvdHit->GetX() - 0.5 * (MvdP->GetX() + MvdP->
GetXOut()));
593 Double_t dy = (MvdHit->GetY() - 0.5 * (MvdP->GetY() + MvdP->
GetYOut()));
605 const bool useLinks = 1;
609 for (
int iH = 0; iH <
listStsHits->GetEntriesFast(); iH++) {
617 vector<int> stsPointIds;
618 vector<int> stsPointIds_hit;
620 FairLink link = stsHit->GetLink(iL);
622 int NLinks2 = stsCluster->GetNLinks();
623 for (
int iL2 = 0; iL2 < NLinks2; iL2++) {
624 FairLink link2 = stsCluster->GetLink(iL2);
626 const int NLinks3 = stsDigi->GetNLinks();
627 for (
int iL3 = 0; iL3 < NLinks3; iL3++) {
628 FairLink link3 = stsDigi->GetLink(iL3);
629 int stsPointId = link3.GetIndex();
630 stsPointIds.push_back(stsPointId);
635 link = stsHit->GetLink(iL);
637 NLinks2 = stsCluster->GetNLinks();
638 for (
int iL2 = 0; iL2 < NLinks2; iL2++) {
639 FairLink link2 = stsCluster->GetLink(iL2);
641 const int NLinks3 = stsDigi->GetNLinks();
642 for (
int iL3 = 0; iL3 < NLinks3; iL3++) {
643 FairLink link3 = stsDigi->GetLink(iL3);
644 int stsPointId = link3.GetIndex();
646 if (!find(&(stsPointIds[0]), &(stsPointIds[stsPointIds.size()]), stsPointId))
655 for (
unsigned int iP = 0; iP < stsPointIds_hit.size(); iP++)
658 stsPointIds_hit.push_back(stsPointId);
friend F32vec4 fabs(const F32vec4 &a)
vector< CbmStsPoint * > StsArray
vector< CbmMvdPoint * > MvdArray
vector< int > vStsHitMatch
virtual InitStatus ReInit()
TClonesArray * listStsHits
TClonesArray * listStsClusters
TClonesArray * listStsDigi
void FillHistoAtParticleVertex(CbmMCTrack *track_mc, CbmKFTrack *track_kf)
TClonesArray * listStsPts
TClonesArray * listStsTracks
TClonesArray * listMvdHitMatches
void FillHistoAtFirstPoint(CbmKFTrErrMCPoints *mc_points, CbmMCTrack *track_mc, CbmKFTrack *track_kf)
void Exec(Option_t *option)
TClonesArray * listMvdHits
virtual InitStatus Init()
TClonesArray * listMCTracks
TClonesArray * listMvdPts
TClonesArray * listStsTracksMatch
virtual Double_t * GetTrack()
Is it electron.
Int_t Extrapolate(Double_t z, Double_t *QP0=0, Bool_t line=false)
Access to i-th hit.
virtual Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
Double_t * GetTrack()
Is it electron.
Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
static CbmKF * Instance()
Double_t GetStartZ() const
Double_t GetStartY() const
Double_t GetStartX() const
Int_t GetPdgCode() const
Accessors.
CbmMvdHitMatch header file.
Double_t GetXOut() const
Accessors.
Double_t GetXIn() const
Accessors.
Int_t GetMCTrackId() const
Index of matched MC track.
Int_t GetNofMCTracks() const
Number of MCTracks with common hits.
static TDatabasePDG * Instance()
TParticlePDG * GetParticle(const char *name) const
void Delete(const char *namecycle="") override
void Close(Option_t *option="") override
RVec< PromoteType< T > > sqrt(const RVec< T > &v)