273 static int L1_NEVENTS = 0;
274 static double L1_CATIME = 0.0;
278 for (vector<CbmL1Track>::iterator rtraIt =
vRTracks.begin(); rtraIt !=
vRTracks.end(); ++rtraIt) {
279 ntra.
ghosts += rtraIt->IsGhost();
290 int sta_nhits[
algo->NStations], sta_nfakes[
algo->NStations];
292 for (
int i = 0;
i <
algo->NStations;
i++) {
297 for (vector<CbmL1MCTrack>::iterator mtraIt =
vMCTracks.begin(); mtraIt !=
vMCTracks.end(); mtraIt++) {
311 double ratio_length = 0;
312 double ratio_fakes = 0;
313 double mc_length_hits = mtra.
NStations();
316 for (
unsigned int irt = 0; irt < rTracks.size(); irt++) {
318 static_cast<double>(rTracks[irt]->GetNOfHits()) * rTracks[irt]->GetMaxPurity() / mc_length_hits;
319 ratio_fakes += 1 - rTracks[irt]->GetMaxPurity();
335 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"short");
339 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"shortE");
343 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"shortPion");
347 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"shortKaon");
351 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
355 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"shortRest");
359 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"total");
362 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"d0");
366 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"fast");
370 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
373 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"fast_prim");
375 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"fast_sec");
378 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"slow");
381 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"slow_prim");
383 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"slow_sec");
387 if (mtra.
pdg == 11 || mtra.
pdg == -11) {
388 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"total_e");
391 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"fast_e");
395 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
399 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
"slow_e");
403 ntra.
Inc(reco, killed, ratio_length, ratio_fakes, nclones, mc_length, mc_length_hits,
412 L1_CATIME +=
algo->CATime;
424 cout <<
"Number of true and fake hits in stations: " << endl;
425 for (
int i = 0;
i <
algo->NStations;
i++) {
426 cout << sta_nhits[
i] - sta_nfakes[
i] <<
"+" << sta_nfakes[
i] <<
" ";
431 cout <<
"L1 ACCUMULATED STAT : " << L1_NEVENTS <<
" EVENTS " << endl << endl;
433 cout <<
"MC tracks/event found : "
434 << int(
double(L1_NTRA.
reco.counters[L1_NTRA.
indices[
"total"]]) /
double(L1_NEVENTS)) << endl;
436 cout <<
"CA Track Finder: " << L1_CATIME / L1_NEVENTS <<
" s/ev" << endl << endl;
732 static const int NParticles = 2;
734 static const int nFitQA = 16;
735 static TH1F* hFitDaughtersQA[NParticles][nFitQA];
736 static TH1F* hFitQA[NParticles][nFitQA];
738 static const int nHistoPartParam = 5;
739 static TH1F* hPartParam[NParticles][nHistoPartParam];
740 static TH1F* hPartParamBG[NParticles][nHistoPartParam];
741 static TH1F* hPartParamSignal[NParticles][nHistoPartParam];
742 static const int nHistoPartParamQA = 3;
745 static const int nHistosPV = 6;
746 static TH1F* hPVFitQa[nHistosPV];
748 TString patName[NParticles] = {
"K0s",
"Lambda"};
750 static bool first_call = 1;
761 for (
int iPart = 0; iPart < NParticles; ++iPart) {
771 TString parName[nFitQA / 2] = {
"X",
"Y",
"Z",
"Px",
"Py",
"Pz",
"E",
"M"};
773 float xMax[nFitQA / 2] = {0.15, 0.15, 0.03, 0.01, 0.01, 0.06, 0.06, 0.01};
775 for (
int iH = 0; iH < nFitQA / 2; iH++) {
776 hFitDaughtersQA[iPart][iH] =
new TH1F(
777 (res + parName[iH]).Data(), (res + parName[iH]).Data(), nBins, -xMax[iH], xMax[iH]);
778 hFitDaughtersQA[iPart][iH + 8] =
779 new TH1F((pull + parName[iH]).Data(), (pull + parName[iH]).Data(), nBins, -6, 6);
787 TString parName[nFitQA / 2] = {
"X",
"Y",
"Z",
"Px",
"Py",
"Pz",
"E",
"M"};
789 float xMax[nFitQA / 2] = {0.15, 0.15, 1.2, 0.02, 0.02, 0.15, 0.15, 0.006};
791 for (
int iH = 0; iH < nFitQA / 2; iH++) {
792 hFitQA[iPart][iH] =
new TH1F((res + parName[iH]).Data(), (res + parName[iH]).Data(), nBins,
793 -xMax[iH], xMax[iH]);
794 hFitQA[iPart][iH + 8] =
795 new TH1F((pull + parName[iH]).Data(), (pull + parName[iH]).Data(), nBins, -6, 6);
803 TString parName[nHistoPartParam] = {
"M",
"DL",
"c#tau",
"chi2ndf",
"prob"};
804 int nBins[nHistoPartParam] = {1000, 100, 100, 100, 100};
805 float xMin[nHistoPartParam] = {0.3f, 0., 0., 0., 0.};
806 float xMax[nHistoPartParam] = {1.3f, 30., 30., 20., 1.};
812 for (
int iH = 0; iH < nHistoPartParam; iH++)
813 hPartParam[iPart][iH] =
814 new TH1F(parName[iH].Data(), parName[iH].Data(), nBins[iH], xMin[iH], xMax[iH]);
819 for (
int iH = 0; iH < nHistoPartParam; iH++)
820 hPartParamSignal[iPart][iH] =
821 new TH1F((parName[iH]).Data(), (parName[iH]).Data(), nBins[iH], xMin[iH], xMax[iH]);
828 for (
int iH = 0; iH < nHistoPartParamQA; iH++) {
842 for (
int iH = 0; iH < nHistoPartParam; iH++)
843 hPartParamBG[iPart][iH] =
844 new TH1F((parName[iH]).Data(), (parName[iH]).Data(), nBins[iH], xMin[iH], xMax[iH]);
863 } Table[nHistosPV] = {{
"PVResX",
"x_{rec}-x_{mc}, cm", 100, -0.006f, 0.006f},
864 {
"PVResY",
"y_{rec}-y_{mc}, cm", 100, -0.006f, 0.006f},
865 {
"PVResZ",
"z_{rec}-z_{mc}, cm", 100, -0.06f, 0.06f},
866 {
"PVPullX",
"Pull X", 100, -6.f, 6.f},
867 {
"PVPullY",
"Pull Y", 100, -6.f, 6.f},
868 {
"PVPullZ",
"Pull Z", 100, -6.f, 6.f}};
869 for (
int iHPV = 0; iHPV < nHistosPV; ++iHPV) {
870 hPVFitQa[iHPV] =
new TH1F(Table[iHPV].name.data(), Table[iHPV].title.data(), Table[iHPV].n,
871 Table[iHPV].l, Table[iHPV].r);
877 for (
unsigned int iP = 0; iP <
vRParticles.size(); iP++) {
901 hPartParam[iParticle][0]->
Fill(M);
902 hPartParam[iParticle][1]->
Fill(dL);
903 hPartParam[iParticle][2]->
Fill(cT);
904 hPartParam[iParticle][3]->
Fill(chi2 / ndf);
905 hPartParam[iParticle][4]->
Fill(prob);
909 hPartParamBG[iParticle][0]->
Fill(M);
910 hPartParamBG[iParticle][1]->
Fill(dL);
911 hPartParamBG[iParticle][2]->
Fill(cT);
912 hPartParamBG[iParticle][3]->
Fill(chi2 / ndf);
913 hPartParamBG[iParticle][4]->
Fill(prob);
916 hPartParamSignal[iParticle][0]->
Fill(M);
917 hPartParamSignal[iParticle][1]->
Fill(dL);
918 hPartParamSignal[iParticle][2]->
Fill(cT);
919 hPartParamSignal[iParticle][3]->
Fill(chi2 / ndf);
920 hPartParamSignal[iParticle][4]->
Fill(prob);
935 for (
int iPar = 0; iPar < 3; iPar++) {
944 for (
int iPar = 3; iPar < 7; iPar++) {
954 Double_t res[8] = {0}, pull[8] = {0},
955 mcParam[8] = {decayVtx[0], decayVtx[1], decayVtx[2], mcTrack.
GetPx(),
957 for (
int iPar = 0; iPar < 7; iPar++) {
958 res[iPar] = recParam[iPar] - mcParam[iPar];
959 if (
fabs(errParam[iPar]) > 1.e-20)
960 pull[iPar] = res[iPar] / errParam[iPar];
962 res[7] = M - mcParam[7];
963 if (
fabs(ErrM) > 1.e-20)
964 pull[7] = res[7] / ErrM;
966 for (
int iPar = 0; iPar < 8; iPar++) {
967 hFitQA[iParticle][iPar]->
Fill(res[iPar]);
968 hFitQA[iParticle][iPar + 8]->
Fill(pull[iPar]);
974 for (
int iD = 0; iD < mcPart.
NDaughters(); ++iD) {
979 int recDaughterId =
MCtoRParticleId[mcDaughterId].GetBestMatchWithPdg();
995 for (
int iPar = 0; iPar < 7; iPar++) {
1001 res[iPar] = Daughter.
GetParameter(iPar) - mcParam[iPar];
1002 if (
fabs(error) > 1.e-20)
1003 pull[iPar] = res[iPar] / error;
1005 res[7] = M - mcParam[7];
1006 if (
fabs(ErrM) > 1.e-20)
1007 pull[7] = res[7] / ErrM;
1009 for (
int iPar = 0; iPar < 8; iPar++) {
1010 hFitDaughtersQA[iParticle][iPar]->
Fill(res[iPar]);
1011 hFitDaughtersQA[iParticle][iPar + 8]->
Fill(pull[iPar]);
1053 float mcPVx[3] = {0.f};
1054 for (
unsigned iMC = 0; iMC <
vMCTracks.size(); ++iMC) {
1062 float dRPVr[3] = {(float)(
PF->GetPV()->GetRefX() - mcPVx[0]), (float)(
PF->GetPV()->GetRefY() - mcPVx[1]),
1063 (float)(
PF->GetPV()->GetRefZ() - mcPVx[2])};
1064 float dRPVp[3] = {(float)(dRPVr[0] /
sqrt(
PF->GetPV()->GetCovMatrix()[0])),
1065 (float)(dRPVr[1] /
sqrt(
PF->GetPV()->GetCovMatrix()[2])),
1066 (float)(dRPVr[2] /
sqrt(
PF->GetPV()->GetCovMatrix()[5]))};
1067 for (
unsigned int iHPV = 0; iHPV < 3; ++iHPV)
1068 hPVFitQa[iHPV]->Fill(dRPVr[iHPV]);
1069 for (
unsigned int iHPV = 3; iHPV < 6; ++iHPV)
1070 hPVFitQa[iHPV]->Fill(dRPVp[iHPV - 3]);
1079 static TProfile *p_eff_all_vs_mom, *p_eff_prim_vs_mom, *p_eff_sec_vs_mom, *p_eff_d0_vs_mom, *p_eff_prim_vs_theta,
1080 *p_eff_all_vs_pt, *p_eff_prim_vs_pt, *p_eff_all_vs_nhits, *p_eff_prim_vs_nhits, *p_eff_sec_vs_nhits;
1082 static TH1F *h_reg_MCmom, *h_acc_MCmom, *h_reco_MCmom, *h_ghost_Rmom;
1083 static TH1F *h_reg_prim_MCmom, *h_acc_prim_MCmom, *h_reco_prim_MCmom;
1084 static TH1F *h_reg_sec_MCmom, *h_acc_sec_MCmom, *h_reco_sec_MCmom;
1086 static TH1F* h_acc_mom_short123s;
1088 static TH1F *h_reg_mom_prim, *h_reg_mom_sec, *h_reg_nhits_prim, *h_reg_nhits_sec;
1089 static TH1F *h_acc_mom_prim, *h_acc_mom_sec, *h_acc_nhits_prim, *h_acc_nhits_sec;
1090 static TH1F *h_reco_mom_prim, *h_reco_mom_sec, *h_reco_nhits_prim, *h_reco_nhits_sec;
1091 static TH1F *h_rest_mom_prim, *h_rest_mom_sec, *h_rest_nhits_prim, *h_rest_nhits_sec;
1095 static TH1F *h_ghost_mom, *h_ghost_nhits, *h_ghost_fstation, *h_ghost_chi2, *h_ghost_prob, *h_ghost_tx, *h_ghost_ty;
1096 static TH1F *h_reco_mom, *h_reco_d0_mom, *h_reco_nhits, *h_reco_station, *h_reco_chi2, *h_reco_prob, *h_rest_prob,
1097 *h_reco_clean, *h_reco_time;
1098 static TProfile *h_reco_timeNtr, *h_reco_timeNhit;
1099 static TProfile *h_reco_fakeNtr, *h_reco_fakeNhit;
1100 static TH1F *h_tx, *h_ty, *h_sec_r, *h_ghost_r;
1102 static TH1F *h_notfound_mom, *h_notfound_nhits, *h_notfound_station, *h_notfound_r, *h_notfound_tx, *h_notfound_ty;
1104 static TH1F *h_mcp, *h_nmchits;
1108 static TH2F *h2_vertex, *h2_prim_vertex, *h2_sec_vertex;
1111 static TH2F *h2_reg_nhits_vs_mom_prim, *h2_reg_nhits_vs_mom_sec, *h2_reg_fstation_vs_mom_prim,
1112 *h2_reg_fstation_vs_mom_sec, *h2_reg_lstation_vs_fstation_prim, *h2_reg_lstation_vs_fstation_sec;
1113 static TH2F *h2_acc_nhits_vs_mom_prim, *h2_acc_nhits_vs_mom_sec, *h2_acc_fstation_vs_mom_prim,
1114 *h2_acc_fstation_vs_mom_sec, *h2_acc_lstation_vs_fstation_prim, *h2_acc_lstation_vs_fstation_sec;
1115 static TH2F *h2_reco_nhits_vs_mom_prim, *h2_reco_nhits_vs_mom_sec, *h2_reco_fstation_vs_mom_prim,
1116 *h2_reco_fstation_vs_mom_sec, *h2_reco_lstation_vs_fstation_prim, *h2_reco_lstation_vs_fstation_sec;
1117 static TH2F *h2_ghost_nhits_vs_mom, *h2_ghost_fstation_vs_mom, *h2_ghost_lstation_vs_fstation;
1118 static TH2F *h2_rest_nhits_vs_mom_prim, *h2_rest_nhits_vs_mom_sec, *h2_rest_fstation_vs_mom_prim,
1119 *h2_rest_fstation_vs_mom_sec, *h2_rest_lstation_vs_fstation_prim, *h2_rest_lstation_vs_fstation_sec;
1121 static bool first_call = 1;
1130 p_eff_all_vs_mom =
new TProfile(
"p_eff_all_vs_mom",
"AllSet Efficiency vs Momentum", 100, 0.0, 5.0, 0.0, 100.0);
1132 new TProfile(
"p_eff_prim_vs_mom",
"Primary Set Efficiency vs Momentum", 100, 0.0, 5.0, 0.0, 100.0);
1134 new TProfile(
"p_eff_sec_vs_mom",
"Secondary Set Efficiency vs Momentum", 100, 0.0, 5.0, 0.0, 100.0);
1136 new TProfile(
"p_eff_d0_vs_mom",
"D0 Secondary Tracks Efficiency vs Momentum", 150, 0.0, 15.0, 0.0, 100.0);
1137 p_eff_prim_vs_theta =
1138 new TProfile(
"p_eff_prim_vs_theta",
"All Primary Set Efficiency vs Theta", 100, 0.0, 30.0, 0.0, 100.0);
1139 p_eff_all_vs_pt =
new TProfile(
"p_eff_all_vs_pt",
"AllSet Efficiency vs Pt", 100, 0.0, 5.0, 0.0, 100.0);
1140 p_eff_prim_vs_pt =
new TProfile(
"p_eff_prim_vs_pt",
"Primary Set Efficiency vs Pt", 100, 0.0, 5.0, 0.0, 100.0);
1142 p_eff_all_vs_nhits =
1143 new TProfile(
"p_eff_all_vs_nhits",
"AllSet Efficiency vs NMCHits", 8, 3.0, 11.0, 0.0, 100.0);
1144 p_eff_prim_vs_nhits =
1145 new TProfile(
"p_eff_prim_vs_nhits",
"PrimSet Efficiency vs NMCHits", 8, 3.0, 11.0, 0.0, 100.0);
1146 p_eff_sec_vs_nhits =
1147 new TProfile(
"p_eff_sec_vs_nhits",
"SecSet Efficiency vs NMCHits", 8, 3.0, 11.0, 0.0, 100.0);
1149 h_reg_MCmom =
new TH1F(
"h_reg_MCmom",
"Momentum of registered tracks", 100, 0.0, 5.0);
1150 h_acc_MCmom =
new TH1F(
"h_acc_MCmom",
"Reconstructable tracks", 100, 0.0, 5.0);
1151 h_reco_MCmom =
new TH1F(
"h_reco_MCmom",
"Reconstructed tracks", 100, 0.0, 5.0);
1152 h_ghost_Rmom =
new TH1F(
"h_ghost_Rmom",
"Ghost tracks", 100, 0.0, 5.0);
1153 h_reg_prim_MCmom =
new TH1F(
"h_reg_prim_MCmom",
"Momentum of registered tracks", 100, 0.0, 5.0);
1154 h_acc_prim_MCmom =
new TH1F(
"h_acc_prim_MCmom",
"Reconstructable tracks", 100, 0.0, 5.0);
1155 h_reco_prim_MCmom =
new TH1F(
"h_reco_prim_MCmom",
"Reconstructed tracks", 100, 0.0, 5.0);
1156 h_reg_sec_MCmom =
new TH1F(
"h_reg_sec_MCmom",
"Momentum of registered tracks", 100, 0.0, 5.0);
1157 h_acc_sec_MCmom =
new TH1F(
"h_acc_sec_MCmom",
"Reconstructable tracks", 100, 0.0, 5.0);
1158 h_reco_sec_MCmom =
new TH1F(
"h_reco_sec_MCmom",
"Reconstructed tracks", 100, 0.0, 5.0);
1160 h_acc_mom_short123s =
1161 new TH1F(
"h_acc_mom_short123s",
"Momentum of accepted tracks with 3 hits on first stations", 500, 0.0, 5.0);
1163 h_reg_mom_prim =
new TH1F(
"h_reg_mom_prim",
"Momentum of registered primary tracks", 500, 0.0, 5.0);
1164 h_reg_mom_sec =
new TH1F(
"h_reg_mom_sec",
"Momentum of registered secondary tracks", 500, 0.0, 5.0);
1165 h_acc_mom_prim =
new TH1F(
"h_acc_mom_prim",
"Momentum of accepted primary tracks", 500, 0.0, 5.0);
1166 h_acc_mom_sec =
new TH1F(
"h_acc_mom_sec",
"Momentum of accepted secondary tracks", 500, 0.0, 5.0);
1167 h_reco_mom_prim =
new TH1F(
"h_reco_mom_prim",
"Momentum of reconstructed primary tracks", 500, 0.0, 5.0);
1168 h_reco_mom_sec =
new TH1F(
"h_reco_mom_sec",
"Momentum of reconstructed secondary tracks", 500, 0.0, 5.0);
1169 h_rest_mom_prim =
new TH1F(
"h_rest_mom_prim",
"Momentum of not found primary tracks", 500, 0.0, 5.0);
1170 h_rest_mom_sec =
new TH1F(
"h_rest_mom_sec",
"Momentum of not found secondary tracks", 500, 0.0, 5.0);
1172 h_reg_nhits_prim =
new TH1F(
"h_reg_nhits_prim",
"Number of hits in registered primary track", 51, -0.1, 10.1);
1173 h_reg_nhits_sec =
new TH1F(
"h_reg_nhits_sec",
"Number of hits in registered secondary track", 51, -0.1, 10.1);
1174 h_acc_nhits_prim =
new TH1F(
"h_acc_nhits_prim",
"Number of hits in accepted primary track", 51, -0.1, 10.1);
1175 h_acc_nhits_sec =
new TH1F(
"h_acc_nhits_sec",
"Number of hits in accepted secondary track", 51, -0.1, 10.1);
1177 new TH1F(
"h_reco_nhits_prim",
"Number of hits in reconstructed primary track", 51, -0.1, 10.1);
1179 new TH1F(
"h_reco_nhits_sec",
"Number of hits in reconstructed secondary track", 51, -0.1, 10.1);
1180 h_rest_nhits_prim =
new TH1F(
"h_rest_nhits_prim",
"Number of hits in not found primary track", 51, -0.1, 10.1);
1181 h_rest_nhits_sec =
new TH1F(
"h_rest_nhits_sec",
"Number of hits in not found secondary track", 51, -0.1, 10.1);
1183 h_ghost_mom =
new TH1F(
"h_ghost_mom",
"Momentum of ghost tracks", 500, 0.0, 5.0);
1184 h_ghost_nhits =
new TH1F(
"h_ghost_nhits",
"Number of hits in ghost track", 51, -0.1, 10.1);
1185 h_ghost_fstation =
new TH1F(
"h_ghost_fstation",
"First station of ghost track", 50, -0.5, 10.0);
1186 h_ghost_chi2 =
new TH1F(
"h_ghost_chi2",
"Chi2/NDF of ghost track", 50, -0.5, 10.0);
1187 h_ghost_prob =
new TH1F(
"h_ghost_prob",
"Prob of ghost track", 505, 0., 1.01);
1188 h_ghost_r =
new TH1F(
"h_ghost_r",
"R of ghost track at the first hit", 50, 0.0, 15.0);
1189 h_ghost_tx =
new TH1F(
"h_ghost_tx",
"tx of ghost track at the first hit", 50, -5.0, 5.0);
1190 h_ghost_ty =
new TH1F(
"h_ghost_ty",
"ty of ghost track at the first hit", 50, -1.0, 1.0);
1192 h_reco_mom =
new TH1F(
"h_reco_mom",
"Momentum of reco track", 50, 0.0, 5.0);
1193 h_reco_nhits =
new TH1F(
"h_reco_nhits",
"Number of hits in reco track", 50, 0.0, 10.0);
1194 h_reco_station =
new TH1F(
"h_reco_station",
"First station of reco track", 50, -0.5, 10.0);
1195 h_reco_chi2 =
new TH1F(
"h_reco_chi2",
"Chi2/NDF of reco track", 50, -0.5, 10.0);
1196 h_reco_prob =
new TH1F(
"h_reco_prob",
"Prob of reco track", 505, 0., 1.01);
1197 h_rest_prob =
new TH1F(
"h_rest_prob",
"Prob of reco rest track", 505, 0., 1.01);
1198 h_reco_clean =
new TH1F(
"h_reco_clean",
"Percentage of correct hits", 100, -0.5, 100.5);
1199 h_reco_time =
new TH1F(
"h_reco_time",
"CA Track Finder Time (s/ev)", 20, 0.0, 20.0);
1200 h_reco_timeNtr =
new TProfile(
"h_reco_timeNtr",
"CA Track Finder Time (s/ev) vs N Tracks", 200, 0.0, 1000.0);
1201 h_reco_timeNhit =
new TProfile(
"h_reco_timeNhit",
"CA Track Finder Time (s/ev) vs N Hits", 200, 0.0, 30000.0);
1202 h_reco_fakeNtr =
new TProfile(
"h_reco_fakeNtr",
"N Fake hits vs N Tracks", 200, 0.0, 1000.0);
1203 h_reco_fakeNhit =
new TProfile(
"h_reco_fakeNhit",
"N Fake hits vs N Hits", 200, 0.0, 30000.0);
1205 h_reco_d0_mom =
new TH1F(
"h_reco_d0_mom",
"Momentum of reco D0 track", 150, 0.0, 15.0);
1219 h_tx =
new TH1F(
"h_tx",
"tx of MC track at the vertex", 50, -0.5, 0.5);
1220 h_ty =
new TH1F(
"h_ty",
"ty of MC track at the vertex", 50, -0.5, 0.5);
1222 h_sec_r =
new TH1F(
"h_sec_r",
"R of sec MC track at the first hit", 50, 0.0, 15.0);
1224 h_notfound_mom =
new TH1F(
"h_notfound_mom",
"Momentum of not found track", 50, 0.0, 5.0);
1225 h_notfound_nhits =
new TH1F(
"h_notfound_nhits",
"Num hits of not found track", 50, 0.0, 10.0);
1226 h_notfound_station =
new TH1F(
"h_notfound_station",
"First station of not found track", 50, 0.0, 10.0);
1227 h_notfound_r =
new TH1F(
"h_notfound_r",
"R at first hit of not found track", 50, 0.0, 15.0);
1228 h_notfound_tx =
new TH1F(
"h_notfound_tx",
"tx of not found track at the first hit", 50, -5.0, 5.0);
1229 h_notfound_ty =
new TH1F(
"h_notfound_ty",
"ty of not found track at the first hit", 50, -1.0, 1.0);
1235 h_mcp =
new TH1F(
"h_mcp",
"MC P ", 500, 0.0, 5.0);
1239 h_nmchits =
new TH1F(
"h_nmchits",
"N STS hits on MC track", 50, 0.0, 10.0);
1243 h2_vertex =
new TH2F(
"h2_vertex",
"2D vertex distribution", 105, -5., 100., 100, -50., 50.);
1244 h2_prim_vertex =
new TH2F(
"h2_primvertex",
"2D primary vertex distribution", 105, -5., 100., 100, -50., 50.);
1245 h2_sec_vertex =
new TH2F(
"h2_sec_vertex",
"2D secondary vertex distribution", 105, -5., 100., 100, -50., 50.);
1252 h2_reg_nhits_vs_mom_prim =
new TH2F(
"h2_reg_nhits_vs_mom_prim",
"NHits vs. Momentum (Reg. Primary Tracks)", 51,
1253 -0.05, 5.05, 11, -0.5, 10.5);
1254 h2_reg_nhits_vs_mom_sec =
new TH2F(
"h2_reg_nhits_vs_mom_sec",
"NHits vs. Momentum (Reg. Secondary Tracks)", 51,
1255 -0.05, 5.05, 11, -0.5, 10.5);
1256 h2_acc_nhits_vs_mom_prim =
new TH2F(
"h2_acc_nhits_vs_mom_prim",
"NHits vs. Momentum (Acc. Primary Tracks)", 51,
1257 -0.05, 5.05, 11, -0.5, 10.5);
1258 h2_acc_nhits_vs_mom_sec =
new TH2F(
"h2_acc_nhits_vs_mom_sec",
"NHits vs. Momentum (Acc. Secondary Tracks)", 51,
1259 -0.05, 5.05, 11, -0.5, 10.5);
1260 h2_reco_nhits_vs_mom_prim =
new TH2F(
"h2_reco_nhits_vs_mom_prim",
"NHits vs. Momentum (Reco Primary Tracks)",
1261 51, -0.05, 5.05, 11, -0.5, 10.5);
1262 h2_reco_nhits_vs_mom_sec =
new TH2F(
"h2_reco_nhits_vs_mom_sec",
"NHits vs. Momentum (Reco Secondary Tracks)",
1263 51, -0.05, 5.05, 11, -0.5, 10.5);
1264 h2_ghost_nhits_vs_mom =
1265 new TH2F(
"h2_ghost_nhits_vs_mom",
"NHits vs. Momentum (Ghost Tracks)", 51, -0.05, 5.05, 11, -0.5, 10.5);
1266 h2_rest_nhits_vs_mom_prim =
new TH2F(
"h2_rest_nhits_vs_mom_prim",
"NHits vs. Momentum (!Found Primary Tracks)",
1267 51, -0.05, 5.05, 11, -0.5, 10.5);
1268 h2_rest_nhits_vs_mom_sec =
new TH2F(
"h2_rest_nhits_vs_mom_sec",
"NHits vs. Momentum (!Found Secondary Tracks)",
1269 51, -0.05, 5.05, 11, -0.5, 10.5);
1271 h2_reg_fstation_vs_mom_prim =
1272 new TH2F(
"h2_reg_fstation_vs_mom_prim",
"First Station vs. Momentum (Reg. Primary Tracks)", 51, -0.05, 5.05,
1274 h2_reg_fstation_vs_mom_sec =
1275 new TH2F(
"h2_reg_fstation_vs_mom_sec",
"First Station vs. Momentum (Reg. Secondary Tracks)", 51, -0.05,
1276 5.05, 11, -0.5, 10.5);
1277 h2_acc_fstation_vs_mom_prim =
1278 new TH2F(
"h2_acc_fstation_vs_mom_prim",
"First Station vs. Momentum (Acc. Primary Tracks)", 51, -0.05, 5.05,
1280 h2_acc_fstation_vs_mom_sec =
1281 new TH2F(
"h2_acc_fstation_vs_mom_sec",
"First Station vs. Momentum (Acc. Secondary Tracks)", 51, -0.05,
1282 5.05, 11, -0.5, 10.5);
1283 h2_reco_fstation_vs_mom_prim =
1284 new TH2F(
"h2_reco_fstation_vs_mom_prim",
"First Station vs. Momentum (Reco Primary Tracks)", 51, -0.05,
1285 5.05, 11, -0.5, 10.5);
1286 h2_reco_fstation_vs_mom_sec =
1287 new TH2F(
"h2_reco_fstation_vs_mom_sec",
"First Station vs. Momentum (Reco Secondary Tracks)", 51, -0.05,
1288 5.05, 11, -0.5, 10.5);
1289 h2_ghost_fstation_vs_mom =
new TH2F(
"h2_ghost_fstation_vs_mom",
"First Station vs. Momentum (Ghost Tracks)", 51,
1290 -0.05, 5.05, 11, -0.5, 10.5);
1291 h2_rest_fstation_vs_mom_prim =
1292 new TH2F(
"h2_rest_fstation_vs_mom_prim",
"First Station vs. Momentum (!Found Primary Tracks)", 51, -0.05,
1293 5.05, 11, -0.5, 10.5);
1294 h2_rest_fstation_vs_mom_sec =
1295 new TH2F(
"h2_rest_fstation_vs_mom_sec",
"First Station vs. Momentum (!Found Secondary Tracks)", 51, -0.05,
1296 5.05, 11, -0.5, 10.5);
1298 h2_reg_lstation_vs_fstation_prim =
1299 new TH2F(
"h2_reg_lstation_vs_fstation_prim",
"Last vs. First Station (Reg. Primary Tracks)", 11, -0.5, 10.5,
1301 h2_reg_lstation_vs_fstation_sec =
1302 new TH2F(
"h2_reg_lstation_vs_fstation_sec",
"Last vs. First Station (Reg. Secondary Tracks)", 11, -0.5,
1303 10.5, 11, -0.5, 10.5);
1304 h2_acc_lstation_vs_fstation_prim =
1305 new TH2F(
"h2_acc_lstation_vs_fstation_prim",
"Last vs. First Station (Acc. Primary Tracks)", 11, -0.5, 10.5,
1307 h2_acc_lstation_vs_fstation_sec =
1308 new TH2F(
"h2_acc_lstation_vs_fstation_sec",
"Last vs. First Station (Acc. Secondary Tracks)", 11, -0.5,
1309 10.5, 11, -0.5, 10.5);
1310 h2_reco_lstation_vs_fstation_prim =
1311 new TH2F(
"h2_reco_lstation_vs_fstation_prim",
"Last vs. First Station (Reco Primary Tracks)", 11, -0.5,
1312 10.5, 11, -0.5, 10.5);
1313 h2_reco_lstation_vs_fstation_sec =
1314 new TH2F(
"h2_reco_lstation_vs_fstation_sec",
"Last vs. First Station (Reco Secondary Tracks)", 11, -0.5,
1315 10.5, 11, -0.5, 10.5);
1316 h2_ghost_lstation_vs_fstation =
new TH2F(
1317 "h2_ghost_lstation_vs_fstation",
"Last vs. First Station (Ghost Tracks)", 11, -0.5, 10.5, 11, -0.5, 10.5);
1318 h2_rest_lstation_vs_fstation_prim =
1319 new TH2F(
"h2_rest_lstation_vs_fstation_prim",
"Last vs. First Station (!Found Primary Tracks)", 11, -0.5,
1320 10.5, 11, -0.5, 10.5);
1321 h2_rest_lstation_vs_fstation_sec =
1322 new TH2F(
"h2_rest_lstation_vs_fstation_sec",
"Last vs. First Station (!Found Secondary Tracks)", 11, -0.5,
1323 10.5, 11, -0.5, 10.5);
1333 static int NEvents = 0;
1335 h_reg_MCmom->
Scale(NEvents);
1336 h_acc_MCmom->
Scale(NEvents);
1337 h_reco_MCmom->
Scale(NEvents);
1338 h_ghost_Rmom->
Scale(NEvents);
1339 h_reg_prim_MCmom->
Scale(NEvents);
1340 h_acc_prim_MCmom->
Scale(NEvents);
1341 h_reco_prim_MCmom->
Scale(NEvents);
1342 h_reg_sec_MCmom->
Scale(NEvents);
1343 h_acc_sec_MCmom->
Scale(NEvents);
1344 h_reco_sec_MCmom->
Scale(NEvents);
1358 for (vector<CbmL1Track>::iterator rtraIt =
vRTracks.begin(); rtraIt !=
vRTracks.end(); ++rtraIt) {
1360 if ((prtra->
StsHits).size() < 1)
1363 if (
fabs(prtra->
T[4]) > 1.e-10)
1364 h_reco_mom->
Fill(
fabs(1.0 / prtra->
T[4]));
1372 if (prtra->
NDF > 0) {
1389 if (
fabs(prtra->
T[4]) > 1.e-10) {
1390 h_ghost_mom->
Fill(
fabs(1.0 / prtra->
T[4]));
1391 h_ghost_Rmom->
Fill(
fabs(1.0 / prtra->
T[4]));
1400 if (
fabs(z2 - z1) > 1.e-4) {
1401 h_ghost_tx->
Fill((h2.
x - h1.
x) / (z2 - z1));
1402 h_ghost_ty->
Fill((h2.
y - h1.
y) / (z2 - z1));
1405 if (
fabs(prtra->
T[4]) > 1.e-10)
1406 h2_ghost_nhits_vs_mom->
Fill(
fabs(1.0 / prtra->
T[4]), (prtra->
StsHits).size());
1409 if (
fabs(prtra->
T[4]) > 1.e-10)
1418 for (vector<CbmL1MCTrack>::iterator mtraIt =
vMCTracks.begin(); mtraIt !=
vMCTracks.end(); mtraIt++) {
1423 int nmchits = mtra.
StsHits.size();
1427 double momentum = mtra.
p;
1428 double pt =
sqrt(mtra.
px * mtra.
px + mtra.
py * mtra.
py);
1429 double theta =
acos(mtra.
pz / mtra.
p) * 180 / 3.1415;
1431 h_mcp->
Fill(momentum);
1432 h_nmchits->
Fill(nmchits);
1439 h_reg_MCmom->
Fill(momentum);
1441 h_reg_mom_prim->
Fill(momentum);
1442 h_reg_prim_MCmom->
Fill(momentum);
1443 h_reg_nhits_prim->
Fill(nSta);
1444 h2_reg_nhits_vs_mom_prim->
Fill(momentum, nSta);
1445 h2_reg_fstation_vs_mom_prim->
Fill(momentum, fh.
iStation + 1);
1449 h_reg_mom_sec->
Fill(momentum);
1450 h_reg_sec_MCmom->
Fill(momentum);
1451 h_reg_nhits_sec->
Fill(nSta);
1452 if (momentum > 0.01) {
1453 h2_reg_nhits_vs_mom_sec->
Fill(momentum, nSta);
1454 h2_reg_fstation_vs_mom_sec->
Fill(momentum, fh.
iStation + 1);
1461 h_acc_mom_short123s->
Fill(momentum);
1468 h_acc_MCmom->
Fill(momentum);
1470 h_acc_mom_prim->
Fill(momentum);
1471 h_acc_prim_MCmom->
Fill(momentum);
1472 h_acc_nhits_prim->
Fill(nSta);
1473 h2_acc_nhits_vs_mom_prim->
Fill(momentum, nSta);
1474 h2_acc_fstation_vs_mom_prim->
Fill(momentum, fh.
iStation + 1);
1478 h_acc_mom_sec->
Fill(momentum);
1479 h_acc_sec_MCmom->
Fill(momentum);
1480 h_acc_nhits_sec->
Fill(nSta);
1481 if (momentum > 0.01) {
1482 h2_acc_nhits_vs_mom_sec->
Fill(momentum, nSta);
1483 h2_acc_fstation_vs_mom_sec->
Fill(momentum, fh.
iStation + 1);
1490 h2_vertex->
Fill(mtra.
z, mtra.
y);
1493 h2_prim_vertex->
Fill(mtra.
z, mtra.
y);
1496 h2_sec_vertex->
Fill(mtra.
z, mtra.
y);
1504 if (
fabs(mtra.
pz) > 1.e-8) {
1514 p_eff_all_vs_mom->
Fill(momentum, 100.0);
1515 p_eff_all_vs_nhits->
Fill(nMCHits, 100.0);
1516 p_eff_all_vs_pt->
Fill(pt, 100.0);
1517 h_reco_MCmom->
Fill(momentum);
1519 p_eff_prim_vs_mom->
Fill(momentum, 100.0);
1520 p_eff_prim_vs_nhits->
Fill(nMCHits, 100.0);
1521 p_eff_prim_vs_pt->
Fill(pt, 100.0);
1522 p_eff_prim_vs_theta->
Fill(theta, 100.0);
1524 p_eff_sec_vs_mom->
Fill(momentum, 100.0);
1525 p_eff_sec_vs_nhits->
Fill(nMCHits, 100.0);
1528 h_reco_mom_prim->
Fill(momentum);
1529 h_reco_prim_MCmom->
Fill(momentum);
1530 h_reco_nhits_prim->
Fill(nSta);
1531 h2_reco_nhits_vs_mom_prim->
Fill(momentum, nSta);
1532 h2_reco_fstation_vs_mom_prim->
Fill(momentum, fh.
iStation + 1);
1536 h_reco_mom_sec->
Fill(momentum);
1537 h_reco_sec_MCmom->
Fill(momentum);
1538 h_reco_nhits_sec->
Fill(nSta);
1539 if (momentum > 0.01) {
1540 h2_reco_nhits_vs_mom_sec->
Fill(momentum, nSta);
1541 h2_reco_fstation_vs_mom_sec->
Fill(momentum, fh.
iStation + 1);
1547 h_notfound_mom->
Fill(momentum);
1548 p_eff_all_vs_mom->
Fill(momentum, 0.0);
1549 p_eff_all_vs_nhits->
Fill(nMCHits, 0.0);
1550 p_eff_all_vs_pt->
Fill(pt, 0.0);
1552 p_eff_prim_vs_mom->
Fill(momentum, 0.0);
1553 p_eff_prim_vs_nhits->
Fill(nMCHits, 0.0);
1554 p_eff_prim_vs_pt->
Fill(pt, 0.0);
1555 p_eff_prim_vs_theta->
Fill(theta, 0.0);
1557 p_eff_sec_vs_mom->
Fill(momentum, 0.0);
1558 p_eff_sec_vs_nhits->
Fill(nMCHits, 0.0);
1561 h_rest_mom_prim->
Fill(momentum);
1562 h_rest_nhits_prim->
Fill(nSta);
1563 h2_rest_nhits_vs_mom_prim->
Fill(momentum, nSta);
1564 h2_rest_fstation_vs_mom_prim->
Fill(momentum, fh.
iStation + 1);
1568 h_rest_mom_sec->
Fill(momentum);
1569 h_rest_nhits_sec->
Fill(nSta);
1570 if (momentum > 0.01) {
1571 h2_rest_nhits_vs_mom_sec->
Fill(momentum, nSta);
1572 h2_rest_fstation_vs_mom_sec->
Fill(momentum, fh.
iStation + 1);
1582 h_notfound_nhits->
Fill(nmchits);
1586 if (mtra.
Points.size() > 0) {
1588 h_notfound_tx->
Fill(pMC.
px / pMC.
pz);
1589 h_notfound_ty->
Fill(pMC.
py / pMC.
pz);
1606 h_reco_d0_mom->
Fill(momentum);
1608 p_eff_d0_vs_mom->
Fill(momentum, 100.0);
1610 p_eff_d0_vs_mom->
Fill(momentum, 0.0);
1616 for (
unsigned int ih = 0; ih <
algo->vStsHits.size(); ih++) {
1623 h_reco_timeNtr->
Fill(mc_total,
algo->CATime);
1624 h_reco_timeNhit->
Fill(
algo->vStsHits.size(),
algo->CATime);
1626 h_reco_fakeNtr->
Fill(mc_total, NFakes);
1627 h_reco_fakeNhit->
Fill(
algo->vStsHits.size() - NFakes, NFakes);
1629 h_reg_MCmom->
Scale(1.f / NEvents);
1630 h_acc_MCmom->
Scale(1.f / NEvents);
1631 h_reco_MCmom->
Scale(1.f / NEvents);
1632 h_ghost_Rmom->
Scale(1.f / NEvents);
1633 h_reg_prim_MCmom->
Scale(1.f / NEvents);
1634 h_acc_prim_MCmom->
Scale(1.f / NEvents);
1635 h_reco_prim_MCmom->
Scale(1.f / NEvents);
1636 h_reg_sec_MCmom->
Scale(1.f / NEvents);
1637 h_acc_sec_MCmom->
Scale(1.f / NEvents);
1638 h_reco_sec_MCmom->
Scale(1.f / NEvents);
1644 const int Nh_fit = 12;
1645 static TH1F *h_fit[Nh_fit], *h_fitL[Nh_fit], *h_fitSV[Nh_fit], *h_fitPV[Nh_fit], *h_fit_chi2;
1647 static TH2F *PRes2D, *PRes2DPrim, *PRes2DSec;
1649 static bool first_call = 1;
1660 PRes2D =
new TH2F(
"PRes2D",
"Resolution P vs P", 100, 0., 20., 100, -15., 15.);
1661 PRes2DPrim =
new TH2F(
"PRes2DPrim",
"Resolution P vs P", 100, 0., 20., 100, -15., 15.);
1662 PRes2DSec =
new TH2F(
"PRes2DSec",
"Resolution P vs P", 100, 0., 20., 100, -15., 15.);
1670 } Table[Nh_fit] = {{
"x",
"Residual X [#mum]", 100, -45., 45.},
1671 {
"y",
"Residual Y [#mum]", 100, -450., 450.},
1672 {
"tx",
"Residual Tx [mrad]", 100, -2., 2.},
1673 {
"ty",
"Residual Ty [mrad]", 100, -3.5, 3.5},
1674 {
"P",
"Resolution P/Q [100%]", 100, -0.1, 0.1},
1675 {
"px",
"Pull X [residual/estimated_error]", 100, -6., 6.},
1676 {
"py",
"Pull Y [residual/estimated_error]", 100, -6., 6.},
1677 {
"ptx",
"Pull Tx [residual/estimated_error]", 100, -6., 6.},
1678 {
"pty",
"Pull Ty [residual/estimated_error]", 100, -6., 6.},
1679 {
"pQP",
"Pull Q/P [residual/estimated_error]", 100, -6., 6.},
1680 {
"QPreco",
"Reco Q/P ", 100, -10., 10.},
1681 {
"QPmc",
"MC Q/P ", 100, -10., 10.}};
1690 Tab TableVertex[Nh_fit] = {{
"x",
"Residual X [cm]", 2000, -1., 1.},
1691 {
"y",
"Residual Y [cm]", 2000, -1., 1.},
1692 {
"tx",
"Residual Tx [mrad]", 100, -2., 2.},
1693 {
"ty",
"Residual Ty [mrad]", 100, -2., 2.},
1694 {
"P",
"Resolution P/Q [100%]", 100, -0.1, 0.1},
1695 {
"px",
"Pull X [residual/estimated_error]", 100, -6., 6.},
1696 {
"py",
"Pull Y [residual/estimated_error]", 100, -6., 6.},
1697 {
"ptx",
"Pull Tx [residual/estimated_error]", 100, -6., 6.},
1698 {
"pty",
"Pull Ty [residual/estimated_error]", 100, -6., 6.},
1699 {
"pQP",
"Pull Q/P [residual/estimated_error]", 100, -6., 6.},
1700 {
"QPreco",
"Reco Q/P ", 100, -10., 10.},
1701 {
"QPmc",
"MC Q/P ", 100, -10., 10.}};
1703 for (
int i = 0;
i < Nh_fit;
i++) {
1704 char n[225], t[255];
1705 sprintf(
n,
"fst_%s", Table[
i].name);
1706 sprintf(t,
"First point %s", Table[
i].title);
1707 h_fit[
i] =
new TH1F(
n, t, Table[
i].
n, Table[
i].l, Table[
i].r);
1708 sprintf(
n,
"lst_%s", Table[
i].name);
1709 sprintf(t,
"Last point %s", Table[
i].title);
1710 h_fitL[
i] =
new TH1F(
n, t, Table[
i].
n, Table[
i].l, Table[
i].r);
1711 sprintf(
n,
"svrt_%s", TableVertex[
i].name);
1712 sprintf(t,
"Secondary vertex point %s", TableVertex[
i].title);
1713 h_fitSV[
i] =
new TH1F(
n, t, TableVertex[
i].
n, TableVertex[
i].l, TableVertex[
i].r);
1714 sprintf(
n,
"pvrt_%s", TableVertex[
i].name);
1715 sprintf(t,
"Primary vertex point %s", TableVertex[
i].title);
1716 h_fitPV[
i] =
new TH1F(
n, t, TableVertex[
i].
n, TableVertex[
i].l, TableVertex[
i].r);
1718 h_fit_chi2 =
new TH1F(
"h_fit_chi2",
"Chi2/NDF", 50, -0.5, 10.0);
1723 for (vector<CbmL1Track>::iterator it =
vRTracks.begin(); it !=
vRTracks.end(); ++it) {
1728 int iMC =
vHitMCRef[it->StsHits.front()];
1733 h_fit[0]->
Fill((mc.
x - it->T[0]) * 1.e4);
1734 h_fit[1]->
Fill((mc.
y - it->T[1]) * 1.e4);
1735 h_fit[2]->
Fill((mc.
px / mc.
pz - it->T[2]) * 1.e3);
1736 h_fit[3]->
Fill((mc.
py / mc.
pz - it->T[3]) * 1.e3);
1737 h_fit[4]->
Fill(it->T[4] / mc.
q * mc.
p - 1);
1739 PRes2D->
Fill(mc.
p, (1. /
fabs(it->T[4]) - mc.
p) / mc.
p * 100.);
1743 PRes2DPrim->
Fill(mc.
p, (1. /
fabs(it->T[4]) - mc.
p) / mc.
p * 100.);
1745 PRes2DSec->
Fill(mc.
p, (1. /
fabs(it->T[4]) - mc.
p) / mc.
p * 100.);
1747 if (finite(it->C[0]) && it->C[0] > 0)
1748 h_fit[5]->
Fill((mc.
x - it->T[0]) /
sqrt(it->C[0]));
1749 if (finite(it->C[2]) && it->C[2] > 0)
1750 h_fit[6]->
Fill((mc.
y - it->T[1]) /
sqrt(it->C[2]));
1751 if (finite(it->C[5]) && it->C[5] > 0)
1752 h_fit[7]->
Fill((mc.
px / mc.
pz - it->T[2]) /
sqrt(it->C[5]));
1753 if (finite(it->C[9]) && it->C[9] > 0)
1754 h_fit[8]->
Fill((mc.
py / mc.
pz - it->T[3]) /
sqrt(it->C[9]));
1755 if (finite(it->C[14]) && it->C[14] > 0)
1756 h_fit[9]->
Fill((mc.
q / mc.
p - it->T[4]) /
sqrt(it->C[14]));
1757 h_fit[10]->
Fill(it->T[4]);
1758 h_fit[11]->
Fill(mc.
q / mc.
p);
1762 int iMC =
vHitMCRef[it->StsHits.back()];
1766 h_fitL[0]->
Fill((mc.
x - it->TLast[0]) * 1.e4);
1767 h_fitL[1]->
Fill((mc.
y - it->TLast[1]) * 1.e4);
1768 h_fitL[2]->
Fill((mc.
px / mc.
pz - it->TLast[2]) * 1.e3);
1769 h_fitL[3]->
Fill((mc.
py / mc.
pz - it->TLast[3]) * 1.e3);
1770 h_fitL[4]->
Fill(it->T[4] / mc.
q * mc.
p - 1);
1771 if (finite(it->CLast[0]) && it->CLast[0] > 0)
1772 h_fitL[5]->
Fill((mc.
x - it->TLast[0]) /
sqrt(it->CLast[0]));
1773 if (finite(it->CLast[2]) && it->CLast[2] > 0)
1774 h_fitL[6]->
Fill((mc.
y - it->TLast[1]) /
sqrt(it->CLast[2]));
1775 if (finite(it->CLast[5]) && it->CLast[5] > 0)
1776 h_fitL[7]->
Fill((mc.
px / mc.
pz - it->TLast[2]) /
sqrt(it->CLast[5]));
1777 if (finite(it->CLast[9]) && it->CLast[9] > 0)
1778 h_fitL[8]->
Fill((mc.
py / mc.
pz - it->TLast[3]) /
sqrt(it->CLast[9]));
1779 if (finite(it->CLast[14]) && it->CLast[14] > 0)
1780 h_fitL[9]->
Fill((mc.
q / mc.
p - it->TLast[4]) /
sqrt(it->CLast[14]));
1781 h_fitL[10]->
Fill(it->TLast[4]);
1782 h_fitL[11]->
Fill(mc.
q / mc.
p);
1795 for (
int ih = 0; ih < 3; ih++) {
1796 const int iMCP = mc.
Points[ih];
1802 fld.Set(B[0], z[0], B[1], z[1], B[2], z[2]);
1806 const int fSta =
vHitStore[it->StsHits[0]].iStation;
1807 const int dir = int((mc.
z -
algo->vStations[fSta].z[0]) /
fabs(mc.
z -
algo->vStations[fSta].z[0]));
1810 for (
int iSta = fSta ;
1811 (iSta >= 0) && (iSta <
NStation) && (dir * (mc.
z -
algo->vStations[iSta].z[0]) > 0);
1820 if (mc.
z != trPar.
z[0])
1834 h_fitSV[0]->
Fill((mc.
x - trPar.
x[0]));
1835 h_fitSV[1]->
Fill((mc.
y - trPar.
y[0]));
1836 h_fitSV[2]->
Fill((mc.
px / mc.
pz - trPar.
tx[0]) * 1.e3);
1837 h_fitSV[3]->
Fill((mc.
py / mc.
pz - trPar.
ty[0]) * 1.e3);
1838 h_fitSV[4]->
Fill(trPar.
qp[0] / mc.
q * mc.
p - 1);
1839 if (finite(trPar.
C00[0]) && trPar.
C00[0] > 0)
1841 if (finite(trPar.
C11[0]) && trPar.
C11[0] > 0)
1843 if (finite(trPar.
C22[0]) && trPar.
C22[0] > 0)
1845 if (finite(trPar.
C33[0]) && trPar.
C33[0] > 0)
1847 if (finite(trPar.
C44[0]) && trPar.
C44[0] > 0)
1849 h_fitSV[10]->
Fill(trPar.
qp[0]);
1850 h_fitSV[11]->
Fill(mc.
q / mc.
p);
1852 if (
vHitStore[it->StsHits[0]].iStation != 0)
1861 for (
int ih = 0; ih < 3; ih++) {
1862 const int iMCP = mc.
Points[ih];
1872 targB =
algo->vtxFieldValue;
1873 fld.Set(targB, 0., B[0], z[0], B[1], z[1]);
1878 const int fSta =
vHitStore[it->StsHits[0]].iStation;
1880 const int dir = (mc.
z -
algo->vStations[fSta].z[0]) /
abs(mc.
z -
algo->vStations[fSta].z[0]);
1883 for (
int iSta = fSta ;
1884 (iSta >= 0) && (iSta <
NStation) && (dir * (mc.
z -
algo->vStations[iSta].z[0]) > 0);
1893 if (mc.
z != trPar.
z[0])
1907 h_fitPV[0]->
Fill((mc.
x - trPar.
x[0]));
1908 h_fitPV[1]->
Fill((mc.
y - trPar.
y[0]));
1909 h_fitPV[2]->
Fill((mc.
px / mc.
pz - trPar.
tx[0]) * 1.e3);
1910 h_fitPV[3]->
Fill((mc.
py / mc.
pz - trPar.
ty[0]) * 1.e3);
1911 h_fitPV[4]->
Fill(trPar.
qp[0] / mc.
q * mc.
p - 1);
1912 if (finite(trPar.
C00[0]) && trPar.
C00[0] > 0)
1914 if (finite(trPar.
C11[0]) && trPar.
C11[0] > 0)
1916 if (finite(trPar.
C22[0]) && trPar.
C22[0] > 0)
1918 if (finite(trPar.
C33[0]) && trPar.
C33[0] > 0)
1920 if (finite(trPar.
C44[0]) && trPar.
C44[0] > 0)
1922 h_fitPV[10]->
Fill(trPar.
qp[0]);
1923 h_fitPV[11]->
Fill(mc.
q / mc.
p);
1934 for (
int ipar = 0; ipar < 6; ipar++)
1936 for (
int ipar = 0; ipar < 15; ipar++)
1942 h_fitPV[0]->
Fill((mc.
x - it2.
T[0]));
1943 h_fitPV[1]->
Fill((mc.
y - it2.
T[1]));
1944 h_fitPV[2]->
Fill((mc.
px / mc.
pz - it2.
T[2]) * 1.e3);
1945 h_fitPV[3]->
Fill((mc.
py / mc.
pz - it2.
T[3]) * 1.e3);
1946 h_fitPV[4]->
Fill(it2.
T[4] / mc.
q * mc.
p - 1);
1947 if (finite(it2.
C[0]) && it2.
C[0] > 0)
1948 h_fitPV[5]->
Fill((mc.
x - it2.
T[0]) /
sqrt(it2.
C[0]));
1949 if (finite(it2.
C[2]) && it2.
C[2] > 0)
1950 h_fitPV[6]->
Fill((mc.
y - it2.
T[1]) /
sqrt(it2.
C[2]));
1951 if (finite(it2.
C[5]) && it2.
C[5] > 0)
1953 if (finite(it2.
C[9]) && it2.
C[9] > 0)
1955 if (finite(it2.
C[14]) && it2.
C[14] > 0)
1956 h_fitPV[9]->
Fill((mc.
q / mc.
p - it2.
T[4]) /
sqrt(it2.
C[14]));
1957 h_fitPV[10]->
Fill(it2.
T[4]);
1958 h_fitPV[11]->
Fill(mc.
q / mc.
p);
1963 h_fit_chi2->
Fill(it->chi2 / it->NDF);