2 #ifndef RICH_CbmRichNavigationUtil
3 #define RICH_CbmRichNavigationUtil
5 #include "FairLogger.h"
6 #include "FairTrackParam.h"
16 const string& volumeName) {
18 pos.SetXYZ(par->GetX(), par->GetY(), par->GetZ());
21 dirCos.SetXYZ(nx, ny, nz);
29 const string& volumeName) {
31 gGeoManager->InitTrack(
32 pos.X(),
pos.Y(),
pos.Z(), dirCos.X(), dirCos.Y(), dirCos.Z());
34 if (gGeoManager->IsOutside()) {
return string(
""); }
37 gGeoManager->PushPoint();
38 string name = string(gGeoManager->GetCurrentNode()->GetName());
39 string fullPath = string(gGeoManager->GetPath());
40 Double_t
x = gGeoManager->GetCurrentPoint()[0];
41 Double_t
y = gGeoManager->GetCurrentPoint()[1];
42 Double_t z = gGeoManager->GetCurrentPoint()[2];
45 std::size_t found = name.find(volumeName);
46 if (found != std::string::npos) {
48 crossPoint.SetXYZ(
x,
y, z);
49 gGeoManager->PopPoint();
55 gGeoManager->FindNextBoundaryAndStep(step);
56 if (gGeoManager->IsOutside()) {
58 gGeoManager->PopDummy();
62 if (std::isnan(gGeoManager->GetCurrentPoint()[0])
63 || std::isnan(gGeoManager->GetCurrentPoint()[1])
64 || std::isnan(gGeoManager->GetCurrentPoint()[2])) {
66 gGeoManager->PopDummy();
70 gGeoManager->PopDummy();
82 (std::abs(par->GetQp()) != 0.) ? 1. / std::abs(par->GetQp()) : 1.e20;
84 p * p / (par->GetTx() * par->GetTx() + par->GetTy() * par->GetTy() + 1));
85 Double_t px = par->GetTx() * pz;
86 Double_t py = par->GetTy() * pz;
87 TVector3 unit = TVector3(px, py, pz).Unit();