source: ELYSE/HEAD/source/DetectorConstruction.cxx @ 286

Last change on this file since 286 was 286, checked in by campagne, 17 years ago

ELYSE sauvegarde provisoire (JEC)

File size: 24.9 KB
Line 
1#include "ELYSE/DetectorConstruction.hh"
2
3// Geant 4
4#include "G4MaterialTable.hh"
5#include "G4ElementTable.hh"
6#include "G4Box.hh"
7#include "G4SubtractionSolid.hh"
8#include "G4VPhysicalVolume.hh"
9#include "G4OpticalSurface.hh"
10#include "G4LogicalVolume.hh"
11#include "G4LogicalSkinSurface.hh"
12#include "G4LogicalBorderSurface.hh"
13#include "G4PVPlacement.hh"
14#include "G4SDManager.hh"
15#include "G4Material.hh"
16#include "G4Element.hh"
17
18#include "G4GeometryManager.hh"
19#include "G4PhysicalVolumeStore.hh"
20#include "G4LogicalVolumeStore.hh"
21#include "G4SolidStore.hh"
22#include "G4RunManager.hh"
23#include "G4Colour.hh"
24#include "G4VisAttributes.hh"
25
26//ELYSE
27#include "ELYSE/TrappingVolume.hh"
28#include "ELYSE/DetectorMessenger.hh"
29#include "ELYSE/Cast.hh"
30#include "ELYSE/Analysis.hh"
31
32ELYSE::DetectorConstruction::DetectorConstruction() {
33
34  //-----------------
35  // Create Materials
36  //-----------------
37   
38  ConstructMaterials();
39
40  //-----------------
41  // Initilize SD pointers
42  //-----------------
43
44  aTrappingVolume  = 0; 
45
46  //-----------------
47  // Volume/Surface lengths/size (default)
48  //-----------------
49
50  //The Hall
51  expHall_x = expHall_y = expHall_z = 1.0*m;
52  //The target volume
53  water_x    = water_y    = water_z    = 10.0*cm;
54  //tyvek sheet thickness
55  tyvek_thickness = 1.0*mm;
56
57
58  updated = true;
59
60  //Initialize the optical surface
61  OpWaterTyvekSurface = 0;
62  OpWaterAirSurface   = 0;
63
64
65  //-----------------
66  // Make the detector messenger to allow changing geometry
67  //-----------------
68
69  messenger = new DetectorMessenger(this);
70
71
72}//Ctor
73
74//----------------------------------------------------------------------------------------------
75ELYSE::DetectorConstruction::~DetectorConstruction(){
76  delete messenger;
77}
78
79//-----------------------------------------------------------------------------------------------
80
81G4VPhysicalVolume* ELYSE::DetectorConstruction::Construct() {
82
83  //-----------------------
84  // The Solids
85  //-----------------------
86
87  //-----------------------
88  // A box of water delimited by a tyvek sheet and surrounding by a air volume sensitive
89  //-----------------------
90
91
92  G4Box* solidExpHall = new G4Box("expHall",
93                                  expHall_x/2.,
94                                  expHall_y/2.,
95                                  expHall_z/2.);
96 
97
98  //a volume sensitive to trap every particles...
99  G4Box*  solidSensiVolFull = new G4Box("SensiVolFull",
100                                    water_x/2.+ 2.*tyvek_thickness,
101                                    water_y/2.+ 2.*tyvek_thickness,
102                                    water_z/2.+ 2.*tyvek_thickness
103                                    );
104 
105
106  G4Box*  solidTyvekFull = new G4Box("TyvekFull",
107                                     water_x/2.+tyvek_thickness,
108                                     water_y/2.+tyvek_thickness,
109                                     water_z/2.+tyvek_thickness
110                                     );
111
112  G4Box* solidWaterTank = new G4Box("waterTank",water_x/2.,water_y/2.,water_z/2.);
113
114
115
116  G4SubtractionSolid* solidSensiVol = new G4SubtractionSolid("SensiVol",solidSensiVolFull,solidTyvekFull);
117
118  //Make the tyvek volume as an subtraction to define a proper tyvek volume for the oprtical surface
119  //overwise we would have done a tyvek volume and place inside a water volume...
120  G4SubtractionSolid* solidTyvek = new G4SubtractionSolid("TyvekSheet",solidTyvekFull,solidWaterTank);
121
122
123  //-----------------------
124  // The Logical and Physical volumes
125  // The vizualization attributes are defined in scripts/Styles/ELYSE.styles
126  //-----------------------
127
128
129
130  G4LogicalVolume* logicExpHall = 
131    new G4LogicalVolume(solidExpHall,
132                        G4Material::GetMaterial("Air"),
133                        "expHall",
134                        0,0,0);
135
136  G4VPhysicalVolume* physicExpHall = 
137    new G4PVPlacement(0,G4ThreeVector(),
138                      logicExpHall,
139                      "expHall",
140                      0,false,0);
141
142
143  G4LogicalVolume* logicSensiVol
144    = new G4LogicalVolume(solidSensiVol,G4Material::GetMaterial("Glass"),"SensiVol",0,0,0);
145
146
147  G4VPhysicalVolume* physicSensiVol
148    = new G4PVPlacement(0,G4ThreeVector(),logicSensiVol,"SensiVol",
149                        logicExpHall,false,0);
150
151
152  G4LogicalVolume* logicTyvek
153    = new G4LogicalVolume(solidTyvek,G4Material::GetMaterial("Tyvek"),"TyvekSheet",0,0,0);
154
155  G4VPhysicalVolume* physicTyvek
156    = new G4PVPlacement(0,G4ThreeVector(),logicTyvek,"TyvekSheet",
157                        logicExpHall,false,0);
158
159  G4LogicalVolume* logicWaterTank
160    = new G4LogicalVolume(solidWaterTank,G4Material::GetMaterial("Water"),"waterTank",0,0,0);
161 
162
163  G4VPhysicalVolume* physicWaterTank
164    = new G4PVPlacement(0,G4ThreeVector(),logicWaterTank,"waterTank",
165                        logicExpHall,false,0);
166 
167
168  //introduce the interfaces Water-Tyvek and Tyvek-Glass for optical photons
169  new G4LogicalBorderSurface("waterTyvekInterface",
170                               physicWaterTank,physicTyvek,OpWaterTyvekSurface);
171 
172  new G4LogicalBorderSurface("tyvekGlassInterface",
173                               physicTyvek,physicSensiVol,OpTyvekGlassSurface);
174
175  //--------------
176  // Make sensitive detectors (this is quite artificial for the moment 13/2/07)
177  //--------------
178
179  G4SDManager* SDman = G4SDManager::GetSDMpointer();
180 
181  if (!aTrappingVolume) {
182    //JEC 25/1/06 add the "this" pointer, so WCSD can access to the PMT location wo static functions
183    aTrappingVolume = new TrappingVolume( "/ELYSE/TrappingVolume", this ); 
184    SDman->AddNewDetector( aTrappingVolume );
185  }
186  logicSensiVol->SetSensitiveDetector( aTrappingVolume );
187
188
189
190  // Return the pointer to the physical experimental hall
191  return physicExpHall;
192} //Construct
193
194//---------------------------------------------------------------------------------------------
195void ELYSE::DetectorConstruction::ConstructMaterials() {
196   
197  //---Vaccuum
198  G4double density     = universe_mean_density;              //from PhysicalConstants.h
199  G4double pressure    = 1.e-19*pascal;
200  G4double temperature = 0.1*kelvin;
201  G4double a = 1.01*g/mole;
202  new G4Material("Vaccuum", 1., a, density,
203                   kStateGas,temperature,pressure);
204
205  //---Water
206 
207  a = 1.01*g/mole;
208  G4Element* elH
209    = new G4Element("Hydrgen","H", 1,a);
210 
211  a = 16.00*g/mole;
212  G4Element* elO
213    = new G4Element("Oxygen","O", 8,a);
214 
215  density = 1.00*g/cm3;
216  G4Material* Water
217    = new G4Material("Water",density,2);
218  Water->AddElement(elH, 2);
219  Water->AddElement(elO, 1);
220
221  //---Air
222 
223  a = 14.01*g/mole;
224  G4Element* elN
225    = new G4Element("Nitrogen","N", 7,a);
226 
227  density = 1.290*mg/cm3;
228  G4Material* Air
229    = new G4Material("Air",density,2);
230  Air->AddElement(elN, 70.*perCent);
231  Air->AddElement(elO, 30.*perCent);
232 
233
234  //---Glass
235  a = 28.09*g/mole;
236  G4Element* elSi = new G4Element("Silicon", "Si", 14., a); 
237 
238  density = 2.20*g/cm3;
239  G4Material* SiO2 = new G4Material("SiO2",density,2);
240  SiO2->AddElement(elSi, 1);
241  SiO2->AddElement(elO , 2);
242
243  a = 10.81*g/mole;
244  G4Element* elB = new G4Element("Boron", "B", 5, a); 
245
246  density = 2.46*g/cm3;
247  G4Material* B2O3 = new G4Material("B2O3",density,2);
248  B2O3->AddElement(elB, 2);
249  B2O3->AddElement(elO, 3);
250
251  a = 22.99*g/mole;
252  G4Element* elNa = new G4Element("Sodium", "Na", 11, a); 
253
254  density = 2.27*g/cm3;
255  G4Material* Na2O = new G4Material("Na2O",density,2);
256  Na2O->AddElement(elNa, 2);
257  Na2O->AddElement(elO, 1);
258
259  a = 26.98*g/mole;
260  G4Element* elAl = new G4Element("Aluminum", "Al", 13, a); 
261
262  density = 4.00*g/cm3;
263  G4Material* Al2O3 = new G4Material("Al2O3",density,2);
264  Al2O3->AddElement(elAl, 2);
265  Al2O3->AddElement(elO, 3);
266
267  density = 2.23*g/cm3;
268  G4Material* Glass = new G4Material("Glass",density,4);
269 
270  Glass->AddMaterial(SiO2, 80.6*perCent);
271  Glass->AddMaterial(B2O3, 13.0*perCent);
272  Glass->AddMaterial(Na2O, 4.0*perCent);
273  Glass->AddMaterial(Al2O3, 2.4*perCent);
274
275
276  //---Tyvek
277  //JEC : 9/2/07 as MEMPHYS/SK::Blacksheet in a version 0
278  //JEC + SDC: 9/2/07 use Auger Liner definition
279  a= 12.01*g/mole;
280  G4Element* elC
281    = new G4Element("Carbon","C", 6,a);
282
283  density = 0.94*g/cm3;
284  G4Material* Tyvek = new G4Material("Tyvek",density,2);
285  Tyvek->AddElement(elC, 2);
286  Tyvek->AddElement(elH, 4);
287
288
289  // -------------------------------------------------------------
290  // Generate & Add Material Properties Table
291  // -------------------------------------------------------------
292 
293  const G4int NUMENTRIES_general=60; //number of energy bins to simulate material properties
294 
295  //--------------
296  //-------- Water
297  //--------------
298 
299  G4double ENERGY_water[NUMENTRIES_general] =
300    { 1.56962*eV, 1.58974*eV, 1.61039*eV, 1.63157*eV, 
301      1.65333*eV, 1.67567*eV, 1.69863*eV, 1.72222*eV, 
302      1.74647*eV, 1.77142*eV, 1.79710*eV, 1.82352*eV, 
303      1.85074*eV, 1.87878*eV, 1.90769*eV, 1.93749*eV, 
304      1.96825*eV, 1.99999*eV, 2.03278*eV, 2.06666*eV,
305      2.10169*eV, 2.13793*eV, 2.17543*eV, 2.21428*eV, 
306      2.25454*eV, 2.29629*eV, 2.33962*eV, 2.38461*eV, 
307      2.43137*eV, 2.47999*eV, 2.53061*eV, 2.58333*eV, 
308      2.63829*eV, 2.69565*eV, 2.75555*eV, 2.81817*eV, 
309      2.88371*eV, 2.95237*eV, 3.02438*eV, 3.09999*eV,
310      3.17948*eV, 3.26315*eV, 3.35134*eV, 3.44444*eV, 
311      3.54285*eV, 3.64705*eV, 3.75757*eV, 3.87499*eV, 
312      3.99999*eV, 4.13332*eV, 4.27585*eV, 4.42856*eV, 
313      4.59258*eV, 4.76922*eV, 4.95999*eV, 5.16665*eV, 
314      5.39129*eV, 5.63635*eV, 5.90475*eV, 6.19998*eV };
315
316  G4double RINDEX1[NUMENTRIES_general] = 
317    { 1.32885, 1.32906, 1.32927, 1.32948, 1.3297, 1.32992, 1.33014, 
318      1.33037, 1.3306, 1.33084, 1.33109, 1.33134, 1.3316, 1.33186, 1.33213,
319      1.33241, 1.3327, 1.33299, 1.33329, 1.33361, 1.33393, 1.33427, 1.33462,
320      1.33498, 1.33536, 1.33576, 1.33617, 1.3366, 1.33705, 1.33753, 1.33803,
321      1.33855, 1.33911, 1.3397, 1.34033, 1.341, 1.34172, 1.34248, 1.34331,
322      1.34419, 1.34515, 1.3462, 1.34733, 1.34858, 1.34994, 1.35145, 1.35312,
323      1.35498, 1.35707, 1.35943, 1.36211, 1.36518, 1.36872, 1.37287, 1.37776,
324      1.38362, 1.39074, 1.39956, 1.41075, 1.42535 };
325 
326  G4double ABSORPTION_water[NUMENTRIES_general] =
327    {25.3504*cm, 31.7938*cm, 39.9915*cm, 50.454*cm, 63.85*cm, 
328     81.0584*cm, 103.24*cm, 131.93*cm, 169.172*cm, 217.694*cm, 
329     224.921*cm, 249.688*cm, 262.674*cm, 273*cm, 321.13*cm, 339.789*cm,
330     351.617*cm, 363.108*cm, 385.802*cm, 461.042*cm, 707.714*cm, 
331     1038.42*cm, 1383.7*cm, 1558.36*cm, 1722.65*cm, 1939.11*cm, 
332     2092.49*cm, 2240.14*cm, 2962.96*cm, 4967.03*cm, 6368.58*cm, 
333     8207.56*cm, 10634.2*cm, 13855.3*cm, 18157.3*cm, 23940.2*cm, 
334     31766*cm, 42431.6*cm, 57074.9*cm, 77335.9*cm, 105598*cm, 
335     145361*cm, 192434*cm, 183898*cm, 176087*cm, 168913*cm, 162301*cm, 
336     156187*cm, 150516*cm, 145243*cm, 140327*cm, 135733*cm, 131430*cm, 
337     127392*cm, 123594*cm, 120016*cm, 116640*cm, 113448*cm, 110426*cm, 
338     107562*cm};
339 
340  // M Fechner: Rayleigh scattering -- as of version 4.6.2 of GEANT,
341  // one may use one's own Rayleigh scattering lengths (the buffer is no
342  // longer overwritten for "water", see 4.6.2 release notes)
343 
344  // RAYFF = 1/ARAS, for those of you who know SKdetsim...
345  // actually that's not quite right because the scattering models
346  // are different; in G4 there is no scattering depolarization
347  // std value at SK = 0.6. But Mie scattering is implemented
348  // in SKdetsim and not in G4
349 
350  // april 2005 : reduced reflections, let's increase scattering...
351  //   G4double RAYFF = 1.0/1.65;
352  G4double RAYFF = 1.0/1.5;
353 
354  G4double RAYLEIGH_water[NUMENTRIES_general] = {
355    167024.4*cm*RAYFF, 158726.7*cm*RAYFF, 150742*cm*RAYFF,
356    143062.5*cm*RAYFF, 135680.2*cm*RAYFF, 128587.4*cm*RAYFF,
357    121776.3*cm*RAYFF, 115239.5*cm*RAYFF, 108969.5*cm*RAYFF,
358    102958.8*cm*RAYFF, 97200.35*cm*RAYFF, 91686.86*cm*RAYFF,
359    86411.33*cm*RAYFF, 81366.79*cm*RAYFF, 76546.42*cm*RAYFF,
360    71943.46*cm*RAYFF, 67551.29*cm*RAYFF, 63363.36*cm*RAYFF,
361    59373.25*cm*RAYFF, 55574.61*cm*RAYFF, 51961.24*cm*RAYFF,
362    48527.00*cm*RAYFF, 45265.87*cm*RAYFF, 42171.94*cm*RAYFF,
363    39239.39*cm*RAYFF, 36462.50*cm*RAYFF, 33835.68*cm*RAYFF,
364    31353.41*cm*RAYFF, 29010.30*cm*RAYFF, 26801.03*cm*RAYFF,
365    24720.42*cm*RAYFF, 22763.36*cm*RAYFF, 20924.88*cm*RAYFF,
366    19200.07*cm*RAYFF, 17584.16*cm*RAYFF, 16072.45*cm*RAYFF,
367    14660.38*cm*RAYFF, 13343.46*cm*RAYFF, 12117.33*cm*RAYFF,
368    10977.70*cm*RAYFF, 9920.416*cm*RAYFF, 8941.407*cm*RAYFF,
369    8036.711*cm*RAYFF, 7202.470*cm*RAYFF, 6434.927*cm*RAYFF,
370    5730.429*cm*RAYFF, 5085.425*cm*RAYFF, 4496.467*cm*RAYFF,
371    3960.210*cm*RAYFF, 3473.413*cm*RAYFF, 3032.937*cm*RAYFF,
372    2635.746*cm*RAYFF, 2278.907*cm*RAYFF, 1959.588*cm*RAYFF,
373    1675.064*cm*RAYFF, 1422.710*cm*RAYFF, 1200.004*cm*RAYFF,
374    1004.528*cm*RAYFF, 833.9666*cm*RAYFF, 686.1063*cm*RAYFF
375  };
376
377  // SDC: new parameters for scintillation
378
379  G4double SCINTILFAST[NUMENTRIES_general] = 
380    { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
381      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
382      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
383      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
384      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
385      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
386      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
387      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
388      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
389      1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
390
391
392   G4double SCINTILSLOW[NUMENTRIES_general] = 
393     { 0 , 0 , 0 , 0 , 0 , 0 , 0, 
394       0 , 0 , 0 , 0 , 0 , 0 , 
395       0 , 0 , 0 , 0 , 0 , 0 , 
396       0.505 , 1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 
397       6.5 , 7.5 , 8.5 , 8.5 , 7.5 , 6.5 , 
398       5 , 3.5 , 2.5 , 1.5 , 0.505 , 0.505 , 
399       1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 6.5 , 
400       7.5 , 8.5 , 8.5 , 7.5 , 6.5 , 5.5 , 
401       4.5 , 0 , 0 , 0 , 0 , 0 , 
402       0 , 0 , 0 , 0 , 0  };
403
404   G4MaterialPropertiesTable *myMPT1 = new G4MaterialPropertiesTable();
405   myMPT1->AddProperty("RINDEX", ENERGY_water, RINDEX1, NUMENTRIES_general);
406   myMPT1->AddProperty("ABSLENGTH",ENERGY_water, ABSORPTION_water, NUMENTRIES_general);
407
408   myMPT1->AddProperty("FASTCOMPONENT",ENERGY_water,SCINTILFAST,NUMENTRIES_general);
409   myMPT1->AddProperty("SLOWCOMPONENT",ENERGY_water,SCINTILSLOW,NUMENTRIES_general);
410
411   // M Fechner: new, don't let G4 compute it.
412   myMPT1->AddProperty("RAYLEIGH",ENERGY_water,RAYLEIGH_water,NUMENTRIES_general);
413
414   //SDC : scintillation part if needed (G4 exemple ???)
415   myMPT1->AddConstProperty("SCINTILLATIONYIELD",50./MeV);
416   myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
417   myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
418   myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
419   myMPT1->AddConstProperty("YIELDRATIO",0.8);
420
421
422   Water->SetMaterialPropertiesTable(myMPT1);
423   
424   G4cout << "ConstructMaterial: Dump Water properties" << G4endl;
425   myMPT1->DumpTable();
426   
427
428   //--------------
429   //------------ Air
430   //--------------
431  G4double RINDEX_air[NUMENTRIES_general] = 
432    { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
433      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
434      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
435      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
436      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
437      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
438      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
439      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
440      1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
441      1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
442
443   //utter fiction at this stage, does not matter
444   G4double RAYLEIGH_air[NUMENTRIES_general] =
445     { 0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
446       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
447       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
448       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
449       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
450       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
451       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
452       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
453       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,
454       0.001*m,0.001*m,0.001*m,0.001*m,0.001*m,0.001*m};
455
456   G4double ABSORPTION_air[NUMENTRIES_general] =
457     { 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
458       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
459       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
460       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
461       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 
462       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
463       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
464       1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm, 1.0e-9*cm,
465       1.0e-9*cm, 1.0e-9*cm,1.0e-9*cm, 1.0e-9*cm};
466
467
468   G4MaterialPropertiesTable *myMPT2 = new G4MaterialPropertiesTable();
469   myMPT2->AddProperty("RINDEX", ENERGY_water, RINDEX_air, NUMENTRIES_general);
470   // M Fechner : what is that ?????
471   //   myMPT2->AddProperty("ABSLENGTH", ENERGY_water, BLACKABS_blacksheet, NUMENTRIES_general);
472   // JEC: replace BLACKABS_blacksheet by  ABSORPTION_air
473   myMPT2->AddProperty("ABSLENGTH", ENERGY_water, ABSORPTION_air, NUMENTRIES_general);
474   myMPT2->AddProperty("RAYLEIGH",ENERGY_water, RAYLEIGH_air, NUMENTRIES_general);
475   Air->SetMaterialPropertiesTable(myMPT2);
476
477
478   //--------------
479   //----------------  Tyvek
480   //--------------
481   //JEC 9/2/07 : as Blacksheet in a version 0
482   //JEC +SDC 9/2/07: introduce the Auger simulation of the liner
483   
484   const G4int NUMENTRIES_tyvek = 30;
485
486   G4double ENERGY_tyvek[NUMENTRIES_tyvek] = {
487     2.08*eV , 2.16*eV , 2.19*eV , 2.23*eV , 2.27*eV , 2.32*eV , 2.36*eV , 2.41*eV , 2.46*eV , 2.50*eV , 
488     2.56*eV , 2.61*eV , 2.67*eV , 2.72*eV , 2.79*eV , 2.85*eV , 2.92*eV , 2.99*eV , 3.06*eV , 3.14*eV , 
489     3.22*eV , 3.31*eV , 3.4*eV  , 3.49*eV , 3.59*eV , 3.7*eV  , 3.81*eV , 3.94*eV , 4.07*eV , 4.20*eV };
490
491   G4double ABSORPTION_Tyvek[NUMENTRIES_tyvek] =
492     { 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 
493       10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 
494       10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m , 10.0*m };
495
496   G4MaterialPropertiesTable *myMPT4 = new G4MaterialPropertiesTable();
497   myMPT4->AddProperty("ABSLENGTH", ENERGY_tyvek, ABSORPTION_Tyvek, NUMENTRIES_tyvek);
498   Tyvek->SetMaterialPropertiesTable(myMPT4);
499   
500
501   //--------------
502   //--------- Glass
503   //--------------
504
505  G4double RINDEX_glass[NUMENTRIES_general] =
506    { 1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
507      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
508      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
509      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
510      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
511      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
512      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
513      1.600, 1.600, 1.600, 1.600, 1.600, 1.600, 1.600,
514      1.600, 1.600 }; 
515 
516  //JEC: To do adapt to the # of entries  and do not include quantum eff. of a PMTs... as in MEMPHYS case 9/2/07
517//   G4double ABSORPTION_glass[NUMENTRIES] =
518//     { 100.0*cm, 110.0*cm, 120.0*cm, 130.0*cm, 140.0*cm, 150.0*cm, 160.0*cm,
519//       165.0*cm, 170.0*cm, 175.0*cm, 180.0*cm, 185.0*cm, 190.0*cm, 195.0*cm,
520//       200.0*cm, 200.0*cm, 200.0*cm, 200.0*cm, 200.0*cm, 195.0*cm, 190.0*cm,
521//       185.0*cm, 180.0*cm, 175.0*cm, 170.0*cm, 160.0*cm, 150.0*cm, 140.0*cm,
522//       130.0*cm, 120.0*cm, 110.0*cm, 100.0*cm };
523
524  //JEC dummy values to be able to compile !!! 14/2/07
525   G4double ABSORPTION_glass[NUMENTRIES_general] =
526     { 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
527       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
528       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
529       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
530       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 
531       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
532       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
533       150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm, 150.0*cm,
534       150.0*cm, 150.0*cm,150.0*cm, 150.0*cm};
535
536
537 
538   G4MaterialPropertiesTable *myMPT5 = new G4MaterialPropertiesTable();
539   myMPT5->AddProperty("RINDEX", ENERGY_water, RINDEX_glass, NUMENTRIES_general);
540   myMPT5->AddProperty("ABSLENGTH",ENERGY_water, ABSORPTION_glass, NUMENTRIES_general);
541   Glass->SetMaterialPropertiesTable(myMPT5);
542   
543   //   ------------- Surfaces --------------
544
545   //--------------------
546   // Water - Tyvek
547   //--------------------
548   //JEC 9/2/07: From the BackSheet Simulation in MEMPHYS/SK
549   //JEC + SDC: input properties from Auger
550
551   OpWaterTyvekSurface = new G4OpticalSurface("WaterTyvekSurface");
552   OpWaterTyvekSurface->SetType(dielectric_dielectric);
553   OpWaterTyvekSurface->SetModel(unified);
554   OpWaterTyvekSurface->SetFinish(groundbackpainted);
555   OpWaterTyvekSurface->SetSigmaAlpha( 0.17 );
556   
557   //JEC + SDC 9/2/07 : adapted from Auger
558   const G4int NUMENTRIES_water_tyvek = 3;
559   G4double PP[NUMENTRIES_water_tyvek]                    = { 2.08*eV, 3.0*eV, 4.2*eV };
560   G4double RINDEX_tyvek[NUMENTRIES_water_tyvek]          = { 0.0    , 0.0   ,  0.0   }; //JEC ????
561   G4double SPECULARLOBECONSTANT[NUMENTRIES_water_tyvek]  = { 0.2    , 0.2   ,  0.2   };
562   G4double SPECULARSPIKECONSTANT[NUMENTRIES_water_tyvek] = { 0.0    , 0.0   ,  0.0   };
563   G4double BACKSCATTERCONSTANT[NUMENTRIES_water_tyvek]   = { 0.0    , 0.0   ,  0.0   };
564
565   //JEC 9/2/07 from MEMPHYS/SK Blacksheet: for sure should be modified!
566   //JEC + SDC 9/2/07 adapted from Auger
567   G4double REFLECTIVITY_tyvek[NUMENTRIES_tyvek] =
568     { 0.968816 , 0.968427 , 0.967940 , 0.967357 , 0.967065 , 0.966870 , 0.966870 , 0.967162 , 0.967649 , 0.968524 ,
569       0.969497 , 0.970568 , 0.971541 , 0.972319 , 0.973000 , 0.973000 , 0.972319 , 0.970762 , 0.967940 , 0.963562 , 
570       0.957432 , 0.948967 , 0.938167 , 0.924350 , 0.908198 , 0.886208 , 0.861008 , 0.831039 , 0.795719 , 0.754561  };
571
572   
573   G4MaterialPropertiesTable *myST1 = new G4MaterialPropertiesTable();
574   myST1->AddProperty("RINDEX", ENERGY_tyvek, RINDEX_tyvek, NUMENTRIES_tyvek);
575   myST1->AddProperty("SPECULARLOBECONSTANT", PP, SPECULARLOBECONSTANT, NUMENTRIES_water_tyvek);
576   myST1->AddProperty("SPECULARSPIKECONSTANT", PP, SPECULARSPIKECONSTANT, NUMENTRIES_water_tyvek);
577   myST1->AddProperty("BACKSCATTERCONSTANT", PP, BACKSCATTERCONSTANT, NUMENTRIES_water_tyvek);
578   myST1->AddProperty("REFLECTIVITY", ENERGY_tyvek, REFLECTIVITY_tyvek, NUMENTRIES_tyvek);
579   OpWaterTyvekSurface->SetMaterialPropertiesTable(myST1);
580
581
582   //------------------
583   //Tyvek - Glass
584   //------------------
585   //JEC 13/2/07 this is a stopping surface as the photocathode in MEMPHYS
586   //            reflectivity = 0 && efficiency = 100%   => absorption
587   
588   OpTyvekGlassSurface = new G4OpticalSurface("TyvekGlassSurface");
589   OpTyvekGlassSurface->SetType(dielectric_metal); //as for LXe G4 example
590   OpTyvekGlassSurface->SetModel(glisur);          //as for LXe G4 example
591   OpTyvekGlassSurface->SetFinish(polished);
592   const G4int NUM = 2;
593   G4double REFLECTIVITY_tyvekglass[NUM] = { 0.0, 0.0 };
594   G4double EFFICIENCY_tyvekglass[NUM]   = { 1.0, 1.0 };
595
596   G4MaterialPropertiesTable *myST2 = new G4MaterialPropertiesTable();
597   myST2->AddProperty("REFLECTIVITY", PP, REFLECTIVITY_tyvekglass, NUM);
598   myST2->AddProperty("EFFICIENCY", PP, EFFICIENCY_tyvekglass, NUM);
599   OpTyvekGlassSurface->SetMaterialPropertiesTable(myST2);
600
601   //------------------
602   //Water - Air
603   //------------------
604
605   //JEC: 9/2/07 certainly from a G4 novice exercice ==> should be clarified
606   OpWaterAirSurface = new G4OpticalSurface("WaterAirSurface");
607   OpWaterAirSurface->SetType(dielectric_dielectric);
608   OpWaterAirSurface->SetFinish(ground);
609   OpWaterAirSurface->SetModel(unified);
610   
611   const G4int num_WaterAir = 2;
612   G4double Ephoton_WaterAir[num_WaterAir]         = {2.038*eV, 4.144*eV};
613   G4double RefractiveIndex_WaterAir[num_WaterAir] = {1.35, 1.40};
614   G4double SpecularLobe_WaterAir[num_WaterAir]    = {0.3, 0.3};
615   G4double SpecularSpike_WaterAir[num_WaterAir]   = {0.2, 0.2};
616   G4double Backscatter_WaterAir[num_WaterAir]     = {0.2, 0.2};
617   
618   G4MaterialPropertiesTable* myST11 = new G4MaterialPropertiesTable();
619   
620   myST11->AddProperty("RINDEX",                Ephoton_WaterAir, RefractiveIndex_WaterAir, num_WaterAir);
621   myST11->AddProperty("SPECULARLOBECONSTANT",  Ephoton_WaterAir, SpecularLobe_WaterAir,    num_WaterAir);
622   myST11->AddProperty("SPECULARSPIKECONSTANT", Ephoton_WaterAir, SpecularSpike_WaterAir,   num_WaterAir);
623   myST11->AddProperty("BACKSCATTERCONSTANT",   Ephoton_WaterAir, Backscatter_WaterAir,     num_WaterAir);
624   
625   OpWaterAirSurface->SetMaterialPropertiesTable(myST11);
626}//ConstructMaterials
627
628//-----------------------------------------------------------------------------------------------
629
630void ELYSE::DetectorConstruction::SetWaterDimensions(G4ThreeVector dim){
631  water_x = dim[0];
632  water_y = dim[1];
633  water_z = dim[2];
634  updated = true;
635}//SetWaterDimensions
636
637//-----------------------------------------------------------------------------------------------
638void ELYSE::DetectorConstruction::SetTyvekThickness(G4double thick) {
639  tyvek_thickness = thick;
640  updated = true;
641}//SetTyvekThickness
642//-----------------------------------------------------------------------------------------------
643
644void ELYSE::DetectorConstruction::UpdateGeometry() {
645  // clean-up previous geometry
646  G4GeometryManager::GetInstance()->OpenGeometry();
647
648  G4PhysicalVolumeStore::GetInstance()->Clean();
649  G4LogicalVolumeStore::GetInstance()->Clean();
650  G4SolidStore::GetInstance()->Clean();
651  G4LogicalSkinSurface::CleanSurfaceTable();
652  G4LogicalBorderSurface::CleanSurfaceTable();
653
654  //define new one
655  G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
656  G4RunManager::GetRunManager()->GeometryHasBeenModified();
657
658  updated=false;
659}
Note: See TracBrowser for help on using the repository browser.