Skip to content

Commit

Permalink
Merge branch 'main' into mirror-ribs
Browse files Browse the repository at this point in the history
  • Loading branch information
chchatte92 authored Dec 13, 2023
2 parents 7820d32 + 103f90e commit 8fa2d84
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 64 deletions.
16 changes: 10 additions & 6 deletions compact/definitions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Examples:

</documentation>

<constant name="CentralTrackingRegion_rmax" value="700.0*mm" />
<constant name="CentralTrackingRegion_rmax" value="755.0*mm" />
<constant name="CentralTrackingRegionP_zmax" value="1800.0*mm" />
<constant name="CentralTrackingRegionN_zmax" value="1235.0*mm" />
<constant name="CentralTrackingRegion_length" value="CentralTrackingRegionP_zmax + CentralTrackingRegionN_zmax" />
Expand All @@ -442,7 +442,7 @@ Examples:
<comment> Global PID regions with suballocations for TOF and RICH detectors </comment>
<constant name="ForwardPIDRegion_zmin" value="CentralTrackingRegionP_zmax" />
<constant name="ForwardPIDRegion_length" value="135.0*cm" />
<constant name="ForwardPIDRegion_rmax" value="185.0*cm" />
<constant name="ForwardPIDRegion_rmax" value="180.0*cm" />
<constant name="ForwardTOFRegion_length" value="15.0*cm" />

<comment> Forward RICH region </comment>
Expand Down Expand Up @@ -544,7 +544,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc
<constant name="EcalEndcapN_rmin" value="9.*cm"/> <!-- Currently fix value hardcoded -->
<constant name="EcalEndcapN_rmax" value="63.*cm"/> <!-- Currently fix value hardcoded -->

<constant name="EcalBarrelRegion_thickness" value="35.*cm"/>
<constant name="EcalBarrelRegion_thickness" value="38.*cm"/>
<constant name="EcalBarrel_rmin" value="max(81.*cm, CentralTrackingRegion_rmax + BarrelPIDRegion_thickness + BarrelExtraSpace_thickness)"/> <!-- FIXME hardcoded max -->
<constant name="EcalBarrel_inner_margin" value="2*cm"/>
<constant name="EcalBarrel_rmax" value="EcalBarrel_rmin + EcalBarrelRegion_thickness"/>
Expand All @@ -558,12 +558,16 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc
## Special DIRC parameters (depend on the ECAL setup)
</documentation>
<constant name="DIRCReadout_length" value="30*cm"/>
<comment> Leave 1.9 cm space from the end of mirror to the end of bar box in +z </comment>
<constant name="DIRCMirror_thickness" value="1 * mm"/>
<constant name="DIRCBarbox_space_z" value="1.9*cm"/>
<constant name="DIRCLens_thickness" value="12 * mm"/>
<constant name="DIRCForward_length" value="0*cm"/>
<constant name="DIRCForward_zmax" value="CentralTrackingRegionP_zmax + 5*cm"/>
<constant name="DIRCBackward_zmax" value="287*cm"/>
<constant name="DIRC_thickness" value="3*cm"/>
<constant name="DIRCBackward_zmax" value="303*cm"/>
<constant name="DIRC_thickness" value="3.1*cm"/>
<constant name="DIRC_length" value="DIRCForward_zmax + DIRCBackward_zmax"/>
<constant name="DIRC_offset" value="(DIRCForward_zmax - DIRCBackward_zmax)/2"/>
<constant name="DIRC_offset" value="(DIRCForward_zmax - DIRCBackward_zmax - DIRCMirror_thickness - DIRCBarbox_space_z + DIRCLens_thickness + DIRCReadout_length)/2"/>
<comment>
The DIRC_rmin/rmax values are defined at the center of each stave, such that
the DIRC_rmax can also be used as the OuterBarrelMPGD_rmin value.
Expand Down
49 changes: 10 additions & 39 deletions compact/ecal/barrel_interlayers.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Whitney Armstrong, Chao Peng, Maria Zurek, Jihee Kim -->
<!-- Active AstroPix layers: 1-3-5-6 -->
<!-- Active AstroPix layers: 1-3-4-6 -->


<lccdd>

Expand All @@ -19,11 +20,11 @@
<!-- Number of imaging layer slots -->
<constant name="EcalBarrelImagingLayers_nMax" value="6"/>
<constant name="EcalBarrel_Calorimeter_zmin"
value="min(257*cm, EcalBarrelBackward_zmax)"/>
value="min(258.75*cm, EcalBarrelBackward_zmax)"/>
<constant name="EcalBarrel_Calorimeter_zmax"
value="min(177.5*cm, EcalBarrelForward_zmax)"/>
<constant name="EcalBarrel_Readout_zmin" value="272*cm"/>
<constant name="EcalBarrel_Readout_zmax" value="192.5*cm"/>
value="min(181.25*cm, EcalBarrelForward_zmax)"/>
<constant name="EcalBarrel_Readout_zmin" value="273.75*cm"/>
<constant name="EcalBarrel_Readout_zmax" value="196.25*cm"/>
<constant name="EcalBarrel_Calorimeter_length"
value="EcalBarrel_Calorimeter_zmax + EcalBarrel_Calorimeter_zmin"/>
<constant name="EcalBarrel_Calorimeter_offset"
Expand Down Expand Up @@ -54,10 +55,6 @@
<constant name="EcalBarrel_StaveTilt_angle" value="10*degree"/>
<constant name="EcalBarrel_Stave_ModuleRepeat" value="floor(EcalBarrel_Calorimeter_length / (EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin))"/>

<constant name="EcalBarrel_ImagingFirstLayerThickness"
value="EcalBarrel_AstroPix_thickness
+ EcalBarrel_CarbonThickness"/>

<constant name="EcalBarrel_LayerSpacing" value="10.0*mm"/>
<constant name="EcalBarrel_FiberRadius" value="0.5*mm"/>
<constant name="EcalBarrel_FiberXSpacing" value="1.34*mm"/>
Expand All @@ -84,18 +81,15 @@

<constant name="EcalBarrelImagingLayers_num"
value="min(EcalBarrelImagingLayers_nMax,
floor((EcalBarrel_AvailThickness-EcalBarrel_ImagingFirstLayerThickness)/
(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness +
EcalBarrel_SpaceBetween)))"/>
floor(EcalBarrel_AvailThickness/(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness + EcalBarrel_SpaceBetween)))"/>
<comment>
Adjusting size of the ScFi back chunk to match number of imaging layers
and ~17.1 radiation lengths in total
</comment>
<constant name="EcalBarrel_FiberBulkLayers_num" value = "EcalBarrel_TotalFiberLayers_num-EcalBarrelImagingLayers_num+1"/>

<constant name="EcalBarrel_ImagingPartThickness"
value="(EcalBarrelImagingLayers_num-1)*(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness + EcalBarrel_SpaceBetween)
+ EcalBarrel_ImagingFirstLayerThickness + EcalBarrel_SpaceBetween"/>
value="EcalBarrelImagingLayers_num*(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness + EcalBarrel_SpaceBetween)-EcalBarrel_ScFiLayerThickness"/>
<constant name="EcalBarrel_ScFiPartThickness_max"
value="max(0, EcalBarrel_AvailThickness-EcalBarrel_ImagingPartThickness)"/>
<constant name="EcalBarrel_ScFiPartThickness"
Expand Down Expand Up @@ -135,29 +129,6 @@
z="EcalBarrel_Calorimeter_length"/>
<sectors vis="EcalBarrelSectorVis"/>

<module name="AstroPix_Module_FirstLayer"
vis="EcalBarrelModuleVis">
<module_component name="AstroPix_Chip"
material="Silicon"
width="EcalBarrel_AstroPix_width"
length="EcalBarrel_AstroPix_length"
thickness="EcalBarrel_AstroPix_thickness"
vis="EcalBarrelModuleVis">
<slice material="Silicon" thickness="EcalBarrel_SiliconThickness" vis="EcalBarrelSliceVis" sensitive="yes" limits="cal_limits"/>
<slice material="Silicon" thickness="EcalBarrel_ElectronicsThickness" vis="EcalBarrelSliceVis"/>
<slice material="Copper" thickness="EcalBarrel_CopperThickness" vis="EcalBarrelSliceVis"/>
<slice material="Kapton" thickness="EcalBarrel_KaptonThickness" vis="EcalBarrelSliceVis"/>
<slice material="Epoxy" thickness="EcalBarrel_EpoxyThickness" vis="EcalBarrelSliceVis"/>
</module_component>
<module_component name="AstroPix_Support"
material="CarbonFiber"
width="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
length="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
thickness="EcalBarrel_CarbonThickness"
vis="EcalBarrelSliceVis">
</module_component>
</module>

<module name="AstroPix_Module"
vis="EcalBarrelModuleVis">
<module_component name="AstroPix_Chip"
Expand Down Expand Up @@ -210,7 +181,7 @@
<stave repeat="6"
width="EcalBarrel_Stave_width"
length="EcalBarrel_Stave_length"
thickness="EcalBarrel_AstroPix_thickness"
thickness="EcalBarrel_Stave_thickness"
angle="-EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis">
Expand All @@ -235,7 +206,7 @@
<stave repeat="7"
width="EcalBarrel_Stave_width"
length="EcalBarrel_Stave_length"
thickness="EcalBarrel_AstroPix_thickness"
thickness="EcalBarrel_Stave_thickness"
angle="EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis">
Expand Down
10 changes: 5 additions & 5 deletions compact/pid/dirc.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Dmitry Romanov, Whitney Armstrong, Sylvester Joosten, Wouter Deconinck -->
<!-- Copyright (C) 2022,2023 Dmitry Romanov, Whitney Armstrong, Sylvester Joosten, Wouter Deconinck, Nilanga Wickramaarachchi -->

<lccdd>

Expand All @@ -15,6 +15,7 @@
- DIRC_length
- DIRC_offset
- DIRC_rmin
- DIRC_rmax
- DIRCBox_count (12 full dirc, 1 - a single module)

When DIRC_length is set, it affects bars length (all other lengths are fixed)
Expand Down Expand Up @@ -42,10 +43,8 @@
<!-- Mirror -->
<constant name="DIRCMirror_height" value="20 * mm"/>
<constant name="DIRCMirror_width" value="DIRCPrism_width"/>
<constant name="DIRCMirror_thickness" value="1 * mm"/>

<!-- Lens -->
<constant name="DIRCLens_thickness" value="12 * mm"/>
<constant name="DIRCLens_r1" value="62 * mm"/>
<constant name="DIRCLens_r2" value="36 * mm"/>
<constant name="DIRCLens_height" value="50 * mm"/>
Expand All @@ -59,12 +58,13 @@

<!-- Bar - Each DIRC box consists of N "bars" -->
<!-- BarAssembly - Bars + Glue -->
<constant name="DIRCBarAssm_length" value="DIRC_length - DIRCPrism_length - DIRCMirror_thickness - DIRCLens_thickness - DIRCMCP_thickness" comment="Length of bars+glue assembly"/>
<constant name="DIRCBarAssm_length" value="DIRC_length - DIRCPrism_length - DIRCBarbox_space_z - DIRCMirror_thickness - DIRCLens_thickness - DIRCMCP_thickness" comment="Length of bars+glue assembly"/>
<constant name="DIRCBar_gap" value="0.15 * mm"/>
<constant name="DIRCBar_height" value="17 * mm"/>
<constant name="DIRCBar_width" value="(DIRCPrism_width - (DIRCBar_count_y - 1) * DIRCBar_gap) / DIRCBar_count_y"/>
<constant name="DIRCGlue_thickness" value="0.05 * mm"/>
<constant name="DIRCBar_length" value="(DIRCBarAssm_length - 4 * DIRCGlue_thickness)/4"/>
<constant name="DIRCBar_center" value="(DIRC_rmin + DIRC_rmax)/2" comment="Radial position of center of bar"/>

</define>

Expand Down Expand Up @@ -108,7 +108,7 @@

<detectors>
<detector id="BarrelDIRC_ID" name="cb_DIRC" type="epic_DIRC" readout="DIRCBarHits" vis="DIRCTube">
<dimensions rmin="DIRC_rmin" rmax="DIRC_rmin + DIRCBar_height" length="DIRC_length"/>
<dimensions rmin="DIRCBar_center - DIRCBar_height/2" rmax="DIRCBar_center + DIRCBar_height/2" length="DIRC_length"/>
<position x="0" y="0" z="DIRC_offset"/>
<module name="DIRCBox" repeat="DIRCBox_count" width="DIRCPrism_width + 1*mm" height="DIRCPrism_height*2" length="DIRCBarAssm_length + 550*mm" vis="DIRCBox">
<!-- Mirror (at the end of the module) -->
Expand Down
4 changes: 2 additions & 2 deletions compact/pid/drich.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<!-- tank geometry: cylinder, holding the majority of detector components -->
<constant name="DRICH_rmax2" value="ForwardPIDRegion_rmax"/> <!-- cylinder radius -->
<!-- sensor boxes: extrusions of the tank, to hold the sensors and their services -->
<constant name="DRICH_sensorbox_length" value="10.0*cm"/> <!-- z-length of the extrusion -->
<constant name="DRICH_sensorbox_length" value="50.0*cm"/> <!-- z-length of the extrusion -->
<constant name="DRICH_sensorbox_rmin" value="DRICH_rmax1 + 2*cm"/> <!-- lower radial limit of the extrusion -->
<constant name="DRICH_sensorbox_rmax" value="DRICH_rmax2"/> <!-- upper radial limit of the extrusion -->
<constant name="DRICH_sensorbox_rmax" value="DRICH_rmax2 + 5*cm"/> <!-- upper radial limit of the extrusion -->
<!-- aerogel+filter geometry -->
<constant name="DRICH_aerogel_thickness" value="4.0*cm"/> <!-- aerogel thickness -->
<constant name="DRICH_airgap_thickness" value="0.01*mm"/> <!-- air gap between aerogel and filter -->
Expand Down
4 changes: 2 additions & 2 deletions src/DRICH_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
UnionSolid gasvolUnion0(gasvolTank, gasvolSnout, Position(0., 0., -vesselLength / 2. + windowThickness));

// union: add sensorbox
UnionSolid vesselUnion(vesselUnion0, vesselSensorboxTube, Position(0., 0., -(tankLength + sensorboxLength) / 2.));
UnionSolid gasvolUnion(gasvolUnion0, gasvolSensorboxTube, Position(0., 0., -(tankLength + sensorboxLength) / 2. + windowThickness));
UnionSolid vesselUnion(vesselUnion0, vesselSensorboxTube, Position(0., 0., -(snoutLength + sensorboxLength - 0.6) / 2.));
UnionSolid gasvolUnion(gasvolUnion0, gasvolSensorboxTube, Position(0., 0., -(snoutLength + sensorboxLength) / 2. + windowThickness));

// extra solids for `debugOptics` only
Box vesselBox(1001, 1001, 1001);
Expand Down
2 changes: 0 additions & 2 deletions src/EndcapTOF_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
string m_nam = Form("EndcapTOF_Module1_%d_%d", ix, iy);

int ncomponents = 0;
int sensor_number = 1;
// the module assembly volume
Assembly m_vol(m_nam);
m_vol.setVisAttributes(description.visAttributes(x_modCurr.visStr()));
Expand Down Expand Up @@ -184,7 +183,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
SurfaceType type(SurfaceType::Sensitive);

VolPlane surf(c_vol, type, inner_thickness, outer_thickness, u, v, n);
sensor_number++;

DetElement comp_de(mod_elt, std::string("de_") + pv.volume().name(), module);
comp_de.setPlacement(pv);
Expand Down
2 changes: 0 additions & 2 deletions src/HomogeneousCalorimeter_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,9 @@ static std::tuple<int, std::pair<int, int>> add_12surface_disk(Detector& desc, A
std::pair<double, double> c1 (0., 0.);
auto polyVertex = epic::geo::getPolygonVertices(c1, (rmax/std::cos(Prot)), M_PI/12., 12);
std::vector<epic::geo::Point> out_vertices, in_vertices;
int index = 0;
for( auto p : polyVertex ){
epic::geo::Point a = {p.first, p.second};
out_vertices.push_back(a);
index++;
}

for (xml_coll_t position_i(pts_extrudedpolygon, _U(position)); position_i; ++position_i){
Expand Down
6 changes: 0 additions & 6 deletions src/LFHCAL_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,6 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
int moduleIDy = -1;


int moduleID = 0;



struct position {
double x,y,z;
};
Expand Down Expand Up @@ -908,7 +904,6 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
auto tr8M = Transform3D(Position(pos.x()-pos8M[e].x-0.5*eightM_params.mod_width, pos.y() - pos8M[e].y, pos.z() + pos8M[e].z + length / 2.));
phv = assembly.placeVolume(eightMassembly, tr8M);
phv.addPhysVolID("moduleIDx", moduleIDx).addPhysVolID("moduleIDy", moduleIDy).addPhysVolID("moduletype", 0);
moduleID++;
}

std::vector<position> pos4M;
Expand Down Expand Up @@ -937,7 +932,6 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
auto tr4M = Transform3D(Position(pos.x()-pos4M[f].x-0.5*fourM_params.mod_width, pos.y()-pos4M[f].y, pos.z() + pos4M[f].z + length / 2.));
phv = assembly.placeVolume(fourMassembly, tr4M);
phv.addPhysVolID("moduleIDx", moduleIDx).addPhysVolID("moduleIDy", moduleIDy).addPhysVolID("moduletype", 1);
moduleID++;
}

Volume motherVol = desc.pickMotherVolume(det);
Expand Down

0 comments on commit 8fa2d84

Please sign in to comment.