Geant4  10.02.p03
OpNoviceDetectorConstruction Class Reference

#include <OpNoviceDetectorConstruction.hh>

Inheritance diagram for OpNoviceDetectorConstruction:
Collaboration diagram for OpNoviceDetectorConstruction:

Public Member Functions

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

Private Attributes

G4double fExpHall_x
 
G4double fExpHall_y
 
G4double fExpHall_z
 
G4double fTank_x
 
G4double fTank_y
 
G4double fTank_z
 
G4double fBubble_x
 
G4double fBubble_y
 
G4double fBubble_z
 

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 39 of file OpNoviceDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ OpNoviceDetectorConstruction()

◆ ~OpNoviceDetectorConstruction()

OpNoviceDetectorConstruction::~OpNoviceDetectorConstruction ( )
virtual

Definition at line 56 of file OpNoviceDetectorConstruction.cc.

56 {;}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * OpNoviceDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 60 of file OpNoviceDetectorConstruction.cc.

61 {
62 
63 // ------------- Materials -------------
64 
65  G4double a, z, density;
66  G4int nelements;
67 
68 // Air
69 //
70  G4Element* N = new G4Element("Nitrogen", "N", z=7 , a=14.01*g/mole);
71  G4Element* O = new G4Element("Oxygen" , "O", z=8 , a=16.00*g/mole);
72 
73  G4Material* air = new G4Material("Air", density=1.29*mg/cm3, nelements=2);
74  air->AddElement(N, 70.*perCent);
75  air->AddElement(O, 30.*perCent);
76 
77 // Water
78 //
79  G4Element* H = new G4Element("Hydrogen", "H", z=1 , a=1.01*g/mole);
80 
81  G4Material* water = new G4Material("Water", density= 1.0*g/cm3, nelements=2);
82  water->AddElement(H, 2);
83  water->AddElement(O, 1);
84 
85 //
86 // ------------ Generate & Add Material Properties Table ------------
87 //
88  G4double photonEnergy[] =
89  { 2.034*eV, 2.068*eV, 2.103*eV, 2.139*eV,
90  2.177*eV, 2.216*eV, 2.256*eV, 2.298*eV,
91  2.341*eV, 2.386*eV, 2.433*eV, 2.481*eV,
92  2.532*eV, 2.585*eV, 2.640*eV, 2.697*eV,
93  2.757*eV, 2.820*eV, 2.885*eV, 2.954*eV,
94  3.026*eV, 3.102*eV, 3.181*eV, 3.265*eV,
95  3.353*eV, 3.446*eV, 3.545*eV, 3.649*eV,
96  3.760*eV, 3.877*eV, 4.002*eV, 4.136*eV };
97 
98  const G4int nEntries = sizeof(photonEnergy)/sizeof(G4double);
99 
100 //
101 // Water
102 //
103  G4double refractiveIndex1[] =
104  { 1.3435, 1.344, 1.3445, 1.345, 1.3455,
105  1.346, 1.3465, 1.347, 1.3475, 1.348,
106  1.3485, 1.3492, 1.35, 1.3505, 1.351,
107  1.3518, 1.3522, 1.3530, 1.3535, 1.354,
108  1.3545, 1.355, 1.3555, 1.356, 1.3568,
109  1.3572, 1.358, 1.3585, 1.359, 1.3595,
110  1.36, 1.3608};
111 
112  assert(sizeof(refractiveIndex1) == sizeof(photonEnergy));
113 
114  G4double absorption[] =
115  {3.448*m, 4.082*m, 6.329*m, 9.174*m, 12.346*m, 13.889*m,
116  15.152*m, 17.241*m, 18.868*m, 20.000*m, 26.316*m, 35.714*m,
117  45.455*m, 47.619*m, 52.632*m, 52.632*m, 55.556*m, 52.632*m,
118  52.632*m, 47.619*m, 45.455*m, 41.667*m, 37.037*m, 33.333*m,
119  30.000*m, 28.500*m, 27.000*m, 24.500*m, 22.000*m, 19.500*m,
120  17.500*m, 14.500*m };
121 
122  assert(sizeof(absorption) == sizeof(photonEnergy));
123 
124  G4double scintilFast[] =
125  { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
126  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
127  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
128  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
129  1.00, 1.00, 1.00, 1.00 };
130 
131  assert(sizeof(scintilFast) == sizeof(photonEnergy));
132 
133  G4double scintilSlow[] =
134  { 0.01, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00,
135  7.00, 8.00, 9.00, 8.00, 7.00, 6.00, 4.00,
136  3.00, 2.00, 1.00, 0.01, 1.00, 2.00, 3.00,
137  4.00, 5.00, 6.00, 7.00, 8.00, 9.00, 8.00,
138  7.00, 6.00, 5.00, 4.00 };
139 
140  assert(sizeof(scintilSlow) == sizeof(photonEnergy));
141 
143 
144  myMPT1->AddProperty("RINDEX", photonEnergy, refractiveIndex1,nEntries)
145  ->SetSpline(true);
146  myMPT1->AddProperty("ABSLENGTH", photonEnergy, absorption, nEntries)
147  ->SetSpline(true);
148  myMPT1->AddProperty("FASTCOMPONENT",photonEnergy, scintilFast, nEntries)
149  ->SetSpline(true);
150  myMPT1->AddProperty("SLOWCOMPONENT",photonEnergy, scintilSlow, nEntries)
151  ->SetSpline(true);
152 
153  myMPT1->AddConstProperty("SCINTILLATIONYIELD",50./MeV);
154  myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
155  myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
156  myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
157  myMPT1->AddConstProperty("YIELDRATIO",0.8);
158 
159  G4double energy_water[] = {
160  1.56962*eV, 1.58974*eV, 1.61039*eV, 1.63157*eV,
161  1.65333*eV, 1.67567*eV, 1.69863*eV, 1.72222*eV,
162  1.74647*eV, 1.77142*eV, 1.7971 *eV, 1.82352*eV,
163  1.85074*eV, 1.87878*eV, 1.90769*eV, 1.93749*eV,
164  1.96825*eV, 1.99999*eV, 2.03278*eV, 2.06666*eV,
165  2.10169*eV, 2.13793*eV, 2.17543*eV, 2.21428*eV,
166  2.25454*eV, 2.29629*eV, 2.33962*eV, 2.38461*eV,
167  2.43137*eV, 2.47999*eV, 2.53061*eV, 2.58333*eV,
168  2.63829*eV, 2.69565*eV, 2.75555*eV, 2.81817*eV,
169  2.88371*eV, 2.95237*eV, 3.02438*eV, 3.09999*eV,
170  3.17948*eV, 3.26315*eV, 3.35134*eV, 3.44444*eV,
171  3.54285*eV, 3.64705*eV, 3.75757*eV, 3.87499*eV,
172  3.99999*eV, 4.13332*eV, 4.27585*eV, 4.42856*eV,
173  4.59258*eV, 4.76922*eV, 4.95999*eV, 5.16665*eV,
174  5.39129*eV, 5.63635*eV, 5.90475*eV, 6.19998*eV
175  };
176 
177  const G4int numentries_water = sizeof(energy_water)/sizeof(G4double);
178 
179  //assume 100 times larger than the rayleigh scattering for now.
180  G4double mie_water[] = {
181  167024.4*m, 158726.7*m, 150742 *m,
182  143062.5*m, 135680.2*m, 128587.4*m,
183  121776.3*m, 115239.5*m, 108969.5*m,
184  102958.8*m, 97200.35*m, 91686.86*m,
185  86411.33*m, 81366.79*m, 76546.42*m,
186  71943.46*m, 67551.29*m, 63363.36*m,
187  59373.25*m, 55574.61*m, 51961.24*m,
188  48527.00*m, 45265.87*m, 42171.94*m,
189  39239.39*m, 36462.50*m, 33835.68*m,
190  31353.41*m, 29010.30*m, 26801.03*m,
191  24720.42*m, 22763.36*m, 20924.88*m,
192  19200.07*m, 17584.16*m, 16072.45*m,
193  14660.38*m, 13343.46*m, 12117.33*m,
194  10977.70*m, 9920.416*m, 8941.407*m,
195  8036.711*m, 7202.470*m, 6434.927*m,
196  5730.429*m, 5085.425*m, 4496.467*m,
197  3960.210*m, 3473.413*m, 3032.937*m,
198  2635.746*m, 2278.907*m, 1959.588*m,
199  1675.064*m, 1422.710*m, 1200.004*m,
200  1004.528*m, 833.9666*m, 686.1063*m
201  };
202 
203  assert(sizeof(mie_water) == sizeof(energy_water));
204 
205  // gforward, gbackward, forward backward ratio
206  G4double mie_water_const[3]={0.99,0.99,0.8};
207 
208  myMPT1->AddProperty("MIEHG",energy_water,mie_water,numentries_water)
209  ->SetSpline(true);
210  myMPT1->AddConstProperty("MIEHG_FORWARD",mie_water_const[0]);
211  myMPT1->AddConstProperty("MIEHG_BACKWARD",mie_water_const[1]);
212  myMPT1->AddConstProperty("MIEHG_FORWARD_RATIO",mie_water_const[2]);
213 
214  G4cout << "Water G4MaterialPropertiesTable" << G4endl;
215  myMPT1->DumpTable();
216 
217  water->SetMaterialPropertiesTable(myMPT1);
218 
219  // Set the Birks Constant for the Water scintillator
220 
221  water->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
222 
223 //
224 // Air
225 //
226  G4double refractiveIndex2[] =
227  { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
228  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
229  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
230  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
231  1.00, 1.00, 1.00, 1.00 };
232 
234  myMPT2->AddProperty("RINDEX", photonEnergy, refractiveIndex2, nEntries);
235 
236  G4cout << "Air G4MaterialPropertiesTable" << G4endl;
237  myMPT2->DumpTable();
238 
239  air->SetMaterialPropertiesTable(myMPT2);
240 
241 //
242 // ------------- Volumes --------------
243 
244 // The experimental Hall
245 //
246  G4Box* expHall_box = new G4Box("World",fExpHall_x,fExpHall_y,fExpHall_z);
247 
248  G4LogicalVolume* expHall_log
249  = new G4LogicalVolume(expHall_box,air,"World",0,0,0);
250 
251  G4VPhysicalVolume* expHall_phys
252  = new G4PVPlacement(0,G4ThreeVector(),expHall_log,"World",0,false,0);
253 
254 // The Water Tank
255 //
256  G4Box* waterTank_box = new G4Box("Tank",fTank_x,fTank_y,fTank_z);
257 
258  G4LogicalVolume* waterTank_log
259  = new G4LogicalVolume(waterTank_box,water,"Tank",0,0,0);
260 
261  G4VPhysicalVolume* waterTank_phys
262  = new G4PVPlacement(0,G4ThreeVector(),waterTank_log,"Tank",
263  expHall_log,false,0);
264 
265 // The Air Bubble
266 //
267  G4Box* bubbleAir_box = new G4Box("Bubble",fBubble_x,fBubble_y,fBubble_z);
268 
269  G4LogicalVolume* bubbleAir_log
270  = new G4LogicalVolume(bubbleAir_box,air,"Bubble",0,0,0);
271 
272 //G4VPhysicalVolume* bubbleAir_phys =
273  new G4PVPlacement(0,G4ThreeVector(0,2.5*m,0),bubbleAir_log,"Bubble",
274  waterTank_log,false,0);
275 
276 // ------------- Surfaces --------------
277 //
278 // Water Tank
279 //
280  G4OpticalSurface* opWaterSurface = new G4OpticalSurface("WaterSurface");
281  opWaterSurface->SetType(dielectric_dielectric);
282  opWaterSurface->SetFinish(ground);
283  opWaterSurface->SetModel(unified);
284 
285  new G4LogicalBorderSurface("WaterSurface",
286  waterTank_phys,expHall_phys,opWaterSurface);
287 
288 // Air Bubble
289 //
290  G4OpticalSurface* opAirSurface = new G4OpticalSurface("AirSurface");
291  opAirSurface->SetType(dielectric_dielectric);
292  opAirSurface->SetFinish(polished);
293  opAirSurface->SetModel(glisur);
294 
295  G4LogicalSkinSurface* airSurface =
296  new G4LogicalSkinSurface("AirSurface", bubbleAir_log, opAirSurface);
297 
298  G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
299  (airSurface->GetSurface(bubbleAir_log)->GetSurfaceProperty());
300 
301  if (opticalSurface) opticalSurface->DumpInfo();
302 
303 //
304 // Generate & Add Material Properties Table attached to the optical surfaces
305 //
306  const G4int num = 2;
307  G4double ephoton[num] = {2.034*eV, 4.136*eV};
308 
309  //OpticalWaterSurface
310  G4double refractiveIndex[num] = {1.35, 1.40};
311  G4double specularLobe[num] = {0.3, 0.3};
312  G4double specularSpike[num] = {0.2, 0.2};
313  G4double backScatter[num] = {0.2, 0.2};
314 
316 
317  myST1->AddProperty("RINDEX", ephoton, refractiveIndex, num);
318  myST1->AddProperty("SPECULARLOBECONSTANT", ephoton, specularLobe, num);
319  myST1->AddProperty("SPECULARSPIKECONSTANT", ephoton, specularSpike, num);
320  myST1->AddProperty("BACKSCATTERCONSTANT", ephoton, backScatter, num);
321 
322  G4cout << "Water Surface G4MaterialPropertiesTable" << G4endl;
323  myST1->DumpTable();
324 
325  opWaterSurface->SetMaterialPropertiesTable(myST1);
326 
327  //OpticalAirSurface
328  G4double reflectivity[num] = {0.3, 0.5};
329  G4double efficiency[num] = {0.8, 1.0};
330 
332 
333  myST2->AddProperty("REFLECTIVITY", ephoton, reflectivity, num);
334  myST2->AddProperty("EFFICIENCY", ephoton, efficiency, num);
335 
336  G4cout << "Air Surface G4MaterialPropertiesTable" << G4endl;
337  myST2->DumpTable();
338 
339  opAirSurface->SetMaterialPropertiesTable(myST2);
340 
341 //always return the physical World
342  return expHall_phys;
343 }
void SetFinish(const G4OpticalSurfaceFinish)
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
static const double MeV
Definition: G4SIunits.hh:211
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.hh:249
void DumpInfo() const
void SetBirksConstant(G4double value)
static const double mg
Definition: G4SIunits.hh:181
int G4int
Definition: G4Types.hh:78
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)
void SetSpline(G4bool)
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
G4GLOB_DLL std::ostream G4cout
static const double cm3
Definition: G4SIunits.hh:120
static const double perCent
Definition: G4SIunits.hh:329
void AddConstProperty(const char *key, G4double PropertyValue)
static const double eV
Definition: G4SIunits.hh:212
static const double mole
Definition: G4SIunits.hh:283
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
G4SurfaceProperty * GetSurfaceProperty() const
static const double m
Definition: G4SIunits.hh:128
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
void SetModel(const G4OpticalSurfaceModel model)
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
static const double mm
Definition: G4SIunits.hh:114
#define ns
Definition: xmlparse.cc:614
void SetType(const G4SurfaceType &type)
static G4LogicalSkinSurface * GetSurface(const G4LogicalVolume *vol)
Here is the call graph for this function:

Member Data Documentation

◆ fBubble_x

G4double OpNoviceDetectorConstruction::fBubble_x
private

Definition at line 57 of file OpNoviceDetectorConstruction.hh.

◆ fBubble_y

G4double OpNoviceDetectorConstruction::fBubble_y
private

Definition at line 58 of file OpNoviceDetectorConstruction.hh.

◆ fBubble_z

G4double OpNoviceDetectorConstruction::fBubble_z
private

Definition at line 59 of file OpNoviceDetectorConstruction.hh.

◆ fExpHall_x

G4double OpNoviceDetectorConstruction::fExpHall_x
private

Definition at line 49 of file OpNoviceDetectorConstruction.hh.

◆ fExpHall_y

G4double OpNoviceDetectorConstruction::fExpHall_y
private

Definition at line 50 of file OpNoviceDetectorConstruction.hh.

◆ fExpHall_z

G4double OpNoviceDetectorConstruction::fExpHall_z
private

Definition at line 51 of file OpNoviceDetectorConstruction.hh.

◆ fTank_x

G4double OpNoviceDetectorConstruction::fTank_x
private

Definition at line 53 of file OpNoviceDetectorConstruction.hh.

◆ fTank_y

G4double OpNoviceDetectorConstruction::fTank_y
private

Definition at line 54 of file OpNoviceDetectorConstruction.hh.

◆ fTank_z

G4double OpNoviceDetectorConstruction::fTank_z
private

Definition at line 55 of file OpNoviceDetectorConstruction.hh.


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