Skip to content

Commit

Permalink
[DriftChamber] Define the whole envolope as parameter instead of sens…
Browse files Browse the repository at this point in the history
…itive length
  • Loading branch information
BrieucF committed Aug 4, 2023
1 parent 5e01f49 commit 6d6157d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Detector/DetFCCeeIDEA/compact/IDEA_o1_v01/DriftChamber.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<!-- %%%%%% Central Drift Chamber Basic Parameters %%%%%% -->
<define>
<constant name = "CDCH:r0" value = "345.0*mm"/>
<constant name = "CDCH:z0" value = "0.0*mm"/>
<!-- zHalfLength is for the wire length, the total z extent of the detector will be zHalfLength + GasEndcapWallThick + CopperEndcapWallThick + KaptonEndcapWallThick + CarbonEndcapWallThick = 2250 mm;-->
<constant name = "CDCH:zHalfLength" value = "2000.00*mm"/>
<constant name = "CDCH:zHalfExtentWithServices" value = "2250.00*mm"/>
<constant name = "CDCH:rOut" value = "2000.00*mm"/>
<!-- Angle for the rotation of phi sectors leading to the stereo angle of the wires (the way the chamber will be built)
alpha = angle between the line (0,0,-zHalfLength) - (wireX,wireY,-zHalfLength) and the line (0,0,+zHalfLength) - (wireX,wireY,+zHalfLength) projected on the -zHalfLength plane perpandicular to z
Expand Down Expand Up @@ -48,7 +46,7 @@
<constant name = "CDCH:Carbon2OuterWallThick" value = "2.5*mm"/>
<constant name = "CDCH:CopperOuterWallThick" value = "0.018*mm"/>
<constant name = "CDCH:FoamOuterWallThick" value = "10.000*mm"/>
<constant name = "CDCH:GasEndcapWallThick" value = "249.98750*mm"/>
<constant name = "CDCH:GasEndcapWallThick" value = "249.7475*mm"/>
<constant name = "CDCH:CopperEndcapWallThick" value = "0.0005*mm"/>
<constant name = "CDCH:KaptonEndcapWallThick" value = "0.012*mm"/>
<constant name = "CDCH:CarbonEndcapWallThick" value = "0.240*mm"/>
Expand Down
7 changes: 4 additions & 3 deletions Detector/DetFCCeeIDEA/src/DriftChamber_o1_v00.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
double halfalpha = 0.5 * dd4hep::_toDouble("CDCH:alpha");
double inner_radius = dd4hep::_toDouble("CDCH:r0");
double outer_radius = dd4hep::_toDouble("CDCH:rOut");
double halflength = dd4hep::_toDouble("CDCH:zHalfLength");
double zHalfExtentWithServices = dd4hep::_toDouble("CDCH:zHalfExtentWithServices");
double CarbonInnerWallThick = dd4hep::_toDouble("CDCH:CarbonInnerWallThick");
double CopperInnerWallThick = dd4hep::_toDouble("CDCH:CopperInnerWallThick");
double GasInnerWallThick = dd4hep::_toDouble("CDCH:GasInnerWallThick");
Expand Down Expand Up @@ -153,6 +153,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
int nLayer = dd4hep::_toInt("CDCH:nLayer");
int nFieldWireShells = dd4hep::_toInt("CDCH:nFieldWireShells");
//bool setWireSensitive = true; // FIXME: add the possibility to have wires sensitive (parameter in the xml) which could be useful for detailed chamber behavior studies, current attempt never lead to a hit in the wire, even with enlarged wires...
double halflength = zHalfExtentWithServices - (GasEndcapWallThick + CopperEndcapWallThick + KaptonEndcapWallThick + CarbonEndcapWallThick); // this will be the sensitive volume z extent

double epsilon = 0.0;
double phi_layer = 0.0;
Expand Down Expand Up @@ -245,7 +246,7 @@ void CDCHBuild::build_layer(DetElement parent, Volume parentVol, dd4hep::Sensiti
outer_radius - Carbon1OuterWallThick - Carbon2OuterWallThick - FoamOuterWallThick,
halflength);
dd4hep::Tube OuterWall_Carbon1(outer_radius - Carbon1OuterWallThick - Carbon2OuterWallThick - FoamOuterWallThick,
outer_radius - Carbon2OuterWallThick - FoamOuterWallThick, halflength);
outer_radius - Carbon2OuterWallThick - FoamOuterWallThick, halflength);// FIXME there is an overlap with OuterWall_Carbon1 and the last guard wire layer
dd4hep::Tube OuterWall_Foam(outer_radius - Carbon2OuterWallThick - FoamOuterWallThick,
outer_radius - Carbon2OuterWallThick, halflength);
dd4hep::Tube OuterWall_Carbon2(outer_radius - Carbon2OuterWallThick, outer_radius, halflength);
Expand Down Expand Up @@ -883,7 +884,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& description, xml_h e, dd4h
dd4hep::printout(dd4hep::DEBUG, "CreateCDCH", "Detector name: %s with ID: %s", det_name.c_str(), x_det.id());

DetElement CDCH_det = builder.detector; // ( det_name, x_det.id() );
dd4hep::Tube CDCH_envelope(dd4hep::_toDouble("CDCH:r0"), dd4hep::_toDouble("CDCH:rOut"), dd4hep::_toDouble("CDCH:zHalfLength") + dd4hep::_toDouble("CDCH:GasEndcapWallThick") + dd4hep::_toDouble("CDCH:CopperEndcapWallThick") + dd4hep::_toDouble("CDCH:KaptonEndcapWallThick") + dd4hep::_toDouble("CDCH:CarbonEndcapWallThick"));
dd4hep::Tube CDCH_envelope(dd4hep::_toDouble("CDCH:r0"), dd4hep::_toDouble("CDCH:rOut"), dd4hep::_toDouble("CDCH:zHalfExtentWithServices"));

dd4hep::Volume envelope("lvCDCH", CDCH_envelope, description.air());
envelope.setVisAttributes(description, "vCDCH:Air");
Expand Down

0 comments on commit 6d6157d

Please sign in to comment.