1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // -------------------------------------------------------------- |
---|
28 | // GEANT 4 - ULTRA experiment example |
---|
29 | // -------------------------------------------------------------- |
---|
30 | // |
---|
31 | // Code developed by: |
---|
32 | // B. Tome, M.C. Espirito-Santo, A. Trindade, P. Rodrigues |
---|
33 | // |
---|
34 | // **************************************************** |
---|
35 | // * UltraDetectorConstruction.cc |
---|
36 | // **************************************************** |
---|
37 | // |
---|
38 | // Class used in the definition of the Ultra setup consisting of: |
---|
39 | // - the UVscope detector |
---|
40 | // - an optional reflecting surface |
---|
41 | // Optical photons can reach the UVscope either directly or after reflection in the |
---|
42 | // surface, which can be polished or diffusing. |
---|
43 | // The main part of the UVscope definition is the Fresnel lens construction based |
---|
44 | // on the UltraFresnelLens class. |
---|
45 | // |
---|
46 | #include <cmath> |
---|
47 | #include "UltraDetectorConstruction.hh" |
---|
48 | #include "UltraPMTSD.hh" |
---|
49 | #include "UltraFresnelLens.hh" |
---|
50 | |
---|
51 | #include "G4SDManager.hh" |
---|
52 | #include "G4Material.hh" |
---|
53 | #include "G4MaterialTable.hh" |
---|
54 | #include "G4Element.hh" |
---|
55 | #include "G4ElementTable.hh" |
---|
56 | #include "G4LogicalBorderSurface.hh" |
---|
57 | #include "G4Box.hh" |
---|
58 | #include "G4Sphere.hh" |
---|
59 | #include "G4Tubs.hh" |
---|
60 | #include "G4LogicalVolume.hh" |
---|
61 | #include "G4RotationMatrix.hh" |
---|
62 | #include "G4ThreeVector.hh" |
---|
63 | #include "G4Transform3D.hh" |
---|
64 | #include "G4PVPlacement.hh" |
---|
65 | #include "G4OpBoundaryProcess.hh" |
---|
66 | #include "G4VisAttributes.hh" |
---|
67 | #include "G4Colour.hh" |
---|
68 | |
---|
69 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
70 | |
---|
71 | UltraDetectorConstruction::UltraDetectorConstruction() |
---|
72 | { |
---|
73 | |
---|
74 | PMTSD = 0; |
---|
75 | |
---|
76 | // Sensitive Detector Manager |
---|
77 | SDmanager = G4SDManager::GetSDMpointer(); |
---|
78 | } |
---|
79 | |
---|
80 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
81 | |
---|
82 | UltraDetectorConstruction::~UltraDetectorConstruction(){;} |
---|
83 | |
---|
84 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
85 | |
---|
86 | G4VPhysicalVolume* UltraDetectorConstruction::Construct() |
---|
87 | { |
---|
88 | ConstructTableMaterials(); |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | // The experimental Hall |
---|
93 | // --------------------- |
---|
94 | |
---|
95 | G4double World_x = 1.*m; |
---|
96 | G4double World_y = 1.*m; |
---|
97 | G4double World_z = 2*m; |
---|
98 | |
---|
99 | G4Box * World_box = new G4Box("World",World_x,World_y,World_z); |
---|
100 | |
---|
101 | // Get Air pointer from static funcion - (G4Material::GetMaterial) |
---|
102 | |
---|
103 | G4String name; |
---|
104 | G4Material *Air = G4Material::GetMaterial(name = "Air"); |
---|
105 | G4LogicalVolume *World_log ; |
---|
106 | World_log = new G4LogicalVolume(World_box,Air,"World",0,0,0); |
---|
107 | |
---|
108 | G4VPhysicalVolume *World_phys ; |
---|
109 | World_phys = new G4PVPlacement(0,G4ThreeVector(),"World",World_log,0,false,0); |
---|
110 | |
---|
111 | G4VisAttributes* UniverseVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0)); |
---|
112 | UniverseVisAtt->SetVisibility(true); |
---|
113 | UniverseVisAtt->SetForceWireframe(true); |
---|
114 | World_log->SetVisAttributes(UniverseVisAtt); |
---|
115 | World_log->SetVisAttributes (G4VisAttributes::Invisible); |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | G4cout << "\n \n \n \n \n \n \n \n \n \n \n \n \n " << G4endl ; |
---|
120 | |
---|
121 | G4cout << "######################################################" << G4endl ; |
---|
122 | G4cout << "# #" << G4endl ; |
---|
123 | G4cout << "# #" << G4endl ; |
---|
124 | G4cout << "# UltraDetectorConstruction: #" << G4endl ; |
---|
125 | G4cout << "# #" << G4endl ; |
---|
126 | G4cout << "# #" << G4endl ; |
---|
127 | |
---|
128 | G4VPhysicalVolume* chosenVolume; |
---|
129 | chosenVolume = ConstructUVscope(World_phys); |
---|
130 | |
---|
131 | |
---|
132 | G4cout << "# #" << G4endl ; |
---|
133 | G4cout << "# #" << G4endl ; |
---|
134 | G4cout << "######################################################" << G4endl ; |
---|
135 | |
---|
136 | |
---|
137 | #ifdef ULTRA_MIRROR_USE |
---|
138 | |
---|
139 | G4cout << "Using mirror reflecting surface " << G4endl ; |
---|
140 | |
---|
141 | G4VPhysicalVolume* Mirror ; |
---|
142 | Mirror = ConstructMirror(World_phys); |
---|
143 | |
---|
144 | #elif ULTRA_GROUND_USE |
---|
145 | |
---|
146 | G4cout << "Using ground reflecting surface " << G4endl ; |
---|
147 | |
---|
148 | G4VPhysicalVolume* Ground ; |
---|
149 | Ground = ConstructGround(World_phys); |
---|
150 | |
---|
151 | #else |
---|
152 | |
---|
153 | G4cout << "No reflecting surface used" << G4endl ; |
---|
154 | |
---|
155 | #endif |
---|
156 | |
---|
157 | return World_phys; |
---|
158 | } |
---|
159 | |
---|
160 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
161 | |
---|
162 | void UltraDetectorConstruction::ConstructTableMaterials() |
---|
163 | { |
---|
164 | G4double a, z, density; |
---|
165 | G4String name, symbol; |
---|
166 | G4int nel; |
---|
167 | |
---|
168 | |
---|
169 | // ------------- Elements ------------- |
---|
170 | a = 1.01*g/mole; |
---|
171 | G4Element* elH = new G4Element(name="Hydrogen", symbol="H", z=1., a); |
---|
172 | |
---|
173 | a = 12.01*g/mole; |
---|
174 | G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a); |
---|
175 | |
---|
176 | a = 14.01*g/mole; |
---|
177 | G4Element* elN = new G4Element(name="Nitrogen", symbol="N", z=7., a); |
---|
178 | |
---|
179 | a = 16.00*g/mole; |
---|
180 | G4Element* elO = new G4Element(name="Oxygen", symbol="O", z=8., a); |
---|
181 | |
---|
182 | a = 28.09*g/mole; |
---|
183 | G4Element* elSi = new G4Element(name="Silicon", symbol="Si", z=14., a); |
---|
184 | |
---|
185 | |
---|
186 | // ------------- Materials ------------- |
---|
187 | |
---|
188 | |
---|
189 | // Air |
---|
190 | // --- |
---|
191 | density = 1.29e-03*g/cm3; |
---|
192 | G4Material* Air = new G4Material(name="Air", density, nel=2); |
---|
193 | Air->AddElement(elN, .7); |
---|
194 | Air->AddElement(elO, .3); |
---|
195 | |
---|
196 | |
---|
197 | // Aluminum |
---|
198 | // --------- |
---|
199 | a = 26.98*g/mole; |
---|
200 | density = 2.7*g/cm3; |
---|
201 | G4Material* Al ; |
---|
202 | Al = new G4Material(name="Aluminum", z=13., a, density); |
---|
203 | |
---|
204 | |
---|
205 | // Quartz |
---|
206 | // ------- |
---|
207 | // density = 2.200*g/cm3; // fused quartz |
---|
208 | density = 2.64*g/cm3; // crystalline quartz (c.f. PDG) |
---|
209 | G4Material *Quartz = new G4Material(name="Quartz",density, nel=2); |
---|
210 | Quartz->AddElement(elSi, 1) ; |
---|
211 | Quartz->AddElement(elO , 2) ; |
---|
212 | |
---|
213 | |
---|
214 | // PMMA C5H8O2 ( Acrylic ) |
---|
215 | // ------------- |
---|
216 | density = 1.19*g/cm3; |
---|
217 | G4Material* Acrylic = new G4Material(name="Acrylic", density, nel=3); |
---|
218 | Acrylic->AddElement(elC, 5); |
---|
219 | Acrylic->AddElement(elH, 8); |
---|
220 | Acrylic->AddElement(elO, 2); |
---|
221 | |
---|
222 | |
---|
223 | ///////////////////////////////////////////// |
---|
224 | // Construct Material Properties Tables |
---|
225 | ///////////////////////////////////////////// |
---|
226 | |
---|
227 | const G4int NUMENTRIES = 32; |
---|
228 | |
---|
229 | // Energy bins |
---|
230 | G4double X_RINDEX[NUMENTRIES] = |
---|
231 | { 2.034E-9*GeV, 2.068E-9*GeV, 2.103E-9*GeV, 2.139E-9*GeV, |
---|
232 | 2.177E-9*GeV, 2.216E-9*GeV, 2.256E-9*GeV, 2.298E-9*GeV, |
---|
233 | 2.341E-9*GeV, 2.386E-9*GeV, 2.433E-9*GeV, 2.481E-9*GeV, |
---|
234 | 2.532E-9*GeV, 2.585E-9*GeV, 2.640E-9*GeV, 2.697E-9*GeV, |
---|
235 | 2.757E-9*GeV, 2.820E-9*GeV, 2.885E-9*GeV, 2.954E-9*GeV, |
---|
236 | 3.026E-9*GeV, 3.102E-9*GeV, 3.181E-9*GeV, 3.265E-9*GeV, |
---|
237 | 3.353E-9*GeV, 3.446E-9*GeV, 3.545E-9*GeV, 3.649E-9*GeV, |
---|
238 | 3.760E-9*GeV, 3.877E-9*GeV, 4.002E-9*GeV, 4.136E-9*GeV } ; |
---|
239 | |
---|
240 | |
---|
241 | // Air |
---|
242 | G4double RINDEX_AIR[NUMENTRIES] = |
---|
243 | { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, |
---|
244 | 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, |
---|
245 | 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, |
---|
246 | 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, |
---|
247 | 1.00, 1.00, 1.00, 1.00 } ; |
---|
248 | |
---|
249 | // Air refractive index at 20 oC and 1 atm (from PDG) |
---|
250 | for(G4int j=0 ; j<NUMENTRIES ; j++){ |
---|
251 | RINDEX_AIR[j] = RINDEX_AIR[j] + 2.73*std::pow(10.0,-4) ; |
---|
252 | } |
---|
253 | |
---|
254 | G4MaterialPropertiesTable *MPT_Air = new G4MaterialPropertiesTable(); |
---|
255 | MPT_Air->AddProperty("RINDEX", X_RINDEX, RINDEX_AIR, NUMENTRIES); |
---|
256 | Air->SetMaterialPropertiesTable(MPT_Air); |
---|
257 | |
---|
258 | ////////////////////////////////////////////////////////////////////////////////////// |
---|
259 | // Photomultiplier (PMT) window |
---|
260 | // The refractive index is for lime glass; |
---|
261 | // wavelength dependence is not included and value at 400nm is used. |
---|
262 | ////////////////////////////////////////////////////////////////////////////////////// |
---|
263 | |
---|
264 | // Refractive index |
---|
265 | |
---|
266 | const G4int N_RINDEX_QUARTZ = 2 ; |
---|
267 | G4double X_RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {0.0*eV, 10.0*eV}; |
---|
268 | G4double RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {1.54, 1.54}; |
---|
269 | |
---|
270 | G4MaterialPropertiesTable *MPT_PMT = new G4MaterialPropertiesTable(); |
---|
271 | MPT_PMT->AddProperty("RINDEX", X_RINDEX_QUARTZ, RINDEX_QUARTZ, N_RINDEX_QUARTZ); |
---|
272 | |
---|
273 | Quartz->SetMaterialPropertiesTable(MPT_PMT); |
---|
274 | |
---|
275 | |
---|
276 | ////////////////////////////////////////////////////////////////// |
---|
277 | // ACRYLIC Optical properties |
---|
278 | ////////////////////////////////////////////////////////////////// |
---|
279 | |
---|
280 | // Refractive index |
---|
281 | |
---|
282 | const G4int N_RINDEX_ACRYLIC = 3 ; |
---|
283 | G4double X_RINDEX_ACRYLIC[N_RINDEX_ACRYLIC] = {320.0, 400.0, 500.0}; // Wavelength in nanometers |
---|
284 | G4double RINDEX_ACRYLIC[N_RINDEX_ACRYLIC] = {1.526, 1.507, 1.497}; |
---|
285 | |
---|
286 | // Convert from nm to GeV |
---|
287 | |
---|
288 | for(G4int i=0;i<N_RINDEX_ACRYLIC; i++){ |
---|
289 | X_RINDEX_ACRYLIC[i] = ((1239.84/X_RINDEX_ACRYLIC[i])*1E-9)*GeV; |
---|
290 | } |
---|
291 | |
---|
292 | G4MaterialPropertiesTable *MPT_Acrylic = new G4MaterialPropertiesTable(); |
---|
293 | MPT_Acrylic->AddProperty("RINDEX", X_RINDEX_ACRYLIC, RINDEX_ACRYLIC, N_RINDEX_ACRYLIC); |
---|
294 | Acrylic->SetMaterialPropertiesTable(MPT_Acrylic); |
---|
295 | |
---|
296 | |
---|
297 | ////////////////////////////////////////////////////////////////// |
---|
298 | |
---|
299 | G4cout << *(G4Material::GetMaterialTable()) << G4endl ; |
---|
300 | |
---|
301 | } |
---|
302 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
303 | |
---|
304 | G4VPhysicalVolume* UltraDetectorConstruction::ConstructMirror(G4VPhysicalVolume *World_phys){ |
---|
305 | |
---|
306 | G4double Mirror_x = 40.0*cm; |
---|
307 | G4double Mirror_y = 40.0*cm; |
---|
308 | G4double Mirror_z = 1*cm; |
---|
309 | |
---|
310 | G4Box * boxMirror = new G4Box("Mirror",Mirror_x,Mirror_y,Mirror_z); |
---|
311 | |
---|
312 | // Get Air pointer from static funcion - (G4Material::GetMaterial) |
---|
313 | |
---|
314 | G4String name; |
---|
315 | G4Material *Al = G4Material::GetMaterial(name = "Aluminum"); |
---|
316 | G4LogicalVolume *logMirror ; |
---|
317 | logMirror = new G4LogicalVolume(boxMirror,Al,"Mirror",0,0,0); |
---|
318 | |
---|
319 | |
---|
320 | G4ThreeVector SurfacePosition = G4ThreeVector(0*m,0*m,1.5*m) ; |
---|
321 | |
---|
322 | // Rotate reflecting surface by 45. degrees around the OX axis. |
---|
323 | |
---|
324 | G4RotationMatrix *Surfrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),-pi/4.); |
---|
325 | |
---|
326 | G4VPhysicalVolume *physMirror ; |
---|
327 | physMirror = new G4PVPlacement(Surfrot,SurfacePosition,"MirrorPV",logMirror,World_phys,false,0); |
---|
328 | |
---|
329 | G4VisAttributes* SurfaceVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0)); |
---|
330 | SurfaceVisAtt->SetVisibility(true); |
---|
331 | SurfaceVisAtt->SetForceWireframe(true); |
---|
332 | logMirror->SetVisAttributes(SurfaceVisAtt); |
---|
333 | |
---|
334 | |
---|
335 | ////////////////////////////////////////////////////////////////////////////////////////// |
---|
336 | // Optical properties of the interface between the Air and Reflective Surface |
---|
337 | // For Mirror, reflectivity is set at 95% and specular reflection is assumed. |
---|
338 | |
---|
339 | |
---|
340 | G4OpticalSurface *OpticalAirMirror = new G4OpticalSurface("AirMirrorSurface"); |
---|
341 | OpticalAirMirror->SetModel(unified); |
---|
342 | OpticalAirMirror->SetType(dielectric_dielectric); |
---|
343 | OpticalAirMirror->SetFinish(polishedfrontpainted); |
---|
344 | |
---|
345 | const G4int NUM = 2; |
---|
346 | G4double XX[NUM] = { 0.1E-9*GeV, 10.0E-9*GeV }; |
---|
347 | G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 }; |
---|
348 | |
---|
349 | G4MaterialPropertiesTable *AirMirrorMPT = new G4MaterialPropertiesTable(); |
---|
350 | AirMirrorMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM); |
---|
351 | OpticalAirMirror->SetMaterialPropertiesTable(AirMirrorMPT); |
---|
352 | |
---|
353 | |
---|
354 | G4LogicalBorderSurface *AirMirror ; |
---|
355 | AirMirror = new G4LogicalBorderSurface("Air/Mirror Surface",World_phys,physMirror,OpticalAirMirror); |
---|
356 | |
---|
357 | return physMirror ; |
---|
358 | |
---|
359 | } |
---|
360 | |
---|
361 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
362 | |
---|
363 | G4VPhysicalVolume* UltraDetectorConstruction::ConstructGround(G4VPhysicalVolume *World_phys){ |
---|
364 | |
---|
365 | G4double Ground_x = 40.0*cm; |
---|
366 | G4double Ground_y = 40.0*cm; |
---|
367 | G4double Ground_z = 1*cm; |
---|
368 | |
---|
369 | G4Box * boxGround = new G4Box("Ground",Ground_x,Ground_y,Ground_z); |
---|
370 | |
---|
371 | // Get Air pointer from static funcion - (G4Material::GetMaterial) |
---|
372 | |
---|
373 | G4String name; |
---|
374 | G4Material *Al = G4Material::GetMaterial(name = "Aluminum"); |
---|
375 | G4LogicalVolume *logGround ; |
---|
376 | logGround = new G4LogicalVolume(boxGround,Al,"Ground",0,0,0); |
---|
377 | |
---|
378 | |
---|
379 | G4ThreeVector SurfacePosition = G4ThreeVector(0*m,0*m,1.5*m) ; |
---|
380 | |
---|
381 | // Rotate reflecting surface by 45. degrees around the OX axis. |
---|
382 | |
---|
383 | G4RotationMatrix *Surfrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),-pi/4.); |
---|
384 | |
---|
385 | G4VPhysicalVolume *physGround ; |
---|
386 | physGround = new G4PVPlacement(Surfrot,SurfacePosition,"GroundPV",logGround,World_phys,false,0); |
---|
387 | |
---|
388 | G4VisAttributes* SurfaceVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0)); |
---|
389 | SurfaceVisAtt->SetVisibility(true); |
---|
390 | SurfaceVisAtt->SetForceWireframe(true); |
---|
391 | logGround->SetVisAttributes(SurfaceVisAtt); |
---|
392 | |
---|
393 | |
---|
394 | ////////////////////////////////////////////////////////////////////////////////////////// |
---|
395 | // Optical properties of the interface between the Air and Reflective Surface |
---|
396 | // For Ground, reflectivity is set to 95% and diffusive reflection is assumed. |
---|
397 | |
---|
398 | |
---|
399 | G4OpticalSurface *OpticalAirGround = new G4OpticalSurface("AirGroundSurface"); |
---|
400 | OpticalAirGround->SetModel(unified); |
---|
401 | OpticalAirGround->SetType(dielectric_dielectric); |
---|
402 | OpticalAirGround->SetFinish(groundfrontpainted); |
---|
403 | |
---|
404 | const G4int NUM = 2; |
---|
405 | G4double XX[NUM] = { 0.1E-9*GeV, 10.0E-9*GeV }; |
---|
406 | G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 }; |
---|
407 | |
---|
408 | G4MaterialPropertiesTable *AirGroundMPT = new G4MaterialPropertiesTable(); |
---|
409 | AirGroundMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM); |
---|
410 | OpticalAirGround->SetMaterialPropertiesTable(AirGroundMPT); |
---|
411 | |
---|
412 | |
---|
413 | G4LogicalBorderSurface *AirGround ; |
---|
414 | AirGround = new G4LogicalBorderSurface("Air/Ground Surface",World_phys,physGround,OpticalAirGround); |
---|
415 | |
---|
416 | return physGround ; |
---|
417 | |
---|
418 | } |
---|
419 | |
---|
420 | |
---|
421 | |
---|
422 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
423 | |
---|
424 | G4VPhysicalVolume* UltraDetectorConstruction::ConstructUVscope(G4VPhysicalVolume *World_phys){ |
---|
425 | |
---|
426 | // ------------- Volumes -------------- |
---|
427 | |
---|
428 | //////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
429 | |
---|
430 | G4cout << "# #" << G4endl ; |
---|
431 | G4cout << "# Building the Telescope ... #" << G4endl ; |
---|
432 | G4cout << "# #" << G4endl ; |
---|
433 | |
---|
434 | ///////////////////////////////////////////////////////////// |
---|
435 | // UVscope housing is a cylinder made of 1 mm thick aluminum |
---|
436 | ///////////////////////////////////////////////////////////// |
---|
437 | |
---|
438 | G4double UVscopeHeight = 1030.0*mm ; |
---|
439 | G4double UVscopeDiameter = 518.0*mm ; |
---|
440 | G4double UVscopeThickness = 1.0*mm ; |
---|
441 | G4double UVscopeBaffle = 514.0*mm ; |
---|
442 | |
---|
443 | G4double UVscopeInnerRadius = UVscopeDiameter/2.0-UVscopeThickness ; |
---|
444 | G4double UVscopeOuterRadius = UVscopeDiameter/2.0 ; |
---|
445 | |
---|
446 | G4ThreeVector UVscopePosition = G4ThreeVector(0.0*m,0.0*m,-1.0*m) ; |
---|
447 | G4String name; |
---|
448 | G4Material* Al = G4Material::GetMaterial(name = "Aluminum"); |
---|
449 | |
---|
450 | |
---|
451 | G4Tubs *solidUVscope = |
---|
452 | new G4Tubs("UVscopeSolid",UVscopeInnerRadius,UVscopeOuterRadius,UVscopeHeight/2.0,0.0,twopi) ; |
---|
453 | G4LogicalVolume *logicUVscope = |
---|
454 | new G4LogicalVolume(solidUVscope,Al,"UVscopeLV",0,0,0); |
---|
455 | G4VPhysicalVolume *physicalUVscope = |
---|
456 | new G4PVPlacement(0,UVscopePosition,"UVSCopePV",logicUVscope,World_phys,false,0); |
---|
457 | |
---|
458 | |
---|
459 | ////////////////////////////////////// |
---|
460 | // Back cover of the UVscope cylinder |
---|
461 | ////////////////////////////////////// |
---|
462 | |
---|
463 | G4Tubs *solidUVscopeBack = |
---|
464 | new G4Tubs("UVscopeBackSolid",0.0,UVscopeOuterRadius,UVscopeThickness/2.0,0.0,twopi) ; |
---|
465 | |
---|
466 | G4LogicalVolume *logicUVscopeBack = |
---|
467 | new G4LogicalVolume(solidUVscopeBack,Al,"UVscopeBackLV",0,0,0); |
---|
468 | |
---|
469 | G4ThreeVector UVscopeBackPosition ; |
---|
470 | UVscopeBackPosition = UVscopePosition+G4ThreeVector(0.0*mm,0.0*mm,-(UVscopeHeight/2.0+UVscopeThickness/2.0)) ; |
---|
471 | G4VPhysicalVolume *physicalUVscopeBack = |
---|
472 | new G4PVPlacement(0,UVscopeBackPosition,"UVscopeBack",logicUVscopeBack,World_phys,false,0); |
---|
473 | |
---|
474 | |
---|
475 | |
---|
476 | //////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
477 | |
---|
478 | G4cout << "# #" << G4endl ; |
---|
479 | G4cout << "# Building the Fresnel lens ... #" << G4endl ; |
---|
480 | G4cout << "# #" << G4endl ; |
---|
481 | |
---|
482 | G4double LensDiameter = 457*mm ; // Size of the optical active area of the lens. |
---|
483 | G4int LensNumOfGrooves = 13 ; |
---|
484 | //G4int LensNumOfGrooves = 129 ; |
---|
485 | //G4int LensNumOfGrooves = 1287 ; |
---|
486 | |
---|
487 | G4double LensBorderThickness = 2.8*mm ; // Thickness of the border area. |
---|
488 | G4double LensFocalLength = 441.973*mm ; // This parameter depends on the lens geometry, etc !! |
---|
489 | G4Material *LensMaterial = G4Material::GetMaterial(name = "Acrylic") ; |
---|
490 | G4ThreeVector LensPosition = UVscopePosition+G4ThreeVector(0.0*mm,0.0*mm,UVscopeHeight/2.0-UVscopeBaffle) ; |
---|
491 | |
---|
492 | |
---|
493 | UltraFresnelLens *FresnelLens = new UltraFresnelLens(LensDiameter,LensNumOfGrooves,LensMaterial,World_phys,LensPosition) ; |
---|
494 | |
---|
495 | |
---|
496 | /////////////////////////////////// |
---|
497 | // Lens supporting ring (aluminum) |
---|
498 | /////////////////////////////////// |
---|
499 | |
---|
500 | G4Tubs *solidLensFrame = new G4Tubs("LensFrame",LensDiameter/2.0,UVscopeInnerRadius,LensBorderThickness/2.0,0.0,twopi) ; |
---|
501 | G4LogicalVolume *logicLensFrame = new G4LogicalVolume(solidLensFrame,Al,"LensFrameLV",0,0,0); |
---|
502 | |
---|
503 | G4ThreeVector LensFramePosition ; |
---|
504 | LensFramePosition = LensPosition+G4ThreeVector(0.0*mm,0.0*mm,-((FresnelLens->GetThickness())/2.0+solidLensFrame->GetDz())) ; |
---|
505 | |
---|
506 | G4VPhysicalVolume *physicalLensFrame = |
---|
507 | new G4PVPlacement(0,LensFramePosition,"LensFramePV",logicLensFrame,World_phys,false,0); |
---|
508 | |
---|
509 | //////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
510 | |
---|
511 | |
---|
512 | G4cout << "# #" << G4endl ; |
---|
513 | G4cout << "# Building the photomultiplier ... #" << G4endl ; |
---|
514 | G4cout << "# #" << G4endl ; |
---|
515 | |
---|
516 | |
---|
517 | // Photomultiplier window is a spherical section made of quartz |
---|
518 | |
---|
519 | G4double PMT_thick = 1.0*mm ; // Thickness of PMT window |
---|
520 | G4double PMT_curv = 65.5*mm ; // Radius of curvature of PMT window |
---|
521 | G4double StartTheta = (180.0-31.2)*pi/180. ; |
---|
522 | G4double EndTheta = 31.2*pi/180. ; |
---|
523 | |
---|
524 | G4Sphere *solidPMT ; |
---|
525 | solidPMT = new G4Sphere("PMT_solid",PMT_curv-PMT_thick,PMT_curv,0.0,twopi,StartTheta,EndTheta); |
---|
526 | |
---|
527 | G4Material* Quartz = G4Material::GetMaterial(name = "Quartz"); |
---|
528 | G4LogicalVolume * logicalPMT ; |
---|
529 | logicalPMT = new G4LogicalVolume(solidPMT,Quartz,"PMT_log",0,0,0); |
---|
530 | |
---|
531 | |
---|
532 | // Place PMT is at Lens Focus |
---|
533 | |
---|
534 | G4ThreeVector PMTpos = LensPosition + G4ThreeVector(0.0*cm,0.0*cm,-(LensFocalLength+PMT_curv)) ; |
---|
535 | |
---|
536 | // Rotate PMT window through the axis OX by an angle = 180. degrees |
---|
537 | |
---|
538 | G4RotationMatrix *PMTrot = new G4RotationMatrix(G4ThreeVector(1.0,0.0,0.0),pi); |
---|
539 | G4VPhysicalVolume *physPMT ; |
---|
540 | physPMT = new G4PVPlacement(PMTrot,PMTpos,"PMT1",logicalPMT,World_phys,false,0); |
---|
541 | |
---|
542 | if(!PMTSD) |
---|
543 | { |
---|
544 | PMTSD = new UltraPMTSD("PMTSD"); |
---|
545 | SDmanager->AddNewDetector( PMTSD ); |
---|
546 | } |
---|
547 | |
---|
548 | if (logicalPMT){logicalPMT->SetSensitiveDetector(PMTSD);} |
---|
549 | |
---|
550 | G4VisAttributes* PMTVisAtt = new G4VisAttributes(true,G4Colour(0.0,0.0,1.0)) ; |
---|
551 | logicalPMT->SetVisAttributes(PMTVisAtt); |
---|
552 | |
---|
553 | ////////////////////////////////////////////////////////////////////////////////////////// |
---|
554 | // Optical properties of the interface between the Air and the walls of the |
---|
555 | // UVscope cylinder (5% reflectivity) |
---|
556 | |
---|
557 | |
---|
558 | G4cout << "# Defining interface's optical properties ... #" << G4endl ; |
---|
559 | G4cout << "# #" << G4endl ; |
---|
560 | |
---|
561 | |
---|
562 | G4OpticalSurface *OpticalAirPaint = new G4OpticalSurface("AirPaintSurface"); |
---|
563 | OpticalAirPaint->SetModel(unified); |
---|
564 | OpticalAirPaint->SetType(dielectric_dielectric); |
---|
565 | OpticalAirPaint->SetFinish(groundfrontpainted); |
---|
566 | |
---|
567 | const G4int NUM = 2; |
---|
568 | G4double XX[NUM] = { 2.030E-9*GeV, 4.144E-9*GeV }; |
---|
569 | G4double BLACKPAINTREFLECTIVITY[NUM] = { 0.05, 0.05 }; |
---|
570 | //G4double WHITEPAINTREFLECTIVITY[NUM] = { 0.99, 0.99 }; |
---|
571 | |
---|
572 | G4MaterialPropertiesTable *AirPaintMPT = new G4MaterialPropertiesTable(); |
---|
573 | AirPaintMPT->AddProperty("REFLECTIVITY", XX, BLACKPAINTREFLECTIVITY,NUM); |
---|
574 | OpticalAirPaint->SetMaterialPropertiesTable(AirPaintMPT); |
---|
575 | |
---|
576 | //OpticalAirPaint->DumpInfo(); |
---|
577 | |
---|
578 | G4LogicalBorderSurface *AirCylinder ; |
---|
579 | AirCylinder = new G4LogicalBorderSurface("Air/UVscope Cylinder Surface",World_phys,physicalUVscope,OpticalAirPaint); |
---|
580 | |
---|
581 | G4LogicalBorderSurface *AirLensFrame ; |
---|
582 | AirLensFrame = new G4LogicalBorderSurface("Air/LensFrame Surface",World_phys,physicalLensFrame,OpticalAirPaint); |
---|
583 | |
---|
584 | G4LogicalBorderSurface *AirBackCover ; |
---|
585 | AirBackCover = new G4LogicalBorderSurface("Air/UVscope Back Cover Surface",World_phys,physicalUVscopeBack,OpticalAirPaint); |
---|
586 | |
---|
587 | |
---|
588 | ///////////////////////////////////////////////////////////////////////////////////// |
---|
589 | |
---|
590 | |
---|
591 | G4VisAttributes* LensVisAtt = new G4VisAttributes(G4Colour(1.0,0.0,0.0)) ; // Red |
---|
592 | LensVisAtt ->SetVisibility(true); |
---|
593 | |
---|
594 | |
---|
595 | if (FresnelLens){ |
---|
596 | FresnelLens->GetPhysicalVolume()->GetLogicalVolume()->SetVisAttributes(LensVisAtt); |
---|
597 | } |
---|
598 | |
---|
599 | G4VisAttributes* UVscopeVisAtt = new G4VisAttributes(G4Colour(0.5,0.5,0.5)) ; // Gray |
---|
600 | UVscopeVisAtt ->SetVisibility(true); |
---|
601 | |
---|
602 | physicalUVscope ->GetLogicalVolume()->SetVisAttributes(UVscopeVisAtt); |
---|
603 | physicalUVscopeBack ->GetLogicalVolume()->SetVisAttributes(UVscopeVisAtt); |
---|
604 | physicalLensFrame ->GetLogicalVolume()->SetVisAttributes(UVscopeVisAtt); |
---|
605 | |
---|
606 | ///////////////////////////////////////////////////////////////////////////////////// |
---|
607 | |
---|
608 | G4cout << "# #" << G4endl ; |
---|
609 | G4cout << "# UVscope is built ! ... #" << G4endl ; |
---|
610 | G4cout << "# #" << G4endl ; |
---|
611 | |
---|
612 | return physicalUVscope; |
---|
613 | } |
---|
614 | |
---|
615 | |
---|
616 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
617 | |
---|
618 | |
---|
619 | |
---|