68 fWorldChanged(false), fAbsorberMaterial(0), fGapMat(0), fSetUp(
"simpleALICE"),
69 fWorldMaterial(0), fSolidWorld(0), fLogicWorld(0), fPhysicsWorld(0),
71 fSolidRadiator(0), fLogicRadiator(0), fPhysicsRadiator(0),
72 fRadiatorMat(0), fPipe(false), fPipeField(false),
73 fSolidAbsorber(0), fLogicAbsorber(0), fPhysicsAbsorber(0),
74 fMagField(0), fCalorimeterSD(0), fRegGasDet(0),
75 fRadRegion(0), fMat(0)
85 delete fDetectorMessenger;
93 return ConstructDetectorXTR();
107 if( fSetUp ==
"simpleALICE" )
109 return SimpleSetUpALICE();
111 else if( fSetUp ==
"alice06" )
113 return SetUpALICE06();
115 else if( fSetUp ==
"bari05" )
117 return SetUpBari05();
119 else if( fSetUp ==
"harris73" )
121 return SetUpHarris73();
123 else if( fSetUp ==
"watase86" )
125 return SetUpWatase86();
127 else if( fSetUp ==
"barr90" )
129 return SetUpBarr90();
134 "Experimental setup is unsupported. Check /XTRdetector/setup " <<
G4endl;
136 return SetUpBarr90();
149 fWorldSizeZ = 400.*
cm;
150 fWorldSizeR = 20.*
cm;
154 fRadThickness = 0.020*
mm;
156 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
160 fAbsorberThickness = 38.3*
mm;
162 fAbsorberRadius = 100.*
mm;
163 fAbsorberZ = 136.*
cm;
169 fDetThickness = 40.0*
mm;
170 fDetLength = 200.0*
cm;
188 G4double totDensity = foilDensity*foilGasRatio +
189 gasDensity*(1.0-foilGasRatio);
191 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
192 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
196 radiatorMat->AddMaterial( Mylar, fractionFoil );
197 radiatorMat->AddMaterial( Air, fractionGas );
201 fRadiatorMat = radiatorMat;
210 fGapMat = fAbsorberMaterial;
212 fWorldMaterial =
Air;
214 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
216 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
219 fLogicWorld, 0,
false, 0);
223 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
225 fRadZ = fStartZ + 0.5*fRadThick;
227 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
228 1.1*fAbsorberRadius, 0.5*fRadThick );
235 "Radiator", fLogicRadiator,
236 fPhysicsWorld,
false, 0 );
240 if( fRadRegion != 0 )
delete fRadRegion;
241 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
244 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm;
268 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm;
270 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
274 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. +
275 fAbsorberThickness/2. + 0.01*
mm;
277 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
278 fAbsorberRadius, fAbsorberThickness/2.);
280 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
284 "Absorber", fLogicAbsorber,
285 fPhysicsWorld,
false, 0);
287 if( fRegGasDet != 0 )
delete fRegGasDet;
288 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
304 return fPhysicsWorld;
314 fWorldSizeZ = 600.*
cm;
315 fWorldSizeR = 22.*
cm;
323 fRadThickness = 0.020*
mm;
335 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
337 fAbsorberThickness = 37.*
mm;
339 fAbsorberRadius = 100.*
mm;
340 fAbsorberZ = 136.*
cm;
342 fPipeLength = 160.0*
cm;
349 fDetThickness = 40.0*
mm;
350 fDetLength = 200.0*
cm;
368 G4double totDensity = foilDensity*foilGasRatio +
369 gasDensity*(1.0-foilGasRatio);
371 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
372 G4double fractionGas = 1.0 - fractionFoil;
382 fRadiatorMat = radiatorMat;
408 fGapMat = fAbsorberMaterial;
410 fWorldMaterial =
Air;
412 fSolidWorld =
new G4Box(
"World", fWorldSizeR, fWorldSizeR, fWorldSizeZ/2.);
414 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
417 fLogicWorld, 0,
false, 0);
421 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
423 fRadZ = fStartZ + 0.5*fRadThick;
428 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
429 1.1*fAbsorberRadius, 0.5*fRadThick );
436 "Radiator", fLogicRadiator,
437 fPhysicsWorld,
false, 0 );
441 if( fRadRegion != 0 )
delete fRadRegion;
442 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
447 G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
448 G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
470 G4cout<<
"fElectrodeThick = "<<fElectrodeThick/
mm<<
" mm"<<G4endl<<
G4endl;
482 G4double zPipe = zElectrode2 + fElectrodeThick/2. +
483 pipeDist/2. + fPipeLength/2.;
488 G4Box* solidPipe =
new G4Box(
"Pipe",fAbsorberRadius*0.5,
508 if( fMagField )
delete fMagField;
512 0., fieldStrength*std::cos(alphaB)));
526 G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2. - 0.001*
mm;
527 G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2. + 0.001*
mm;
557 G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*
mm;
561 zMylar += ( fPipeLength + pipeDist );
572 fAbsorberZ = zMylar + fMylarThick + fAbsorberThickness/2.;
574 fSolidAbsorber =
new G4Box(
"Absorber",
579 fAbsorberThickness/2.);
581 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
586 "Absorber", fLogicAbsorber,
587 fPhysicsWorld,
false, 0);
589 if( fRegGasDet != 0 )
delete fRegGasDet;
590 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
606 return fPhysicsWorld;
617 fWorldSizeZ = 600.*
cm;
618 fWorldSizeR = 22.*
cm;
634 fRadThickness = 0.0055*
mm;
638 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
640 fAbsorberThickness = 0.4*
mm;
642 fAbsorberRadius = 100.*
mm;
643 fAbsorberZ = 136.*
cm;
645 fPipeLength = 50.0*
cm;
652 fDetThickness = 40.0*
mm;
653 fDetLength = 200.0*
cm;
673 G4double totDensity = foilDensity*foilGasRatio +
674 gasDensity*(1.0-foilGasRatio);
676 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
677 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
681 radiatorMat->AddMaterial( CH2, fractionFoil );
682 radiatorMat->AddMaterial( Air, fractionGas );
686 fRadiatorMat = radiatorMat;
697 foilGasRatio = 0.99999;
698 foilDensity = 1.2928*
mg/
cm3;
699 gasDensity = 0.178*
mg/
cm3;
700 totDensity = foilDensity*foilGasRatio + gasDensity*(1.0-foilGasRatio);
702 fractionFoil = foilDensity*foilGasRatio/totDensity;
703 fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
705 fPipeMat =
new G4Material(
"pipeMat" , totDensity, 2);
706 fPipeMat->AddMaterial( Air, fractionFoil );
707 fPipeMat->AddMaterial( He, fractionGas );
711 fGapMat = fAbsorberMaterial;
713 fWorldMaterial =
Air;
715 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
717 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
720 fLogicWorld, 0,
false, 0);
724 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
726 fRadZ = fStartZ + 0.5*fRadThick;
730 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
731 1.1*fAbsorberRadius, 0.5*fRadThick );
738 "Radiator", fLogicRadiator,
739 fPhysicsWorld,
false, 0 );
743 if( fRadRegion != 0 )
delete fRadRegion;
744 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
757 G4double zElectrode1 = fRadZ - fRadThick/2. - fElectrodeThick/2.;
758 G4double zElectrode2 = fRadZ + fRadThick/2. + fElectrodeThick/2.;
772 G4cout<<
"fElectrodeThick = "<<fElectrodeThick/
mm<<
" mm"<<G4endl<<
G4endl;
780 G4double zPipe = zElectrode2 + fElectrodeThick/2. +
781 fPipeLength/2. + pipeDist/2.;
786 if ( std::fabs(pipe) > 1.e-15 )
818 G4double zMylar1 = zPipe - fPipeLength/2. - fMylarThick/2 - 0.01*
mm;
819 G4double zMylar2 = zPipe + fPipeLength/2. + fMylarThick/2 + 0.01*
mm;
829 if ( std::fabs(pipe) > 1.e-15 )
850 G4double zMylar = zElectrode2 + fElectrodeThick/2. + fMylarThick/2. + 1.0*
mm;
852 if ( std::fabs(pipe) > 1.e-15 ) zMylar += ( fPipeLength + pipeDist );
863 fAbsorberZ = zMylar + fMylarThick/2. + fAbsorberThickness/2.;
865 fSolidAbsorber =
new G4Box(
"Absorber",
868 fAbsorberThickness/2.);
870 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
874 "Absorber", fLogicAbsorber,
875 fPhysicsWorld,
false, 0);
877 if( fRegGasDet != 0 )
delete fRegGasDet;
878 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
894 return fPhysicsWorld;
903 fWorldSizeZ = 400.*
cm;
904 fWorldSizeR = 20.*
cm;
908 fRadThickness = 0.0127*
mm;
910 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
914 fAbsorberThickness = 15.0*
mm;
916 fAbsorberRadius = 100.*
mm;
917 fAbsorberZ = 136.*
cm;
923 fDetThickness = 40.0*
mm;
924 fDetLength = 200.0*
cm;
943 G4double totDensity = foilDensity*foilGasRatio +
944 gasDensity*(1.0-foilGasRatio);
946 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
947 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
951 radiatorMat->AddMaterial( Mylar, fractionFoil );
952 radiatorMat->AddMaterial( Air, fractionGas );
956 fRadiatorMat = radiatorMat;
965 fGapMat = fAbsorberMaterial;
967 fWorldMaterial =
Air;
969 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
971 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
974 fLogicWorld, 0,
false, 0);
978 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
980 fRadZ = fStartZ + 0.5*fRadThick;
982 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
983 1.1*fAbsorberRadius, 0.5*fRadThick );
990 "Radiator", fLogicRadiator,
991 fPhysicsWorld,
false, 0 );
995 if( fRadRegion != 0 )
delete fRadRegion;
996 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
999 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm;
1023 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm;
1025 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1029 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. +
1030 fAbsorberThickness/2. + 0.01*
mm;
1032 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1033 fAbsorberRadius, fAbsorberThickness/2.);
1035 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1039 "Absorber", fLogicAbsorber,
1040 fPhysicsWorld,
false, 0);
1042 if( fRegGasDet != 0 )
delete fRegGasDet;
1043 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1059 return fPhysicsWorld;
1068 fWorldSizeZ = 400.*
cm;
1069 fWorldSizeR = 20.*
cm;
1073 fRadThickness = 0.04*
mm;
1075 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
1079 fAbsorberThickness = 30.0*
mm;
1081 fAbsorberRadius = 100.*
mm;
1082 fAbsorberZ = 136.*
cm;
1086 fGapThick = 10.0*
cm;
1088 fDetThickness = 30.0*
mm;
1089 fDetLength = 200.0*
cm;
1110 G4double totDensity = foilDensity*foilGasRatio +
1111 gasDensity*(1.0-foilGasRatio);
1113 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
1114 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
1118 radiatorMat->AddMaterial( Li, fractionFoil );
1119 radiatorMat->AddMaterial( He, fractionGas );
1123 fRadiatorMat = radiatorMat;
1132 fGapMat = fAbsorberMaterial;
1134 fWorldMaterial = He;
1136 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
1138 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
1141 fLogicWorld, 0,
false, 0);
1145 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
1147 fRadZ = fStartZ + 0.5*fRadThick;
1149 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
1150 1.1*fAbsorberRadius, 0.5*fRadThick );
1157 "Radiator", fLogicRadiator,
1158 fPhysicsWorld,
false, 0 );
1162 if( fRadRegion != 0 )
delete fRadRegion;
1163 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
1166 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm;
1190 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm;
1192 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1196 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. +
1197 fAbsorberThickness/2. + 0.01*
mm;
1199 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1200 fAbsorberRadius, fAbsorberThickness/2.);
1202 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1206 "Absorber", fLogicAbsorber,
1207 fPhysicsWorld,
false, 0);
1209 if( fRegGasDet != 0 )
delete fRegGasDet;
1210 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1226 return fPhysicsWorld;
1235 fWorldSizeZ = 400.*
cm;
1236 fWorldSizeR = 20.*
cm;
1240 fRadThickness = 0.019*
mm;
1242 foilGasRatio = fRadThickness/(fRadThickness+fGasGap);
1246 fAbsorberThickness = 50.0*
mm;
1248 fAbsorberRadius = 100.*
mm;
1249 fAbsorberZ = 136.*
cm;
1253 fGapThick = 10.0*
cm;
1255 fDetThickness = 50.0*
mm;
1256 fDetLength = 200.0*
cm;
1277 G4double totDensity = foilDensity*foilGasRatio +
1278 gasDensity*(1.0-foilGasRatio);
1280 G4double fractionFoil = foilDensity*foilGasRatio/totDensity;
1281 G4double fractionGas = gasDensity*(1.0-foilGasRatio)/totDensity;
1285 radiatorMat->AddMaterial( CH2, fractionFoil );
1286 radiatorMat->AddMaterial( CO2, fractionGas );
1290 fRadiatorMat = radiatorMat;
1297 fAbsorberMaterial = fMat->
GetMaterial(
"Xe55He15CH4");
1299 fGapMat = fAbsorberMaterial;
1301 fWorldMaterial =
Air;
1303 fSolidWorld =
new G4Box(
"World", fWorldSizeR,fWorldSizeR,fWorldSizeZ/2.);
1305 fLogicWorld =
new G4LogicalVolume(fSolidWorld, fWorldMaterial,
"World");
1308 fLogicWorld, 0,
false, 0);
1312 fRadThick = fFoilNumber*(fRadThickness + fGasGap) - fGasGap + fDetGap;
1314 fRadZ = fStartZ + 0.5*fRadThick;
1316 fSolidRadiator =
new G4Box(
"Radiator",1.1*fAbsorberRadius ,
1317 1.1*fAbsorberRadius, 0.5*fRadThick );
1324 "Radiator", fLogicRadiator,
1325 fPhysicsWorld,
false, 0 );
1329 if( fRadRegion != 0 )
delete fRadRegion;
1330 if( fRadRegion == 0 ) fRadRegion =
new G4Region(
"XTRradiator");
1333 fWindowZ = fStartZ + fRadThick + fWindowThick/2. + 15.0*
mm;
1357 fGapZ = fWindowZ + fWindowThick/2. + fGapThick/2. + 0.01*
mm;
1359 fElectrodeZ = fGapZ + fGapThick/2. + fElectrodeThick/2. + 0.01*
mm;
1363 fAbsorberZ = fElectrodeZ + fElectrodeThick/2. +
1364 fAbsorberThickness/2. + 0.01*
mm;
1366 fSolidAbsorber =
new G4Box(
"Absorber", fAbsorberRadius,
1367 fAbsorberRadius, fAbsorberThickness/2.);
1369 fLogicAbsorber =
new G4LogicalVolume(fSolidAbsorber, fAbsorberMaterial,
1373 "Absorber", fLogicAbsorber,
1374 fPhysicsWorld,
false, 0);
1376 if( fRegGasDet != 0 )
delete fRegGasDet;
1377 if( fRegGasDet == 0 ) fRegGasDet =
new G4Region(
"XTRdEdxDetector");
1393 return fPhysicsWorld;
1398 void Em10DetectorConstruction::TestOld()
1531 G4cout <<
"\n The WORLD is made of "
1532 << fWorldSizeZ/
mm <<
"mm of " << fWorldMaterial->
GetName();
1533 G4cout <<
", the transverse size (R) of the world is " <<
1534 fWorldSizeR/
mm <<
" mm. " <<
G4endl;
1535 G4cout <<
" The ABSORBER is made of "
1536 << fAbsorberThickness/
mm <<
"mm of " << fAbsorberMaterial->
GetName();
1537 G4cout <<
", the transverse size (R) is " << fAbsorberRadius/
mm <<
1539 G4cout <<
" Z position of the (middle of the) absorber "
1540 << fAbsorberZ/
mm <<
" mm." <<
G4endl;
1564 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1566 pttoMaterial = (*theMaterialTable)[J];
1568 if(pttoMaterial->
GetName() == materialChoice)
1570 fAbsorberMaterial = pttoMaterial;
1588 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1590 pttoMaterial = (*theMaterialTable)[J];
1592 if(pttoMaterial->
GetName() == materialChoice)
1594 fRadiatorMat = pttoMaterial;
1611 for (
size_t J=0 ; J<theMaterialTable->size() ; J++)
1613 pttoMaterial = (*theMaterialTable)[J];
1615 if(pttoMaterial->
GetName() == materialChoice)
1617 fWorldMaterial = pttoMaterial;
1629 fAbsorberThickness = val;
1638 fRadThickness = val;
1656 fAbsorberRadius = val;
void SetAbsorberMaterial(G4String)
~Em10DetectorConstruction()
void SetMagField(G4double)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
G4bool SetDetectorField(G4Field *detectorField)
void AddMaterial(G4Material *material, G4double fraction)
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4double GetDensity() const
void SetRadiatorMaterial(G4String)
Definition of the Em10Materials class.
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void SetAbsorberThickness(G4double)
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
Definition of the Em10CalorimeterSD class.
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void SetAbsorberZpos(G4double)
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
G4Material * GetMaterial(const G4String &)
static G4GeometryManager * GetInstance()
void SetWorldSizeR(G4double)
G4VPhysicalVolume * Construct()
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4RunManager * GetRunManager()
static G4SDManager * GetSDMpointer()
Definition of the Em10DetectorMessenger class.
void SetGasGapThickness(G4double)
void SetRadiatorThickness(G4double)
Definition of the Em10DetectorConstruction class.
void OpenGeometry(G4VPhysicalVolume *vol=0)
void SetWorldMaterial(G4String)
void CreateChordFinder(G4MagneticField *detectorMagField)
void SetAbsorberRadius(G4double)
void SetMaterial(G4Material *pMaterial)
void PrintGeometryParameters()
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void SetWorldSizeZ(G4double)
Em10DetectorConstruction()