2 #ifndef RICH_CbmRichNavigationUtil2
3 #define RICH_CbmRichNavigationUtil2
5 #include "FairLogger.h"
6 #include "FairTrackParam.h"
16 const string& volumeName,
17 TGeoNavigator* navi) {
19 pos.SetXYZ(par->GetX(), par->GetY(), par->GetZ());
22 dirCos.SetXYZ(nx, ny, nz);
30 const string& volumeName,
31 TGeoNavigator* navi) {
33 gGeoManager->InitTrack(
34 pos.X(),
pos.Y(),
pos.Z(), dirCos.X(), dirCos.Y(), dirCos.Z());
36 if (gGeoManager->IsOutside()) {
return string(
""); }
39 gGeoManager->PushPoint();
40 string name = string(gGeoManager->GetCurrentNode()->GetName());
41 Double_t
x = gGeoManager->GetCurrentPoint()[0];
42 Double_t
y = gGeoManager->GetCurrentPoint()[1];
43 Double_t z = gGeoManager->GetCurrentPoint()[2];
46 std::size_t found = name.find(volumeName);
47 if (found != std::string::npos) {
49 crossPoint.SetXYZ(
x,
y, z);
50 gGeoManager->PopPoint();
51 navi = gGeoManager->GetCurrentNavigator();
57 gGeoManager->FindNextBoundaryAndStep(step);
58 if (gGeoManager->IsOutside()) {
60 gGeoManager->PopDummy();
64 if (std::isnan(gGeoManager->GetCurrentPoint()[0])
65 || std::isnan(gGeoManager->GetCurrentPoint()[1])
66 || std::isnan(gGeoManager->GetCurrentPoint()[2])) {
68 gGeoManager->PopDummy();
72 gGeoManager->PopDummy();
84 (std::abs(par->GetQp()) != 0.) ? 1. / std::abs(par->GetQp()) : 1.e20;
86 p * p / (par->GetTx() * par->GetTx() + par->GetTy() * par->GetTy() + 1));
87 Double_t px = par->GetTx() * pz;
88 Double_t py = par->GetTy() * pz;
89 TVector3 unit = TVector3(px, py, pz).Unit();