3 #include "FairLogger.h"
4 #include "FairRootManager.h"
6 #include "TClonesArray.h"
27 #include "FairTrackParam.h"
28 #include "FairVolume.h"
30 #include "TGeoManager.h"
41 #include "TGeoSphere.h"
42 #include "TVirtualMC.h"
52 , fRichProjections(NULL)
53 , fRichMirrorPoints(NULL)
56 , fRichRingMatches(NULL)
57 , fRichRefPlanePoints(NULL)
68 , fDrawAlignment(kTRUE)
69 , fDrawMapping(kFALSE)
70 , fDrawProjection(kTRUE)
71 , fIsMeanCenter(kFALSE)
72 , fIsReconstruction(kFALSE)
79 for (
int i = 0;
i < 3;
i++) {
87 FairRootManager* manager = FairRootManager::Instance();
89 fRichHits = (TClonesArray*) manager->GetObject(
"RichHit");
91 Fatal(
"CbmRichCorrectionVector::Init",
"No RichHit array !");
94 fRichRings = (TClonesArray*) manager->GetObject(
"RichRing");
96 Fatal(
"CbmRichCorrectionVector::Init",
"No RichRing array !");
101 Fatal(
"CbmRichCorrectionVector::Init",
"No RichProjection array !");
106 Fatal(
"CbmRichCorrectionVector::Init",
"No RichMirrorPoints array !");
109 fRichMCPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
111 Fatal(
"CbmRichCorrectionVector::Init",
"No RichMCPoints array !");
114 fMCTracks = (TClonesArray*) manager->GetObject(
"MCTrack");
116 Fatal(
"CbmRichCorrectionVector::Init",
"No MCTracks array !");
121 Fatal(
"CbmRichCorrectionVector::Init",
"No RichRingMatches array !");
126 Fatal(
"CbmRichCorrectionVector::Init",
"No RichRefPlanePoint array !");
129 fRichPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
131 Fatal(
"CbmRichCorrectionVector::Init",
"No RichPoint array !");
134 fGlobalTracks = (TClonesArray*) manager->GetObject(
"GlobalTrack");
136 Fatal(
"CbmAnaDielectronTask::Init",
"No GlobalTrack array!");
139 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
140 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_53"] =
142 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
143 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_52"] =
145 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
146 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_1_51"] =
148 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
149 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_77"] =
151 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
152 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_76"] =
154 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
155 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_1_75"] =
157 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
158 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_29"] =
160 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
161 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_28"] =
163 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
164 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_1_27"] =
166 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
167 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_3_15"] =
169 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
170 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_16"] =
172 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
173 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_17"] =
177 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_53"] =
180 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_52"] =
183 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_1_51"] =
186 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_77"] =
189 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_76"] =
192 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_1_75"] =
195 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_29"] =
198 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_28"] =
201 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_1_27"] =
204 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
205 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_3_15"] =
"3_15";
207 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
208 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_16"] =
"2_16";
210 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
211 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_17"] =
"2_17";
225 for (std::map<string, string>::iterator it =
fPathsMap.begin();
232 name +
";X_Axis [];Y_Axis [];Entries",
244 string name =
"fHPoints_Ellipse_" + it->second;
246 name +
";X_Axis [];Y_Axis [];Entries",
255 fHM->
Create1<TH1D>(
"fhDistanceCenterToExtrapolatedTrack",
256 "fhDistanceCenterToExtrapolatedTrack;Distance fitted "
257 "center to extrapolated track;Number of entries",
262 "fhDistanceCenterToExtrapolatedTrackInPlane",
263 "fhDistanceCenterToExtrapolatedTrackInPlane;Distance fitted center to "
264 "extrapolated track in plane;Number of entries",
269 "fhDifferenceX;Difference in X (fitted center - "
270 "extrapolated track);Number of entries",
275 "fhDifferenceY;Difference in Y (fitted center - "
276 "extrapolated track);Number of entries",
282 "fhDistanceCenterToExtrapolatedTrackInPlaneUncorrected",
283 "fhDistanceCenterToExtrapolatedTrackInPlaneUncorrected;Distance fitted "
284 "center to extrapolated track in plane;Number of entries",
288 fHM->
Create1<TH1D>(
"fhDifferenceXUncorrected",
289 "fhDifferenceXUncorrected;Difference in X (fitted center "
290 "- extrapolated track);Number of entries",
294 fHM->
Create1<TH1D>(
"fhDifferenceYUncorrected",
295 "fhDifferenceYUncorrected;Difference in Y (fitted center "
296 "- extrapolated track);Number of entries",
306 "fHCenterDistance;Distance C-C';Nb of entries",
311 "fHPhi",
"fHPhi;Phi_Ch [rad];Nb of entries", 200, -3.4, 3.4);
313 "fHThetaDiff",
"fHThetaDiff;Th_Ch-Th_0 [cm];Nb of entries", 252, -5., 5.);
315 "fHCherenkovHitsDistribTheta0",
316 "fHCherenkovHitsDistribTheta0;Phi_0 [rad];Theta_0 [cm];Entries",
324 "fHCherenkovHitsDistribThetaCh",
325 "fHCherenkovHitsDistribThetaCh;Phi_Ch [rad];Theta_Ch [cm];Entries",
333 "fHCherenkovHitsDistribReduced",
334 "fHCherenkovHitsDistribReduced;Phi_Ch [rad];Th_Ch-Th_0 [cm];Entries",
346 "--------------------------------------------------------------------"
347 "------------------------------------------//"
349 cout <<
"//---------------------------------------- EXEC Function - Defining "
350 "the entries ----------------------------------------//"
353 "--------------------------------------------------------------------"
354 "--------------------------------------------------//"
358 cout <<
"CbmRichCorrectionVector : Event #" <<
fEventNum << endl;
360 Int_t nofRingsInEvent =
fRichRings->GetEntries();
362 Int_t nofHitsInEvent =
fRichHits->GetEntries();
364 Int_t NofMCTracks =
fMCTracks->GetEntriesFast();
365 cout <<
"Nb of rings in evt = " << nofRingsInEvent
366 <<
", nb of mirror points = " << nofMirrorPoints
367 <<
", nb of hits in evt = " << nofHitsInEvent
368 <<
", nb of Monte-Carlo points = " << NofMCPoints
369 <<
" and nb of Monte-Carlo tracks = " << NofMCTracks << endl
373 "--------------------------------------------------------------------"
374 "--------------------------------------//"
376 cout <<
"//-------------------------------- EXEC Function - Correction "
377 "Vector class ------------------------------------------//"
380 "--------------------------------------------------------------------"
381 "--------------------------------------//"
385 TClonesArray* projectedPoint;
387 if (nofRingsInEvent == 0) {
388 cout <<
"Error no rings registered in event." << endl << endl;
399 Double_t trackX = 0., trackY = 0.;
402 Int_t nofRingsInEvent =
fRichRings->GetEntries();
403 Float_t DistCenters, Theta_Ch, Theta_0, Angles_0;
404 Float_t
Pi = 3.14159265;
405 Float_t TwoPi = 2. * 3.14159265;
409 if (nofRingsInEvent >= 1) {
410 cout <<
"Number of Rings in event: " << nofRingsInEvent << endl;
412 for (Int_t iR = 0; iR < nofRingsInEvent; iR++) {
420 + TMath::Power(ringL.
GetCenterY() - trackY, 2));
421 fHM2->
H1(
"fHCenterDistance")->Fill(DistCenters);
427 for (Int_t iH = 0; iH < NofHits; iH++) {
429 Int_t HitIndex = ring->
GetHit(iH);
431 Float_t xHit = hit->
GetX();
432 Float_t yHit = hit->
GetY();
433 Angles_0 = TMath::ATan2(
438 if (xRing - xHit == 0 || yRing - yHit == 0)
continue;
439 fPhi[iH] = TMath::ATan2(yHit - yRing, xHit - xRing);
443 Theta_Ch =
sqrt(TMath::Power(trackX - hit->
GetX(), 2)
444 + TMath::Power(trackY - hit->
GetY(), 2));
448 fHM2->
H1(
"fHThetaDiff")->Fill(Theta_Ch - Theta_0);
451 fHM2->
H2(
"fHCherenkovHitsDistribTheta0")->Fill(Angles_0, Theta_0);
452 fHM2->
H2(
"fHCherenkovHitsDistribThetaCh")->Fill(
fPhi[iH], Theta_Ch);
453 fHM2->
H2(
"fHCherenkovHitsDistribReduced")
454 ->Fill(
fPhi[iH], (Theta_Ch - Theta_0));
464 for (Int_t iP = 0; iP < NofProjections; iP++) {
469 cout <<
"Error: CbmRichCorrectionVector::GetTrackPosition. No fair track "
480 cout <<
"//---------------------------------------- MATCH_FINDER Function "
481 "----------------------------------------//"
484 Int_t NofRingsInEvent =
fRichRings->GetEntries();
486 Int_t NofMCTracks =
fMCTracks->GetEntriesFast();
489 Double_t x_Mirr = 0, y_Mirr = 0, z_Mirr = 0, x_PMT = 0, y_PMT = 0, z_PMT = 0;
490 Double_t CenterX = 0, CenterY = 0;
492 const Char_t* mirr_path;
495 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
497 Int_t trackID = MirrPoint->GetTrackID();
500 for (Int_t iMCPoint = 0; iMCPoint < NofMCPoints; iMCPoint++) {
502 if (NULL == pPoint)
continue;
504 if (NULL == pTrack)
continue;
507 if (motherID == -1)
continue;
509 if (trackID == motherID) {
513 x_Mirr = MirrPoint->GetX();
514 y_Mirr = MirrPoint->GetY();
515 z_Mirr = MirrPoint->GetZ();
517 mirr_node = gGeoManager->FindNode(x_Mirr, y_Mirr, z_Mirr);
518 mirr_path = gGeoManager->GetPath();
525 for (Int_t iRing = 0; iRing < NofRingsInEvent; iRing++) {
527 if (NULL == ring)
continue;
539 if (richMCID == -1)
continue;
541 if (trackID == richMCID) {
543 cout <<
"MATCH BETWEEN TRACK_ID AND RICH_MC_ID FOUND !" << endl;
544 cout <<
"Center X = " << CenterX <<
" and center Y = " << CenterY
546 x_Mirr = MirrPoint->GetX();
547 y_Mirr = MirrPoint->GetY();
548 z_Mirr = MirrPoint->GetZ();
549 cout <<
"x_Mirr: " << x_Mirr <<
", y_Mirr: " << y_Mirr
550 <<
" and z_Mirr: " << z_Mirr << endl;
551 mirr_node = gGeoManager->FindNode(x_Mirr, y_Mirr, z_Mirr);
552 mirr_path = gGeoManager->GetPath();
553 cout <<
"Mirror path: " << mirr_path << endl;
565 string name = string(mirr_path);
566 for (std::map<string, string>::iterator it =
fPathsMap.begin();
569 if (name.compare(it->first) == 0) {
572 Double_t x_PMT = pPoint->GetX();
573 Double_t y_PMT = pPoint->GetY();
574 Double_t z_PMT = pPoint->GetZ();
577 fHM->
H2(
"fHMCPoints_" + it->second)->Fill(-x_PMT, y_PMT);
586 cout <<
"//---------------------------------------- FILL_PMT_MAP_ELLIPSE "
587 "Function ----------------------------------------//"
589 string name = string(mirr_path);
590 for (std::map<string, string>::iterator it =
fPathsMap.begin();
593 if (name.compare(it->first) == 0) {
594 cout <<
"IDENTICAL PATHS FOUND !" << endl;
596 cout <<
"Mirror ID: " << it->second << endl;
598 fHM->
H2(
"fHPoints_Ellipse_" + it->second)->Fill(-CenterX, CenterY);
605 cout <<
"//------------------------------ CbmRichCorrectionVector: "
606 "Projection Producer ------------------------------//"
611 Int_t NofRingsInEvent =
fRichRings->GetEntries();
614 Int_t NofPMTPoints =
fRichPoints->GetEntriesFast();
617 TMatrixFSym covMat(5);
618 for (Int_t iMatrix = 0; iMatrix < 5; iMatrix++) {
619 for (Int_t jMatrix = 0; jMatrix <= iMatrix; jMatrix++) {
620 covMat(iMatrix, jMatrix) = 0;
623 covMat(0, 0) = covMat(1, 1) = covMat(2, 2) = covMat(3, 3) = covMat(4, 4) =
627 Double_t sphereRadius = 300., constantePMT = 0.;
628 vector<Double_t> ptM(3), ptC(3), ptR1(3), momR1(3), normalPMT(3), ptR2Mirr(3),
629 ptR2Center(3), ptPMirr(3), ptPR2(3);
630 vector<Double_t> ptMUnCorr(3), ptCUnCorr(3), ptR2CenterUnCorr(3),
631 ptR2MirrUnCorr(3), ptPMirrUnCorr(3), ptPR2UnCorr(3);
632 Double_t reflectedPtCooVectSphereUnity[] = {0., 0., 0.};
633 TVector3 outPos, outPosUnCorr;
635 Double_t ringCenter[] = {0., 0., 0.}, distToExtrapTrackHit = 0.,
636 distToExtrapTrackHitInPlane = 0.;
638 Int_t mirrTrackID = -1, pmtTrackID = -1, refPlaneTrackID = -1,
639 motherID = -100, pmtMotherID = -100;
643 TGeoMatrix *mirrMatrix, *pmtMatrix, *richMatrix;
653 cout <<
"Calculated normal vector to PMT plane = {" << normalPMT.at(0) <<
", "
654 << normalPMT.at(1) <<
", " << normalPMT.at(2)
655 <<
"} and constante d = " << constantePMT << endl
658 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
661 mirrTrackID = mirrPoint->GetTrackID();
663 if (mirrTrackID <= -1) {
664 cout <<
"Mirror track ID <= 1 !!!" << endl;
665 cout <<
"----------------------------------- End of loop N°" << iMirr + 1
666 <<
" on the mirror points. -----------------------------------"
673 if (motherID == -1) {
675 ptM.at(0) = mirrPoint->GetX(), ptM.at(1) = mirrPoint->GetY(),
676 ptM.at(2) = mirrPoint->GetZ();
677 ptMUnCorr.at(0) = -70.6622238, ptMUnCorr.at(1) = 55.1816025,
678 ptMUnCorr.at(2) = 335.3621216;
680 mirrNode = gGeoManager->FindNode(ptM.at(0), ptM.at(1), ptM.at(2));
682 cout <<
"Mirror node found! Mirror node name = " << mirrNode->GetName()
684 navi = gGeoManager->GetCurrentNavigator();
685 cout <<
"Navigator path: " << navi->GetPath() << endl;
686 cout <<
"Coordinates of sphere center: " << endl;
687 navi->GetCurrentMatrix()->
Print();
693 ptC.at(0) = navi->GetCurrentMatrix()->GetTranslation()[0];
694 ptC.at(1) = navi->GetCurrentMatrix()->GetTranslation()[1];
695 ptC.at(2) = navi->GetCurrentMatrix()->GetTranslation()[2];
697 ptCUnCorr.at(0) = 0., ptCUnCorr.at(1) = 132.594000,
698 ptCUnCorr.at(2) = 54.267226;
699 cout <<
"Coordinates of tile center: " << endl;
700 navi->GetMotherMatrix()->Print();
702 <<
"Sphere center coordinates of the rotated mirror tile = {"
703 << ptC.at(0) <<
", " << ptC.at(1) <<
", " << ptC.at(2)
704 <<
"} and sphere inner radius = " << sphereRadius << endl;
706 for (Int_t iRefl = 0; iRefl < NofRefPlanePoints; iRefl++) {
710 refPlaneTrackID = refPlanePoint->GetTrackID();
712 if (mirrTrackID == refPlaneTrackID) {
714 ptR1.at(0) = refPlanePoint->GetX(),
715 ptR1.at(1) = refPlanePoint->GetY(),
716 ptR1.at(2) = refPlanePoint->GetZ();
717 momR1.at(0) = refPlanePoint->GetPx(),
718 momR1.at(1) = refPlanePoint->GetPy(),
719 momR1.at(2) = refPlanePoint->GetPz();
720 cout <<
"Reflective Plane Point coordinates = {" << ptR1.at(0)
721 <<
", " << ptR1.at(1) <<
", " << ptR1.at(2) <<
"}" << endl;
722 cout <<
"And reflective Plane Point momenta = {" << momR1.at(0)
723 <<
", " << momR1.at(1) <<
", " << momR1.at(2) <<
"}" << endl;
724 cout <<
"Mirror Point coordinates = {" << ptM.at(0) <<
", "
725 << ptM.at(1) <<
", " << ptM.at(2) <<
"}" << endl
727 cout <<
"Mirror Point coordinates (Uncorrected) = {"
728 << ptMUnCorr.at(0) <<
", " << ptMUnCorr.at(1) <<
", "
729 << ptMUnCorr.at(2) <<
"}" << endl
738 ComputeR2(ptR2Center, ptR2Mirr, ptC, ptM, ptR1);
739 ComputeR2(ptR2CenterUnCorr, ptR2MirrUnCorr, ptCUnCorr, ptM, ptR1);
741 ComputeP(ptPMirr, ptPR2, normalPMT, ptM, ptR2Mirr, constantePMT);
749 TVector3 inPos(ptPMirr.at(0), ptPMirr.at(1), ptPMirr.at(2));
751 cout <<
"New mirror points coordinates = {" << outPos.x() <<
", "
752 << outPos.y() <<
", " << outPos.z() <<
"}" << endl;
754 TVector3 inPosUnCorr(
755 ptPMirrUnCorr.at(0), ptPMirrUnCorr.at(1), ptPMirrUnCorr.at(2));
758 cout <<
"New mirror points coordinates = {" << outPosUnCorr.x()
759 <<
", " << outPosUnCorr.y() <<
", " << outPosUnCorr.z() <<
"}"
791 outPos, outPosUnCorr, NofGTracks, normalPMT, constantePMT);
793 cout <<
"Not a mother particle ..." << endl;
795 cout <<
"----------------------------------- "
796 <<
"End of loop N°" << iMirr + 1 <<
" on the mirror points."
797 <<
" -----------------------------------" << endl
804 vector<Double_t>& normalPMT,
805 Double_t& normalCste) {
808 Int_t pmtTrackID, pmtMotherID;
809 Double_t buffNormX = 0., buffNormY = 0., buffNormZ = 0., k = 0.,
811 Double_t pmtPt[] = {0., 0., 0.};
812 Double_t a[] = {0., 0., 0.}, b[] = {0., 0., 0.}, c[] = {0., 0., 0.};
820 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
822 pmtTrackID = pmtPoint->GetTrackID();
825 a[0] = pmtPoint->GetX(), a[1] = pmtPoint->GetY(), a[2] = pmtPoint->GetZ();
829 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
831 pmtTrackID = pmtPoint->GetTrackID();
835 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
836 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
837 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
839 b[0] = pmtPoint->GetX(), b[1] = pmtPoint->GetY(), b[2] = pmtPoint->GetZ();
844 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
846 pmtTrackID = pmtPoint->GetTrackID();
850 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
851 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
852 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
854 && TMath::Sqrt(TMath::Power(b[0] - pmtPoint->GetX(), 2)
855 + TMath::Power(b[1] - pmtPoint->GetY(), 2)
856 + TMath::Power(b[2] - pmtPoint->GetZ(), 2))
858 c[0] = pmtPoint->GetX(), c[1] = pmtPoint->GetY(), c[2] = pmtPoint->GetZ();
864 k = (b[0] - a[0]) / (c[0] - a[0]);
865 if ((b[1] - a[1]) - (k * (c[1] - a[1])) == 0
866 || (b[2] - a[2]) - (k * (c[2] - a[2])) == 0) {
867 cout <<
"Error in normal calculation, vect_AB and vect_AC are collinear."
870 buffNormX = (b[1] - a[1]) * (c[2] - a[2]) - (b[2] - a[2]) * (c[1] - a[1]);
871 buffNormY = (b[2] - a[2]) * (c[0] - a[0]) - (b[0] - a[0]) * (c[2] - a[2]);
872 buffNormZ = (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
875 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
876 + TMath::Power(buffNormZ, 2));
879 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
880 + TMath::Power(buffNormZ, 2));
883 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
884 + TMath::Power(buffNormZ, 2));
888 scalarProd = normalPMT.at(0) * (pmtPoint1->GetX() - a[0])
889 + normalPMT.at(1) * (pmtPoint1->GetY() - a[1])
890 + normalPMT.at(2) * (pmtPoint1->GetZ() - a[2]);
895 * (normalPMT.at(0) * pmtPoint1->GetX() + normalPMT.at(1) * pmtPoint1->GetY()
896 + normalPMT.at(2) * pmtPoint1->GetZ());
898 scalarProd = normalPMT.at(0) * (pmtPoint2->GetX() - a[0])
899 + normalPMT.at(1) * (pmtPoint2->GetY() - a[1])
900 + normalPMT.at(2) * (pmtPoint2->GetZ() - a[2]);
903 scalarProd = normalPMT.at(0) * (pmtPoint3->GetX() - a[0])
904 + normalPMT.at(1) * (pmtPoint3->GetY() - a[1])
905 + normalPMT.at(2) * (pmtPoint3->GetZ() - a[2]);
910 vector<Double_t>& ptC) {
911 const Char_t* topNodePath;
912 topNodePath = gGeoManager->GetTopNode()->GetName();
913 cout <<
"Top node path: " << topNodePath << endl;
915 rootTop = gGeoManager->GetTopVolume();
918 TGeoIterator nextNode(rootTop);
920 const TGeoMatrix* curMatrix;
925 TString filterName0(
"mirror_tile_type0");
926 TString filterName1(
"mirror_tile_type1");
927 TString filterName2(
"mirror_tile_type2");
928 TString filterName3(
"mirror_tile_type3");
929 TString filterName4(
"mirror_tile_type4");
930 TString filterName5(
"mirror_tile_type5");
932 Double_t sphereXTot = 0., sphereYTot = 0., sphereZTot = 0.;
934 while ((curNode = nextNode())) {
935 TString nodeName(curNode->GetName());
940 if (curNode->GetVolume()->GetName() == filterName0
941 || curNode->GetVolume()->GetName() == filterName1
942 || curNode->GetVolume()->GetName() == filterName2
943 || curNode->GetVolume()->GetName() == filterName3
944 || curNode->GetVolume()->GetName() == filterName4
945 || curNode->GetVolume()->GetName() == filterName5) {
946 if (curNode->GetNdaughters() == 0) {
949 nextNode.GetPath(nodePath);
950 curMatrix = nextNode.GetCurrentMatrix();
951 curNodeTranslation = curMatrix->GetTranslation();
952 curNodeRotationM = curMatrix->GetRotationMatrix();
953 printf(
"%s tr:\t", nodePath.Data());
954 printf(
"%08f\t%08f\t%08f\t\n",
955 curNodeTranslation[0],
956 curNodeTranslation[1],
957 curNodeTranslation[2]);
958 if (curNodeTranslation[1]
960 sphereXTot += curNodeTranslation[0];
961 sphereYTot += curNodeTranslation[1];
962 sphereZTot += curNodeTranslation[2];
968 ptC.at(0) = sphereXTot /
counter;
969 ptC.at(1) = sphereYTot /
counter;
970 ptC.at(2) = sphereZTot /
counter;
977 vector<Double_t> ptR1,
978 vector<Double_t> momR1,
979 vector<Double_t> ptC,
980 Double_t sphereRadius) {
981 Double_t a = 0., b = 0., c = 0.,
d = 0., k0 = 0., k1 = 0., k2 = 0.;
983 a = TMath::Power(momR1.at(0), 2) + TMath::Power(momR1.at(1), 2)
984 + TMath::Power(momR1.at(2), 2);
986 * (momR1.at(0) * (ptR1.at(0) - ptC.at(0))
987 + momR1.at(1) * (ptR1.at(1) - ptC.at(1))
988 + momR1.at(2) * (ptR1.at(2) - ptC.at(2)));
989 c = TMath::Power(ptR1.at(0) - ptC.at(0), 2)
990 + TMath::Power(ptR1.at(1) - ptC.at(1), 2)
991 + TMath::Power(ptR1.at(2) - ptC.at(2), 2) - TMath::Power(sphereRadius, 2);
992 d = b * b - 4 * a * c;
993 cout <<
"d = " <<
d << endl;
997 <<
"Error no solution to degree 2 equation found ; discriminant below 0."
999 ptM.at(0) = 0., ptM.at(1) = 0., ptM.at(2) = 0.;
1000 }
else if (
d == 0) {
1001 cout <<
"One solution to degree 2 equation found." << endl;
1003 ptM.at(0) = ptR1.at(0) + k0 * momR1.at(0);
1004 ptM.at(1) = ptR1.at(1) + k0 * momR1.at(1);
1005 ptM.at(2) = ptR1.at(2) + k0 * momR1.at(2);
1007 cout <<
"Two solutions to degree 2 equation found." << endl;
1008 k1 = ((-b - TMath::Sqrt(
d)) / (2 * a));
1009 k2 = ((-b + TMath::Sqrt(
d)) / (2 * a));
1011 if (ptR1.at(2) + k1 * momR1.at(2) > ptR1.at(2) + k2 * momR1.at(2)) {
1012 ptM.at(0) = ptR1.at(0) + k1 * momR1.at(0);
1013 ptM.at(1) = ptR1.at(1) + k1 * momR1.at(1);
1014 ptM.at(2) = ptR1.at(2) + k1 * momR1.at(2);
1015 }
else if (ptR1.at(2) + k1 * momR1.at(2) < ptR1.at(2) + k2 * momR1.at(2)) {
1016 ptM.at(0) = ptR1.at(0) + k2 * momR1.at(0);
1017 ptM.at(1) = ptR1.at(1) + k2 * momR1.at(1);
1018 ptM.at(2) = ptR1.at(2) + k2 * momR1.at(2);
1024 vector<Double_t>& ptR2Mirr,
1025 vector<Double_t> ptM,
1026 vector<Double_t> ptC,
1027 vector<Double_t> ptR1) {
1028 vector<Double_t> normalMirr(3);
1029 Double_t t1 = 0., t2 = 0., t3 = 0.;
1031 normalMirr.at(0) = (ptC.at(0) - ptM.at(0))
1032 / TMath::Sqrt(TMath::Power(ptC.at(0) - ptM.at(0), 2)
1033 + TMath::Power(ptC.at(1) - ptM.at(1), 2)
1034 + TMath::Power(ptC.at(2) - ptM.at(2), 2));
1035 normalMirr.at(1) = (ptC.at(1) - ptM.at(1))
1036 / TMath::Sqrt(TMath::Power(ptC.at(0) - ptM.at(0), 2)
1037 + TMath::Power(ptC.at(1) - ptM.at(1), 2)
1038 + TMath::Power(ptC.at(2) - ptM.at(2), 2));
1039 normalMirr.at(2) = (ptC.at(2) - ptM.at(2))
1040 / TMath::Sqrt(TMath::Power(ptC.at(0) - ptM.at(0), 2)
1041 + TMath::Power(ptC.at(1) - ptM.at(1), 2)
1042 + TMath::Power(ptC.at(2) - ptM.at(2), 2));
1045 t1 = ((ptR1.at(0) - ptM.at(0)) * (ptC.at(0) - ptM.at(0))
1046 + (ptR1.at(1) - ptM.at(1)) * (ptC.at(1) - ptM.at(1))
1047 + (ptR1.at(2) - ptM.at(2)) * (ptC.at(2) - ptM.at(2)))
1048 / (TMath::Power(ptC.at(0) - ptM.at(0), 2)
1049 + TMath::Power(ptC.at(1) - ptM.at(1), 2)
1050 + TMath::Power(ptC.at(2) - ptM.at(2), 2));
1052 2 * (ptM.at(0) + t1 * (ptC.at(0) - ptM.at(0))) - ptR1.at(0);
1054 2 * (ptM.at(1) + t1 * (ptC.at(1) - ptM.at(1))) - ptR1.at(1);
1056 2 * (ptM.at(2) + t1 * (ptC.at(2) - ptM.at(2))) - ptR1.at(2);
1057 t2 = ((ptR1.at(0) - ptC.at(0)) * (ptC.at(0) - ptM.at(0))
1058 + (ptR1.at(1) - ptC.at(1)) * (ptC.at(1) - ptM.at(1))
1059 + (ptR1.at(2) - ptC.at(2)) * (ptC.at(2) - ptM.at(2)))
1060 / (TMath::Power(ptC.at(0) - ptM.at(0), 2)
1061 + TMath::Power(ptC.at(1) - ptM.at(1), 2)
1062 + TMath::Power(ptC.at(2) - ptM.at(2), 2));
1063 ptR2Mirr.at(0) = 2 * (ptC.at(0) + t2 * (ptC.at(0) - ptM.at(0))) - ptR1.at(0);
1064 ptR2Mirr.at(1) = 2 * (ptC.at(1) + t2 * (ptC.at(1) - ptM.at(1))) - ptR1.at(1);
1065 ptR2Mirr.at(2) = 2 * (ptC.at(2) + t2 * (ptC.at(2) - ptM.at(2))) - ptR1.at(2);
1071 cout <<
"Coordinates of point R2 on reflective plane after reflection on the "
1075 cout <<
"* using sphere center C to define \U00000394: {" << ptR2Mirr.at(0)
1076 <<
", " << ptR2Mirr.at(1) <<
", " << ptR2Mirr.at(2) <<
"}" << endl
1083 vector<Double_t>& ptPR2,
1084 vector<Double_t> normalPMT,
1085 vector<Double_t> ptM,
1086 vector<Double_t> ptR2Mirr,
1087 Double_t constantePMT) {
1088 Double_t k1 = 0., k2 = 0., checkCalc1 = 0., checkCalc2 = 0.;
1091 * ((normalPMT.at(0) * ptM.at(0) + normalPMT.at(1) * ptM.at(1)
1092 + normalPMT.at(2) * ptM.at(2) + constantePMT)
1093 / (normalPMT.at(0) * (ptR2Mirr.at(0) - ptM.at(0))
1094 + normalPMT.at(1) * (ptR2Mirr.at(1) - ptM.at(1))
1095 + normalPMT.at(2) * (ptR2Mirr.at(2) - ptM.at(2))));
1096 ptPMirr.at(0) = ptM.at(0) + k1 * (ptR2Mirr.at(0) - ptM.at(0));
1097 ptPMirr.at(1) = ptM.at(1) + k1 * (ptR2Mirr.at(1) - ptM.at(1));
1098 ptPMirr.at(2) = ptM.at(2) + k1 * (ptR2Mirr.at(2) - ptM.at(2));
1100 * ((normalPMT.at(0) * ptR2Mirr.at(0) + normalPMT.at(1) * ptR2Mirr.at(1)
1101 + normalPMT.at(2) * ptR2Mirr.at(2) + constantePMT)
1102 / (normalPMT.at(0) * (ptR2Mirr.at(0) - ptM.at(0))
1103 + normalPMT.at(1) * (ptR2Mirr.at(1) - ptM.at(1))
1104 + normalPMT.at(2) * (ptR2Mirr.at(2) - ptM.at(2))));
1105 ptPR2.at(0) = ptR2Mirr.at(0) + k2 * (ptR2Mirr.at(0) - ptM.at(0));
1106 ptPR2.at(1) = ptR2Mirr.at(1) + k2 * (ptR2Mirr.at(1) - ptM.at(1));
1107 ptPR2.at(2) = ptR2Mirr.at(2) + k2 * (ptR2Mirr.at(2) - ptM.at(2));
1108 cout <<
"Coordinates of point P on PMT plane, after reflection on the mirror "
1109 "tile and extrapolation to the PMT plane:"
1111 cout <<
"* using mirror point M to define \U0001D49F ': {" << ptPMirr.at(0)
1112 <<
", " << ptPMirr.at(1) <<
", " << ptPMirr.at(2) <<
"}" << endl;
1114 checkCalc1 = ptPMirr.at(0) * normalPMT.at(0) + ptPMirr.at(1) * normalPMT.at(1)
1115 + ptPMirr.at(2) * normalPMT.at(2) + constantePMT;
1116 cout <<
"Check whether extrapolated track point on PMT plane verifies its "
1117 "equation (value should be 0.):"
1119 cout <<
"* using mirror point M, checkCalc = " << checkCalc1 << endl;
1120 checkCalc2 = ptPR2.at(0) * normalPMT.at(0) + ptPR2.at(1) * normalPMT.at(1)
1121 + ptPR2.at(2) * normalPMT.at(2) + constantePMT;
1126 TVector3 outPosUnCorr,
1128 vector<Double_t> normalPMT,
1129 Double_t constantePMT) {
1131 Double_t ringCenter[] = {0, 0, 0}, distToExtrapTrackHit = 0,
1132 distToExtrapTrackHitInPlane = 0;
1133 Double_t distToExtrapTrackHitInPlaneUnCorr = 0;
1135 for (Int_t iGlobalTrack = 0; iGlobalTrack < NofGTracks; iGlobalTrack++) {
1138 if (NULL == gTrack)
continue;
1141 if (richInd < 0) {
continue; }
1143 if (NULL == ring) {
continue; }
1144 Int_t ringTrackID = ring->GetTrackID();
1156 * ((normalPMT.at(0) * ringCenter[0]
1157 + normalPMT.at(1) * ringCenter[1] + constantePMT)
1160 vector<Double_t> r(3),
1162 r.at(0) = TMath::Abs(ringCenter[0]), r.at(1) = TMath::Abs(ringCenter[1]),
1163 r.at(2) = TMath::Abs(ringCenter[2]);
1164 p.at(0) = TMath::Abs(outPos.x()), p.at(1) = TMath::Abs(outPos.y()),
1165 p.at(2) = TMath::Abs(outPos.z());
1166 cout <<
"Ring center coordinates = {" << ringCenter[0] <<
", "
1167 << ringCenter[1] <<
", " << ringCenter[2] <<
"}" << endl;
1168 cout <<
"Difference in X = " << TMath::Abs(r.at(0) - p.at(0)) <<
"\t ; \t"
1169 <<
"Difference in Y = " << TMath::Abs(r.at(1) - p.at(1)) <<
"\t ; \t"
1170 <<
"Difference in Z = " << TMath::Abs(r.at(2) - p.at(2)) << endl;
1171 fHM->
H1(
"fhDifferenceX")->Fill(TMath::Abs(r.at(0) - p.at(0)));
1172 fHM->
H1(
"fhDifferenceY")->Fill(TMath::Abs(r.at(1) - p.at(1)));
1173 distToExtrapTrackHit = TMath::Sqrt(TMath::Power(r.at(0) - p.at(0), 2)
1174 + TMath::Power(r.at(1) - p.at(1), 2)
1175 + TMath::Power(r.at(2) - p.at(2), 2));
1176 distToExtrapTrackHitInPlane = TMath::Sqrt(
1177 TMath::Power(r.at(0) - p.at(0), 2) + TMath::Power(r.at(1) - p.at(1), 2));
1178 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack")->Fill(distToExtrapTrackHit);
1179 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane")
1180 ->Fill(distToExtrapTrackHitInPlane);
1181 cout <<
"Distance between fitted ring center and extrapolated track hit = "
1182 << distToExtrapTrackHit << endl;
1183 cout <<
"Distance between fitted ring center and extrapolated track hit in "
1185 << distToExtrapTrackHitInPlane << endl;
1187 vector<Double_t> pUnCorr(
1189 pUnCorr.at(0) = TMath::Abs(outPosUnCorr.x()),
1190 pUnCorr.at(1) = TMath::Abs(outPosUnCorr.y()),
1191 pUnCorr.at(2) = TMath::Abs(outPosUnCorr.z());
1193 cout <<
"Difference in X = " << TMath::Abs(r.at(0) - pUnCorr.at(0))
1195 <<
"Difference in Y = " << TMath::Abs(r.at(1) - pUnCorr.at(1))
1197 <<
"Difference in Z = " << TMath::Abs(r.at(2) - pUnCorr.at(2)) << endl;
1198 fHM->
H1(
"fhDifferenceXUncorrected")
1199 ->Fill(TMath::Abs(r.at(0) - pUnCorr.at(0)));
1200 fHM->
H1(
"fhDifferenceYUncorrected")
1201 ->Fill(TMath::Abs(r.at(1) - pUnCorr.at(1)));
1202 distToExtrapTrackHitInPlaneUnCorr =
1203 TMath::Sqrt(TMath::Power(r.at(0) - pUnCorr.at(0), 2)
1204 + TMath::Power(r.at(1) - pUnCorr.at(1), 2));
1205 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlaneUncorrected")
1206 ->Fill(distToExtrapTrackHitInPlaneUnCorr);
1207 cout <<
"Distance between fitted ring center and extrapolated track hit in "
1209 << distToExtrapTrackHitInPlaneUnCorr << endl
1214 cout <<
"End of loop on global tracks;" << endl;
1222 for (Int_t
i = 0;
i < nofHits;
i++) {
1223 Int_t hitInd = ring1->
GetHit(
i);
1225 if (NULL == hit)
continue;
1226 TVector3 inputHit(hit->
GetX(), hit->
GetY(), hit->
GetZ());
1227 TVector3 outputHit(0, 0, 0);
1274 c3->SetFillColor(42);
1276 gPad->SetTopMargin(0.1);
1277 gPad->SetFillColor(33);
1280 TH2D* CloneArr = (TH2D*)
fHM2->
H2(
"fHCherenkovHitsDistribReduced")->Clone();
1281 CloneArr->GetXaxis()->SetLabelSize(0.03);
1282 CloneArr->GetXaxis()->SetTitleSize(0.03);
1283 CloneArr->GetXaxis()->CenterTitle();
1284 CloneArr->GetXaxis()->SetNdivisions(612, kTRUE);
1285 CloneArr->GetYaxis()->SetLabelSize(0.03);
1286 CloneArr->GetYaxis()->SetTitleSize(0.03);
1287 CloneArr->GetYaxis()->SetNdivisions(612, kTRUE);
1288 CloneArr->GetYaxis()->CenterTitle();
1290 CloneArr->GetZaxis()->SetLabelSize(0.03);
1291 CloneArr->GetZaxis()->SetTitleSize(0.03);
1292 CloneArr->GetYaxis()->SetTitleOffset(1.0);
1293 CloneArr->Draw(
"colz");
1300 TH2D* CloneArr_2 = (TH2D*)
fHM2->
H2(
"fHCherenkovHitsDistribReduced")->Clone();
1301 for (Int_t y_bin = 1; y_bin <= 500; y_bin++) {
1302 for (Int_t x_bin = 1; x_bin <= 200; x_bin++) {
1308 if (CloneArr_2->GetBinContent(x_bin, y_bin) < thresh) {
1309 CloneArr_2->SetBinContent(x_bin, y_bin, 0);
1314 CloneArr_2->GetXaxis()->SetLabelSize(0.03);
1315 CloneArr_2->GetXaxis()->SetTitleSize(0.03);
1316 CloneArr_2->GetXaxis()->CenterTitle();
1317 CloneArr_2->GetXaxis()->SetNdivisions(612, kTRUE);
1318 CloneArr_2->GetYaxis()->SetLabelSize(0.03);
1319 CloneArr_2->GetYaxis()->SetTitleSize(0.03);
1320 CloneArr_2->GetYaxis()->SetNdivisions(612, kTRUE);
1321 CloneArr_2->GetYaxis()->CenterTitle();
1323 CloneArr_2->GetZaxis()->SetLabelSize(0.03);
1324 CloneArr_2->GetZaxis()->SetTitleSize(0.03);
1325 CloneArr_2->GetYaxis()->SetTitleOffset(1.0);
1326 CloneArr_2->Draw(
"colz");
1327 CloneArr_2->Write();
1330 CloneArr_2->FitSlicesY(0, 0, -1, 1);
1332 TH1D* histo_0 = (TH1D*) gDirectory->Get(
"fHCherenkovHitsDistribReduced_0");
1335 TH1D* histo_1 = (TH1D*) gDirectory->Get(
"fHCherenkovHitsDistribReduced_1");
1339 TH1D* histo_2 = (TH1D*) gDirectory->Get(
"fHCherenkovHitsDistribReduced_2");
1343 (TH1D*) gDirectory->Get(
"fHCherenkovHitsDistribReduced_chi2");
1347 TF1* f1 =
new TF1(
"f1",
"[2]+[0]*cos(x)+[1]*sin(x)", -3.5, 3.5);
1348 f1->SetParameters(0, 0, 0);
1349 f1->SetParNames(
"Delta_phi",
"Delta_lambda",
"Offset");
1350 histo_1->Fit(
"f1",
"",
"");
1351 TF1* fit = histo_1->GetFunction(
"f1");
1352 Double_t p1 = fit->GetParameter(
"Delta_phi");
1353 Double_t p2 = fit->GetParameter(
"Delta_lambda");
1354 Double_t p3 = fit->GetParameter(
"Offset");
1355 Double_t chi2 = fit->GetChisquare();
1366 f1->SetParameters(fit->GetParameter(0), fit->GetParameter(1));
1368 f1->SetLineColor(2);
1373 Double_t Focal_length = 150., q = 0., A = 0., Alpha = 0., mis_x = 0.,
1375 q = TMath::ATan(fit->GetParameter(0) / fit->GetParameter(1));
1377 <<
"fit_1 = " << fit->GetParameter(0)
1378 <<
" and fit_2 = " << fit->GetParameter(1) << endl;
1380 A = fit->GetParameter(1) / TMath::Cos(q);
1383 TMath::ATan(A / 1.5) * 0.5
1388 mis_x = TMath::ATan(fit->GetParameter(0) / Focal_length) * 0.5
1389 * TMath::Power(10, 3);
1390 mis_y = TMath::ATan(fit->GetParameter(1) / Focal_length) * 0.5
1391 * TMath::Power(10, 3);
1394 TLegend* LEG =
new TLegend(0.30, 0.7, 0.72, 0.85);
1395 LEG->SetBorderSize(1);
1396 LEG->SetFillColor(0);
1397 LEG->SetMargin(0.2);
1398 LEG->SetTextSize(0.03);
1399 sprintf(leg,
"Fitted sinusoid");
1400 LEG->AddEntry(f1, leg,
"l");
1401 sprintf(leg,
"Misalign in X = %f", mis_x);
1402 LEG->AddEntry(
"", leg,
"l");
1403 sprintf(leg,
"Misalign in Y = %f", mis_y);
1404 LEG->AddEntry(
"", leg,
"l");
1405 sprintf(leg,
"Offset = %f", fit->GetParameter(2));
1406 LEG->AddEntry(
"", leg,
"l");
1412 CloneArr_2->Draw(
"colz");
1414 TLegend* LEG1 =
new TLegend(0.30, 0.7, 0.72, 0.85);
1415 LEG1->SetBorderSize(1);
1416 LEG1->SetFillColor(0);
1417 LEG1->SetMargin(0.2);
1418 LEG1->SetTextSize(0.03);
1419 sprintf(leg,
"Fitted sinusoid");
1420 LEG1->AddEntry(f1, leg,
"l");
1421 sprintf(leg,
"Misalign in X = %f", mis_x);
1422 LEG1->AddEntry(
"", leg,
"l");
1423 sprintf(leg,
"Misalign in Y = %f", mis_y);
1424 LEG1->AddEntry(
"", leg,
"l");
1425 sprintf(leg,
"Offset = %f", fit->GetParameter(2));
1426 LEG1->AddEntry(
"", leg,
"l");
1466 outputFit.at(0) = mis_x;
1467 outputFit.at(1) = mis_y;
1471 TCanvas* can =
new TCanvas(
1502 TCanvas* can2 =
new TCanvas(
fRunTitle +
"_Separated_Ellipse",
1550 DrawH1(
fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane"));
1564 DrawH1(
fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlaneUncorrected"));
1565 can4->SaveAs(
"Uncorrected_Histograms_" +
fAxisRotTitle +
".png");
1570 TFile* file =
new TFile(fileName,
"READ");
1583 vector<Double_t> outputFit(2);
1585 cout << setprecision(6) << endl;
1586 cout <<
"Horizontal displacement = " << outputFit[0]
1587 <<
" [mrad] and vertical displacement = " << outputFit[1] <<
" [mrad]."
1602 "fHCherenkovHitsDistribReduced",
1603 "fHCherenkovHitsDistribReduced;Phi_Ch [rad];Th_Ch-Th_0 [cm];Entries",
1616 fHM->
H1(
"fhDifferenceX")->Write();
1617 fHM->
H1(
"fhDifferenceY")->Write();
1618 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack")->Write();
1619 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane")->Write();
1620 fHM->
H1(
"fhDifferenceXUncorrected")->Write();
1621 fHM->
H1(
"fhDifferenceYUncorrected")->Write();
1622 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlaneUncorrected")->Write();