Skip to content
Snippets Groups Projects
Commit cbf715c9 authored by Marshall Scott's avatar Marshall Scott
Browse files

Put hole in EMCAL to fix beam overlap

parent f6f8f111
No related branches found
No related tags found
1 merge request!44Draft: Resolve "Implement fi_B0_EMCAL"
Pipeline #8196 failed
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
<constant name="fi_B0_EMCAL_rmin" value="7 * cm"/> <constant name="fi_B0_EMCAL_rmin" value="7 * cm"/>
<constant name="fi_B0_EMCAL_rmax" value="10 * cm"/> <constant name="fi_B0_EMCAL_rmax" value="10 * cm"/>
<constant name="fi_B0_EMCAL_z" value="0 * cm"/> <constant name="fi_B0_EMCAL_z" value="0 * cm"/>
<constant name="fi_B0_EMCAL_Gap" value="0.01 * mm"/> <constant name="fi_B0_EMCAL_Gap" value="0.0001 * cm"/>
<constant name="fi_B0_EMCAL_x_Shift" value="-35 * cm"/> <constant name="fi_B0_EMCAL_x_Shift" value="-35 * cm"/>
<constant name="fi_B0_EMCAL_angle" value="0.05"/><comment> not used in .h file </comment> <constant name="fi_B0_EMCAL_angle" value="0.05"/><comment> not used in .h file </comment>
......
...@@ -19,15 +19,18 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -19,15 +19,18 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
double X_length = dims.width(); double X_length = dims.width();
double Y_length = dims.length(); double Y_length = dims.length();
double Z = dims.z(); double Z = dims.z();
double Angle = dims.angle(); double Angle = dims.angle();//Created, but not used in the .h file
double Gap = dims.gap(); double Gap = dims.gap();
Material pbw04 = desc.material("PbWO4"); Material pbw04 = desc.material("PbWO4");
Material vacuum = desc.material("Vacuum"); Material vacuum = desc.material("Vacuum");
double beampipe_rmax = 2.76 *dd4hep::cm;
//Outer volume //Outer volume
Box fi_B0_EMCAL_Solid(X_length / 2., Y_length / 2., SizeZ / 2.); Box fi_B0_EMCAL_Solid(X_length / 2., Y_length / 2., SizeZ / 2.);
Volume envelopeVol("fi_B0_EMCAL_Logic", fi_B0_EMCAL_Solid, pbw04); Box beam_pipe(beampipe_rmax / 2., beampipe_rmax / 2.0, SizeZ / 2.);
envelopeVol.setVisAttributes(desc.visAttributes(detElem.visStr())); SubtractionSolid fi_B0_EMCAL_SolidSub(fi_B0_EMCAL_Solid, beam_pipe);
Volume envelopeVol("fi_B0_EMCAL_Logic", fi_B0_EMCAL_SolidSub, pbw04);
//envelopeVol.setVisAttributes(desc.visAttributes(detElem.visStr()));
// Crystals // Crystals
double y_C = 0 * dd4hep::cm; double y_C = 0 * dd4hep::cm;
...@@ -45,7 +48,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -45,7 +48,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
if (R < ROut - X_length + Gap && R > RIn) { if (R < ROut - X_length + Gap && R > RIn) {
k++; k++;
std::sprintf(abname, "fi_B0_EMCAL_%d", k); std::sprintf(abname, "fi_B0_EMCAL_%d", k);
Volume crystalVol1(abname, fi_B0_EMCAL_Solid, pbw04); Volume crystalVol1(abname, fi_B0_EMCAL_SolidSub, pbw04);
crystalVol1.setSensitiveDetector(sens); crystalVol1.setSensitiveDetector(sens);
Transform3D tr1(RotationZYX(0,0,0), Position(x_C + X_Shift, y_C, Z)); Transform3D tr1(RotationZYX(0,0,0), Position(x_C + X_Shift, y_C, Z));
PlacedVolume cry1 = envelopeVol.placeVolume(crystalVol1, tr1); PlacedVolume cry1 = envelopeVol.placeVolume(crystalVol1, tr1);
...@@ -53,7 +56,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -53,7 +56,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
k++; k++;
std::sprintf(abname, "fi_B0_EMCAL_%d", k); std::sprintf(abname, "fi_B0_EMCAL_%d", k);
Volume crystalVol2(abname, fi_B0_EMCAL_Solid, pbw04); Volume crystalVol2(abname, fi_B0_EMCAL_SolidSub, pbw04);
crystalVol2.setSensitiveDetector(sens); crystalVol2.setSensitiveDetector(sens);
Transform3D tr2(RotationZYX(0,0,0), Position(-x_C + X_Shift, y_C, Z)); Transform3D tr2(RotationZYX(0,0,0), Position(-x_C + X_Shift, y_C, Z));
PlacedVolume cry2 = envelopeVol.placeVolume(crystalVol2, tr2); PlacedVolume cry2 = envelopeVol.placeVolume(crystalVol2, tr2);
...@@ -61,7 +64,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -61,7 +64,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
k++; k++;
std::sprintf(abname, "fi_B0_EMCAL_%d", k); std::sprintf(abname, "fi_B0_EMCAL_%d", k);
Volume crystalVol3(abname, fi_B0_EMCAL_Solid, pbw04); Volume crystalVol3(abname, fi_B0_EMCAL_SolidSub, pbw04);
crystalVol3.setSensitiveDetector(sens); crystalVol3.setSensitiveDetector(sens);
Transform3D tr3(RotationZYX(0,0,0), Position(x_C + X_Shift, -y_C, Z)); Transform3D tr3(RotationZYX(0,0,0), Position(x_C + X_Shift, -y_C, Z));
PlacedVolume cry3 = envelopeVol.placeVolume(crystalVol3, tr3); PlacedVolume cry3 = envelopeVol.placeVolume(crystalVol3, tr3);
...@@ -69,7 +72,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -69,7 +72,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
k++; k++;
std::sprintf(abname, "fi_B0_EMCAL_%d", k); std::sprintf(abname, "fi_B0_EMCAL_%d", k);
Volume crystalVol4(abname, fi_B0_EMCAL_Solid, pbw04); Volume crystalVol4(abname, fi_B0_EMCAL_SolidSub, pbw04);
crystalVol4.setSensitiveDetector(sens); crystalVol4.setSensitiveDetector(sens);
Transform3D tr4(RotationZYX(0,0,0), Position(-x_C + X_Shift, -y_C, Z)); Transform3D tr4(RotationZYX(0,0,0), Position(-x_C + X_Shift, -y_C, Z));
PlacedVolume cry4 = envelopeVol.placeVolume(crystalVol4, tr4); PlacedVolume cry4 = envelopeVol.placeVolume(crystalVol4, tr4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment