Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion inc/TRestGeant4GeometryInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define REST_TRESTGEANT4GEOMETRYINFO_H

#include <TRestStringOutput.h>
#include <TRotation.h>
#include <TString.h>
#include <TVector3.h>

Expand All @@ -13,7 +14,7 @@
class G4VPhysicalVolume;

class TRestGeant4GeometryInfo {
ClassDef(TRestGeant4GeometryInfo, 4);
ClassDef(TRestGeant4GeometryInfo, 5);

private:
bool fIsAssembly = false;
Expand Down Expand Up @@ -67,6 +68,9 @@ class TRestGeant4GeometryInfo {
/// Map of GDML physical volume name to its position in world coordinates
std::map<TString, TVector3> fPhysicalToPositionInWorldMap;

/// Map of GDML physical volume name to its rotation in world coordinates
std::map<TString, TRotation> fPhysicalToRotationInWorldMap;

public:
inline TRestGeant4GeometryInfo() = default;

Expand Down Expand Up @@ -121,6 +125,11 @@ class TRestGeant4GeometryInfo {
return fPhysicalToPositionInWorldMap.at(volume);
}

/// \brief Gets the rotation in world coordinates of a given physical volume.
inline TRotation GetRotation(const TString& volume) const {
return fPhysicalToRotationInWorldMap.at(volume);
}

inline bool IsAssembly() const { return fIsAssembly; }
inline TString GetPathSeparator() const { return fPathSeparator; }
void SetPathSeparator(const TString& separator) { fPathSeparator = separator; }
Expand Down
Loading