5 #include "TClonesArray.h"
10 #include "TMCProcess.h"
25 #include "FairMCPoint.h"
26 #include "FairTrackParam.h"
32 #include <boost/assign/list_of.hpp>
38 using boost::assign::list_of;
41 : FairTask(
"CbmRichRecoQa")
46 , fRichPoints(nullptr)
50 , fRichRingMatches(nullptr)
51 , fGlobalTracks(nullptr)
53 , fStsTrackMatches(nullptr)
54 , fRichProjections(nullptr)
60 cout <<
"CbmRichRecoQa::Init" << endl;
61 FairRootManager* ioman = FairRootManager::Instance();
62 if (
nullptr == ioman) {
63 Fatal(
"CbmRichRecoQa::Init",
"RootManager not instantised!");
66 fMCTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
67 if (
nullptr ==
fMCTracks) { Fatal(
"CbmRichRecoQa::Init",
"No MC Tracks!"); }
69 fRichPoints = (TClonesArray*) ioman->GetObject(
"RichPoint");
71 Fatal(
"CbmRichRecoQa::Init",
"No Rich Points!");
74 fRichDigis = (TClonesArray*) ioman->GetObject(
"RichDigi");
75 if (
nullptr ==
fRichDigis) { Fatal(
"CbmRichRecoQa::Init",
"No Rich Digis!"); }
77 fRichHits = (TClonesArray*) ioman->GetObject(
"RichHit");
78 if (
nullptr ==
fRichHits) { Fatal(
"CbmRichRecoQa::Init",
"No RichHits!"); }
80 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
81 if (
nullptr ==
fRichRings) { Fatal(
"CbmRichRecoQa::Init",
"No RichRings!"); }
85 Fatal(
"CbmRichRecoQa::Init",
"No RichRingMatch array!");
88 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
90 Fatal(
"CbmRichRecoQa::Init",
"No GlobalTrack array!");
93 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
95 Fatal(
"CbmRichRecoQa::Init",
": No StsTrack array!");
100 Fatal(
"CbmRichRecoQa::Init",
": No StsTrackMatch array!");
105 Fatal(
"CbmRichUrqmdTest::Init",
"No fRichProjections array!");
134 for (Int_t
i = 0;
i < 4;
i++) {
136 if (
i == 0) s =
"Primel";
137 if (
i == 1) s =
"Pi";
138 if (
i == 2) s =
"PrimelPlus";
139 if (
i == 3) s =
"PrimelMinus";
142 fHM->
Create2<TH2D>(
"fhRingTrackDistVsMomTruematch" + s,
143 "fhRingTrackDistVsMomTruematch" + s
144 +
";P [GeV/c];Ring-track distance [cm];Yield (a.u.)",
151 fHM->
Create2<TH2D>(
"fhRingTrackDistVsMomWrongmatch" + s,
152 "fhRingTrackDistVsMomWrongmatch" + s
153 +
";P [GeV/c];Ring-track distance [cm];Yield (a.u.)",
163 "fhRingTrackDistVsNofHitsTruematch" + s,
164 "fhRingTrackDistVsNofHitsTruematch" + s
165 +
";Nof hits in found ring;Ring-track distance [cm];Yield (a.u.)",
173 fHM->
Create3<TH3D>(
"fhRingTrackDistVsXYTruematch" + s,
174 "fhRingTrackDistVsXYTruematch" + s
175 +
";X [cm];Y [cm];Ring-track distance [cm]",
185 fHM->
Create2<TH2D>(
"fhRingTrackDistVsXTruematch" + s,
186 "fhRingTrackDistVsXTruematch" + s
187 +
";X [cm];Ring-track distance [cm]",
195 fHM->
Create2<TH2D>(
"fhRingTrackDistVsYTruematch" + s,
196 "fhRingTrackDistVsYTruematch" + s
197 +
";Abs(Y) [cm];Ring-track distance [cm]",
205 Double_t range = 3., nbBinsX = 120., nbBinsY = 208;
206 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffXRingVsXYTruematchUp" + s,
207 "fhRingTrackDistDiffXRingVsXYTruematchUp" + s
208 +
";X [cm];Y [cm];X Ring-track distance [cm]",
218 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffYRingVsXYTruematchUp" + s,
219 "fhRingTrackDistDiffYRingVsXYTruematchUp" + s
220 +
";X [cm];Y [cm];Y Ring-track distance [cm]",
230 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffXTrackVsXYTruematchUp" + s,
231 "fhRingTrackDistDiffXTrackVsXYTruematchUp" + s
232 +
";X [cm];Y [cm];X Track-ring distance [cm]",
242 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffYTrackVsXYTruematchUp" + s,
243 "fhRingTrackDistDiffYTrackVsXYTruematchUp" + s
244 +
";X [cm];Y [cm];Y Track-ring distance [cm]",
255 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffXRingVsXYTruematchDown" + s,
256 "fhRingTrackDistDiffXRingVsXYTruematchDown" + s
257 +
";X [cm];Y [cm];X Ring-track distance [cm]",
267 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffYRingVsXYTruematchDown" + s,
268 "fhRingTrackDistDiffYRingVsXYTruematchDown" + s
269 +
";X [cm];Y [cm];Y Ring-track distance [cm]",
279 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffXTrackVsXYTruematchDown" + s,
280 "fhRingTrackDistDiffXTrackVsXYTruematchDown" + s
281 +
";X [cm];Y [cm];X Track-ring distance [cm]",
291 fHM->
Create3<TH3D>(
"fhRingTrackDistDiffYTrackVsXYTruematchDown" + s,
292 "fhRingTrackDistDiffYTrackVsXYTruematchDown" + s
293 +
";X [cm];Y [cm];Y Track-ring distance [cm]",
304 fHM->
Create3<TH3D>(
"fhRingTrackDistVsXYHalfUpTruematch" + s,
305 "fhRingTrackDistVsXYHalfUpTruematch" + s
306 +
";X [cm];Y [cm];Ring-track distance [cm]",
316 fHM->
Create3<TH3D>(
"fhRingTrackDistVsXYHalfDownTruematch" + s,
317 "fhRingTrackDistVsXYHalfDownTruematch" + s
318 +
";X [cm];Y [cm];Ring-track distance [cm]",
331 Double_t range_2 = 3.;
333 fHM->
Create2<TH2D>(
"fhRingTrackDistVsMomTruematchElId",
334 "fhRingTrackDistVsMomTruematchElId;P [GeV/c];Ring-track "
335 "distance [cm];Yield (a.u.)",
343 "fhRingTrackDistDiffXAfterEl",
344 "fhRingTrackDistDiffXAfterEl;X [cm];Y [cm];X Ring-track distance [cm]",
355 "fhRingTrackDistDiffYAfterEl",
356 "fhRingTrackDistDiffYAfterEl;X [cm];Y [cm];Y Ring-track distance [cm]",
368 "fhMismatchSource;Global track category;% from MC",
374 "fhMismatchSourceMomMc;Momentum [GeV/c];Yield",
379 "fhMismatchSourceMomSts;Momentum [GeV/c];Yield",
383 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsAccRich",
384 "fhMismatchSourceMomStsAccRich;Momentum [GeV/c];Yield",
388 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsRich",
389 "fhMismatchSourceMomStsRich;Momentum [GeV/c];Yield",
393 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsRichTrue",
394 "fhMismatchSourceMomStsRichTrue;Momentum [GeV/c];Yield",
398 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsNoRich",
399 "fhMismatchSourceMomStsNoRich;Momentum [GeV/c];Yield",
403 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsNoRichRF",
404 "fhMismatchSourceMomStsNoRichRF;Momentum [GeV/c];Yield",
408 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsNoRichRM",
409 "fhMismatchSourceMomStsNoRichRM;Momentum [GeV/c];Yield",
413 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsNoRichNoRF",
414 "fhMismatchSourceMomStsNoRichNoRF;Momentum [GeV/c];Yield",
419 "fhMismatchSourceMomStsNoRichNoProj",
420 "fhMismatchSourceMomStsNoRichNoProj;Momentum [GeV/c];Yield",
424 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsRichWrong",
425 "fhMismatchSourceMomStsRichWrong;Momentum [GeV/c];Yield",
429 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsRichWrongRF",
430 "fhMismatchSourceMomStsRichWrongRF;Momentum [GeV/c];Yield",
434 fHM->
Create1<TH1D>(
"fhMismatchSourceMomStsRichWrongRM",
435 "fhMismatchSourceMomStsRichWrongRM;Momentum [GeV/c];Yield",
443 cout <<
"CbmRichRecoQa, event No. " <<
fEventNum << endl;
452 Int_t nofRichHits =
fRichHits->GetEntriesFast();
453 for (Int_t iHit = 0; iHit < nofRichHits; iHit++) {
455 if (
nullptr == hit)
continue;
459 for (UInt_t
i = 0;
i < motherIds.size();
i++) {
466 Int_t nofMcTracks =
fMCTracks->GetEntriesFast();
467 for (Int_t iTrack = 0; iTrack < nofMcTracks; iTrack++) {
470 if (mcTrack ==
nullptr)
continue;
474 fHM->
H1(
"fhMismatchSource")->Fill(0);
475 fHM->
H1(
"fhMismatchSourceMomMc")->Fill(mcTrack->
GetP());
481 for (Int_t iTrack = 0; iTrack < nofGlobalTracks; iTrack++) {
486 if (stsId < 0)
continue;
489 if (stsTrackMatch ==
nullptr)
continue;
493 if (mctrack ==
nullptr)
continue;
494 Double_t mom = mctrack->
GetP();
500 fHM->
H1(
"fhMismatchSource")->Fill(1);
501 fHM->
H1(
"fhMismatchSourceMomSts")->Fill(mom);
505 fHM->
H1(
"fhMismatchSource")->Fill(2);
506 fHM->
H1(
"fhMismatchSourceMomStsAccRich")->Fill(mctrack->
GetP());
514 fHM->
H1(
"fhMismatchSource")->Fill(5);
515 fHM->
H1(
"fhMismatchSourceMomStsNoRich")->Fill(mom);
521 fHM->
H1(
"fhMismatchSource")->Fill(6);
522 fHM->
H1(
"fhMismatchSourceMomStsNoRichRF")->Fill(mom);
525 fHM->
H1(
"fhMismatchSource")->Fill(8);
526 fHM->
H1(
"fhMismatchSourceMomStsNoRichNoRF")->Fill(mom);
531 fHM->
H1(
"fhMismatchSource")->Fill(7);
532 fHM->
H1(
"fhMismatchSourceMomStsNoRichRM")->Fill(mom);
537 fHM->
H1(
"fhMismatchSource")->Fill(9);
538 fHM->
H1(
"fhMismatchSourceMomStsNoRichNoProj")->Fill(mom);
545 fHM->
H1(
"fhMismatchSource")->Fill(3);
546 fHM->
H1(
"fhMismatchSourceMomStsRich")->Fill(mom);
550 if (richRingMatch ==
nullptr)
continue;
554 if (
nullptr == ring)
continue;
556 if (stsMcTrackId == richMcTrackId) {
558 fHM->
H1(
"fhMismatchSource")->Fill(4);
559 fHM->
H1(
"fhMismatchSourceMomStsRichTrue")->Fill(mom);
562 fHM->
H1(
"fhMismatchSource")->Fill(10);
563 fHM->
H1(
"fhMismatchSourceMomStsRichWrong")->Fill(mom);
566 fHM->
H1(
"fhMismatchSource")->Fill(11);
567 fHM->
H1(
"fhMismatchSourceMomStsRichWrongRF")->Fill(mom);
572 fHM->
H1(
"fhMismatchSource")->Fill(12);
573 fHM->
H1(
"fhMismatchSourceMomStsRichWrongRM")->Fill(mom);
580 Int_t nofRings =
fRichRings->GetEntriesFast();
581 for (Int_t iR = 0; iR < nofRings; iR++) {
584 if (ring ==
nullptr)
continue;
587 if (richRingMatch ==
nullptr)
continue;
589 if (richMcTrackId == mcTrackId)
return true;
596 for (Int_t iTrack = 0; iTrack < nofGlobalTracks; iTrack++) {
601 if (richId < 0)
continue;
604 if (richRingMatch ==
nullptr)
continue;
606 if (richMcTrackId == mcTrackId) {
return true; }
613 if (stsTrackId < 0) {
return false; }
614 FairTrackParam* pTrack = (FairTrackParam*)
fRichProjections->At(stsTrackId);
615 if (pTrack ==
nullptr) {
return false; }
617 if (pTrack->GetX() == 0. && pTrack->GetY() == 0.) {
626 for (Int_t iTrack = 0; iTrack < nofGlobalTracks; iTrack++) {
632 if (stsId < 0 || richId < 0)
continue;
636 if (stsTrackMatch ==
nullptr)
continue;
641 if (richRingMatch ==
nullptr)
continue;
645 if (
nullptr == ring)
continue;
655 if (mctrack ==
nullptr)
continue;
656 double mom = mctrack->
GetP();
662 if (!isEl && !isPi)
continue;
666 for (
int i = 0;
i < 2;
i++) {
679 }
else if (charge < 0) {
689 if (stsMcTrackId == richMcTrackId) {
690 fHM->
H2(
"fhRingTrackDistVsMomTruematch" + s)->Fill(mom, rtDistance);
691 fHM->
H3(
"fhRingTrackDistVsXYTruematch" + s)->Fill(xc, yc, rtDistance);
692 fHM->
H2(
"fhRingTrackDistVsXTruematch" + s)->Fill(xc, rtDistance);
693 fHM->
H2(
"fhRingTrackDistVsYTruematch" + s)->Fill(abs(yc), rtDistance);
694 fHM->
H2(
"fhRingTrackDistVsNofHitsTruematch" + s)
695 ->Fill(nofHits, rtDistance);
697 Double_t rtX = -1 * rtDistanceX;
698 Double_t rtY = -1 * rtDistanceY;
701 fHM->
H3(
"fhRingTrackDistDiffXRingVsXYTruematchUp" + s)
702 ->Fill(xc, yc, rtDistanceX);
703 fHM->
H3(
"fhRingTrackDistDiffYRingVsXYTruematchUp" + s)
704 ->Fill(xc, yc, rtDistanceY);
705 fHM->
H3(
"fhRingTrackDistDiffXTrackVsXYTruematchUp" + s)
707 fHM->
H3(
"fhRingTrackDistDiffYTrackVsXYTruematchUp" + s)
709 fHM->
H3(
"fhRingTrackDistVsXYHalfUpTruematch" + s)
710 ->Fill(xc, yc, rtDistance);
714 fHM->
H3(
"fhRingTrackDistDiffXRingVsXYTruematchDown" + s)
715 ->Fill(xc, yc, rtDistanceX);
716 fHM->
H3(
"fhRingTrackDistDiffYRingVsXYTruematchDown" + s)
717 ->Fill(xc, yc, rtDistanceY);
718 fHM->
H3(
"fhRingTrackDistDiffXTrackVsXYTruematchDown" + s)
720 fHM->
H3(
"fhRingTrackDistDiffYTrackVsXYTruematchDown" + s)
722 fHM->
H3(
"fhRingTrackDistVsXYHalfDownTruematch" + s)
723 ->Fill(xc, yc, rtDistance);
728 if (
i == 0 && isEl) {
730 fHM->
H2(
"fhRingTrackDistVsMomTruematchElId")->Fill(mom, rtDistance);
731 fHM->
H3(
"fhRingTrackDistDiffXAfterEl")->Fill(xc, yc, rtDistanceX);
732 fHM->
H3(
"fhRingTrackDistDiffYAfterEl")->Fill(xc, yc, rtDistanceY);
737 fHM->
H2(
"fhRingTrackDistVsMomWrongmatch" + s)->Fill(mom, rtDistance);
752 fHM->
CreateCanvas(
"fh_ring_track_distance_truematch_comparison_primel",
753 "fh_ring_track_distance_truematch_comparison_primel",
757 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimelMinus")
758 ->ProjectionY(
"fhRingTrackDistVsMomTruematchPrimelMinus_py")
760 py_minus->Scale(1. / py_minus->Integral());
762 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimelPlus")
763 ->ProjectionY(
"fhRingTrackDistVsMomTruematchPrimelPlus_py")
765 py_plus->Scale(1. / py_plus->Integral());
782 "fh_ring_track_distance_truematch_comparison_elpi",
786 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimel")
787 ->ProjectionY(
"fhRingTrackDistVsMomTruematchPrimel_py")
789 py_el->Scale(1. / py_el->Integral());
790 TH1D* py_pi = (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchPi")
791 ->ProjectionY(
"fhRingTrackDistVsMomTruematchPi_py")
793 py_pi->Scale(1. / py_pi->Integral());
808 gStyle->SetPaintTextFormat(
"4.1f");
810 fHM->
CreateCanvas(
"fh_mismatch_source",
"fh_mismatch_source", 1000, 800);
811 Double_t nofMcEl =
fHM->
H1(
"fhMismatchSource")->GetBinContent(1);
812 cout <<
"nofMcEl = " << nofMcEl << endl;
813 fHM->
H1(
"fhMismatchSource")->Scale(100. / nofMcEl);
815 fHM->
H1(
"fhMismatchSource")->SetMarkerSize(1.9);
817 vector<string> labels = {
"MC",
829 "STS-RICH wrong RM"};
830 for (
int i = 0;
i < labels.size();
i++) {
831 fHM->
H1(
"fhMismatchSource")
833 ->SetBinLabel(
i + 1, labels[
i].c_str());
835 fHM->
H1(
"fhMismatchSource")->GetXaxis()->SetLabelSize(0.03);
840 "fh_mismatch_source_mom",
"fh_mismatch_source_mom", 1000, 800);
841 vector<string> labels = {
"MC",
853 "STS-RICH wrong RM"};
854 vector<TH1*> hists = {
fHM->
H1(
"fhMismatchSourceMomMc"),
855 fHM->
H1(
"fhMismatchSourceMomSts"),
856 fHM->
H1(
"fhMismatchSourceMomStsAccRich"),
857 fHM->
H1(
"fhMismatchSourceMomStsRich"),
858 fHM->
H1(
"fhMismatchSourceMomStsRichTrue"),
859 fHM->
H1(
"fhMismatchSourceMomStsNoRich"),
860 fHM->
H1(
"fhMismatchSourceMomStsNoRichRF"),
861 fHM->
H1(
"fhMismatchSourceMomStsNoRichRM"),
862 fHM->
H1(
"fhMismatchSourceMomStsNoRichNoRF"),
863 fHM->
H1(
"fhMismatchSourceMomStsNoRichNoProj"),
864 fHM->
H1(
"fhMismatchSourceMomStsRichWrong"),
865 fHM->
H1(
"fhMismatchSourceMomStsRichWrongRF"),
866 fHM->
H1(
"fhMismatchSourceMomStsRichWrongRM")};
869 fHM->
H1(
"fhMismatchSourceMomMc")->SetMinimum(0.9);
884 TCanvas* c =
fHM->
CreateCanvas(
"fh_ring_track_distance_truematch_elid",
885 "fh_ring_track_distance_truematch_elid",
891 fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimel"),
false,
true);
892 fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimel")
894 ->SetRangeUser(0., 2.);
897 fHM->
H2(
"fhRingTrackDistVsMomTruematchElId"),
false,
true);
898 fHM->
H2(
"fhRingTrackDistVsMomTruematchElId")
900 ->SetRangeUser(0., 2.);
903 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchPrimel")
905 string(
"fhRingTrackDistVsMomTruematchPrimel_py2").c_str())
908 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchElId")
910 string(
"fhRingTrackDistVsMomTruematchElId_py").c_str())
912 TH1D* pyElId2 = (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematchElId")
913 ->ProjectionY(
"test_py", 0, 40));
938 Double_t range = 2.5;
941 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_after_el",
942 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_after_el",
948 fHM->
H3(
"fhRingTrackDistDiffXAfterEl"),
true,
false, -range, range);
951 fHM->
H3(
"fhRingTrackDistDiffYAfterEl"),
true,
false, -range, range);
957 double overflow =
h->GetBinContent(
h->GetNbinsX() + 1);
958 return Cbm::NumberToString<Double_t>(
h->GetMean(), 2) +
" / "
959 + Cbm::NumberToString<Double_t>(
h->GetRMS(), 2) +
" / "
960 + Cbm::NumberToString<Double_t>(
961 100. * overflow /
h->Integral(0,
h->GetNbinsX() + 1), 2)
964 return Cbm::NumberToString<Double_t>(
h->GetMean(), 2) +
" / "
965 + Cbm::NumberToString<Double_t>(
h->GetRMS(), 2);
971 TCanvas* c =
fHM->
CreateCanvas(
"fh_ring_track_distance_truematch_" + s,
972 "fh_ring_track_distance_truematch_" + s,
978 fHM->
H2(
"fhRingTrackDistVsMomTruematch" + s),
false,
true);
981 fHM->
H2(
"fhRingTrackDistVsNofHitsTruematch" + s),
false,
true);
984 (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomTruematch" + s)
985 ->ProjectionY((
"fhRingTrackDistVsMomTruematch_py" + s).c_str())
991 fHM->
H2(
"fhRingTrackDistVsMomTruematch" + s)
993 ->SetRangeUser(0., 2.);
994 fHM->
H2(
"fhRingTrackDistVsNofHitsTruematch" + s)
996 ->SetRangeUser(0., 2.);
1000 TCanvas* c =
fHM->
CreateCanvas(
"fh_ring_track_distance_wrongmatch" + s,
1001 "fh_ring_track_distance_wrongmatch" + s,
1004 TH1D* py = (TH1D*) (
fHM->
H2(
"fhRingTrackDistVsMomWrongmatch" + s)
1006 (
"fhRingTrackDistVsMomWrongmatch_py" + s).c_str())
1010 gPad->SetLogy(
true);
1014 TCanvas* c =
fHM->
CreateCanvas(
"fh_ring_track_distance_vs_xy_truematch" + s,
1015 "fh_ring_track_distance_vs_xy_truematch" + s,
1021 fHM->
H3(
"fhRingTrackDistVsXYTruematch" + s),
true,
false, 0., 2.);
1024 fHM->
H2(
"fhRingTrackDistVsXTruematch" + s)
1026 ->SetRangeUser(0., 1.5);
1029 fHM->
H2(
"fhRingTrackDistVsYTruematch" + s)
1031 ->SetRangeUser(0., 1.5);
1039 "fh_ring_track_distance_vs_xy_truematch_half_" + s,
1043 TH3D* h1 = (TH3D*)
fHM->
H3(
"fhRingTrackDistVsXYTruematch" + s)->Clone();
1044 TH3D* h2 = (TH3D*)
fHM->
H3(
"fhRingTrackDistVsXYTruematch" + s)->Clone();
1046 h1->GetYaxis()->SetRangeUser(110., 200.);
1049 h2->GetYaxis()->SetRangeUser(-200., -110.);
1055 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_projection_" + s,
1056 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_projection_" + s,
1060 TH3D* h1 = (TH3D*)
fHM->
H3(
"fhRingTrackDistVsXYTruematch" + s)->Clone();
1062 TH2D* h2 = (TH2D*) h1->Project3D(
"yx")->Clone();
1063 h2->GetYaxis()->SetRangeUser(110., 200.);
1064 h2->Scale(1. / .15);
1067 TH2D* h3 = (TH2D*) h1->Project3D(
"yx")->Clone();
1068 h3->GetYaxis()->SetRangeUser(-200., -110.);
1069 h3->Scale(1. / .15);
1073 Double_t range = 1.;
1076 "fh_ring_track_distance_diff_x_y_ring_vs_xy_truematch_up_" + s,
1077 "fh_ring_track_distance_diff_x_y_ring_vs_xy_truematch_up_" + s,
1097 "fh_ring_track_distance_diff_x_y_ring_vs_xy_truematch_down_" + s,
1098 "fh_ring_track_distance_diff_x_y_ring_vs_xy_truematch_down_" + s,
1131 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_up_" + s,
1132 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_up_" + s,
1152 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_down_" + s,
1153 "fh_track_ring_distance_diff_x_y_track_vs_xy_truematch_down_" + s,
1173 fHM->
CreateCanvas(
"fh_track_ring_distance_vs_xy_truematch_halves_" + s,
1174 "fh_track_ring_distance_vs_xy_truematch_halves_" + s,
1194 if (mctrack ==
nullptr)
return false;
1201 if (mctrack ==
nullptr)
return false;
1203 if (pdg == 211)
return true;
1210 TDirectory* oldir = gDirectory;
1211 TFile* outFile = FairRootManager::Instance()->GetOutFile();
1212 if (outFile != NULL) {
1216 gDirectory->cd(oldir->GetPath());
1223 const string& outputDir) {
1226 if (
fHM !=
nullptr)
delete fHM;
1229 TFile* file =
new TFile(fileName.c_str());