Geant4  10.02.p03
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
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4double expHall_x
 
G4double expHall_y
 
G4double expHall_z
 
G4double trkTubs_rmax
 
G4double trkTubs_rmin
 
G4double trkTubs_dz
 
G4double trkTubs_sphi
 
G4double trkTubs_dphi
 
G4int notrkLayers
 
G4double tracker_radius [5]
 
G4double tracker_thick
 
G4double tracker_length [5]
 
G4double caloTubs_rmax
 
G4double caloTubs_rmin
 
G4double caloTubs_dz
 
G4double caloTubs_sphi
 
G4double caloTubs_dphi
 
G4int nocaloLayers
 
G4double absorber_thick
 
G4double scinti_thick
 
G4int segmentsinZ
 
G4double caloRing_rmax
 
G4double caloRing_rmin
 
G4double caloRing_dz
 
G4double caloRing_sphi
 
G4double caloRing_dphi
 
G4int segmentsinPhi
 
G4double caloCell_rmax
 
G4double caloCell_rmin
 
G4double caloCell_dz
 
G4double caloCell_sphi
 
G4double caloCell_dphi
 
G4int nomucounter
 
G4double muBox_radius
 
G4double muBox_width
 
G4double muBox_thick
 
G4double muBox_length
 
G4MaterialAir
 
G4MaterialAr
 
G4MaterialSilicon
 
G4MaterialScinti
 
G4MaterialLead
 
G4ElementH
 
G4ElementC
 
G4ElementN
 
G4ElementO
 

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::RE05DetectorConstruction ( )

Definition at line 61 of file RE05DetectorConstruction.cc.

62 {
63 
64 #include "RE05DetectorParameterDef.icc"
65 
66 }

◆ ~RE05DetectorConstruction()

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

◆ Construct()

G4VPhysicalVolume * RE05DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 120 of file RE05DetectorConstruction.cc.

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,
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,
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,
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,
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 double cm
Definition: G4SIunits.hh:118
void SetForceWireframe(G4bool)
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
Double_t y
static const double deg
Definition: G4SIunits.hh:151
HepGeom::Transform3D G4Transform3D
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
double G4double
Definition: G4Types.hh:76
static const G4VisAttributes & GetInvisible()
void SetVisAttributes(const G4VisAttributes *pVA)
Here is the call graph for this function:

◆ ConstructSDandField()

void RE05DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 232 of file RE05DetectorConstruction.cc.

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)
G4FieldManager * GetFieldManager() const
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
static G4TransportationManager * GetTransportationManager()
void CreateChordFinder(G4MagneticField *detectorMagField)
Here is the call graph for this function:

◆ DefineMaterials()

void RE05DetectorConstruction::DefineMaterials ( void  )
private

Definition at line 86 of file RE05DetectorConstruction.cc.

87 {
88  //-------------------------------------------------------------------------
89  // Materials
90  //-------------------------------------------------------------------------
91 
92  G4double a, z, density;
93  G4int nel;
94 
95  H = new G4Element("Hydrogen", "H", z=1., a= 1.01*g/mole);
96  C = new G4Element("Carbon", "C", z=6., a= 12.01*g/mole);
97  N = new G4Element("Nitrogen", "N", z=7., a= 14.01*g/mole);
98  O = new G4Element("Oxygen", "O", z=8., a= 16.00*g/mole);
99 
100  Air = new G4Material("Air", density= 1.29*mg/cm3, nel=2);
101  Air->AddElement(N, 70.*perCent);
102  Air->AddElement(O, 30.*perCent);
103 
104  Lead =
105  new G4Material("Lead", z=82., a= 207.19*g/mole, density= 11.35*g/cm3);
106 
107  Ar =
108  new G4Material("ArgonGas",z=18., a= 39.95*g/mole, density=1.782*mg/cm3);
109 
110  Silicon =
111  new G4Material("Silicon", z=14., a= 28.09*g/mole, density= 2.33*g/cm3);
112 
113  Scinti = new G4Material("Scintillator", density= 1.032*g/cm3, nel=2);
114  Scinti->AddElement(C, 9);
115  Scinti->AddElement(H, 10);
116 }
static const double mg
Definition: G4SIunits.hh:181
int G4int
Definition: G4Types.hh:78
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static const double cm3
Definition: G4SIunits.hh:120
static const double perCent
Definition: G4SIunits.hh:329
static const double mole
Definition: G4SIunits.hh:283
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
G4int nel
Definition: TRTMaterials.hh:41
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ absorber_thick

G4double RE05DetectorConstruction::absorber_thick
private

Definition at line 55 of file RE05DetectorConstruction.hh.

◆ Air

G4Material* RE05DetectorConstruction::Air
private

Definition at line 57 of file RE05DetectorConstruction.hh.

◆ Ar

G4Material* RE05DetectorConstruction::Ar
private

Definition at line 58 of file RE05DetectorConstruction.hh.

◆ C

G4Element* RE05DetectorConstruction::C
private

Definition at line 64 of file RE05DetectorConstruction.hh.

◆ caloCell_dphi

G4double RE05DetectorConstruction::caloCell_dphi
private

Definition at line 70 of file RE05DetectorConstruction.hh.

◆ caloCell_dz

G4double RE05DetectorConstruction::caloCell_dz
private

Definition at line 68 of file RE05DetectorConstruction.hh.

◆ caloCell_rmax

G4double RE05DetectorConstruction::caloCell_rmax
private

Definition at line 66 of file RE05DetectorConstruction.hh.

◆ caloCell_rmin

G4double RE05DetectorConstruction::caloCell_rmin
private

Definition at line 67 of file RE05DetectorConstruction.hh.

◆ caloCell_sphi

G4double RE05DetectorConstruction::caloCell_sphi
private

Definition at line 69 of file RE05DetectorConstruction.hh.

◆ caloRing_dphi

G4double RE05DetectorConstruction::caloRing_dphi
private

Definition at line 63 of file RE05DetectorConstruction.hh.

◆ caloRing_dz

G4double RE05DetectorConstruction::caloRing_dz
private

Definition at line 61 of file RE05DetectorConstruction.hh.

◆ caloRing_rmax

G4double RE05DetectorConstruction::caloRing_rmax
private

Definition at line 59 of file RE05DetectorConstruction.hh.

◆ caloRing_rmin

G4double RE05DetectorConstruction::caloRing_rmin
private

Definition at line 60 of file RE05DetectorConstruction.hh.

◆ caloRing_sphi

G4double RE05DetectorConstruction::caloRing_sphi
private

Definition at line 62 of file RE05DetectorConstruction.hh.

◆ caloTubs_dphi

G4double RE05DetectorConstruction::caloTubs_dphi
private

Definition at line 52 of file RE05DetectorConstruction.hh.

◆ caloTubs_dz

G4double RE05DetectorConstruction::caloTubs_dz
private

Definition at line 50 of file RE05DetectorConstruction.hh.

◆ caloTubs_rmax

G4double RE05DetectorConstruction::caloTubs_rmax
private

Definition at line 48 of file RE05DetectorConstruction.hh.

◆ caloTubs_rmin

G4double RE05DetectorConstruction::caloTubs_rmin
private

Definition at line 49 of file RE05DetectorConstruction.hh.

◆ caloTubs_sphi

G4double RE05DetectorConstruction::caloTubs_sphi
private

Definition at line 51 of file RE05DetectorConstruction.hh.

◆ expHall_x

G4double RE05DetectorConstruction::expHall_x
private

Definition at line 33 of file RE05DetectorConstruction.hh.

◆ expHall_y

G4double RE05DetectorConstruction::expHall_y
private

Definition at line 34 of file RE05DetectorConstruction.hh.

◆ expHall_z

G4double RE05DetectorConstruction::expHall_z
private

Definition at line 35 of file RE05DetectorConstruction.hh.

◆ H

G4Element* RE05DetectorConstruction::H
private

Definition at line 63 of file RE05DetectorConstruction.hh.

◆ Lead

G4Material* RE05DetectorConstruction::Lead
private

Definition at line 61 of file RE05DetectorConstruction.hh.

◆ muBox_length

G4double RE05DetectorConstruction::muBox_length
private

Definition at line 76 of file RE05DetectorConstruction.hh.

◆ muBox_radius

G4double RE05DetectorConstruction::muBox_radius
private

Definition at line 73 of file RE05DetectorConstruction.hh.

◆ muBox_thick

G4double RE05DetectorConstruction::muBox_thick
private

Definition at line 75 of file RE05DetectorConstruction.hh.

◆ muBox_width

G4double RE05DetectorConstruction::muBox_width
private

Definition at line 74 of file RE05DetectorConstruction.hh.

◆ N

G4Element* RE05DetectorConstruction::N
private

Definition at line 65 of file RE05DetectorConstruction.hh.

◆ nocaloLayers

G4int RE05DetectorConstruction::nocaloLayers
private

Definition at line 54 of file RE05DetectorConstruction.hh.

◆ nomucounter

G4int RE05DetectorConstruction::nomucounter
private

Definition at line 72 of file RE05DetectorConstruction.hh.

◆ notrkLayers

G4int RE05DetectorConstruction::notrkLayers
private

Definition at line 43 of file RE05DetectorConstruction.hh.

◆ O

G4Element* RE05DetectorConstruction::O
private

Definition at line 66 of file RE05DetectorConstruction.hh.

◆ Scinti

G4Material* RE05DetectorConstruction::Scinti
private

Definition at line 60 of file RE05DetectorConstruction.hh.

◆ scinti_thick

G4double RE05DetectorConstruction::scinti_thick
private

Definition at line 56 of file RE05DetectorConstruction.hh.

◆ segmentsinPhi

G4int RE05DetectorConstruction::segmentsinPhi
private

Definition at line 65 of file RE05DetectorConstruction.hh.

◆ segmentsinZ

G4int RE05DetectorConstruction::segmentsinZ
private

Definition at line 58 of file RE05DetectorConstruction.hh.

◆ Silicon

G4Material* RE05DetectorConstruction::Silicon
private

Definition at line 59 of file RE05DetectorConstruction.hh.

◆ tracker_length

G4double RE05DetectorConstruction::tracker_length[5]
private

Definition at line 46 of file RE05DetectorConstruction.hh.

◆ tracker_radius

G4double RE05DetectorConstruction::tracker_radius[5]
private

Definition at line 44 of file RE05DetectorConstruction.hh.

◆ tracker_thick

G4double RE05DetectorConstruction::tracker_thick
private

Definition at line 45 of file RE05DetectorConstruction.hh.

◆ trkTubs_dphi

G4double RE05DetectorConstruction::trkTubs_dphi
private

Definition at line 41 of file RE05DetectorConstruction.hh.

◆ trkTubs_dz

G4double RE05DetectorConstruction::trkTubs_dz
private

Definition at line 39 of file RE05DetectorConstruction.hh.

◆ trkTubs_rmax

G4double RE05DetectorConstruction::trkTubs_rmax
private

Definition at line 37 of file RE05DetectorConstruction.hh.

◆ trkTubs_rmin

G4double RE05DetectorConstruction::trkTubs_rmin
private

Definition at line 38 of file RE05DetectorConstruction.hh.

◆ trkTubs_sphi

G4double RE05DetectorConstruction::trkTubs_sphi
private

Definition at line 40 of file RE05DetectorConstruction.hh.


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