diff --git a/compact/pid/drich.xml b/compact/pid/drich.xml
index 5e8b027d4..cde823bfa 100644
--- a/compact/pid/drich.xml
+++ b/compact/pid/drich.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/compact/tracking/definitions_craterlake.xml b/compact/tracking/definitions_craterlake.xml
index e0403f9c6..ce5bc835e 100644
--- a/compact/tracking/definitions_craterlake.xml
+++ b/compact/tracking/definitions_craterlake.xml
@@ -56,8 +56,9 @@
Service/Support setup
-
-
+ Ref: Services Material Budget 24.03.04..stp -- 450.00 mm
+ Ref: Services Material Budget 24.03.13.stp -- 670.00 mm, nudged 5 mm
+ Ref: Services Material Budget 24.03.04..stp -- 520.00 mm
These may belong in definitions.xml
diff --git a/compact/tracking/support_service_craterlake.xml b/compact/tracking/support_service_craterlake.xml
index 55ba62bff..9deca9f98 100644
--- a/compact/tracking/support_service_craterlake.xml
+++ b/compact/tracking/support_service_craterlake.xml
@@ -7,6 +7,26 @@
See https://indico.bnl.gov/event/19854/#1-updated-epic-tracking-config
Silicon tracker: the same effective thickness parameters from previous versions, routing changed
MPGD: estimated by M. Posik
+ ┌─────
+ B
+ │
+ /
+ A
+ /
+ │
+ │
+ ─2C─2B─2A─\ Outer Support Cone /─2A─2B─2C─2D─2E─┘
+ Ecal pfRICH \ /
+ \ /
+ \─1C──1B──1A─\ Inner Support /─1A────1B─────1C────/ Outer Support Cone
+ \ Cones /
+ \ /
+ \ /
+ │ │
+ │ │
+ N (-) └ ┘ (+) P
+ ──·──·──·──·──·────·──·──·──·──·── x ──·──·──·──·──·──·──·──·──·────·──·──·──·──·──·── z
+
@@ -24,34 +44,33 @@
Inner tracker service/support cones, symmetric
Effective Aluminum for services for now
-
-
-
-
-
+ Ref: Services Material Budget 24.03.13.stp - 0.5*mm to avoid overlap with OuterSiBarrel
+ Ref: Services Material Budget 24.03.13.stp - 0.5*mm to avoid overlap with OuterSiBarrel
+
+
+
-
+
- Tracker disk support barrels. 1: inner, 2: outer. All z parameters are unsigned
- TBD: second cones to connect two barrels
-
+
+ Tracker disk support barrels. 1: inner, 2: outer. All z parameters are unsigned
1: Inner barrel for Si disk, 3 slices each ends (Negative CBA, Positive ABC)
Positive
-
+
- 136cm
+ Ref: Services Material Budget 24.03.13.stp
@@ -61,21 +80,21 @@
-
-
-
-
-
-
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
Negative
-
+
- 106cm
+ Ref: Services Material Budget 24.03.13.stp
@@ -85,12 +104,43 @@
- place holder to avoid zero thickness error
-
-
-
-
-
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+
+ Outer tracker service/support cones, asymmetric
+
+ Effective Aluminum for services for now
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+ Negative outer tracker service/support cone
+
+
+
+
+
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+ Positive outer tracker service/support cone
+
+
+
+
+
+
+
+
+
2. Outer barrel for Si barrel cables (guided out projectively) and MPGD (inner+disks).
@@ -98,17 +148,17 @@
Positive
- ~48.75cm
-
-
-
-
+
+
+
+
+
- 180cm. Should be ~174cm
+
@@ -122,32 +172,48 @@
- cables from Si tracker to outer barrels
- cables from the Si cone
- cables from the Si disks
-
- cables from MPGD
-
-
-
-
-
+
+ grounds-up thickness determination
+ cables from Si tracker to outer barrels
+ cables from the Si cone
+ cables from the Si disks
+
+ cables from MPGD
+
+
+
+
+
+
+ total
+
+
+
+
+
+
- total
-
-
-
-
-
+ effective thickness
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+
Negative
- ~ 48.75cm
-
-
+
+
+
- 123.6cm. Should be 120cm
+ Ref: Services Material Budget 24.03.13.stp
@@ -157,24 +223,98 @@
- cables from Si tracker to outer barrels
-
-
- cables from MPGD
-
-
-
-
-
-
-
- Inner detector support cylinder
-
-
-
-
-
-
+
+ grounds-up thickness determination
+ cables from Si tracker to outer barrels
+
+
+ cables from MPGD
+
+
+
+
+
+
+
+
+ effective thickness
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+ 3. Positive endcap disk routing for services.
+
+ Average of inner and outer thickness
+
+
+
+
+ Ref: Services Material Budget 24.03.13.stp
+
+
+ 4. Segments between DRICH readout boxes.
+
+ Blind cone segments that do not continue into DRICH readout boxes
+
+ Average of inner and outer thickness
+
+
+
+
+
+
+ Modified from 110*cm to DRICH_sensorbox_rmin = 108*cm
+
+
+
+
+ Cone segments "A" that continue between the DRICH readout boxes
+
+
+
+
+
+
+
+
+
+
+
+
+ Cone segments "B" that go between the DRICH readout boxes
+
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+
+
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+ Ref: Services Material Budget 24.03.13.stp
+
+
+
+
+
+
+
+
+ Inner detector support cylinder
+
+
+
+
+
+
@@ -211,10 +351,11 @@
vis="TrackerSupportVis"
rmin1="InnerSupportCone_rmin2"
rmin2="InnerSupportCone_rmin1"
+ rmax="TrackerSupportCyl_rmin1+TrackerSupportCylN_thickness1A"
length="InnerSupportCone_length"
thickness="InnerSupportConeN_thickness">
-
+
-
+
@@ -290,11 +432,34 @@
+
+
+
+
+
+
+
+
+
+
+
outer barrel
@@ -304,7 +469,7 @@
@@ -314,7 +479,7 @@
@@ -325,7 +490,7 @@
@@ -335,7 +500,7 @@
@@ -345,7 +510,7 @@
@@ -355,7 +520,7 @@
@@ -365,7 +530,7 @@
@@ -373,6 +538,333 @@
+
+
+
+
+
+
+ Service routings in front of DRICH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Service routings outside DRICH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Inner detector support barrel
+
diff --git a/src/BarrelCalorimeterScFi_geo.cpp b/src/BarrelCalorimeterScFi_geo.cpp
index e0a2fa468..9c6c337a5 100644
--- a/src/BarrelCalorimeterScFi_geo.cpp
+++ b/src/BarrelCalorimeterScFi_geo.cpp
@@ -237,7 +237,7 @@ void buildFibers(Detector& desc, SensitiveDetector& sens, Volume& s_vol, int lay
struct Fiber {
Point pos;
bool assigned = false;
- Fiber(const Point& p) : pos(p){};
+ Fiber(const Point& p) : pos(p) {};
};
std::vector fibers(f_pos.begin(), f_pos.end());
diff --git a/src/SupportServiceMaterial_geo.cpp b/src/SupportServiceMaterial_geo.cpp
index c476f888c..2bab39730 100644
--- a/src/SupportServiceMaterial_geo.cpp
+++ b/src/SupportServiceMaterial_geo.cpp
@@ -44,15 +44,23 @@ std::pair build_shape(const Detector& descr, const xml_det_
const double thickness = getAttrOrDefault(x_child, _U(thickness), x_support.thickness());
const double length = getAttrOrDefault(x_child, _U(length), x_support.length());
const double rmin = getAttrOrDefault(x_child, _U(rmin), x_support.rmin()) + offset;
- solid = Tube(rmin, rmin + thickness, length / 2);
+ const double phimin = getAttrOrDefault(
+ x_child, _Unicode(phimin), getAttrOrDefault(x_support, _Unicode(phimin), 0.0 * deg));
+ const double phimax = getAttrOrDefault(
+ x_child, _Unicode(phimax), getAttrOrDefault(x_support, _Unicode(phimax), 360.0 * deg));
+ solid = Tube(rmin, rmin + thickness, length / 2, phimin, phimax);
}
// A disk is a cylinder, constructed differently
else if (type == "Disk") {
const double thickness = getAttrOrDefault(x_child, _U(thickness), x_support.thickness());
const double rmin = getAttrOrDefault(x_child, _U(rmin), x_support.rmin());
const double rmax = getAttrOrDefault(x_child, _U(rmax), x_support.rmax());
+ const double phimin = getAttrOrDefault(
+ x_child, _Unicode(phimin), getAttrOrDefault(x_support, _Unicode(phimin), 0.0 * deg));
+ const double phimax = getAttrOrDefault(
+ x_child, _Unicode(phimax), getAttrOrDefault(x_support, _Unicode(phimax), 360.0 * deg));
pos3D = pos3D + Position(0, 0, -x_support.thickness() / 2 + thickness / 2 + offset);
- solid = Tube(rmin, rmax, thickness / 2);
+ solid = Tube(rmin, rmax, thickness / 2, phimin, phimax);
} else if (type == "Cone") {
const double base_rmin1 = getAttrOrDefault(x_child, _U(rmin1), x_support.rmin1());
const double base_rmin2 = getAttrOrDefault(x_child, _U(rmin2), x_support.rmin2());
@@ -68,7 +76,57 @@ std::pair build_shape(const Detector& descr, const xml_det_
const double rmin2 = base_rmin2 + transverse_offset;
const double rmax1 = rmin1 + transverse_thickness;
const double rmax2 = rmin2 + transverse_thickness;
- solid = Cone(length / 2, rmin1, rmax1, rmin2, rmax2);
+ // Allow for optional hard rmin/rmax cutoffs
+ const double rmin = getAttrOrDefault(
+ x_child, _U(rmin), getAttrOrDefault(x_support, _Unicode(rmin), min(rmin1, rmin2)));
+ const double rmax = getAttrOrDefault(
+ x_child, _U(rmax), getAttrOrDefault(x_support, _Unicode(rmax), max(rmax1, rmax2)));
+ if (rmin > min(rmax1, rmax2)) {
+ printout(ERROR, x_det.nameStr(),
+ "%s: rmin (%f mm) must be smaller than the smallest rmax (%f %f mm)",
+ x_support.nameStr().c_str(), rmin / mm, rmax1 / mm, rmax2 / mm);
+ std::exit(1);
+ }
+ if (rmax < max(base_rmin1, base_rmin2)) {
+ printout(ERROR, x_det.nameStr(),
+ "%s: rmax (%f mm) must be larger than the largest rmin (%f %f mm)",
+ x_support.nameStr().c_str(), rmax / mm, base_rmin1 / mm, base_rmin2 / mm);
+ std::exit(1);
+ }
+ const double zmin = -length / 2 + length * (rmin - rmin1) / (rmin2 - rmin1);
+ const double zmax = -length / 2 + length * (rmax - rmax1) / (rmax2 - rmax1);
+ const auto rmin_at = [&](const double z) {
+ return rmin1 + (z + length / 2) * (rmin2 - rmin1) / length;
+ };
+ const auto rmax_at = [&](const double z) {
+ return rmax1 + (z + length / 2) * (rmax2 - rmax1) / length;
+ };
+ // Allow for optional phimin/phimax
+ const double phimin = getAttrOrDefault(
+ x_child, _Unicode(phimin), getAttrOrDefault(x_support, _Unicode(phimin), 0.0 * deg));
+ const double phimax = getAttrOrDefault(
+ x_child, _Unicode(phimax), getAttrOrDefault(x_support, _Unicode(phimax), 360.0 * deg));
+ const double deltaphi = phimax - phimin;
+ const double epsilon{TGeoShape::Tolerance()};
+ if (fabs(zmin) >= length / 2 - epsilon && fabs(zmax) >= length / 2 - epsilon) {
+ if (fabs(phimax - phimin - 360 * deg) < epsilon) {
+ solid = Cone(length / 2, rmin1, rmax1, rmin2, rmax2);
+ } else {
+ solid = ConeSegment(length / 2, rmin1, rmax1, rmin2, rmax2, phimin, phimax);
+ }
+ } else {
+ std::vector v_rmin{max(rmin1, rmin), max(rmin2, rmin)},
+ v_rmax{min(rmax1, rmax), min(rmax2, rmax)}, v_z{-length / 2, +length / 2};
+ for (const auto& z :
+ (zmin < zmax ? std::vector{zmin, zmax} : std::vector{zmax, zmin})) {
+ if (-length / 2 + epsilon < z && z < -epsilon + length / 2) {
+ v_rmin.insert(std::prev(v_rmin.end()), std::max(rmin, rmin_at(z)));
+ v_rmax.insert(std::prev(v_rmax.end()), std::min(rmax, rmax_at(z)));
+ v_z.insert(std::prev(v_z.end()), z);
+ }
+ }
+ solid = Polycone(phimin, deltaphi, v_rmin, v_rmax, v_z);
+ }
} else {
printout(ERROR, x_det.nameStr(), "Unknown support type: %s", type.c_str());
std::exit(1);