X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=Flugg%2FFGeometryInit.hh;h=bbd97591fcd706745bc9658a9bd38a399ea5408c;hp=6abeed01d78a8d74b0ce6f3914c6aa2bcf3dafa1;hb=bf547b2f6ebfee62abe271bd2c8659db40b20a2d;hpb=26911512e1b692a0d1b41f58429f7abee68ff385 diff --git a/Flugg/FGeometryInit.hh b/Flugg/FGeometryInit.hh index 6abeed01d78..bbd97591fcd 100644 --- a/Flugg/FGeometryInit.hh +++ b/Flugg/FGeometryInit.hh @@ -30,55 +30,88 @@ #include "G4TransportationManager.hh" +#include + class FluggNavigator; +class FlukaMaterial; +class FlukaCompound; + +class FGeometryInit : public G4TransportationManager { + +public: + ~FGeometryInit(); //destructor + static FGeometryInit *GetInstance(); + inline FluggNavigator *getNavigatorForTracking(); + inline G4FieldManager * getFieldManager(); + inline void setDetConstruction(G4VUserDetectorConstruction* detector); + inline void setDetector(); + inline void setMotherVolume(); + void createFlukaMatFile(); + void closeGeometry(); + + void PrintHistories(); + void InitHistories(); + void DeleteHistories(); + void UpdateHistories(const G4NavigationHistory *, G4int); + inline G4TouchableHistory * GetTouchableHistory(); + inline G4TouchableHistory * GetOldNavHist(); + inline G4TouchableHistory * GetTempNavHist(); + + void InitHistArray(); + inline void DelHistArray(); + inline G4int * GetHistArray(); + + void InitJrLtGeantArray(); + inline G4int * GetJrLtGeantArray(); + inline G4int GetLttcFlagGeant(); + void SetLttcFlagGeant(G4int); + void PrintJrLtGeant(); + + //Map access methods + G4int GetRegionFromName(const char* volName) const; + -class FGeometryInit : public G4TransportationManager -{ - public: - ~FGeometryInit(); //destructor - static FGeometryInit *GetInstance(); - inline FluggNavigator *getNavigatorForTracking(); - inline G4FieldManager * getFieldManager(); - inline void setDetConstruction(G4VUserDetectorConstruction* detector); - inline void setDetector(); - inline void setMotherVolume(); - void createFlukaMatFile(); - void closeGeometry(); - - void PrintHistories(); - void InitHistories(); - void DeleteHistories(); - void UpdateHistories(const G4NavigationHistory *, G4int); - inline G4TouchableHistory * GetTouchableHistory(); - inline G4TouchableHistory * GetOldNavHist(); - inline G4TouchableHistory * GetTempNavHist(); - - void InitHistArray(); - inline void DelHistArray(); - inline G4int * GetHistArray(); - - void InitJrLtGeantArray(); - inline G4int * GetJrLtGeantArray(); - inline G4int GetLttcFlagGeant(); - void SetLttcFlagGeant(G4int); - void PrintJrLtGeant(); - - private: - FGeometryInit(); //costructor - G4VUserDetectorConstruction * fDetector; - G4FieldManager * fFieldManager; - G4TransportationManager * fTransportationManager; - static FGeometryInit *flagInstance; - G4VPhysicalVolume * myTopNode; - G4GeometryManager * ptrGeoMan; - G4int * ptrArray; - G4TouchableHistory * ptrTouchHist; - G4TouchableHistory * ptrOldNavHist; - G4TouchableHistory * ptrTempNavHist; - G4int * ptrJrLtGeant; - G4int flagLttcGeant; +protected: + void BuildRegionsMap(); + void PrintRegionsMap(G4std::ostream& os); + void BuildMaterialTables(); + FlukaMaterial* BuildFlukaMaterialFromElement(const G4Element* element, + G4double matDensity); + FlukaMaterial* BuildFlukaMaterialFromIsotope(const G4Isotope* isotope, + G4double matDensity); + FlukaCompound* BuildFlukaCompoundFromMaterial(const G4Material* material); + FlukaCompound* BuildFlukaCompoundFromElement(const G4Element* element, + G4double matDensity); + void PrintMaterialTables(G4std::ostream& os); + void PrintAssignmat(G4std::ostream& os); + void PrintMagneticField(G4std::ostream& os); + +private: + FGeometryInit(); //costructor + +private: + G4VUserDetectorConstruction * fDetector; + G4FieldManager * fFieldManager; + G4TransportationManager * fTransportationManager; + static FGeometryInit *flagInstance; + G4VPhysicalVolume * myTopNode; + G4GeometryManager * ptrGeoMan; + G4int * ptrArray; + G4TouchableHistory * ptrTouchHist; + G4TouchableHistory * ptrOldNavHist; + G4TouchableHistory * ptrTempNavHist; + G4int * ptrJrLtGeant; + G4int flagLttcGeant; + + G4std::map > fRegionVolumeMap; + G4std::map > G4FlukaMaterialMap; + G4std::map > G4FlukaCompoundMap; + //G4int NOfMaterials; }; +typedef G4std::map >::const_iterator RegionIterator; +typedef G4std::vector::const_iterator MatTableIterator; + //Include the file with the inline methods #include "FGeometryInit.icc"