From b62f5daeca366b1939089d3fde27ab37c83941a5 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 2 Dec 2023 10:25:34 -0600 Subject: [PATCH 1/4] fix: remove unused variables (stricter clang) (#604) ### Briefly, what does this PR introduce? With the upgrade to clang-16, the pipelines started failing due to unused variables. This should fix that. ### What kind of change does this PR introduce? - [x] Bug fix (issue #__) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [x] Changes have been communicated to collaborators: @Chao1009 should get the dRICH PR unstuck ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No. --- src/EndcapTOF_geo.cpp | 2 -- src/HomogeneousCalorimeter_geo.cpp | 2 -- src/LFHCAL_geo.cpp | 6 ------ 3 files changed, 10 deletions(-) diff --git a/src/EndcapTOF_geo.cpp b/src/EndcapTOF_geo.cpp index ab9e4bb31a..9246bff1e0 100644 --- a/src/EndcapTOF_geo.cpp +++ b/src/EndcapTOF_geo.cpp @@ -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())); @@ -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); diff --git a/src/HomogeneousCalorimeter_geo.cpp b/src/HomogeneousCalorimeter_geo.cpp index 99249ec21f..80c89753ae 100644 --- a/src/HomogeneousCalorimeter_geo.cpp +++ b/src/HomogeneousCalorimeter_geo.cpp @@ -310,11 +310,9 @@ static std::tuple> add_12surface_disk(Detector& desc, A std::pair c1 (0., 0.); auto polyVertex = epic::geo::getPolygonVertices(c1, (rmax/std::cos(Prot)), M_PI/12., 12); std::vector 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){ diff --git a/src/LFHCAL_geo.cpp b/src/LFHCAL_geo.cpp index 84f63c96ec..e23dc7957b 100644 --- a/src/LFHCAL_geo.cpp +++ b/src/LFHCAL_geo.cpp @@ -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; }; @@ -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 pos4M; @@ -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); From 8d45ca3affa3d849bf6e43f27320438bf782ddd6 Mon Sep 17 00:00:00 2001 From: Chandradoy Chatterjee Date: Sat, 2 Dec 2023 20:43:27 +0100 Subject: [PATCH 2/4] reduced vessel rmax2 to 180 cm (#592) ### Briefly, what does this PR introduce? The updated geometry table requires the vessel rmax2 to be at 180 cm, but the designed communicated by Marco Contalbrigo requires the sensor box extended up to 185 cm. Also it requires the dRICH vessel length to be 122 cm (currently not implemented) . Marco is in communication with Tanja et al. to make sure the parameters are fine and afterwards this draft PR will be changed to the final PR. ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [X ] Changes have been communicated to collaborators Marco Contalbrigo and @c-dilks are communicated ### Does this PR introduce breaking changes? What changes might users need to make to their code? It should not make any difference. But if the barrel calorimeters are pushed downwards the overlap tests may fail. ### Does this PR change default behavior? It should not make any difference. But if the barrel calorimeters are pushed downwards the overlap tests may fail. Other than this the dRICH performance should not change. --------- Co-authored-by: Chao Peng --- compact/definitions.xml | 2 +- compact/pid/drich.xml | 4 ++-- src/DRICH_geo.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 43ed53ac57..93371fb59c 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -442,7 +442,7 @@ Examples: Global PID regions with suballocations for TOF and RICH detectors - + Forward RICH region diff --git a/compact/pid/drich.xml b/compact/pid/drich.xml index 626a15c2db..8637f6a3c1 100644 --- a/compact/pid/drich.xml +++ b/compact/pid/drich.xml @@ -21,9 +21,9 @@ - + - + diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index 9e368815f4..45c9066a06 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -214,8 +214,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); From 0bd4549577ad9341b2e1038f79eff99a933cc898 Mon Sep 17 00:00:00 2001 From: mariakzurek <33816222+mariakzurek@users.noreply.github.com> Date: Fri, 8 Dec 2023 18:05:52 -0500 Subject: [PATCH 3/4] Adjust Barrel ECal geometry according to the geometry database (#606) ### Briefly, what does this PR introduce? This PR related to the issue https://github.com/eic/epic/issues/552, and implements small changes in the Barrel ECal geometry to make it more realistic. The following changes has been implemented: - SciFi/Pb z_min and z_max (and accordingly the full length) has been implemented according to https://eic.jlab.org/Geometry/Detector/Detector-20231031150001.html. - The total depth (envelope) of the calorimeter has been increased to 38 cm (from fixed 35 cm). 38 cm envelope is the correct one and fits both the SciFi and the 3 cm back Al plate. - ~~In every AstroPix stave a carbon fiber slice has been added to mimic a bit better the material of the staves~~ ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [x] New feature (issue #552) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [x] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No ### Does this PR change default behavior? Calorimeter (SciFi/Pb matrix) length, offset, and z_min z_max are in agreement with the geometry database: Output of `npdet_info dump $DETECTOR_PATH/epic_craterlake.xml | grep EcalBarrel` ``` EcalBarrel_AvailThickness = 35.000 = EcalBarrelRegion_thickness - EcalBarrel_Support_thickness EcalBarrel_Calorimeter_length = 440.000 = EcalBarrel_Calorimeter_zmax + EcalBarrel_Calorimeter_zmin EcalBarrel_Calorimeter_offset = -38.750 = (EcalBarrel_Calorimeter_zmax - EcalBarrel_Calorimeter_zmin)/2.0 EcalBarrel_Calorimeter_zmax = 181.250 = min(181.25*cm, EcalBarrelForward_zmax) EcalBarrel_Calorimeter_zmin = 258.750 = min(258.75*cm, EcalBarrelBackward_zmax) ``` Now calorimeter has proper depth (together with back plate) ![SciFi part of the Calo. 12th layer has now proper width.](https://github.com/eic/epic/assets/33816222/70384133-39c5-4fb6-a19c-c5c5fbc1093b) ![Zoom on AstroPix part of the Calo](https://github.com/eic/epic/assets/33816222/f11b6e6d-8a06-430b-93f0-b3ff8c5273e4) Not included in this PR because of the problem with overlaps Below you can see the Carbon Fiber slice added to each stave. ![AstroPix part of the sector](https://github.com/eic/epic/assets/33816222/d3edbe40-14eb-46de-9908-454f46d5d30d) ![Zoom on one layer with modules](https://github.com/eic/epic/assets/33816222/a127bc45-79ca-479f-887f-a325e1a263b9) --------- Co-authored-by: Maria --- compact/definitions.xml | 2 +- compact/ecal/barrel_interlayers.xml | 49 ++++++----------------------- 2 files changed, 11 insertions(+), 40 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 93371fb59c..c51d827997 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -544,7 +544,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + diff --git a/compact/ecal/barrel_interlayers.xml b/compact/ecal/barrel_interlayers.xml index 3b2afeee02..7cac6d7963 100644 --- a/compact/ecal/barrel_interlayers.xml +++ b/compact/ecal/barrel_interlayers.xml @@ -1,6 +1,7 @@ - + + @@ -19,11 +20,11 @@ + value="min(258.75*cm, EcalBarrelBackward_zmax)"/> - - + value="min(181.25*cm, EcalBarrelForward_zmax)"/> + + - - @@ -84,9 +81,7 @@ + floor(EcalBarrel_AvailThickness/(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness + EcalBarrel_SpaceBetween)))"/> Adjusting size of the ScFi back chunk to match number of imaging layers and ~17.1 radiation lengths in total @@ -94,8 +89,7 @@ + value="EcalBarrelImagingLayers_num*(EcalBarrel_ImagingLayerThickness + EcalBarrel_ScFiLayerThickness + EcalBarrel_SpaceBetween)-EcalBarrel_ScFiLayerThickness"/> - - - - - - - - - - - - @@ -235,7 +206,7 @@ From 103f90e98ffe0cf522a6955fb35ef775958858f8 Mon Sep 17 00:00:00 2001 From: Nilanga Wickramaarachchi Date: Sat, 9 Dec 2023 06:57:44 -1000 Subject: [PATCH 4/4] update parameters for DIRC (#586) ### Briefly, what does this PR introduce? This implements following parameters for DIRC. - Inner radius of 75.5 cm and outer radius of 78.6 cm for the DIRC bar box. The center of bar is at the average of those two values (r = 77.05 cm). ![dirc_r](https://github.com/eic/epic/assets/23059941/c9c46b40-949b-45f1-b4d8-07194b3ffeac) - DIRC readout starts at z = -303 cm. - Bar box ends at z = 185 cm. DIRC bar ends at z = 183 cm. ![dirc_z](https://github.com/eic/epic/assets/23059941/664a9ca1-c809-4621-a005-0185ad18557b) ### What kind of change does this PR introduce? - [x] Bug fix (issue #568) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? ### Does this PR change default behavior? --- compact/definitions.xml | 12 ++++++++---- compact/pid/dirc.xml | 10 +++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index c51d827997..0d53b1b7ac 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -424,7 +424,7 @@ Examples: - + @@ -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) + Leave 1.9 cm space from the end of mirror to the end of bar box in +z + + + - - + + - + 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. diff --git a/compact/pid/dirc.xml b/compact/pid/dirc.xml index 0b8b9629dd..8ddaf3bd7d 100644 --- a/compact/pid/dirc.xml +++ b/compact/pid/dirc.xml @@ -1,5 +1,5 @@ - + @@ -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) @@ -42,10 +43,8 @@ - - @@ -59,12 +58,13 @@ - + + @@ -108,7 +108,7 @@ - +