Skip to content

Commit

Permalink
[DriftChamber] Fix mother volume protrusion in the guard layer (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucF authored Aug 2, 2023
1 parent ea262fa commit 0a64048
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Detector/DetFCCeeIDEA/src/DriftChamber_o1_v01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
// The enlarge parameter is used to see the wires in the rendering
//------------------------------------------------------------------------

double enlarge = 50.;
double enlarge = 1.;

//------------------------------------------------------------------------
// Build the inner, outer and endcap walls first
Expand Down Expand Up @@ -284,7 +284,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
throw std::runtime_error("Error: Failed to build CDCH. Please make sure that '(nStoFWireRatio - nVerticalFWire) * (nSWire + SuperLayerIndex * nSDeltaWire)' is always an even number");
phi_layer1 = 2.0 * phi_layer;
scaleFactor = (1.0 + TMath::Pi() / num_wire) / (1.0 - TMath::Pi() / num_wire);
dropFactor = (1.0 / cos(halfalpha) - 1.0);
dropFactor = (1.0 / cos(halfalpha) - 1.0); // used to determine the radius of the hyperboloid in z = +- halflength with r_out = r_min + r_min * dropFactor
epsilonFactor = sin(halfalpha) / halflength;
layerangle = -0.5 * phi;

Expand All @@ -304,8 +304,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
wirecol = "vCDCH:Wire3";

if (SL == 0) {// SL = 0 is special due to the guard wires and the first field wires that lie outside of the sensitive volume
// FIXME there are some volume extrusion here (wire go outside of the hyperboloid)
double stereoOut0 = atan(radius_layerOut_0 * (1.0 * dropFactor * epsilonFactor));
double stereoOut0 = atan(sqrt(diff_of_squares((inGuardRad - inGWradii) + (inGuardRad - inGWradii) * dropFactor, inGuardRad - inGWradii)) / halflength);

dd4hep::Hyperboloid HypeLayer0(inner_radius_0, 0.0, radius_layerOut_0 - secure, stereoOut0, halflength);
lvLayerVol.push_back(dd4hep::Volume("hyperboloid_inner_guard_layer", HypeLayer0, description.material("GasHe_90Isob_10")));
Expand Down

0 comments on commit 0a64048

Please sign in to comment.