Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHG4PhenixDetector.h
Go to the documentation of this file.
1 #ifndef PHG4PhenixDetector_h
2 #define PHG4PhenixDetector_h
3 
4 #include <Geant4/G4VUserDetectorConstruction.hh>
5 #include <Geant4/globals.hh>
6 #include <list>
7 
8 class PHG4Detector;
9 class G4Material;
10 class G4LogicalVolume;
11 class G4VPhysicalVolume;
12 class G4FieldManager;
13 
15 class PHG4PhenixDetector: public G4VUserDetectorConstruction
16 {
17 
18  public:
19 
22 
24  virtual ~PHG4PhenixDetector();
25 
26  void Verbosity(int verb) {verbosity = verb;}
27 
29  void AddDetector(PHG4Detector* detector, int zero_field = 0)
30  { detectors_.push_back(detector); zeroFieldFlags.push_back(zero_field); }
31 
33  virtual G4VPhysicalVolume* Construct( void );
34 
36  virtual void ConstructSDandField();
37 
38  G4double GetWorldSizeX() const
39  {return WorldSizeX;}
40 
41  G4double GetWorldSizeY() const
42  {return WorldSizeY;}
43  G4double GetWorldSizeZ() const
44  {return WorldSizeZ;}
45 
46  void SetWorldSizeX(const G4double sx) {WorldSizeX = sx;}
47  void SetWorldSizeY(const G4double sy) {WorldSizeY = sy;}
48  void SetWorldSizeZ(const G4double sz) {WorldSizeZ = sz;}
49 
50  void SetWorldShape(const std::string &s) {worldshape = s;}
51  void SetWorldMaterial(const std::string &s) {worldmaterial = s;}
52  G4VPhysicalVolume* GetPhysicalVolume(void) {return physiWorld;}
53 
54  void SetZeroFieldStartZ(const G4double z) { ZeroFieldStartZ = z; }
55  void SetZeroFieldManager(G4FieldManager* man) { zeroFieldManager = man; }
56 
57  protected:
58 
59  private:
60  int verbosity;
61 
63  typedef std::list<PHG4Detector*> DetectorList;
64  DetectorList detectors_;
65  std::list<int> zeroFieldFlags;
66 
67  G4Material* defaultMaterial;
68 
69  G4LogicalVolume* logicWorld; //pointer to the logical World
70  G4VPhysicalVolume* physiWorld; //pointer to the physical World
71  G4double WorldSizeX;
72  G4double WorldSizeY;
73  G4double WorldSizeZ;
74  std::string worldshape;
75  std::string worldmaterial;
76 
77  G4double ZeroFieldStartZ;
78  G4LogicalVolume* lZeroFieldSubWorld;
79  G4VPhysicalVolume* pZeroFieldSubWorld;
80  G4FieldManager* zeroFieldManager;
81 };
82 
83 #endif
const double s
void SetWorldSizeX(const G4double sx)
void SetWorldShape(const std::string &s)
G4double GetWorldSizeY() const
virtual void ConstructSDandField()
this is used to associate the local field manager to the no-field-zone logical volume ...
void Verbosity(int verb)
virtual G4VPhysicalVolume * Construct(void)
this is called by geant to actually construct all detectors
virtual ~PHG4PhenixDetector()
destructor
void SetWorldSizeZ(const G4double sz)
G4double GetWorldSizeZ() const
void SetZeroFieldManager(G4FieldManager *man)
void SetWorldSizeY(const G4double sy)
base class for phenix detector creation
Definition: PHG4Detector.h:13
G4VPhysicalVolume * GetPhysicalVolume(void)
void SetZeroFieldStartZ(const G4double z)
void AddDetector(PHG4Detector *detector, int zero_field=0)
register a detector. This is called in PHG4Reco::Init based on which detectors are found on the tree ...
this is the main detector construction class, passed to geant to construct the entire phenix detector...
PHG4PhenixDetector()
constructor
G4double GetWorldSizeX() const
void SetWorldMaterial(const std::string &s)