Warning, file /geant4/examples/advanced/xray_telescope/src/XrayTelDetectorConstruction.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 #include "XrayTelDetectorConstruction.hh"
0053
0054 #include "globals.hh"
0055 #include "G4PhysicalConstants.hh"
0056 #include "G4SystemOfUnits.hh"
0057 #include "G4UnitsTable.hh"
0058 #include "G4VUserDetectorConstruction.hh"
0059 #include "G4Material.hh"
0060 #include "G4MaterialTable.hh"
0061 #include "G4Element.hh"
0062 #include "G4ElementTable.hh"
0063 #include "G4Box.hh"
0064 #include "G4Cons.hh"
0065 #include "G4Tubs.hh"
0066 #include "G4LogicalVolume.hh"
0067 #include "G4ThreeVector.hh"
0068 #include "G4PVPlacement.hh"
0069 #include "G4PVReplica.hh"
0070 #include "G4SDManager.hh"
0071 #include "G4VisAttributes.hh"
0072 #include "G4Colour.hh"
0073
0074 XrayTelDetectorConstruction::XrayTelDetectorConstruction()
0075 {
0076 world_x = 2500.*cm;
0077 world_y = 2500.*cm;
0078 world_z = 2500.*cm;
0079 }
0080
0081 XrayTelDetectorConstruction::~XrayTelDetectorConstruction()
0082 {;}
0083
0084 G4VPhysicalVolume* XrayTelDetectorConstruction::Construct( )
0085 {
0086
0087
0088 G4Material* Vacuum = new G4Material("Vacuum",
0089 1.0 , 1.01*g/mole, 1.0E-25*g/cm3,
0090 kStateGas, 2.73*kelvin, 3.0E-18*pascal );
0091
0092
0093 G4VisAttributes* VisAttWorld= new G4VisAttributes( G4Colour(204/255.,255/255.,255/255.));
0094
0095
0096 G4Box * solidWorld = new G4Box( "world_S", world_x, world_y, world_z );
0097 G4LogicalVolume * logicalWorld = new G4LogicalVolume( solidWorld,
0098 Vacuum,
0099 "world_L",
0100 0,0,0);
0101
0102 logicalWorld -> SetVisAttributes(VisAttWorld);
0103
0104
0105 physicalWorld= new G4PVPlacement( 0,
0106 G4ThreeVector(),
0107 "world_P",
0108 logicalWorld,
0109 NULL,
0110 false,
0111 0);
0112
0113
0114 logicalWorld -> SetVisAttributes(G4VisAttributes::GetInvisible());
0115
0116
0117 ConstructTelescope();
0118 ConstructFocalPlane();
0119
0120 return physicalWorld;
0121 }
0122
0123
0124
0125
0126
0127 void XrayTelDetectorConstruction::ConstructTelescope()
0128 {
0129
0130
0131
0132
0133
0134
0135
0136
0137 G4Material* Ni = new G4Material("Nickel", 28., 58.6934*g/mole, 8.902*g/cm3);
0138 G4Material* Au = new G4Material("Gold", 79., 196.96654*g/mole, 19.300*g/cm3);
0139 G4Material* Al = new G4Material("Aluminium", 13., 26.98*g/mole, 2.700*g/cm3);
0140
0141
0142 G4VisAttributes* VisAttMirror = new G4VisAttributes(
0143 G4Colour(0/255., 0/255.,255/255.));
0144 G4VisAttributes* VisAttAuCoating = new G4VisAttributes(
0145 G4Colour(255/255., 255/255., 0/255.));
0146 G4VisAttributes* VisAttBaffle = new G4VisAttributes(
0147 G4Colour(128/255., 128/255., 128/255.));
0148
0149
0150 G4RotationMatrix *rotateMatrix = new G4RotationMatrix();
0151 rotateMatrix -> rotateY(90.*deg);
0152
0153
0154 G4int i;
0155 G4double MirrorEnd[5] = { 34.9995975*cm, 34.8277209*cm, 34.6549918*cm,
0156 34.1347834*cm, 33.6137753*cm };
0157 G4double MirrorPosition[4] = { 772.5*cm, 757.5*cm, 742.5*cm, 727.5*cm };
0158 G4double MirrorSectionLength = 15.0*cm;
0159 G4double MirrorNiThickness = 1.07*mm;
0160 G4double MirrorAuCoating = 50.0e-6*mm;
0161 G4double BaffleGap = 4.0*mm;
0162
0163 G4Cons* MirrorSolid[4];
0164 G4Cons* MirrorAuCoatingSolid[4];
0165 G4Cons* BaffleSolid[4];
0166
0167 G4LogicalVolume* MirrorLogicalVolume[4];
0168 G4LogicalVolume* MirrorAuCoatingLogicalVolume[4];
0169 G4LogicalVolume* BaffleLogicalVolume[4];
0170
0171 for ( i=0; i<4; i++ ) {
0172
0173
0174 MirrorSolid[i] = new G4Cons( "Mirror_S",
0175 MirrorEnd[i], MirrorEnd[i] + MirrorNiThickness,
0176 MirrorEnd[i+1], MirrorEnd[i+1] + MirrorNiThickness,
0177 MirrorSectionLength/2, 0*deg, 360.*deg);
0178 MirrorLogicalVolume[i] = new G4LogicalVolume(
0179 MirrorSolid[i], Ni, "Mirror_L", 0, 0, 0 );
0180 MirrorLogicalVolume[i]->SetVisAttributes(VisAttMirror);
0181
0182
0183 MirrorAuCoatingSolid[i] = new G4Cons(
0184 "MirrorAuCoating_S",
0185 MirrorEnd[i] - MirrorAuCoating, MirrorEnd[i],
0186 MirrorEnd[i+1] - MirrorAuCoating, MirrorEnd[i+1],
0187 MirrorSectionLength/2, 0*deg, 360.*deg);
0188 MirrorAuCoatingLogicalVolume[i] = new G4LogicalVolume(
0189 MirrorAuCoatingSolid[i],
0190 Au,
0191 "MirrorAuCoating_L",
0192 0, 0, 0 );
0193 MirrorAuCoatingLogicalVolume[i]->SetVisAttributes(VisAttAuCoating);
0194
0195
0196 BaffleSolid[i] = new G4Cons( "Baffle_S",
0197 0, MirrorEnd[i] - BaffleGap,
0198 0, MirrorEnd[i+1] - BaffleGap,
0199 MirrorSectionLength/2, 0*deg, 360.*deg);
0200 BaffleLogicalVolume[i] = new G4LogicalVolume(
0201 BaffleSolid[i], Al, "Baffle_L", 0, 0, 0 );
0202 BaffleLogicalVolume[i]-> SetVisAttributes(VisAttBaffle);
0203 }
0204
0205
0206
0207 for ( i=0; i<4; i++ ) {
0208 new G4PVPlacement(
0209 rotateMatrix,
0210 G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
0211 "Mirror_P",
0212 MirrorLogicalVolume[i],
0213 physicalWorld, false, 0 );
0214 new G4PVPlacement(
0215 rotateMatrix,
0216 G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
0217 "MirrorAuCoating_P",
0218 MirrorAuCoatingLogicalVolume[i],
0219 physicalWorld, false, 0 );
0220 new G4PVPlacement(
0221 rotateMatrix,
0222 G4ThreeVector( MirrorPosition[i], 0.0*cm, 0.0*cm ),
0223 "Baffle_P",
0224 BaffleLogicalVolume[i],
0225 physicalWorld, false, 0 );
0226 }
0227
0228
0229
0230 for ( i=0; i<4; i++ ) {
0231
0232
0233 BaffleLogicalVolume[i] -> SetVisAttributes(G4VisAttributes::GetInvisible());
0234 }
0235
0236
0237
0238
0239
0240 G4int nel;
0241 G4String symbol;
0242
0243
0244 G4Element* C = new G4Element("Carbon", symbol="C", 6., 12.011*g/mole);
0245 G4Element* H = new G4Element("Hydrogen",symbol="H", 1., 1.00794*g/mole);
0246
0247
0248 G4Material* Cf = new G4Material("Carbon Fibre", 2.0*g/cm3, nel=2);
0249 Cf->AddElement(C,1);
0250 Cf->AddElement(H,2);
0251
0252
0253 G4VisAttributes* VisAttBench = new G4VisAttributes(
0254 G4Colour(0/255., 200/255., 0/255.));
0255
0256
0257 G4double BenchThickness = 1.0*cm;
0258 G4double BenchFrontEndMinRadiusOut = MirrorEnd[4] +
0259 ( MirrorEnd[3] - MirrorEnd[4] )*7.5/15
0260 + MirrorNiThickness;
0261 G4double BenchFrontEndMinRadiusIn = MirrorEnd[4] +
0262 ( MirrorEnd[3] - MirrorEnd[4] )*7.4/15
0263 + MirrorNiThickness;
0264 G4double BenchFrontEndMaxRadius = MirrorEnd[4] + MirrorNiThickness + 25.*cm;
0265 G4double BenchBackEndMinRadius = 0.0*cm;
0266 G4double BenchBackEndMaxRadius = MirrorEnd[4] + MirrorNiThickness + 5.*cm;
0267 G4double BenchMainLength;
0268
0269 BenchMainLength = MirrorPosition[3] - BenchThickness;
0270
0271 G4Cons* BenchFrontEndSolid;
0272 G4Tubs* BenchBackEndSolid;
0273 G4Cons* BenchMainSolid;
0274
0275 G4LogicalVolume* BenchFrontEndLogicalVolume;
0276 G4LogicalVolume* BenchBackEndLogicalVolume;
0277 G4LogicalVolume* BenchMainLogicalVolume;
0278
0279 BenchFrontEndSolid = new G4Cons( "BenchFrontEnd_S",
0280 BenchFrontEndMinRadiusOut, BenchFrontEndMaxRadius,
0281 BenchFrontEndMinRadiusIn, BenchFrontEndMaxRadius,
0282 BenchThickness/2, 0*deg, 360.*deg );
0283 BenchFrontEndLogicalVolume = new G4LogicalVolume(
0284 BenchFrontEndSolid, Al, "BenchFrontEnd_L", 0, 0, 0 );
0285 BenchFrontEndLogicalVolume->SetVisAttributes(VisAttBench);
0286
0287 BenchBackEndSolid = new G4Tubs( "BenchBackEnd_S",
0288 BenchBackEndMinRadius, BenchBackEndMaxRadius,
0289 BenchThickness/2, 0*deg, 360.*deg );
0290 BenchBackEndLogicalVolume = new G4LogicalVolume(
0291 BenchBackEndSolid, Al, "BenchBackEnd_L", 0, 0, 0 );
0292 BenchBackEndLogicalVolume->SetVisAttributes(VisAttBench);
0293
0294 BenchMainSolid = new G4Cons( "BenchMain_S",
0295 BenchFrontEndMaxRadius - BenchThickness,
0296 BenchFrontEndMaxRadius,
0297 BenchBackEndMaxRadius - BenchThickness,
0298 BenchBackEndMaxRadius,
0299 BenchMainLength/2, 0*deg, 360.*deg);
0300 BenchMainLogicalVolume = new G4LogicalVolume(
0301 BenchMainSolid, Cf, "BenchMain_L", 0, 0, 0 );
0302 BenchMainLogicalVolume -> SetVisAttributes(VisAttBench);
0303
0304
0305
0306 new G4PVPlacement(
0307 rotateMatrix,
0308 G4ThreeVector( MirrorPosition[3] - BenchThickness/2,
0309 0.0*cm, 0.0*cm ),
0310 "BenchFrontEnd_P",
0311 BenchFrontEndLogicalVolume,
0312 physicalWorld, false, 0 );
0313
0314 new G4PVPlacement(
0315 rotateMatrix,
0316 G4ThreeVector(0.0*cm - BenchThickness/2, 0.0*cm, 0.0*cm ),
0317 "BenchBackEnd_P",
0318 BenchBackEndLogicalVolume,
0319 physicalWorld, false, 0 );
0320
0321 new G4PVPlacement(
0322 rotateMatrix,
0323 G4ThreeVector( BenchMainLength/2, 0.0*cm, 0.0*cm ),
0324 "BenchMain_P",
0325 BenchMainLogicalVolume,
0326 physicalWorld, false, 0 );
0327
0328
0329
0330
0331
0332
0333 BenchMainLogicalVolume -> SetVisAttributes(G4VisAttributes::GetInvisible());
0334
0335 return;
0336 }
0337
0338
0339
0340
0341 void XrayTelDetectorConstruction::ConstructFocalPlane()
0342 {
0343
0344
0345 G4Material* Ti = new G4Material("Titanium", 22., 47.867*g/mole, 4.54*g/cm3);
0346 G4Material* Si = new G4Material("Silicon", 14., 28.090*g/mole, 2.33*g/cm3);
0347
0348
0349 G4VisAttributes* VisDetectorBaffle = new G4VisAttributes(
0350 G4Colour(190/255., 255/255., 0/255.) );
0351 G4VisAttributes* VisDetector = new G4VisAttributes(
0352 G4Colour(255/255., 0/255., 0/255.) );
0353
0354
0355 G4RotationMatrix *rotateMatrix = new G4RotationMatrix();
0356 rotateMatrix -> rotateY(90.*deg);
0357
0358
0359 G4double DetectorBaffleLength = 57.2*cm;
0360 G4double DetectorBaffleOuterRadiusIn = 7.1*cm;
0361 G4double DetectorBaffleOuterRadiusOut = 7.35*cm;
0362 G4double DetectorBaffleInnerRadiusIn = 4.55*cm;
0363 G4double DetectorBaffleInnerRadiusOut = 5.75*cm;
0364
0365 G4Cons* DetectorBaffleSolid;
0366
0367 G4LogicalVolume* DetectorBaffleLogicalVolume;
0368
0369 DetectorBaffleSolid = new G4Cons( "DetectorBaffle_S",
0370 DetectorBaffleOuterRadiusIn,
0371 DetectorBaffleOuterRadiusOut,
0372 DetectorBaffleInnerRadiusIn,
0373 DetectorBaffleInnerRadiusOut,
0374 DetectorBaffleLength/2, 0*deg, 360.*deg);
0375 DetectorBaffleLogicalVolume = new G4LogicalVolume(
0376 DetectorBaffleSolid, Ti, "DetectorBaffle_L", 0, 0, 0 );
0377 DetectorBaffleLogicalVolume -> SetVisAttributes( VisDetectorBaffle );
0378
0379
0380
0381
0382 new G4PVPlacement(
0383 rotateMatrix,
0384 G4ThreeVector( DetectorBaffleLength/2, 0.0*cm, 0.0*cm),
0385 "DetectorBaffle_P",
0386 DetectorBaffleLogicalVolume,
0387 physicalWorld, false, 0 );
0388
0389
0390
0391
0392
0393
0394
0395 G4double DetectorRadius = 32.5*mm;
0396 G4double DetectorThickness = 50e-6*m;
0397
0398 G4Tubs* DetectorSolid;
0399
0400 G4LogicalVolume* DetectorLogicalVolume;
0401
0402 DetectorSolid = new G4Tubs( "Detector_S",
0403 0, DetectorRadius,
0404 DetectorThickness/2, 0*deg, 360.*deg);
0405 DetectorLogicalVolume = new G4LogicalVolume(
0406 DetectorSolid, Si, "Detector_L", 0, 0, 0 );
0407 DetectorLogicalVolume -> SetVisAttributes( VisDetector );
0408
0409
0410
0411 new G4PVPlacement(
0412 rotateMatrix,
0413 G4ThreeVector( DetectorThickness/2, 0.0*cm, 0.0*cm),
0414 "Detector_P",
0415 DetectorLogicalVolume,
0416 physicalWorld, false, 0 );
0417
0418
0419
0420
0421 return;
0422 }