90 , RadiusVsPForClone(0)
93 , RadiusVsDistanceClone(0)
94 , NHitsRecoVsNHitsMC(0)
98 Chi2Ghost =
new TH1F(
"Chi2 for Ghost",
"Chi2 for Ghost", 100, 0.f, 1.f);
99 Chi2Ghost->SetXTitle(
"Chi2 Ghost");
100 Chi2Ghost->SetYTitle(
"Enteric");
102 Chi2Ref =
new TH1F(
"Ref Chi2",
"Ref Chi2", 100, 0.f, 1.f);
103 Chi2Ref->SetXTitle(
"Chi2 Ref");
104 Chi2Ref->SetYTitle(
"Enteric");
106 Chi2All =
new TH1F(
"Chi2 for reconstructed rings",
"Chi2 for reconstructed rings", 100, 0.f, 1.f);
107 Chi2All->SetXTitle(
"Chi2 reco rings");
108 Chi2All->SetYTitle(
"Enteric");
110 Chi2Clone =
new TH1F(
"Clone Chi2",
"Clone Chi2", 100, 0.f, 1.f);
111 Chi2Clone->SetXTitle(
"Chi2 Clone");
112 Chi2Clone->SetYTitle(
"Enteric");
114 Chi2NhitsGhost =
new TH2F(
"Chi2 Ghost vs Nhits",
"Chi2 vs Nhits", 30, 4.5f, 34.5f, 100, 0.f, 1.f);
115 Chi2NhitsGhost->SetXTitle(
"Ghost Nhits");
116 Chi2NhitsGhost->SetYTitle(
"Ghost Chi2");
118 Chi2NhitsAll =
new TH2F(
"Chi2 All vs Nhits",
"Chi2 vs Nhits", 30, 4.5f, 34.5f, 100, 0.f, 1.f);
119 Chi2NhitsAll->SetXTitle(
"Nhits All");
120 Chi2NhitsAll->SetYTitle(
"Chi2 All");
122 REl =
new TH1F(
"REl",
"REl", 100, 0.f, 7.f);
123 RPi =
new TH1F(
"RPi",
"RPi", 100, 0.f, 7.f);
124 RGhost =
new TH1F(
"RGhost",
"RGhost", 100, 0.f, 7.f);
126 Chi2NhitsPi =
new TH2F(
"Chi2 Pi vs Nhits",
"Chi2 Pi vs Nhits", 30, 4.5f, 34.5f, 100, 0.f, 1.f);
127 Chi2NhitsPi->SetXTitle(
"Nhits Pi");
128 Chi2NhitsPi->SetYTitle(
"Chi2 Pi");
130 Chi2NhitsEll =
new TH2F(
"Chi2 Ell vs Nhits",
"Chi2 Ell vs Nhits", 30, 4.5f, 34.5f, 100, 0.f, 1.f);
131 Chi2NhitsEll->SetXTitle(
"Nhits Ell");
132 Chi2NhitsEll->SetYTitle(
"Chi2 Ell");
134 RNhitsGhost =
new TH2F(
"R Ghost vs Nhits",
"R Ghost vs Nhits", 30, 4.5f, 34.5f, 100, 2.f, 8.f);
135 RNhitsGhost->SetXTitle(
"Nhits Ghost");
136 RNhitsGhost->SetYTitle(
"R Ghost");
138 RNhitsPi =
new TH2F(
"R Pi vs Nhits",
"R Pi vs Nhits", 30, 4.5f, 34.5f, 100, 2.f, 8.f);
139 RNhitsPi->SetXTitle(
"Nhits Pi");
140 RNhitsPi->SetYTitle(
"R Pi");
142 RNhitsEll =
new TH2F(
"R Ell vs Nhits",
"R Ell vs Nhits", 30, 4.5f, 34.5f, 100, 2.f, 8.f);
143 RNhitsEll->SetXTitle(
"Nhits electrons");
144 RNhitsEll->SetYTitle(
"R electrons");
146 RChi2Ghost =
new TH2F(
"R Ghost vs Chi2",
"R Ghost vs Chi2", 100, 0.f, 1.f, 100, 2.f, 8.f);
147 RChi2Ghost->SetXTitle(
"Chi2 Ghost");
148 RChi2Ghost->SetYTitle(
"R Ghost");
150 RChi2Pi =
new TH2F(
"R Pi vs Chi2",
"R Pi vs Chi2", 100, 0.f, 1.f, 100, 2.f, 8.f);
151 RChi2Pi->SetXTitle(
"Chi2 Pi");
152 RChi2Pi->SetYTitle(
"R Pi");
154 RChi2Ell =
new TH2F(
"R Ell vs Chi2",
"R Ell vs Chi2", 100, 0.f, 1.f, 100, 2.f, 8.f);
155 RChi2Ell->SetXTitle(
"Chi2 Electrons");
156 RChi2Ell->SetYTitle(
"R Electrons");
158 NHitsMC =
new TH1F(
"MC Hits %",
"MC Hits %", 100, 0.f, 1.f);
159 NHitsMC->SetXTitle(
"MC hits found, %");
160 NHitsMC->SetYTitle(
"Entries");
162 NSameHits =
new TH1F(
"Same Hits",
"Same Hits", 100, 0.f, 30.f);
163 NSameHits->SetXTitle(
"N Same Hits");
164 NSameHits->SetYTitle(
"Enteric");
166 NSameHitsVsP =
new TH2F(
"MC Hits % vs P(MC)",
"MC Hits % vs P(MC)", 100, 0.f, 10.f, 100, 0.f, 1.f);
167 NSameHitsVsP->SetXTitle(
"P MC");
168 NSameHitsVsP->SetYTitle(
"MC Hits, %");
170 NHitsVsMCP =
new TH2F(
"Same Hits vs P(MC)",
"Same Hits vs P(MC)", 100, 0.f, 20.f, 100, 0.f, 30.f);
171 NHitsVsMCP->SetXTitle(
"P MC");
172 NHitsVsMCP->SetYTitle(
"Same Hits");
174 RadiusVsPForClone =
new TH2F(
" Radius Vs P ",
" Radius Vs P ", 100, 0.f, 12.f, 100, 0.f, 3.f);
175 RadiusVsPForClone->SetXTitle(
"P Clone");
176 RadiusVsPForClone->SetYTitle(
"R1-R2");
178 DistanceVsPClone =
new TH2F(
" Distance Vs P ",
" Distance Vs P ", 100, 0.f, 12.f, 100, 0.f, 5.f);
179 DistanceVsPClone->SetXTitle(
"P Clone");
180 DistanceVsPClone->SetYTitle(
"Distance");
182 Chi2VsPClone =
new TH2F(
" Chi2 Vs P ",
" Chi2 Vs P ", 100, 0.f, 12.f, 100, 0.f, 1.f);
183 Chi2VsPClone->SetXTitle(
"P Clone");
184 Chi2VsPClone->SetYTitle(
"Chi2");
186 RadiusVsDistanceClone =
new TH2F(
" Radius Vs Distance ",
" Radius Vs Distance ", 100, 0.f, 5.f, 100, 0.f, 3.f);
187 RadiusVsDistanceClone->SetXTitle(
"Distance");
188 RadiusVsDistanceClone->SetYTitle(
"R1-R2");
191 new TH2F(
" N Hits Reco Vs N Hits MC ",
" N Hits Reco Vs N Hits MC ", 100, 0.f, 35.f, 100, 0.f, 35.f);
192 NHitsRecoVsNHitsMC->SetXTitle(
"N Hits MC");
193 NHitsRecoVsNHitsMC->SetYTitle(
"N Hits Reco");
278 map<void*, int> pHitIndex;
279 map<Int_t, MCRing> MCRingMap;
281 Int_t NRecoEx = 0, NRecoG = 0, NGostmy = 0, NMC = 0, NMC37 = 0;
283 static Int_t niv = 0;
284 Double_t ArrRingX[
fRingArray->GetEntriesFast()];
285 Double_t ArrRingY[
fRingArray->GetEntriesFast()];
286 Double_t ArrRingR[
fRingArray->GetEntriesFast()];
291 Double_t HitArrX[
fHitArray->GetEntriesFast()];
292 Double_t HitArrY[
fHitArray->GetEntriesFast()];
293 Double_t NoiseHitArrX[
fHitArray->GetEntriesFast()];
294 Double_t NoiseHitArrY[
fHitArray->GetEntriesFast()];
296 Int_t NpiMC = 0, NeMC = 0;
299 std::stringstream out;
304 TCanvas* Up =
new TCanvas(
"Up",
"Up", 0, 0, 240, 180);
305 Up->SetFillColor(kWhite);
309 Up->Range(-110, 110, 110, 180);
310 gPad->DrawFrame(-110, 110, 110, 180);
312 Up->Range(-110, -180, 110, -110);
313 gPad->DrawFrame(-110, -180, 110, -110);
316 for (Int_t hit = 0; hit <
fHitArray->GetEntriesFast(); hit++) {
319 HitArrX[hit] = (phit->
GetX());
320 HitArrY[hit] = -1 * (phit->
GetY());
322 NoiseHitArrX[NfakeHits] = (phit->
GetX());
323 NoiseHitArrY[NfakeHits] = -1 * (phit->
GetY());
327 for (Int_t i = 0; i <
fRingArray->GetEntriesFast(); i++) {
341 TArc* AllRingsUp =
new TArc(ArrRingX[i], ArrRingY[i], ArrRingR[i], 0, 360);
342 AllRingsUp->SetLineWidth(1);
343 AllRingsUp->SetLineColor(1);
344 AllRingsUp->SetFillStyle(0);
345 AllRingsUp->Draw(
"*");
354 TArc* AllRingsDown =
new TArc(ArrRingX[i], ArrRingY[i], ArrRingR[i], 0, 360);
355 AllRingsDown->SetLineWidth(1);
356 AllRingsDown->SetLineColor(1);
357 AllRingsDown->SetFillStyle(0);
358 AllRingsDown->Draw(
"*");
371 static TH1F *h_MC_radius, *h_MC_nhits, *h_MC_primary_nhits, *h_MC_momentum, *h_MC_primary_momentum, *h_MC_resolution,
372 *h_MC_ref_resolution, *h_MC_extra_resolution, *h_ghost_nhits;
374 static TH2F* h_MC_primary_res_vs_momentum;
376 static TProfile *p_ref_eff_vs_nhits, *p_extra_eff_vs_nhits;
378 static TList* listHisto;
379 static bool first_call_performance = 1;
381 if (first_call_performance) {
382 first_call_performance = 0;
383 TDirectory* curdir = gDirectory;
384 TDirectory* histodir = gROOT->mkdir(
"CbmL1RichRingQaHisto");
387 h_MC_radius =
new TH1F(
"h_MC_radius",
"MC ring radius (cm)", 100, 0.0, 10.);
388 h_MC_nhits =
new TH1F(
"h_MC_nhits",
"Hits per MC ring", 50, 0.0, 50.);
389 h_MC_primary_nhits =
new TH1F(
"h_MC_primary_nhits",
"Hits per primary MC ring", 50, 0.0, 50.);
390 h_MC_momentum =
new TH1F(
"h_MC_momentum",
"MC track momentum (GeV)", 100, 0.0, 15.);
391 h_MC_primary_momentum =
new TH1F(
"h_MC_primary_momentum",
"MC primary track momentum (GeV)", 100, 0.0, 15.);
392 h_MC_resolution =
new TH1F(
"h_MC_resolution",
"Hit deviation from MC ring (cm)", 500, -5.0, 5.0);
393 h_MC_ref_resolution =
new TH1F(
"h_MC_ref_resolution",
"Hit deviation from REF MC ring (cm)", 500, -5.0, 5.0);
394 h_MC_extra_resolution =
new TH1F(
"h_MC_extra_resolution",
"Hit deviation from EXTRA MC ring (cm)", 500, -5.0, 5.0);
396 h_ghost_nhits =
new TH1F(
"h_ghost_nhits",
"Hits per ghost ring", 50, 0.0, 50.);
398 h_MC_primary_res_vs_momentum =
new TH2F(
399 "h_MC_primary_res_vs_momentum",
"Hit deviation from ptimary MC ring (cm) vs P", 100, 0., 15., 500, -5.0, 5.0);
401 p_ref_eff_vs_nhits =
new TProfile(
"p_ref_eff_vs_nhits",
"Refset efficiency vs N Hits", 100, 0.0, 50.0, 0.0, 1.0);
403 p_extra_eff_vs_nhits =
404 new TProfile(
"p_extra_eff_vs_nhits",
"Extraset efficiency vs N Hits", 100, 0.0, 50.0, 0.0, 1.0);
407 listHisto = gDirectory->GetList();
421 for (Int_t i = 0; i < NHits; i++) {
431 pHitIndex.insert(pair<void*, int>(phit, i));
432 hit.
x = phit->
GetX();
433 hit.
y = phit->
GetY();
435 if (pointID < 0)
continue;
437 if (!point)
continue;
438 Int_t trackID = point->GetTrackID();
439 if (trackID < 0)
continue;
441 if (!track || track->
GetPdgCode() != 50000050)
continue;
451 for (
int ih = 0; ih < NHits; ih++) {
453 if (
ID >= 0 && MCRingMap.find(
ID) == MCRingMap.end()) {
456 MCRingMap.insert(pair<Int_t, MCRing>(
ID, tmp));
458 MCRingMap[
ID].NHits++;
459 MCRingMap[
ID].Hits.push_back(ih);
460 MCRingMap[
ID].NHitsBestReco = 0;
461 MCRingMap[
ID].BestReco = 0;
462 MCRingMap[
ID].NHitsBestvsNHitsMC = 0.;
467 for (map<Int_t, MCRing>::iterator i = MCRingMap.begin(); i != MCRingMap.end(); ++i) {
471 TH2F* h_e =
new TH2F(
"MC ring radius (cm) vs MC track momentum (GeV)",
"", 100, 0.f, 12.f, 100, 0.f, 6.f);
472 h_e->SetXTitle(
"MC track momentum (GeV)");
473 h_e->SetYTitle(
"MC ring R1/R2");
475 for (map<Int_t, MCRing>::iterator i = MCRingMap.begin(); i != MCRingMap.end(); ++i) {
476 vector<Double_t> hitX;
477 vector<Double_t> hitY;
500 if (fabs(vx) < 0.1 && fabs(vy) < 0.1 && fabs(vz) < 0.1) ring.
primary = 1;
507 list<pair<Double_t, Double_t>> L;
509 for (vector<int>::iterator j = ring.
Hits.begin(); j != ring.
Hits.end(); ++j) {
510 L.push_back(pair<Double_t, Double_t>(Hits[(*j)].
x, Hits[(*j)].
y));
511 hitX.push_back(Hits[(*j)].
x);
512 hitY.push_back(Hits[(*j)].
y);
549 if (ring.
r > 3. && ring.
r < 7. && ring.
NHits >= 7 ) {
561 TArc* MCUp =
new TArc(ring.
x, -ring.
y, ring.
r, 0, 360);
562 MCUp->SetLineWidth(2);
563 if (ring.
PDG == 11 || ring.
PDG == -11) {
564 MCUp->SetLineColor(2);
565 if (ring.
kind != 0) NeMC++;
567 else if (ring.
PDG == 211 || ring.
PDG == -211 || ring.
PDG == 111) {
568 MCUp->SetLineColor(28);
569 if (ring.
kind != 0) NpiMC++;
572 MCUp->SetLineColor(5);
573 MCUp->SetFillStyle(0);
575 if (ring.
kind == 0) {
576 MCUp->SetLineStyle(3);
577 MCUp->SetLineWidth(1);
580 MCUp->SetLineStyle(1);
606 TArc* MCDown =
new TArc(ring.
x, -ring.
y, ring.
r, 0, 360);
607 MCDown->SetLineWidth(2);
608 if (ring.
PDG == 11 || ring.
PDG == -11)
609 MCDown->SetLineColor(2);
610 else if (ring.
PDG == 211 || ring.
PDG == -211)
611 MCDown->SetLineColor(28);
613 MCDown->SetLineColor(5);
614 MCDown->SetFillStyle(0);
615 if (ring.
kind == 0) {
616 MCDown->SetLineStyle(3);
617 MCDown->SetLineWidth(1);
620 MCDown->SetLineStyle(1);
623 for (Int_t i1 = 0; i1 <
fRingArray->GetEntriesFast(); i1++) {
625 if (((
sqrt((ArrRingX[i1] - ring.
x) * (ArrRingX[i1] - ring.
x) + (ArrRingY[i1] + ring.
y) * (ArrRingY[i1] + ring.
y))
627 && (sqrt((ArrRingR[i1] - ring.
r) * (ArrRingR[i1] - ring.
r)) < 0.15 * ring.
r) && (ring.
k == 0))
628 || ((sqrt((ArrRingX[i1] - ring.
x) * (ArrRingX[i1] - ring.
x)
629 + (ArrRingY[i1] + ring.
y) * (ArrRingY[i1] + ring.
y))
631 && (sqrt((ArrRingR[i1] - ring.
r) * (ArrRingR[i1] - ring.
r)) < 0.05 * ring.
r) && (ring.
k == 0))) {
633 TArc* RecoRingUp =
new TArc(ArrRingX[i1], ArrRingY[i1], ArrRingR[i1], 0, 360);
636 if (ring.
r > 3 && ring.
r < 7 && ring.
NHits >= 5) NRecoG++;
637 RecoRingUp->SetLineWidth(1);
638 RecoRingUp->SetLineColor(4);
639 if (ring.
r < 3 || ring.
r > 7 || ring.
NHits < 5) RecoRingUp->SetLineColor(5);
640 RecoRingUp->SetFillStyle(0);
641 RecoRingUp->Draw(
"*");
643 TArc* RecoRingDown =
new TArc(ArrRingX[i1], ArrRingY[i1], ArrRingR[i1], 0, 360);
644 RecoRingDown->SetLineWidth(1);
645 RecoRingDown->SetLineColor(4);
646 if (ring.
r < 3 || ring.
r > 7 || ring.
NHits < 5) RecoRingDown->SetLineColor(5);
647 RecoRingDown->SetFillStyle(0);
648 RecoRingDown->Draw(
"*");
651 if (
sqrt((ArrRingX[i1] - ring.
x) * (ArrRingX[i1] - ring.
x) + (ArrRingY[i1] + ring.
y) * (ArrRingY[i1] + ring.
y))
653 && sqrt((ArrRingR[i1] - ring.
r) * (ArrRingR[i1] - ring.
r)) < 0.05 * ring.
r && ring.
k != 2) {
655 if (ring.
k == 1) NRecoG--;
656 if (ring.
r > 3 && ring.
r < 7 && ring.
NHits >= 5) NRecoEx++;
657 TArc* GoodRecoRingUp =
new TArc(ArrRingX[i1], ArrRingY[i1], ArrRingR[i1], 0, 360);
658 GoodRecoRingUp->SetLineWidth(1);
659 GoodRecoRingUp->SetLineColor(3);
660 if (ring.
r < 3 || ring.
r > 7 || ring.
NHits < 5) GoodRecoRingUp->SetLineColor(5);
661 GoodRecoRingUp->SetFillStyle(0);
663 GoodRecoRingUp->Draw(
"*");
665 TArc* GoodRecoRingDown =
new TArc(ArrRingX[i1], ArrRingY[i1], ArrRingR[i1], 0, 360);
666 GoodRecoRingDown->SetLineWidth(1);
667 GoodRecoRingDown->SetLineColor(3);
668 if (ring.
r < 3 || ring.
r > 7 || ring.
NHits < 5) GoodRecoRingDown->SetLineColor(5);
669 GoodRecoRingDown->SetFillStyle(0);
670 GoodRecoRingDown->Draw(
"*");
683 Int_t MCRecoCor[NReco];
685 for (Int_t ir = 0; ir < NReco; ir++) {
687 map<Int_t, Int_t> hitmap;
693 for (
int ih = 0; ih < nh; ih++) {
695 Int_t jh = pHitIndex[
h];
697 if (hitmap.find(
ID) == hitmap.end()) hitmap.insert(pair<Int_t, Int_t>(
ID, 0));
701 Int_t CurrentMCTrack;
702 for (map<Int_t, Int_t>::iterator j = hitmap.begin(); j != hitmap.end(); ++j) {
703 if ((
static_cast<Double_t
>(j->second)) < 0.7 * nh)
continue;
704 CurrentMCTrack = j->first;
705 MCRecoCor[ir] = MCRingMap[j->first].MCTrackID;
706 MCRingMap[j->first].Reconstructed++;
707 if ((
static_cast<Int_t
>(j->second)) > MCRingMap[j->first].NHitsBestReco) {
708 MCRingMap[j->first].NHitsBestReco = (
static_cast<Int_t
>(j->second));
709 MCRingMap[j->first].NHitsBestvsNHitsMC = (
static_cast<Double_t
>(j->second)) / MCRingMap[j->first].NHits;
715 h_ghost_nhits->Fill(nh);
726 MCRing& ring_mc = MCRingMap[CurrentMCTrack];
728 if (ring_mc.
PDG == 11 || ring_mc.
PDG == -11) {
729 REl->Fill(ring_mc.
r);
734 else if (ring_mc.
PDG == 211 || ring_mc.
PDG == -211 || ring_mc.
PDG == 111) {
735 RPi->Fill(ring_mc.
r);
744 for (Int_t i1 = 0; i1 < NReco; i1++) {
748 for (Int_t i2 = 0; i2 < NReco; i2++) {
749 if (MCRecoCor[i1] != MCRecoCor[i2])
continue;
753 for (Int_t j1 = 0; j1 < nh1; j1++) {
754 for (Int_t j2 = 0; j2 < nh2; j2++) {
760 NHitsVsMCP->Fill(MCRingMap[MCRecoCor[i1]].P, NSame);
765 Int_t CloneFlag[NReco];
766 for (Int_t i = 0; i < NReco; i++) {
769 for (Int_t i = 0; i < NReco; i++) {
771 if (MCRecoCor[i] == -1)
continue;
772 for (Int_t j = i + 1; j < NReco; j++) {
774 if (MCRecoCor[j] == -1)
continue;
775 if (MCRecoCor[i] == MCRecoCor[j]) {
776 CloneFlag[i] = MCRecoCor[i];
777 CloneFlag[j] = MCRecoCor[j];
788 for (map<Int_t, MCRing>::iterator MC = MCRingMap.begin(); MC != MCRingMap.end(); ++MC) {
789 MCRing& ring = MC->second;
804 for (Int_t i = 0; i < NReco; i++) {
805 if (CloneFlag[i] == 0)
continue;
807 for (map<Int_t, MCRing>::iterator MC = MCRingMap.begin(); MC != MCRingMap.end(); ++MC) {
808 MCRing& ring = MC->second;
809 if (CloneFlag[i] != 0) {
812 TArc* MCringUp =
new TArc(ring.
x, -ring.
y, ring.
r, 0, 360);
813 MCringUp->SetLineWidth(1);
814 MCringUp->SetLineColor(2);
815 MCringUp->SetFillStyle(0);
818 TArc* MCringDown =
new TArc(ring.
x, -ring.
y, ring.
r, 0, 360);
819 MCringDown->SetLineWidth(1);
820 MCringDown->SetLineColor(2);
821 MCringDown->SetFillStyle(0);
826 CloneUp->SetLineWidth(1);
827 CloneUp->SetLineColor(7);
828 CloneUp->SetFillStyle(0);
832 CloneDown->SetLineWidth(1);
833 CloneDown->SetLineColor(7);
834 CloneDown->SetFillStyle(0);
835 CloneDown->Draw(
"*");
841 Int_t NAll = 0, NRef = 0, NExtra = 0, NAllReco = 0, NRefReco = 0, NExtraReco = 0, NClone = 0;
842 for (map<Int_t, MCRing>::iterator i = MCRingMap.begin(); i != MCRingMap.end(); ++i) {
848 if (ring.
kind == 0) {
855 if (ring.
kind == 1) NExtra++;
856 if (ring.
kind == 2) NRef++;
860 NClone += i->second.Reconstructed - 1;
871 TGraph* U1 =
new TGraph(
fHitArray->GetEntriesFast(), HitArrX, HitArrY);
872 U1->SetMarkerColor(kBlue);
873 U1->SetMarkerStyle(20);
874 U1->SetMarkerSize(0.3);
876 TGraph* U2 =
new TGraph(NfakeHits, NoiseHitArrX, NoiseHitArrY);
877 U2->SetMarkerColor(7);
878 U2->SetMarkerStyle(20);
879 U2->SetMarkerSize(0.3);
882 TGraph* U =
new TGraph(
fHitArray->GetEntriesFast(), HitArrX, HitArrY);
883 U->SetMarkerColor(kBlue);
884 U->SetMarkerStyle(20);
885 U->SetMarkerSize(0.3);
887 TGraph* U3 =
new TGraph(NfakeHits, NoiseHitArrX, NoiseHitArrY);
888 U3->SetMarkerColor(7);
889 U3->SetMarkerStyle(20);
890 U3->SetMarkerSize(0.3);
896 static Int_t S_NAll = 0, S_NRef = 0, S_NExtra = 0, S_NReco = 0, S_NAllReco = 0, S_NRefReco = 0, S_NExtraReco = 0,
897 S_NClone = 0, S_NGhost = 0, S_NEvents = 0;
903 S_NAllReco += NAllReco;
904 S_NRefReco += NRefReco;
905 S_NExtraReco += NExtraReco;
914 cout.setf(ios::fixed);
915 cout.setf(ios::showpoint);
919 Double_t p_all = (NAll > 0) ?
static_cast<Double_t
>(NAllReco) / NAll : 0.;
920 Double_t p_ref = (NRef > 0) ?
static_cast<Double_t
>(NRefReco) / NRef : 0.;
921 Double_t p_extra = (NExtra > 0) ?
static_cast<Double_t
>(NExtraReco) / NExtra : 0.;
922 Double_t p_clone = (NReco > 0) ?
static_cast<Double_t
>(NClone) / NReco : 0.;
923 Double_t p_ghost = (NReco > 0) ?
static_cast<Double_t
>(NGhost) / NReco : 0.;
927 cout <<
"L1ENN PER EVENT STAT : " << endl;
928 cout <<
"MC Refset : " << NRef << endl;
929 cout <<
"MC Extras : " << NExtra << endl;
930 cout <<
"ALL SIMULATED : " << NAll << endl;
932 cout <<
"RC Refset : " << NRefReco << endl;
933 cout <<
"RC Extras : " << NExtraReco << endl;
934 cout <<
"clones : " << NClone << endl;
935 cout <<
"ghosts : " << NGhost << endl;
936 cout <<
"ALL RECONSTRUCTED : " << NAllReco << endl;
938 cout <<
"Refset efficiency : " << p_ref << endl;
939 cout <<
"Allset efficiency : " << p_all << endl;
940 cout <<
"Extra efficiency : " << p_extra << endl;
941 cout <<
"clone probability : " << p_clone << endl;
942 cout <<
"ghost probability : " << p_ghost << endl;
947 std::string MC_Refset;
948 std::stringstream out1;
950 MC_Refset = out.str();
953 TString name =
"2_" + s +
".pdf";
960 Double_t S_p_all = (S_NAll > 0) ?
static_cast<Double_t
>(S_NAllReco) / S_NAll : 0.;
961 Double_t S_p_ref = (S_NRef > 0) ?
static_cast<Double_t
>(S_NRefReco) / S_NRef : 0.;
962 Double_t S_p_extra = (S_NExtra > 0) ?
static_cast<Double_t
>(S_NExtraReco) / S_NExtra : 0.;
963 Double_t S_p_clone = (S_NReco > 0) ?
static_cast<Double_t
>(S_NClone) / S_NReco : 0.;
964 Double_t S_p_ghost = (S_NReco > 0) ?
static_cast<Double_t
>(S_NGhost) / S_NReco : 0.;
966 cout <<
"ACCUMULATED STAT : " << S_NEvents <<
" EVENTS " << endl << endl;
974 cout <<
"Refset efficiency : " << S_p_ref <<
" | " << S_NRefReco <<
" | " << S_NRef << endl;
975 cout <<
"Allset efficiency : " << S_p_all <<
" | " << S_NAllReco <<
" | " << S_NAll << endl;
976 cout <<
"Extra efficiency : " << S_p_extra <<
" | " << S_NExtraReco <<
" | " << S_NExtra << endl;
977 cout <<
"clone probability : " << S_p_clone <<
" | " << S_NClone << endl;
978 cout <<
"ghost probability : " << S_p_ghost <<
" | " << S_NGhost << endl;
979 cout <<
"MC rings/event found : " << Int_t(
static_cast<Double_t
>(S_NAllReco) /
static_cast<Double_t
>(S_NEvents))
982 cout <<
"Reco time (ms) : " << 0. * 1000. / S_NEvents << endl;
989 for (map<Int_t, MCRing>::iterator i = MCRingMap.begin(); i != MCRingMap.end(); ++i) {
992 h_MC_radius->Fill(ring.
r);
993 h_MC_nhits->Fill(ring.
NHits);
994 h_MC_momentum->Fill(ring.
P);
996 h_MC_primary_nhits->Fill(ring.
NHits);
997 h_MC_primary_momentum->Fill(ring.
P);
1000 for (vector<int>::iterator j = ring.
Hits.begin(); j != ring.
Hits.end(); ++j) {
1001 Double_t dx = Hits[(*j)].
x - ring.
x;
1002 Double_t dy = Hits[(*j)].
y - ring.
y;
1003 Double_t res =
sqrt(dx * dx + dy * dy) - ring.
r;
1004 h_MC_resolution->Fill(res);
1005 if (ring.
kind == 1) h_MC_extra_resolution->Fill(res);
1006 if (ring.
kind == 2) h_MC_ref_resolution->Fill(res);
1007 if (ring.
primary) h_MC_primary_res_vs_momentum->Fill(ring.
P, res);
1010 if (ring.
kind == 1) p_extra_eff_vs_nhits->Fill(ring.
NHits, entry);
1011 if (ring.
kind == 2) p_ref_eff_vs_nhits->Fill(ring.
NHits, entry);
1016 TFile* oldFile = gFile;
1017 TDirectory* oldDir = gDirectory;
1018 TFile* outfile =
new TFile(
"L1RingQaHisto.root",
"RECREATE");
1020 TIter hiter(listHisto);
1021 while (TObject* obj = hiter())
1026 gDirectory = oldDir;