|
REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
Definition at line 16 of file TRestGeant4GeometryInfo.h.
Public Member Functions | |
| std::vector< TString > | GetAllAlternativePhysicalVolumes () const |
| Gets all the alternative (GDML) physical volume names. More... | |
| std::vector< TString > | GetAllLogicalVolumes () const |
| Gets all the logical volume names. More... | |
| std::vector< TString > | GetAllLogicalVolumesMatchingExpression (const TString &) const |
| Gets all the logical volume names matching a given regular expression. More... | |
| std::vector< TString > | GetAllPhysicalVolumes () const |
| Gets all the (GDML) physical volume names. More... | |
| std::vector< TString > | GetAllPhysicalVolumesFromLogical (const TString &logicalVolume) const |
| Gets all the (Geant4) physical volume names corresponding to a given logical volume name. More... | |
| std::vector< TString > | GetAllPhysicalVolumesMatchingExpression (const TString &) const |
| Gets all the (GDML) physical volume names matching a given regular expression. More... | |
| TString | GetAlternativeNameFromGeant4PhysicalName (const TString &) const |
| Gets the alternative physical volume name from the GDML file naming. Note that if a logical volume with daughter volumes is placed several times, their children physical volume will share the same Geant4 physical volume name but different alternative names. This method will return the first alternative name found. To get all the alternative names for a given Geant4 physical volume name, use GetAlternativeNamesFromGeant4PhysicalName(). More... | |
| std::set< TString > | GetAlternativeNamesFromGeant4PhysicalName (const TString &) const |
| Gets all the alternative physical volume names from the GDML file naming that correspond to a given Geant4 physical volume name. Note that if a logical volume with daughter volumes is placed several times, their children physical volume will share the same Geant4 physical volume name but different alternative names. This method will return all the alternative names found. More... | |
| TString | GetAlternativePathFromGeant4Path (const TString &) const |
| Converts a Geant4 volume path to a GDML volume path. The path is the concatenation of the names of the nested volumes from the world to the desired volume. This method is meant to handle the conversion of assembly imprints names to the GDML assembly names used in the GDML file. More... | |
| TString | GetGeant4PhysicalNameFromAlternativeName (const TString &) const |
| Int_t | GetIDFromVolume (const TString &volumeName) const |
| TString | GetPathSeparator () const |
| TVector3 | GetPosition (const TString &volume) const |
| Gets the position in world coordinates of a given physical volume. More... | |
| TRotation | GetRotation (const TString &volume) const |
| Gets the rotation in world coordinates of a given physical volume. More... | |
| TString | GetVolumeFromID (Int_t id) const |
| void | InsertVolumeName (Int_t id, const TString &volumeName) |
| bool | IsAssembly () const |
| bool | IsValidGdmlName (const TString &volume) const |
| bool | IsValidGeant4PhysicalVolume (const TString &volume) const |
| Checks if a (Geant4) physical volume name exists in the geometry. More... | |
| bool | IsValidLogicalVolume (const TString &volume) const |
| Checks if a logical volume name exists in the geometry. More... | |
| bool | IsValidPhysicalVolume (const TString &volume) const |
| Checks if a (GDML) physical volume name exists in the geometry. More... | |
| void | PopulateFromGdml (const TString &) |
| void | Print (bool multiLine=false) const |
| void | SetPathSeparator (const TString &separator) |
Data Fields | |
| std::map< TString, std::map< TString, TString > > | fGdmlAssemblyToChildrenGeant4ToGdmlPhysicalNameMap |
| std::vector< TString > | fGdmlLogicalNames |
| Logical volume names as in the GDML file. More... | |
| std::vector< TString > | fGdmlNewPhysicalNames |
| Physical volume names as in the GDML file. More... | |
| std::map< TString, TString > | fGeant4AssemblyImprintToAssemblyLogicalNameMap |
| std::map< TString, TString > | fGeant4AssemblyImprintToGdmlNameMap |
| std::map< TString, TString > | fLogicalToMaterialMap |
| Map of logical volume name to its material name. More... | |
| std::map< TString, std::vector< TString > > | fLogicalToPhysicalMap |
| std::map< TString, TString > | fNewPhysicalToGeant4PhysicalNameMap |
| Map from new physical volume names (unique) to Geant4 physical volume names (not always unique) More... | |
| std::map< TString, TString > | fPhysicalToLogicalVolumeMap |
| Map of GDML physical volume name to its logical volume name. More... | |
| std::map< TString, TVector3 > | fPhysicalToPositionInWorldMap |
| Map of GDML physical volume name to its position in world coordinates. More... | |
| std::map< TString, TRotation > | fPhysicalToRotationInWorldMap |
| Map of GDML physical volume name to its rotation in world coordinates. More... | |
Private Member Functions | |
| void | InitializeOnDetectorConstruction (const TString &gdmlFilename, const G4VPhysicalVolume *world) |
| void | PopulateFromGeant4World (const G4VPhysicalVolume *) |
Private Attributes | |
| bool | fIsAssembly = false |
| TString | fPathSeparator = "_" |
| std::map< Int_t, TString > | fVolumeNameMap = {} |
| std::map< TString, Int_t > | fVolumeNameReverseMap = {} |
Friends | |
| class | DetectorConstruction |
| std::vector< TString > TRestGeant4GeometryInfo::GetAllAlternativePhysicalVolumes | ( | ) | const |
Gets all the alternative (GDML) physical volume names.
Definition at line 506 of file TRestGeant4GeometryInfo.cxx.
| std::vector< TString > TRestGeant4GeometryInfo::GetAllLogicalVolumes | ( | ) | const |
Gets all the logical volume names.
Definition at line 476 of file TRestGeant4GeometryInfo.cxx.
| std::vector< TString > TRestGeant4GeometryInfo::GetAllLogicalVolumesMatchingExpression | ( | const TString & | regularExpression | ) | const |
Gets all the logical volume names matching a given regular expression.
| regularExpression | The regular expression to match logical volume names. |
Definition at line 543 of file TRestGeant4GeometryInfo.cxx.
| std::vector< TString > TRestGeant4GeometryInfo::GetAllPhysicalVolumes | ( | ) | const |
Gets all the (GDML) physical volume names.
Definition at line 491 of file TRestGeant4GeometryInfo.cxx.
|
inline |
Gets all the (Geant4) physical volume names corresponding to a given logical volume name.
Definition at line 116 of file TRestGeant4GeometryInfo.h.
| std::vector< TString > TRestGeant4GeometryInfo::GetAllPhysicalVolumesMatchingExpression | ( | const TString & | regularExpression | ) | const |
Gets all the (GDML) physical volume names matching a given regular expression.
| regularExpression | The regular expression to match physical volume names. |
Definition at line 522 of file TRestGeant4GeometryInfo.cxx.
| TString TRestGeant4GeometryInfo::GetAlternativeNameFromGeant4PhysicalName | ( | const TString & | geant4PhysicalName | ) | const |
Gets the alternative physical volume name from the GDML file naming. Note that if a logical volume with daughter volumes is placed several times, their children physical volume will share the same Geant4 physical volume name but different alternative names. This method will return the first alternative name found. To get all the alternative names for a given Geant4 physical volume name, use GetAlternativeNamesFromGeant4PhysicalName().
| geant4PhysicalName | The Geant4 physical volume name. |
Definition at line 369 of file TRestGeant4GeometryInfo.cxx.
| set< TString > TRestGeant4GeometryInfo::GetAlternativeNamesFromGeant4PhysicalName | ( | const TString & | geant4PhysicalName | ) | const |
Gets all the alternative physical volume names from the GDML file naming that correspond to a given Geant4 physical volume name. Note that if a logical volume with daughter volumes is placed several times, their children physical volume will share the same Geant4 physical volume name but different alternative names. This method will return all the alternative names found.
| geant4PhysicalName | The Geant4 physical volume name. |
Definition at line 389 of file TRestGeant4GeometryInfo.cxx.
| TString TRestGeant4GeometryInfo::GetAlternativePathFromGeant4Path | ( | const TString & | geant4Path | ) | const |
Converts a Geant4 volume path to a GDML volume path. The path is the concatenation of the names of the nested volumes from the world to the desired volume. This method is meant to handle the conversion of assembly imprints names to the GDML assembly names used in the GDML file.
| geant4Path | The Geant4 volume path. |
Definition at line 335 of file TRestGeant4GeometryInfo.cxx.
| TString TRestGeant4GeometryInfo::GetGeant4PhysicalNameFromAlternativeName | ( | const TString & | alternativeName | ) | const |
Definition at line 400 of file TRestGeant4GeometryInfo.cxx.
| Int_t TRestGeant4GeometryInfo::GetIDFromVolume | ( | const TString & | volumeName | ) | const |
Definition at line 420 of file TRestGeant4GeometryInfo.cxx.
|
inline |
Definition at line 134 of file TRestGeant4GeometryInfo.h.
|
inline |
Gets the position in world coordinates of a given physical volume.
Definition at line 124 of file TRestGeant4GeometryInfo.h.
|
inline |
Gets the rotation in world coordinates of a given physical volume.
Definition at line 129 of file TRestGeant4GeometryInfo.h.
| TString TRestGeant4GeometryInfo::GetVolumeFromID | ( | Int_t | id | ) | const |
Definition at line 416 of file TRestGeant4GeometryInfo.cxx.
|
inlineprivate |
Definition at line 28 of file TRestGeant4GeometryInfo.h.
| void TRestGeant4GeometryInfo::InsertVolumeName | ( | Int_t | id, |
| const TString & | volumeName | ||
| ) |
Definition at line 430 of file TRestGeant4GeometryInfo.cxx.
|
inline |
Definition at line 133 of file TRestGeant4GeometryInfo.h.
|
inline |
Definition at line 91 of file TRestGeant4GeometryInfo.h.
|
inline |
Checks if a (Geant4) physical volume name exists in the geometry.
Definition at line 101 of file TRestGeant4GeometryInfo.h.
|
inline |
Checks if a logical volume name exists in the geometry.
Definition at line 111 of file TRestGeant4GeometryInfo.h.
|
inline |
Checks if a (GDML) physical volume name exists in the geometry.
Definition at line 106 of file TRestGeant4GeometryInfo.h.
| void TRestGeant4GeometryInfo::PopulateFromGdml | ( | const TString & | gdmlFilename | ) |
Definition at line 70 of file TRestGeant4GeometryInfo.cxx.
| void TRestGeant4GeometryInfo::Print | ( | bool | multiLine = false | ) | const |
Definition at line 435 of file TRestGeant4GeometryInfo.cxx.
|
inline |
Definition at line 135 of file TRestGeant4GeometryInfo.h.
|
friend |
Definition at line 143 of file TRestGeant4GeometryInfo.h.
| std::map<TString, std::map<TString, TString> > TRestGeant4GeometryInfo::fGdmlAssemblyToChildrenGeant4ToGdmlPhysicalNameMap |
Map of each assembly name to a map of Geant4 naming of the assembly daughters to their GDML physical volume names. For example: {"micromegas_assembly" -> { "mMBaseLV_pv_0" -> "mMBase", "mMBaseClosingBracketLV_pv_1" -> "mMBaseClosingBracket1"}}
Definition at line 52 of file TRestGeant4GeometryInfo.h.
| std::vector<TString> TRestGeant4GeometryInfo::fGdmlLogicalNames |
Logical volume names as in the GDML file.
Definition at line 39 of file TRestGeant4GeometryInfo.h.
| std::vector<TString> TRestGeant4GeometryInfo::fGdmlNewPhysicalNames |
Physical volume names as in the GDML file.
Definition at line 36 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TString> TRestGeant4GeometryInfo::fGeant4AssemblyImprintToAssemblyLogicalNameMap |
Map of GDML physical volume name of an assembly to its assembly name. For example: {"micromegasRight" -> "micromegas_assembly"}
Definition at line 56 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TString> TRestGeant4GeometryInfo::fGeant4AssemblyImprintToGdmlNameMap |
Map of Geant4 prefix for the assembly imprint to the GDML physical volume name of that assembly imprint. For example: {"av_1_impr_1" -> "micromegasRight" , "av_1_impr_2" -> "micromegasleft"}
Definition at line 47 of file TRestGeant4GeometryInfo.h.
|
private |
Definition at line 20 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TString> TRestGeant4GeometryInfo::fLogicalToMaterialMap |
Map of logical volume name to its material name.
Definition at line 66 of file TRestGeant4GeometryInfo.h.
| std::map<TString, std::vector<TString> > TRestGeant4GeometryInfo::fLogicalToPhysicalMap |
Map of logical volume name to their Geant4 physical volume names. Note that many physical volumes can share the same logical volume.
Definition at line 63 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TString> TRestGeant4GeometryInfo::fNewPhysicalToGeant4PhysicalNameMap |
Map from new physical volume names (unique) to Geant4 physical volume names (not always unique)
Definition at line 43 of file TRestGeant4GeometryInfo.h.
|
private |
Definition at line 21 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TString> TRestGeant4GeometryInfo::fPhysicalToLogicalVolumeMap |
Map of GDML physical volume name to its logical volume name.
Definition at line 59 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TVector3> TRestGeant4GeometryInfo::fPhysicalToPositionInWorldMap |
Map of GDML physical volume name to its position in world coordinates.
Definition at line 69 of file TRestGeant4GeometryInfo.h.
| std::map<TString, TRotation> TRestGeant4GeometryInfo::fPhysicalToRotationInWorldMap |
Map of GDML physical volume name to its rotation in world coordinates.
Definition at line 72 of file TRestGeant4GeometryInfo.h.
|
private |
Definition at line 23 of file TRestGeant4GeometryInfo.h.
|
private |
Definition at line 24 of file TRestGeant4GeometryInfo.h.