69 :fWorldChanged(false), fAbsorberMaterial(0), fGapMat(0),fSetUp(
"simpleALICE"),
70 fWorldMaterial(0), fSolidWorld(0), fLogicWorld(0), fPhysicsWorld(0),
71 fSolidRadSlice(0), fLogicRadSlice(0), fPhysicRadSlice(0),
72 fSolidRadiator(0), fLogicRadiator(0), fPhysicsRadiator(0),
73 fRadiatorMat(0), fPipe(false), fPipeField(false),
74 fSolidAbsorber(0), fLogicAbsorber(0), fPhysicsAbsorber(0),
75 fMagField(0), fCalorimeterSD(0), fRegGasDet(0), fRadRegion(0), fMat(0)
87 delete fDetectorMessenger;
97 return ConstructDetectorXTR();
114 if( fSetUp ==
"simpleALICE" )
116 return SimpleSetUpALICE();
118 else if( fSetUp ==
"alice06" )
120 return SetUpALICE06();
122 else if( fSetUp ==
"bari05" )
124 return SetUpBari05();
126 else if( fSetUp ==
"harris73" )
128 return SetUpHarris73();
130 else if( fSetUp ==
"watase86" )
132 return SetUpWatase86();
134 else if( fSetUp ==
"barr90" )
136 return SetUpBarr90();
140 G4cout<<
"Experimental setup is unsupported. Check /XTRdetector/setup "<<
G4endl;
142 return SetUpBarr90();
155 fWorldSizeZ = 400.*
cm;
156 fWorldSizeR = 20.*
cm;
160 fRadThickness = 0.020*
mm;
162 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
166 fAbsorberThickness = 38.3*
mm;
168 fAbsorberRadius = 100.*
mm;
169 fAbsorberZ = 136.*
cm;
173 fGapThick = 10.0*
cm ;
176 fDetThickness = 40.0*
mm ;
177 fDetLength = 200.0*
cm ;
195 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
197 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
198 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
202 radiatorMat->AddMaterial( Mylar, fractionFoil ) ;
203 radiatorMat->AddMaterial( Air, fractionGas ) ;
207 fRadiatorMat = radiatorMat;
217 fGapMat = fAbsorberMaterial;
219 fWorldMaterial =
Air;
221 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
223 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
226 fLogicWorld, 0,
false, 0);
230 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
232 fRadZ = fStartZ + 0.5*fRadThick ;
234 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
235 1.1*fAbsorberRadius, 0.5*fRadThick );
242 "Radiator", fLogicRadiator,
243 fPhysicsWorld,
false, 0 );
247 if( fRadRegion != 0 )
delete fRadRegion;
248 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
253 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm ;
277 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm ;
279 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
283 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*
mm;
285 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
286 fAbsorberRadius, fAbsorberThickness/2.);
288 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
292 "Absorber", fLogicAbsorber,
293 fPhysicsWorld,
false, 0);
295 if( fRegGasDet != 0 )
delete fRegGasDet;
296 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
312 return fPhysicsWorld;
322 fWorldSizeZ = 600.*
cm;
323 fWorldSizeR = 22.*
cm;
331 fRadThickness = 0.020*
mm;
344 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
347 fAbsorberThickness = 37.*
mm;
349 fAbsorberRadius = 100.*
mm;
350 fAbsorberZ = 136.*
cm;
352 fPipeLength = 160.0*
cm;
357 fGapThick = 10.0*
cm ;
360 fDetThickness = 40.0*
mm ;
361 fDetLength = 200.0*
cm ;
381 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
383 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
384 G4double fractionGas = 1.0 - fractionFoil;
393 fRadiatorMat = radiatorMat;
418 fGapMat = fAbsorberMaterial;
420 fWorldMaterial =
Air;
423 fSolidWorld =
new G4Box(
"World", fWorldSizeR, fWorldSizeR, fWorldSizeZ/2.);
425 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
428 fLogicWorld, 0,
false, 0);
432 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
434 fRadZ = fStartZ + 0.5*fRadThick;
440 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
441 1.1*fAbsorberRadius, 0.5*fRadThick );
448 "Radiator", fLogicRadiator,
449 fPhysicsWorld,
false, 0 );
453 if( fRadRegion != 0 )
delete fRadRegion;
454 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
459 G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
460 G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
482 G4cout<<
"fElectrodeThick = "<<fElectrodeThick/
mm<<
" mm"<<G4endl<<
G4endl;
493 G4double zPipe = zElectrode2 + fElectrodeThick/2. +
494 pipeDist/2. + fPipeLength/2.;
499 G4Box* solidPipe =
new G4Box(
"Pipe",fAbsorberRadius*0.5,
519 if( fMagField )
delete fMagField;
522 0., fieldStrength*std::cos(alphaB)));
536 G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2. - 0.001*
mm;
537 G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2. + 0.001*
mm;
567 G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*
mm;
571 zMylar += ( fPipeLength + pipeDist );
584 fAbsorberZ = zMylar + fMylarThick + fAbsorberThickness/2.;
587 fSolidAbsorber =
new G4Box(
"Absorber",
592 fAbsorberThickness/2.);
594 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
599 "Absorber", fLogicAbsorber,
600 fPhysicsWorld,
false, 0);
602 if( fRegGasDet != 0 )
delete fRegGasDet;
603 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
619 return fPhysicsWorld;
630 fWorldSizeZ = 600.*
cm;
631 fWorldSizeR = 22.*
cm;
648 fRadThickness = 0.0055*
mm;
652 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
655 fAbsorberThickness = 0.4*
mm;
657 fAbsorberRadius = 100.*
mm;
658 fAbsorberZ = 136.*
cm;
660 fPipeLength = 50.0*
cm;
665 fGapThick = 10.0*
cm ;
668 fDetThickness = 40.0*
mm ;
669 fDetLength = 200.0*
cm ;
689 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
691 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
692 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
696 radiatorMat->AddMaterial( CH2, fractionFoil ) ;
697 radiatorMat->AddMaterial( Air, fractionGas ) ;
701 fRadiatorMat = radiatorMat;
712 foilGasRatio = 0.99999;
713 foilDensity = 1.2928*
mg/
cm3;
714 gasDensity = 0.178*
mg/
cm3;
715 totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio);
717 fractionFoil = foilDensity*foilGasRatio/totDensity;
718 fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
720 fPipeMat =
new G4Material(
"pipeMat" , totDensity, 2);
721 fPipeMat->AddMaterial( Air, fractionFoil );
722 fPipeMat->AddMaterial( He, fractionGas );
726 fGapMat = fAbsorberMaterial;
728 fWorldMaterial =
Air;
731 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
733 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
736 fLogicWorld, 0,
false, 0);
740 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
742 fRadZ = fStartZ + 0.5*fRadThick ;
747 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
748 1.1*fAbsorberRadius, 0.5*fRadThick );
755 "Radiator", fLogicRadiator,
756 fPhysicsWorld,
false, 0 );
760 if( fRadRegion != 0 )
delete fRadRegion;
761 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
774 G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
775 G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
790 G4cout<<
"fElectrodeThick = "<<fElectrodeThick/
mm<<
" mm"<<G4endl<<
G4endl;
801 G4double zPipe = zElectrode2 + fElectrodeThick/2. + fPipeLength/2. + pipeDist/2.;
806 if ( std::fabs(pipe) > 1.
e-15 )
838 G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2 - 0.01*
mm;
839 G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2 + 0.01*
mm;
849 if ( std::fabs(pipe) > 1.
e-15 )
870 G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*
mm;
872 if ( std::fabs(pipe) > 1.
e-15 ) zMylar += ( fPipeLength + pipeDist );
885 fAbsorberZ = zMylar + fMylarThick/2. + fAbsorberThickness/2.;
888 fSolidAbsorber =
new G4Box(
"Absorber",
891 fAbsorberThickness/2.);
893 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
897 "Absorber", fLogicAbsorber,
898 fPhysicsWorld,
false, 0);
900 if( fRegGasDet != 0 )
delete fRegGasDet;
901 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
917 return fPhysicsWorld;
926 fWorldSizeZ = 400.*
cm;
927 fWorldSizeR = 20.*
cm;
931 fRadThickness = 0.0127*
mm;
933 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
937 fAbsorberThickness = 15.0*
mm;
939 fAbsorberRadius = 100.*
mm;
940 fAbsorberZ = 136.*
cm;
944 fGapThick = 10.0*
cm ;
947 fDetThickness = 40.0*
mm ;
948 fDetLength = 200.0*
cm ;
967 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
969 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
970 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
974 radiatorMat->AddMaterial( Mylar, fractionFoil ) ;
975 radiatorMat->AddMaterial( Air, fractionGas ) ;
979 fRadiatorMat = radiatorMat;
989 fGapMat = fAbsorberMaterial;
991 fWorldMaterial =
Air;
993 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
995 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
998 fLogicWorld, 0,
false, 0);
1002 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
1004 fRadZ = fStartZ + 0.5*fRadThick ;
1006 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
1007 1.1*fAbsorberRadius, 0.5*fRadThick );
1014 "Radiator", fLogicRadiator,
1015 fPhysicsWorld,
false, 0 );
1019 if( fRadRegion != 0 )
delete fRadRegion;
1020 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
1025 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm ;
1049 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm ;
1051 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1055 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*
mm;
1057 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1058 fAbsorberRadius, fAbsorberThickness/2.);
1060 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1064 "Absorber", fLogicAbsorber,
1065 fPhysicsWorld,
false, 0);
1067 if( fRegGasDet != 0 )
delete fRegGasDet;
1068 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1084 return fPhysicsWorld;
1093 fWorldSizeZ = 400.*
cm;
1094 fWorldSizeR = 20.*
cm;
1098 fRadThickness = 0.04*
mm;
1100 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
1104 fAbsorberThickness = 30.0*
mm;
1106 fAbsorberRadius = 100.*
mm;
1107 fAbsorberZ = 136.*
cm;
1111 fGapThick = 10.0*
cm ;
1114 fDetThickness = 30.0*
mm ;
1115 fDetLength = 200.0*
cm ;
1120 fStartZ = 100.0*
mm ;
1136 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
1138 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
1139 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
1143 radiatorMat->AddMaterial( Li, fractionFoil ) ;
1144 radiatorMat->AddMaterial( He, fractionGas ) ;
1148 fRadiatorMat = radiatorMat;
1152 fWindowMat = Mylar ;
1153 fElectrodeMat =
Al ;
1158 fGapMat = fAbsorberMaterial;
1160 fWorldMaterial = He;
1162 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
1164 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
1167 fLogicWorld, 0,
false, 0);
1171 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
1173 fRadZ = fStartZ + 0.5*fRadThick ;
1175 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
1176 1.1*fAbsorberRadius, 0.5*fRadThick );
1183 "Radiator", fLogicRadiator,
1184 fPhysicsWorld,
false, 0 );
1188 if( fRadRegion != 0 )
delete fRadRegion;
1189 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
1194 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm ;
1218 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm ;
1220 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1224 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*
mm;
1226 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1227 fAbsorberRadius, fAbsorberThickness/2.);
1229 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1233 "Absorber", fLogicAbsorber,
1234 fPhysicsWorld,
false, 0);
1236 if( fRegGasDet != 0 )
delete fRegGasDet;
1237 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1253 return fPhysicsWorld;
1262 fWorldSizeZ = 400.*
cm;
1263 fWorldSizeR = 20.*
cm;
1267 fRadThickness = 0.019*
mm;
1269 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
1273 fAbsorberThickness = 50.0*
mm;
1275 fAbsorberRadius = 100.*
mm;
1276 fAbsorberZ = 136.*
cm;
1280 fGapThick = 10.0*
cm ;
1283 fDetThickness = 50.0*
mm ;
1284 fDetLength = 200.0*
cm ;
1289 fStartZ = 100.0*
mm ;
1305 G4double totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio) ;
1307 G4double fractionFoil = foilDensity*foilGasRatio/totDensity ;
1308 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity ;
1312 radiatorMat->AddMaterial( CH2, fractionFoil ) ;
1313 radiatorMat->AddMaterial( CO2, fractionGas ) ;
1317 fRadiatorMat = radiatorMat;
1321 fWindowMat = Mylar ;
1322 fElectrodeMat =
Al ;
1324 fAbsorberMaterial = fMat->
GetMaterial(
"Xe55He15CH4");
1327 fGapMat = fAbsorberMaterial;
1329 fWorldMaterial =
Air;
1331 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
1333 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
1336 fLogicWorld, 0,
false, 0);
1340 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
1342 fRadZ = fStartZ + 0.5*fRadThick ;
1344 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
1345 1.1*fAbsorberRadius, 0.5*fRadThick );
1352 "Radiator", fLogicRadiator,
1353 fPhysicsWorld,
false, 0 );
1357 if( fRadRegion != 0 )
delete fRadRegion;
1358 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
1363 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm ;
1387 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm ;
1389 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1393 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. + fAbsorberThickness/2. + 0.01*
mm;
1395 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1396 fAbsorberRadius, fAbsorberThickness/2.);
1398 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1402 "Absorber", fLogicAbsorber,
1403 fPhysicsWorld,
false, 0);
1405 if( fRegGasDet != 0 )
delete fRegGasDet;
1406 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1422 return fPhysicsWorld;
1429 void Em10DetectorConstruction::TestOld()
1571 G4cout <<
"\n The WORLD is made of "
1572 << fWorldSizeZ/
mm <<
"mm of " << fWorldMaterial->
GetName() ;
1573 G4cout <<
", the transverse size (R) of the world is " << fWorldSizeR/
mm <<
" mm. " <<
G4endl;
1574 G4cout <<
" The ABSORBER is made of "
1575 << fAbsorberThickness/
mm <<
"mm of " << fAbsorberMaterial->
GetName() ;
1576 G4cout <<
", the transverse size (R) is " << fAbsorberRadius/
mm <<
" mm. " <<
G4endl;
1577 G4cout <<
" Z position of the (middle of the) absorber " << fAbsorberZ/
mm <<
" mm." <<
G4endl;
1603 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1605 pttoMaterial = (*theMaterialTable)[J];
1607 if(pttoMaterial->
GetName() == materialChoice)
1609 fAbsorberMaterial = pttoMaterial;
1628 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1630 pttoMaterial = (*theMaterialTable)[J];
1632 if(pttoMaterial->
GetName() == materialChoice)
1634 fRadiatorMat = pttoMaterial;
1653 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1655 pttoMaterial = (*theMaterialTable)[J];
1657 if(pttoMaterial->
GetName() == materialChoice)
1659 fWorldMaterial = pttoMaterial;
1673 fAbsorberThickness = val;
1684 fRadThickness = val;
1706 fAbsorberRadius = val;