Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE05DetectorConstruction Class Reference

#include <RE05DetectorConstruction.hh>

Inheritance diagram for RE05DetectorConstruction:
Collaboration diagram for RE05DetectorConstruction:

Public Member Functions

 RE05DetectorConstruction ()
 
virtual ~RE05DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 42 of file RE05DetectorConstruction.hh.

Constructor & Destructor Documentation

RE05DetectorConstruction::RE05DetectorConstruction ( )

Definition at line 61 of file RE05DetectorConstruction.cc.

63 {
64 
65 #include "RE05DetectorParameterDef.icc"
66 
67 }
RE05DetectorConstruction::~RE05DetectorConstruction ( )
virtual

Definition at line 71 of file RE05DetectorConstruction.cc.

72 {}

Member Function Documentation

G4VPhysicalVolume * RE05DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 110 of file RE05DetectorConstruction.cc.

111 {
112  DefineMaterials();
113 
114  //-------------------------------------------------------------------------
115  // Detector geometry
116  //-------------------------------------------------------------------------
117 
118  //------------------------------ experimental hall
119  G4Box * experimentalHall_box
120  = new G4Box("expHall_b",fExpHall_x,fExpHall_y,fExpHall_z);
121  G4LogicalVolume * experimentalHall_log
122  = new G4LogicalVolume(experimentalHall_box,fAir,"expHall_L",0,0,0);
123  G4VPhysicalVolume * experimentalHall_phys
124  = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
125  0,false,0);
126  experimentalHall_log->SetVisAttributes(G4VisAttributes::GetInvisible());
127 
128  //------------------------------ tracker
129  G4VSolid * fTracker_tubs
130  = new G4Tubs("trkTubs_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
131  fTrkTubs_sphi,fTrkTubs_dphi);
132  G4LogicalVolume * fTracker_log
133  = new G4LogicalVolume(fTracker_tubs,fAr,"trackerT_L",0,0,0);
134  // G4VPhysicalVolume * fTracker_phys =
135  new G4PVPlacement(0,G4ThreeVector(),fTracker_log,"tracker_phys",
136  experimentalHall_log,false,0);
137  G4VisAttributes* fTracker_logVisAtt
138  = new G4VisAttributes(G4Colour(1.0,0.0,1.0));
139  fTracker_log->SetVisAttributes(fTracker_logVisAtt);
140 
141  //------------------------------ tracker layers
142  // As an example for Parameterised volume
143  // dummy values for G4Tubs -- modified by parameterised volume
144  G4VSolid * trackerLayer_tubs
145  = new G4Tubs("trackerLayer_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
146  fTrkTubs_sphi,fTrkTubs_dphi);
147  G4LogicalVolume * trackerLayer_log
148  = new G4LogicalVolume(trackerLayer_tubs,fSilicon,"trackerB_L",0,0,0);
149  G4VPVParameterisation * trackerParam
151  // dummy value : kXAxis -- modified by parameterised volume
152  // G4VPhysicalVolume *trackerLayer_phys =
153  new G4PVParameterised("trackerLayer_phys",trackerLayer_log,fTracker_log,
154  kXAxis, fNotrkLayers, trackerParam);
155  G4VisAttributes* trackerLayer_logVisAtt
156  = new G4VisAttributes(G4Colour(0.5,0.0,1.0));
157  trackerLayer_logVisAtt->SetForceWireframe(true);
158  trackerLayer_log->SetVisAttributes(trackerLayer_logVisAtt);
159 
160  //------------------------------ calorimeter
161  G4VSolid * calorimeter_tubs
162  = new G4Tubs("calorimeter_tubs",fCaloTubs_rmin,fCaloTubs_rmax,
163  fCaloTubs_dz,fCaloTubs_sphi,fCaloTubs_dphi);
164  G4LogicalVolume * calorimeter_log
165  = new G4LogicalVolume(calorimeter_tubs,fScinti,"caloT_L",0,0,0);
166  // G4VPhysicalVolume * calorimeter_phys =
167  new G4PVPlacement(0,G4ThreeVector(),calorimeter_log,"caloM_P",
168  experimentalHall_log,false,0);
169  G4VisAttributes* calorimeter_logVisATT
170  = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
171  calorimeter_logVisATT->SetForceWireframe(true);
172  calorimeter_log->SetVisAttributes(calorimeter_logVisATT);
173 
174  //------------------------------- Lead layers
175  // As an example for Parameterised volume
176  // dummy values for G4Tubs -- modified by parameterised volume
177  G4VSolid * caloLayer_tubs
178  = new G4Tubs("caloLayer_tubs",fCaloRing_rmin,fCaloRing_rmax,
179  fCaloRing_dz,fCaloRing_sphi,fCaloRing_dphi);
180  G4LogicalVolume * caloLayer_log
181  = new G4LogicalVolume(caloLayer_tubs,fLead,"caloR_L",0,0,0);
182  G4VPVParameterisation * calorimeterParam
184  // dummy value : kXAxis -- modified by parameterised volume
185  // G4VPhysicalVolume * caloLayer_phys =
186  new G4PVParameterised("caloLayer_phys",caloLayer_log,calorimeter_log,
187  kXAxis, fNocaloLayers, calorimeterParam);
188  G4VisAttributes* caloLayer_logVisAtt
189  = new G4VisAttributes(G4Colour(0.7,1.0,0.0));
190  caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
191 
192  //------------------------------ muon counters
193  // As an example of CSG volumes with rotation
194  G4VSolid * muoncounter_box
195  = new G4Box("muoncounter_box",fMuBox_width,fMuBox_thick,
196  fMuBox_length);
197  G4LogicalVolume * muoncounter_log
198  = new G4LogicalVolume(muoncounter_box,fScinti,"mucounter_L",0,0,0);
199  for(int i=0; i<fNomucounter ; i++)
200  {
201  G4double phi, x, y, z;
202  phi = 360.*deg/fNomucounter*i;
203  x = fMuBox_radius*std::sin(phi);
204  y = fMuBox_radius*std::cos(phi);
205  z = 0.*cm;
206  G4RotationMatrix rm;
207  rm.rotateZ(phi);
209  muoncounter_log, "muoncounter_P",
210  experimentalHall_log,false,i);
211  }
212  G4VisAttributes* muoncounter_logVisAtt
213  = new G4VisAttributes(G4Colour(0.0,1.0,1.0));
214  muoncounter_logVisAtt->SetForceWireframe(true);
215  muoncounter_log->SetVisAttributes(muoncounter_logVisAtt);
216 
217  return experimentalHall_phys;
218 }
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
tuple x
Definition: test.py:50
static constexpr double cm
Definition: G4SIunits.hh:119
HepGeom::Transform3D G4Transform3D
tuple z
Definition: test.py:28
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152
static const G4VisAttributes & GetInvisible()
void SetForceWireframe(G4bool=true)
void SetVisAttributes(const G4VisAttributes *pVA)

Here is the call graph for this function:

void RE05DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 222 of file RE05DetectorConstruction.cc.

223 {
224  //-------------------------------------------------------------------------
225  // Magnetic field
226  //-------------------------------------------------------------------------
227  RE05Field* myField = new RE05Field;
228  G4FieldManager* fieldMgr
230  fieldMgr->SetDetectorField(myField);
231  fieldMgr->CreateChordFinder(myField);
232 
233  //------------------------------------------------------------------
234  // Sensitive Detectors
235  //------------------------------------------------------------------
236  G4String trackerSDname = "/mydet/tracker";
237  RE05TrackerSD * trackerSD = new RE05TrackerSD(trackerSDname);
239  SetSensitiveDetector("trackerB_L",trackerSD);
240 
241  G4String muonSDname = "/mydet/muon";
242  RE05MuonSD * muonSD = new RE05MuonSD(muonSDname);
244  SetSensitiveDetector("mucounter_L",muonSD);
245 }
G4bool SetDetectorField(G4Field *detectorField)
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
static G4TransportationManager * GetTransportationManager()
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
G4FieldManager * GetFieldManager() const
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void CreateChordFinder(G4MagneticField *detectorMagField)

Here is the call graph for this function:


The documentation for this class was generated from the following files: