3 #include "FairLogger.h"
4 #include "FairRootManager.h"
6 #include "TClonesArray.h"
27 #include "FairTrackParam.h"
28 #include "FairVolume.h"
30 #include "TGeoManager.h"
39 #include "TGeoSphere.h"
40 #include "TLorentzVector.h"
41 #include "TVirtualMC.h"
51 , fRichProjections(NULL)
52 , fRichMirrorPoints(NULL)
55 , fRichRingMatches(NULL)
56 , fRichRefPlanePoints(NULL)
65 , fIsMirrorUpperHalf(NULL)
69 , fPathsMapEllipse() {
72 for (
int i = 0;
i < 3;
i++) {
80 FairRootManager* manager = FairRootManager::Instance();
82 fRichHits = (TClonesArray*) manager->GetObject(
"RichHit");
84 Fatal(
"CbmRichPMTMapping::Init",
"No RichHit array !");
87 fRichRings = (TClonesArray*) manager->GetObject(
"RichRing");
89 Fatal(
"CbmRichPMTMapping::Init",
"No RichRing array !");
94 Fatal(
"CbmRichPMTMapping::Init",
"No RichProjection array !");
99 Fatal(
"CbmRichPMTMapping::Init",
"No RichMirrorPoints array !");
102 fRichMCPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
104 Fatal(
"CbmRichPMTMapping::Init",
"No RichMCPoints array !");
107 fMCTracks = (TClonesArray*) manager->GetObject(
"MCTrack");
109 Fatal(
"CbmRichPMTMapping::Init",
"No MCTracks array !");
114 Fatal(
"CbmRichPMTMapping::Init",
"No RichRingMatches array !");
119 Fatal(
"CbmRichPMTMapping::Init",
"No RichRefPlanePoint array !");
122 fRichPoints = (TClonesArray*) manager->GetObject(
"RichPoint");
124 Fatal(
"CbmRichPMTMapping::Init",
"No RichPoint array !");
127 fGlobalTracks = (TClonesArray*) manager->GetObject(
"GlobalTrack");
129 Fatal(
"CbmAnaDielectronTask::Init",
"No GlobalTrack array!");
132 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
133 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_53"] =
135 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
136 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_52"] =
138 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
139 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_1_51"] =
141 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
142 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_77"] =
144 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
145 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_76"] =
147 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
148 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_1_75"] =
150 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
151 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_29"] =
153 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
154 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_28"] =
156 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
157 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_1_27"] =
159 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
160 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_3_15"] =
162 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
163 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_16"] =
165 fPathsMap[
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
166 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_17"] =
170 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_53"] =
173 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_2_52"] =
176 "RICH_mirror_and_support_belt_strip3_126/RICH_mirror_1_51"] =
179 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_77"] =
182 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_2_76"] =
185 "RICH_mirror_and_support_belt_strip5_128/RICH_mirror_1_75"] =
188 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_29"] =
191 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_2_28"] =
194 "RICH_mirror_and_support_belt_strip1_124/RICH_mirror_1_27"] =
197 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
198 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_3_15"] =
"3_15";
200 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
201 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_16"] =
"2_16";
203 [
"/cave_1/rich1_0/RICH_gas_221/RICH_mirror_half_total_208/"
204 "RICH_mirror_and_support_belt_strip_cut_123/RICH_mirror_2_17"] =
"2_17";
217 for (std::map<string, string>::iterator it =
fPathsMap.begin();
224 name +
";X_Axis [];Y_Axis [];Entries",
236 string name =
"fHPoints_Ellipse_" + it->second;
238 name +
";X_Axis [];Y_Axis [];Entries",
247 fHM->
Create1<TH1D>(
"fhDistanceCenterToExtrapolatedTrack",
248 "fhDistanceCenterToExtrapolatedTrack;Distance fitted "
249 "center to extrapolated track;Number of entries",
255 "fhDistanceCenterToExtrapolatedTrackInPlane",
256 "fhDistanceCenterToExtrapolatedTrackInPlane;Distance fitted center to "
257 "extrapolated track plane;Number of entries",
262 "fhDifferenceX;Difference in X (fitted center - "
263 "extrapolated track);Number of entries",
268 "fhDifferenceY;Difference in Y (fitted center - "
269 "extrapolated track);Number of entries",
278 "--------------------------------------------------------------------"
279 "------------------------------------------//"
281 cout <<
"//---------------------------------------- EXEC Function - Defining "
282 "the entries ----------------------------------------//"
285 "--------------------------------------------------------------------"
286 "--------------------------------------------------//"
290 cout <<
"CbmRichPMTMapping : Event #" <<
fEventNum << endl;
292 Int_t nofRingsInEvent =
fRichRings->GetEntries();
294 Int_t nofHitsInEvent =
fRichHits->GetEntries();
296 Int_t NofMCTracks =
fMCTracks->GetEntriesFast();
297 cout <<
"Nb of rings in evt = " << nofRingsInEvent
298 <<
", nb of mirror points = " << nofMirrorPoints
299 <<
", nb of hits in evt = " << nofHitsInEvent
300 <<
", nb of Monte-Carlo points = " << NofMCPoints
301 <<
" and nb of Monte-Carlo tracks = " << NofMCTracks << endl
305 "--------------------------------------------------------------------"
306 "--------------------------------------//"
308 cout <<
"//---------------------------------------- EXEC Function "
309 "---------------------------------------------------//"
311 cout <<
"//------------------------------ Mapping for mirror - PMT relations "
312 "----------------------------------------//"
315 "--------------------------------------------------------------------"
316 "--------------------------------------//"
320 if (nofRingsInEvent == 0) {
321 cout <<
"Error no rings registered in event." << endl << endl;
332 cout <<
"//---------------------------------------- MATCH_FINDER Function "
333 "----------------------------------------//"
336 Int_t NofRingsInEvent =
fRichRings->GetEntries();
338 Int_t NofMCTracks =
fMCTracks->GetEntriesFast();
341 Double_t x_Mirr = 0, y_Mirr = 0, z_Mirr = 0, x_PMT = 0, y_PMT = 0, z_PMT = 0;
342 Double_t CenterX = 0, CenterY = 0;
344 const Char_t* mirr_path;
347 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
349 Int_t trackID = MirrPoint->GetTrackID();
352 for (Int_t iMCPoint = 0; iMCPoint < NofMCPoints; iMCPoint++) {
354 if (NULL == pPoint)
continue;
356 if (NULL == pTrack)
continue;
359 if (motherID == -1)
continue;
361 if (trackID == motherID) {
365 x_Mirr = MirrPoint->GetX();
366 y_Mirr = MirrPoint->GetY();
367 z_Mirr = MirrPoint->GetZ();
369 mirr_node = gGeoManager->FindNode(x_Mirr, y_Mirr, z_Mirr);
370 mirr_path = gGeoManager->GetPath();
377 for (Int_t iRing = 0; iRing < NofRingsInEvent; iRing++) {
379 if (NULL == ring)
continue;
391 if (richMCID == -1)
continue;
393 if (trackID == richMCID) {
395 cout <<
"MATCH BETWEEN TRACK_ID AND RICH_MC_ID FOUND !" << endl;
396 cout <<
"Center X = " << CenterX <<
" and center Y = " << CenterY
398 x_Mirr = MirrPoint->GetX();
399 y_Mirr = MirrPoint->GetY();
400 z_Mirr = MirrPoint->GetZ();
401 cout <<
"x_Mirr: " << x_Mirr <<
", y_Mirr: " << y_Mirr
402 <<
" and z_Mirr: " << z_Mirr << endl;
403 mirr_node = gGeoManager->FindNode(x_Mirr, y_Mirr, z_Mirr);
404 mirr_path = gGeoManager->GetPath();
405 cout <<
"Mirror path: " << mirr_path << endl;
417 string name = string(mirr_path);
418 for (std::map<string, string>::iterator it =
fPathsMap.begin();
421 if (name.compare(it->first) == 0) {
424 Double_t x_PMT = pPoint->GetX();
425 Double_t y_PMT = pPoint->GetY();
426 Double_t z_PMT = pPoint->GetZ();
429 fHM->
H2(
"fHMCPoints_" + it->second)->Fill(-x_PMT, y_PMT);
438 cout <<
"//---------------------------------------- FILL_PMT_MAP_ELLIPSE "
439 "Function ----------------------------------------//"
441 string name = string(mirr_path);
442 for (std::map<string, string>::iterator it =
fPathsMap.begin();
445 if (name.compare(it->first) == 0) {
446 cout <<
"IDENTICAL PATHS FOUND !" << endl;
448 cout <<
"Mirror ID: " << it->second << endl;
450 fHM->
H2(
"fHPoints_Ellipse_" + it->second)->Fill(-CenterX, CenterY);
457 cout <<
"//------------------------------ CbmRichPMTMapping: Projection "
458 "Producer ------------------------------//"
463 Int_t NofRingsInEvent =
fRichRings->GetEntries();
466 Int_t NofPMTPoints =
fRichPoints->GetEntriesFast();
469 Double_t t1 = 0., t2 = 0., t3 = 0., k1 = 0., k2 = 0., checkCalc1 = 0.,
472 Double_t sphereRadius = 0., constantePMT = 0.;
473 Double_t ptMirr[] = {0., 0., 0.}, ptC[] = {0., 0., 0.}, ptR1[] = {0., 0., 0.},
474 normalPMT[] = {0., 0., 0.}, normalMirr[] = {0., 0., 0.};
475 Double_t ptR2Mirr[] = {0., 0., 0.}, ptR2Center[] = {0., 0., 0.},
476 ptPMirr[] = {0., 0., 0.}, ptPR2[] = {0., 0., 0.};
477 Double_t reflectedPtCooVectSphereUnity[] = {0., 0., 0.};
479 Double_t ringCenter[] = {0., 0., 0.}, distToExtrapTrackHit = 0.,
480 distToExtrapTrackHitInPlane = 0.;
482 Int_t mirrTrackID = -1, pmtTrackID = -1, refPlaneTrackID = -1,
483 motherID = -100, pmtMotherID = -100;
484 const Char_t *mirrPath, *topNodePath;
487 TGeoMatrix *mirrMatrix, *pmtMatrix, *richMatrix;
491 NofPMTPoints, normalPMT[0], normalPMT[1], normalPMT[2], constantePMT);
492 cout <<
"Calculated normal vector to PMT plane = {" << normalPMT[0] <<
", "
493 << normalPMT[1] <<
", " << normalPMT[2]
494 <<
"} and constante d = " << constantePMT << endl
497 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
500 mirrTrackID = mirrPoint->GetTrackID();
502 if (mirrTrackID <= -1) {
503 cout <<
"Mirror track ID <= 1 !!!" << endl;
504 cout <<
"----------------------------------- End of loop N°" << iMirr + 1
505 <<
" on the mirror points. -----------------------------------"
512 if (motherID == -1) {
514 ptMirr[0] = mirrPoint->GetX(), ptMirr[1] = mirrPoint->GetY(),
515 ptMirr[2] = mirrPoint->GetZ();
517 mirrNode = gGeoManager->FindNode(ptMirr[0], ptMirr[1], ptMirr[2]);
519 mirrPath = mirrNode->GetName();
520 topNodePath = gGeoManager->GetTopNode()->GetName();
521 cout <<
"Top node path: " << topNodePath
522 <<
" and mirror path: " << mirrPath << endl;
523 mirrMatrix = mirrNode->GetMatrix();
524 cout <<
"Mirror matrix parameters: " << endl;
526 ptrShape = mirrNode->GetVolume()->GetShape();
527 cout <<
"Shape of the mirror tile:" << endl;
536 mirrPath, ptC[0], ptC[1], ptC[2], sphereRadius);
538 <<
"Sphere center coordinates of the rotated mirror tile = {"
539 << ptC[0] <<
", " << ptC[1] <<
", " << ptC[2]
540 <<
"} and sphere inner radius = " << sphereRadius << endl;
542 for (Int_t iRefl = 0; iRefl < NofRefPlanePoints; iRefl++) {
545 refPlaneTrackID = refPlanePoint->GetTrackID();
547 if (mirrTrackID == refPlaneTrackID) {
549 ptR1[0] = refPlanePoint->GetX(), ptR1[1] = refPlanePoint->GetY(),
550 ptR1[2] = refPlanePoint->GetZ();
551 cout <<
"Reflective Plane Point coordinates = {" << ptR1[0] <<
", "
552 << ptR1[1] <<
", " << ptR1[2] <<
"}" << endl;
553 cout <<
"Mirror Point coordinates = {" << ptMirr[0] <<
", "
554 << ptMirr[1] <<
", " << ptMirr[2] <<
"}" << endl
556 normalMirr[0] = (ptC[0] - ptMirr[0])
557 / TMath::Sqrt(TMath::Power(ptC[0] - ptMirr[0], 2)
558 + TMath::Power(ptC[1] - ptMirr[1], 2)
559 + TMath::Power(ptC[2] - ptMirr[2], 2));
560 normalMirr[1] = (ptC[1] - ptMirr[1])
561 / TMath::Sqrt(TMath::Power(ptC[0] - ptMirr[0], 2)
562 + TMath::Power(ptC[1] - ptMirr[1], 2)
563 + TMath::Power(ptC[2] - ptMirr[2], 2));
564 normalMirr[2] = (ptC[2] - ptMirr[2])
565 / TMath::Sqrt(TMath::Power(ptC[0] - ptMirr[0], 2)
566 + TMath::Power(ptC[1] - ptMirr[1], 2)
567 + TMath::Power(ptC[2] - ptMirr[2], 2));
568 cout <<
"Calculated and normalized normal of mirror tile = {"
569 << normalMirr[0] <<
", " << normalMirr[1] <<
", "
570 << normalMirr[2] <<
"}" << endl;
572 t1 = ((ptR1[0] - ptMirr[0]) * (ptC[0] - ptMirr[0])
573 + (ptR1[1] - ptMirr[1]) * (ptC[1] - ptMirr[1])
574 + (ptR1[2] - ptMirr[2]) * (ptC[2] - ptMirr[2]))
575 / (TMath::Power(ptC[0] - ptMirr[0], 2)
576 + TMath::Power(ptC[1] - ptMirr[1], 2)
577 + TMath::Power(ptC[2] - ptMirr[2], 2));
578 ptR2Center[0] = 2 * (ptMirr[0] + t1 * (ptC[0] - ptMirr[0])) - ptR1[0];
579 ptR2Center[1] = 2 * (ptMirr[1] + t1 * (ptC[1] - ptMirr[1])) - ptR1[1];
580 ptR2Center[2] = 2 * (ptMirr[2] + t1 * (ptC[2] - ptMirr[2])) - ptR1[2];
581 t2 = ((ptR1[0] - ptC[0]) * (ptC[0] - ptMirr[0])
582 + (ptR1[1] - ptC[1]) * (ptC[1] - ptMirr[1])
583 + (ptR1[2] - ptC[2]) * (ptC[2] - ptMirr[2]))
584 / (TMath::Power(ptC[0] - ptMirr[0], 2)
585 + TMath::Power(ptC[1] - ptMirr[1], 2)
586 + TMath::Power(ptC[2] - ptMirr[2], 2));
587 ptR2Mirr[0] = 2 * (ptC[0] + t2 * (ptC[0] - ptMirr[0])) - ptR1[0];
588 ptR2Mirr[1] = 2 * (ptC[1] + t2 * (ptC[1] - ptMirr[1])) - ptR1[1];
589 ptR2Mirr[2] = 2 * (ptC[2] + t2 * (ptC[2] - ptMirr[2])) - ptR1[2];
595 cout <<
"Coordinates of point R2 on reflective plane after "
596 "reflection on the mirror tile:"
598 cout <<
"* using mirror point M to define \U00000394: {"
599 << ptR2Center[0] <<
", " << ptR2Center[1] <<
", "
600 << ptR2Center[2] <<
"}" << endl;
601 cout <<
"* using sphere center C to define \U00000394: {"
602 << ptR2Mirr[0] <<
", " << ptR2Mirr[1] <<
", " << ptR2Mirr[2]
609 * ((normalPMT[0] * ptMirr[0] + normalPMT[1] * ptMirr[1]
610 + normalPMT[2] * ptMirr[2] + constantePMT)
611 / (normalPMT[0] * (ptR2Mirr[0] - ptMirr[0])
612 + normalPMT[1] * (ptR2Mirr[1] - ptMirr[1])
613 + normalPMT[2] * (ptR2Mirr[2] - ptMirr[2])));
614 ptPMirr[0] = ptMirr[0] + k1 * (ptR2Mirr[0] - ptMirr[0]);
615 ptPMirr[1] = ptMirr[1] + k1 * (ptR2Mirr[1] - ptMirr[1]);
616 ptPMirr[2] = ptMirr[2] + k1 * (ptR2Mirr[2] - ptMirr[2]);
618 * ((normalPMT[0] * ptR2Mirr[0] + normalPMT[1] * ptR2Mirr[1]
619 + normalPMT[2] * ptR2Mirr[2] + constantePMT)
620 / (normalPMT[0] * (ptR2Mirr[0] - ptMirr[0])
621 + normalPMT[1] * (ptR2Mirr[1] - ptMirr[1])
622 + normalPMT[2] * (ptR2Mirr[2] - ptMirr[2])));
623 ptPR2[0] = ptR2Mirr[0] + k2 * (ptR2Mirr[0] - ptMirr[0]);
624 ptPR2[1] = ptR2Mirr[1] + k2 * (ptR2Mirr[1] - ptMirr[1]);
625 ptPR2[2] = ptR2Mirr[2] + k2 * (ptR2Mirr[2] - ptMirr[2]);
626 cout <<
"Coordinates of point P on PMT plane, after reflection on "
627 "the mirror tile and extrapolation to the PMT plane:"
629 cout <<
"* using mirror point M to define \U0001D49F ': {"
630 << ptPMirr[0] <<
", " << ptPMirr[1] <<
", " << ptPMirr[2] <<
"}"
632 cout <<
"* using reflected point R2 to define \U0001D49F ': {"
633 << ptPR2[0] <<
", " << ptPR2[1] <<
", " << ptPR2[2] <<
"}"
635 checkCalc1 = ptPMirr[0] * normalPMT[0] + ptPMirr[1] * normalPMT[1]
636 + ptPMirr[2] * normalPMT[2] + constantePMT;
637 cout <<
"Check whether extrapolated track point on PMT plane "
638 "verifies its equation (value should be 0.):"
640 cout <<
"* using mirror point M, checkCalc = " << checkCalc1 << endl;
641 checkCalc2 = ptPR2[0] * normalPMT[0] + ptPR2[1] * normalPMT[1]
642 + ptPR2[2] * normalPMT[2] + constantePMT;
643 cout <<
"* using reflected point R2, checkCalc = " << checkCalc2
646 TVector3 pmtVector(ptPMirr[0], ptPMirr[1], ptPMirr[2]);
647 TVector3 pmtVectorNew;
648 CbmRichHitProducer::TiltPoint(&pmtVector,
653 cout <<
"New coordinates of point P on PMT plane, after PMT plane "
655 << pmtVectorNew.X() <<
", " << pmtVectorNew.Y() <<
", "
656 << pmtVectorNew.Z() <<
"}" << endl
658 ptPMirr[0] = pmtVectorNew.X(), ptPMirr[1] = pmtVectorNew.Y(),
659 ptPMirr[2] = pmtVectorNew.Z();
688 for (Int_t iGlobalTrack = 0; iGlobalTrack < NofGTracks; iGlobalTrack++) {
692 if (NULL == gTrack)
continue;
695 if (richInd < 0) {
continue; }
697 if (NULL == ring) {
continue; }
698 Int_t ringTrackID = ring->GetTrackID();
700 Int_t ringMotherID = track2->GetMotherId();
710 * ((normalPMT[0] * ringCenter[0]
711 + normalPMT[1] * ringCenter[1] + constantePMT)
713 cout <<
"Ring center coordinates = {" << ringCenter[0] <<
", "
714 << ringCenter[1] <<
", " << ringCenter[2] <<
"}" << endl;
715 cout <<
"Difference in X = " << TMath::Abs(ringCenter[0] - ptPMirr[0])
717 <<
"Difference in Y = " << TMath::Abs(ringCenter[1] - ptPMirr[1])
719 <<
"Difference in Z = " << TMath::Abs(ringCenter[2] - ptPMirr[2])
721 fHM->
H1(
"fhDifferenceX")->Fill(TMath::Abs(ringCenter[0] - ptPMirr[0]));
722 fHM->
H1(
"fhDifferenceY")->Fill(TMath::Abs(ringCenter[1] - ptPMirr[1]));
723 distToExtrapTrackHit =
724 TMath::Sqrt(TMath::Power(ringCenter[0] - ptPMirr[0], 2)
725 + TMath::Power(ringCenter[1] - ptPMirr[1], 2)
726 + TMath::Power(ringCenter[2] - ptPMirr[2], 2));
727 distToExtrapTrackHitInPlane =
728 TMath::Sqrt(TMath::Power(ringCenter[0] - ptPMirr[0], 2)
729 + TMath::Power(ringCenter[1] - ptPMirr[1], 2));
730 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack")
731 ->Fill(distToExtrapTrackHit);
732 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane")
733 ->Fill(distToExtrapTrackHitInPlane);
735 <<
"Distance between fitted ring center and extrapolated track hit = "
736 << distToExtrapTrackHit << endl;
737 cout <<
"Distance between fitted ring center and extrapolated track "
739 << distToExtrapTrackHitInPlane << endl
744 cout <<
"End of loop on global tracks;" << endl;
746 cout <<
"Not a mother particle ..." << endl;
748 cout <<
"----------------------------------- "
749 <<
"End of loop N°" << iMirr + 1 <<
" on the mirror points."
750 <<
" -----------------------------------" << endl
756 cout <<
"//------------------------------ CbmRichPMTMapping: Projection "
757 "Producer ------------------------------//"
762 Int_t NofRingsInEvent =
fRichRings->GetEntries();
765 Int_t NofPMTPoints =
fRichPoints->GetEntriesFast();
768 Double_t sphereX = 0., sphereY = 0., sphereZ = 0., sphereR = 0., normalX = 0.,
769 normalY = 0., normalZ = 0., normalCste = 0.;
770 Double_t CenterX = 0., CenterY = 0., CenterZ = 0., distToExtrapTrackHit = 0.;
771 Double_t a1 = 0., a2 = 0., a3 = 0., a4 = 0., a5 = 0., t1 = 0., t2 = 0.;
773 Double_t refPointCoo[] = {0., 0., 0.}, refPointMom[] = {0., 0., 0.};
774 Double_t reflectedPtCooNormMirr[] = {0., 0., 0.},
775 reflectedPtCooNormSphere[] = {0., 0., 0.};
776 Double_t reflectedPtCooVectMirr[] = {0., 0., 0.},
777 reflectedPtCooVectSphere[] = {0., 0., 0.};
778 Double_t reflectedPtCooVectSphereUnity[] = {0., 0., 0.},
779 vectMSUnity[] = {0., 0., 0.};
780 Double_t mirrPt[] = {0., 0., 0.}, mirrMom[] = {0., 0., 0.},
781 pmtPt[] = {0., 0., 0.};
782 Double_t computedNormal[] = {0., 0., 0.}, computedNormal2[] = {0., 0., 0.};
783 Double_t extrapolatedTrackCoo[] = {0., 0., 0.},
784 extrapolatedTrackCooComputedNormal[] = {0., 0., 0.};
785 Double_t checkCalc = 0.;
787 Int_t mirrTrackID = -1, pmtTrackID = -1, refPlaneTrackID = -1,
788 motherID = -100, pmtMotherID = -100;
789 const Char_t *mirrPath, *topNodePath;
792 TGeoMatrix *mirrMatrix, *pmtMatrix, *richMatrix;
805 GetPmtNormal(NofPMTPoints, normalX, normalY, normalZ, normalCste);
806 cout <<
"Calculated normal vector to PMT plane = {" << normalX <<
", "
807 << normalY <<
", " << normalZ <<
"} and constante d = " << normalCste
811 for (Int_t iMirr = 0; iMirr < NofMirrorPoints; iMirr++) {
814 mirrTrackID = mirrPoint->GetTrackID();
816 if (mirrTrackID <= -1) {
817 cout <<
"Mirror track ID <= 1 !!!" << endl;
818 cout <<
"----------------------------------- End of loop N°" << iMirr + 1
819 <<
" on the mirror points. -----------------------------------"
826 if (motherID == -1) {
828 mirrPt[0] = mirrPoint->GetX(), mirrPt[1] = mirrPoint->GetY(),
829 mirrPt[2] = mirrPoint->GetZ();
830 mirrMom[0] = mirrPoint->GetPx(), mirrMom[1] = mirrPoint->GetPy(),
831 mirrMom[2] = mirrPoint->GetPz();
833 mirrNode = gGeoManager->FindNode(mirrPt[0], mirrPt[1], mirrPt[2]);
835 mirrPath = mirrNode->GetName();
836 topNodePath = gGeoManager->GetTopNode()->GetName();
837 cout <<
"Mirror path: " << mirrPath
838 <<
" and top node path: " << topNodePath << endl;
839 mirrMatrix = mirrNode->GetMatrix();
840 cout <<
"Mirror matrix parameters: " << endl;
842 ptrShape = mirrNode->GetVolume()->GetShape();
850 Double_t sphere2X = 0., sphere2Y = 0., sphere2Z = 0., sphere2R = 0.;
852 mirrPath, sphere2X, sphere2Y, sphere2Z, sphere2R);
854 <<
"Old sphere coordinates = {" << sphere2X <<
", " << sphere2Y
855 <<
", " << sphere2Z <<
"} and sphere inner radius = " << sphere2R
858 cout <<
"New sphere coordinates = {" << sphereX <<
", " << sphereY <<
", "
859 << sphereZ <<
"} and sphere inner radius = " << sphereR << endl;
861 for (Int_t iRefl = 0; iRefl < NofRefPlanePoints; iRefl++) {
864 refPlaneTrackID = refPlanePoint->GetTrackID();
866 if (mirrTrackID == refPlaneTrackID) {
868 refPointCoo[0] = refPlanePoint->GetX(),
869 refPointCoo[1] = refPlanePoint->GetY(),
870 refPointCoo[2] = refPlanePoint->GetZ();
871 refPointMom[0] = refPlanePoint->GetPx(),
872 refPointMom[1] = refPlanePoint->GetPy(),
873 refPointMom[2] = refPlanePoint->GetPz();
874 cout <<
"Reflective Plane Point coordinates = {" << refPointCoo[0]
875 <<
", " << refPointCoo[1] <<
", " << refPointCoo[2]
876 <<
"} and momentum = {" << refPointMom[0] <<
", "
877 << refPointMom[1] <<
", " << refPointMom[2] <<
"}" << endl;
878 cout <<
"Mirror Point coordinates = {" << mirrPt[0] <<
", "
879 << mirrPt[1] <<
", " << mirrPt[2] <<
"} and momentum = {"
880 << mirrMom[0] <<
", " << mirrMom[1] <<
", " << mirrMom[2] <<
"}"
883 ptrShape->ComputeNormal(refPointCoo, refPointMom, computedNormal);
884 cout <<
"Computed normal to mirror tile coordinates = {"
885 << computedNormal[0] <<
", " << computedNormal[1] <<
", "
886 << computedNormal[2] <<
"}" << endl;
890 (sphereX - mirrPt[0])
891 / TMath::Sqrt(TMath::Power(sphereX - mirrPt[0], 2)
892 + TMath::Power(sphereY - mirrPt[1], 2)
893 + TMath::Power(sphereZ - mirrPt[2], 2));
895 (sphereY - mirrPt[1])
896 / TMath::Sqrt(TMath::Power(sphereX - mirrPt[0], 2)
897 + TMath::Power(sphereY - mirrPt[1], 2)
898 + TMath::Power(sphereZ - mirrPt[2], 2));
900 (sphereZ - mirrPt[2])
901 / TMath::Sqrt(TMath::Power(sphereX - mirrPt[0], 2)
902 + TMath::Power(sphereY - mirrPt[1], 2)
903 + TMath::Power(sphereZ - mirrPt[2], 2));
904 cout <<
"Calculated unity Mirror-Sphere vector = {" << vectMSUnity[0]
905 <<
", " << vectMSUnity[1] <<
", " << vectMSUnity[2] <<
"}"
908 a1 = (computedNormal[0] * (refPointCoo[0] - mirrPt[0])
909 + computedNormal[1] * (refPointCoo[1] - mirrPt[1])
910 + computedNormal[2] * (refPointCoo[2] - mirrPt[2]))
911 / (TMath::Power(computedNormal[0], 2)
912 + TMath::Power(computedNormal[1], 2)
913 + TMath::Power(computedNormal[2], 2));
914 reflectedPtCooNormMirr[0] =
915 2 * (mirrPt[0] + a1 * computedNormal[0]) - refPointCoo[0];
916 reflectedPtCooNormMirr[1] =
917 2 * (mirrPt[1] + a1 * computedNormal[1]) - refPointCoo[1];
918 reflectedPtCooNormMirr[2] =
919 2 * (mirrPt[2] + a1 * computedNormal[2]) - refPointCoo[2];
928 a4 = ((refPointCoo[0] - sphereX) * (sphereX - mirrPt[0])
929 + (refPointCoo[1] - sphereY) * (sphereY - mirrPt[1])
930 + (refPointCoo[2] - sphereZ) * (sphereZ - mirrPt[2]))
931 / (TMath::Power(sphereX - mirrPt[0], 2)
932 + TMath::Power(sphereY - mirrPt[1], 2)
933 + TMath::Power(sphereZ - mirrPt[2], 2));
934 reflectedPtCooVectSphere[0] =
935 2 * (sphereX + a4 * (sphereX - mirrPt[0])) - refPointCoo[0];
936 reflectedPtCooVectSphere[1] =
937 2 * (sphereY + a4 * (sphereY - mirrPt[1])) - refPointCoo[1];
938 reflectedPtCooVectSphere[2] =
939 2 * (sphereZ + a4 * (sphereZ - mirrPt[2])) - refPointCoo[2];
946 cout <<
"Ref Pt Coo using computed normal & mirror pt = {"
947 << reflectedPtCooNormMirr[0] <<
", " << reflectedPtCooNormMirr[1]
948 <<
", " << reflectedPtCooNormMirr[2] <<
"}" << endl;
951 cout <<
"Ref Pt Coo using MS vector & sphere pt = {"
952 << reflectedPtCooVectSphere[0] <<
", "
953 << reflectedPtCooVectSphere[1] <<
", "
954 << reflectedPtCooVectSphere[2] <<
"}" << endl
960 * ((normalX * reflectedPtCooVectSphere[0]
961 + normalY * reflectedPtCooVectSphere[1]
962 + normalZ * reflectedPtCooVectSphere[2] + normalCste)
963 / (normalX * (reflectedPtCooVectSphere[0] - mirrPt[0])
964 + normalY * (reflectedPtCooVectSphere[1] - mirrPt[1])
965 + normalZ * (reflectedPtCooVectSphere[2] - mirrPt[2])));
966 extrapolatedTrackCoo[0] =
967 reflectedPtCooVectSphere[0]
968 + t1 * (reflectedPtCooVectSphere[0] - mirrPt[0]);
969 extrapolatedTrackCoo[1] =
970 reflectedPtCooVectSphere[1]
971 + t1 * (reflectedPtCooVectSphere[1] - mirrPt[1]);
972 extrapolatedTrackCoo[2] =
973 reflectedPtCooVectSphere[2]
974 + t1 * (reflectedPtCooVectSphere[2] - mirrPt[2]);
975 cout <<
"Extrapolated track point on PMT plane using MS vector = {"
976 << extrapolatedTrackCoo[0] <<
", " << extrapolatedTrackCoo[1]
977 <<
", " << extrapolatedTrackCoo[2] <<
"}" << endl;
978 checkCalc = extrapolatedTrackCoo[0] * normalX
979 + extrapolatedTrackCoo[1] * normalY
980 + extrapolatedTrackCoo[2] * normalZ + normalCste;
981 cout <<
"Check whether extrapolated track point on PMT plane "
982 "verifies its equation (extrapolation with MS vector method):"
984 cout <<
"Check calculation = " << checkCalc << endl;
987 * ((normalX * reflectedPtCooNormMirr[0]
988 + normalY * reflectedPtCooNormMirr[1]
989 + normalZ * reflectedPtCooNormMirr[2] + normalCste)
990 / (normalX * (reflectedPtCooNormMirr[0] - mirrPt[0])
991 + normalY * (reflectedPtCooNormMirr[1] - mirrPt[1])
992 + normalZ * (reflectedPtCooNormMirr[2] - mirrPt[2])));
993 extrapolatedTrackCooComputedNormal[0] =
994 reflectedPtCooNormMirr[0]
995 + t1 * (reflectedPtCooNormMirr[0] - mirrPt[0]);
996 extrapolatedTrackCooComputedNormal[1] =
997 reflectedPtCooNormMirr[1]
998 + t1 * (reflectedPtCooNormMirr[1] - mirrPt[1]);
999 extrapolatedTrackCooComputedNormal[2] =
1000 reflectedPtCooNormMirr[2]
1001 + t1 * (reflectedPtCooNormMirr[2] - mirrPt[2]);
1003 <<
"Extrapolated track point on PMT plane using computed normal = {"
1004 << extrapolatedTrackCooComputedNormal[0] <<
", "
1005 << extrapolatedTrackCooComputedNormal[1] <<
", "
1006 << extrapolatedTrackCooComputedNormal[2] <<
"}" << endl;
1007 checkCalc = extrapolatedTrackCooComputedNormal[0] * normalX
1008 + extrapolatedTrackCooComputedNormal[1] * normalY
1009 + extrapolatedTrackCooComputedNormal[2] * normalZ
1012 <<
"Check whether extrapolated track point on PMT plane verifies "
1013 "its equation (extrapolation with computed normal method):"
1015 cout <<
"Check calculation = " << checkCalc << endl << endl;
1033 for (Int_t iGlobalTrack = 0; iGlobalTrack < NofGTracks; iGlobalTrack++) {
1037 if (NULL == gTrack)
continue;
1040 if (richInd < 0) {
continue; }
1042 if (NULL == ring) {
continue; }
1043 Int_t ringTrackID = ring->GetTrackID();
1045 Int_t ringMotherID = track2->GetMotherId();
1055 -1 * ((normalX * CenterX + normalY * CenterY + normalCste) / normalZ);
1056 cout <<
"Ring center coordinates = {" << CenterX <<
", " << CenterY
1057 <<
", " << CenterZ <<
"}" << endl;
1058 cout <<
"Difference in X = "
1059 << TMath::Abs(CenterX - extrapolatedTrackCoo[0]) << endl;
1060 cout <<
"Difference in Y = "
1061 << TMath::Abs(CenterY - extrapolatedTrackCoo[1]) << endl;
1062 cout <<
"Difference in Z = "
1063 << TMath::Abs(CenterZ - extrapolatedTrackCoo[2]) << endl;
1064 fHM->
H1(
"fhDifferenceX")
1065 ->Fill(TMath::Abs(CenterX - extrapolatedTrackCoo[0]));
1066 fHM->
H1(
"fhDifferenceY")
1067 ->Fill(TMath::Abs(CenterY - extrapolatedTrackCoo[1]));
1068 distToExtrapTrackHit =
1069 TMath::Sqrt(TMath::Power(CenterX - extrapolatedTrackCoo[0], 2)
1070 + TMath::Power(CenterY - extrapolatedTrackCoo[1], 2)
1071 + TMath::Power(CenterZ - extrapolatedTrackCoo[2], 2));
1072 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack")
1073 ->Fill(distToExtrapTrackHit);
1074 fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane")
1076 TMath::Sqrt(TMath::Power(CenterX - extrapolatedTrackCoo[0], 2)
1077 + TMath::Power(CenterY - extrapolatedTrackCoo[1], 2)));
1079 <<
"Distance between fitted ring center and extrapolated track hit = "
1080 << distToExtrapTrackHit << endl
1085 cout <<
"End of loop on global tracks;" << endl;
1087 cout <<
"Not a mother particle ..." << endl;
1089 cout <<
"----------------------------------- "
1090 <<
"End of loop N°" << iMirr + 1 <<
" on the mirror points."
1091 <<
" -----------------------------------" << endl
1100 Double_t& normalCste) {
1103 Int_t pmtTrackID, pmtMotherID;
1104 Double_t buffNormX = 0., buffNormY = 0., buffNormZ = 0., k = 0.,
1106 Double_t pmtPt[] = {0., 0., 0.};
1107 Double_t a[] = {0., 0., 0.}, b[] = {0., 0., 0.}, c[] = {0., 0., 0.};
1115 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
1117 pmtTrackID = pmtPoint->GetTrackID();
1120 a[0] = pmtPoint->GetX(), a[1] = pmtPoint->GetY(), a[2] = pmtPoint->GetZ();
1124 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
1126 pmtTrackID = pmtPoint->GetTrackID();
1130 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
1131 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
1132 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
1134 b[0] = pmtPoint->GetX(), b[1] = pmtPoint->GetY(), b[2] = pmtPoint->GetZ();
1139 for (Int_t iPmt = 0; iPmt < NofPMTPoints; iPmt++) {
1141 pmtTrackID = pmtPoint->GetTrackID();
1145 if (TMath::Sqrt(TMath::Power(a[0] - pmtPoint->GetX(), 2)
1146 + TMath::Power(a[1] - pmtPoint->GetY(), 2)
1147 + TMath::Power(a[2] - pmtPoint->GetZ(), 2))
1149 && TMath::Sqrt(TMath::Power(b[0] - pmtPoint->GetX(), 2)
1150 + TMath::Power(b[1] - pmtPoint->GetY(), 2)
1151 + TMath::Power(b[2] - pmtPoint->GetZ(), 2))
1153 c[0] = pmtPoint->GetX(), c[1] = pmtPoint->GetY(), c[2] = pmtPoint->GetZ();
1159 k = (b[0] - a[0]) / (c[0] - a[0]);
1160 if ((b[1] - a[1]) - (k * (c[1] - a[1])) == 0
1161 || (b[2] - a[2]) - (k * (c[2] - a[2])) == 0) {
1162 cout <<
"Error in normal calculation, vect_AB and vect_AC are collinear."
1165 buffNormX = (b[1] - a[1]) * (c[2] - a[2]) - (b[2] - a[2]) * (c[1] - a[1]);
1166 buffNormY = (b[2] - a[2]) * (c[0] - a[0]) - (b[0] - a[0]) * (c[2] - a[2]);
1167 buffNormZ = (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
1170 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
1171 + TMath::Power(buffNormZ, 2));
1174 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
1175 + TMath::Power(buffNormZ, 2));
1178 / TMath::Sqrt(TMath::Power(buffNormX, 2) + TMath::Power(buffNormY, 2)
1179 + TMath::Power(buffNormZ, 2));
1183 scalarProd = normalX * (pmtPoint1->GetX() - a[0])
1184 + normalY * (pmtPoint1->GetY() - a[1])
1185 + normalZ * (pmtPoint1->GetZ() - a[2]);
1189 * (normalX * pmtPoint1->GetX() + normalY * pmtPoint1->GetY()
1190 + normalZ * pmtPoint1->GetZ());
1192 scalarProd = normalX * (pmtPoint2->GetX() - a[0])
1193 + normalY * (pmtPoint2->GetY() - a[1])
1194 + normalZ * (pmtPoint2->GetZ() - a[2]);
1197 scalarProd = normalX * (pmtPoint3->GetX() - a[0])
1198 + normalY * (pmtPoint3->GetY() - a[1])
1199 + normalZ * (pmtPoint3->GetZ() - a[2]);
1207 Double_t& sphereR) {
1210 const Char_t* mirrorHalf;
1212 mirrorHalf =
"RICH_mirror_half_total_208";
1214 mirrorHalf =
"RICH_mirror_half_total_207";
1218 TObjArray* nodesTop = gGeoManager->GetTopNode()->GetNodes();
1219 for (Int_t i1 = 0; i1 < nodesTop->GetEntriesFast(); i1++) {
1220 TGeoNode* richNode = (TGeoNode*) nodesTop->At(i1);
1221 if (TString(richNode->GetName()).Contains(
"rich")) {
1222 const Double_t* trRich = richNode->GetMatrix()->GetTranslation();
1223 TObjArray* nodes2 = richNode->GetNodes();
1224 for (Int_t i2 = 0; i2 < nodes2->GetEntriesFast(); i2++) {
1225 TGeoNode* gasNode = (TGeoNode*) nodes2->At(i2);
1226 if (TString(gasNode->GetName()).Contains(
"RICH_gas")) {
1227 const Double_t* trGas = gasNode->GetMatrix()->GetTranslation();
1228 TObjArray* nodes3 = gasNode->GetNodes();
1229 for (Int_t i3 = 0; i3 < nodes3->GetEntriesFast(); i3++) {
1230 TGeoNode* mirrorHalfNode = (TGeoNode*) nodes3->At(i3);
1231 if (TString(mirrorHalfNode->GetName()).Contains(mirrorHalf)) {
1232 const Double_t* rotMirror =
1233 mirrorHalfNode->GetMatrix()->GetRotationMatrix();
1236 const Double_t* trHalfMirror =
1237 mirrorHalfNode->GetMatrix()->GetTranslation();
1238 const TGeoBBox* mirrorShape =
1239 (
const TGeoBBox*) (mirrorHalfNode->GetVolume()->GetShape());
1240 TObjArray* nodes4 = mirrorHalfNode->GetNodes();
1241 for (Int_t i4 = 0; i4 < nodes4->GetEntriesFast(); i4++) {
1242 TGeoNode* suppBeltStripNode = (TGeoNode*) nodes4->At(i4);
1243 if (TString(suppBeltStripNode->GetName())
1244 .Contains(
"RICH_mirror_and_support_belt_strip")) {
1245 const Double_t* trSuppBeltStrip =
1246 suppBeltStripNode->GetMatrix()->GetTranslation();
1247 TObjArray* nodes5 = suppBeltStripNode->GetNodes();
1248 for (Int_t i5 = 0; i5 < nodes5->GetEntriesFast(); i5++) {
1249 TGeoNode* mirrorTileNode = (TGeoNode*) nodes5->At(i5);
1251 if (TString(mirrorTileNode->GetName()).Contains(mirrID)) {
1253 const Double_t* trMirrorTile =
1254 mirrorTileNode->GetMatrix()->GetTranslation();
1255 sphereX = trRich[0] + trGas[0] + trHalfMirror[0]
1256 + trSuppBeltStrip[0] + trMirrorTile[0];
1257 sphereY = trRich[1] + trGas[1] + trHalfMirror[1]
1258 + trSuppBeltStrip[1] + trMirrorTile[1];
1259 sphereZ = trRich[2] + trGas[2] + trHalfMirror[2]
1260 + trSuppBeltStrip[2]
1268 TGeoShape* ptrShape =
1269 mirrorTileNode->GetVolume()->GetShape();
1270 TGeoSphere* ptrSphere =
1271 static_cast<TGeoSphere*
>(ptrShape);
1272 sphereR = ptrSphere->GetRmin();
1289 Double_t& sphereR) {
1292 const Char_t* mirrorHalf;
1294 mirrorHalf =
"RICH_mirror_half_total_208";
1296 mirrorHalf =
"RICH_mirror_half_total_207";
1300 TObjArray* nodesTop = gGeoManager->GetTopNode()->GetNodes();
1301 for (Int_t i1 = 0; i1 < nodesTop->GetEntriesFast(); i1++) {
1302 TGeoNode* richNode = (TGeoNode*) nodesTop->At(i1);
1303 if (TString(richNode->GetName()).Contains(
"rich")) {
1304 TGeoMatrix* matRich = richNode->GetMatrix();
1307 const Double_t* trRich = richNode->GetMatrix()->GetTranslation();
1308 TObjArray* nodes2 = richNode->GetNodes();
1309 for (Int_t i2 = 0; i2 < nodes2->GetEntriesFast(); i2++) {
1310 TGeoNode* gasNode = (TGeoNode*) nodes2->At(i2);
1311 if (TString(gasNode->GetName()).Contains(
"RICH_gas")) {
1312 TGeoMatrix* matRichGas = gasNode->GetMatrix();
1315 const Double_t* trGas = gasNode->GetMatrix()->GetTranslation();
1316 TObjArray* nodes3 = gasNode->GetNodes();
1317 for (Int_t i3 = 0; i3 < nodes3->GetEntriesFast(); i3++) {
1318 TGeoNode* mirrorHalfNode = (TGeoNode*) nodes3->At(i3);
1319 if (TString(mirrorHalfNode->GetName()).Contains(mirrorHalf)) {
1320 TGeoMatrix* matMirrorHalf = mirrorHalfNode->GetMatrix();
1323 const Double_t* rotMirrorHalf =
1324 mirrorHalfNode->GetMatrix()->GetRotationMatrix();
1327 const Double_t* trHalfMirror =
1328 mirrorHalfNode->GetMatrix()->GetTranslation();
1329 const TGeoBBox* mirrorShape =
1330 (
const TGeoBBox*) (mirrorHalfNode->GetVolume()->GetShape());
1331 TObjArray* nodes4 = mirrorHalfNode->GetNodes();
1332 for (Int_t i4 = 0; i4 < nodes4->GetEntriesFast(); i4++) {
1333 TGeoNode* suppBeltStripNode = (TGeoNode*) nodes4->At(i4);
1334 if (TString(suppBeltStripNode->GetName())
1335 .Contains(
"RICH_mirror_and_support_belt_strip")) {
1336 TGeoMatrix* matSuppBeltStrip = suppBeltStripNode->GetMatrix();
1339 const Double_t* trSuppBeltStrip =
1340 suppBeltStripNode->GetMatrix()->GetTranslation();
1341 TObjArray* nodes5 = suppBeltStripNode->GetNodes();
1342 for (Int_t i5 = 0; i5 < nodes5->GetEntriesFast(); i5++) {
1343 TGeoNode* mirrorTileNode = (TGeoNode*) nodes5->At(i5);
1345 if (TString(mirrorTileNode->GetName()).Contains(mirrID)) {
1350 const Double_t* trMirrorTile =
1351 mirrorTileNode->GetMatrix()->GetTranslation();
1352 const Double_t* rotMirrorTile =
1353 mirrorTileNode->GetMatrix()->GetRotationMatrix();
1354 sphereX = trRich[0] + trGas[0] + trHalfMirror[0]
1355 + trSuppBeltStrip[0] + trMirrorTile[1];
1356 sphereY = trRich[1] + trGas[1] + trHalfMirror[1]
1357 + trSuppBeltStrip[1] + trMirrorTile[2];
1358 sphereZ = trRich[2] + trGas[2] + trHalfMirror[2]
1359 + trSuppBeltStrip[2]
1361 TGeoShape* ptrShape =
1362 mirrorTileNode->GetVolume()->GetShape();
1363 TGeoSphere* ptrSphere =
1364 static_cast<TGeoSphere*
>(ptrShape);
1365 sphereR = ptrSphere->GetRmin();
1382 for (Int_t
i = 0;
i < nofHits;
i++) {
1383 Int_t hitInd = ring1->
GetHit(
i);
1385 if (NULL == hit)
continue;
1386 TVector3 inputHit(hit->
GetX(), hit->
GetY(), hit->
GetZ());
1388 CbmRichHitProducer::TiltPoint(
1396 TCanvas* can =
new TCanvas(
1427 TCanvas* can2 =
new TCanvas(
fRunTitle +
"_Separated_Ellipse",
1460 TCanvas* can3 =
new TCanvas(
fRunTitle +
"_Separated_Ellipse",
1470 DrawH1(
fHM->
H1(
"fhDistanceCenterToExtrapolatedTrack"));
1472 DrawH1(
fHM->
H1(
"fhDistanceCenterToExtrapolatedTrackInPlane"));
1477 TFile* file =
new TFile(fileName,
"READ");
1488 cout << endl <<
"Mirror counter = " <<
fMirrCounter << endl;