71 G4cout <<
"Defining the materials" << G4endl;
75 G4Material* air = nistManager->FindOrBuildMaterial(
"G4_AIR");
76 G4Material* pbWO4 = nistManager->FindOrBuildMaterial(
"G4_PbWO4");
81 G4double experimentalHall_x = 1000. * cm;
82 G4double experimentalHall_y = 1000. * cm;
83 G4double experimentalHall_z = 1000. * cm;
90 auto experimentalHallLog =
new G4LogicalVolume(experimentalHall_box, air,
"expHallLog",
97 "expHall", experimentalHallLog,
nullptr,
false, 0);
104 G4int nbOfCrystals = 10;
111 G4double calo_xside = 31 * cm;
112 G4double calo_yside = 31 * cm;
113 G4double calo_zside = 24 * cm;
115 G4double crystalWidth = 3 * cm;
116 G4double crystalLength = 24 * cm;
118 calo_xside = (crystalWidth * nbOfCrystals) + 1 * cm;
119 calo_yside = (crystalWidth * nbOfCrystals) + 1 * cm;
120 calo_zside = crystalLength;
122 auto calo_box =
new G4Box(
"CMS calorimeter",
124 calo_yside / 2., calo_zside / 2.);
134 G4double zpos = 100.0 * cm;
135 new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), caloLog,
"calorimeter",
136 experimentalHallLog,
false, 1);
140 crystalWidth / 2, crystalWidth / 2, crystalLength / 2);
146 for (G4int i = 0; i < nbOfCrystals; i++) {
147 for (G4int j = 0; j < nbOfCrystals; j++) {
148 G4int n = i * 10 + j;
149 G4ThreeVector crystalPos((i * crystalWidth) - 135, (j * crystalWidth) - 135, 0);
157 G4cout <<
"There are " << nbOfCrystals <<
" crystals per row in the calorimeter, so in total "
158 << nbOfCrystals * nbOfCrystals <<
" crystals" << G4endl;
159 G4cout <<
"They have width of " << crystalWidth / cm <<
" cm and a length of "
160 << crystalLength / cm <<
" cm. The Material is " << pbWO4 << G4endl;
162 experimentalHallLog->SetVisAttributes(G4VisAttributes::GetInvisible());
165 caloLog->SetVisAttributes(caloVisAtt);
170 return experimentalHallPhys;