11 #include "TGeoManager.h"
12 #include "TGeoMaterial.h"
14 #include "TGeoVolume.h"
26 std::vector<CbmLitMaterialInfo>& inter) {
27 Bool_t downstream = zOut >= par->
GetZ();
31 if (gGeoManager->IsOutside()) {
return kLITERROR; }
36 std::cout.precision(7);
39 gGeoManager->PushPoint();
43 if (gGeoManager->IsOutside()) {
45 gGeoManager->PopDummy();
49 if (std::isnan(gGeoManager->GetCurrentPoint()[0])
50 || std::isnan(gGeoManager->GetCurrentPoint()[1])
51 || std::isnan(gGeoManager->GetCurrentPoint()[2])) {
53 gGeoManager->PopDummy();
58 (downstream) ? stepInfo.
GetZpos() >= zOut : stepInfo.
GetZpos() <= zOut;
60 gGeoManager->PopPoint();
66 gGeoManager->PopDummy();
68 inter.push_back(stepInfo);
74 Bool_t downstream)
const {
83 gGeoManager->InitTrack(par->
GetX(), par->
GetY(), par->
GetZ(), nx, ny, nz);
89 TGeoMaterial* mat = gGeoManager->GetCurrentNode()->GetMedium()->GetMaterial();
90 matInfo.
SetRL(mat->GetRadLen());
91 matInfo.
SetRho(mat->GetDensity());
92 matInfo.
SetZ(mat->GetZ());
93 matInfo.
SetA(mat->GetA());
94 matInfo.
SetName(gGeoManager->GetCurrentNode()->GetName());
97 gGeoManager->FindNextBoundaryAndStep(
100 gGeoManager->SetStep(step);
101 gGeoManager->Step(kFALSE);
104 matInfo.
SetLength(gGeoManager->GetStep());
105 matInfo.
SetZpos(gGeoManager->GetCurrentPoint()[2]);
112 litfloat nx = gGeoManager->GetCurrentDirection()[0];
113 litfloat ny = gGeoManager->GetCurrentDirection()[1];
114 litfloat nz = gGeoManager->GetCurrentDirection()[2];
115 litfloat z = gGeoManager->GetCurrentPoint()[2];
124 return std::sqrt(dx * dx + dy * dy + dz * dz);