Skip to content

Commit

Permalink
Central field wire, side field wire, sense wire have independent mate…
Browse files Browse the repository at this point in the history
…rial definition
  • Loading branch information
atolosadelgado committed Apr 12, 2024
1 parent 10ab93a commit c969cc1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion FCCee/IDEA/compact/IDEA_o1_v03/DriftChamber_o1_v02.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@
</gas>
<!-- /detectors/detector/wires -->
<wires
material="W"
vis="dch_no_vis_nodaughters"
buildSenseWires="True"
buildFieldWires="True"
SWire_thickness ="DCH_SWire_thickness"
FSideWire_thickness ="DCH_FSideWire_thickness"
FCentralWire_thickness="DCH_FCentralWire_thickness"
SWire_material ="W"
FSideWire_material ="Al"
FCentralWire_material="Al"
>
</wires>
</detector>
Expand Down
17 changes: 10 additions & 7 deletions detector/tracker/DriftChamber_o1_v02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand


auto wiresElem = detElem.child("wires");
auto wiresMat = desc.material(wiresElem.attr<std::string>(_Unicode(material)));
auto wiresVis = desc.visAttributes(wiresElem.attr<std::string>(_Unicode(vis)));
bool buildSenseWires = wiresElem.attr<bool>(_Unicode(buildSenseWires));
bool buildFieldWires = wiresElem.attr<bool>(_Unicode(buildFieldWires));
Expand All @@ -189,6 +188,10 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
MyLength_t dch_FSideWire_thickness = wiresElem.attr<double>(_Unicode(FSideWire_thickness)) ;
MyLength_t dch_FCentralWire_thickness = wiresElem.attr<double>(_Unicode(FCentralWire_thickness)) ;

auto dch_SWire_material = desc.material(wiresElem.attr<std::string>(_Unicode(SWire_material)) ) ;
auto dch_FSideWire_material = desc.material(wiresElem.attr<std::string>(_Unicode(FSideWire_material)) ) ;
auto dch_FCentralWire_material = desc.material(wiresElem.attr<std::string>(_Unicode(FCentralWire_material)) ) ;

/* Geometry tree:
* Wall (tube) -> Gas (tube) -> Layer_1 (hyp) -> cell_1 (twisted tube)
* -> cell_... (twisted tube)
Expand Down Expand Up @@ -300,7 +303,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
if(buildSenseWires)
{
dd4hep::Tube swire_s(0., dch_SWire_thickness, swlength);
dd4hep::Volume swire_v(cell_name+"_swire", swire_s, wiresMat);
dd4hep::Volume swire_v(cell_name+"_swire", swire_s, dch_SWire_material);
swire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX stereoTr( (-1.)*l.StereoSign()*DCH_i.stereoangle_z0(cell_rave_z0) );
Expand Down Expand Up @@ -368,7 +371,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
- safety_z_interspace;

dd4hep::Tube fwire_s(0., fwire_radius, fwire_length);
dd4hep::Volume fwire_v(cell_name+"_f2wire", fwire_s, wiresMat );
dd4hep::Volume fwire_v(cell_name+"_f2wire", fwire_s, dch_FCentralWire_material );
fwire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX fwireStereoTr( fwire_stereo );
Expand All @@ -392,7 +395,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
- safety_z_interspace;

dd4hep::Tube fwire_s(0., fwire_radius, fwire_length);
dd4hep::Volume fwire_v(cell_name+"_f1wire", fwire_s, wiresMat );
dd4hep::Volume fwire_v(cell_name+"_f1wire", fwire_s, dch_FSideWire_material );
fwire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX fwireStereoTr( fwire_stereo );
Expand All @@ -415,7 +418,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
- safety_z_interspace;

dd4hep::Tube fwire_s(0., fwire_radius, fwire_length);
dd4hep::Volume fwire_v(cell_name+"_f3wire", fwire_s, wiresMat );
dd4hep::Volume fwire_v(cell_name+"_f3wire", fwire_s, dch_FSideWire_material );
fwire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX fwireStereoTr( fwire_stereo );
Expand All @@ -437,7 +440,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
- safety_z_interspace;

dd4hep::Tube fwire_s(0., fwire_radius, fwire_length);
dd4hep::Volume fwire_v(cell_name+"_f5wire", fwire_s, wiresMat );
dd4hep::Volume fwire_v(cell_name+"_f5wire", fwire_s, dch_FSideWire_material );
fwire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX fwireStereoTr( fwire_stereo );
Expand All @@ -458,7 +461,7 @@ static dd4hep::Ref_t create_DCH_o1_v02(dd4hep::Detector &desc, dd4hep::xml::Hand
- safety_z_interspace;

dd4hep::Tube fwire_s(0., fwire_radius, fwire_length);
dd4hep::Volume fwire_v(cell_name+"_f4wire", fwire_s, wiresMat );
dd4hep::Volume fwire_v(cell_name+"_f4wire", fwire_s, dch_FSideWire_material );
fwire_v.setVisAttributes( wiresVis );
// Change sign of stereo angle to place properly the wire inside the twisted tube
dd4hep::RotationX fwireStereoTr( fwire_stereo );
Expand Down

0 comments on commit c969cc1

Please sign in to comment.