8 #include <phparameter/PHParameters.h>
10 #include <Geant4/G4Box.hh>
11 #include <Geant4/G4Cons.hh>
12 #include <Geant4/G4LogicalVolume.hh>
13 #include <Geant4/G4PVPlacement.hh>
14 #include <Geant4/G4PVReplica.hh>
15 #include <Geant4/G4RotationMatrix.hh>
16 #include <Geant4/G4String.hh>
17 #include <Geant4/G4SubtractionSolid.hh>
18 #include <Geant4/G4SystemOfUnits.hh>
19 #include <Geant4/G4ThreeVector.hh>
20 #include <Geant4/G4Transform3D.hh>
21 #include <Geant4/G4Trd.hh>
22 #include <Geant4/G4Tubs.hh>
23 #include <Geant4/G4Types.hh>
24 #include <Geant4/G4AssemblyVolume.hh>
25 #include <Geant4/G4NistManager.hh>
26 #include <Geant4/G4RotationMatrix.hh>
47 , m_Params(parameters)
48 , overlapcheck_sector(
false)
59 if (physvol == (*it).second)
100 mat_Epoxy =
new G4Material(
"EpoxyTTL", density = 1.16 *
g /
cm3, natoms = 4);
110 mat_ALN =
new G4Material(
"AluminiumNitrate", density = 3.255 *
g /
cm3, ncomponents = 2);
118 mat_Solder_Tin =
new G4Material(
"Tin", z = 50., a = 118.7 *
g /
mole, density = 7.310 *
g /
cm3);
140 G4double segmentlength = 6 * baseplate_length;
142 G4VSolid *sol_module_envelope =
new G4Trd(
"sol_module_envelope",
143 sin(
M_PI / 12.) * (rCenter-det_height/2), sin(
M_PI / 12.) * (rCenter + det_height/2),
144 segmentlength / 2, segmentlength / 2,
145 (det_height*1.001) / 2);
151 G4VSolid *sol_cooling_plate_top =
new G4Box(
"sol_cooling_plate_top",
152 sin(
M_PI / 12.) * (rCenter + diameter_coolingtube / 2 ),
154 cooling_plate_height / 2);
155 G4VSolid *sol_cooling_plate_bottom =
new G4Box(
"sol_cooling_plate_top",
156 sin(
M_PI / 12.) * (rCenter - diameter_coolingtube / 2 - cooling_plate_height),
158 cooling_plate_height / 2);
167 "physical_cooling_plate_bottom", log_module_envelope,
false, 0,
overlapcheck_sector),
false);
175 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
176 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
177 (segmentlength * 1.1) / 2);
178 G4VSolid *sol_cooling_tube =
new G4Box(
"sol_cooling_tube_tmp",
179 diameter_coolingtube / 2,
180 diameter_coolingtube / 2,
181 (segmentlength - 0.2 *
mm) / 2);
189 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
190 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
191 (segmentlength - 0.2 *
mm) / 2);
197 G4VSolid *sol_internal_support_center =
new G4Box(
"sol_internal_support_center",
198 (1.5 * baseplate_width - diameter_coolingtube)/2,
199 diameter_coolingtube / 2,
205 G4VSolid *sol_internal_support_edge =
new G4Box(
"sol_internal_support_edge",
206 (1.5 * baseplate_width - diameter_coolingtube - baseplate_width / 3)/2,
207 diameter_coolingtube / 2,
217 G4double leftedgeCU = sin(
M_PI / 12.) * (rCenter + det_height / 2 + cooling_plate_height / 2);
219 for (
int icup = 0; icup < maxicup; icup++)
222 if (icup == 0) edgeshift = baseplate_width / 3;
223 if (icup == (maxicup - 1)) edgeshift = -baseplate_width / 3;
228 if(icup!=0 && icup<(maxicup-2)){
235 }
else if(icup==0 || icup==(maxicup-2)){
249 G4double baseSH_width_top = baseplate_width / 2 - (0.1543*
cm/2);
250 G4double baseSH_width = baseplate_width / 2 - (0.232*
cm/2);
253 std::string strLayerName[
nLayers] = {
272 baseplate_width - 0.3 *
mm,
274 sensor_width + 1 *
mm,
275 sensor_width + 1 *
mm,
276 sensor_width - 0.2 *
mm,
279 baseplate_width - 4 * mm};
283 (baseplate_width - widthLayer[2]) / 2 - 0.2 *
mm,
284 (baseplate_width - widthLayer[3]) / 2 - 0.2 *
mm,
285 (baseplate_width - widthLayer[4]) / 2 - 0.1 *
mm,
286 (baseplate_width - widthLayer[5] - 0.1 *
mm) / 2,
287 (baseplate_width - widthLayer[6] - 0.1 *
mm) / 2,
288 4 *
mm / 2 - 0.2 *
mm};
290 baseplate_length - 0.2 *
mm,
292 sensor_length + 0.2 *
mm,
293 sensor_length + 0.2 *
mm,
294 sensor_length - 0.2 *
mm,
297 baseplate_length - 0.2 *
mm};
299 false,
false,
false,
false,
false,
true,
false,
false};
302 for (
int ilay = 0; ilay <
nLayers; ilay++)
304 thicknessDet += thicknessLayer[ilay];
317 baseplate_length / 2,
322 double z_start = -thicknessDet / 2;
323 for (
int ilay = 0; ilay <
nLayers; ilay++)
325 const std::string layer_name =
"sensor_stack_" + strLayerName[ilay];
326 const std::string layer_name_Solid =
"sol_" + layer_name;
328 G4VSolid *sol_Module_Layer_Raw =
new G4Box(layer_name_Solid +
"_Raw",
329 widthLayer[ilay] / 2,
330 lengthLayer[ilay] / 2,
331 thicknessLayer[ilay] / 2);
334 materialLayer[ilay], layer_name +
"_Log");
340 z_start += thicknessLayer[ilay];
344 new G4PVReplica(
"TTL_Replicas_Modules", log_sensor_stack, log_sensor_ladder,
345 kYAxis, 6, baseplate_length);
346 G4double offsety = diameter_coolingtube/2 + cooling_plate_height + thicknessDet / 2;
347 G4double leftedge = sin(
M_PI / 12.) * (rCenter + diameter_coolingtube/2 + cooling_plate_height );
348 G4double leftedgebottom = sin(
M_PI / 12.) * (rCenter - diameter_coolingtube/2 - cooling_plate_height);
375 G4double offsetyDown = diameter_coolingtube/2 + cooling_plate_height + thicknessDet / 2;
400 const int nLayers_SH = 4;
401 std::string strLayerName_SH[nLayers_SH] = {
411 G4double thicknessLayer_SH[nLayers_SH] = {
416 G4double widthLayer_SH[nLayers_SH] = {
417 baseSH_width - 0.2 *
mm,
418 baseSH_width - 0.2 *
mm,
419 baseSH_width - 0.35 *
mm,
421 G4double offsetLayer_SH[nLayers_SH] = {
426 G4double lengthLayer_SH[nLayers_SH] = {
431 bool layerActive_SH[nLayers_SH] = {
432 false,
false,
false,
false};
435 for (
int ilay = 0; ilay < nLayers_SH; ilay++)
437 thicknessDet_SH += thicknessLayer_SH[ilay];
444 thicknessDet_SH / 2);
450 baseplate_length / 2,
451 thicknessDet_SH / 2);
455 double z_start_SH = -thicknessDet_SH / 2;
456 for (
int ilay = 0; ilay < nLayers_SH; ilay++)
458 const std::string layer_name =
"SH_stack_" + strLayerName_SH[ilay];
459 const std::string layer_name_Solid =
"sol_" + layer_name;
461 G4VSolid *sol_Module_Layer_Raw =
new G4Box(layer_name_Solid +
"_Raw",
462 widthLayer_SH[ilay] / 2,
463 lengthLayer_SH[ilay] / 2,
464 thicknessLayer_SH[ilay] / 2);
471 layerActive_SH[ilay]);
472 z_start_SH += thicknessLayer_SH[ilay];
476 new G4PVReplica(
"SH_Replicas_Modules", log_SH_stack, log_SH_ladder,
477 kYAxis, 6, baseplate_length);
479 G4double offsety_SH = diameter_coolingtube/2 + cooling_plate_height + thicknessDet_SH / 2;
500 G4double offsetyDown_SH = diameter_coolingtube/2 + cooling_plate_height + thicknessDet_SH / 2;
528 for (
int isec = 0; isec < 12; isec++)
537 G4ThreeVector vec_central_transl((rCenter*cos(
M_PI / 12.)+moduleShift) * cos(isec * 2 *
M_PI / 12.), (rCenter*cos(
M_PI / 12.)+moduleShift) * sin(isec * 2 *
M_PI / 12.), place_z);
538 assemblyDetector->
AddPlacedVolume( log_module_envelope,vec_central_transl,motherrot);
539 for (
int ilen = 1; ilen < ((detlength / 2 - segmentlength / 2) / segmentlength); ilen++)
542 G4ThreeVector vec_det_fwdlayers_transl((rCenter*cos(
M_PI / 12.)+moduleShift) * cos(isec * 2 *
M_PI / 12.), (rCenter*cos(
M_PI / 12.)+moduleShift) * sin(isec * 2 *
M_PI / 12.), place_z + ilen * segmentlength);
543 assemblyDetector->
AddPlacedVolume(log_module_envelope, vec_det_fwdlayers_transl, motherrot);
545 G4ThreeVector vec_det_bcklayers_transl((rCenter*cos(
M_PI / 12.)+moduleShift) * cos(isec * 2 *
M_PI / 12.), (rCenter*cos(
M_PI / 12.)+moduleShift) * sin(isec * 2 *
M_PI / 12.), place_z -ilen * segmentlength);
546 assemblyDetector->
AddPlacedVolume(log_module_envelope, vec_det_bcklayers_transl, motherrot);
563 assemblyDetector->
MakeImprint( logicWorld, detzvec,0 );
590 mat_Epoxy =
new G4Material(
"EpoxyTTL", density = 1.16 *
g /
cm3, natoms = 4);
600 mat_ALN =
new G4Material(
"AluminiumNitrate", density = 3.255 *
g /
cm3, ncomponents = 2);
608 mat_Solder_Tin =
new G4Material(
"Tin", z = 50., a = 118.7 *
g /
mole, density = 7.310 *
g /
cm3);
624 det_height * 2 / 2.0,
626 G4VSolid *ttl_envelope_solid =
new G4Cons(
"ttl_envelope_solid_cutout",
649 G4VSolid *sol_module_envelope =
new G4Cons(
"sol_module_envelope_cutout",
663 G4VSolid *sol_cooling_plate =
new G4Cons(
"sol_cooling_plate_cutout",
666 cooling_plate_height / 2.0,
685 const int nLayers = 8;
686 std::string strLayerName[
nLayers] = {
697 0.25 *
mm, 0.79 *
mm, 0.08 *
mm, 0.25 *
mm, 0.03 *
mm, 0.3 *
mm, 0.08 *
mm, 0.51 *
mm};
699 baseplate_width - 0.3 *
mm,
701 sensor_width + 1 *
mm,
702 sensor_width + 1 *
mm,
703 sensor_width - 0.2 *
mm,
706 baseplate_width - 4 * mm};
710 (baseplate_width - widthLayer[2]) / 2 - 0.2 *
mm,
711 (baseplate_width - widthLayer[3]) / 2 - 0.2 *
mm,
712 (baseplate_width - widthLayer[4]) / 2 - 0.1 *
mm,
713 (baseplate_width - widthLayer[5] - 0.1 *
mm) / 2,
714 (baseplate_width - widthLayer[6] - 0.1 *
mm) / 2,
715 4 *
mm / 2 - 0.2 *
mm};
717 baseplate_length - 0.2 *
mm,
719 sensor_length + 0.2 *
mm,
720 sensor_length + 0.2 *
mm,
721 sensor_length - 0.2 *
mm,
724 baseplate_length - 0.2 *
mm};
726 false,
false,
false,
false,
false,
true,
false,
false};
729 for (
int ilay = 0; ilay <
nLayers; ilay++)
731 thicknessDet += thicknessLayer[ilay];
734 G4double segmentlength = baseplate_length;
736 baseplate_length / 2,
742 double z_start = -thicknessDet / 2;
743 for (
int ilay = 0; ilay <
nLayers; ilay++)
745 const std::string layer_name =
"sensor_stack_" + strLayerName[ilay];
746 const std::string layer_name_Solid =
"sol_" + layer_name;
748 G4VSolid *sol_Module_Layer_Raw =
new G4Box(layer_name_Solid +
"_Raw",
749 lengthLayer[ilay] / 2,
750 widthLayer[ilay] / 2,
751 thicknessLayer[ilay] / 2);
754 materialLayer[ilay], layer_name +
"_Log");
760 z_start += thicknessLayer[ilay];
765 G4double baseSH_width = baseplate_width / 2;
766 const int nLayers_SH = 4;
767 std::string strLayerName_SH[nLayers_SH] = {
777 G4double thicknessLayer_SH[nLayers_SH] = {
782 G4double widthLayer_SH[nLayers_SH] = {
783 baseSH_width - 0.2 *
mm,
784 baseSH_width - 0.2 *
mm,
785 baseSH_width - 0.35 *
mm,
787 G4double offsetLayer_SH[nLayers_SH] = {
792 G4double lengthLayer_SH[nLayers_SH] = {
797 bool layerActive_SH[nLayers_SH] = {
798 false,
false,
false,
false};
801 for (
int ilay = 0; ilay < nLayers_SH; ilay++)
803 thicknessDet_SH += thicknessLayer_SH[ilay];
807 baseplate_length / 2,
809 thicknessDet_SH / 2);
813 double z_start_SH = -thicknessDet_SH / 2;
814 for (
int ilay = 0; ilay < nLayers_SH; ilay++)
816 const std::string layer_name =
"SH_stack_" + strLayerName_SH[ilay];
817 const std::string layer_name_Solid =
"sol_" + layer_name;
819 G4VSolid *sol_Module_Layer_Raw =
new G4Box(layer_name_Solid +
"_Raw",
820 lengthLayer_SH[ilay] / 2,
821 widthLayer_SH[ilay] / 2,
822 thicknessLayer_SH[ilay] / 2);
825 materialLayer_SH[ilay], layer_name +
"_Log");
830 layerActive_SH[ilay]);
831 z_start_SH += thicknessLayer_SH[ilay];
835 G4double fullsensor_width = baseSH_width+baseplate_width;
836 G4VSolid *sol_sensor_and_readout =
new G4Box(
"sol_sensor_and_readout",
838 fullsensor_width / 2,
839 thicknessDet_SH / 2);
844 log_sensor_stack,
"SensorPlacedPhysical", log_sensor_and_readout,
false, 0,
overlapcheck_sector),
false);
846 log_SH_stack,
"ServiceHybridPlacedPhysical", log_sensor_and_readout,
false, 0,
overlapcheck_sector),
false);
848 G4double offsetzFront = diameter_coolingtube/2 + cooling_plate_height + thicknessDet_SH / 2;
849 G4double offsetzBack = -diameter_coolingtube/2 - cooling_plate_height - thicknessDet_SH / 2;
851 int rowYdir = (
int) ( (rMax-(fullsensor_width/2)) / fullsensor_width);
852 for(
int row=rowYdir;row>=-rowYdir;row--){
856 int numSensorsRow = (
int) ( ( 2* sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width + fullsensor_width/2) ,2)) ) / segmentlength );
857 if(numSensorsRow==0)
continue;
859 if ( numSensorsRow % 2 == 0) numSensorsRow-=1;
861 if( ( (
abs(row)*fullsensor_width) -(fullsensor_width/2)) < rMin ){
866 int numSensorLeftAdd = ceil( (xoffset -(segmentlength/2) - sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) ) / segmentlength );
867 int numSensorRightAdd = ceil( (xoffset -(segmentlength/2) + sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) ) / segmentlength );
870 auto TTLDetRowLeftSolid =
new G4Box(
"TTLDetRowLeftBox" +
std::to_string(row), (((numSensorsRow-1) /2 + numSensorLeftAdd)) * segmentlength / 2.0,fullsensor_width / 2.0,thicknessDet_SH / 2.0);
874 kXAxis,((numSensorsRow-1) /2 + numSensorLeftAdd),segmentlength);
879 new G4PVPlacement(row%2==0 ? rotationSensor : 0,
G4ThreeVector( - ( (((numSensorsRow-1) /2 + numSensorLeftAdd)) * segmentlength / 2.0 + segmentlength / 2.0 - (numSensorLeftAdd* segmentlength)), (row*fullsensor_width), offsetzFront),
887 new G4PVPlacement(row%2==0 ? rotationSensorBck2 : rotationSensorBck1,
G4ThreeVector( - ( (((numSensorsRow-1) /2 + numSensorLeftAdd)) * segmentlength / 2.0 + segmentlength / 2.0 - (numSensorLeftAdd* segmentlength)), (row*fullsensor_width), offsetzBack),
891 1.3*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) + xoffset)/2,
892 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
893 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
895 0.86*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) + xoffset)/2,
896 diameter_coolingtube / 2,
897 diameter_coolingtube / 2);
905 0.85*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) + xoffset)/2,
906 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
907 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
913 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(- ( (((numSensorsRow-1) /2 + numSensorLeftAdd)) * segmentlength / 2.0 + segmentlength / 2.0 - (numSensorLeftAdd* segmentlength)), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_cooling_tube_left,
915 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(- ( (((numSensorsRow-1) /2 + numSensorLeftAdd)) * segmentlength / 2.0 + segmentlength / 2.0 - (numSensorLeftAdd* segmentlength)), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_water_cooling_left,
920 auto TTLDetRowRightSolid =
new G4Box(
"TTLDetRowRightBox" +
std::to_string(row), (((numSensorsRow-1) /2 - numSensorRightAdd)) * segmentlength / 2.0,fullsensor_width / 2.0,thicknessDet_SH / 2.0);
925 kXAxis,((numSensorsRow-1) /2 - numSensorRightAdd ),segmentlength);
927 new G4PVPlacement(row%2==0 ? rotationSensor : 0,
G4ThreeVector(( (((numSensorsRow-1) /2 - numSensorRightAdd)) * segmentlength / 2.0 + segmentlength / 2.0 + (numSensorRightAdd* segmentlength)), (row*fullsensor_width), offsetzFront),
930 new G4PVPlacement(row%2==0 ? rotationSensorBck2 : rotationSensorBck1,
G4ThreeVector(( (((numSensorsRow-1) /2 - numSensorRightAdd)) * segmentlength / 2.0 + segmentlength / 2.0 + (numSensorRightAdd* segmentlength)), (row*fullsensor_width), offsetzBack),
935 1.3*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) - xoffset)/2,
936 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
937 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
939 0.86*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) - xoffset)/2,
940 diameter_coolingtube / 2,
941 diameter_coolingtube / 2);
949 0.85*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) - xoffset)/2,
950 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
951 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
957 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(( (((numSensorsRow-1) /2 - numSensorRightAdd)) * segmentlength / 2.0 + segmentlength / 2.0 + (numSensorRightAdd* segmentlength)), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_cooling_tube_right,
959 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(( (((numSensorsRow-1) /2 - numSensorRightAdd)) * segmentlength / 2.0 + segmentlength / 2.0 + (numSensorRightAdd* segmentlength)), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_water_cooling_right,
965 int numSensorsInner = ceil( ( 2* sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2)) ) / segmentlength );
967 if ( numSensorsInner % 2 == 0) numSensorsInner+=1;
970 auto TTLDetRowSolid =
new G4Box(
"TTLDetRowBox" +
std::to_string(row), (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0,fullsensor_width / 2.0,thicknessDet_SH / 2.0);
975 kXAxis,(numSensorsRow - numSensorsInner) / 2,segmentlength);
979 RegisterPhysicalVolume(
new G4PVPlacement(row%2==0 ? rotationSensor : 0,
G4ThreeVector( - ( ( numSensorsInner / 2.0 ) * segmentlength ) - ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), (row*fullsensor_width), offsetzFront),
982 RegisterPhysicalVolume(
new G4PVPlacement(row%2==0 ? rotationSensor : 0,
G4ThreeVector( ( ( numSensorsInner / 2.0 ) * segmentlength ) + ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), (row*fullsensor_width), offsetzFront),
991 RegisterPhysicalVolume(
new G4PVPlacement(row%2==0 ? rotationSensorBck2 : rotationSensorBck1,
G4ThreeVector( - ( ( numSensorsInner / 2.0 ) * segmentlength ) - ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), (row*fullsensor_width), offsetzBack),
994 RegisterPhysicalVolume(
new G4PVPlacement(row%2==0 ? rotationSensorBck2 : rotationSensorBck1,
G4ThreeVector( ( ( numSensorsInner / 2.0 ) * segmentlength ) + ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), (row*fullsensor_width), offsetzBack),
999 1.3*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) )/2,
1000 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
1001 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
1003 0.96*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)) )/2,
1004 diameter_coolingtube / 2,
1005 diameter_coolingtube / 2);
1013 0.95*(sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) ,2))- sqrt(pow(rMin,2)-pow( (
abs(row)*fullsensor_width)-(fullsensor_width/2) ,2)))/2,
1014 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
1015 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
1021 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(- ( ( numSensorsInner / 2.0 ) * segmentlength ) - ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_cooling_tube_bothsides,
1023 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(( ( numSensorsInner / 2.0 ) * segmentlength ) + ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_cooling_tube_bothsides,
1025 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(- ( ( numSensorsInner / 2.0 ) * segmentlength ) - ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_water_cooling_bothsides,
1027 RegisterPhysicalVolume(
new G4PVPlacement(rotationSensor,
G4ThreeVector(( ( numSensorsInner / 2.0 ) * segmentlength ) + ( (numSensorsRow - numSensorsInner) / 2 * segmentlength / 2.0 ), row>0 ? (row*fullsensor_width) - (fullsensor_width/2.0) : (row*fullsensor_width) + (fullsensor_width/2.0), 0), Log_water_cooling_bothsides,
1032 auto TTLDetRowSolid =
new G4Box(
"TTLDetRowBox" +
std::to_string(row), numSensorsRow * segmentlength / 2.0,fullsensor_width / 2.0,thicknessDet_SH / 2.0);
1037 kXAxis,numSensorsRow,segmentlength);
1054 2.5*sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) + diameter_coolingtube ,2))/2,
1055 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
1056 (diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
1058 0.98*2*sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) + diameter_coolingtube ,2))/2,
1059 diameter_coolingtube / 2,
1060 diameter_coolingtube / 2);
1068 0.97*2*sqrt(pow(rMax,2)-pow( (
abs(row)*fullsensor_width) - (fullsensor_width/2.0) + diameter_coolingtube ,2))/2,
1069 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2,
1070 0.99*(diameter_coolingtube - 2*wallthickness_coolingtube) / 2);
1091 <<
"PHG4TTLDetector::RegisterVolume - Error - invalid volume!"
1097 std::cout <<
"PHG4TTLDetector::RegisterVolume - Warning - replacing " << v->
GetName() << std::endl;
1112 <<
"PHG4TTLDetector::RegisterPhysicalVolume - Error - invalid volume!"
1122 <<
"PHG4TTLDetector::RegisterPhysicalVolume - Warning - replacing "