4 #ifndef EDepSim_RootGeometryManager_hh_Seen 5 #define EDepSim_RootGeometryManager_hh_Seen 13 #include <G4String.hh> 14 #include <G4ThreeVector.hh> 28 class G4VPhysicalVolume;
31 namespace EDepSim {
class RootGeometryManager;}
81 int GetColor(
const G4VPhysicalVolume* vol);
85 double GetOpacity(
const G4VPhysicalVolume* vol);
130 TGeoShape*
CreateShape(
const G4VSolid* theSolid, TGeoMatrix **mat = NULL);
135 TGeoMedium* theMedium);
146 TGeoManager* theEnvelope,
147 TGeoVolume* theMother);
163 virtual bool IgnoreVolume(
const G4VPhysicalVolume* theVol);
166 virtual bool PrintMass(
const G4VPhysicalVolume* theVol);
double GetOpacity(const G4VPhysicalVolume *vol)
virtual ~RootGeometryManager()
virtual void ShouldPrintMass(std::string name)
A method to request that a volume mass should be printed;.
std::map< G4String, int > fNodeCount
A map between G4 volume names and count of volumes with that name.
std::map< G4String, TGeoMedium * > fMedium
A map between G4 material names and Root Material definitions.
G4Color GetG4Color(G4Material *material)
void Update(const G4VPhysicalVolume *aWorld, bool validate)
Update the root geometry to match the g4 geometry.
AttributeMap fColorMap
A map between a material name and a color.
virtual TGeoMedium * AverageMaterial(const G4VPhysicalVolume *theVol)
virtual bool IgnoreVolume(const G4VPhysicalVolume *theVol)
std::vector< G4String > fNameStack
virtual std::string MaterialName(const G4VPhysicalVolume *theVol)
void Validate()
Make sure that the current geometry passes a bunch of tests.
std::vector< G4String > fPrintMass
A vector of volume names to print.
void Export(const char *file)
Export the geometry to a file.
TGeoVolume * CreateVolume(const G4VSolid *theSolid, std::string theName, TGeoMedium *theMedium)
Create a new ROOT volume object.
std::map< G4String, DrawAttributes > AttributeMap
void CreateMaterials(const G4VPhysicalVolume *theVol)
static EDepSim::RootGeometryManager * fThis
The pointer to the instantiation of this object.
int GetColor(const G4VPhysicalVolume *vol)
Construct a module from components.
RootGeometryManager()
use Get() instead
virtual bool PrintMass(const G4VPhysicalVolume *theVol)
A method to flag that a volume mass should be printed.
def validate(nxgraph, desc)
void SetDrawAtt(G4Material *material, int color, double opacity=1.0)
Set material color.
std::size_t color(std::string const &procname)
int HowManySimilarNodesInVolume(TGeoVolume *theMother, std::string theName)
TGeoShape * CreateShape(const G4VSolid *theSolid, TGeoMatrix **mat=NULL)
bool CreateEnvelope(const G4VPhysicalVolume *theVol, TGeoManager *theEnvelope, TGeoVolume *theMother)
std::map< G4LogicalVolume *, TGeoVolume * > fKnownVolumes
std::map< G4String, TGeoElement * > fIsotope
A map between G4 isotope names and Root Element definitions.
int GetNodeId(const G4ThreeVector &pos)
Get a volume ID base on the volume position.
std::set< G4String > fPrintedMass
A map of which masses have been printed.
static EDepSim::RootGeometryManager * Get(void)
If a persistency manager has not been created, create one.