Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEEMCal geometry update #704

Merged
merged 30 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ffb7877
HomogeneousCalorimeter: implement new inner support based on CAD model
veprbl Apr 11, 2024
dded48e
HomogeneousCalorimeter: update SPDX, remove past changes junk
veprbl Apr 11, 2024
99a0a46
clang-format
veprbl Apr 17, 2024
9b642d7
Merge remote-tracking branch 'origin/main' into pr/eeemcal_new_inner_…
veprbl Apr 17, 2024
184129b
backward_PbWO4: update module dimensions
veprbl Apr 26, 2024
9c226cb
backward_PbWO4: update cutout dimensions
veprbl Apr 26, 2024
d3e52aa
WIP
veprbl Apr 26, 2024
1915c22
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2024
a1a3995
adjust EcalEndcapN_Iring_axisA
veprbl Apr 26, 2024
7b1be27
Merge remote-tracking branch 'origin/main' into pr/eeemcal_new_inner_…
veprbl May 20, 2024
4670cb0
correct collar length
veprbl May 22, 2024
52f6d16
correct collar offset
veprbl May 22, 2024
9844e3a
increase outer support thickness from 9 mm to 20 mm
veprbl May 22, 2024
32012d1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2024
bb7397d
replace eliptical cutout with one shaped by missing towers
veprbl May 23, 2024
14ea759
Revert "replace eliptical cutout with one shaped by missing towers"
veprbl May 23, 2024
a8df685
remove some unused code
veprbl May 23, 2024
8f304af
change dodecagon material back to steel
veprbl May 23, 2024
135d76f
change envelope to air
veprbl May 23, 2024
e0e6064
x_offsets
veprbl May 23, 2024
49c2d66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 23, 2024
9738247
Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
veprbl May 26, 2024
ed81dbe
Revert "x_offsets"
veprbl May 26, 2024
9d40cb0
use z_length accessor
veprbl May 28, 2024
af96242
extend envelope to fit the collar, define appropriate constants
veprbl May 28, 2024
c8ec782
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 28, 2024
9d1e561
implement a correct way to offset modules
veprbl May 28, 2024
4092291
fix bug in determination of minY/maxY
veprbl May 29, 2024
85bff76
offset inner support to avoid overlap
veprbl May 29, 2024
b194ee3
Merge branch 'main' into pr/eeemcal_new_inner_support
veprbl May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 46 additions & 25 deletions compact/ecal/backward_PbWO4.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Pu-Kai Wang, Wouter Deconinck -->
<!-- Copyright (C) 2024 Pu-Kai Wang, Wouter Deconinck, Dmitry Kalinkin -->

<lccdd>
<define>
Expand All @@ -10,12 +10,13 @@
carbonfiber[ VM2000[ crystal ]VM2000 ]carbonfiber
0.2 0.05 200.00
</comment>
<constant name="EcalEndcapN_crystalmodule_crystal_width" value="20.00*mm"/>
<constant name="EcalEndcapN_crystalmodule_crystal_width" value="20.50*mm"/>
<constant name="EcalEndcapN_crystalmodule_crystal_length" value="200.00*mm"/>
<constant name="EcalEndcapN_crystalmodule_carbonfiber_thickness" value="0.20*mm"/>
<constant name="EcalEndcapN_crystalmodule_VM2000_thickness" value="0.05*mm"/>
<constant name="EcalEndcapN_crystalmodule_carbonfiber_thickness" value="0.25*mm"/>
<constant name="EcalEndcapN_crystalmodule_VM2000_thickness" value="0.13*mm"/>
<constant name="EcalEndcapN_crystalmodule_carbonfiber_length" value="20.00*mm"/>
<constant name="EcalEndcapN_crystalmodule_PCB_thickness" value="1.45*mm"/>
<constant name="EcalEndcapN_crystalmodule_total_width" value="EcalEndcapN_crystalmodule_crystal_width + 2 * EcalEndcapN_crystalmodule_carbonfiber_thickness + 2 * EcalEndcapN_crystalmodule_VM2000_thickness"/>

<comment>
The S14160 SiPM from Hamamatsu is planned to use
Expand All @@ -27,6 +28,8 @@
<constant name="EcalEndcapN_crystalmodule_Nsensor_in_X" value="2"/>
<constant name="EcalEndcapN_crystalmodule_Nsensor_in_Y" value="2"/>

<constant name="EcalEndcapN_crystalmodule_total_length" value="EcalEndcapN_crystalmodule_crystal_length + EcalEndcapN_crystalmodule_VM2000_thickness + EcalEndcapN_crystalmodule_sensor_thickness + EcalEndcapN_crystalmodule_PCB_thickness" />

<comment>
Basic hardcoded parameters about supporting structures, rotation and shift
** +15 deg rotation (Protate) make top side of outer supporting structure (Oring) and
Expand All @@ -39,15 +42,17 @@
** some existed parameters are passed from "difinition.xml"
</comment>
<constant name="EcalEndcapN_structure_Oring_length" value="EcalEndcapN_length"/>
<constant name="EcalEndcapN_inner_support_length" value="25.*cm"/>
<constant name="EcalEndcapN_envelope_length" value="max(EcalEndcapN_inner_support_length, EcalEndcapN_crystalmodule_total_length)" />
<constant name="EcalEndcapN_structure_Oring_thickness" value="2.0*cm"/>
<constant name="EcalEndcapN_structure_Oring_max" value="65.00*cm"/>
<constant name="EcalEndcapN_structure_Oring_min" value="EcalEndcapN_structure_Oring_max - 0.9*cm"/>
<constant name="EcalEndcapN_structure_Oring_min" value="EcalEndcapN_structure_Oring_max - EcalEndcapN_structure_Oring_thickness"/>
<constant name="EcalEndcapN_Protate" value="15.*degree"/>
<constant name="EcalEndcapN_Nrotate" value="-15.*degree"/>
<constant name="EcalEndcapN_Oring_relative_shift" value="-20.*cm"/>
<constant name="EcalEndcapN_Iring_axisA" value="7.5*cm"/>
<constant name="EcalEndcapN_Oring_relative_shift" value="(EcalEndcapN_envelope_length - EcalEndcapN_structure_Oring_length) / 2"/>
<constant name="EcalEndcapN_Iring_axisA" value="7.0*cm"/>
<constant name="EcalEndcapN_Iring_axisB" value="5.5*cm"/>


<comment>
FIXME currently unused
</comment>
Expand All @@ -68,7 +73,7 @@
name="EcalEndcapN"
type="epic_HomogeneousCalorimeter"
readout="EcalEndcapNHits">
<position x="0" y="0" z="-(EcalEndcapN_zmin + (EcalEndcapN_crystalmodule_crystal_length + EcalEndcapN_crystalmodule_VM2000_thickness + EcalEndcapN_crystalmodule_sensor_thickness + EcalEndcapN_crystalmodule_PCB_thickness)/2.)"/>
<position x="0" y="0" z="-(EcalEndcapN_zmin + EcalEndcapN_envelope_length / 2.)"/>
<rotation x="0" y="0." z="0"/>
<placements>
<disk_12surface
Expand All @@ -77,7 +82,8 @@
r12min="EcalEndcapN_structure_Oring_min"
r12max="EcalEndcapN_structure_Oring_max"
outerringlength="EcalEndcapN_structure_Oring_length"
modulelength="EcalEndcapN_crystalmodule_crystal_length + EcalEndcapN_crystalmodule_VM2000_thickness + EcalEndcapN_crystalmodule_sensor_thickness + EcalEndcapN_crystalmodule_PCB_thickness"
modulelength="EcalEndcapN_crystalmodule_total_length"
envelope_length="EcalEndcapN_envelope_length"
protate="EcalEndcapN_Protate"
nrotate="EcalEndcapN_Nrotate"
outerringshift="EcalEndcapN_Oring_relative_shift"
Expand All @@ -87,29 +93,44 @@
ringmaterial="StainlessSteel"
sector="1"
vis_struc="RPVis"
vis_steel_gap="AnlGray">
vis_steel_gap="InvisibleWithDaughters">

<comment>
A small `x_offset` here is set to avoid overlap with regular cell aligment.
</comment>
<inner_support_collar
electron_rmin="65 * mm"
electron_rmax="73 * mm"
proton_rmin="35 * mm"
proton_rmax="43 * mm"
straight_section_tilt="62.05 * deg"
z_length="EcalEndcapN_inner_support_length"
x_offset="-1 * mm"
material="Copper"
vis="AnlOrange"
/>

<comment>
The points information for constructing inner supporting structure [extrudedpolygon shape, 12 points in total]
</comment>
<points_extrudedpolygon>
<position x="6.15*cm" y="6.15*cm"/>
<position x="6.15*cm" y="4.1*cm"/>
<position x="8.2*cm" y="4.1*cm"/>
<position x="8.2*cm" y="-4.1*cm"/>
<position x="6.15*cm" y="-4.1*cm"/>
<position x="6.15*cm" y="-6.15*cm"/>
<position x="-6.15*cm" y="-6.15*cm"/>
<position x="-6.15*cm" y="-4.1*cm"/>
<position x="-8.2*cm" y="-4.1*cm"/>
<position x="-8.2*cm" y="4.1*cm"/>
<position x="-6.15*cm" y="4.1*cm"/>
<position x="-6.15*cm" y="6.15*cm"/>
<position x="3 * EcalEndcapN_crystalmodule_total_width" y="3.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="3 * EcalEndcapN_crystalmodule_total_width" y="2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="5 * EcalEndcapN_crystalmodule_total_width" y="2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="5 * EcalEndcapN_crystalmodule_total_width" y="-2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="3 * EcalEndcapN_crystalmodule_total_width" y="-2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="3 * EcalEndcapN_crystalmodule_total_width" y="-3.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-3 * EcalEndcapN_crystalmodule_total_width" y="-3.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-3 * EcalEndcapN_crystalmodule_total_width" y="-2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-4 * EcalEndcapN_crystalmodule_total_width" y="-2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-4 * EcalEndcapN_crystalmodule_total_width" y="2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-3 * EcalEndcapN_crystalmodule_total_width" y="2.5 * EcalEndcapN_crystalmodule_total_width"/>
<position x="-3 * EcalEndcapN_crystalmodule_total_width" y="3.5 * EcalEndcapN_crystalmodule_total_width"/>
</points_extrudedpolygon>

<module
modulex="EcalEndcapN_crystalmodule_crystal_width + 2.0*EcalEndcapN_crystalmodule_carbonfiber_thickness + 2.0*EcalEndcapN_crystalmodule_VM2000_thickness"
moduley="EcalEndcapN_crystalmodule_crystal_width + 2.0*EcalEndcapN_crystalmodule_carbonfiber_thickness + 2.0*EcalEndcapN_crystalmodule_VM2000_thickness"
modulex="EcalEndcapN_crystalmodule_total_width"
moduley="EcalEndcapN_crystalmodule_total_width"
modulez="EcalEndcapN_crystalmodule_crystal_length + EcalEndcapN_crystalmodule_VM2000_thickness + EcalEndcapN_crystalmodule_sensor_thickness + EcalEndcapN_crystalmodule_PCB_thickness"
moduleshift="EcalEndcapN_crystalmodule_VM2000_thickness"
gmaterial="Vacuum"
Expand Down
7 changes: 7 additions & 0 deletions configurations/eeemcal_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
features:
# beampipe:
tracking:
definitions_craterlake:
support_service_craterlake:
ecal:
backward_PbWO4:
136 changes: 77 additions & 59 deletions src/HomogeneousCalorimeter_geo.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
wdconinc marked this conversation as resolved.
Show resolved Hide resolved
// Copyright (C) 2022 Chao Peng, Dmitry Romanov, Pu-Kai Wang
//==========================================================================
// A general implementation for homogeneous calorimeter
//--------------------------------------------------------------------------
// Author: Chao Peng (ANL)
// Date: 06/09/2021
//==========================================================================
//==========================================================================
// Date: 03/10/2022
// Add the new geometry and the supporting structue
// Adapted the single module with additional wrraper and supporting structure
//--------------------------------------------------------------------------
// Date: 20/03/2023
// Reorganize and optimize the scripts
// Adapted the inner supporting structure for improving low Q2 measurements
//--------------------------------------------------------------------------
// Author: WANG Pu-Kai, ZHU Yuwei (IJClab)
//==========================================================================
// Copyright (C) 2022 - 2024, Chao Peng, Dmitry Romanov, Pu-Kai Wang, Yuwei Zhu, Dmitry Kalinkin

#include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/Printout.h"
Expand All @@ -35,7 +18,6 @@ using namespace dd4hep;

/** \addtogroup Homogeneous Calorimeter
* \brief Type: **HomogeneousCalorimeter**.
* \author C. Peng
* \ingroup calorimeters
*
* @{
Expand All @@ -58,6 +40,63 @@ template <class XmlComp> Position get_xml_xyz(XmlComp& comp, dd4hep::xml::Strng_
return pos;
}

static Volume inner_support_collar(Detector& desc, xml_comp_t handle) {
// This consists of two circular tubes joined by straight sections

Material inner_ring_material = desc.material(handle.materialStr());

double electron_rmin = handle.attr<double>(_Unicode(electron_rmin));
double electron_rmax = handle.attr<double>(_Unicode(electron_rmax));
double proton_rmin = handle.attr<double>(_Unicode(proton_rmin));
double proton_rmax = handle.attr<double>(_Unicode(proton_rmax));
double straight_section_tilt = handle.attr<double>(_Unicode(straight_section_tilt));
veprbl marked this conversation as resolved.
Show resolved Hide resolved
double z_length = handle.z_length();

double proton_x_offset = ((electron_rmax + electron_rmin) - (proton_rmax + proton_rmin)) / 2 /
cos(straight_section_tilt);
double mean_radius = (electron_rmax + electron_rmin + proton_rmax + proton_rmin) / 4;
Position straight_section_offset{
proton_x_offset / 2 + cos(straight_section_tilt) * mean_radius,
sin(straight_section_tilt) * mean_radius,
0,
};
Position straight_section_offset_mirror_y{
straight_section_offset.x(),
-straight_section_offset.y(),
straight_section_offset.z(),
};

Tube electron_side{electron_rmin, electron_rmax, z_length / 2, straight_section_tilt,
-straight_section_tilt};
Tube proton_side{proton_rmin, proton_rmax, z_length / 2, -straight_section_tilt,
straight_section_tilt};
Trd1 electron_proton_straight_section{
(electron_rmax - electron_rmin) / 2,
(proton_rmax - proton_rmin) / 2,
z_length / 2,
proton_x_offset * sin(straight_section_tilt) / 2,
};
UnionSolid inner_support{
UnionSolid{
UnionSolid{
electron_side,
proton_side,
Position{proton_x_offset, 0., 0.},
},
electron_proton_straight_section,
Transform3D{straight_section_offset} * RotationZ(straight_section_tilt) *
RotationX(90 * deg),
},
electron_proton_straight_section,
Transform3D{straight_section_offset_mirror_y} * RotationZ(-straight_section_tilt) *
RotationX(-90 * deg),
};

Volume inner_support_vol{"inner_support_vol", inner_support, inner_ring_material};
inner_support_vol.setVisAttributes(desc.visAttributes(handle.visStr()));
return inner_support_vol;
}

// main
static Ref_t create_detector(Detector& desc, xml::Handle_t handle, SensitiveDetector sens) {
xml::DetElement detElem = handle;
Expand Down Expand Up @@ -228,6 +267,7 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
double r12max = plm.attr<double>(_Unicode(r12max));
double structure_frame_length = plm.attr<double>(_Unicode(outerringlength));
double calo_module_length = plm.attr<double>(_Unicode(modulelength));
double envelope_length = plm.attr<double>(_Unicode(envelope_length));
double Prot = plm.attr<double>(_Unicode(protate));
double Nrot = plm.attr<double>(_Unicode(nrotate));
double Oring_shift = plm.attr<double>(_Unicode(outerringshift));
Expand All @@ -240,16 +280,6 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
std::vector<double> pt_innerframe_y;
double half_modx = modSize.x() * 0.5, half_mody = modSize.y() * 0.5;

//=========================================================
// Read the positions information from xml file
//=========================================================
xml_coll_t pts_extrudedpolygon(plm, _Unicode(points_extrudedpolygon));
for (xml_coll_t position_i(pts_extrudedpolygon, _U(position)); position_i; ++position_i) {
xml_comp_t position_comp = position_i;
pt_innerframe_x.push_back((position_comp.x()));
pt_innerframe_y.push_back((position_comp.y()));
}

//=========================================================
// optional envelope volume and the supporting frame
//=========================================================
Expand All @@ -258,8 +288,6 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
//
Material outer_ring_material =
desc.material(getAttrOrDefault<std::string>(plm, _U(material), "StainlessSteel"));
Material inner_ring_material =
desc.material(getAttrOrDefault<std::string>(plm, _U(material), "Copper"));

//==============================
// Outer supporting frame
Expand All @@ -270,34 +298,15 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
Transform3D tr_global_Oring = RotationZYX(Prot, 0., 0.) * Translation3D(0., 0., Oring_shift);
ring12_vol.setVisAttributes(desc.visAttributes(plm.attr<std::string>(_Unicode(vis_struc))));

//=============================
// Inner supporting frame
//=============================

// Version3: solid with elliptical inside
//
std::vector<double> sec_z = {-calo_module_length / 2., calo_module_length / 2.};
std::vector<double> sec_x = {0., 0.};
std::vector<double> sec_y = {0., 0.};
std::vector<double> zscale = {1., 1.};

ExtrudedPolygon inner_support_main(pt_innerframe_x, pt_innerframe_y, sec_z, sec_x, sec_y, zscale);
EllipticalTube subtract_a(Innera, Innerb, calo_module_length / 2.);
SubtractionSolid inner_support_substracta(inner_support_main, subtract_a, Position(0., 0., 0.));
Volume inner_support_vol("inner_support_vol", inner_support_substracta, inner_ring_material);
inner_support_vol.setVisAttributes(
desc.visAttributes(plm.attr<std::string>(_Unicode(vis_struc))));
Transform3D tr_global_Iring_elli = RotationZYX(Nrot, 0., 0.) * Translation3D(0., 0., 0.);

//=============================
// The mother volume of modules
//=============================
bool has_envelope = dd4hep::getAttrOrDefault<bool>(plm, _Unicode(envelope), false);
PolyhedraRegular solid_world(12, 0., r12min, calo_module_length);
EllipticalTube solid_sub(Innera, Innerb, calo_module_length / 2.);
Transform3D subtract_pos = RotationZYX(Nrot, 0., 0.) * Translation3D(0., 0., 0.);
PolyhedraRegular solid_world(12, 0., r12min, envelope_length);
EllipticalTube solid_sub(Innera, Innerb, envelope_length / 2.);
Transform3D subtract_pos = RotationZYX(Nrot, 0., 0.) * Translation3D(1 * cm, 0., 0.);
SubtractionSolid calo_subtract(solid_world, solid_sub, subtract_pos);
Volume env_vol(std::string(env.name()) + "_envelope", calo_subtract, outer_ring_material);
Volume env_vol(std::string(env.name()) + "_envelope", calo_subtract, desc.material("Air"));
Transform3D tr_global = RotationZYX(Prot, 0., 0.) * Translation3D(0., 0., 0.);
env_vol.setVisAttributes(desc.visAttributes(plm.attr<std::string>(_Unicode(vis_steel_gap))));

Expand All @@ -306,15 +315,20 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
if (has_envelope) {
env.placeVolume(env_vol, tr_global); // Place the mother volume for all modules
env.placeVolume(ring12_vol, tr_global_Oring); // Place the outer supporting frame

xml_comp_t collar_comp = plm.child(_Unicode(inner_support_collar));
Volume inner_support_vol = inner_support_collar(desc, collar_comp);
env_vol.placeVolume(inner_support_vol,
tr_global_Iring_elli); // Place the version3 inner supporting frame
Transform3D{RotationZ{Nrot}} * Translation3D(collar_comp.x_offset(0.),
collar_comp.y_offset(0.),
collar_comp.z_offset(0.)));
}

//=====================================================================
// Placing The Modules
//=====================================================================

auto points = epic::geo::fillRectangles({half_modx, half_mody}, modSize.x(), modSize.y(), 0.,
auto points = epic::geo::fillRectangles({half_modx, 0.}, modSize.x(), modSize.y(), 0.,
(rmax / std::cos(Prot)), phimin, phimax);

std::pair<double, double> c1(0., 0.);
Expand All @@ -325,6 +339,7 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
out_vertices.push_back(a);
}

xml_coll_t pts_extrudedpolygon(plm, _Unicode(points_extrudedpolygon));
for (xml_coll_t position_i(pts_extrudedpolygon, _U(position)); position_i; ++position_i) {
xml_comp_t position_comp = position_i;
epic::geo::Point inpt = {position_comp.x(), position_comp.y()};
Expand All @@ -341,11 +356,11 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
if (square.x() < minX)
minX = square.x();
if (square.y() < minY)
minY = square.x();
minY = square.y();
if (square.x() > maxX)
maxX = square.x();
if (square.y() > maxY)
maxY = square.x();
maxY = square.y();
}
}

Expand All @@ -360,12 +375,15 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
{square.x() - half_modx, square.y() + half_mody},
{square.x() - half_modx, square.y() - half_mody},
{square.x() + half_modx, square.y() - half_mody}};

if (epic::geo::isBoxTotalInsidePolygon(box, out_vertices)) {
if (!epic::geo::isBoxTotalInsidePolygon(box, in_vertices)) {
column = std::round((square.x() - minX) / modSize.x());
row = std::round((maxY - square.y()) / modSize.y());
Transform3D tr_local =
RotationZYX(Nrot, 0.0, 0.0) * Translation3D(square.x(), square.y(), 0.0);
RotationZYX(Nrot, 0.0, 0.0) *
Translation3D(square.x(), square.y(),
std::max((envelope_length - calo_module_length) / 2, 0.));
auto modPV = (has_envelope ? env_vol.placeVolume(modVol, tr_local)
: env.placeVolume(modVol, tr_global * tr_local));
modPV.addPhysVolID("sector", sector_id)
Expand Down