15 #include "RtypesCore.h"
16 #include "TCollection.h"
19 #include "TGeoVolume.h"
20 #include "TObjArray.h"
25 const TGeoMatrix& gmatrix) {
27 if (state.
volume !=
nullptr) {
34 auto daughters = state.
volume->GetNodes();
36 TIter iObj(daughters);
37 while (TObject* obj = iObj()) {
38 TGeoNode*
node =
dynamic_cast<TGeoNode*
>(obj);
39 if (node !=
nullptr) {
42 select(state, options, gmatrix);
45 }
else if (state.
node !=
nullptr) {
50 const TGeoMatrix* nmatrix = state.
node->GetMatrix();
51 TGeoHMatrix
transform = TGeoCombiTrans(gmatrix) * TGeoCombiTrans(*nmatrix);
53 transform.SetName((nodeName + suffix).c_str());
58 const Double_t* rotation = transform.GetRotationMatrix();
59 const Double_t*
translation = transform.GetTranslation();
63 options.
unit * translation[2]);
64 Vector3 cx(rotation[0], rotation[3], rotation[6]);
65 Vector3 cy(rotation[1], rotation[4], rotation[7]);
66 Vector3 cz(rotation[2], rotation[5], rotation[8]);
72 dynamic_cast<TGeoBBox*
>(state.
node->GetVolume()->GetShape());
76 double dx = options.
unit *
shape->GetDX();
79 for (
auto x : std::vector<double>{-dx, dx}) {
80 for (
auto y : std::vector<double>{-
dy, dy}) {
81 for (
auto z : std::vector<double>{-
dz, dz}) {
85 if (val < check.second.first or val >
check.second.second) {
102 state.
node =
nullptr;
104 select(state, options, transform);