Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
RE05DetectorConstruction Class Reference

#include <RE05DetectorConstruction.hh>

Inheritance diagram for RE05DetectorConstruction:
G4VUserDetectorConstruction

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.

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

Definition at line 70 of file RE05DetectorConstruction.cc.

71 {
72  delete Scinti;
73  delete Silicon;
74  delete Ar;
75  delete Lead;
76  delete Air;
77 
78  delete O;
79  delete N;
80  delete C;
81  delete H;
82 }

Member Function Documentation

G4VPhysicalVolume * RE05DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 120 of file RE05DetectorConstruction.cc.

References python.hepunit::cm, python.hepunit::deg, G4VisAttributes::GetInvisible(), kXAxis, CLHEP::HepRotation::rotateZ(), G4VisAttributes::SetForceWireframe(), G4LogicalVolume::SetVisAttributes(), test::x, and z.

121 {
122  DefineMaterials();
123 
124  //-------------------------------------------------------------------------
125  // Detector geometry
126  //-------------------------------------------------------------------------
127 
128  //------------------------------ experimental hall
129  G4Box * experimentalHall_box
130  = new G4Box("expHall_b",expHall_x,expHall_y,expHall_z);
131  G4LogicalVolume * experimentalHall_log
132  = new G4LogicalVolume(experimentalHall_box,Air,"expHall_L",0,0,0);
133  G4VPhysicalVolume * experimentalHall_phys
134  = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
135  0,false,0);
136  experimentalHall_log->SetVisAttributes(G4VisAttributes::GetInvisible());
137 
138  //------------------------------ tracker
139  G4VSolid * tracker_tubs
140  = new G4Tubs("trkTubs_tubs",trkTubs_rmin,trkTubs_rmax,trkTubs_dz,
141  trkTubs_sphi,trkTubs_dphi);
142  G4LogicalVolume * tracker_log
143  = new G4LogicalVolume(tracker_tubs,Ar,"trackerT_L",0,0,0);
144  // G4VPhysicalVolume * tracker_phys =
145  new G4PVPlacement(0,G4ThreeVector(),tracker_log,"tracker_phys",
146  experimentalHall_log,false,0);
147  G4VisAttributes* tracker_logVisAtt
148  = new G4VisAttributes(G4Colour(1.0,0.0,1.0));
149  tracker_log->SetVisAttributes(tracker_logVisAtt);
150 
151  //------------------------------ tracker layers
152  // As an example for Parameterised volume
153  // dummy values for G4Tubs -- modified by parameterised volume
154  G4VSolid * trackerLayer_tubs
155  = new G4Tubs("trackerLayer_tubs",trkTubs_rmin,trkTubs_rmax,trkTubs_dz,
156  trkTubs_sphi,trkTubs_dphi);
157  G4LogicalVolume * trackerLayer_log
158  = new G4LogicalVolume(trackerLayer_tubs,Silicon,"trackerB_L",0,0,0);
159  G4VPVParameterisation * trackerParam
161  // dummy value : kXAxis -- modified by parameterised volume
162  // G4VPhysicalVolume *trackerLayer_phys =
163  new G4PVParameterised("trackerLayer_phys",trackerLayer_log,tracker_log,
164  kXAxis, notrkLayers, trackerParam);
165  G4VisAttributes* trackerLayer_logVisAtt
166  = new G4VisAttributes(G4Colour(0.5,0.0,1.0));
167  trackerLayer_logVisAtt->SetForceWireframe(true);
168  trackerLayer_log->SetVisAttributes(trackerLayer_logVisAtt);
169 
170  //------------------------------ calorimeter
171  G4VSolid * calorimeter_tubs
172  = new G4Tubs("calorimeter_tubs",caloTubs_rmin,caloTubs_rmax,
173  caloTubs_dz,caloTubs_sphi,caloTubs_dphi);
174  G4LogicalVolume * calorimeter_log
175  = new G4LogicalVolume(calorimeter_tubs,Scinti,"caloT_L",0,0,0);
176  // G4VPhysicalVolume * calorimeter_phys =
177  new G4PVPlacement(0,G4ThreeVector(),calorimeter_log,"caloM_P",
178  experimentalHall_log,false,0);
179  G4VisAttributes* calorimeter_logVisATT
180  = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
181  calorimeter_logVisATT->SetForceWireframe(true);
182  calorimeter_log->SetVisAttributes(calorimeter_logVisATT);
183 
184  //------------------------------- Lead layers
185  // As an example for Parameterised volume
186  // dummy values for G4Tubs -- modified by parameterised volume
187  G4VSolid * caloLayer_tubs
188  = new G4Tubs("caloLayer_tubs",caloRing_rmin,caloRing_rmax,
189  caloRing_dz,caloRing_sphi,caloRing_dphi);
190  G4LogicalVolume * caloLayer_log
191  = new G4LogicalVolume(caloLayer_tubs,Lead,"caloR_L",0,0,0);
192  G4VPVParameterisation * calorimeterParam
194  // dummy value : kXAxis -- modified by parameterised volume
195  // G4VPhysicalVolume * caloLayer_phys =
196  new G4PVParameterised("caloLayer_phys",caloLayer_log,calorimeter_log,
197  kXAxis, nocaloLayers, calorimeterParam);
198  G4VisAttributes* caloLayer_logVisAtt
199  = new G4VisAttributes(G4Colour(0.7,1.0,0.0));
200  caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
201 
202  //------------------------------ muon counters
203  // As an example of CSG volumes with rotation
204  G4VSolid * muoncounter_box
205  = new G4Box("muoncounter_box",muBox_width,muBox_thick,
206  muBox_length);
207  G4LogicalVolume * muoncounter_log
208  = new G4LogicalVolume(muoncounter_box,Scinti,"mucounter_L",0,0,0);
209  for(int i=0; i<nomucounter ; i++)
210  {
211  G4double phi, x, y, z;
212  phi = 360.*deg/nomucounter*i;
213  x = muBox_radius*std::sin(phi);
214  y = muBox_radius*std::cos(phi);
215  z = 0.*cm;
216  G4RotationMatrix rm;
217  rm.rotateZ(phi);
219  muoncounter_log, "muoncounter_P",
220  experimentalHall_log,false,i);
221  }
222  G4VisAttributes* muoncounter_logVisAtt
223  = new G4VisAttributes(G4Colour(0.0,1.0,1.0));
224  muoncounter_logVisAtt->SetForceWireframe(true);
225  muoncounter_log->SetVisAttributes(muoncounter_logVisAtt);
226 
227  return experimentalHall_phys;
228 }
static const G4VisAttributes & GetInvisible()
void SetForceWireframe(G4bool)
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
Definition: G4Box.hh:63
Definition: G4Tubs.hh:84
HepGeom::Transform3D G4Transform3D
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
void RE05DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 232 of file RE05DetectorConstruction.cc.

References G4FieldManager::CreateChordFinder(), G4TransportationManager::GetFieldManager(), G4TransportationManager::GetTransportationManager(), G4FieldManager::SetDetectorField(), and G4VUserDetectorConstruction::SetSensitiveDetector().

233 {
234  //-------------------------------------------------------------------------
235  // Magnetic field
236  //-------------------------------------------------------------------------
237  RE05Field* myField = new RE05Field;
238  G4FieldManager* fieldMgr
240  fieldMgr->SetDetectorField(myField);
241  fieldMgr->CreateChordFinder(myField);
242 
243  //------------------------------------------------------------------
244  // Sensitive Detectors
245  //------------------------------------------------------------------
246  G4String trackerSDname = "/mydet/tracker";
247  RE05TrackerSD * trackerSD = new RE05TrackerSD(trackerSDname);
248  SetSensitiveDetector("trackerB_L",trackerSD);
249 
250  G4String muonSDname = "/mydet/muon";
251  RE05MuonSD * muonSD = new RE05MuonSD(muonSDname);
252  SetSensitiveDetector("mucounter_L",muonSD);
253 }
G4bool SetDetectorField(G4Field *detectorField)
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
void CreateChordFinder(G4MagneticField *detectorMagField)

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