Skip to content

Commit

Permalink
Removed repeated definition in silicon wrapper XML, improved printout…
Browse files Browse the repository at this point in the history
… in vertex detector constructors, changed paths of .stl filesin vertex (still commented out due to overlaps)
  • Loading branch information
armin-ilg committed Sep 25, 2024
1 parent d7cddc0 commit b76f267
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 50 deletions.
71 changes: 30 additions & 41 deletions FCCee/IDEA/compact/IDEA_o1_v03/SiliconWrapper_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,49 @@
<constant name="SiWr_distance_two_sides" value="SiWr_Sensitive_Thickness+SiWr_support_CarbonFiber_thickness+SiWr_Cooling_thickness"/> <!-- Distance between sensor modules along thickness when having alternating modules in front and in the back -->

<!-- Silicon wrapper barrel parameters -->

<!-- Simplified silicon wrapper barrel -->
<constant name="SiWrB_nModules1" value="1"/> <!-- Length of SiWr_half_length = 2400 mm -> Let's take 131 modules with 130 SiWr_mod_overlap gaps (131*42.2+130*-5.4 = 4826.2 mm)-->
<constant name="SiWrB_z" value="SiWrB_half_length"/>

<!-- Complex silicon wrapper barrel -->
<!-- <constant name="SiWrB_nModules1" value="floor((2*SiWrB_half_length - SiWr_mod_overlap)/(SiWr_mod_z + SiWr_mod_overlap))"/> -->
<!-- <constant name="SiWrB_z" value="(SiWrB_nModules1*SiWr_mod_z+(SiWrB_nModules1-1)*SiWr_mod_overlap)/2.0"/> -->

<!-- Other silicon wrapper barrel parameters -->
<constant name="SiWrB_nModules2" value="SiWrB_nModules1"/> <!-- Same number of modules so that gaps in r-phi in layer 1 can be filled by layer 2-->
<constant name="SiWrB_phiOffset2" value="2*pi/SiWrB_nModules2/2."/> <!-- Same number of modules so that gaps in r-phi in layer 1 can be filled by layer 2, offset of half a tile width -->

<constant name="SiWrB_r1" value="SiWrB_inner_radius"/>
<constant name="SiWrB_r2" value="SiWrB_r1 + 2.0*cm"/>

<constant name="SiWrB_Distance_between_staves" value="3.8*mm"/>
<constant name="SiWrB_Staves1" value="floor(2.*pi*SiWrB_inner_radius/(SiWr_mod_rphi+SiWrB_Distance_between_staves))"/> <!-- Circumference of 2*pi*SiWrB_inner_radius divided by width of stave and space between. Floor to get to integer number, 151 -->
<constant name="SiWrB_Staves2" value="SiWrB_Staves1"/> <!-- Use same number of staves for second layer -->

<constant name="SiWrB_nModules1" value="floor((2*SiWrB_half_length - SiWr_mod_overlap)/(SiWr_mod_z + SiWr_mod_overlap))"/> <!-- Length of SiWr_half_length = 2400 mm -> Let's take 131 modules with 130 SiWr_mod_overlap gaps (131*42.2+130*-5.4 = 4826.2 mm)-->
<constant name="SiWrB_nModules2" value="SiWrB_nModules1"/> <!-- Same number of modules so that gaps in r-phi in layer 1 can be filled by layer 2-->
<constant name="SiWrB_phiOffset2" value="2*pi/SiWrB_nModules2/2."/> <!-- Same number of modules so that gaps in r-phi in layer 1 can be filled by layer 2, offset of half a tile width -->

<constant name="SiWrB_z" value="(SiWrB_nModules1*SiWr_mod_z+(SiWrB_nModules1-1)*SiWr_mod_overlap)/2.0"/>

<constant name="SiWrB_offset1" value="0.0*mm"/>
<constant name="SiWrB_offset2" value="0.0*mm"/>


<!-- Silicon wrapper disks parameters -->
<constant name="SiWrD_tile_nmodules" value="6"/>
<constant name="SiWrD_double_tile_nmodules" value="12"/>
<constant name="SiWrD_half_tile_nmodules" value="3"/>

<constant name="SiWrD_tile_length" value="SiWrD_tile_nmodules*SiWr_mod_z+(SiWrD_tile_nmodules-1)*SiWr_mod_overlap"/> <!-- Six modules. Tile length = 6*42.2-5*5.2 = 227.2 mm -->
<constant name="SiWrD_double_tile_length" value="SiWrD_double_tile_nmodules*SiWr_mod_z+(SiWrD_double_tile_nmodules-1)*SiWr_mod_overlap"/> <!-- Double tile with 12 modules. Tile length = 12*42.2-11*5.2 = 454.4 mm -->
<constant name="SiWrD_half_tile_length" value="SiWrD_half_tile_nmodules*SiWr_mod_z+(SiWrD_half_tile_nmodules-1)*SiWr_mod_overlap"/> <!-- Half tile with 3 modules. Tile length = 3*42.2-2*5.2 = 116.2 mm -->
<!-- Complex silicon wrapper disk -->
<!-- <constant name="SiWrD_tile_nmodules" value="6"/> -->
<!-- <constant name="SiWrD_double_tile_nmodules" value="12"/> -->
<!-- <constant name="SiWrD_half_tile_nmodules" value="3"/> -->
<!-- <constant name="SiWrD_tile_length" value="SiWrD_tile_nmodules*SiWr_mod_z+(SiWrD_tile_nmodules-1)*SiWr_mod_overlap"/> -->
<!-- <constant name="SiWrD_double_tile_length" value="SiWrD_double_tile_nmodules*SiWr_mod_z+(SiWrD_double_tile_nmodules-1)*SiWr_mod_overlap"/> -->
<!-- <constant name="SiWrD_half_tile_length" value="SiWrD_half_tile_nmodules*SiWr_mod_z+(SiWrD_half_tile_nmodules-1)*SiWr_mod_overlap"/> -->

<!-- Simplified silicon wrapper disks -->
<constant name="SiWrD_tile_nmodules" value="2"/>
<constant name="SiWrD_double_tile_nmodules" value="4"/>
<constant name="SiWrD_half_tile_nmodules" value="1"/>
<constant name="SiWrD_tile_length" value="3.*SiWrD_tile_nmodules*SiWr_mod_z+(3.*SiWrD_tile_nmodules-1)*SiWr_mod_overlap"/>
<constant name="SiWrD_double_tile_length" value="3.*SiWrD_double_tile_nmodules*SiWr_mod_z+(3.*SiWrD_double_tile_nmodules-1)*SiWr_mod_overlap"/>
<constant name="SiWrD_half_tile_length" value="3.*SiWrD_half_tile_nmodules*SiWr_mod_z+(3.*SiWrD_half_tile_nmodules-1)*SiWr_mod_overlap"/>

<!-- Other silicon wrapper disks parameters -->
<constant name="SiWrD_tile_spacing_row" value="1.0*mm"/>
<constant name="SiWrD_tile_spacing_column" value="1.0*mm"/>

Expand All @@ -118,14 +135,6 @@
<constant name="SiWrD_layer2_offset3" value="SiWrD_rmin2-15.0*mm"/>
<constant name="SiWrD_layer2_offset4" value="SiWrD_rmin2-3.0*mm"/>
<constant name="SiWrD_layer2_offset5" value="SiWrD_rmin2"/>

<!-- Simplified silicon wrapper parameters -->
<constant name="SiWrB_nModules1" value="1"/> <!-- Length of SiWr_half_length = 2400 mm -> Let's take 131 modules with 130 SiWr_mod_overlap gaps (131*42.2+130*-5.4 = 4826.2 mm)-->
<constant name="SiWrB_nModules2" value="SiWrB_nModules1"/> <!-- Same number of modules so that gaps in r-phi in layer 1 can be filled by layer 2-->

<constant name="SiWrD_tile_nmodules" value="2"/>
<constant name="SiWrD_double_tile_nmodules" value="4"/>
<constant name="SiWrD_half_tile_nmodules" value="1"/>
</define>


Expand Down Expand Up @@ -164,12 +173,6 @@
<component thickness="SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="+SiWr_mod_rphi/2.-SiWr_flex_width/2." r="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness" material="GlueEcobond45" vis="SiWrCableVis"/>
</components>

<!-- Simplified flexes. Assume they only consist of Aluminium (pessimistic) -->
<!-- <components name="flexes" r="0.0*mm" length="SiWrB_z">
<component thickness="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness+SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="-SiWr_mod_rphi/2.+SiWr_flex_width/2." r="0.0*mm" material="Al" vis="SiWrCableVis"/>
<component thickness="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness+SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="+SiWr_mod_rphi/2.-SiWr_flex_width/2." r="0.0*mm" material="Al" vis="SiWrCableVis"/>
</components>
-->
<!-- Two ATLASPix3-sized sensors, but with only one periphery region each. Detailed -->
<!-- <sensor r="SiWr_flex_thickness" thickness="SiWr_Sensitive_Thickness" material="Silicon">
<component sensitive="True" ymin="-SiWr_mod_z/2.+SiWr_mod_z_periphery" ymax="SiWr_mod_z/2." xmin="-SiWr_mod_rphi/2." xmax="-SiWr_mod_quad_spacing/2." vis="SiWrSensitiveVis"/> <!~~ Left quad ~~>
Expand Down Expand Up @@ -218,13 +221,7 @@
<component thickness="SiWr_flex_Kapton_thickness" width="SiWr_flex_width" offset="+SiWr_flex_width/2.+SiWr_mod_quad_spacing/2." r="SiWr_flex_Aluminium_thickness" material="KaptonVtx" vis="SiWrCableVis"/>
<component thickness="SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="+SiWr_flex_width/2.+SiWr_mod_quad_spacing/2." r="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness" material="GlueEcobond45" vis="SiWrCableVis"/>
</components>

<!-- Simplified flexes. Just assume they consist only of Aluminium (pessimistic) -->
<!-- <components name="flex_leftQuads" r="SiWr_flex_thickness+SiWr_Sensitive_Thickness+SiWr_support_CarbonFiber_thickness+SiWr_Cooling_thickness+SiWr_Sensitive_Thickness" length="SiWrB_z">
<component thickness="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness+SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="-SiWr_flex_width/2.-SiWr_mod_quad_spacing/2." r="0.0*mm" material="Al" vis="SiWrCableVis"/>
<component thickness="SiWr_flex_Aluminium_thickness+SiWr_flex_Kapton_thickness+SiWr_flex_Glue_thickness" width="SiWr_flex_width" offset="+SiWr_flex_width/2.+SiWr_mod_quad_spacing/2." r="0.0*mm" material="Al" vis="SiWrCableVis"/>
</components>
--> </stave>
</stave>

<!-- Here we construct the barrel -->
<layer nLadders="SiWrB_Staves1" r="SiWrB_r1" offset="SiWrB_offset1" id="0" nmodules="SiWrB_nModules1" name="SiWrStave" step="SiWr_mod_overlap" motherVolLength="2.*SiWrB_z" motherVolThickness="SiWrB_r2-SiWrB_r1" phi0="0.0*rad"/>
Expand Down Expand Up @@ -819,14 +816,6 @@

<!-- Plugin needed for the surfaces-->
<plugins>
<plugin name="DD4hep_GenericSurfaceInstallerPlugin">
<argument value="SiWrB"/>
<argument value="dimension=2"/>
<argument value="u_y=1."/>
<argument value="v_z=1."/>
<argument value="n_x=1."/>
</plugin>

<plugin name="DD4hep_GenericSurfaceInstallerPlugin">
<argument value="SiWrD"/>
<argument value="dimension=2"/>
Expand Down
6 changes: 3 additions & 3 deletions FCCee/IDEA/compact/IDEA_o1_v03/VertexComplete_IDEA_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@
<!-- Vertex inner barrel support structure and cooling cones imported via DDCAD. Disabled because of overlaps within and with Vertex detector -->
<!-- <detector id="DetID_NOTUSED" name="VTXIB_Support_PEEK" type="DD4hep_TestShape_Creator">
<check>
<shape type="CAD_MultiVolume" ref="VertexSupport_PEEK_o1_v03.stl" material="PEEK" unit="mm">
<shape type="CAD_MultiVolume" ref="${K4GEO}/FCCee/IDEA/IDEA_o1_v03/stl_files/VertexSupport_PEEK_o1_v03.stl" material="PEEK" unit="mm">
<volume id="0" name="Body1" material="PEEK" vis="VTXPEEKVis"/>
</shape>
<rotation x="180.0*deg" y="0" z="0"/>
Expand All @@ -1744,7 +1744,7 @@
<detector id="DetID_NOTUSED" name="VTXIB_Support_CarbonFiber" type="DD4hep_TestShape_Creator">
<check>
<shape type="CAD_MultiVolume" ref="VertexSupport_CarbonFiber_o1_v03.stl" material="CarbonFiberVtx" unit="mm">
<shape type="CAD_MultiVolume" ref="${K4GEO}/FCCee/IDEA/IDEA_o1_v03/stl_files/VertexSupport_CarbonFiber_o1_v03.stl" material="CarbonFiberVtx" unit="mm">
<volume id="1" name="Body1" material="CarbonFiberVtx" vis="VTXSupportVis"/>
</shape>
<rotation x="180.0*deg" y="0" z="0"/>
Expand All @@ -1753,7 +1753,7 @@
<detector id="DetID_NOTUSED" name="VTXIB_CoolingCones" type="DD4hep_TestShape_Creator">
<check>
<shape type="CAD_MultiVolume" ref="VertexCoolingCones_o1_v03.stl" material="CarbonFiberVtx" unit="mm">
<shape type="CAD_MultiVolume" ref="${K4GEO}/FCCee/IDEA/IDEA_o1_v03/stl_files/VertexCoolingCones_o1_v03.stl" material="CarbonFiberVtx" unit="mm">
<volume id="2" name="Body1" material="CarbonFiberVtx" vis="VTXSupportVis"/>
</shape>
<rotation x="0" y="0" z="0"/>
Expand Down
11 changes: 8 additions & 3 deletions detector/tracker/VertexBarrel_detailed_o1_v02_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//
//====================================================================
#include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/Printout.h"
#include "XML/Utilities.h"
#include "XMLHandlerDB.h"
#include <exception>
Expand All @@ -38,6 +39,8 @@ using dd4hep::Translation3D;
using dd4hep::Volume;
using dd4hep::getAttrOrDefault;
using dd4hep::_toString;
using dd4hep::DEBUG;
using dd4hep::INFO;

using dd4hep::rec::volSurfaceList;
using dd4hep::rec::Vector3D;
Expand Down Expand Up @@ -287,19 +290,19 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se
}
sensor.width = *max_element(sensor.xmax.begin(), sensor.xmax.end()) - *min_element(sensor.xmin.begin(), sensor.xmin.end());
sensor.length = *max_element(sensor.ymax.begin(), sensor.ymax.end()) - *min_element(sensor.ymin.begin(), sensor.ymin.end());
cout << det_name << ": Module: " << sensor.name << ", sensor width: " << to_string(sensor.width) << ", sensor length: " << to_string(sensor.length) << endl;
printout(DEBUG, det_name, "Module: " + sensor.name + ", sensor width: " + to_string(sensor.width) + ", sensor length: " + to_string(sensor.length) ) ;
m.sensorsVec.push_back(sensor);
}

stave_information_list.push_back(m);
cout << "Read stave information of stave " << m.name << endl;
printout(DEBUG, det_name, "Read stave information of stave " + m.name) ;
}

int iModule_tot = 0;

//========= loop over layer elements in xml ======================================

cout << "Building " << det_name << " barrel detector " << det_name << "..." << endl;
printout(INFO, det_name, "Building of detector ...");
for(xml_coll_t c(e, _U(layer) ); c; ++c) {

xml_comp_t x_layer( c );
Expand Down Expand Up @@ -538,6 +541,8 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se

sdet.setAttributes(theDetector,envelope,x_det.regionStr(),x_det.limitsStr(),x_det.visStr());

printout(INFO, det_name, "Building of detector successfully completed");

return sdet;
}

Expand Down
10 changes: 7 additions & 3 deletions detector/tracker/VertexEndcap_detailed_o1_v02_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ using dd4hep::_toString;
using dd4hep::getAttrOrDefault;
using dd4hep::Box;
using dd4hep::Tube;
using dd4hep::DEBUG;
using dd4hep::INFO;

static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector sens) {
xml_det_t x_det = e;
Expand Down Expand Up @@ -192,13 +194,14 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
}
m.sensor_width = *max_element(m.sensor_xmax.begin(), m.sensor_xmax.end()) - *min_element(m.sensor_xmin.begin(), m.sensor_xmin.end());
m.sensor_length = *max_element(m.sensor_ymax.begin(), m.sensor_ymax.end()) - *min_element(m.sensor_ymin.begin(), m.sensor_ymin.end());
cout << det_name << "Module: " << m.name << ", sensor width: " << to_string(m.sensor_width) << ", sensor length: " << to_string(m.sensor_length) << endl;
printout(DEBUG, det_name, "Module: " + m.name + ", sensor width: " + to_string(m.sensor_width) + ", sensor length: " + to_string(m.sensor_length) );
module_information_list.push_back(m);
}

vector<int> sides = {1};
if(reflect){sides.push_back(-1);}


printout(INFO, det_name, "Building of detector ...");
for(auto & side : sides){
string side_name = det_name + _toString(side,"_side%d");

Expand Down Expand Up @@ -416,10 +419,11 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
side_assembly->GetShape()->ComputeBBox();
}

cout << "Built disks detector:" << det_name << endl;
sdet.setAttributes(theDetector,envelope,x_det.regionStr(),x_det.limitsStr(),x_det.visStr());
pv.addPhysVolID("system", x_det.id());

printout(INFO, det_name, "Building of detector successfully completed.");

return sdet;
}

Expand Down

0 comments on commit b76f267

Please sign in to comment.