File indexing completed on 2025-01-31 09:22:22
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 #include "HGCalTBMaterials.hh"
0027 #include "G4Box.hh"
0028 #include "G4Colour.hh"
0029 #include "G4Element.hh"
0030 #include "G4LogicalVolume.hh"
0031 #include "G4Material.hh"
0032 #include "G4NistManager.hh"
0033 #include "G4PVPlacement.hh"
0034 #include "G4RotationMatrix.hh"
0035 #include "G4SubtractionSolid.hh"
0036 #include "G4ThreeVector.hh"
0037 #include "G4Tubs.hh"
0038 #include "G4VisAttributes.hh"
0039
0040
0041
0042 G4SubtractionSolid *HexagonSolid(G4String aName, G4double aCellThickness,
0043 G4double aCellSideLength) {
0044 G4double fullCcellX = (2.) * aCellSideLength;
0045 G4double fullCellY = std::sqrt(3.) * aCellSideLength;
0046 G4Box *solidFullcell = new G4Box(aName,
0047 0.5 * fullCcellX, 0.5 * fullCellY,
0048 0.5 * aCellThickness);
0049
0050 G4double deltaXDash = aCellSideLength;
0051 G4double deltaYDash = std::sqrt(3) / 4 * aCellSideLength;
0052
0053 G4Box *solidCutcell = new G4Box(aName,
0054 0.5 * deltaXDash, 0.5 * (deltaYDash),
0055 1. * aCellThickness);
0056
0057 G4double deltaTheta[4] = {30. * CLHEP::deg, 150. * CLHEP::deg, 210. * CLHEP::deg, 330. * CLHEP::deg};
0058 G4double deltaThetaRot[4] = {60. * CLHEP::deg, 120. * CLHEP::deg, 240 * CLHEP::deg, 300 * CLHEP::deg};
0059 G4double delta = std::sqrt(3) / 2 * aCellSideLength + deltaYDash / 2;
0060
0061 G4RotationMatrix *rot = new G4RotationMatrix;
0062 rot->rotateZ(deltaThetaRot[0]);
0063 std::vector<G4SubtractionSolid *> subtracted;
0064 subtracted.push_back(
0065 new G4SubtractionSolid("cellSubtracted", solidFullcell, solidCutcell, rot,
0066 G4ThreeVector(std::cos(deltaTheta[0]) * delta,
0067 std::sin(deltaTheta[0]) * delta, 0.)));
0068
0069 for (int i = 1; i < 4; i++) {
0070 rot->rotateZ(-deltaThetaRot[i - 1]);
0071 rot->rotateZ(deltaThetaRot[i]);
0072 subtracted.push_back(new G4SubtractionSolid(
0073 "cellSubtracted", subtracted[i - 1], solidCutcell, rot,
0074 G4ThreeVector(std::cos(deltaTheta[i]) * delta, std::sin(deltaTheta[i]) * delta,
0075 0.)));
0076 }
0077 delete rot;
0078
0079 return subtracted[3];
0080 }
0081
0082
0083
0084 G4LogicalVolume *HexagonLogical(G4String aName, G4double aCellThickness,
0085 G4double aCellSideLength,
0086 G4Material *aMaterial) {
0087 return new G4LogicalVolume(
0088 HexagonSolid(aName, aCellThickness, aCellSideLength),
0089 aMaterial,
0090 aName);
0091 }
0092
0093
0094
0095 void HGCalTBMaterials::DefineMaterials() {
0096
0097
0098 G4NistManager *nist = G4NistManager::Instance();
0099 fMatVacuum = nist->FindOrBuildMaterial("G4_Galactic");
0100 fMatAIR = nist->FindOrBuildMaterial("G4_AIR");
0101 fMatAr = nist->FindOrBuildMaterial("G4_Ar");
0102 fMatAl = nist->FindOrBuildMaterial("G4_Al");
0103 fMatFe = nist->FindOrBuildMaterial("G4_Fe");
0104 fMatGlass = nist->FindOrBuildMaterial("G4_GLASS_PLATE");
0105 fMatPb = nist->FindOrBuildMaterial("G4_Pb");
0106 fMatCu = nist->FindOrBuildMaterial("G4_Cu");
0107 fMatW = nist->FindOrBuildMaterial("G4_W");
0108 fMatSi = nist->FindOrBuildMaterial("G4_Si");
0109 fMatAu = nist->FindOrBuildMaterial("G4_Au");
0110 fMatQuartz = nist->FindOrBuildMaterial("G4_SILICON_DIOXIDE");
0111 fMatC = nist->FindOrBuildMaterial("G4_C");
0112 fMatH = nist->FindOrBuildMaterial("G4_H");
0113 fMatO = nist->FindOrBuildMaterial("G4_O");
0114 fMatMn = nist->FindOrBuildMaterial("G4_Mn");
0115 fMatCr = nist->FindOrBuildMaterial("G4_Cr");
0116 fMatNi = nist->FindOrBuildMaterial("G4_Ni");
0117 fMatPolyethylene = nist->FindOrBuildMaterial("G4_POLYETHYLENE");
0118 fMatCl = nist->FindOrBuildMaterial("G4_Cl");
0119 fMatF = nist->FindOrBuildMaterial("G4_F");
0120
0121
0122 G4double a = 1.01 * CLHEP::g / CLHEP::mole;
0123 G4Element *elH = new G4Element("Hydrogen", "H2", 1., a);
0124 a = 12.01 * CLHEP::g / CLHEP::mole;
0125 G4Element *elC = new G4Element("Carbon", "C", 6., a);
0126 G4double density = 1.032 * CLHEP::g / CLHEP::cm3;
0127 fMatPolystyrene = new G4Material("Polystyrene", density, 2);
0128 fMatPolystyrene->AddElement(elC, 19);
0129 fMatPolystyrene->AddElement(elH, 21);
0130
0131
0132 G4double CuFracInCuW = 0.75;
0133 fMatCuW = new G4Material("CuW", 14.979 * CLHEP::g / CLHEP::cm3, 2);
0134 fMatCuW->AddMaterial(fMatCu, CuFracInCuW);
0135 fMatCuW->AddMaterial(fMatW, 1 - CuFracInCuW);
0136
0137
0138 fMatPCB = new G4Material("PCB", 1.7 * CLHEP::g / CLHEP::cm3, 4);
0139 fMatPCB->AddMaterial(fMatC, 0.13232243);
0140 fMatPCB->AddMaterial(fMatH, 0.032572448);
0141 fMatPCB->AddMaterial(fMatO, 0.48316123);
0142 fMatPCB->AddMaterial(fMatSi, 0.35194389);
0143
0144
0145 fMatKAPTON = new G4Material("Kapton", 1.11 * CLHEP::g / CLHEP::cm3, 3);
0146 fMatKAPTON->AddMaterial(fMatC, 0.59985105);
0147 fMatKAPTON->AddMaterial(fMatH, 0.080541353);
0148 fMatKAPTON->AddMaterial(fMatO, 0.31960759);
0149
0150
0151 fMatSteel = new G4Material("StainlessSteel", 8.02 * CLHEP::g / CLHEP::cm3, 5);
0152 fMatSteel->AddMaterial(fMatFe, 0.6996);
0153 fMatSteel->AddMaterial(fMatC, 0.0004);
0154 fMatSteel->AddMaterial(fMatMn, 0.01);
0155 fMatSteel->AddMaterial(fMatCr, 0.19);
0156 fMatSteel->AddMaterial(fMatNi, 0.1);
0157
0158
0159 fMatScintillator = new G4Material("Scintillator", 1.032 * CLHEP::g / CLHEP::cm3, 2);
0160 fMatScintillator->AddMaterial(fMatC, 0.91512109);
0161 fMatScintillator->AddMaterial(fMatH, 0.084878906);
0162
0163
0164 fMatArCO2 = new G4Material("ArCO2", 1.729 * CLHEP::mg / CLHEP::cm3, 3);
0165 fMatArCO2->AddMaterial(fMatAr, 0.475815);
0166 fMatArCO2->AddMaterial(fMatC, 0.14306133);
0167 fMatArCO2->AddMaterial(fMatO, 0.38112367);
0168
0169 fMatFreon = new G4Material("Freon-12", 4.93 * CLHEP::mg / CLHEP::cm3, 3);
0170 fMatFreon->AddMaterial(fMatC, 0.099340816);
0171 fMatFreon->AddMaterial(fMatCl, 0.58640112);
0172 fMatFreon->AddMaterial(fMatF, 0.31425807);
0173 }
0174
0175
0176
0177 void HGCalTBMaterials::SetEventDisplayColorScheme() {
0178 G4VisAttributes *visAttributes;
0179
0180 visAttributes = new G4VisAttributes(G4Colour(.0, 0.0, 0.0));
0181 visAttributes->SetVisibility(false);
0182 fSiWaferLogical->SetVisAttributes(visAttributes);
0183
0184 visAttributes = new G4VisAttributes(G4Colour(.3, 0.3, 0.3, 0.2));
0185 visAttributes->SetVisibility(true);
0186 fSiPixelLogical->SetVisAttributes(visAttributes);
0187
0188 visAttributes = new G4VisAttributes(G4Colour(0.4, 0.4, 0.4, 0.01));
0189 visAttributes->SetVisibility(false);
0190 fCuWbaseplateLogical->SetVisAttributes(visAttributes);
0191 fCuWbaseplate550umLogical->SetVisAttributes(visAttributes);
0192 fCuWbaseplate610umLogical->SetVisAttributes(visAttributes);
0193 fCuWbaseplate710umLogical->SetVisAttributes(visAttributes);
0194 fCuBaseplateLogical->SetVisAttributes(visAttributes);
0195 fCuBaseplate25umLogical->SetVisAttributes(visAttributes);
0196 fCuBaseplate175umLogical->SetVisAttributes(visAttributes);
0197 fPCBbaseplateLogical->SetVisAttributes(visAttributes);
0198 fPCBbaseplateThinLogical->SetVisAttributes(visAttributes);
0199 fKaptonLayerLogical->SetVisAttributes(visAttributes);
0200 fAlCaseLogical->SetVisAttributes(visAttributes);
0201 fAlCaseThickLogical->SetVisAttributes(visAttributes);
0202 fSteelCaseLogical->SetVisAttributes(visAttributes);
0203 fSteelCaseThickLogical->SetVisAttributes(visAttributes);
0204 fPbAbsorberEElogical->SetVisAttributes(visAttributes);
0205 fFeAbsorberEElogical->SetVisAttributes(visAttributes);
0206 fCuAbsorberEElogical->SetVisAttributes(visAttributes);
0207 fWabsorberEElogical->SetVisAttributes(visAttributes);
0208 fW2mmAbsorberEEDESY2018Logical->SetVisAttributes(visAttributes);
0209 fW4mmAbsorberEEDESY2018Logical->SetVisAttributes(visAttributes);
0210 fCuAbsorberFHlogical->SetVisAttributes(visAttributes);
0211 fFeAbsorberFHlogical->SetVisAttributes(visAttributes);
0212 fAHCALSiPMlogical->SetVisAttributes(visAttributes);
0213 fAHCALSiPM2x2HUBlogical->SetVisAttributes(visAttributes);
0214 fAlAbsorberAHCALlogical->SetVisAttributes(visAttributes);
0215 fPCBAHCALlogical->SetVisAttributes(visAttributes);
0216 fFeAbsorberAHCALlogical->SetVisAttributes(visAttributes);
0217 fScintillatorLogical->SetVisAttributes(visAttributes);
0218 fScintillatorThinLogical->SetVisAttributes(visAttributes);
0219 fMCPlogical->SetVisAttributes(visAttributes);
0220 fCK3logical->SetVisAttributes(visAttributes);
0221 fDWClogical->SetVisAttributes(visAttributes);
0222 fDWCgasLogical->SetVisAttributes(visAttributes);
0223 fAlChipLogical->SetVisAttributes(visAttributes);
0224 }
0225
0226
0227
0228 HGCalTBMaterials::HGCalTBMaterials() {
0229 DefineMaterials();
0230 DefineSiWaferAndCells();
0231 DefineHGCalBaseplates();
0232 DefineHGCalCases();
0233 DefineHGCalEEAbsorbers();
0234 DefineHGCalFHAbsorbers();
0235 DefineAHCALSiPM();
0236 DefineAHCALAbsorbers();
0237 DefineBeamLineElements();
0238 }
0239
0240
0241
0242 void HGCalTBMaterials::DefineSiWaferAndCells() {
0243
0244
0245 fSiPixelSideLength = 0.6496345 * CLHEP::cm;
0246 fSiWaferThickness = 0.3 * CLHEP::mm;
0247 fAlpha = 60. / 180. * CLHEP::pi;
0248 fSiWaferSideLength = 11 * fSiPixelSideLength;
0249
0250 fSiWaferLogical = HexagonLogical("Si_wafer", fSiWaferThickness,
0251 fSiWaferSideLength, fMatAIR);
0252
0253
0254 double dx = 2 * std::sin(fAlpha) * fSiPixelSideLength;
0255 double dy = fSiPixelSideLength * (2. + 2 * std::cos(fAlpha));
0256 fSiPixelLogical =
0257 HexagonLogical("SiCell", fSiWaferThickness, fSiPixelSideLength, fMatSi);
0258
0259 int index = 1;
0260 int nRows[11] = {7, 6, 7, 6, 5, 6, 5, 4, 5, 4, 3};
0261 for (int nC = 0; nC < 11; nC++) {
0262 for (int middle_index = 0; middle_index < nRows[nC]; middle_index++) {
0263 new G4PVPlacement(
0264 0,
0265 G4ThreeVector(dy * (middle_index - nRows[nC] / 2. + 0.5), nC * dx / 2,
0266 0.),
0267 fSiPixelLogical, "SiCell", fSiWaferLogical, false, index++, true);
0268 if (nC <= 0)
0269 continue;
0270 new G4PVPlacement(
0271 0,
0272 G4ThreeVector(dy * (middle_index - nRows[nC] / 2. + 0.5),
0273 -nC * dx / 2, 0.),
0274 fSiPixelLogical, "SiCell", fSiWaferLogical, false, index++, true);
0275 }
0276 }
0277
0278 fThicknessMap["Si_wafer"] = fSiWaferThickness;
0279 fLogicalVolumeMap["Si_wafer"] = fSiWaferLogical;
0280 }
0281
0282
0283
0284 void HGCalTBMaterials::DefineHGCalBaseplates() {
0285
0286
0287 G4double CuWbaseplateThickness = 1.2 * CLHEP::mm;
0288 G4double CuWbaseplatesideLength = 11 * fSiPixelSideLength;
0289 fCuWbaseplateLogical = HexagonLogical("CuW_baseplate", CuWbaseplateThickness,
0290 CuWbaseplatesideLength, fMatCuW);
0291 fThicknessMap["CuW_baseplate"] = CuWbaseplateThickness;
0292 fLogicalVolumeMap["CuW_baseplate"] = fCuWbaseplateLogical;
0293 G4double CuWbaseplate550umthickness = 0.55 * CLHEP::mm;
0294 fCuWbaseplate550umLogical =
0295 HexagonLogical("CuW_baseplate_550um", CuWbaseplate550umthickness,
0296 CuWbaseplatesideLength, fMatCuW);
0297 fThicknessMap["CuW_baseplate_550um"] = CuWbaseplate550umthickness;
0298 fLogicalVolumeMap["CuW_baseplate_550um"] = fCuWbaseplate550umLogical;
0299 G4double CuWbaseplate610umThickness = 0.61 * CLHEP::mm;
0300 fCuWbaseplate610umLogical =
0301 HexagonLogical("CuW_baseplate_610um", CuWbaseplate610umThickness,
0302 CuWbaseplatesideLength, fMatCuW);
0303 fThicknessMap["CuW_baseplate_610um"] = CuWbaseplate610umThickness;
0304 fLogicalVolumeMap["CuW_baseplate_610um"] = fCuWbaseplate610umLogical;
0305 G4double CuWbaseplate710umThickness = 0.71 * CLHEP::mm;
0306 fCuWbaseplate710umLogical =
0307 HexagonLogical("CuW_baseplate_710um", CuWbaseplate710umThickness,
0308 CuWbaseplatesideLength, fMatCuW);
0309 fThicknessMap["CuW_baseplate_710um"] = CuWbaseplate710umThickness;
0310 fLogicalVolumeMap["CuW_baseplate_710um"] = fCuWbaseplate710umLogical;
0311
0312
0313 G4double CuBaseplateThickness = 1.2 * CLHEP::mm;
0314 G4double CuBaseplatesideLength = 11 * fSiPixelSideLength;
0315 fCuBaseplateLogical = HexagonLogical("Cu_baseplate", CuBaseplateThickness,
0316 CuBaseplatesideLength, fMatCu);
0317 fThicknessMap["Cu_baseplate"] = CuBaseplateThickness;
0318 fLogicalVolumeMap["Cu_baseplate"] = fCuBaseplateLogical;
0319 G4double CuBaseplate25umThickness = 0.025 * CLHEP::mm;
0320 fCuBaseplate25umLogical =
0321 HexagonLogical("Cu_baseplate_25um", CuBaseplate25umThickness,
0322 CuBaseplatesideLength, fMatCu);
0323 fThicknessMap["Cu_baseplate_25um"] = CuBaseplate25umThickness;
0324 fLogicalVolumeMap["Cu_baseplate_25um"] = fCuBaseplate25umLogical;
0325 G4double CuBaseplate175umThickness = 0.175 * CLHEP::mm;
0326 fCuBaseplate175umLogical =
0327 HexagonLogical("Cu_baseplate_175um", CuBaseplate175umThickness,
0328 CuBaseplatesideLength, fMatCu);
0329 fThicknessMap["Cu_baseplate_175um"] = CuBaseplate175umThickness;
0330 fLogicalVolumeMap["Cu_baseplate_175um"] = fCuBaseplate175umLogical;
0331
0332
0333 G4double PCBbaseplateThickness = 1.3 * CLHEP::mm;
0334 G4double PCBbaseplateSideLength = 11 * fSiPixelSideLength;
0335 fPCBbaseplateLogical = HexagonLogical("PCB", PCBbaseplateThickness,
0336 PCBbaseplateSideLength, fMatPCB);
0337 fThicknessMap["PCB"] = PCBbaseplateThickness;
0338 fLogicalVolumeMap["PCB"] = fPCBbaseplateLogical;
0339
0340 G4double PCBbaseplateThinThickness = 1.2 * CLHEP::mm;
0341 fPCBbaseplateThinLogical = HexagonLogical(
0342 "PCB_thin", PCBbaseplateThinThickness, PCBbaseplateSideLength, fMatPCB);
0343 fThicknessMap["PCB_thin"] = PCBbaseplateThinThickness;
0344 fLogicalVolumeMap["PCB_thin"] = fPCBbaseplateThinLogical;
0345
0346
0347 G4double KaptonLayerThickness = 0.075 * CLHEP::mm;
0348 G4double KaptonLayerSideLength = 11 * fSiPixelSideLength;
0349 fKaptonLayerLogical = HexagonLogical("Kapton_layer", KaptonLayerThickness,
0350 KaptonLayerSideLength, fMatKAPTON);
0351 fThicknessMap["Kapton_layer"] = KaptonLayerThickness;
0352 fLogicalVolumeMap["Kapton_layer"] = fKaptonLayerLogical;
0353 }
0354
0355
0356
0357 void HGCalTBMaterials::DefineHGCalCases() {
0358 G4double AlCaseThickness = 2.1 * CLHEP::mm;
0359 G4double AlCaseXY = 40 * CLHEP::cm;
0360 G4Box *AlCaseSolid = new G4Box("Al_case", 0.5 * AlCaseXY, 0.5 * AlCaseXY,
0361 0.5 * AlCaseThickness);
0362 fAlCaseLogical = new G4LogicalVolume(AlCaseSolid, fMatAl, "Al_case");
0363 fThicknessMap["Al_case"] = AlCaseThickness;
0364 fLogicalVolumeMap["Al_case"] = fAlCaseLogical;
0365
0366 G4double AlCaseThickThickness = 5 * CLHEP::mm;
0367 G4Box *AlCaseThickSolid =
0368 new G4Box("Al_case_thick", 0.5 * AlCaseXY, 0.5 * AlCaseXY,
0369 0.5 * AlCaseThickThickness);
0370 fAlCaseThickLogical =
0371 new G4LogicalVolume(AlCaseThickSolid, fMatAl, "Al_case_thick");
0372 fThicknessMap["Al_case_thick"] = AlCaseThickThickness;
0373 fLogicalVolumeMap["Al_case_thick"] = fAlCaseThickLogical;
0374
0375 G4double SteelCaseThickness = 9 * CLHEP::mm;
0376 G4double SteelCaseXY = 60 * CLHEP::cm;
0377 G4Box *SteelCaseSolid =
0378 new G4Box("Steel_case", 0.5 * SteelCaseXY, 0.5 * SteelCaseXY,
0379 0.5 * SteelCaseThickness);
0380 fSteelCaseLogical = new G4LogicalVolume(SteelCaseSolid, fMatFe, "Steel_case");
0381 fThicknessMap["Steel_case"] = SteelCaseThickness;
0382 fLogicalVolumeMap["Steel_case"] = fSteelCaseLogical;
0383
0384 G4double SteelCaseThickThickness = 40 * CLHEP::mm;
0385 G4Box *SteelCaseThickSolid =
0386 new G4Box("Steel_case_thick", 0.5 * SteelCaseXY, 0.5 * SteelCaseXY,
0387 0.5 * SteelCaseThickThickness);
0388 fSteelCaseThickLogical =
0389 new G4LogicalVolume(SteelCaseThickSolid, fMatFe, "Steel_case_thick");
0390 fThicknessMap["Steel_case_thick"] = SteelCaseThickThickness;
0391 fLogicalVolumeMap["Steel_case_thick"] = fSteelCaseThickLogical;
0392 }
0393
0394
0395
0396 void HGCalTBMaterials::DefineHGCalEEAbsorbers() {
0397
0398 G4double PbAbsorberEEthickness = 4.9 * CLHEP::mm;
0399 G4double PbAbsorberEExy = 30 * CLHEP::cm;
0400 G4Box *PbAbsorberEEsolid =
0401 new G4Box("Pb_absorber_EE", 0.5 * PbAbsorberEExy, 0.5 * PbAbsorberEExy,
0402 0.5 * PbAbsorberEEthickness);
0403 fPbAbsorberEElogical =
0404 new G4LogicalVolume(PbAbsorberEEsolid, fMatPb, "Pb_absorber_EE");
0405 fThicknessMap["Pb_absorber_EE"] = PbAbsorberEEthickness;
0406 fLogicalVolumeMap["Pb_absorber_EE"] = fPbAbsorberEElogical;
0407
0408 G4double FeAbsorberEEthickness = 0.3 * CLHEP::mm;
0409 G4double FeAbsorberEExy = 30 * CLHEP::cm;
0410 G4Box *FeAbsorberEEsolid =
0411 new G4Box("Fe_absorber_EE", 0.5 * FeAbsorberEExy, 0.5 * FeAbsorberEExy,
0412 0.5 * FeAbsorberEEthickness);
0413 fFeAbsorberEElogical =
0414 new G4LogicalVolume(FeAbsorberEEsolid, fMatFe, "Fe_absorber_EE");
0415 fThicknessMap["Fe_absorber_EE"] = FeAbsorberEEthickness;
0416 fLogicalVolumeMap["Fe_absorber_EE"] = fFeAbsorberEElogical;
0417
0418 G4double CuAbsorberEEthickness = 6 * CLHEP::mm;
0419 G4double CuAbsorberEExy = 30 * CLHEP::cm;
0420 G4Box *CuAbsorberEEsolid =
0421 new G4Box("Cu_absorber_EE", 0.5 * CuAbsorberEExy, 0.5 * CuAbsorberEExy,
0422 0.5 * CuAbsorberEEthickness);
0423 fCuAbsorberEElogical =
0424 new G4LogicalVolume(CuAbsorberEEsolid, fMatCu, "Cu_absorber_EE");
0425 fThicknessMap["Cu_absorber_EE"] = CuAbsorberEEthickness;
0426 fLogicalVolumeMap["Cu_absorber_EE"] = fCuAbsorberEElogical;
0427
0428 G4double WabsorberEEthickness = 2.8 * CLHEP::mm;
0429 G4double WabsorberEExy = 30 * CLHEP::cm;
0430 G4Box *WabsorberEEsolid =
0431 new G4Box("W_absorber_EE", 0.5 * WabsorberEExy, 0.5 * WabsorberEExy,
0432 0.5 * WabsorberEEthickness);
0433 fWabsorberEElogical =
0434 new G4LogicalVolume(WabsorberEEsolid, fMatW, "W_absorber_EE");
0435 fThicknessMap["W_absorber_EE"] = WabsorberEEthickness;
0436 fLogicalVolumeMap["W_absorber_EE"] = fWabsorberEElogical;
0437
0438 G4double W2mmAbsorberEEDESY2018thickness = 2. * CLHEP::mm;
0439 G4double W2mmAbsorberEEDESY2018xy = 15 * CLHEP::cm;
0440 G4Box *W2mmAbsorberEEDESY2018solid = new G4Box(
0441 "W_2mm_absorber_EE_DESY2018", 0.5 * W2mmAbsorberEEDESY2018xy,
0442 0.5 * W2mmAbsorberEEDESY2018xy, 0.5 * W2mmAbsorberEEDESY2018thickness);
0443 fW2mmAbsorberEEDESY2018Logical = new G4LogicalVolume(
0444 W2mmAbsorberEEDESY2018solid, fMatW, "W_2mm_absorber_EE_DESY2018");
0445 fThicknessMap["W_2mm_absorber_EE_DESY2018"] = W2mmAbsorberEEDESY2018thickness;
0446 fLogicalVolumeMap["W_2mm_absorber_EE_DESY2018"] =
0447 fW2mmAbsorberEEDESY2018Logical;
0448
0449 G4double W4mmAbsorberEEDESY2018thickness = 4. * CLHEP::mm;
0450 G4double W4mmAbsorberEEDESY2018xy = 15 * CLHEP::cm;
0451 G4Box *W4mmAbsorberEEDESY2018solid = new G4Box(
0452 "W_4mm_absorber_EE_DESY2018", 0.5 * W4mmAbsorberEEDESY2018xy,
0453 0.5 * W4mmAbsorberEEDESY2018xy, 0.5 * W4mmAbsorberEEDESY2018thickness);
0454 fW4mmAbsorberEEDESY2018Logical = new G4LogicalVolume(
0455 W4mmAbsorberEEDESY2018solid, fMatW, "W_4mm_absorber_EE_DESY2018");
0456 fThicknessMap["W_4mm_absorber_EE_DESY2018"] = W4mmAbsorberEEDESY2018thickness;
0457 fLogicalVolumeMap["W_4mm_absorber_EE_DESY2018"] =
0458 fW4mmAbsorberEEDESY2018Logical;
0459 }
0460
0461
0462
0463 void HGCalTBMaterials::DefineHGCalFHAbsorbers() {
0464
0465 G4double CuAbsorberFHthickness = 6 * CLHEP::mm;
0466 G4double CuAbsorberFHxy = 50 * CLHEP::cm;
0467 G4Box *CuAbsorberFHsolid =
0468 new G4Box("Cu_absorber_FH", 0.5 * CuAbsorberFHxy, 0.5 * CuAbsorberFHxy,
0469 0.5 * CuAbsorberFHthickness);
0470 fCuAbsorberFHlogical =
0471 new G4LogicalVolume(CuAbsorberFHsolid, fMatCu, "Cu_absorber_FH");
0472 fThicknessMap["Cu_absorber_FH"] = CuAbsorberFHthickness;
0473 fLogicalVolumeMap["Cu_absorber_FH"] = fCuAbsorberFHlogical;
0474
0475 G4double FeAbsorberFHthickness = 40 * CLHEP::mm;
0476 G4double FeAbsorberFHxy = 50 * CLHEP::cm;
0477 G4Box *FeAbsorberFHsolid =
0478 new G4Box("Fe_absorber_FH", 0.5 * FeAbsorberFHxy, 0.5 * FeAbsorberFHxy,
0479 0.5 * FeAbsorberFHthickness);
0480 fFeAbsorberFHlogical =
0481 new G4LogicalVolume(FeAbsorberFHsolid, fMatFe, "Fe_absorber_FH");
0482 fThicknessMap["Fe_absorber_FH"] = FeAbsorberFHthickness;
0483 fLogicalVolumeMap["Fe_absorber_FH"] = fFeAbsorberFHlogical;
0484 }
0485
0486
0487
0488 void HGCalTBMaterials::DefineAHCALSiPM() {
0489 G4double AHCALSiPMthickness = 5.4 * CLHEP::mm;
0490 fAHCALSiPMxy = 3 * CLHEP::cm;
0491 fAHCALSiPMsolid = new G4Box("AHCAL_SiPM", 0.5 * fAHCALSiPMxy,
0492 0.5 * fAHCALSiPMxy, 0.5 * AHCALSiPMthickness);
0493 fAHCALSiPMlogical =
0494 new G4LogicalVolume(fAHCALSiPMsolid, fMatPolystyrene, "AHCAL_SiPM");
0495 fThicknessMap["AHCAL_SiPM"] = AHCALSiPMthickness;
0496 fLogicalVolumeMap["AHCAL_SiPM"] = fAHCALSiPMlogical;
0497
0498 G4double AHCALSiPM2x2HUBxy = 2 * 12 * fAHCALSiPMxy + 0.01 * CLHEP::mm;
0499 G4double AHCALSiPM2x2HUBthickness = AHCALSiPMthickness + 0.01 * CLHEP::mm;
0500 G4Box *AHCALSiPM2x2HUBsolid =
0501 new G4Box("AHCAL_SiPM_2x2HUB", 0.5 * AHCALSiPM2x2HUBxy,
0502 0.5 * AHCALSiPM2x2HUBxy, 0.5 * AHCALSiPM2x2HUBthickness);
0503 fAHCALSiPM2x2HUBlogical =
0504 new G4LogicalVolume(AHCALSiPM2x2HUBsolid, fMatAIR, "AHCAL_SiPM_2x2HUB");
0505 fThicknessMap["AHCAL_SiPM_2x2HUB"] = AHCALSiPM2x2HUBthickness;
0506 fLogicalVolumeMap["AHCAL_SiPM_2x2HUB"] = fAHCALSiPM2x2HUBlogical;
0507 int copy_counter = 0;
0508 for (float _dx = -11.5; _dx <= 11.5; _dx = _dx + 1.)
0509 for (float _dy = -11.5; _dy <= 11.5; _dy = _dy + 1.)
0510 new G4PVPlacement(
0511 0, G4ThreeVector(_dx * fAHCALSiPMxy, _dy * fAHCALSiPMxy, 0),
0512 fAHCALSiPMlogical, "AHCAL_SiPM", fAHCALSiPM2x2HUBlogical, false,
0513 copy_counter++, true);
0514 }
0515
0516
0517
0518 void HGCalTBMaterials::DefineAHCALAbsorbers() {
0519 G4double AlAbsorberAHCALthickness = 1 * CLHEP::mm;
0520 G4double AlAbsorberAHCALxy = 2 * 12 * fAHCALSiPMxy;
0521 G4Box *AlAbsorberAHCALsolid =
0522 new G4Box("Al_absorber_AHCAL", 0.5 * AlAbsorberAHCALxy,
0523 0.5 * AlAbsorberAHCALxy, 0.5 * AlAbsorberAHCALthickness);
0524 fAlAbsorberAHCALlogical =
0525 new G4LogicalVolume(AlAbsorberAHCALsolid, fMatAl, "Al_absorber_AHCAL");
0526 fThicknessMap["Al_absorber_AHCAL"] = AlAbsorberAHCALthickness;
0527 fLogicalVolumeMap["Al_absorber_AHCAL"] = fAlAbsorberAHCALlogical;
0528
0529 G4double PCBAHCALthickness = 1.2 * CLHEP::mm;
0530 G4double PCBAHCALxy = 2 * 12 * fAHCALSiPMxy;
0531 G4Box *PCBAHCALsolid = new G4Box("PCB_AHCAL", 0.5 * PCBAHCALxy,
0532 0.5 * PCBAHCALxy, 0.5 * PCBAHCALthickness);
0533 fPCBAHCALlogical = new G4LogicalVolume(PCBAHCALsolid, fMatPCB, "PCB_AHCAL");
0534 fThicknessMap["PCB_AHCAL"] = PCBAHCALthickness;
0535 fLogicalVolumeMap["PCB_AHCAL"] = fPCBAHCALlogical;
0536
0537 G4double FeAbsorberAHCALthickness = 17 * CLHEP::mm;
0538 G4double FeAbsorberAHCALx = 80.8 * CLHEP::cm;
0539 G4double FeAbsorberAHCALy = 65.7 * CLHEP::cm;
0540 G4Box *FeAbsorberAHCALsolid =
0541 new G4Box("Fe_absorber_AHCAL", 0.5 * FeAbsorberAHCALx,
0542 0.5 * FeAbsorberAHCALy, 0.5 * FeAbsorberAHCALthickness);
0543 fFeAbsorberAHCALlogical =
0544 new G4LogicalVolume(FeAbsorberAHCALsolid, fMatFe, "Fe_absorber_AHCAL");
0545 fThicknessMap["Fe_absorber_AHCAL"] = FeAbsorberAHCALthickness;
0546 fLogicalVolumeMap["Fe_absorber_AHCAL"] = fFeAbsorberAHCALlogical;
0547 }
0548
0549
0550
0551 void HGCalTBMaterials::DefineBeamLineElements() {
0552
0553
0554 G4double scintillatorThickness = 2 * 2 * CLHEP::cm;
0555 G4double scintillatorXY = 2 * 9.5 * CLHEP::cm;
0556 G4Box *scintillatorSolid =
0557 new G4Box("Scintillator", 0.5 * scintillatorXY, 0.5 * scintillatorXY,
0558 0.5 * scintillatorThickness);
0559 fScintillatorLogical =
0560 new G4LogicalVolume(scintillatorSolid, fMatScintillator, "Scintillator");
0561 fThicknessMap["Scintillator"] = scintillatorThickness;
0562 fLogicalVolumeMap["Scintillator"] = fScintillatorLogical;
0563
0564 G4double fScintillatorThinThickness = 1 * CLHEP::cm;
0565 G4Box *fScintillatorThinSolid =
0566 new G4Box("Scintillator_thin", 0.5 * scintillatorXY, 0.5 * scintillatorXY,
0567 0.5 * fScintillatorThinThickness);
0568 fScintillatorThinLogical = new G4LogicalVolume(
0569 fScintillatorThinSolid, fMatScintillator, "Scintillator_thin");
0570 fThicknessMap["Scintillator_thin"] = fScintillatorThinThickness;
0571 fLogicalVolumeMap["Scintillator_thin"] = fScintillatorThinLogical;
0572
0573
0574 G4double MCPthickness = 10 * CLHEP::mm;
0575 G4double MCPradius = 2 * CLHEP::cm;
0576 G4Tubs *MCPsolid =
0577 new G4Tubs("MCP", 0., MCPradius, MCPthickness, 0, 360 * CLHEP::degree);
0578 fMCPlogical = new G4LogicalVolume(MCPsolid, fMatQuartz, "MCP");
0579 fThicknessMap["MCP"] = MCPthickness;
0580 fLogicalVolumeMap["MCP"] = fMCPlogical;
0581
0582
0583 G4double CK3thickness = 2 * CLHEP::m;
0584 G4double CK3radius = 8.35 * CLHEP::cm;
0585 G4Tubs *CK3solid =
0586 new G4Tubs("CK3", 0., CK3radius, 0.5 * CK3thickness, 0, 360 * CLHEP::degree);
0587 fCK3logical = new G4LogicalVolume(CK3solid, fMatFreon, "CK3");
0588 fThicknessMap["CK3"] = CK3thickness;
0589 fLogicalVolumeMap["CK3"] = fCK3logical;
0590
0591
0592 G4double AlChipXY = 1 * CLHEP::cm;
0593 G4double AlChipThickness = 0.89 * CLHEP::mm;
0594 G4Box *AlChipSolid = new G4Box("Al_chip", 0.5 * AlChipXY, 0.5 * AlChipXY,
0595 0.5 * AlChipThickness);
0596 fAlChipLogical = new G4LogicalVolume(AlChipSolid, fMatAl, "Al_chip");
0597 fThicknessMap["Al_chip"] = AlChipThickness;
0598 fLogicalVolumeMap["Al_chip"] = fAlChipLogical;
0599
0600
0601 G4double DWCthickness = 2 * 27.5 * CLHEP::mm;
0602 G4double DWCxy = 2 * 11 * CLHEP::cm;
0603 G4Box *DWCsolid =
0604 new G4Box("DWC", 0.5 * DWCxy, 0.5 * DWCxy, 0.5 * DWCthickness);
0605 fDWClogical = new G4LogicalVolume(DWCsolid, fMatAIR, "DWC");
0606 fThicknessMap["DWC"] = DWCthickness;
0607 fLogicalVolumeMap["DWC"] = fDWClogical;
0608
0609
0610 G4double DWCgasThickness = 2 * 22.5 * CLHEP::mm;
0611 G4double DWCgasXY = 2 * 8.5 * CLHEP::cm;
0612 G4Box *DWCgasSolid = new G4Box("DWC_gas", 0.5 * DWCgasXY, 0.5 * DWCgasXY,
0613 0.5 * DWCgasThickness);
0614 fDWCgasLogical = new G4LogicalVolume(DWCgasSolid, fMatArCO2, "DWC_gas");
0615 new G4PVPlacement(0, G4ThreeVector(0, 0., 0.), fDWCgasLogical, "DWC_gas",
0616 fDWClogical, false, 0, true);
0617
0618 G4VisAttributes *visAttributes = new G4VisAttributes(G4Colour(.0, 0.0, 0.0));
0619 visAttributes->SetVisibility(false);
0620
0621 G4double DWCwindowThickness = 0.025 * CLHEP::mm;
0622 G4double DWCwindowXY = 2 * 5.5 * CLHEP::cm;
0623 G4Box *DWCwindowSolid =
0624 new G4Box("DWC_window", 0.5 * DWCwindowXY, 0.5 * DWCwindowXY,
0625 0.5 * DWCwindowThickness);
0626 auto DWCwindowLogical =
0627 new G4LogicalVolume(DWCwindowSolid, fMatKAPTON, "DWC_window");
0628 DWCwindowLogical->SetVisAttributes(visAttributes);
0629 new G4PVPlacement(
0630 0, G4ThreeVector(0, 0., 27.5 * CLHEP::mm - DWCwindowThickness / 2.),
0631 DWCwindowLogical, "DWC_window_0", fDWClogical, true, 0, true);
0632 new G4PVPlacement(
0633 0, G4ThreeVector(0, 0., -(27.5 * CLHEP::mm - DWCwindowThickness / 2.)),
0634 DWCwindowLogical, "DWC_window_1", fDWClogical, true, 1, true);
0635
0636 G4RotationMatrix *rotation = new G4RotationMatrix();
0637 rotation->rotateZ(90 * CLHEP::deg);
0638
0639
0640 G4double DWCal1thickness = 2 * 2.5 * CLHEP::mm;
0641 G4double DWCal1x = 2 * 8.25 * CLHEP::cm;
0642 G4double DWCal1y = 2 * 2.75 * CLHEP::cm;
0643 G4Box *DWCal1solid =
0644 new G4Box("DWC_al1", 0.5 * DWCal1x, 0.5 * DWCal1y, 0.5 * DWCal1thickness);
0645 auto DWCal1logical = new G4LogicalVolume(DWCal1solid, fMatAl, "DWC_al1");
0646 DWCal1logical->SetVisAttributes(visAttributes);
0647 new G4PVPlacement(0,
0648 G4ThreeVector(0.5 * DWCal1y, 0.5 * DWCal1x,
0649 (0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0650 DWCal1logical, "DWC_al1_0", fDWClogical, true, 0, true);
0651 new G4PVPlacement(rotation,
0652 G4ThreeVector(-0.5 * DWCal1x, 0.5 * DWCal1y,
0653 (0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0654 DWCal1logical, "DWC_al1_1", fDWClogical, true, 1, true);
0655 new G4PVPlacement(0,
0656 G4ThreeVector(-0.5 * DWCal1y, -0.5 * DWCal1x,
0657 (0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0658 DWCal1logical, "DWC_al1_2", fDWClogical, true, 2, true);
0659 new G4PVPlacement(rotation,
0660 G4ThreeVector(0.5 * DWCal1x, -0.5 * DWCal1y,
0661 (0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0662 DWCal1logical, "DWC_al1_3", fDWClogical, true, 3, true);
0663 new G4PVPlacement(
0664 0,
0665 G4ThreeVector(0.5 * DWCal1y, 0.5 * DWCal1x,
0666 -(0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0667 DWCal1logical, "DWC_al1_4", fDWClogical, true, 4, true);
0668 new G4PVPlacement(
0669 rotation,
0670 G4ThreeVector(-0.5 * DWCal1x, 0.5 * DWCal1y,
0671 -(0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0672 DWCal1logical, "DWC_al1_5", fDWClogical, true, 5, true);
0673 new G4PVPlacement(
0674 0,
0675 G4ThreeVector(-0.5 * DWCal1y, -0.5 * DWCal1x,
0676 -(0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0677 DWCal1logical, "DWC_al1_6", fDWClogical, true, 6, true);
0678 new G4PVPlacement(
0679 rotation,
0680 G4ThreeVector(0.5 * DWCal1x, -0.5 * DWCal1y,
0681 -(0.5 * DWCthickness - 0.5 * DWCal1thickness)),
0682 DWCal1logical, "DWC_al1_7", fDWClogical, true, 7, true);
0683
0684
0685 G4double DWCal2thickness = 2 * 2.25 * CLHEP::cm;
0686 G4double DWCal2x = 2 * 10.75 * CLHEP::cm;
0687 G4double DWCal2y = 2 * 2.5 * CLHEP::mm;
0688 G4Box *DWCal2solid =
0689 new G4Box("DWC_al2", 0.5 * DWCal2x, 0.5 * DWCal2y, 0.5 * DWCal2thickness);
0690 auto DWCal2logical = new G4LogicalVolume(DWCal2solid, fMatAl, "DWC_al2");
0691 DWCal2logical->SetVisAttributes(visAttributes);
0692 new G4PVPlacement(0, G4ThreeVector(0.5 * DWCal2y, 0.5 * DWCal2x, 0),
0693 DWCal2logical, "DWC_al2_0", fDWClogical, true, 0, true);
0694 new G4PVPlacement(rotation, G4ThreeVector(-0.5 * DWCal2x, 0.5 * DWCal2y, 0),
0695 DWCal2logical, "DWC_al2_1", fDWClogical, true, 1, true);
0696 new G4PVPlacement(0, G4ThreeVector(-0.5 * DWCal2y, -0.5 * DWCal2x, 0),
0697 DWCal2logical, "DWC_al2_2", fDWClogical, true, 2, true);
0698 new G4PVPlacement(rotation, G4ThreeVector(0.5 * DWCal2x, -0.5 * DWCal2y, 0),
0699 DWCal2logical, "DWC_al2_3", fDWClogical, true, 3, true);
0700
0701
0702 G4double DWCgasVetThickness = 2 * 2.5 * CLHEP::mm;
0703 G4double DWCgasVetX = 2 * 7.25 * CLHEP::cm;
0704 G4double DWCgasVetY = 2 * 1.25 * CLHEP::cm;
0705 G4Box *DWCgasVetSolid = new G4Box("DWC_gasVet", 0.5 * DWCgasVetX,
0706 0.5 * DWCgasVetY, 0.5 * DWCgasVetThickness);
0707 auto DWCgasVetLogical =
0708 new G4LogicalVolume(DWCgasVetSolid, fMatPolyethylene, "DWC_gasVet");
0709 DWCgasVetLogical->SetVisAttributes(visAttributes);
0710 new G4PVPlacement(0,
0711 G4ThreeVector(0.5 * DWCgasVetY, 0.5 * DWCgasVetX,
0712 0.5 * (DWCgasThickness - DWCgasVetThickness)),
0713 DWCgasVetLogical, "DWC_gasVet_0", fDWCgasLogical, true, 0,
0714 true);
0715 new G4PVPlacement(rotation,
0716 G4ThreeVector(-0.5 * DWCgasVetX, 0.5 * DWCgasVetY,
0717 0.5 * (DWCgasThickness - DWCgasVetThickness)),
0718 DWCgasVetLogical, "DWC_gasVet_1", fDWCgasLogical, true, 1,
0719 true);
0720 new G4PVPlacement(0,
0721 G4ThreeVector(-0.5 * DWCgasVetY, -0.5 * DWCgasVetX,
0722 0.5 * (DWCgasThickness - DWCgasVetThickness)),
0723 DWCgasVetLogical, "DWC_gasVet_2", fDWCgasLogical, true, 2,
0724 true);
0725 new G4PVPlacement(rotation,
0726 G4ThreeVector(0.5 * DWCgasVetX, -0.5 * DWCgasVetY,
0727 0.5 * (DWCgasThickness - DWCgasVetThickness)),
0728 DWCgasVetLogical, "DWC_gasVet_3", fDWCgasLogical, true, 3,
0729 true);
0730 new G4PVPlacement(0, G4ThreeVector(0.5 * DWCgasVetY, 0.5 * DWCgasVetX, 0),
0731 DWCgasVetLogical, "DWC_gasVet_4", fDWCgasLogical, true, 4,
0732 true);
0733 new G4PVPlacement(
0734 rotation, G4ThreeVector(-0.5 * DWCgasVetX, 0.5 * DWCgasVetY, 0),
0735 DWCgasVetLogical, "DWC_gasVet_5", fDWCgasLogical, true, 5, true);
0736 new G4PVPlacement(0, G4ThreeVector(-0.5 * DWCgasVetY, -0.5 * DWCgasVetX, 0),
0737 DWCgasVetLogical, "DWC_gasVet_6", fDWCgasLogical, true, 6,
0738 true);
0739 new G4PVPlacement(
0740 rotation, G4ThreeVector(0.5 * DWCgasVetX, -0.5 * DWCgasVetY, 0),
0741 DWCgasVetLogical, "DWC_gasVet_7", fDWCgasLogical, true, 7, true);
0742 new G4PVPlacement(
0743 0,
0744 G4ThreeVector(0.5 * DWCgasVetY, 0.5 * DWCgasVetX,
0745 -0.5 * (DWCgasThickness - DWCgasVetThickness)),
0746 DWCgasVetLogical, "DWC_gasVet_8", fDWCgasLogical, true, 8, true);
0747 new G4PVPlacement(
0748 rotation,
0749 G4ThreeVector(-0.5 * DWCgasVetX, 0.5 * DWCgasVetY,
0750 -0.5 * (DWCgasThickness - DWCgasVetThickness)),
0751 DWCgasVetLogical, "DWC_gasVet_9", fDWCgasLogical, true, 9, true);
0752 new G4PVPlacement(
0753 0,
0754 G4ThreeVector(-0.5 * DWCgasVetY, -0.5 * DWCgasVetX,
0755 -0.5 * (DWCgasThickness - DWCgasVetThickness)),
0756 DWCgasVetLogical, "DWC_gasVet_10", fDWCgasLogical, true, 10, true);
0757 new G4PVPlacement(
0758 rotation,
0759 G4ThreeVector(0.5 * DWCgasVetX, -0.5 * DWCgasVetY,
0760 -0.5 * (DWCgasThickness - DWCgasVetThickness)),
0761 DWCgasVetLogical, "DWC_gasVet_11", fDWCgasLogical, true, 11, true);
0762 }
0763
0764
0765
0766 void HGCalTBMaterials::PlaceItemInLogicalVolume(std::string aName,
0767 G4double &aZ0,
0768 G4LogicalVolume *aLogicMother) {
0769 if (aName.find("_DAISY") != std::string::npos) {
0770 aName.resize(aName.find("_DAISY"));
0771 if (fCopyCounterMap.find(aName) == fCopyCounterMap.end())
0772 fCopyCounterMap[aName] = 0;
0773 double dx_ = 2 * std::sin(fAlpha) * 11 * fSiPixelSideLength;
0774 double dy_ = 11 * fSiPixelSideLength * (2. + 2 * std::cos(fAlpha));
0775 int nRows_[3] = {1, 2, 1};
0776 for (int nC = 0; nC < 3; nC++) {
0777 for (int middle_index = 0; middle_index < nRows_[nC]; middle_index++) {
0778 new G4PVPlacement(
0779 0,
0780 G4ThreeVector(dy_ * (middle_index - nRows_[nC] / 2. + 0.5),
0781 -nC * dx_ / 2, aZ0 + 0.5 * fThicknessMap[aName]),
0782 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0783 fCopyCounterMap[aName]++, true);
0784 if (nC <= 0)
0785 continue;
0786 new G4PVPlacement(
0787 0,
0788 G4ThreeVector(dy_ * (middle_index - nRows_[nC] / 2. + 0.5),
0789 +nC * dx_ / 2, aZ0 + 0.5 * fThicknessMap[aName]),
0790 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0791 fCopyCounterMap[aName]++, true);
0792 }
0793 }
0794 aZ0 += fThicknessMap[aName];
0795 } else if (aName.find("_SUMMER2017TRIPLET") != std::string::npos) {
0796 aName.resize(aName.find("_SUMMER2017TRIPLET"));
0797 if (fCopyCounterMap.find(aName) == fCopyCounterMap.end())
0798 fCopyCounterMap[aName] = 0;
0799 double dx_ = 2 * std::sin(fAlpha) * 11 * fSiPixelSideLength;
0800 double dy_ = 11 * fSiPixelSideLength * (2. + 2 * std::cos(fAlpha));
0801 int nRows_[2] = {1, 2};
0802 for (int nC = 0; nC < 2; nC++) {
0803 new G4PVPlacement(0,
0804 G4ThreeVector(-dy_ * (0 - nRows_[nC] / 2. + 0.5),
0805 -nC * dx_ / 2,
0806 aZ0 + 0.5 * fThicknessMap[aName]),
0807 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0808 fCopyCounterMap[aName]++, true);
0809 if (nC <= 0)
0810 continue;
0811 new G4PVPlacement(0,
0812 G4ThreeVector(-dy_ * (0 - nRows_[nC] / 2. + 0.5),
0813 +nC * dx_ / 2,
0814 aZ0 + 0.5 * fThicknessMap[aName]),
0815 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0816 fCopyCounterMap[aName]++, true);
0817 }
0818 aZ0 += fThicknessMap[aName];
0819 } else if (aName.find("_rot30") != std::string::npos) {
0820 aName.resize(aName.find("_rot30"));
0821 if (fCopyCounterMap.find(aName) == fCopyCounterMap.end())
0822 fCopyCounterMap[aName] = 0;
0823 G4RotationMatrix *rot = new G4RotationMatrix;
0824 rot->rotateZ(30 * CLHEP::deg);
0825 new G4PVPlacement(rot,
0826 G4ThreeVector(0, 0, aZ0 + 0.5 * fThicknessMap[aName]),
0827 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0828 fCopyCounterMap[aName]++, true);
0829 aZ0 += fThicknessMap[aName];
0830 } else {
0831 if (fCopyCounterMap.find(aName) == fCopyCounterMap.end())
0832 fCopyCounterMap[aName] = 0;
0833 new G4PVPlacement(0, G4ThreeVector(0, 0, aZ0 + 0.5 * fThicknessMap[aName]),
0834 fLogicalVolumeMap[aName], aName, aLogicMother, false,
0835 fCopyCounterMap[aName]++, true);
0836 aZ0 += fThicknessMap[aName];
0837 }
0838 }
0839
0840