source: trunk/source/geometry/magneticfield/test/field03/src/F03DetectorConstruction.cc @ 1300

Last change on this file since 1300 was 1199, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 22.0 KB
Line 
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// $Id: F03DetectorConstruction.cc,v 1.2 2006/06/29 18:30:01 gunter Exp $
28// GEANT4 tag $Name: HEAD $
29//
30//
31
32#include "F03DetectorConstruction.hh"
33#include "F03DetectorMessenger.hh"
34
35#include "F03CalorimeterSD.hh"
36#include "F03ElectroMagneticField.hh"
37
38#include "G4VClusterModel.hh"
39#include "G4PAIclusterModel.hh"
40
41#include "G4Material.hh"
42#include "G4Tubs.hh"
43#include "G4LogicalVolume.hh"
44#include "G4PVPlacement.hh"
45#include "G4UniformMagField.hh"
46#include "G4FieldManager.hh"
47#include "G4TransportationManager.hh"
48#include "G4SDManager.hh"
49#include "G4RunManager.hh"
50
51#include "G4ios.hh"
52
53/////////////////////////////////////////////////////////////////////////////
54//
55//
56
57F03DetectorConstruction::F03DetectorConstruction()
58:solidWorld(NULL),logicWorld(NULL),physiWorld(NULL),
59 solidAbsorber(NULL),logicAbsorber(NULL),physiAbsorber(NULL),
60 AbsorberMaterial(NULL),WorldMaterial(NULL),fRadiatorMat(NULL),
61 magField(NULL),calorimeterSD(NULL),worldchanged(false),fEmField(NULL)
62{
63  // default parameter values of the calorimeter
64
65  G4double inch = 2.54*cm ;
66  G4double  mil = inch/1000.0 ;
67
68  WorldSizeZ = 44000.*mm;
69  WorldSizeR = 22000.*mm;
70
71  AbsorberThickness = 1.0*mm;
72
73  AbsorberRadius   = 20000.*mm;
74
75  zAbsorber = 21990.0*mm ;
76
77  fWindowThick = 51.0*micrometer ;
78  fElectrodeThick = 10.0*micrometer ;
79  fGapThick = 1.0*mm ;
80
81  fRadThickness = 100*mm ;   // 0.5*mil ;   
82  fGasGap       = 100*mm  ;    // 30*mil ;   
83  fFoilNumber   = 1 ;
84
85  fDetThickness = 40.0*mm ;
86  fDetLength    = 200.0*cm  ;
87  fDetGap       = 1.0*mm ;
88
89  fStartR       = 40*cm  ;
90  fStartZ       = 10.0*mm  ;
91
92  fModuleNumber = 1      ; 
93
94  // create commands for interactive definition of the calorimeter 
95
96  detectorMessenger = new F03DetectorMessenger(this);
97 
98  fEmField = new F03ElectroMagneticField() ;
99}
100
101//////////////////////////////////////////////////////////////////////////
102//
103//
104
105F03DetectorConstruction::~F03DetectorConstruction()
106{ 
107  delete detectorMessenger;
108  if (fEmField) delete fEmField ;
109}
110
111//////////////////////////////////////////////////////////////////////////
112//
113//
114
115G4VPhysicalVolume* F03DetectorConstruction::Construct()
116{
117  DefineMaterials();
118  return ConstructCalorimeter();
119}
120
121//////////////////////////////////////////////////////////////////////////////
122//
123//
124
125void F03DetectorConstruction::DefineMaterials()
126{ 
127 //This function illustrates the possible ways to define materials
128 
129G4String name, symbol ;             //a=mass of a mole;
130G4double a, z, density ;            //z=mean number of protons; 
131G4int iz, n, nel ;                       //iz=number of protons  in an isotope;
132                                   // n=number of nucleons in an isotope;
133
134G4int ncomponents, natoms;
135G4double abundance, fractionmass;
136G4double temperature, pressure;
137
138//
139// define Elements
140//
141
142  a = 1.01*g/mole;
143  G4Element* elH  = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
144
145  a = 6.01*g/mole;
146  G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
147
148  a = 14.01*g/mole;
149  G4Element* elN  = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
150
151  a = 16.00*g/mole;
152  G4Element* elO  = new G4Element(name="Oxygen"  ,symbol="O" , z= 8., a);
153
154  a = 39.948*g/mole;
155  G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
156
157  a = 131.29*g/mole;
158  G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
159 
160  a = 19.00*g/mole;
161  G4Element* elF  = new G4Element(name="Fluorine", symbol="F", z=9., a);
162
163
164//
165// define simple materials
166//
167
168     /* ******************************************************************
169
170density = 1.848*g/cm3;
171a = 9.01*g/mole;
172G4Material* Be = new G4Material(name="Beryllium", z=4., a, density);
173
174
175density = 1.390*g/cm3;
176a = 39.95*g/mole;
177G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
178
179density = 7.870*g/cm3;
180a = 55.85*g/mole;
181G4Material* Fe = new G4Material(name="Iron"   , z=26., a, density);
182
183density = 8.960*g/cm3;
184a = 63.55*g/mole;
185G4Material* Cu = new G4Material(name="Copper"   , z=29., a, density);
186
187density = 19.32*g/cm3;
188a =196.97*g/mole;
189G4Material* Au = new G4Material(name="Gold"   , z=79., a, density);
190
191density = 11.35*g/cm3;
192a = 207.19*g/mole;
193G4Material* Pb = new G4Material(name="Lead"     , z=82., a, density);
194
195//
196// define a material from elements.   case 1: chemical molecule
197//
198
199density = 1.000*g/cm3;
200G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
201H2O->AddElement(elH, natoms=2);
202H2O->AddElement(elO, natoms=1);
203
204  // Kapton (polyimide) ??? since = Mylar C5H4O2
205
206  density = 1.39*g/cm3;
207  G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
208  Kapton->AddElement(elO,2);
209  Kapton->AddElement(elC,5);
210  Kapton->AddElement(elH,4);
211
212  // Silicon as detector material
213
214  density = 2.330*g/cm3;
215  a = 28.09*g/mole;
216  G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
217
218  // Carbon dioxide
219
220  density = 1.977*mg/cm3;
221  G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
222                                       kStateGas,273.15*kelvin,1.*atmosphere);
223  CO2->AddElement(elC,1);
224  CO2->AddElement(elO,2);
225
226
227  // TRT_CH2
228     
229  density = 0.935*g/cm3;
230  G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
231  TRT_CH2->AddElement(elC,1);
232  TRT_CH2->AddElement(elH,2);
233
234  // Radiator
235
236  density = 0.059*g/cm3;
237  G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
238  Radiator->AddElement(elC,1);
239  Radiator->AddElement(elH,2);
240
241  // Carbon Fiber
242
243  density = 0.145*g/cm3;
244  G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
245  CarbonFiber->AddElement(elC,1);
246
247  density = 1.290*mg/cm3;  // old air from elements
248  G4Material* air = new G4Material(name="air"  , density, ncomponents=2);
249  Air->AddElement(elN, fractionmass=0.7);
250  Air->AddElement(elO, fractionmass=0.3);
251
252
253  density = 1.25053*mg/cm3 ;       // STP
254  a = 14.01*g/mole ;       // get atomic weight !!!
255  //  a = 28.016*g/mole;
256  G4Material* N2  = new G4Material(name="Nitrogen", z= 7.,a,density) ;
257
258  density = 1.25053*mg/cm3 ;       // STP
259  G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
260  anotherN2->AddElement(elN, 1);
261  anotherN2->AddElement(elN, 1);
262
263************************ */
264
265  // Al for electrodes
266
267  density = 2.700*g/cm3;
268  a = 26.98*g/mole;
269  G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
270
271  // Mylar
272
273  density = 1.39*g/cm3;
274  G4Material* Mylar = new G4Material(name="Mylar", density, nel=3);
275  Mylar->AddElement(elO,2);
276  Mylar->AddElement(elC,5);
277  Mylar->AddElement(elH,4);
278
279  // Polypropelene
280
281  G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
282  CH2->AddElement(elH,2);
283  CH2->AddElement(elC,1);
284
285
286
287  // Krypton as detector gas, STP
288
289  density = 3.700*mg/cm3 ;
290  a = 83.80*g/mole ;
291  G4Material* Kr  = new G4Material(name="Kr",z=36., a, density );
292
293  // Metane, STP
294
295  //  density = 0.7174*mg/cm3 ;
296  //  G4Material* metane = new G4Material(name="CH4",density,nel=2) ;
297  //  metane->AddElement(elC,1) ;
298  //  metane->AddElement(elH,4) ;
299
300
301  // Dry air (average composition)
302
303  density = 1.7836*mg/cm3 ;       // STP
304  G4Material* Argon = new G4Material(name="Argon"  , density, ncomponents=1);
305  Argon->AddElement(elAr, 1);
306
307  density = 1.25053*mg/cm3 ;       // STP
308  G4Material* Nitrogen = new G4Material(name="N2"  , density, ncomponents=1);
309  Nitrogen->AddElement(elN, 2);
310
311  density = 1.4289*mg/cm3 ;       // STP
312  G4Material* Oxygen = new G4Material(name="O2"  , density, ncomponents=1);
313  Oxygen->AddElement(elO, 2);
314
315
316  density  = 1.2928*mg/cm3 ;       // STP
317  density *= 1.0e-8 ;       // pumped vacuum
318  G4Material* Air = new G4Material(name="Air"  , density, ncomponents=3);
319  Air->AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
320  Air->AddMaterial( Oxygen,   fractionmass = 0.2315 ) ;
321  Air->AddMaterial( Argon,    fractionmass = 0.0128 ) ;
322
323  // 93% Ar + 7% CH4, STP
324
325  //  density = 1.709*mg/cm3 ;     
326  //  G4Material* Ar7CH4 = new G4Material(name="Ar7CH4"  , density,
327  //                                                           ncomponents=2);
328  //  Ar7CH4->AddMaterial( Argon,    fractionmass = 0.971 ) ;
329  //  Ar7CH4->AddMaterial( metane,   fractionmass = 0.029 ) ;
330
331  // 93% Kr + 7% CH4, STP
332
333  //  density = 3.491*mg/cm3 ;     
334  //  G4Material* Kr7CH4 = new G4Material(name="Kr7CH4"  , density,
335  //                                                   ncomponents=2);
336  //  Kr7CH4->AddMaterial( Kr,       fractionmass = 0.986 ) ;
337  //  Kr7CH4->AddMaterial( metane,   fractionmass = 0.014 ) ;
338
339  /* **************
340
341  G4double TRT_Xe_density = 5.485*mg/cm3;
342  G4Material* TRT_Xe = new G4Material(name="TRT_Xe", TRT_Xe_density, nel=1,
343                                      kStateGas,293.15*kelvin,1.*atmosphere);
344  TRT_Xe->AddElement(elXe,1);
345
346  G4double TRT_CO2_density = 1.842*mg/cm3;
347  G4Material* TRT_CO2 = new G4Material(name="TRT_CO2", TRT_CO2_density, nel=2,
348                                       kStateGas,293.15*kelvin,1.*atmosphere);
349  TRT_CO2->AddElement(elC,1);
350  TRT_CO2->AddElement(elO,2);
351
352  G4double TRT_CF4_density = 3.9*mg/cm3;
353  G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2,
354                                       kStateGas,293.15*kelvin,1.*atmosphere);
355  TRT_CF4->AddElement(elC,1);
356  TRT_CF4->AddElement(elF,4);
357
358  // ATLAS TRT straw tube gas mixture (20 C, 1 atm)
359
360  G4double XeCO2CF4_density = 4.76*mg/cm3;
361  G4Material* XeCO2CF4 = new G4Material(name="XeCO2CF4", XeCO2CF4_density,
362                                        ncomponents=3,
363                                        kStateGas,293.15*kelvin,1.*atmosphere);
364  XeCO2CF4->AddMaterial(TRT_Xe,0.807);
365  XeCO2CF4->AddMaterial(TRT_CO2,0.039);
366  XeCO2CF4->AddMaterial(TRT_CF4,0.154);
367
368  *********** */
369
370  // Xenon as detector gas, STP
371
372  density = 5.858*mg/cm3 ;
373  a = 131.29*g/mole ;
374  G4Material* Xe  = new G4Material(name="Xenon",z=54., a, density );
375
376  // Carbon dioxide, STP
377
378  density = 1.977*mg/cm3;
379  G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
380  CarbonDioxide->AddElement(elC,1);
381  CarbonDioxide->AddElement(elO,2);
382
383  // 80% Ar + 20% CO2, STP
384
385//  density = 1.8223*mg/cm3 ;     
386//  G4Material* Ar_80CO2_20 = new G4Material(name="ArCO2"  , density,
387//                                    ncomponents=2);
388//  Ar_80CO2_20->AddMaterial( Argon,           fractionmass = 0.783 ) ;
389//  Ar_80CO2_20->AddMaterial( CarbonDioxide,   fractionmass = 0.217 ) ;
390
391  // 80% Xe + 20% CO2, STP
392
393  density = 5.0818*mg/cm3 ;     
394  G4Material* Xe20CO2 = new G4Material(name="Xe20CO2"  , density, ncomponents=2);
395  Xe20CO2->AddMaterial( Xe,              fractionmass = 0.922 ) ;
396  Xe20CO2->AddMaterial( CarbonDioxide,   fractionmass = 0.078 ) ;
397
398  // 80% Kr + 20% CO2, STP
399
400  density = 3.601*mg/cm3 ;     
401  G4Material* Kr20CO2 = new G4Material(name="Kr20CO2"  , density, 
402                                                             ncomponents=2);
403  Kr20CO2->AddMaterial( Kr,              fractionmass = 0.89 ) ;
404  Kr20CO2->AddMaterial( CarbonDioxide,   fractionmass = 0.11 ) ;
405
406
407  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
408
409  //default materials of the calorimeter and TR radiator
410
411  fRadiatorMat =  Air ; // CH2 ;   // Mylar ;
412 
413  fWindowMat = Mylar ;
414  fElectrodeMat = Al ;
415
416  AbsorberMaterial = Air ; //  Kr20CO2 ;   // XeCO2CF4  ;
417  fGapMat          = Air ; //  Kr20CO2 ;
418
419  WorldMaterial    = Air ;
420}
421
422/////////////////////////////////////////////////////////////////////////
423//
424//
425 
426G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
427{
428  G4int i, j ; 
429  G4double zModule, zRadiator, rModule, rRadiator ; 
430
431  // complete the Calor parameters definition and Print
432
433  ComputeCalorParameters();
434  PrintCalorParameters();
435     
436  // World
437 
438  if(solidWorld) delete solidWorld ;
439  if(logicWorld) delete logicWorld ;
440  if(physiWorld) delete physiWorld ;
441
442  solidWorld = new G4Tubs("World",                              //its name
443                   0.,WorldSizeR,WorldSizeZ/2.,0.,twopi)       ;//its size
444                         
445  logicWorld = new G4LogicalVolume(solidWorld,          //its solid
446                                   WorldMaterial,       //its material
447                                   "World");            //its name
448                                   
449  physiWorld = new G4PVPlacement(0,                     //no rotation
450                                 G4ThreeVector(),       //at (0,0,0)
451                                 "World",               //its name
452                                 logicWorld,            //its logical volume
453                                 NULL,                  //its mother  volume
454                                 false,                 //no boolean operation
455                                 0);                    //copy number
456
457  // TR radiator envelope
458
459  //  /* *******************************************************
460
461  G4double radThick = fFoilNumber*(fRadThickness + fGasGap) + fDetGap   ;
462
463  G4double zRad = zAbsorber - 20*cm - 0.5*radThick ;
464  G4cout<<"zRad = "<<zRad/mm<<" mm"<<G4endl ;
465
466  radThick *= 1.02 ;
467  G4cout<<"radThick = "<<radThick/mm<<" mm"<<G4endl ;
468  G4cout<<"fFoilNumber = "<<fFoilNumber<<G4endl ;
469  G4cout<<"fRadiatorMat = "<<fRadiatorMat->GetName()<<G4endl ;
470  G4cout<<"WorldMaterial = "<<WorldMaterial->GetName()<<G4endl ;
471 
472  if(solidRadiator) delete solidRadiator;
473  if(logicRadiator) delete logicRadiator;
474  if(physiRadiator) delete physiRadiator;
475
476  solidRadiator = new G4Tubs("Radiator",0.0, 
477                                              1.01*AbsorberRadius, 
478                                              0.5*radThick,0.0,twopi             ) ; 
479                         
480  logicRadiator = new G4LogicalVolume(solidRadiator,   
481                                                       WorldMaterial,     
482                                                       "Radiator");     
483
484  // Set local field manager and local field in radiator and its daughters:
485
486  G4bool allLocal = true ;
487       
488  logicRadiator->SetFieldManager( fEmField->GetLocalFieldManager(), 
489                                  allLocal ) ;
490
491       
492  physiRadiator = new G4PVPlacement(0,
493                                     G4ThreeVector(0,0,zRad),           
494                                     "Radiator", logicRadiator,         
495                                     physiWorld, false, 0       );     
496
497  if(fSolidRadSlice) delete fSolidRadSlice;
498  if(fLogicRadSlice) delete fLogicRadSlice; 
499  if(fPhysicRadSlice) delete fPhysicRadSlice; 
500
501  fSolidRadSlice = new G4Tubs("RadSlice",0.0,
502                                AbsorberRadius,0.5*fRadThickness,0.0,twopi ) ;
503
504  fLogicRadSlice = new G4LogicalVolume(fSolidRadSlice,fRadiatorMat,
505                                          "RadSlice",0,0,0);
506
507  zModule = zRad + 0.5*radThick/1.02 ;   //  ??? + fRadThickness ;
508  G4cout<<"zModule = "<<zModule/mm<<" mm"<<G4endl ;
509
510    for(j=0;j<fFoilNumber;j++)
511    { 
512
513      zRadiator = zModule - j*(fRadThickness + fGasGap) ;
514      G4cout<<zRadiator/mm<<" mm"<<"\t" ;
515      //   G4cout<<"j = "<<j<<"\t" ;         
516     
517      fPhysicRadSlice = new G4PVPlacement(0,G4ThreeVector(0.,0.,zRadiator-zRad),
518                                         "RadSlice",fLogicRadSlice,
519                                          physiRadiator,false,j);
520     }                                 
521  G4cout<<G4endl ;
522                     
523  //  ************************************************* */
524       
525  // Absorber
526
527  if (AbsorberThickness > 0.) 
528  { 
529      if(solidAbsorber) delete solidAbsorber ;
530      if(logicAbsorber) delete logicAbsorber ;
531      if(physiAbsorber) delete physiAbsorber ;
532
533      solidAbsorber = new G4Tubs("Absorber", 1.0*mm, 
534                                  AbsorberRadius,
535                                  AbsorberThickness/2., 
536                                  0.0,twopi); 
537                         
538      logicAbsorber = new G4LogicalVolume(solidAbsorber,   
539                                          AbsorberMaterial, 
540                                          "Absorber");     
541                                         
542      physiAbsorber = new G4PVPlacement(0,                 
543                          G4ThreeVector(0.,0.,zAbsorber),       
544                                        "Absorber",       
545                                        logicAbsorber,     
546                                        physiWorld,       
547                                        false,             
548                                        0);               
549                                       
550  }
551                                 
552  // Sensitive Detectors: Absorber
553 
554  G4SDManager* SDman = G4SDManager::GetSDMpointer();
555
556  if(!calorimeterSD)
557  {
558    calorimeterSD = new F03CalorimeterSD("CalorSD",this);
559    SDman->AddNewDetector( calorimeterSD );
560  }
561  if (logicAbsorber)  logicAbsorber->SetSensitiveDetector(calorimeterSD);
562
563  return physiWorld;
564}
565
566////////////////////////////////////////////////////////////////////////////
567//
568//
569
570void F03DetectorConstruction::PrintCalorParameters()
571{
572  G4cout << "\n The  WORLD   is made of " 
573       << WorldSizeZ/mm << "mm of " << WorldMaterial->GetName() ;
574  G4cout << ", the transverse size (R) of the world is " << WorldSizeR/mm << " mm. " << G4endl;
575  G4cout << " The ABSORBER is made of " 
576       << AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName() ;
577  G4cout << ", the transverse size (R) is " << AbsorberRadius/mm << " mm. " << G4endl;
578  G4cout << " Z position of the (middle of the) absorber " << zAbsorber/mm << "  mm." << G4endl;
579  G4cout << G4endl;
580}
581
582///////////////////////////////////////////////////////////////////////////
583//
584//
585
586void F03DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
587{
588  // get the pointer to the material table
589  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
590
591  // search the material by its name   
592  G4Material* pttoMaterial;
593  for (G4int J=0 ; J<theMaterialTable->length() ; J++)
594   { pttoMaterial = (*theMaterialTable)(J);     
595     if(pttoMaterial->GetName() == materialChoice)
596        {AbsorberMaterial = pttoMaterial;
597         logicAbsorber->SetMaterial(pttoMaterial); 
598        // PrintCalorParameters();
599        }             
600   }
601}
602
603////////////////////////////////////////////////////////////////////////////
604//
605//
606
607void F03DetectorConstruction::SetWorldMaterial(G4String materialChoice)
608{
609  // get the pointer to the material table
610  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
611
612  // search the material by its name   
613  G4Material* pttoMaterial;
614  for (G4int J=0 ; J<theMaterialTable->length() ; J++)
615   { pttoMaterial = (*theMaterialTable)(J);     
616     if(pttoMaterial->GetName() == materialChoice)
617        {WorldMaterial = pttoMaterial;
618         logicWorld->SetMaterial(pttoMaterial); 
619       //  PrintCalorParameters();
620        }             
621   }
622}
623
624///////////////////////////////////////////////////////////////////////////
625//
626//
627
628void F03DetectorConstruction::SetAbsorberThickness(G4double val)
629{
630  // change Absorber thickness and recompute the calorimeter parameters
631  AbsorberThickness = val;
632  ComputeCalorParameters();
633} 
634
635/////////////////////////////////////////////////////////////////////////////
636//
637//
638
639void F03DetectorConstruction::SetAbsorberRadius(G4double val)
640{
641  // change the transverse size and recompute the calorimeter parameters
642  AbsorberRadius = val;
643  ComputeCalorParameters();
644} 
645
646////////////////////////////////////////////////////////////////////////////
647//
648//
649
650void F03DetectorConstruction::SetWorldSizeZ(G4double val)
651{
652  worldchanged=true;
653  WorldSizeZ = val;
654  ComputeCalorParameters();
655} 
656
657///////////////////////////////////////////////////////////////////////////
658//
659//
660
661void F03DetectorConstruction::SetWorldSizeR(G4double val)
662{
663  worldchanged=true;
664  WorldSizeR = val;
665  ComputeCalorParameters();
666} 
667
668//////////////////////////////////////////////////////////////////////////////
669//
670//
671
672void F03DetectorConstruction::SetAbsorberZpos(G4double val)
673{
674  zAbsorber  = val;
675  ComputeCalorParameters();
676} 
677
678//////////////////////////////////////////////////////////////////////////////
679//
680//
681
682void F03DetectorConstruction::SetMagField(G4double fieldValue)
683{
684  //apply a global uniform magnetic field along X axis
685
686  /* *********************************************************
687
688  G4FieldManager* fieldMgr
689   = G4TransportationManager::GetTransportationManager()->GetFieldManager();
690   
691  if(magField) delete magField;         //delete the existing magn field
692 
693  if(fieldValue!=0.)                    // create a new one if non nul
694  {
695    magField = new G4UniformMagField(G4ThreeVector(fieldValue,0.,0.));       
696    fieldMgr->SetDetectorField(magField);
697    fieldMgr->CreateChordFinder(magField);
698  }
699  else
700  {
701    magField = NULL;
702    fieldMgr->SetDetectorField(magField);
703  }
704
705  *************************************************************** */
706
707}
708
709///////////////////////////////////////////////////////////////////////////////
710//
711//
712 
713void F03DetectorConstruction::UpdateGeometry()
714{
715  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
716}
717
718//
719//
720////////////////////////////////////////////////////////////////////////////
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
Note: See TracBrowser for help on using the repository browser.