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"
48 #include <boost/assign/list_of.hpp>
49 using boost::assign::list_of;
57 , fRichProjections(NULL)
58 , fRichMirrorPoints(NULL)
61 , fRichRingMatches(NULL)
62 , fRichRefPlanePoints(NULL)
74 , fDrawProjection(kTRUE)
75 , fIsMeanCenter(kFALSE)
76 , fIsReconstruction(kFALSE)
84 FairRootManager* manager = FairRootManager::Instance();
86 fRichHits = (TClonesArray*) manager->GetObject(
"RichHit");
88 Fatal(
"CbmRichCorrection::Init",
"No RichHit array !");
91 fRichRings = (TClonesArray*) manager->GetObject(
"RichRing");
93 Fatal(
"CbmRichCorrection::Init",
"No RichRing array !");
98 Fatal(
"CbmRichCorrection::Init",
"No RichProjection array !");
103 Fatal(
"CbmRichCorrection::Init",
"No RichMirrorPoints array !");
106 fRichMCPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
108 Fatal(
"CbmRichCorrection::Init",
"No RichMCPoints array !");
111 fMCTracks = (TClonesArray*) manager->GetObject(
"MCTrack");
113 Fatal(
"CbmRichCorrection::Init",
"No MCTracks array !");
118 Fatal(
"CbmRichCorrection::Init",
"No RichRingMatches array !");
123 Fatal(
"CbmRichCorrection::Init",
"No RichRefPlanePoint array !");
126 fRichPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
128 Fatal(
"CbmRichCorrection::Init",
"No RichPoint array !");
131 fGlobalTracks = (TClonesArray*) manager->GetObject(
"GlobalTrack");
133 Fatal(
"CbmRichCorrection::Init",
"No GlobalTrack array!");
152 Double_t upperScaleLimit = 3.5, bin = 400.;
154 fHM->
Create1<TH1D>(
"fhDistanceCenterToExtrapolatedTrack",
155 "fhDistanceCenterToExtrapolatedTrack;Distance fitted "
156 "center to extrapolated track;Number of entries",
161 "fhDistanceCorrected;Distance a [cm];A.U.",
167 "fhDifferenceX;Difference in X (fitted center - extrapolated track);A.U.",
173 "fhDifferenceY;Difference in Y (fitted center - extrapolated track);A.U.",
179 "fhDistanceUncorrected;Distance a [cm];A.U.",
184 "fhDifferenceXUncorrected",
185 "fhDifferenceXUncorrected;Difference in X uncorrected [cm];A.U.",
190 "fhDifferenceYUncorrected",
191 "fhDifferenceYUncorrected;Difference in Y uncorrected [cm];A.U.",
197 "fhDistanceIdeal;Distance a [cm];A.U.",
202 "fhDifferenceXIdeal;Difference in X ideal [cm];A.U.",
207 "fhDifferenceYIdeal;Difference in Y ideal [cm];A.U.",
213 "fHistoDiffX;Histogram difference between corrected and "
214 "ideal X positions;A.U.",
219 "fHistoDiffY;Histogram difference between corrected and "
220 "ideal Y positions;A.U.",
226 "fHistoBoA;Histogram B axis over A axis;A.U.",
235 "--------------------------------------------------------------------"
236 "------------------------------------------//"
238 cout <<
"//---------------------------------------- CbmRichCorrection - EXEC "
239 "Function ----------------------------------------//"
242 "--------------------------------------------------------------------"
243 "--------------------------------------------------//"
247 cout <<
"CbmRichCorrection : Event #" <<
fEventNum << endl;
249 Int_t nofRingsInEvent =
fRichRings->GetEntries();
251 Int_t nofHitsInEvent =
fRichHits->GetEntries();
253 Int_t NofMCTracks =
fMCTracks->GetEntriesFast();
254 cout <<
"Nb of rings in evt = " << nofRingsInEvent
255 <<
", nb of mirror points = " << nofMirrorPoints
256 <<
", nb of hits in evt = " << nofHitsInEvent
257 <<
", nb of Monte-Carlo points = " << NofMCPoints
258 <<
" and nb of Monte-Carlo tracks = " << NofMCTracks << endl
261 TClonesArray* projectedPoint;
263 if (nofRingsInEvent == 0) {
264 cout <<
"Error no rings registered in event." << endl << endl;
271 cout <<
"//------------------------------ CbmRichCorrection: Projection "
272 "Producer ------------------------------//"
277 Int_t NofRingsInEvent =
fRichRings->GetEntries();
280 Int_t NofPMTPoints =
fRichPoints->GetEntriesFast();
283 Double_t sphereRadius = 300., constantePMT = 0.;
284 vector<Double_t> ptM(3), ptMNew(3), ptC(3), ptCNew(3), ptR1(3), momR1(3),
285 normalPMT(3), ptR2Mirr(3), ptR2Center(3), ptPMirr(3), ptPR2(3),
287 vector<Double_t> ptCIdeal(3), ptR2CenterUnCorr(3), ptR2CenterIdeal(3),
288 ptR2MirrUnCorr(3), ptR2MirrIdeal(3), ptPMirrUnCorr(3), ptPMirrIdeal(3),
289 ptPR2UnCorr(3), ptPR2Ideal(3);
290 Double_t reflectedPtCooVectSphereUnity[] = {0., 0., 0.};
291 TVector3 outPos, outPosUnCorr, outPosIdeal;
293 Double_t ringCenter[] = {0., 0., 0.}, distToExtrapTrackHit = 0.,
294 distToExtrapTrackHitInPlane = 0.;
296 Int_t mirrTrackID = -1, pmtTrackID = -1, refPlaneTrackID = -1,
297 motherID = -100, pmtMotherID = -100;
301 TGeoMatrix *mirrMatrix, *pmtMatrix, *richMatrix;
310 cout <<
"Calculated normal vector to PMT plane = {" << normalPMT.at(0) <<
", "
311 << normalPMT.at(1) <<
", " << normalPMT.at(2)
312 <<
"} and constante d = " << constantePMT << endl
315 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
318 mirrTrackID = mirrPoint->GetTrackID();
320 if (mirrTrackID <= -1) {
321 cout <<
"Mirror track ID <= 1 !!!" << endl;
322 cout <<
"----------------------------------- End of loop N°" << iMirr + 1
323 <<
" on the mirror points. -----------------------------------"
330 if (motherID == -1) {
332 ptM.at(0) = mirrPoint->GetX(), ptM.at(1) = mirrPoint->GetY(),
333 ptM.at(2) = mirrPoint->GetZ();
335 mirrNode = gGeoManager->FindNode(ptM.at(0), ptM.at(1), ptM.at(2));
338 navi = gGeoManager->GetCurrentNavigator();
339 cout <<
"Navigator path: " << navi->GetPath() << endl;
340 cout <<
"Coordinates of sphere center: " << endl;
341 navi->GetCurrentMatrix()->
Print();
347 ptCIdeal.at(0) = navi->GetCurrentMatrix()->GetTranslation()[0];
348 ptCIdeal.at(1) = navi->GetCurrentMatrix()->GetTranslation()[1];
349 ptCIdeal.at(2) = navi->GetCurrentMatrix()->GetTranslation()[2];
351 cout <<
"Coordinates of tile center: " << endl;
352 navi->GetMotherMatrix()->Print();
353 ptC.at(0) = 0., ptC.at(1) = 132.594000, ptC.at(2) = 54.267226;
355 <<
"Sphere center coordinates of the aligned mirror tile, ideal = {"
356 << ptCIdeal.at(0) <<
", " << ptCIdeal.at(1) <<
", " << ptCIdeal.at(2)
358 cout <<
"Sphere center coordinates of the rotated mirror tile, w/ "
360 << ptC.at(0) <<
", " << ptC.at(1) <<
", " << ptC.at(2)
361 <<
"} and sphere inner radius = " << sphereRadius << endl
365 for (Int_t iRefl = 0; iRefl < NofRefPlanePoints; iRefl++) {
369 refPlaneTrackID = refPlanePoint->GetTrackID();
371 if (mirrTrackID == refPlaneTrackID) {
373 ptR1.at(0) = refPlanePoint->GetX(),
374 ptR1.at(1) = refPlanePoint->GetY(),
375 ptR1.at(2) = refPlanePoint->GetZ();
376 momR1.at(0) = refPlanePoint->GetPx(),
377 momR1.at(1) = refPlanePoint->GetPy(),
378 momR1.at(2) = refPlanePoint->GetPz();
379 cout <<
"Reflective Plane Point coordinates = {" << ptR1.at(0)
380 <<
", " << ptR1.at(1) <<
", " << ptR1.at(2) <<
"}" << endl;
381 cout <<
"And reflective Plane Point momenta = {" << momR1.at(0)
382 <<
", " << momR1.at(1) <<
", " << momR1.at(2) <<
"}" << endl;
383 cout <<
"Mirror Point coordinates = {" << ptM.at(0) <<
", "
384 << ptM.at(1) <<
", " << ptM.at(2) <<
"}" << endl;
400 ComputeR2(ptR2Center, ptR2Mirr, ptM, ptC, ptR1, navi,
"Corrected");
415 ComputeP(ptPMirr, ptPR2, normalPMT, ptM, ptR2Mirr, constantePMT);
423 TVector3 inPosUnCorr(
424 ptPMirrUnCorr.at(0), ptPMirrUnCorr.at(1), ptPMirrUnCorr.at(2));
428 <<
"New mirror points coordinates = {" << outPosUnCorr.x()
429 <<
", " << outPosUnCorr.y() <<
", " << outPosUnCorr.z() <<
"}"
431 TVector3 inPos(ptPMirr.at(0), ptPMirr.at(1), ptPMirr.at(2));
433 cout <<
"New mirror points coordinates = {" << outPos.x() <<
", "
434 << outPos.y() <<
", " << outPos.z() <<
"}" << endl;
436 ptPMirrIdeal.at(0), ptPMirrIdeal.at(1), ptPMirrIdeal.at(2));
439 cout <<
"New mirror points coordinates = {" << outPosIdeal.x()
440 <<
", " << outPosIdeal.y() <<
", " << outPosIdeal.z() <<
"}"
478 cout <<
"Not a mother particle ..." << endl;
480 cout <<
"----------------------------------- "
481 <<
"End of loop N°" << iMirr + 1 <<
" on the mirror points."
482 <<
" -----------------------------------" << endl
489 vector<Double_t>& normalPMT,
490 Double_t& normalCste) {
493 Int_t pmtTrackID, pmtMotherID;
494 Double_t buffNormX = 0., buffNormY = 0., buffNormZ = 0., k = 0.,
496 Double_t pmtPt[] = {0., 0., 0.};
497 Double_t a[] = {0., 0., 0.}, b[] = {0., 0., 0.}, c[] = {0., 0., 0.};
505 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
507 pmtTrackID = pmtPoint->GetTrackID();
510 a[0] = pmtPoint->GetX(), a[1] = pmtPoint->GetY(), a[2] = pmtPoint->GetZ();
514 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
516 pmtTrackID = pmtPoint->GetTrackID();
520 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
521 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
522 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
524 b[0] = pmtPoint->GetX(), b[1] = pmtPoint->GetY(), b[2] = pmtPoint->GetZ();
529 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
531 pmtTrackID = pmtPoint->GetTrackID();
535 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
536 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
537 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
539 && TMath::Sqrt(TMath::Power(b[0] - pmtPoint->GetX(), 2)
540 + TMath::Power(b[1] - pmtPoint->GetY(), 2)
541 + TMath::Power(b[2] - pmtPoint->GetZ(), 2))
543 c[0] = pmtPoint->GetX(), c[1] = pmtPoint->GetY(), c[2] = pmtPoint->GetZ();
549 k = (b[0] - a[0]) / (c[0] - a[0]);
550 if ((b[1] - a[1]) - (k * (c[1] - a[1])) == 0
551 || (b[2] - a[2]) - (k * (c[2] - a[2])) == 0) {
552 cout <<
"Error in normal calculation, vect_AB and vect_AC are collinear."
555 buffNormX = (b[1] - a[1]) * (c[2] - a[2]) - (b[2] - a[2]) * (c[1] - a[1]);
556 buffNormY = (b[2] - a[2]) * (c[0] - a[0]) - (b[0] - a[0]) * (c[2] - a[2]);
557 buffNormZ = (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
560 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
561 + TMath::Power(buffNormZ, 2));
564 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
565 + TMath::Power(buffNormZ, 2));
568 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
569 + TMath::Power(buffNormZ, 2));
573 scalarProd = normalPMT.at(0) * (pmtPoint1->GetX() - a[0])
574 + normalPMT.at(1) * (pmtPoint1->GetY() - a[1])
575 + normalPMT.at(2) * (pmtPoint1->GetZ() - a[2]);
580 * (normalPMT.at(0) * pmtPoint1->GetX() + normalPMT.at(1) * pmtPoint1->GetY()
581 + normalPMT.at(2) * pmtPoint1->GetZ());
583 scalarProd = normalPMT.at(0) * (pmtPoint2->GetX() - a[0])
584 + normalPMT.at(1) * (pmtPoint2->GetY() - a[1])
585 + normalPMT.at(2) * (pmtPoint2->GetZ() - a[2]);
588 scalarProd = normalPMT.at(0) * (pmtPoint3->GetX() - a[0])
589 + normalPMT.at(1) * (pmtPoint3->GetY() - a[1])
590 + normalPMT.at(2) * (pmtPoint3->GetZ() - a[2]);
595 vector<Double_t>& ptC) {
596 const Char_t* topNodePath;
597 topNodePath = gGeoManager->GetTopNode()->GetName();
598 cout <<
"Top node path: " << topNodePath << endl;
600 rootTop = gGeoManager->GetTopVolume();
603 TGeoIterator nextNode(rootTop);
605 const TGeoMatrix* curMatrix;
610 TString filterName0(
"mirror_tile_type0");
611 TString filterName1(
"mirror_tile_type1");
612 TString filterName2(
"mirror_tile_type2");
613 TString filterName3(
"mirror_tile_type3");
614 TString filterName4(
"mirror_tile_type4");
615 TString filterName5(
"mirror_tile_type5");
617 Double_t sphereXTot = 0., sphereYTot = 0., sphereZTot = 0.;
619 while ((curNode = nextNode())) {
620 TString nodeName(curNode->GetName());
625 if (curNode->GetVolume()->GetName() == filterName0
626 || curNode->GetVolume()->GetName() == filterName1
627 || curNode->GetVolume()->GetName() == filterName2
628 || curNode->GetVolume()->GetName() == filterName3
629 || curNode->GetVolume()->GetName() == filterName4
630 || curNode->GetVolume()->GetName() == filterName5) {
631 if (curNode->GetNdaughters() == 0) {
634 nextNode.GetPath(nodePath);
635 curMatrix = nextNode.GetCurrentMatrix();
636 curNodeTranslation = curMatrix->GetTranslation();
637 curNodeRotationM = curMatrix->GetRotationMatrix();
638 printf(
"%s tr:\t", nodePath.Data());
639 printf(
"%08f\t%08f\t%08f\t\n",
640 curNodeTranslation[0],
641 curNodeTranslation[1],
642 curNodeTranslation[2]);
643 if (curNodeTranslation[1]
645 sphereXTot += curNodeTranslation[0];
646 sphereYTot += curNodeTranslation[1];
647 sphereZTot += curNodeTranslation[2];
653 ptC.at(0) = sphereXTot /
counter;
654 ptC.at(1) = sphereYTot /
counter;
655 ptC.at(2) = sphereZTot /
counter;
662 vector<Double_t> ptR1,
663 vector<Double_t> momR1,
664 vector<Double_t> ptC,
665 Double_t sphereRadius) {
666 Double_t a = 0., b = 0., c = 0.,
d = 0., k0 = 0., k1 = 0., k2 = 0.;
668 a = TMath::Power(momR1.at(0), 2) + TMath::Power(momR1.at(1), 2)
669 + TMath::Power(momR1.at(2), 2);
671 * (momR1.at(0) * (ptR1.at(0) - ptC.at(0))
672 + momR1.at(1) * (ptR1.at(1) - ptC.at(1))
673 + momR1.at(2) * (ptR1.at(2) - ptC.at(2)));
674 c = TMath::Power(ptR1.at(0) - ptC.at(0), 2)
675 + TMath::Power(ptR1.at(1) - ptC.at(1), 2)
676 + TMath::Power(ptR1.at(2) - ptC.at(2), 2) - TMath::Power(sphereRadius, 2);
677 d = b * b - 4 * a * c;
678 cout <<
"d = " <<
d << endl;
682 <<
"Error no solution to degree 2 equation found ; discriminant below 0."
684 ptM.at(0) = 0., ptM.at(1) = 0., ptM.at(2) = 0.;
686 cout <<
"One solution to degree 2 equation found." << endl;
688 ptM.at(0) = ptR1.at(0) + k0 * momR1.at(0);
689 ptM.at(1) = ptR1.at(1) + k0 * momR1.at(1);
690 ptM.at(2) = ptR1.at(2) + k0 * momR1.at(2);
692 cout <<
"Two solutions to degree 2 equation found." << endl;
693 k1 = ((-b - TMath::Sqrt(
d)) / (2 * a));
694 k2 = ((-b + TMath::Sqrt(
d)) / (2 * a));
696 if (ptR1.at(2) + k1 * momR1.at(2) > ptR1.at(2) + k2 * momR1.at(2)) {
697 ptM.at(0) = ptR1.at(0) + k1 * momR1.at(0);
698 ptM.at(1) = ptR1.at(1) + k1 * momR1.at(1);
699 ptM.at(2) = ptR1.at(2) + k1 * momR1.at(2);
700 }
else if (ptR1.at(2) + k1 * momR1.at(2) < ptR1.at(2) + k2 * momR1.at(2)) {
701 ptM.at(0) = ptR1.at(0) + k2 * momR1.at(0);
702 ptM.at(1) = ptR1.at(1) + k2 * momR1.at(1);
703 ptM.at(2) = ptR1.at(2) + k2 * momR1.at(2);
709 vector<Double_t> ptC,
710 TGeoNavigator* navi) {
711 vector<Double_t> ptCNew(3), ptCNew2(3), ptCNew3(3);
712 Double_t cosPhi = 0., sinPhi = 0., cosTheta = 0., sinTheta = 0., phi2 = 0.,
714 Double_t diff[3], transfoMat[3][3], invMat[3][3], corrMat[3][3], buff1[3][3],
715 buff2[3][3], buff3[3][3], buff4[3][3], buff5[3][3], RotX[3][3], RotY[3][3];
716 Double_t corrMat2[3][3], RotX2[3][3], RotY2[3][3];
726 vector<Double_t> outputFit(4);
728 corr_file.open(
"correction_param.txt");
729 if (corr_file.is_open()) {
730 for (Int_t
i = 0;
i < 4;
i++) {
731 corr_file >> outputFit.at(
i);
735 cout <<
"Error in CbmRichCorrection: unable to open parameter file!" << endl
739 cout <<
"Misalignment parameters read from file = [" << outputFit.at(0)
740 <<
" ; " << outputFit.at(1) <<
" ; " << outputFit.at(2) <<
" ; "
741 << outputFit.at(3) <<
"]" << endl;
744 for (Int_t
i = 0;
i < 3;
i++) {
745 for (Int_t j = 0; j < 3; j++) {
764 cosPhi = TMath::Cos(outputFit.at(0));
765 sinPhi = TMath::Sin(outputFit.at(0));
766 cosTheta = TMath::Cos(outputFit.at(1));
767 sinTheta = TMath::Sin(outputFit.at(1));
779 RotX[1][2] = -1 * sinPhi;
787 RotY[0][0] = cosTheta;
789 RotY[0][2] = sinTheta;
793 RotY[2][0] = -1 * sinTheta;
795 RotY[2][2] = cosTheta;
798 for (Int_t
i = 0;
i < 3;
i++) {
799 diff[
i] = ptC.at(
i) - ptM.at(
i);
803 for (Int_t
i = 0;
i < 3;
i++) {
804 for (Int_t j = 0; j < 3; j++) {
806 for (Int_t k = 0; k < 3; k++) {
807 corrMat[
i][j] = RotY[
i][k] * RotX[k][j] + corrMat[
i][j];
812 for (Int_t
i = 0;
i < 3;
i++) {
813 for (Int_t j = 0; j < 3; j++) {
814 for (Int_t k = 0; k < 3; k++) {
815 buff1[
i][j] = corrMat[
i][k] * invMat[k][j] + buff1[
i][j];
819 for (Int_t
i = 0;
i < 3;
i++) {
820 for (Int_t j = 0; j < 3; j++) {
821 for (Int_t k = 0; k < 3; k++) {
822 buff2[
i][j] = transfoMat[
i][k] * buff1[k][j] + buff2[
i][j];
826 for (Int_t
i = 0;
i < 3;
i++) {
827 for (Int_t j = 0; j < 3; j++) {
828 ptCNew.at(
i) = buff2[
i][j] * diff[j] + ptCNew.at(
i);
834 phi2 = TMath::ATan2(diff[1], -1 * diff[2]);
835 theta2 = TMath::ATan2(diff[0], -1 * diff[2]);
836 cout <<
"Calculated Phi (= arctan(y/-z)), in degrees: "
837 << TMath::RadToDeg() * phi2
838 <<
" and calculated Theta (= arctan(x/-z)), in degrees: "
839 << TMath::RadToDeg() * theta2 << endl;
846 RotX2[1][1] = TMath::Cos(phi2);
847 RotX2[1][2] = TMath::Sin(phi2);
849 RotX2[2][1] = -1 * TMath::Sin(phi2);
850 RotX2[2][2] = TMath::Cos(phi2);
852 RotY2[0][0] = TMath::Cos(theta2);
854 RotY2[0][2] = TMath::Sin(theta2);
858 RotY2[2][0] = -1 * TMath::Sin(theta2);
860 RotY2[2][2] = TMath::Cos(theta2);
863 for (Int_t
i = 0;
i < 3;
i++) {
864 for (Int_t j = 0; j < 3; j++) {
865 for (Int_t k = 0; k < 3; k++) {
866 corrMat2[
i][j] = RotY2[
i][k] * RotX2[k][j] + corrMat2[
i][j];
871 for (Int_t
i = 0;
i < 3;
i++) {
872 for (Int_t j = 0; j < 3; j++) {
873 for (Int_t k = 0; k < 3; k++) {
874 buff3[
i][j] = corrMat2[
i][k] * invMat[k][j] + buff3[
i][j];
878 for (Int_t
i = 0;
i < 3;
i++) {
879 for (Int_t j = 0; j < 3; j++) {
880 for (Int_t k = 0; k < 3; k++) {
881 buff4[
i][j] = transfoMat[
i][k] * buff3[k][j] + buff4[
i][j];
885 for (Int_t
i = 0;
i < 3;
i++) {
886 for (Int_t j = 0; j < 3; j++) {
887 for (Int_t k = 0; k < 3; k++) {
888 buff5[
i][j] = RotX[
i][k] * invMat[k][j] + buff5[
i][j];
893 for (Int_t
i = 0;
i < 3;
i++) {
894 for (Int_t j = 0; j < 3; j++) {
895 ptCNew2.at(
i) = buff4[
i][j] * diff[j] + ptCNew2.at(
i);
897 ptCNew3.at(
i) = buff5[
i][j] * diff[j] + ptCNew3.at(
i);
901 for (Int_t
i = 0;
i < 3;
i++) {
902 ptCNew.at(
i) += ptM.at(
i);
903 ptCNew2.at(
i) += ptM.at(
i);
904 ptCNew3.at(
i) += ptM.at(
i);
906 cout <<
"diff = {" << diff[0] <<
", " << diff[1] <<
", " << diff[2] <<
"}"
908 cout <<
"New coordinates of the rotated tile sphere center (using angles "
909 "from text file) = {"
910 << ptCNew.at(0) <<
", " << ptCNew.at(1) <<
", " << ptCNew.at(2) <<
"}"
912 cout <<
"New coordinates of the rotated tile sphere center (using calculated "
914 << ptCNew2.at(0) <<
", " << ptCNew2.at(1) <<
", " << ptCNew2.at(2) <<
"}"
916 cout <<
"Tile coordinates after translation, invMat and rotations around X "
918 << ptCNew3.at(0) <<
", " << ptCNew3.at(1) <<
", " << ptCNew3.at(2) <<
"}"
926 Double_t invMat[3][3],
927 TGeoNavigator* navi) {
928 Double_t deter = 0., det11 = 0., det12 = 0., det13 = 0., det21 = 0.,
929 det22 = 0., det23 = 0., det31 = 0., det32 = 0., det33 = 0.,
930 buff[3][3], prodMat[3][3];
934 mat[0][0] = navi->GetMotherMatrix()->GetRotationMatrix()[0];
935 mat[0][1] = navi->GetMotherMatrix()->GetRotationMatrix()[1];
936 mat[0][2] = navi->GetMotherMatrix()->GetRotationMatrix()[2];
937 mat[1][0] = navi->GetMotherMatrix()->GetRotationMatrix()[3];
938 mat[1][1] = navi->GetMotherMatrix()->GetRotationMatrix()[4];
939 mat[1][2] = navi->GetMotherMatrix()->GetRotationMatrix()[5];
940 mat[2][0] = navi->GetMotherMatrix()->GetRotationMatrix()[6];
941 mat[2][1] = navi->GetMotherMatrix()->GetRotationMatrix()[7];
942 mat[2][2] = navi->GetMotherMatrix()->GetRotationMatrix()[8];
963 deter = mat[0][0] * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1])
964 - mat[0][1] * (mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0])
965 + mat[0][2] * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]);
967 cout <<
"Error in CbmRichCorrection::InvertMatrix; determinant of input "
968 "matrix equals to zero !!!"
971 for (Int_t
i = 0;
i < 3;
i++) {
972 for (Int_t j = 0; j < 3; j++) {
978 TMath::Power(-1, 2) * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]);
980 TMath::Power(-1, 3) * (mat[0][1] * mat[2][2] - mat[0][2] * mat[2][1]);
982 TMath::Power(-1, 4) * (mat[0][1] * mat[1][2] - mat[0][2] * mat[1][1]);
984 TMath::Power(-1, 3) * (mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]);
986 TMath::Power(-1, 4) * (mat[0][0] * mat[2][2] - mat[0][2] * mat[2][0]);
988 TMath::Power(-1, 5) * (mat[0][0] * mat[1][2] - mat[0][2] * mat[1][0]);
990 TMath::Power(-1, 4) * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]);
992 TMath::Power(-1, 5) * (mat[0][0] * mat[2][1] - mat[0][1] * mat[2][0]);
994 TMath::Power(-1, 6) * (mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0]);
996 for (Int_t
i = 0;
i < 3;
i++) {
997 for (Int_t j = 0; j < 3; j++) {
998 invMat[
i][j] = buff[
i][j] / deter;
1022 vector<Double_t> ptCIdeal,
1023 vector<Double_t>& ptMNew) {
1024 Double_t t = 0., diffX = 0., diffY = 0., diffZ = 0.;
1025 diffX = ptM.at(0) - ptCIdeal.at(0);
1026 diffY = ptM.at(1) - ptCIdeal.at(1);
1027 diffZ = ptM.at(2) - ptCIdeal.at(2);
1028 t = TMath::Sqrt(300 * 300 / (diffX * diffX + diffY * diffY + diffZ * diffZ));
1030 ptMNew.at(0) = t * diffX + ptCIdeal.at(0);
1031 ptMNew.at(1) = t * diffY + ptCIdeal.at(1);
1032 ptMNew.at(2) = t * diffZ + ptCIdeal.at(2);
1033 cout <<
"New coordinates of point M = {" << ptMNew.at(0) <<
", "
1034 << ptMNew.at(1) <<
", " << ptMNew.at(2) <<
"}" << endl;
1038 vector<Double_t>& ptR2Mirr,
1039 vector<Double_t> ptM,
1040 vector<Double_t> ptC,
1041 vector<Double_t> ptR1,
1042 TGeoNavigator* navi,
1045 <<
"//------------------------------ CbmRichCorrection: ComputeR2 "
1046 "------------------------------//"
1050 vector<Double_t> normalMirr(3), ptCNew(3), ptTileCenter(3);
1051 Double_t t1 = 0., t2 = 0., t3 = 0.;
1053 if (s ==
"Corrected") {
1056 vector<Double_t> outputFit(4);
1060 corr_file.open(str);
1061 if (corr_file.is_open()) {
1062 for (Int_t
i = 0;
i < 4;
i++) {
1063 corr_file >> outputFit.at(
i);
1068 cout <<
"Error in CbmRichCorrection: unable to open parameter file!"
1070 cout <<
"Parameter file path = " << str << endl << endl;
1073 cout <<
"Misalignment parameters read from file = [" << outputFit.at(0)
1074 <<
" ; " << outputFit.at(1) <<
" ; " << outputFit.at(2) <<
" ; "
1075 << outputFit.at(3) <<
"]" << endl;
1079 ptCNew.at(0) = ptC.at(0) + outputFit.at(3);
1080 ptCNew.at(1) = ptC.at(1) + outputFit.at(2);
1081 ptCNew.at(2) = ptC.at(2);
1082 ptTileCenter.at(0) = navi->GetMotherMatrix()->GetTranslation()[0];
1083 ptTileCenter.at(1) = navi->GetMotherMatrix()->GetTranslation()[1];
1084 ptTileCenter.at(2) = navi->GetMotherMatrix()->GetTranslation()[2];
1085 cout <<
"Mirror tile center coordinates = {" << ptTileCenter.at(0) <<
", "
1086 << ptTileCenter.at(1) <<
", " << ptTileCenter.at(2) <<
"}" << endl;
1087 Double_t
x = 0.,
y = 0., z = 0., dist = 0., dist2 = 0.,
z2 = 0.;
1088 x = TMath::Power(ptCNew.at(0) - ptTileCenter.at(0), 2);
1089 y = TMath::Power(ptCNew.at(1) - ptTileCenter.at(1), 2);
1090 z = TMath::Power(ptCNew.at(2) - ptTileCenter.at(2), 2);
1091 dist = TMath::Sqrt(
x +
y + z);
1092 z2 = ptTileCenter.at(2) - TMath::Sqrt(TMath::Power(300, 2) -
x -
y)
1094 cout <<
"{x, y, z} = {" <<
x <<
", " <<
y <<
", " << z
1095 <<
"}, dist = " << dist <<
" and z2 = " <<
z2 << endl;
1096 dist2 = TMath::Sqrt(
x +
y + TMath::Power(
z2 - ptTileCenter.at(2), 2));
1097 cout <<
"dist2 = " << dist2 << endl;
1099 cout <<
"Sphere center coordinates of the rotated mirror tile, after "
1101 << ptCNew.at(0) <<
", " << ptCNew.at(1) <<
", " << ptCNew.at(2) <<
"}"
1103 }
else if (s ==
"Uncorrected") {
1106 cout <<
"Sphere center coordinates of the rotated mirror tile, without "
1108 << ptCNew.at(0) <<
", " << ptCNew.at(1) <<
", " << ptCNew.at(2) <<
"}"
1111 cout <<
"No input given in function ComputeR2! Uncorrected parameters for "
1112 "the sphere center of the tile will be used!"
1115 cout <<
"Sphere center coordinates of the rotated mirror tile, without "
1117 << ptCNew.at(0) <<
", " << ptCNew.at(1) <<
", " << ptCNew.at(2) <<
"}"
1121 normalMirr.at(0) = (ptCNew.at(0) - ptM.at(0))
1122 / TMath::Sqrt(TMath::Power(ptCNew.at(0) - ptM.at(0), 2)
1123 + TMath::Power(ptCNew.at(1) - ptM.at(1), 2)
1124 + TMath::Power(ptCNew.at(2) - ptM.at(2), 2));
1125 normalMirr.at(1) = (ptCNew.at(1) - ptM.at(1))
1126 / TMath::Sqrt(TMath::Power(ptCNew.at(0) - ptM.at(0), 2)
1127 + TMath::Power(ptCNew.at(1) - ptM.at(1), 2)
1128 + TMath::Power(ptCNew.at(2) - ptM.at(2), 2));
1129 normalMirr.at(2) = (ptCNew.at(2) - ptM.at(2))
1130 / TMath::Sqrt(TMath::Power(ptCNew.at(0) - ptM.at(0), 2)
1131 + TMath::Power(ptCNew.at(1) - ptM.at(1), 2)
1132 + TMath::Power(ptCNew.at(2) - ptM.at(2), 2));
1135 t1 = ((ptR1.at(0) - ptM.at(0)) * (ptCNew.at(0) - ptM.at(0))
1136 + (ptR1.at(1) - ptM.at(1)) * (ptCNew.at(1) - ptM.at(1))
1137 + (ptR1.at(2) - ptM.at(2)) * (ptCNew.at(2) - ptM.at(2)))
1138 / (TMath::Power(ptCNew.at(0) - ptM.at(0), 2)
1139 + TMath::Power(ptCNew.at(1) - ptM.at(1), 2)
1140 + TMath::Power(ptCNew.at(2) - ptM.at(2), 2));
1142 2 * (ptM.at(0) + t1 * (ptCNew.at(0) - ptM.at(0))) - ptR1.at(0);
1144 2 * (ptM.at(1) + t1 * (ptCNew.at(1) - ptM.at(1))) - ptR1.at(1);
1146 2 * (ptM.at(2) + t1 * (ptCNew.at(2) - ptM.at(2))) - ptR1.at(2);
1147 t2 = ((ptR1.at(0) - ptCNew.at(0)) * (ptCNew.at(0) - ptM.at(0))
1148 + (ptR1.at(1) - ptCNew.at(1)) * (ptCNew.at(1) - ptM.at(1))
1149 + (ptR1.at(2) - ptCNew.at(2)) * (ptCNew.at(2) - ptM.at(2)))
1150 / (TMath::Power(ptCNew.at(0) - ptM.at(0), 2)
1151 + TMath::Power(ptCNew.at(1) - ptM.at(1), 2)
1152 + TMath::Power(ptCNew.at(2) - ptM.at(2), 2));
1154 2 * (ptCNew.at(0) + t2 * (ptCNew.at(0) - ptM.at(0))) - ptR1.at(0);
1156 2 * (ptCNew.at(1) + t2 * (ptCNew.at(1) - ptM.at(1))) - ptR1.at(1);
1158 2 * (ptCNew.at(2) + t2 * (ptCNew.at(2) - ptM.at(2))) - ptR1.at(2);
1164 cout <<
"Coordinates of point R2 on reflective plane after reflection on the "
1168 cout <<
"* using sphere center C to define \U00000394: {" << ptR2Mirr.at(0)
1169 <<
", " << ptR2Mirr.at(1) <<
", " << ptR2Mirr.at(2) <<
"}" << endl;
1175 vector<Double_t>& ptPR2,
1176 vector<Double_t> normalPMT,
1177 vector<Double_t> ptM,
1178 vector<Double_t> ptR2Mirr,
1179 Double_t constantePMT) {
1181 <<
"//------------------------------ CbmRichCorrection: ComputeP "
1182 "------------------------------//"
1186 Double_t k1 = 0., k2 = 0., checkCalc1 = 0., checkCalc2 = 0.;
1189 * ((normalPMT.at(0) * ptM.at(0) + normalPMT.at(1) * ptM.at(1)
1190 + normalPMT.at(2) * ptM.at(2) + constantePMT)
1191 / (normalPMT.at(0) * (ptR2Mirr.at(0) - ptM.at(0))
1192 + normalPMT.at(1) * (ptR2Mirr.at(1) - ptM.at(1))
1193 + normalPMT.at(2) * (ptR2Mirr.at(2) - ptM.at(2))));
1194 ptPMirr.at(0) = ptM.at(0) + k1 * (ptR2Mirr.at(0) - ptM.at(0));
1195 ptPMirr.at(1) = ptM.at(1) + k1 * (ptR2Mirr.at(1) - ptM.at(1));
1196 ptPMirr.at(2) = ptM.at(2) + k1 * (ptR2Mirr.at(2) - ptM.at(2));
1198 * ((normalPMT.at(0) * ptR2Mirr.at(0) + normalPMT.at(1) * ptR2Mirr.at(1)
1199 + normalPMT.at(2) * ptR2Mirr.at(2) + constantePMT)
1200 / (normalPMT.at(0) * (ptR2Mirr.at(0) - ptM.at(0))
1201 + normalPMT.at(1) * (ptR2Mirr.at(1) - ptM.at(1))
1202 + normalPMT.at(2) * (ptR2Mirr.at(2) - ptM.at(2))));
1203 ptPR2.at(0) = ptR2Mirr.at(0) + k2 * (ptR2Mirr.at(0) - ptM.at(0));
1204 ptPR2.at(1) = ptR2Mirr.at(1) + k2 * (ptR2Mirr.at(1) - ptM.at(1));
1205 ptPR2.at(2) = ptR2Mirr.at(2) + k2 * (ptR2Mirr.at(2) - ptM.at(2));
1206 cout <<
"Coordinates of point P on PMT plane, after reflection on the mirror "
1207 "tile and extrapolation to the PMT plane:"
1209 cout <<
"* using mirror point M to define \U0001D49F ': {" << ptPMirr.at(0)
1210 <<
", " << ptPMirr.at(1) <<
", " << ptPMirr.at(2) <<
"}" << endl;
1212 checkCalc1 = ptPMirr.at(0) * normalPMT.at(0) + ptPMirr.at(1) * normalPMT.at(1)
1213 + ptPMirr.at(2) * normalPMT.at(2) + constantePMT;
1214 cout <<
"Check whether extrapolated track point on PMT plane verifies its "
1215 "equation (value should be 0.):"
1217 cout <<
"* using mirror point M, checkCalc = " << checkCalc1 << endl;
1218 checkCalc2 = ptPR2.at(0) * normalPMT.at(0) + ptPR2.at(1) * normalPMT.at(1)
1219 + ptPR2.at(2) * normalPMT.at(2) + constantePMT;
1224 TVector3 outPosUnCorr,
1227 vector<Double_t> normalPMT,
1228 Double_t constantePMT) {
1230 Double_t ringCenter[] = {0, 0, 0}, distToExtrapTrackHit = 0,
1231 distToExtrapTrackHitInPlane = 0,
1232 distToExtrapTrackHitInPlaneUnCorr = 0,
1233 distToExtrapTrackHitInPlaneIdeal = 0;
1235 for (Int_t iGlobalTrack = 0; iGlobalTrack < NofGTracks; iGlobalTrack++) {
1238 if (NULL == gTrack)
continue;
1241 if (richInd < 0) {
continue; }
1243 if (NULL == ring) {
continue; }
1244 Int_t ringTrackID = ring->GetTrackID();
1255 * ((normalPMT.at(0) * ringCenter[0]
1256 + normalPMT.at(1) * ringCenter[1] + constantePMT)
1259 vector<Double_t> r(3),
1261 r.at(0) = TMath::Abs(ringCenter[0]), r.at(1) = TMath::Abs(ringCenter[1]),
1262 r.at(2) = TMath::Abs(ringCenter[2]);
1263 p.at(0) = TMath::Abs(outPos.x()), p.at(1) = TMath::Abs(outPos.y()),
1264 p.at(2) = TMath::Abs(outPos.z());
1265 cout <<
"Ring center coordinates = {" << ringCenter[0] <<
", "
1266 << ringCenter[1] <<
", " << ringCenter[2] <<
"}" << endl;
1267 cout <<
"Difference in X = " << TMath::Abs(r.at(0) - p.at(0)) <<
"; \t"
1268 <<
"Difference in Y = " << TMath::Abs(r.at(1) - p.at(1)) <<
"; \t"
1269 <<
"Difference in Z = " << TMath::Abs(r.at(2) - p.at(2)) << endl;
1270 fHM->
H1(
"fhDifferenceX")->Fill(TMath::Abs(r.at(0) - p.at(0)));
1271 fHM->
H1(
"fhDifferenceY")->Fill(TMath::Abs(r.at(1) - p.at(1)));
1272 distToExtrapTrackHit = TMath::Sqrt(TMath::Power(r.at(0) - p.at(0), 2)
1273 + TMath::Power(r.at(1) - p.at(1), 2)
1274 + TMath::Power(r.at(2) - p.at(2), 2));
1275 distToExtrapTrackHitInPlane = TMath::Sqrt(
1276 TMath::Power(r.at(0) - p.at(0), 2) + TMath::Power(r.at(1) - p.at(1), 2));
1277 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack")->Fill(distToExtrapTrackHit);
1278 fHM->
H1(
"fhDistanceCorrected")->Fill(distToExtrapTrackHitInPlane);
1280 cout <<
"Distance between fitted ring center and extrapolated track hit in "
1282 << distToExtrapTrackHitInPlane << endl;
1284 vector<Double_t> pUnCorr(
1286 pUnCorr.at(0) = TMath::Abs(outPosUnCorr.x()),
1287 pUnCorr.at(1) = TMath::Abs(outPosUnCorr.y()),
1288 pUnCorr.at(2) = TMath::Abs(outPosUnCorr.z());
1290 cout <<
"Difference in X = " << TMath::Abs(r.at(0) - pUnCorr.at(0))
1292 <<
"Difference in Y = " << TMath::Abs(r.at(1) - pUnCorr.at(1))
1294 <<
"Difference in Z = " << TMath::Abs(r.at(2) - pUnCorr.at(2)) << endl;
1295 fHM->
H1(
"fhDifferenceXUncorrected")
1296 ->Fill(TMath::Abs(r.at(0) - pUnCorr.at(0)));
1297 fHM->
H1(
"fhDifferenceYUncorrected")
1298 ->Fill(TMath::Abs(r.at(1) - pUnCorr.at(1)));
1299 distToExtrapTrackHitInPlaneUnCorr =
1300 TMath::Sqrt(TMath::Power(r.at(0) - pUnCorr.at(0), 2)
1301 + TMath::Power(r.at(1) - pUnCorr.at(1), 2));
1302 fHM->
H1(
"fhDistanceUncorrected")->Fill(distToExtrapTrackHitInPlaneUnCorr);
1303 cout <<
"Distance between fitted ring center and extrapolated track hit in "
1305 << distToExtrapTrackHitInPlaneUnCorr << endl;
1307 vector<Double_t> pIdeal(
1309 pIdeal.at(0) = TMath::Abs(outPosIdeal.x()),
1310 pIdeal.at(1) = TMath::Abs(outPosIdeal.y()),
1311 pIdeal.at(2) = TMath::Abs(outPosIdeal.z());
1313 cout <<
"Difference in X = " << TMath::Abs(r.at(0) - pIdeal.at(0)) <<
"; \t"
1314 <<
"Difference in Y = " << TMath::Abs(r.at(1) - pIdeal.at(1)) <<
"; \t"
1315 <<
"Difference in Z = " << TMath::Abs(r.at(2) - pIdeal.at(2)) << endl;
1316 fHM->
H1(
"fhDifferenceXIdeal")->Fill(TMath::Abs(r.at(0) - pIdeal.at(0)));
1317 fHM->
H1(
"fhDifferenceYIdeal")->Fill(TMath::Abs(r.at(1) - pIdeal.at(1)));
1318 distToExtrapTrackHitInPlaneIdeal =
1319 TMath::Sqrt(TMath::Power(r.at(0) - pIdeal.at(0), 2)
1320 + TMath::Power(r.at(1) - pIdeal.at(1), 2));
1321 fHM->
H1(
"fhDistanceIdeal")->Fill(distToExtrapTrackHitInPlaneIdeal);
1322 cout <<
"Distance between fitted ring center and extrapolated track hit in "
1324 << distToExtrapTrackHitInPlaneIdeal << endl
1329 cout <<
"End of loop on global tracks;" << endl;
1340 can3->SetGrid(1, 1);
1342 can3->cd(1)->SetGrid(1, 1);
1343 can3->cd(2)->SetGrid(1, 1);
1345 TH1D* Clone1 = (TH1D*)
fHM->
H1(
"fhDifferenceXIdeal")->Clone();
1346 Clone1->GetXaxis()->SetTitleSize(0.04);
1347 Clone1->GetYaxis()->SetTitleSize(0.04);
1348 Clone1->GetXaxis()->SetLabelSize(0.03);
1349 Clone1->GetYaxis()->SetLabelSize(0.03);
1350 Clone1->GetXaxis()->CenterTitle();
1351 Clone1->GetYaxis()->CenterTitle();
1352 Clone1->SetTitle(
"Difference in X");
1353 Clone1->SetLineColor(kBlue);
1354 Clone1->SetLineWidth(2);
1357 TH1D* Clone2 = (TH1D*)
fHM->
H1(
"fhDifferenceX")->Clone();
1358 Clone2->SetTitleSize(0.04);
1359 Clone2->SetLabelSize(0.03);
1360 Clone2->SetLineColor(kGreen);
1361 Clone2->SetLineWidth(2);
1363 Clone2->Draw(
"same");
1364 TH1D* Clone3 = (TH1D*)
fHM->
H1(
"fhDifferenceXUncorrected")->Clone();
1365 Clone3->SetTitleSize(0.04);
1366 Clone3->SetLabelSize(0.03);
1367 Clone3->SetLineColor(kRed);
1368 Clone3->SetLineWidth(2);
1370 Clone3->Draw(
"same");
1373 TLegend* LEG =
new TLegend(0.3, 0.78, 0.5, 0.88);
1374 LEG->SetBorderSize(1);
1375 LEG->SetFillColor(0);
1376 LEG->SetMargin(0.2);
1377 LEG->SetTextSize(0.02);
1378 sprintf(leg,
"X diff uncorr");
1379 LEG->AddEntry(Clone3, leg,
"l");
1380 sprintf(leg,
"X diff corr");
1381 LEG->AddEntry(Clone2, leg,
"l");
1382 sprintf(leg,
"X diff ideal");
1383 LEG->AddEntry(Clone1, leg,
"l");
1387 can3->SetGrid(1, 1);
1388 TH1D* Clone4 = (TH1D*)
fHM->
H1(
"fhDifferenceYIdeal")->Clone();
1389 Clone4->GetXaxis()->SetTitleSize(0.04);
1390 Clone4->GetYaxis()->SetTitleSize(0.04);
1391 Clone4->GetXaxis()->SetLabelSize(0.03);
1392 Clone4->GetYaxis()->SetLabelSize(0.03);
1393 Clone4->GetXaxis()->CenterTitle();
1394 Clone4->GetYaxis()->CenterTitle();
1395 Clone4->SetTitle(
"Difference in Y");
1396 Clone4->SetLineColor(kBlue);
1397 Clone4->SetLineWidth(2);
1400 TH1D* Clone5 = (TH1D*)
fHM->
H1(
"fhDifferenceY")->Clone();
1401 Clone5->SetTitleSize(0.04);
1402 Clone5->SetLabelSize(0.03);
1403 Clone5->SetLineColor(kGreen);
1404 Clone5->SetLineWidth(2);
1406 Clone5->Draw(
"same");
1407 TH1D* Clone6 = (TH1D*)
fHM->
H1(
"fhDifferenceYUncorrected")->Clone();
1408 Clone6->SetTitleSize(0.04);
1409 Clone6->SetLabelSize(0.03);
1410 Clone6->SetLineColor(kRed);
1411 Clone6->SetLineWidth(2);
1413 Clone6->Draw(
"same");
1415 TLegend* LEG1 =
new TLegend(0.3, 0.78, 0.5, 0.88);
1416 LEG1->SetBorderSize(1);
1417 LEG1->SetFillColor(0);
1418 LEG1->SetMargin(0.2);
1419 LEG1->SetTextSize(0.02);
1420 sprintf(leg,
"Y diff uncorr");
1421 LEG1->AddEntry(Clone6, leg,
"l");
1422 sprintf(leg,
"Y diff corr");
1423 LEG1->AddEntry(Clone5, leg,
"l");
1424 sprintf(leg,
"Y diff ideal");
1425 LEG1->AddEntry(Clone4, leg,
"l");
1469 gStyle->SetOptStat(000000);
1545 TFile* file =
new TFile(fileName,
"READ");
1557 fHM->
H1(
"fhDifferenceXUncorrected")->Write();
1558 fHM->
H1(
"fhDifferenceYUncorrected")->Write();
1559 fHM->
H1(
"fhDistanceUncorrected")->Write();
1560 fHM->
H1(
"fhDifferenceX")->Write();
1561 fHM->
H1(
"fhDifferenceY")->Write();
1562 fHM->
H1(
"fhDistanceCorrected")->Write();
1563 fHM->
H1(
"fhDifferenceXIdeal")->Write();
1564 fHM->
H1(
"fhDifferenceYIdeal")->Write();
1565 fHM->
H1(
"fhDistanceIdeal")->Write();