12#include "TGeoManager.h"
13#include "TGeoMaterial.h"
15#include "TGeoVolume.h"
27 std::vector<CbmLitMaterialInfo>& inter)
29 Bool_t downstream = zOut >= par->
GetZ();
33 if (gGeoManager->IsOutside()) {
40 std::cout.precision(7);
43 gGeoManager->PushPoint();
47 if (gGeoManager->IsOutside()) {
49 gGeoManager->PopDummy();
53 if (std::isnan(gGeoManager->GetCurrentPoint()[0]) || std::isnan(gGeoManager->GetCurrentPoint()[1])
54 || std::isnan(gGeoManager->GetCurrentPoint()[2])) {
56 gGeoManager->PopDummy();
60 Bool_t away = (downstream) ? stepInfo.
GetZpos() >= zOut : stepInfo.
GetZpos() <= zOut;
62 gGeoManager->PopPoint();
69 gGeoManager->PopDummy();
71 inter.push_back(stepInfo);
86 gGeoManager->InitTrack(par->
GetX(), par->
GetY(), par->
GetZ(), nx, ny, nz);
93 TGeoMaterial* mat = gGeoManager->GetCurrentNode()->GetMedium()->GetMaterial();
94 matInfo.
SetRL(mat->GetRadLen());
95 matInfo.
SetRho(mat->GetDensity());
96 matInfo.
SetZ(mat->GetZ());
97 matInfo.
SetA(mat->GetA());
98 matInfo.
SetName(gGeoManager->GetCurrentNode()->GetName());
104 gGeoManager->SetStep(step);
105 gGeoManager->Step(kFALSE);
108 matInfo.
SetLength(gGeoManager->GetStep());
109 matInfo.
SetZpos(gGeoManager->GetCurrentPoint()[2]);
117 litfloat nx = gGeoManager->GetCurrentDirection()[0];
118 litfloat ny = gGeoManager->GetCurrentDirection()[1];
119 litfloat nz = gGeoManager->GetCurrentDirection()[2];
120 litfloat z = gGeoManager->GetCurrentPoint()[2];
129 return std::sqrt(dx * dx + dy * dy + dz * dz);
Data class for track parameters.
void SetRho(litfloat rho)
void SetName(const string &name)
void SetLength(litfloat length)
void SetZpos(litfloat zpos)
virtual ~CbmLitTGeoNavigator()
LitStatus FindIntersections(const CbmLitTrackParam *par, litfloat zOut, std::vector< CbmLitMaterialInfo > &inter)
litfloat CalcLength(litfloat zOut) const
CbmLitMaterialInfo MakeStep(litfloat step=0.) const
void InitTrack(const CbmLitTrackParam *par, Bool_t downstream) const
Data class for track parameters.
void GetDirCos(litfloat &nx, litfloat &ny, litfloat &nz) const
Return direction cosines.
static const litfloat MAXIMUM_TGEO_NAVIGATION_DISTANCE