]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: geometry | |
3 | // | |
ad42298e | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class AliModulesComposition | |
7 | // --------------------------- | |
676fb573 | 8 | // Detector construction base class for building geometry |
80ed9a99 | 9 | // composed from modules. |
676fb573 | 10 | |
11 | #ifndef ALI_MODULES_COMPOSITION_H | |
12 | #define ALI_MODULES_COMPOSITION_H | |
13 | ||
ad42298e | 14 | #include "AliModulesCompositionMessenger.h" |
676fb573 | 15 | #include "AliModuleType.h" |
16 | ||
17 | #include <G4VUserDetectorConstruction.hh> | |
18 | #include <globals.hh> | |
ad42298e | 19 | #include <g4std/vector> |
676fb573 | 20 | |
80ed9a99 | 21 | class AliModuleConstruction; |
676fb573 | 22 | class AliMagneticField; |
23 | ||
24 | class G4VPhysicalVolume; | |
25 | ||
26 | class AliModulesComposition : public G4VUserDetectorConstruction | |
27 | { | |
80ed9a99 | 28 | typedef G4std::vector<AliModuleConstruction*> AliModuleConstructionVector; |
29 | ||
676fb573 | 30 | public: |
31 | AliModulesComposition(); | |
32 | // --> protected | |
33 | // AliModulesComposition(const AliModulesComposition& right); | |
34 | virtual ~AliModulesComposition(); | |
35 | ||
36 | // methods | |
37 | virtual G4VPhysicalVolume* Construct() = 0; | |
80ed9a99 | 38 | virtual void GenerateXMLGeometry() const = 0; |
39 | virtual void PrintMaterials() const; | |
676fb573 | 40 | |
41 | // set methods | |
42 | void SetMagField(G4double fieldValue); | |
676fb573 | 43 | void SetReadGeometry(G4bool readGeometry); |
44 | void SetWriteGeometry(G4bool writeGeometry); | |
676fb573 | 45 | |
46 | protected: | |
47 | AliModulesComposition(const AliModulesComposition& right); | |
48 | ||
49 | // operators | |
50 | AliModulesComposition& operator=(const AliModulesComposition& right); | |
51 | ||
52 | // methods | |
80ed9a99 | 53 | void AddModule(const G4String& name, |
54 | G4int version, | |
55 | AliModuleType moduleType = kDetector); | |
676fb573 | 56 | void ConstructModules(); |
80ed9a99 | 57 | void SetProcessConfigToModules(G4bool processConfig); |
886f0b7c | 58 | |
676fb573 | 59 | private: |
60 | // methods | |
80ed9a99 | 61 | void Configure(); |
62 | void CreateG4Geometry(); | |
676fb573 | 63 | void SetReadGeometryToModules(G4bool readGeometry); |
64 | void SetWriteGeometryToModules(G4bool writeGeometry); | |
676fb573 | 65 | |
66 | // data members | |
ad42298e | 67 | AliModulesCompositionMessenger fMessenger; //messenger |
80ed9a99 | 68 | AliModuleConstructionVector fModuleConstructionVector; //.. |
69 | //vector of AliModuleConstruction | |
70 | AliMagneticField* fMagneticField; //magnetic field | |
71 | G4bool fReadGeometry; //option applied to all modules | |
72 | G4bool fWriteGeometry; //option applied to all modules | |
676fb573 | 73 | }; |
74 | ||
75 | // inline methods | |
76 | ||
676fb573 | 77 | inline void AliModulesComposition::SetReadGeometry(G4bool readGeometry) |
78 | { fReadGeometry = readGeometry; } | |
79 | ||
80 | inline void AliModulesComposition::SetWriteGeometry(G4bool writeGeometry) | |
81 | { fWriteGeometry = writeGeometry; } | |
82 | ||
83 | #endif //ALI_MODULES_COMPOSITION_H | |
84 |