File indexing completed on 2025-12-16 09:29:21
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 #include "DetectorConstruction.hh"
0035 #include "globals.hh"
0036 #include "G4Element.hh"
0037 #include "G4Material.hh"
0038 #include "G4PVPlacement.hh"
0039 #include "G4LogicalVolume.hh"
0040 #include "G4Box.hh"
0041 #include "G4Tubs.hh"
0042
0043 #include "G4FieldManager.hh"
0044 #include "G4TransportationManager.hh"
0045 #include "G4ChordFinder.hh"
0046 #include "G4Colour.hh"
0047 #include "G4VisAttributes.hh"
0048 #include "SensitiveDetector.hh"
0049 #include "G4SDManager.hh"
0050 #include "G4UserLimits.hh"
0051 #include "Randomize.hh"
0052 #include "G4ThreeVector.hh"
0053 #include "G4GeometryTolerance.hh"
0054 #include "G4GeometryManager.hh"
0055 #include "G4SystemOfUnits.hh"
0056 #include "G4NistManager.hh"
0057
0058 DetectorConstruction::DetectorConstruction(AnalysisManager* analysis_manager, DetectorMessenger* detector_messenger)
0059 {
0060 analysis = analysis_manager;
0061 messenger = detector_messenger;
0062
0063 detectorType = messenger -> GetDetectorType();
0064 detectorSizeWidth = messenger -> GetDetectorSizeWidth();
0065 detectorSizeThickness = messenger -> GetDetectorSizeThickness();
0066 secondStageSizeDim = messenger -> GetSecondStageSizeWidth();
0067 secondStageSizeThickness = messenger -> GetSecondStageSizeThickness();
0068
0069 usingWaterPhantom = messenger -> IsPhantomEnabled();
0070
0071 detectorPositionDepth = messenger -> GetDetectorPositionDepth();
0072
0073 nistMan = G4NistManager::Instance();
0074 }
0075
0076 DetectorConstruction::~DetectorConstruction(){
0077
0078 }
0079
0080 G4VPhysicalVolume* DetectorConstruction::Construct()
0081 {
0082 if( usingWaterPhantom == true ) ConstructWorldWithWaterPhantom();
0083 else ConstructVacuumWorld();
0084
0085 if( detectorType == "Diamond" ) ConstructDiamondDetector();
0086 else if( detectorType == "MicroDiamond" ) ConstructMicroDiamondDetector();
0087 else if( detectorType == "Silicon" ) ConstructSiliconDetector();
0088 else if( detectorType == "SiliconBridge" ) ConstructSiliconBridgeDetector();
0089 else if( detectorType == "DiamondTelescope" ) ConstructDiamondTelescope();
0090 else if( detectorType == "SiCDetector") ConstructSiC();
0091 else
0092 {
0093 G4cout << "ERROR: " << detectorType << " is not an allowed detector type. ";
0094 return 0;
0095 }
0096
0097 return physical_world;
0098 }
0099
0100 void DetectorConstruction::ConstructWorldWithWaterPhantom()
0101 {
0102
0103 G4Material* air = nistMan->FindOrBuildMaterial("G4_AIR");
0104 G4Material* water = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER");
0105
0106 G4double phantomWidth = 5.*cm;
0107 G4double phantomLength = detectorPositionDepth + 2.*cm;
0108
0109 G4double worldWidth = phantomWidth + 5*cm;
0110 G4double worldLength = phantomLength*2;
0111
0112
0113 G4Box* world = new G4Box("world_box", worldWidth/2, worldWidth/2, worldLength/2);
0114 G4LogicalVolume* logical_world = new G4LogicalVolume(world, air, "world_log", 0,0,0);
0115
0116
0117 logical_world -> SetVisAttributes(G4VisAttributes::GetInvisible());
0118
0119 physical_world = new G4PVPlacement(0,
0120 G4ThreeVector(),
0121 logical_world,
0122 "world_phys",
0123 0,
0124 false,
0125 0);
0126
0127 G4Box* phantom_box = new G4Box("phantom_box", phantomWidth/2, phantomWidth/2, phantomLength/2);
0128 G4LogicalVolume* logical_phantom = new G4LogicalVolume(phantom_box, water, "phantom_log", 0,0,0);
0129
0130
0131 G4ThreeVector phantom_position = G4ThreeVector( 0., 0., -phantomLength/2 );
0132
0133 new G4PVPlacement(0, phantom_position, logical_phantom,"phantom_phys",
0134 logical_world,
0135 false, 0, 0);
0136
0137 logical_phantom -> SetVisAttributes(G4VisAttributes(G4Colour(0., 0.2, 0.6)));
0138
0139
0140 G4double innerSize = 2.*cm;
0141 G4Box* inner_box = new G4Box("inner_box", innerSize/2, innerSize/2, innerSize/2);
0142 G4LogicalVolume* logical_inner = new G4LogicalVolume(inner_box, water, "inner_log",0,0,0);
0143
0144 G4double innerDepth = phantomLength/2 -detectorPositionDepth;
0145 G4ThreeVector inner_position = G4ThreeVector( 0 , 0 , innerDepth );
0146 new G4PVPlacement(0, inner_position, logical_inner,"inner_phys",
0147 logical_phantom,
0148 false, 0, 0);
0149
0150 logical_inner -> SetVisAttributes(G4VisAttributes::GetInvisible());
0151
0152
0153
0154 logical_motherVolumeForDetector = logical_inner;
0155 materialOfMotherVolume = water;
0156
0157
0158
0159
0160
0161 }
0162
0163 void DetectorConstruction::ConstructVacuumWorld()
0164 {
0165
0166 G4double Z = 1.;
0167 G4double A = 1.01*g/mole;
0168 G4double vacuumDensity = 1.e-25 *g/cm3;
0169 G4double pressure = 3.e-18*pascal;
0170 G4double temperature = 2.73*kelvin;
0171 G4Material* vacuum = new G4Material("Galactic", Z, A,
0172 vacuumDensity,kStateGas,temperature,pressure);
0173
0174 G4double worldSize = 10.*cm;
0175
0176 G4Box* world_box = new G4Box("world_box", worldSize/2, worldSize/2, worldSize/2);
0177 G4LogicalVolume* logical_world = new G4LogicalVolume(world_box, vacuum, "world_log",0,0,0);
0178 physical_world = new G4PVPlacement(0,
0179 G4ThreeVector(),
0180 logical_world,
0181 "world_phys",
0182 0,
0183 false,
0184 0);
0185
0186 logical_world -> SetVisAttributes(G4VisAttributes::GetInvisible());
0187
0188 logical_motherVolumeForDetector = logical_world;
0189 materialOfMotherVolume = vacuum;
0190 }
0191
0192 void DetectorConstruction::ConstructDiamondDetector()
0193 {
0194
0195
0196
0197 G4double A = 16.0 * g/mole;
0198 G4double Z = 8;
0199 G4Element* elO = new G4Element ("Oxygen", "O", Z, A);
0200
0201
0202 A = 1.01 * g/mole;
0203 Z = 1;
0204 G4Element* elH = new G4Element ("Hydrogen", "H", Z, A);
0205
0206
0207 A = 10.8 * g/mole;
0208 Z = 5;
0209 G4Element* elB = new G4Element ("Boron", "B", Z, A);
0210
0211
0212 A = 12.01 * g/mole;
0213 Z = 6;
0214 G4Element* elC = new G4Element ("Carbon", "C", Z, A);
0215
0216
0217 A = 12.01 * g/mole;
0218 Z = 6;
0219 G4Material* diamond = new G4Material("diamond", Z, A, 3.515*g/cm3);
0220
0221
0222 G4Material* dopant = new G4Material("dopant", 3.514*g/cm3, 2);
0223 dopant -> AddElement(elC, 99.9994*perCent);
0224 dopant -> AddElement(elB, 0.0006*perCent);
0225
0226
0227 A = 26.981 * g/mole;
0228 Z = 13;
0229 G4Material* AlContact = new G4Material("AlContact", Z, A, 2.7 *g/cm3);
0230
0231
0232 A = 196.97 * g/mole;
0233 Z = 79;
0234 G4Material* AuContact = new G4Material("AuContact", Z, A, 19.3 *g/cm3);
0235
0236
0237
0238 G4Material* PMMA = new G4Material("PMMA", 1.19*g/cm3, 3);
0239 PMMA -> AddElement(elC, 5);
0240 PMMA -> AddElement(elO, 2);
0241 PMMA -> AddElement(elH, 8);
0242
0243
0244
0245
0246 G4double DiaVol_x = 300*micrometer;
0247 G4double DiaVol_y = 240*micrometer;
0248 G4double DiaVol_z = 150*micrometer;
0249
0250 G4Box* DiaVol_box = new G4Box("DiaVol_box",DiaVol_x,DiaVol_y,DiaVol_z);
0251
0252 G4LogicalVolume* logical_DiaVol = new G4LogicalVolume(DiaVol_box, diamond, "DiaVol_log", 0,0,0);
0253
0254 G4ThreeVector DiaVol_position = {0, 0, -DiaVol_z +detectorSizeThickness/2};
0255
0256 new G4PVPlacement(0, DiaVol_position, logical_DiaVol,"DiaVol_phys",
0257 logical_motherVolumeForDetector,
0258 false, 0, true);
0259
0260
0261 G4double vacblock_x = 300*um;
0262 G4double vacblock_y = 240*um;
0263 G4double vacblock_z = 0.25*um;
0264
0265
0266 G4Box* vacblock_box = new G4Box("vacblock_box",vacblock_x,vacblock_y,vacblock_z);
0267
0268 G4LogicalVolume* logical_vacblock = new G4LogicalVolume(vacblock_box, materialOfMotherVolume, "vacblock_log", 0,0,0);
0269
0270 new G4PVPlacement(0,
0271 G4ThreeVector(0,0,DiaVol_z - vacblock_z),
0272 logical_vacblock,
0273 "vacblock_phys",
0274 logical_DiaVol,
0275 false,
0276 0, true);
0277
0278 G4double Bdl_x = 300*micrometer;
0279 G4double Bdl_y = 240*micrometer;
0280 G4double Bdl_z = detectorSizeThickness/2;
0281
0282 G4Box* Bdl_box = new G4Box("Bdl_box",Bdl_x,Bdl_y,Bdl_z);
0283
0284 G4LogicalVolume* logical_Bdl = new G4LogicalVolume(Bdl_box, dopant, "Bdl_log", 0,0,0);
0285
0286 new G4PVPlacement(0,
0287 G4ThreeVector(0,0,DiaVol_z - Bdl_z - vacblock_z- vacblock_z),
0288 logical_Bdl,
0289 "Bdl_phys",
0290 logical_DiaVol,
0291 false,
0292 0, true);
0293
0294
0295 G4double SV_x = detectorSizeWidth/2;
0296 G4double SV_y = detectorSizeWidth/2;
0297 G4double SV_z = Bdl_z;
0298
0299 G4Box* SV_box = new G4Box("SV_box",SV_x,SV_y,SV_z);
0300
0301 G4LogicalVolume* logical_SV = new G4LogicalVolume(SV_box, diamond, "SV_log", 0,0,0);
0302
0303 new G4PVPlacement(0, G4ThreeVector(-45*um,105*um,0*um), logical_SV,"SV_phys1",
0304 logical_Bdl,false, 0, true);
0305
0306 new G4PVPlacement(0, G4ThreeVector(165*um,105*um,0*um), logical_SV,"SV_phys2",
0307 logical_Bdl, false, 0, true);
0308
0309 new G4PVPlacement(0, G4ThreeVector(-45*um,-105*um,0*um),logical_SV,"SV_phys3",
0310 logical_Bdl, false, 0, true);
0311
0312 new G4PVPlacement(0, G4ThreeVector(165*um,-105*um,0*um),logical_SV,"SV_phys4",
0313 logical_Bdl, false, 0, true);
0314
0315
0316
0317 G4double AlStrip_x = 240*um;
0318 G4double AlStrip_y = 240*um;
0319 G4double AlStrip_z = vacblock_z;
0320
0321 G4Box* AlStrip = new G4Box("AlStrip",AlStrip_x,AlStrip_y,AlStrip_z);
0322
0323 G4LogicalVolume* logical_AlStrip = new G4LogicalVolume(AlStrip, AlContact, "AlStrip_log", 0,0,0);
0324
0325 new G4PVPlacement(0, G4ThreeVector(60*um,0,0), logical_AlStrip, "AlStrip_phys",
0326 logical_vacblock, false, 0, true);
0327
0328
0329 G4double innerRadiusOfTheTube1 = 0.*um;
0330 G4double outerRadiusOfTheTube1 = 45.*um;
0331 G4double heightOfTheTube1 = 10*nm;
0332 G4double startAngleOfTheTube1 = 0.*deg;
0333 G4double spanningAngleOfTheTube1 = 360.*deg;
0334
0335 G4Tubs* GoldCylinder1 = new G4Tubs("GoldCylinder1", innerRadiusOfTheTube1,
0336 outerRadiusOfTheTube1,
0337 heightOfTheTube1,
0338 startAngleOfTheTube1,
0339 spanningAngleOfTheTube1);
0340
0341 G4LogicalVolume* logical_GoldCylinder1 = new G4LogicalVolume(GoldCylinder1, AuContact, "GoldCylinder1_log", 0,0,0);
0342
0343 new G4PVPlacement(0,G4ThreeVector(-245*um,0,-vacblock_z + heightOfTheTube1),
0344 logical_GoldCylinder1,
0345 "GoldCylinder1_phys",
0346 logical_vacblock, false, 0, true);
0347
0348
0349 G4double innerRadiusOfTheTube2 = 0.*um;
0350 G4double outerRadiusOfTheTube2 = 45.*um;
0351 G4double heightOfTheTube2 = Bdl_z;
0352 G4double startAngleOfTheTube2 = 0.*deg;
0353 G4double spanningAngleOfTheTube2 = 360.*deg;
0354
0355 G4Tubs* GoldCylinder2 = new G4Tubs("GoldCylinder2",
0356 innerRadiusOfTheTube2,
0357 outerRadiusOfTheTube2,
0358 heightOfTheTube2,
0359 startAngleOfTheTube2,
0360 spanningAngleOfTheTube2);
0361
0362 G4LogicalVolume* logical_GoldCylinder2 = new G4LogicalVolume(GoldCylinder2, AuContact, "GoldCylinder2_log", 0,0,0);
0363
0364 new G4PVPlacement(0, G4ThreeVector(-245*um,0,0), logical_GoldCylinder2, "GoldCylinder2_phys",
0365 logical_Bdl, false, 0, true);
0366
0367
0368 G4double innerRadiusOfTheTube3 = 0.*um;
0369 G4double outerRadiusOfTheTube3 = 45.*um;
0370 G4double heightOfTheTube3 = 75.*um -heightOfTheTube2 - heightOfTheTube1 ;
0371 G4double startAngleOfTheTube3 = 0.*deg;
0372 G4double spanningAngleOfTheTube3 = 360.*deg;
0373
0374 G4Tubs* GoldCylinder3 = new G4Tubs("GoldCylinder3",
0375 innerRadiusOfTheTube3,
0376 outerRadiusOfTheTube3,
0377 heightOfTheTube3,
0378 startAngleOfTheTube3,
0379 spanningAngleOfTheTube3);
0380
0381 G4LogicalVolume* logical_GoldCylinder3 = new G4LogicalVolume(GoldCylinder3, AuContact, "GoldCylinder3_log", 0,0,0);
0382
0383 new G4PVPlacement(0, G4ThreeVector(-245*um,0,DiaVol_z - heightOfTheTube3 - Bdl_z - Bdl_z - vacblock_z- vacblock_z),
0384 logical_GoldCylinder3,
0385 "GoldCylinder3_phys",
0386 logical_DiaVol,
0387 false,
0388 0, true);
0389
0390
0391
0392 logical_DiaVol -> SetVisAttributes(G4VisAttributes(G4Colour(255,255,255)));
0393 logical_Bdl -> SetVisAttributes(G4VisAttributes(G4Colour(0,255,0)));
0394
0395 G4VisAttributes vis_SV(G4Colour(198, 226, 255));
0396 vis_SV.SetForceSolid(true);
0397 logical_SV -> SetVisAttributes(vis_SV);
0398 logical_vacblock -> SetVisAttributes(G4VisAttributes::GetInvisible());
0399 logical_AlStrip -> SetVisAttributes(G4VisAttributes(G4Colour(0, 255, 255)));
0400
0401 G4VisAttributes vis_GoldCylinder1(G4Colour(255, 255, 0));
0402 vis_GoldCylinder1.SetForceAuxEdgeVisible(true);
0403 logical_GoldCylinder1 -> SetVisAttributes(vis_GoldCylinder1);
0404
0405 G4VisAttributes vis_GoldCylinder2(G4Colour(255, 255, 0));
0406 vis_GoldCylinder2.SetForceAuxEdgeVisible(true);
0407 logical_GoldCylinder2 -> SetVisAttributes(vis_GoldCylinder2);
0408
0409 G4VisAttributes vis_GoldCylinder3(G4Colour(255, 255, 0));
0410 vis_GoldCylinder3.SetForceAuxEdgeVisible(true);
0411 logical_GoldCylinder3 -> SetVisAttributes(vis_GoldCylinder3);
0412
0413
0414
0415
0416 }
0417
0418 void DetectorConstruction::ConstructMicroDiamondDetector()
0419 {
0420
0421
0422 G4double A = 10.8 * g/mole;
0423 G4double Z = 5;
0424 G4Element* elB = new G4Element ("Boron", "B", Z, A);
0425
0426
0427 A = 12.01 * g/mole;
0428 Z = 6;
0429 G4Element* elC = new G4Element ("Carbon", "C", Z, A);
0430
0431
0432 A = 12.01 * g/mole;
0433 Z = 6;
0434 G4Material* diamond = new G4Material("diamond", Z, A, 3.515*g/cm3);
0435
0436
0437 G4Material* p_diamond = new G4Material("p_diamond", 3.514*g/cm3, 2);
0438
0439 p_diamond -> AddElement(elC, 99.94887*perCent);
0440 p_diamond -> AddElement(elB, 0.05113*perCent);
0441
0442
0443 G4Material* chromium = nistMan->FindOrBuildMaterial("G4_Cr");
0444
0445
0446 G4double SVside = detectorSizeWidth /2.;
0447 G4double SVthickness = detectorSizeThickness /2.;
0448 G4double SVspacing = 200.*um;
0449
0450 G4Box* SV_box = new G4Box("SV_box", SVside, SVside, SVthickness);
0451
0452 G4LogicalVolume* logical_SV = new G4LogicalVolume(SV_box, diamond, "SV_log", 0,0,0);
0453
0454 G4VisAttributes SVcolour(G4Colour(0.5, 0.5, 0.5));
0455 SVcolour.SetForceSolid(true);
0456 logical_SV -> SetVisAttributes(SVcolour);
0457
0458
0459 G4double feThickness = 50.*nm /2.;
0460
0461 G4Box* fe_box = new G4Box("frontElec_box", SVside, SVside, feThickness);
0462
0463 G4LogicalVolume* logical_fe = new G4LogicalVolume(fe_box, chromium, "frontElec_log", 0,0,0);
0464
0465 G4VisAttributes fe_colour(G4Colour::Brown());
0466 fe_colour.SetForceSolid(false);
0467 logical_fe -> SetVisAttributes(fe_colour);
0468
0469
0470 G4double pDthickness = 1.*um /2.;
0471
0472 G4Box* pD_box = new G4Box("pDiam_box", SVside, SVside, pDthickness);
0473
0474 G4LogicalVolume* logical_pD = new G4LogicalVolume(pD_box, p_diamond, "pDiam_box", 0,0,0);
0475
0476 G4VisAttributes pDcolour(G4Colour::Blue());
0477 pDcolour.SetForceSolid(false);
0478
0479 logical_pD -> SetVisAttributes(pDcolour);
0480
0481
0482 G4ThreeVector SVposition = {0., 0., 0};
0483 G4ThreeVector fePosition = {0., 0., SVthickness + feThickness};
0484 G4ThreeVector pDposition = {0., 0., -SVthickness -pDthickness};
0485
0486 G4double SVposition_x[4] = { -3.*SVside -1.5*SVspacing, -SVside -0.5*SVspacing, +SVside +0.5*SVspacing, +3.*SVside +1.5*SVspacing };
0487
0488 std::ostringstream PVName;
0489
0490 for( int i=0; i<4; i++)
0491 {
0492
0493 SVposition[0] = SVposition_x[i];
0494 PVName << "SV_phys" << i;
0495 new G4PVPlacement(0, SVposition, logical_SV, PVName.str(),
0496 logical_motherVolumeForDetector,
0497 false, 0, true);
0498 PVName.str("");
0499
0500
0501 PVName << "frontElec_phys" << i;
0502 fePosition[0] = SVposition[0];
0503 new G4PVPlacement(0, fePosition, logical_fe, PVName.str(),
0504 logical_motherVolumeForDetector,
0505 false, 0, true);
0506 PVName.str("");
0507
0508
0509 PVName << "pD_phys" << i;
0510 pDposition[0] = SVposition[0];
0511 new G4PVPlacement(0, pDposition, logical_pD, PVName.str(),
0512 logical_motherVolumeForDetector,
0513 false, 0, true);
0514 PVName.str("");
0515 }
0516
0517
0518 G4double subs_x = 2.*mm /2.;
0519 G4double subs_y = 0.5*mm /2.;
0520 G4double sub_z = 300.*micrometer /2.;
0521
0522 G4Box* sub_box = new G4Box("sub_box", subs_x, subs_y, sub_z);
0523
0524 G4LogicalVolume* logical_sub = new G4LogicalVolume(sub_box, diamond, "sub_log", 0,0,0);
0525
0526 G4ThreeVector subPosition = {0,0, -SVthickness -2.*pDthickness -sub_z};
0527
0528 new G4PVPlacement(0, subPosition, logical_sub, "sub_phys",
0529 logical_motherVolumeForDetector,
0530 false, 0, true);
0531
0532 G4VisAttributes subColour(G4Colour(0.5, 0.5, 0.5));
0533 subColour.SetForceSolid(false);
0534 logical_sub -> SetVisAttributes(subColour);
0535 }
0536
0537 void DetectorConstruction::ConstructDiamondTelescope()
0538 {
0539
0540
0541 G4double A = 10.8 * g/mole;
0542 G4double Z = 5;
0543 G4Element* elB = new G4Element ("Boron", "B", Z, A);
0544
0545
0546 A = 12.01 * g/mole;
0547 Z = 6;
0548 G4Element* elC = new G4Element ("Carbon", "C", Z, A);
0549
0550
0551 A = 12.01 * g/mole;
0552 Z = 6;
0553 G4Material* diamond = new G4Material("diamond", Z, A, 3.515*g/cm3);
0554
0555
0556 G4Material* p_diamond = new G4Material("p_diamond", 3.514*g/cm3, 2);
0557
0558 p_diamond -> AddElement(elC, 99.94887*perCent);
0559 p_diamond -> AddElement(elB, 0.05113*perCent);
0560
0561
0562 G4Material* chromium = nistMan->FindOrBuildMaterial("G4_Cr");
0563
0564
0565
0566 G4double SV_DE_radius = detectorSizeWidth /2.;
0567 G4double SV_DE_thickness = detectorSizeThickness /2.;
0568
0569 G4Tubs* SV_DE_cyl = new G4Tubs("SV_DE_cyl", 0.*mm, SV_DE_radius, SV_DE_thickness, 0*deg, 360*deg);
0570
0571 G4LogicalVolume* logical_SV = new G4LogicalVolume(SV_DE_cyl, diamond, "SV_log", 0,0,0);
0572
0573 G4VisAttributes SVcolour(G4Colour(0.5, 0.5, 0.5));
0574 SVcolour.SetForceSolid(true);
0575 logical_SV -> SetVisAttributes(SVcolour);
0576
0577
0578 if( secondStageSizeDim < detectorSizeWidth )
0579 {
0580 G4cout << "WARNING: the telescope E-stage diameter set (" << secondStageSizeDim << ") is smaller than the DE-stage diameter (" << detectorSizeWidth << ").";
0581 G4cout << "To be compliant with the telescope structure, the E-stage diameter has to be at least the same size as the DE-stage diameter.";
0582 secondStageSizeDim = detectorSizeWidth;
0583 G4cout << "E-stage diameter set to default as the DE-stage diameter: " << secondStageSizeDim << ".";
0584 }
0585
0586
0587 G4double SV_E_thickness = secondStageSizeThickness /2.;
0588 G4double SV_E_radius = secondStageSizeDim /2.;
0589
0590 G4Tubs* SV_E_cyl = new G4Tubs("SV_E_cyl", 0.*mm, SV_E_radius, SV_E_thickness, 0*deg, 360*deg);
0591
0592 G4LogicalVolume* logical_SV_Estage = new G4LogicalVolume(SV_E_cyl, diamond, "SV_Estage_log", 0,0,0);
0593
0594 G4VisAttributes SV_E_colour(G4Colour(0.7, 0.7, 0.7));
0595 SV_E_colour.SetForceSolid(true);
0596 logical_SV_Estage -> SetVisAttributes(SV_E_colour);
0597
0598
0599
0600
0601
0602 G4double d_crystal_width = 2.*mm /2.;
0603
0604 if( d_crystal_width < secondStageSizeDim )
0605 {
0606 G4cout << "The default lateral size (" << d_crystal_width << ") of the diamond crystals in which the DE and the E stages are created was changed to be at least as big as the sensitive volumes (" << secondStageSizeDim << ".";
0607 d_crystal_width = secondStageSizeDim;
0608 }
0609
0610
0611 G4Box* DE_crystal_box = new G4Box("DE_crystal_box", d_crystal_width, d_crystal_width, SV_DE_thickness);
0612
0613 G4LogicalVolume* logical_DE_crystal = new G4LogicalVolume(DE_crystal_box, diamond, "DE_crystal_log", 0,0,0);
0614
0615 G4VisAttributes Diamond_crystal_colour(G4Colour::White());
0616 Diamond_crystal_colour.SetForceSolid(false);
0617 logical_DE_crystal -> SetVisAttributes(Diamond_crystal_colour);
0618
0619
0620 G4Box* E_crystal_box = new G4Box("E_crystal_box", d_crystal_width, d_crystal_width, SV_E_thickness);
0621
0622 G4LogicalVolume* logical_E_crystal = new G4LogicalVolume(E_crystal_box, diamond, "E_crystal_log", 0,0,0);
0623
0624 logical_E_crystal -> SetVisAttributes(Diamond_crystal_colour);
0625
0626
0627 G4double feThickness = 100.*nm /2.;
0628
0629 G4Tubs* fe_cyl = new G4Tubs("frontElec_cyl", 0.*mm, SV_DE_radius, feThickness, 0*deg, 360*deg);
0630
0631 G4LogicalVolume* logical_fe = new G4LogicalVolume(fe_cyl, chromium, "frontElec_log", 0,0,0);
0632
0633 G4VisAttributes fe_colour(G4Colour::Brown());
0634 fe_colour.SetForceSolid(false);
0635 logical_fe -> SetVisAttributes(fe_colour);
0636
0637
0638 G4Tubs* fe_cyl_back = new G4Tubs("backElec_cyl", 0.*mm, SV_E_radius, feThickness, 0*deg, 360*deg);
0639
0640 G4LogicalVolume* logical_fe_back = new G4LogicalVolume(fe_cyl_back, chromium, "backElec_log", 0,0,0);
0641
0642 logical_fe_back -> SetVisAttributes(fe_colour);
0643
0644
0645 G4double pDthickness = 1.8*um /2.;
0646
0647
0648
0649 G4Box* pD_box = new G4Box("pDiam_box", d_crystal_width, d_crystal_width, pDthickness);
0650
0651 G4LogicalVolume* logical_pD = new G4LogicalVolume(pD_box, p_diamond, "pDiam_log", 0,0,0);
0652
0653 G4VisAttributes pDcolour(G4Colour::Blue());
0654 pDcolour.SetForceSolid(false);
0655 logical_pD -> SetVisAttributes(pDcolour);
0656
0657
0658 G4ThreeVector DE_crystal_position = {0., 0., 0.};
0659 G4ThreeVector SVposition = {0., 0., 0.};
0660 G4ThreeVector fePosition = {0., 0., SV_DE_thickness + feThickness};
0661 G4ThreeVector pDposition = {0., 0., -SV_DE_thickness - pDthickness};
0662 G4ThreeVector E_crystal_position = {0., 0., -SV_DE_thickness - 2*pDthickness - SV_E_thickness};
0663 G4ThreeVector SV_E_position = {0., 0., 0.};
0664 G4ThreeVector bePosition = {0., 0., -SV_DE_thickness - 2.*pDthickness - 2.*SV_E_thickness - feThickness};
0665
0666
0667 new G4PVPlacement(0, DE_crystal_position, logical_DE_crystal, "DEstageCrystal_phys",
0668 logical_motherVolumeForDetector,
0669 false, 0, true);
0670
0671 new G4PVPlacement(0, SVposition, logical_SV, "SV_DE_phys",
0672 logical_DE_crystal,
0673 false, 0, true);
0674
0675 new G4PVPlacement(0, pDposition, logical_pD, "pD_phys",
0676 logical_motherVolumeForDetector,
0677 false, 0, true);
0678
0679 new G4PVPlacement(0, E_crystal_position, logical_E_crystal, "EstageCrystal_phys",
0680 logical_motherVolumeForDetector,
0681 false, 0, true);
0682
0683 new G4PVPlacement(0, SV_E_position, logical_SV_Estage, "SV_E_phys",
0684 logical_E_crystal,
0685 false, 0, true);
0686
0687 new G4PVPlacement(0, fePosition, logical_fe, "frontElec_phys",
0688 logical_motherVolumeForDetector,
0689 false, 0, true);
0690
0691 new G4PVPlacement(0, bePosition, logical_fe_back, "backElec_phys",
0692 logical_motherVolumeForDetector,
0693 false, 0, true);
0694 }
0695
0696 void DetectorConstruction::ConstructSiliconDetector()
0697 {
0698 nistMan->SetVerbose(1);
0699
0700
0701
0702 G4double A = 14.01 * g/mole;
0703 G4double Z = 7;
0704 G4Element* elN = new G4Element ("Nitrogen", "N", Z, A);
0705
0706
0707 A = 16.0 * g/mole;
0708 Z = 8;
0709 G4Element* elO = new G4Element ("Oxygen", "O", Z, A);
0710
0711
0712 A = 1.01 * g/mole;
0713 Z = 1;
0714 G4Element* elH = new G4Element ("Hydrogen", "H", Z, A);
0715
0716
0717 A = 12.01 * g/mole;
0718 Z = 6;
0719 G4Element* elC = new G4Element ("Carbon", "C", Z, A);
0720
0721
0722 G4Material* Air = new G4Material("Air", 1.29*mg/cm3, 2);
0723 Air -> AddElement(elN, 70*perCent);
0724 Air -> AddElement(elO, 30*perCent);
0725
0726
0727
0728 G4Material* PMMA = new G4Material("PMMA", 1.19*g/cm3, 3);
0729 PMMA -> AddElement(elC, 5);
0730 PMMA -> AddElement(elO, 2);
0731 PMMA -> AddElement(elH, 8);
0732
0733
0734 G4Material* silicon = nistMan->FindOrBuildMaterial("G4_Si");
0735 G4Material* SiO2 = nistMan->FindOrBuildMaterial("G4_SILICON_DIOXIDE");
0736
0737
0738 G4double SVspacing = 10.*um;
0739
0740
0741 G4double PMMA_x = ( detectorSizeWidth*2. + SVspacing*3 ) /2.;
0742 G4double PMMA_y = ( detectorSizeWidth*2. + SVspacing*3 ) /2.;
0743 G4double PMMA_z = detectorSizeThickness /2.;
0744
0745 G4Box* PMMA_box = new G4Box("PMMA_box", PMMA_x, PMMA_y, PMMA_z);
0746
0747 G4LogicalVolume* logical_PMMA = new G4LogicalVolume(PMMA_box, PMMA, "PMMA_log", 0,0,0);
0748
0749 new G4PVPlacement(0, G4ThreeVector(), logical_PMMA, "PMMA_phys",
0750 logical_motherVolumeForDetector,
0751 false, 0, true);
0752
0753 logical_PMMA -> SetVisAttributes(G4VisAttributes(G4Colour(0., 1., 0.)));
0754
0755
0756 G4double SV_radius = detectorSizeWidth /2.;
0757 G4double SV_thick = detectorSizeThickness /2.;
0758
0759 G4Tubs* SV_cyl = new G4Tubs("SV_cyl", 0., SV_radius, SV_thick, 0.*deg, 360.*deg);
0760
0761
0762
0763 G4LogicalVolume* logical_SV = new G4LogicalVolume(SV_cyl, silicon, "SV_log", 0,0,0);
0764
0765 G4VisAttributes SVcolour(G4Colour(0.5, 0.5, 0.5));
0766 SVcolour.SetForceSolid(true);
0767 logical_SV -> SetVisAttributes(SVcolour);
0768
0769 G4ThreeVector SVposition;
0770
0771 SVposition = { +SVspacing/2. +SV_radius, +SVspacing/2. +SV_radius, 0. };
0772 new G4PVPlacement(0, SVposition, logical_SV, "SV_phys1",
0773 logical_PMMA,
0774 false, 0, true);
0775
0776
0777
0778
0779 SVposition = { -SVspacing/2. -SV_radius, +SVspacing/2. +SV_radius, 0. };
0780 new G4PVPlacement(0, SVposition, logical_SV, "SV_phys2",
0781 logical_PMMA,
0782 false, 0, true);
0783
0784 SVposition = { -SVspacing/2. -SV_radius, -SVspacing/2. -SV_radius, 0. };
0785 new G4PVPlacement(0, SVposition, logical_SV, "SV_phys3",
0786 logical_PMMA,
0787 false, 0, true);
0788
0789 SVposition = { +SVspacing/2. +SV_radius, -SVspacing/2. -SV_radius, 0. };
0790 new G4PVPlacement(0, SVposition, logical_SV, "SV_phys4",
0791 logical_PMMA,
0792 false, 0, true);
0793
0794
0795 G4double oxyde_x = PMMA_x;
0796 G4double oxyde_y = PMMA_y;
0797 G4double oxyde_z = 1.*um /2.;
0798
0799 G4Box* oxyde_box = new G4Box("oxyde_box", oxyde_x, oxyde_y, oxyde_z);
0800
0801 G4LogicalVolume* logical_oxyde = new G4LogicalVolume(oxyde_box, SiO2, "oxyde_log", 0,0,0);
0802
0803 G4ThreeVector oxyde_position = G4ThreeVector( 0, 0, -PMMA_z -oxyde_z );
0804 new G4PVPlacement(0, oxyde_position, logical_oxyde, "oxyde_phys",
0805 logical_motherVolumeForDetector,
0806 false, 0, true);
0807
0808 logical_oxyde -> SetVisAttributes(G4VisAttributes(G4Colour(0.6, 0.6, 0.6)));
0809 }
0810
0811 void DetectorConstruction::ConstructSiliconBridgeDetector()
0812 {
0813
0814
0815
0816
0817
0818
0819
0820
0821
0822
0823
0824
0825
0826 G4Material* Aluminium = nistMan->FindOrBuildMaterial("G4_Al");
0827
0828
0829 G4Material* silicon = nistMan->FindOrBuildMaterial("G4_Si");
0830
0831
0832
0833
0834
0835 G4Material* SiO2 = nistMan->FindOrBuildMaterial("G4_SILICON_DIOXIDE");
0836
0837
0838
0839
0840
0841
0842
0843 G4VisAttributes* wireFrameWhiteAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
0844 wireFrameWhiteAtt -> SetVisibility(true);
0845 wireFrameWhiteAtt -> SetForceWireframe(true);
0846
0847 G4VisAttributes* wireFramePinkAtt = new G4VisAttributes(G4Colour(1.0, 0.0, 1.0));
0848 wireFramePinkAtt -> SetVisibility(true);
0849 wireFramePinkAtt -> SetForceWireframe(true);
0850
0851 G4VisAttributes* solidGreyAtt = new G4VisAttributes(G4Colour(0.5, .5, .5));
0852 solidGreyAtt -> SetVisibility(true);
0853 solidGreyAtt -> SetForceSolid(true);
0854
0855 G4VisAttributes* solidRedAtt = new G4VisAttributes(G4Colour(1.0, 0.0, 0.0));
0856 solidRedAtt -> SetVisibility(true);
0857 solidRedAtt -> SetForceSolid(true);
0858
0859 G4VisAttributes* solidGreenAtt = new G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
0860 solidGreenAtt -> SetVisibility(true);
0861 solidGreenAtt -> SetForceSolid(true);
0862
0863 G4VisAttributes* solidYellowAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 0.0));
0864 solidYellowAtt -> SetVisibility(true);
0865 solidYellowAtt -> SetForceSolid(true);
0866
0867 G4VisAttributes* solidBlueAtt = new G4VisAttributes(G4Colour(0.0, 0.0, 1.0));
0868 solidBlueAtt -> SetVisibility(true);
0869 solidBlueAtt -> SetForceSolid(true);
0870
0871
0872
0873
0874
0875 G4RotationMatrix* rotMatW = new G4RotationMatrix;
0876 rotMatW->rotateY(0*deg);
0877 rotMatW->rotateX(-90*deg);
0878 rotMatW->rotateZ(0*deg);
0879
0880
0881 G4double SVheight = detectorSizeThickness;
0882 G4double insulationThickness = 1.*micrometer;
0883 G4double SiOoverlayerBottomThickness = 1.7*micrometer;
0884 G4double AlOverlayerThickness = 1.7*micrometer;
0885 G4double AlOverlayerRadius = 4.*micrometer;
0886 G4double SiOoverlayerTopThickness = 1.43*micrometer;
0887 G4double SiOoverlayerTopRadius = 10.5/2. * micrometer;
0888 G4double overLayerThickness = AlOverlayerThickness + SiOoverlayerTopThickness;
0889
0890 G4double baseSiThickness = 300.*micrometer;
0891 G4double detectorHeight = (SVheight + baseSiThickness + insulationThickness + SiOoverlayerBottomThickness + AlOverlayerThickness + SiOoverlayerTopThickness);
0892
0893 G4double SVwidth = detectorSizeWidth;
0894 G4double pitch = 20.*micrometer;
0895
0896 G4double bridgingWidth = 20.*micrometer;
0897 G4double bridgingLength = 15.*micrometer;
0898 G4double bridingHeight = SVheight;
0899
0900 G4double numberOfRows = 59;
0901 G4double numberOfColumns = (24*3);
0902 G4double SVareaWidth = (numberOfColumns * (SVwidth + bridgingWidth)) - 1.*bridgingWidth;
0903 G4double SVareaLength = numberOfRows*(SVwidth + pitch) - 1.*pitch;
0904 G4double bufferWidth = 100.*micrometer;
0905 G4double detectorWidth = SVareaWidth + bufferWidth;
0906 G4double detectorLength = SVareaLength + bufferWidth;
0907
0908
0909 G4Box* detectorBox = new G4Box("detectorBox", detectorWidth/2., detectorHeight/2., detectorLength/2.);
0910 G4LogicalVolume* logicalDetectorReg = new G4LogicalVolume(detectorBox, materialOfMotherVolume, "detectorReg_log", 0,0,0);
0911 new G4PVPlacement(rotMatW, G4ThreeVector(0,0,0), logicalDetectorReg, "detectorRegPhys", logical_motherVolumeForDetector , false, 0, true);
0912
0913 logicalDetectorReg -> SetVisAttributes(wireFrameWhiteAtt);
0914
0915
0916 G4Box* basSiBox = new G4Box("baseSiBox", detectorWidth/2., baseSiThickness/2., detectorLength/2.);
0917 G4LogicalVolume* logicalbaseSi = new G4LogicalVolume(basSiBox, silicon, "baseSi_log", 0,0,0);
0918 new G4PVPlacement(0, G4ThreeVector(0,(-detectorHeight/2. + baseSiThickness/2.),0), logicalbaseSi, "baseSiPhys", logicalDetectorReg, false, 0, true);
0919
0920 logicalbaseSi -> SetVisAttributes(wireFramePinkAtt);
0921
0922
0923 G4Box* SiOBox = new G4Box("SiOBox", detectorWidth/2., insulationThickness/2., detectorLength/2.);
0924 G4LogicalVolume* logicalSoI = new G4LogicalVolume(SiOBox, SiO2, "SoI_log", 0,0,0);
0925 new G4PVPlacement(0, G4ThreeVector(0,(detectorHeight/2. -overLayerThickness - SVheight - insulationThickness/2.),0), logicalSoI, "SoIPhys", logicalDetectorReg, false, 0, true);
0926
0927 logicalSoI -> SetVisAttributes(solidGreyAtt);
0928
0929
0930
0931 G4Box* SVregBox = new G4Box("SVregBox", detectorWidth/2., SVheight/2., detectorLength/2.);
0932 G4LogicalVolume* logicalSVreg = new G4LogicalVolume(SVregBox, materialOfMotherVolume, "SVreg_log", 0,0,0);
0933 new G4PVPlacement(0, G4ThreeVector(0,(detectorHeight/2. - overLayerThickness - SVheight/2.),0), logicalSVreg, "SVregPhys", logicalDetectorReg, false, 0, true);
0934
0935 logicalSVreg -> SetVisAttributes(wireFrameWhiteAtt);
0936
0937
0938
0939
0940 G4Box* bridgeVolBox = new G4Box("bridgeVolBox", bridgingWidth/2., bridingHeight/2., bridgingLength/2.);
0941 G4LogicalVolume* logicalBridgeVol = new G4LogicalVolume(bridgeVolBox, silicon, "bridgeVol_log", 0,0,0);
0942
0943 logicalBridgeVol -> SetVisAttributes(solidRedAtt);
0944
0945
0946 G4Box* SiObotLayerBox = new G4Box("SiObotLayerBox", SVwidth/2., SiOoverlayerBottomThickness/2., SVwidth/2.);
0947 G4LogicalVolume* logicalSiObotLayer = new G4LogicalVolume(SiObotLayerBox, SiO2, "logicalSiObotLayer", 0,0,0);
0948
0949 logicalSiObotLayer -> SetVisAttributes(solidGreenAtt);
0950
0951
0952 G4Box* SiObotLayerBridgeBox = new G4Box("SiObotLayerBridgeBox", bridgingWidth/2., SiOoverlayerBottomThickness/2., bridgingLength/2.);
0953 G4LogicalVolume* logicalSiObotLayerBridge = new G4LogicalVolume(SiObotLayerBridgeBox, SiO2, "logicalSiObotLayer", 0,0,0);
0954
0955 logicalSiObotLayerBridge -> SetVisAttributes(solidGreenAtt);
0956
0957
0958 G4Box* AlContactBox = new G4Box("AlContactBox", AlOverlayerRadius, AlOverlayerThickness/2., AlOverlayerRadius);
0959 G4LogicalVolume* logicalAlContact = new G4LogicalVolume(AlContactBox, Aluminium, "logicalAlContact", 0,0,0);
0960
0961 logicalAlContact -> SetVisAttributes(solidYellowAtt);
0962
0963
0964 G4Box* SiOtopLayerBox = new G4Box("SiOtopLayerBox", SiOoverlayerTopRadius, SiOoverlayerTopThickness/2., SiOoverlayerTopRadius);
0965 G4LogicalVolume* logicalSiOtopLayer = new G4LogicalVolume(SiOtopLayerBox, SiO2, "logicalSiOtopLayer", 0,0,0);
0966
0967 logicalSiOtopLayer -> SetVisAttributes(solidBlueAtt);
0968
0969
0970 G4Box* sensitiveBridgeVolume = new G4Box("water_region_sphere", SVwidth/2., SVheight/2., SVwidth/2.);
0971 G4LogicalVolume* SV_log = new G4LogicalVolume(sensitiveBridgeVolume, silicon, "SV_log", 0,0,0);
0972
0973 SV_log -> SetVisAttributes(solidYellowAtt);
0974
0975
0976
0977 G4bool checkSVoverlap = false;
0978
0979
0980 G4int globalCount = 100000;
0981
0982 for (G4double j = -SVareaLength/2.; j <= SVareaLength/2.; j+=2.*(SVwidth + bridgingWidth))
0983 {
0984 for (G4double i = -SVareaWidth/2.; i <= SVareaWidth/2.; i+=(SVwidth + bridgingWidth))
0985 {
0986
0987 new G4PVPlacement(0, G4ThreeVector(i,0,j), SV_log , "physSensitiveBridgeVolume", logicalSVreg, false, globalCount, checkSVoverlap);
0988
0989 new G4PVPlacement(0, G4ThreeVector(i,((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness/2.)),j), logicalSiObotLayer, "physSiObotLayer", logicalDetectorReg, false, globalCount, checkSVoverlap);
0990
0991 new G4PVPlacement(0, G4ThreeVector(i,((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness + SiOoverlayerTopThickness/2.)),j), logicalSiOtopLayer, "physSiOtopLayer", logicalDetectorReg, false, globalCount, checkSVoverlap);
0992
0993 globalCount++;
0994 }
0995 }
0996
0997
0998 globalCount = 200000;
0999
1000 for (G4double j = (-SVareaLength/2. + SVwidth + bridgingWidth); j <= SVareaLength/2.; j+=2.*(SVwidth + bridgingWidth))
1001 {
1002 for (G4double i = -SVareaWidth/2.; i <= SVareaWidth/2.; i+=(SVwidth + bridgingWidth))
1003 {
1004
1005
1006 new G4PVPlacement(0, G4ThreeVector(i,0,j), SV_log , "physSensitiveBridgeVolume", logicalSVreg, false, globalCount, checkSVoverlap);
1007
1008 new G4PVPlacement(0, G4ThreeVector(i,((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness/2.)),j), logicalSiObotLayer, "physSiObotLayer", logicalDetectorReg, false, globalCount, checkSVoverlap);
1009
1010 new G4PVPlacement(0, G4ThreeVector(i,((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness + SiOoverlayerTopThickness/2.)),j), logicalSiOtopLayer, "physSiOtopLayer", logicalDetectorReg, false, globalCount, checkSVoverlap);
1011
1012 globalCount++;
1013 }
1014 }
1015
1016
1017 globalCount = 300000;
1018
1019 for (G4double j = -SVareaLength/2.; j < SVareaLength/2.; j+=2.*(SVwidth + bridgingWidth))
1020 {
1021 for (G4double i = -SVareaWidth/2.; i < SVareaWidth/2.; i+=(SVwidth + bridgingWidth))
1022 {
1023 if ( (i + (SVwidth + bridgingWidth)) < SVareaWidth/2.)
1024 {
1025
1026 new G4PVPlacement(0, G4ThreeVector((i + SVwidth/2. + bridgingWidth/2.),0,(j+ bridgingLength/2.)), logicalBridgeVol , "sen_bridge", logicalSVreg, false, globalCount, checkSVoverlap);
1027
1028 new G4PVPlacement(0, G4ThreeVector((i + SVwidth/2. + bridgingWidth/2.),((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness/2.)),(j+ bridgingLength/2.)), logicalSiObotLayerBridge, "physSiObotLayerBridge", logicalDetectorReg, false, globalCount, checkSVoverlap);
1029
1030
1031
1032 globalCount++;
1033 }
1034 }
1035 }
1036
1037
1038 globalCount = 400000;
1039
1040 for (G4double j = (-SVareaLength/2. + SVwidth + bridgingWidth); j < SVareaLength/2.; j+=2.*(SVwidth + bridgingWidth))
1041 {
1042 for (G4double i = -SVareaWidth/2.; i < SVareaWidth/2.; i+=(SVwidth + bridgingWidth))
1043 {
1044
1045 if ( (i+ (SVwidth + bridgingWidth)) < SVareaWidth/2.)
1046 {
1047
1048 new G4PVPlacement(0, G4ThreeVector((i + SVwidth/2. + bridgingWidth/2.),0,(j+ bridgingLength/2.)), logicalBridgeVol , "sen_bridge", logicalSVreg, false, globalCount, checkSVoverlap);
1049
1050
1051
1052 new G4PVPlacement(0, G4ThreeVector((i + SVwidth/2. + bridgingWidth/2.),((detectorHeight/2. -overLayerThickness + SiOoverlayerBottomThickness/2.)),(j+ bridgingLength/2.)), logicalSiObotLayerBridge, "physSiObotLayerBridge", logicalDetectorReg, false, globalCount, checkSVoverlap);
1053
1054 globalCount++;
1055 }
1056
1057 }
1058 }
1059
1060
1061 new G4PVPlacement(0, G4ThreeVector(0,0,0), logicalAlContact, "physAlContact", logicalSiObotLayer, false, 0, 1);
1062 }
1063
1064
1065 void DetectorConstruction::ConstructSiC()
1066 {
1067
1068
1069 G4double A = 12.01 * g/mole;
1070 G4double Z = 6;
1071 G4double A_Si=28.086*g/mole;
1072 G4double Z_Si=14;
1073 G4double density_SiC=3.22*g/cm3;
1074 G4Element *Si=new G4Element("Silicum","Si",Z_Si,A_Si);
1075 G4Element *C=new G4Element("Carbon","C",Z,A);
1076 G4Material *SiC=new G4Material("SiC", density_SiC,2);
1077 SiC->AddElement(Si,1);
1078 SiC->AddElement(C,1);
1079
1080
1081
1082
1083
1084 detectorSizeWidth=0.1*mm;
1085 detectorSizeThickness=22*um;
1086
1087 G4double substrate_thickness=370*um;
1088
1089 G4double SV_x = detectorSizeWidth/2;
1090 G4double SV_y = detectorSizeWidth/2;
1091 G4double SV_z = detectorSizeThickness/2;
1092
1093 G4Box* SV_box = new G4Box("SV_box",SV_x,SV_y,SV_z);
1094
1095 G4LogicalVolume* logical_SV = new G4LogicalVolume(SV_box, SiC, "SV_log", 0,0,0);
1096
1097 new G4PVPlacement(0, G4ThreeVector(0*mm,0*mm,-SV_z), logical_SV,"SV_phys1",
1098 logical_motherVolumeForDetector,false, 0, true);
1099
1100
1101 G4Box* Substrate_box = new G4Box("Substrate_box",SV_x,SV_y,substrate_thickness/2);
1102
1103
1104 G4LogicalVolume* logical_substrate = new G4LogicalVolume(Substrate_box, SiC, "substrate_log", 0,0,0);
1105
1106 new G4PVPlacement(0, G4ThreeVector(0,0,-2*SV_z-substrate_thickness/2), logical_substrate,"substrate_phys",
1107 logical_motherVolumeForDetector,
1108 false, 0, true);
1109
1110
1111
1112
1113 G4VisAttributes vis_SV(G4Colour(198, 226, 255));
1114 vis_SV.SetForceSolid(true);
1115 logical_SV -> SetVisAttributes(vis_SV);
1116 }
1117
1118
1119
1120 void DetectorConstruction::ConstructSDandField()
1121 {
1122 SensitiveDetector* SD = new SensitiveDetector("SD", "DetectorHitsCollection", true, analysis);
1123 G4SDManager::GetSDMpointer()->AddNewDetector(SD);
1124 SetSensitiveDetector("SV_log", SD);
1125
1126 if (detectorType == "SiliconBridge")
1127 {
1128 SetSensitiveDetector("bridgeVol_log", SD);
1129 }
1130 else if (detectorType == "DiamondTelescope")
1131 {
1132 SensitiveDetector* SDs2 = new SensitiveDetector("SDs2", "DetectorStage2HitsCollection", false, analysis);
1133 G4SDManager::GetSDMpointer()->AddNewDetector(SDs2);
1134 SetSensitiveDetector("SV_Estage_log", SDs2);
1135 }
1136 }