From 6a8f3db66b5bd7404170837b0645d896267d07f0 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Wed, 21 Sep 2022 08:39:01 +0200 Subject: [PATCH 01/50] Updated nHCal with segmentation based on STAR EEMC 10 layers with 4 cm steel and 0.4 cm scintillator Signed-off-by: lkosarz --- compact/definitions.xml | 5 +++-- compact/hcal/hcal_backward.xml | 13 ++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 6533c2e8b..50bf38eed 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -506,7 +506,8 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc ## Calorimeter Parameters - + + @@ -564,7 +565,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index ffef427c6..a3afd5570 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -3,8 +3,8 @@ #### Material Thickness - - + + - Hcal Endcap N Layers and computed Thickness @@ -40,7 +40,7 @@ calorimeterType="HAD_ENDCAP" reflect="true"> @@ -54,8 +54,11 @@ - - system:8,barrel:3,module:4,layer:8,slice:5,x:32:-16,y:-16 + + system:8,barrel:3,module:4,layer:8,slice:5,r:32:-16,phi:-16 From e22c9425b00106f33dd7b62913632f8fed3d899a Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 26 Sep 2022 01:27:20 +0200 Subject: [PATCH 02/50] Moved to other HcalEndcapN definitions Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 50bf38eed..bf0fe96dc 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -506,7 +506,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc ## Calorimeter Parameters - @@ -552,6 +551,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc ## Hadronic Calorimeter Parameters + From b5e1f44f6806c163f6d625ed1a51de056ba08101 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 26 Sep 2022 01:36:29 +0200 Subject: [PATCH 03/50] Placing fixed to HcalEndcapN Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index bf0fe96dc..377530ec1 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -551,7 +551,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc ## Hadronic Calorimeter Parameters - @@ -564,6 +563,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc + From b0cb821e705a9e7491aa7e3be9098a17e0792a6d Mon Sep 17 00:00:00 2001 From: lkosarz Date: Tue, 27 Sep 2022 16:58:21 +0200 Subject: [PATCH 04/50] Testing 12 bins in R (eta) for nHCal Signed-off-by: lkosarz --- compact/definitions.xml | 2 ++ compact/hcal/hcal_backward.xml | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 377530ec1..e29478f96 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -569,6 +569,8 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm + diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index a3afd5570..72d5ece82 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -43,7 +43,7 @@ numsides="HcalEndcapN_CaloSides" zmin="HcalEndcapN_zmin" rmin="HcalEndcapN_rmin" - rmax="HcalBarrel_rmax"/> + rmax="HcalEndcapN_rmax"/> @@ -54,8 +54,12 @@ + system:8,barrel:3,module:4,layer:8,slice:5,r:32:-16,phi:-16 From 5f97a5b30b393ce0102bc349813086b834f3ebc2 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Fri, 30 Sep 2022 11:53:36 +0200 Subject: [PATCH 05/50] First try of extrapolating tlie sizes Signed-off-by: lkosarz --- compact/hcal/hcal_backward.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 72d5ece82..295bff851 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -59,7 +59,7 @@ grid_phi_values="6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg" offset_phi="0.0*deg"/>--> system:8,barrel:3,module:4,layer:8,slice:5,r:32:-16,phi:-16 From 11f551519a00858a84460b0cca4a2be870ab14cb Mon Sep 17 00:00:00 2001 From: lkosarz Date: Sun, 2 Oct 2022 18:12:04 +0200 Subject: [PATCH 06/50] Updated extrapolated bins in R with a linear fit in eta Signed-off-by: lkosarz --- compact/hcal/hcal_backward.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 295bff851..5fb860acf 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -59,7 +59,7 @@ grid_phi_values="6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg 6*deg" offset_phi="0.0*deg"/>--> system:8,barrel:3,module:4,layer:8,slice:5,r:32:-16,phi:-16 From abe1c97e27c1e46af370eb360b6c7850f2c3cb04 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 4 Oct 2022 13:40:57 +0200 Subject: [PATCH 07/50] Update compact/definitions.xml Co-authored-by: Wouter Deconinck --- compact/definitions.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 99a0ee5a6..b8e8cb28c 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -509,7 +509,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc ## Calorimeter Parameters - From d640e5b03695e48ab661b6de4016796501a4122f Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 4 Oct 2022 13:41:23 +0200 Subject: [PATCH 08/50] Update compact/definitions.xml Co-authored-by: Wouter Deconinck --- compact/definitions.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index b8e8cb28c..617586be7 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -572,8 +572,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm - From 00731896fdd88a83e1d0d27605bb24c7473b9863 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Tue, 4 Oct 2022 15:13:18 +0200 Subject: [PATCH 09/50] Updated number of bins in phi from 36x6*deg to 60x6*deg Signed-off-by: lkosarz --- compact/hcal/hcal_backward.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 5fb860acf..7062422a0 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -54,13 +54,16 @@ - system:8,barrel:3,module:4,layer:8,slice:5,r:32:-16,phi:-16 From 2b5abcf4ee58a545c455ae8af6989204f944aba5 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 18 Oct 2022 19:38:17 -0500 Subject: [PATCH 10/50] fix: extend HcalEndcapN r segments to rmin/rmax --- compact/hcal/hcal_backward.xml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index f1268a8e9..213c1f931 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -16,16 +16,6 @@ - - - - - - - - - - @@ -55,9 +45,9 @@ HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm - + @@ -581,7 +581,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + From c3b27108b69edae5d942817e5356c23635226967 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Fri, 28 Oct 2022 19:33:45 +0200 Subject: [PATCH 12/50] Moved HcalEndcapN radii to hcal/hcal_backward.xml Removed empty environments Signed-off-by: lkosarz --- compact/definitions.xml | 3 --- compact/hcal/hcal_backward.xml | 18 +++++------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index f57b59ef5..190f9a00e 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -604,8 +604,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm - @@ -615,7 +613,6 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 7062422a0..7abd96b8d 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -5,6 +5,10 @@ + + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm + + - Hcal Endcap N Layers and computed Thickness @@ -17,15 +21,6 @@ - - - - - - - - - @@ -69,7 +64,4 @@ - - - - \ No newline at end of file + From 6f270f559a1bae49b289601d2ac3964ff2a6a208 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Fri, 28 Oct 2022 19:36:49 +0200 Subject: [PATCH 13/50] Added HcalEndcapN_rmin and HcalEndcapN_rmax to segmentation limits Signed-off-by: lkosarz --- compact/hcal/hcal_backward.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 7abd96b8d..39c21e998 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -50,9 +50,9 @@ + @@ -612,7 +613,8 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + + diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 39c21e998..56128233c 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -7,8 +7,8 @@ HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm - - + + - Hcal Endcap N Layers and computed Thickness @@ -37,8 +37,8 @@ + rmin=HcalEndcapN_segments_rmin + rmax="HcalEndcapN_segments_rmax"/> @@ -50,9 +50,9 @@ + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index 56128233c..d3402c615 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -6,7 +6,6 @@ - HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm From bb57fe2c1cc90a4367c080955d0f71d70c97b4c7 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Wed, 9 Nov 2022 00:34:17 +0100 Subject: [PATCH 16/50] Fix issue #277 - error due to hits hitting nHCal corners Signed-off-by: lkosarz --- compact/hcal/hcal_backward.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compact/hcal/hcal_backward.xml b/compact/hcal/hcal_backward.xml index d3402c615..b9ac97bc0 100644 --- a/compact/hcal/hcal_backward.xml +++ b/compact/hcal/hcal_backward.xml @@ -6,8 +6,9 @@ + - + - Hcal Endcap N Layers and computed Thickness @@ -37,7 +38,7 @@ numsides="HcalEndcapN_CaloSides" zmin="HcalEndcapN_zmin" rmin=HcalEndcapN_segments_rmin - rmax="HcalEndcapN_segments_rmax"/> + rmax="HcalEndcapN_polyhedron_rmax"/> From 60391ad399017fc6f2493fd192320aa41fc25c76 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Sun, 17 Dec 2023 21:23:00 -0500 Subject: [PATCH 17/50] Fix the zmin position of the nHCal with respect to service gap Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 0efb351ab..9444c1de9 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -589,7 +589,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm From 98c9a1f990cb7b703dd8f1b36b22adadefe0a9a7 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Sun, 17 Dec 2023 22:16:34 -0500 Subject: [PATCH 18/50] Smal fix Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 9444c1de9..ebda159f9 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -589,7 +589,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm From f1bd1bafa178c73a2bf113f157b396614a202322 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Sun, 17 Dec 2023 22:18:01 -0500 Subject: [PATCH 19/50] Changed order Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index ebda159f9..9382ad3e1 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -589,8 +589,8 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm From e164a39e43b8f24a7323a537738cd28c397bf466 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Sun, 17 Dec 2023 23:13:23 -0500 Subject: [PATCH 20/50] Fix nHCal position to the back and add a 64 cm gap behind service gap Signed-off-by: lkosarz --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 0d53b1b7a..26c2865a6 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -595,7 +595,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm From dd544e006af34eac9a5d5663ea7af6d398293ee6 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Sat, 30 Dec 2023 01:37:29 +0100 Subject: [PATCH 21/50] Added backward endcap flux return steel (flux return, collar, oculus) Signed-off-by: Kosarzewski --- compact/definitions.xml | 4 +- compact/hcal/backward_endcap_flux.xml | 40 ++++++++++++++ configurations/calorimeters.yml | 1 + src/EndcapFluxReturn_geo.cpp | 75 +++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 compact/hcal/backward_endcap_flux.xml create mode 100644 src/EndcapFluxReturn_geo.cpp diff --git a/compact/definitions.xml b/compact/definitions.xml index 26c2865a6..884619aac 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -191,8 +191,9 @@ The unused IDs below are saved for future use. - Barrel subassembly ID: 111 - EndcapP subassembly ID: 112 - EndcapN subassembly ID: 113 + - FluxEndcapN subassembly ID: 118 - - Unused IDs: 117-119 + - Unused IDs: 118-119 @@ -201,6 +202,7 @@ The unused IDs below are saved for future use. + #### (120-129) (near) Forward reserved diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml new file mode 100644 index 000000000..3ecb4bb0e --- /dev/null +++ b/compact/hcal/backward_endcap_flux.xml @@ -0,0 +1,40 @@ + + + + + + + #### Material constants + + + + + + + + + + + + + + + + + + + ### Backwards (Negative Z) Endcap Hadronic Calorimeter + + + + + + + + + + + + + + diff --git a/configurations/calorimeters.yml b/configurations/calorimeters.yml index 50b627645..542f38c2c 100644 --- a/configurations/calorimeters.yml +++ b/configurations/calorimeters.yml @@ -11,3 +11,4 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp new file mode 100644 index 000000000..ead043413 --- /dev/null +++ b/src/EndcapFluxReturn_geo.cpp @@ -0,0 +1,75 @@ +#include "DD4hep/DetFactoryHelper.h" +#include "TVector3.h" +#include "XML/Layering.h" +using namespace std; +using namespace dd4hep; +using namespace dd4hep::detail; + + +static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector sens) +{ + xml_det_t x_det = e; + xml_dim_t dim = x_det.dimensions(); + int det_id = x_det.id(); + string det_name = x_det.nameStr(); + Material air = description.air(); + // int numsides = dim.numsides(); + xml::Component pos = x_det.position(); + double rmin = dim.rmin(); + double rmax = dim.rmax(); + double zmin = dim.zmin(); + + double disksGap = 0.0; + + Layering layering(x_det); + double totalThickness = layering.totalThickness(); + + Volume endcapVol("endcap", Tube(rmin, rmax + 2 * cm, totalThickness), air); // rmax + 2 * cm -to account for disk gap + DetElement endcap("endcap", det_id); + + double layerZ = -totalThickness / 2; + endcapVol.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); + + int iLayer = 0; + double globalZ = zmin; + // Looping through all the different layer sections + for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { + xml_comp_t x_layer = xc; + + double layer_rmax = x_layer.rmax(); + double layer_rmin = x_layer.rmin(); + double layer_thickness = x_layer.thickness(); + + Material l_mat = description.material(x_layer.materialStr()); + + + Volume halfdisk("halfdisk", Tube(layer_rmin, layer_rmax, layer_thickness / 2, M_PI / 2, M_PI * 3 / 2), l_mat); + halfdisk.setVisAttributes(description.visAttributes(x_layer.visStr())); + PlacedVolume s_phv1 = endcapVol.placeVolume(halfdisk, Position(-disksGap / 2, 0, 0)); + s_phv1.addPhysVolID("halfdisk", 0); + PlacedVolume s_phv2 = endcapVol.placeVolume(halfdisk, Transform3D(RotationZYX(M_PI, 0, 0), Position(+disksGap / 2, 0, 0))); + s_phv2.addPhysVolID("halfdisk", 1); + + } + + double z_pos = zmin + totalThickness / 2; + PlacedVolume pv; + // Reflect it. + Assembly assembly(det_name); + DetElement endcapAssyDE(det_name, det_id); + Volume motherVol = description.pickMotherVolume(endcapAssyDE); + + pv = assembly.placeVolume(endcapVol, Transform3D(RotationZYX(0, 0, 0), Position(0, 0, -z_pos))); + pv.addPhysVolID("barrel", 1); + Ref_t(endcap)->SetName((det_name + "_backward").c_str()); + endcap.setPlacement(pv); + + endcapAssyDE.add(endcap); + pv = motherVol.placeVolume(assembly, Position(pos.x(), pos.y(), pos.z())); + pv.addPhysVolID("system", det_id); + endcapAssyDE.setPlacement(pv); + return endcapAssyDE; +} + +// clang-format off +DECLARE_DETELEMENT(epic_EndcapFluxReturnN, create_detector) From 902fce4f59c02a2578e197a356e7d0073ff42a72 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Sat, 30 Dec 2023 01:49:29 +0100 Subject: [PATCH 22/50] Update name="FluxEndcapN_ID" to 117 Signed-off-by: Kosarzewski --- compact/definitions.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 884619aac..be7d4efe1 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -191,7 +191,7 @@ The unused IDs below are saved for future use. - Barrel subassembly ID: 111 - EndcapP subassembly ID: 112 - EndcapN subassembly ID: 113 - - FluxEndcapN subassembly ID: 118 + - FluxEndcapN subassembly ID: 117 - Unused IDs: 118-119 @@ -202,7 +202,7 @@ The unused IDs below are saved for future use. - + #### (120-129) (near) Forward reserved From 391fd76f5c0ada4ad330a19b9c29fedce9c4b2f5 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Sat, 30 Dec 2023 11:42:03 +0100 Subject: [PATCH 23/50] Corrected positions of flux return, collar and oculus set according to parameter table No physical overlaps visible/possible, but still getting errors: Error in : Wrong bounding box for volume endcapFlux Error in : Wrong bounding box for volume FluxEndcapN Produces fake overlaps indicating some issue in hierarchy, but in principlle works Signed-off-by: Kosarzewski --- compact/definitions.xml | 2 +- compact/display.xml | 2 ++ compact/hcal/backward_endcap_flux.xml | 11 +++++----- configurations/arches.yml | 1 + configurations/brycecanyon.yml | 1 + configurations/central.yml | 1 + configurations/craterlake.yml | 1 + configurations/full.yml | 1 + src/EndcapFluxReturn_geo.cpp | 29 +++++++++++++++++++-------- 9 files changed, 35 insertions(+), 14 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index be7d4efe1..d921c5ad4 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -610,7 +610,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + These are used by ddsim, the region where we store all secondaries diff --git a/compact/display.xml b/compact/display.xml index c940bd022..4b6b5011d 100644 --- a/compact/display.xml +++ b/compact/display.xml @@ -98,6 +98,8 @@ + + Passive steel for flux return diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index 3ecb4bb0e..c2394b414 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -15,6 +15,7 @@ + @@ -25,13 +26,13 @@ ### Backwards (Negative Z) Endcap Hadronic Calorimeter - + - + - - - + + + diff --git a/configurations/arches.yml b/configurations/arches.yml index 52691fe7c..004e43f65 100644 --- a/configurations/arches.yml +++ b/configurations/arches.yml @@ -25,6 +25,7 @@ features: lfhcal_without_space_for_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/brycecanyon.yml b/configurations/brycecanyon.yml index 5da9620da..4e0cd3e8c 100644 --- a/configurations/brycecanyon.yml +++ b/configurations/brycecanyon.yml @@ -26,6 +26,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/central.yml b/configurations/central.yml index 352eee8b2..b7f997e53 100644 --- a/configurations/central.yml +++ b/configurations/central.yml @@ -25,3 +25,4 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: diff --git a/configurations/craterlake.yml b/configurations/craterlake.yml index 7e301e7ba..51a600e8d 100644 --- a/configurations/craterlake.yml +++ b/configurations/craterlake.yml @@ -29,6 +29,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/full.yml b/configurations/full.yml index dbe3eefaf..d99001e42 100644 --- a/configurations/full.yml +++ b/configurations/full.yml @@ -25,6 +25,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index ead043413..f9aece388 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -6,7 +6,7 @@ using namespace dd4hep; using namespace dd4hep::detail; -static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector sens) +static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] SensitiveDetector sens) { xml_det_t x_det = e; xml_dim_t dim = x_det.dimensions(); @@ -24,32 +24,45 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s Layering layering(x_det); double totalThickness = layering.totalThickness(); - Volume endcapVol("endcap", Tube(rmin, rmax + 2 * cm, totalThickness), air); // rmax + 2 * cm -to account for disk gap - DetElement endcap("endcap", det_id); + Volume endcapVol("endcapFlux", Tube(rmin, rmax + 2 * cm, totalThickness), air); // rmax + 2 * cm -to account for disk gap + DetElement endcap("endcapFlux", det_id); - double layerZ = -totalThickness / 2; endcapVol.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); - int iLayer = 0; - double globalZ = zmin; + //int iLayer = 0; + //double globalZ = zmin; // Looping through all the different layer sections for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { xml_comp_t x_layer = xc; + int layer_id = x_layer.id(); double layer_rmax = x_layer.rmax(); double layer_rmin = x_layer.rmin(); double layer_thickness = x_layer.thickness(); + double layer_zpos = x_layer.zpos(); Material l_mat = description.material(x_layer.materialStr()); + DetElement disk_ele("disk_ele", layer_id); + Volume disk(x_layer.nameStr(), Tube(layer_rmin, layer_rmax, layer_thickness / 2, 0.0, 2.0 * M_PI), air); + disk.setVisAttributes(description.visAttributes(x_layer.visStr())); + Volume halfdisk("halfdisk", Tube(layer_rmin, layer_rmax, layer_thickness / 2, M_PI / 2, M_PI * 3 / 2), l_mat); halfdisk.setVisAttributes(description.visAttributes(x_layer.visStr())); - PlacedVolume s_phv1 = endcapVol.placeVolume(halfdisk, Position(-disksGap / 2, 0, 0)); + PlacedVolume s_phv1 = disk.placeVolume(halfdisk, Position(-disksGap / 2, 0, 0)); s_phv1.addPhysVolID("halfdisk", 0); - PlacedVolume s_phv2 = endcapVol.placeVolume(halfdisk, Transform3D(RotationZYX(M_PI, 0, 0), Position(+disksGap / 2, 0, 0))); + PlacedVolume s_phv2 = disk.placeVolume(halfdisk, Transform3D(RotationZYX(M_PI, 0, 0), Position(+disksGap / 2, 0, 0))); s_phv2.addPhysVolID("halfdisk", 1); + //disk_ele.setPlacement(s_phv1); + //disk_ele.setPlacement(s_phv2); + + + PlacedVolume s_phv = endcapVol.placeVolume(disk, Position(0, 0, -layer_thickness/2-layer_zpos)); + s_phv.addPhysVolID(x_layer.nameStr(), layer_id); + disk_ele.setPlacement(s_phv); + } double z_pos = zmin + totalThickness / 2; From 339d1c579b94455c78e092f07ca18bbf67189ba9 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Thu, 4 Jan 2024 18:15:50 -0500 Subject: [PATCH 24/50] Adjusted mother endcapFlux mother volume to avoid overlaps Signed-off-by: Kosarzewski --- compact/hcal/backward_endcap_flux.xml | 5 ++++- src/EndcapFluxReturn_geo.cpp | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index c2394b414..27ea808eb 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -28,7 +28,10 @@ - + diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index f9aece388..3eb4dc9ce 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -19,12 +19,27 @@ static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] Se double rmax = dim.rmax(); double zmin = dim.zmin(); + + double rmin_oculus = getAttrOrDefault(dim, _Unicode(rmin_oculus), 0.); + double rmax_oculus = getAttrOrDefault(dim, _Unicode(rmax_oculus), 0.); + double thickness_oculus = getAttrOrDefault(dim, _Unicode(thickness_oculus), 0.); + double rmin_flux = getAttrOrDefault(dim, _Unicode(rmin_flux), 0.); + double rmax_flux = getAttrOrDefault(dim, _Unicode(rmax_flux), 0.); + double thickness_flux = getAttrOrDefault(dim, _Unicode(thickness_flux), 0.); + + double disksGap = 0.0; Layering layering(x_det); double totalThickness = layering.totalThickness(); - Volume endcapVol("endcapFlux", Tube(rmin, rmax + 2 * cm, totalThickness), air); // rmax + 2 * cm -to account for disk gap + Tube tube_collar(rmin, rmax, totalThickness); + Tube tube_oculus(rmin_oculus, rmax_oculus, thickness_oculus); + Tube tube_flux(rmin_flux, rmax_flux, thickness_flux); + + UnionSolid endcapSolid(UnionSolid(tube_collar, tube_oculus), tube_flux); + + Volume endcapVol("endcapFlux", endcapSolid, air); // rmax + 2 * cm -to account for disk gap DetElement endcap("endcapFlux", det_id); endcapVol.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); From 470aba49da249cf937770e141f3906b492866f4e Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Thu, 4 Jan 2024 20:18:42 -0500 Subject: [PATCH 25/50] Simplified the implementation - no overlaps. Signed-off-by: Kosarzewski --- compact/hcal/backward_endcap_flux.xml | 24 ++++++---- src/EndcapFluxReturn_geo.cpp | 66 ++++++--------------------- 2 files changed, 30 insertions(+), 60 deletions(-) diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index 27ea808eb..58e23aeec 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -27,16 +27,22 @@ ### Backwards (Negative Z) Endcap Hadronic Calorimeter - - + + - - - - - + + + + diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 3eb4dc9ce..7110a4061 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -9,43 +9,22 @@ using namespace dd4hep::detail; static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] SensitiveDetector sens) { xml_det_t x_det = e; - xml_dim_t dim = x_det.dimensions(); + //xml_dim_t dim = x_det.dimensions(); int det_id = x_det.id(); string det_name = x_det.nameStr(); Material air = description.air(); - // int numsides = dim.numsides(); - xml::Component pos = x_det.position(); - double rmin = dim.rmin(); - double rmax = dim.rmax(); - double zmin = dim.zmin(); + xml::Component x_pos = x_det.position(); - double rmin_oculus = getAttrOrDefault(dim, _Unicode(rmin_oculus), 0.); - double rmax_oculus = getAttrOrDefault(dim, _Unicode(rmax_oculus), 0.); - double thickness_oculus = getAttrOrDefault(dim, _Unicode(thickness_oculus), 0.); - double rmin_flux = getAttrOrDefault(dim, _Unicode(rmin_flux), 0.); - double rmax_flux = getAttrOrDefault(dim, _Unicode(rmax_flux), 0.); - double thickness_flux = getAttrOrDefault(dim, _Unicode(thickness_flux), 0.); - + Assembly assembly(det_name); + DetElement sdet(det_name, det_id); + PlacedVolume pv; double disksGap = 0.0; Layering layering(x_det); - double totalThickness = layering.totalThickness(); - - Tube tube_collar(rmin, rmax, totalThickness); - Tube tube_oculus(rmin_oculus, rmax_oculus, thickness_oculus); - Tube tube_flux(rmin_flux, rmax_flux, thickness_flux); - - UnionSolid endcapSolid(UnionSolid(tube_collar, tube_oculus), tube_flux); - - Volume endcapVol("endcapFlux", endcapSolid, air); // rmax + 2 * cm -to account for disk gap - DetElement endcap("endcapFlux", det_id); + //double totalThickness = layering.totalThickness(); - endcapVol.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); - - //int iLayer = 0; - //double globalZ = zmin; // Looping through all the different layer sections for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { xml_comp_t x_layer = xc; @@ -70,33 +49,18 @@ static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] Se PlacedVolume s_phv2 = disk.placeVolume(halfdisk, Transform3D(RotationZYX(M_PI, 0, 0), Position(+disksGap / 2, 0, 0))); s_phv2.addPhysVolID("halfdisk", 1); - //disk_ele.setPlacement(s_phv1); - //disk_ele.setPlacement(s_phv2); - - - PlacedVolume s_phv = endcapVol.placeVolume(disk, Position(0, 0, -layer_thickness/2-layer_zpos)); - s_phv.addPhysVolID(x_layer.nameStr(), layer_id); - disk_ele.setPlacement(s_phv); + pv = assembly.placeVolume(disk, Position(0, 0, -layer_thickness/2-layer_zpos)); + pv.addPhysVolID(x_layer.nameStr(), layer_id); + disk_ele.setPlacement(pv); } - double z_pos = zmin + totalThickness / 2; - PlacedVolume pv; - // Reflect it. - Assembly assembly(det_name); - DetElement endcapAssyDE(det_name, det_id); - Volume motherVol = description.pickMotherVolume(endcapAssyDE); - - pv = assembly.placeVolume(endcapVol, Transform3D(RotationZYX(0, 0, 0), Position(0, 0, -z_pos))); - pv.addPhysVolID("barrel", 1); - Ref_t(endcap)->SetName((det_name + "_backward").c_str()); - endcap.setPlacement(pv); - - endcapAssyDE.add(endcap); - pv = motherVol.placeVolume(assembly, Position(pos.x(), pos.y(), pos.z())); - pv.addPhysVolID("system", det_id); - endcapAssyDE.setPlacement(pv); - return endcapAssyDE; + // Get position and place volume + Position pos(x_pos.x(), x_pos.y(), x_pos.z()); + pv = description.pickMotherVolume(sdet).placeVolume(assembly, pos); + pv.addPhysVolID("system", det_id).addPhysVolID("barrel", 0); + sdet.setPlacement(pv); + return sdet; } // clang-format off From d5b88978efd249c74a9ed3625dc326551e9c5d90 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Thu, 18 Jan 2024 12:12:15 -0500 Subject: [PATCH 26/50] Moved flux return, collar and oculus dimensions to definitions Consistent with detector parameters table: https://eic.jlab.org/Geometry/Detector/Detector-20240117135224.html Signed-off-by: Kosarzewski --- compact/definitions.xml | 11 +++++++++++ compact/hcal/backward_endcap_flux.xml | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index d921c5ad4..b944508d6 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -612,6 +612,17 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc + + + + + + + + + + + These are used by ddsim, the region where we store all secondaries diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index 58e23aeec..7334307e1 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -6,15 +6,6 @@ #### Material constants - - - - - - - - - From f3a0a28be8278efd54d57f75c8101c582220801d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 22:15:47 +0000 Subject: [PATCH 27/50] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- compact/definitions.xml | 6 +++--- compact/hcal/backward_endcap_flux.xml | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index b944508d6..990ec925a 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -597,7 +597,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm @@ -612,7 +612,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + @@ -622,7 +622,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc - + These are used by ddsim, the region where we store all secondaries diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index 7334307e1..25f7e3219 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -19,21 +19,21 @@ - + - - + + From 0761d143971c333355c3eb1f37a71cf951187ebf Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 22 Jan 2024 20:55:13 -0500 Subject: [PATCH 28/50] Removed detector ID for endcap flux return assembly Signed-off-by: lkosarz --- compact/definitions.xml | 2 -- compact/hcal/backward_endcap_flux.xml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index b944508d6..7b290a7cb 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -191,7 +191,6 @@ The unused IDs below are saved for future use. - Barrel subassembly ID: 111 - EndcapP subassembly ID: 112 - EndcapN subassembly ID: 113 - - FluxEndcapN subassembly ID: 117 - Unused IDs: 118-119 @@ -202,7 +201,6 @@ The unused IDs below are saved for future use. - #### (120-129) (near) Forward reserved diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index 7334307e1..600f12b95 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -17,7 +17,7 @@ ### Backwards (Negative Z) Endcap Hadronic Calorimeter - + Date: Tue, 23 Jan 2024 14:09:24 -0500 Subject: [PATCH 29/50] Added missing SPDX license Signed-off-by: Kosarzewski --- src/EndcapFluxReturn_geo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 7110a4061..379c172f1 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -1,3 +1,12 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (C) 2024 Leszek Kosarzewski + +//========================================================================== +// Implementation of backward endcap flux return +//-------------------------------------------------------------------------- +// Author: Leszek Kosarzewski (OSU) +//========================================================================== + #include "DD4hep/DetFactoryHelper.h" #include "TVector3.h" #include "XML/Layering.h" From c9acf14b4afaced19698dffcb01cbef4d129bef3 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:37:58 -0500 Subject: [PATCH 30/50] Update compact/definitions.xml Co-authored-by: Wouter Deconinck --- compact/definitions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/definitions.xml b/compact/definitions.xml index 20aea8164..e8d63b29a 100644 --- a/compact/definitions.xml +++ b/compact/definitions.xml @@ -192,7 +192,7 @@ The unused IDs below are saved for future use. - EndcapP subassembly ID: 112 - EndcapN subassembly ID: 113 - - Unused IDs: 118-119 + - Unused IDs: 117-119 From 5033d411b37926b344f9f1a9f41d1d7eee08f0cb Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:38:22 -0500 Subject: [PATCH 31/50] Update compact/display.xml Co-authored-by: Wouter Deconinck --- compact/display.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/display.xml b/compact/display.xml index 4b6b5011d..16a85c7a9 100644 --- a/compact/display.xml +++ b/compact/display.xml @@ -98,7 +98,7 @@ - + Passive steel for flux return From db6c48f9803db1e9e01f2fb71825af1087aa8a57 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:38:34 -0500 Subject: [PATCH 32/50] Update compact/hcal/backward_endcap_flux.xml Co-authored-by: Wouter Deconinck --- compact/hcal/backward_endcap_flux.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index fde556fa2..e42aeb187 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -15,7 +15,7 @@ - ### Backwards (Negative Z) Endcap Hadronic Calorimeter + ### Backwards (Negative Z) Endcap Flux Return From 6d5b4cd808088655cf17e7f736d101483a6cb673 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:39:07 -0500 Subject: [PATCH 33/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Wouter Deconinck --- src/EndcapFluxReturn_geo.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 379c172f1..ac5cb3799 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -18,7 +18,6 @@ using namespace dd4hep::detail; static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] SensitiveDetector sens) { xml_det_t x_det = e; - //xml_dim_t dim = x_det.dimensions(); int det_id = x_det.id(); string det_name = x_det.nameStr(); Material air = description.air(); From e78ad4a31c499ce82496c4f29c9db1e8a41e1b07 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:39:18 -0500 Subject: [PATCH 34/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Wouter Deconinck --- src/EndcapFluxReturn_geo.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index ac5cb3799..f73d4f554 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -31,7 +31,6 @@ static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] Se double disksGap = 0.0; Layering layering(x_det); - //double totalThickness = layering.totalThickness(); // Looping through all the different layer sections for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { From a817e2f7362f58d45d5710de9196bfbdbc9fdbfe Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Tue, 23 Jan 2024 16:15:13 -0500 Subject: [PATCH 35/50] Removed namespace declarations Signed-off-by: Kosarzewski --- src/EndcapFluxReturn_geo.cpp | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index f73d4f554..2c6a71b00 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -10,28 +10,26 @@ #include "DD4hep/DetFactoryHelper.h" #include "TVector3.h" #include "XML/Layering.h" -using namespace std; +/*using namespace std; using namespace dd4hep; using namespace dd4hep::detail; +*/ - -static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] SensitiveDetector sens) +static dd4hep::Ref_t create_detector(dd4hep::Detector& description, xml_h e, [[maybe_unused]] dd4hep::SensitiveDetector sens) { xml_det_t x_det = e; int det_id = x_det.id(); - string det_name = x_det.nameStr(); - Material air = description.air(); - xml::Component x_pos = x_det.position(); + std::string det_name = x_det.nameStr(); + dd4hep::Material air = description.air(); + xml_comp_t x_pos = x_det.position(); - Assembly assembly(det_name); - DetElement sdet(det_name, det_id); - PlacedVolume pv; + dd4hep::Assembly assembly(det_name); + dd4hep::DetElement sdet(det_name, det_id); + dd4hep::PlacedVolume pv; double disksGap = 0.0; - Layering layering(x_det); - // Looping through all the different layer sections for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { xml_comp_t x_layer = xc; @@ -42,28 +40,28 @@ static Ref_t create_detector(Detector& description, xml_h e, [[maybe_unused]] Se double layer_thickness = x_layer.thickness(); double layer_zpos = x_layer.zpos(); - Material l_mat = description.material(x_layer.materialStr()); + dd4hep::Material l_mat = description.material(x_layer.materialStr()); - DetElement disk_ele("disk_ele", layer_id); - Volume disk(x_layer.nameStr(), Tube(layer_rmin, layer_rmax, layer_thickness / 2, 0.0, 2.0 * M_PI), air); + dd4hep::DetElement disk_ele("disk_ele", layer_id); + dd4hep::Volume disk(x_layer.nameStr(), dd4hep::Tube(layer_rmin, layer_rmax, layer_thickness / 2, 0.0, 2.0 * M_PI), air); disk.setVisAttributes(description.visAttributes(x_layer.visStr())); - Volume halfdisk("halfdisk", Tube(layer_rmin, layer_rmax, layer_thickness / 2, M_PI / 2, M_PI * 3 / 2), l_mat); + dd4hep::Volume halfdisk("halfdisk", dd4hep::Tube(layer_rmin, layer_rmax, layer_thickness / 2, M_PI / 2, M_PI * 3 / 2), l_mat); halfdisk.setVisAttributes(description.visAttributes(x_layer.visStr())); - PlacedVolume s_phv1 = disk.placeVolume(halfdisk, Position(-disksGap / 2, 0, 0)); + dd4hep::PlacedVolume s_phv1 = disk.placeVolume(halfdisk, dd4hep::Position(-disksGap / 2, 0, 0)); s_phv1.addPhysVolID("halfdisk", 0); - PlacedVolume s_phv2 = disk.placeVolume(halfdisk, Transform3D(RotationZYX(M_PI, 0, 0), Position(+disksGap / 2, 0, 0))); + dd4hep::PlacedVolume s_phv2 = disk.placeVolume(halfdisk, dd4hep::Transform3D(dd4hep::RotationZYX(M_PI, 0, 0), dd4hep::Position(+disksGap / 2, 0, 0))); s_phv2.addPhysVolID("halfdisk", 1); - pv = assembly.placeVolume(disk, Position(0, 0, -layer_thickness/2-layer_zpos)); + pv = assembly.placeVolume(disk, dd4hep::Position(0, 0, -layer_thickness/2-layer_zpos)); pv.addPhysVolID(x_layer.nameStr(), layer_id); disk_ele.setPlacement(pv); } // Get position and place volume - Position pos(x_pos.x(), x_pos.y(), x_pos.z()); + dd4hep::Position pos(x_pos.x(), x_pos.y(), x_pos.z()); pv = description.pickMotherVolume(sdet).placeVolume(assembly, pos); pv.addPhysVolID("system", det_id).addPhysVolID("barrel", 0); sdet.setPlacement(pv); From 659de79a65625a963669d7042bcd2ba6df3dfbb4 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Tue, 23 Jan 2024 16:17:32 -0500 Subject: [PATCH 36/50] Changed FluxEndcapN_zpos -> FluxEndcapN_zshift Signed-off-by: Kosarzewski --- compact/hcal/backward_endcap_flux.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index e42aeb187..a28e79707 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -6,7 +6,7 @@ #### Material constants - + @@ -29,7 +29,7 @@ thickness="FluxEndcapN_oculus_thickness" vis="FluxEndcapNLayerVis" /> From 1cab5d9a10cf98dfc1343f74cdf20966a0f7f529 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Fri, 26 Jan 2024 12:46:14 -0500 Subject: [PATCH 37/50] Added endcap flux return to more configurations Signed-off-by: Kosarzewski --- configurations/craterlake_10x100.yml | 1 + configurations/craterlake_18x110_Au.yml | 1 + configurations/craterlake_18x275.yml | 1 + configurations/craterlake_5x41.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/configurations/craterlake_10x100.yml b/configurations/craterlake_10x100.yml index 90d1f700f..2bf1db35d 100644 --- a/configurations/craterlake_10x100.yml +++ b/configurations/craterlake_10x100.yml @@ -29,6 +29,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/craterlake_18x110_Au.yml b/configurations/craterlake_18x110_Au.yml index 2862122c2..98a383739 100644 --- a/configurations/craterlake_18x110_Au.yml +++ b/configurations/craterlake_18x110_Au.yml @@ -29,6 +29,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/craterlake_18x275.yml b/configurations/craterlake_18x275.yml index 72f037a22..e9a96660c 100644 --- a/configurations/craterlake_18x275.yml +++ b/configurations/craterlake_18x275.yml @@ -29,6 +29,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: diff --git a/configurations/craterlake_5x41.yml b/configurations/craterlake_5x41.yml index 7e301e7ba..51a600e8d 100644 --- a/configurations/craterlake_5x41.yml +++ b/configurations/craterlake_5x41.yml @@ -29,6 +29,7 @@ features: forward_insert: barrel_gdml: backward: + backward_endcap_flux: far_forward: far_forward: far_backward: From 40862147ce2e64562b6ed21b2e57c9780fabe2f9 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:38:47 -0500 Subject: [PATCH 38/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Dmitry Kalinkin --- src/EndcapFluxReturn_geo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 2c6a71b00..7f529299e 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -56,7 +56,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& description, xml_h e, [[m pv = assembly.placeVolume(disk, dd4hep::Position(0, 0, -layer_thickness/2-layer_zpos)); - pv.addPhysVolID(x_layer.nameStr(), layer_id); + pv.addPhysVolID("layer", layer_id); disk_ele.setPlacement(pv); } From 94916d0d8c569fced15fa36151618cae47175c2f Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:38:56 -0500 Subject: [PATCH 39/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Dmitry Kalinkin --- src/EndcapFluxReturn_geo.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 7f529299e..68d3e2a69 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -68,5 +68,4 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& description, xml_h e, [[m return sdet; } -// clang-format off DECLARE_DETELEMENT(epic_EndcapFluxReturnN, create_detector) From c4228d87bf96387228294c4543063cda8863f62f Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:39:04 -0500 Subject: [PATCH 40/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Dmitry Kalinkin --- src/EndcapFluxReturn_geo.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 68d3e2a69..130f5086f 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -10,10 +10,6 @@ #include "DD4hep/DetFactoryHelper.h" #include "TVector3.h" #include "XML/Layering.h" -/*using namespace std; -using namespace dd4hep; -using namespace dd4hep::detail; -*/ static dd4hep::Ref_t create_detector(dd4hep::Detector& description, xml_h e, [[maybe_unused]] dd4hep::SensitiveDetector sens) { From 9681f9d2aa3b18b46c6363d303c3ebae026f56a9 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:39:27 -0500 Subject: [PATCH 41/50] Update src/EndcapFluxReturn_geo.cpp Co-authored-by: Dmitry Kalinkin --- src/EndcapFluxReturn_geo.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EndcapFluxReturn_geo.cpp b/src/EndcapFluxReturn_geo.cpp index 130f5086f..c17158e94 100644 --- a/src/EndcapFluxReturn_geo.cpp +++ b/src/EndcapFluxReturn_geo.cpp @@ -59,7 +59,6 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& description, xml_h e, [[m // Get position and place volume dd4hep::Position pos(x_pos.x(), x_pos.y(), x_pos.z()); pv = description.pickMotherVolume(sdet).placeVolume(assembly, pos); - pv.addPhysVolID("system", det_id).addPhysVolID("barrel", 0); sdet.setPlacement(pv); return sdet; } From 29ac35530e8165deb40916140461295655785119 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:39:35 -0500 Subject: [PATCH 42/50] Update compact/hcal/backward_endcap_flux.xml Co-authored-by: Dmitry Kalinkin --- compact/hcal/backward_endcap_flux.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/hcal/backward_endcap_flux.xml b/compact/hcal/backward_endcap_flux.xml index a28e79707..64595615c 100644 --- a/compact/hcal/backward_endcap_flux.xml +++ b/compact/hcal/backward_endcap_flux.xml @@ -4,7 +4,7 @@ - #### Material constants + #### Dimension constants From 04b78e967b5990c89cff252884b14bc32ddaae7a Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:39:44 -0500 Subject: [PATCH 43/50] Update compact/display.xml Co-authored-by: Dmitry Kalinkin --- compact/display.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/display.xml b/compact/display.xml index 16a85c7a9..c81004252 100644 --- a/compact/display.xml +++ b/compact/display.xml @@ -99,7 +99,7 @@ - + Passive steel for flux return From c2dc5b2407b4cafc7c01ad116306fcc408c41d5d Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 17 Jun 2024 21:50:33 -0400 Subject: [PATCH 44/50] Rotated sensitive volumes to offset rotation of assembly and segmentation Signed-off-by: lkosarz --- src/PolyhedraEndcapCalorimeter2_geo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedraEndcapCalorimeter2_geo.cpp b/src/PolyhedraEndcapCalorimeter2_geo.cpp index 546b84278..571290336 100644 --- a/src/PolyhedraEndcapCalorimeter2_geo.cpp +++ b/src/PolyhedraEndcapCalorimeter2_geo.cpp @@ -74,7 +74,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s s_vol.setVisAttributes(description.visAttributes(x_slice.visStr())); sliceZ += s_thick / 2; - PlacedVolume s_phv = l_vol.placeVolume(s_vol, Position(0, 0, sliceZ)); + PlacedVolume s_phv = l_vol.placeVolume(s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ)); s_phv.addPhysVolID("slice", s_num); if (x_slice.isSensitive()) { sens.setType("calorimeter"); From 920e8508a1260d516f071eaee0df9becec792113 Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 17 Jun 2024 22:45:48 -0400 Subject: [PATCH 45/50] added HCal only config Signed-off-by: lkosarz --- configurations/hcal_only.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 configurations/hcal_only.yml diff --git a/configurations/hcal_only.yml b/configurations/hcal_only.yml new file mode 100644 index 000000000..50bd658e9 --- /dev/null +++ b/configurations/hcal_only.yml @@ -0,0 +1,4 @@ +features: + hcal: + backward: + backward_endcap_flux: \ No newline at end of file From 2322756291a254c8de17a37487ec6dc6d3db8eef Mon Sep 17 00:00:00 2001 From: lkosarz Date: Mon, 17 Jun 2024 23:04:09 -0400 Subject: [PATCH 46/50] Fix transform Signed-off-by: lkosarz --- src/PolyhedraEndcapCalorimeter2_geo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedraEndcapCalorimeter2_geo.cpp b/src/PolyhedraEndcapCalorimeter2_geo.cpp index 571290336..e4997392a 100644 --- a/src/PolyhedraEndcapCalorimeter2_geo.cpp +++ b/src/PolyhedraEndcapCalorimeter2_geo.cpp @@ -74,7 +74,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s s_vol.setVisAttributes(description.visAttributes(x_slice.visStr())); sliceZ += s_thick / 2; - PlacedVolume s_phv = l_vol.placeVolume(s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ)); + PlacedVolume s_phv = l_vol.placeVolume(s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ))); s_phv.addPhysVolID("slice", s_num); if (x_slice.isSensitive()) { sens.setType("calorimeter"); From c05221a287acc12aabb58e297ad7c36dc8ce74e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:14:25 +0000 Subject: [PATCH 47/50] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- configurations/hcal_only.yml | 2 +- src/PolyhedraEndcapCalorimeter2_geo.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configurations/hcal_only.yml b/configurations/hcal_only.yml index 50bd658e9..1e331c41b 100644 --- a/configurations/hcal_only.yml +++ b/configurations/hcal_only.yml @@ -1,4 +1,4 @@ features: hcal: backward: - backward_endcap_flux: \ No newline at end of file + backward_endcap_flux: diff --git a/src/PolyhedraEndcapCalorimeter2_geo.cpp b/src/PolyhedraEndcapCalorimeter2_geo.cpp index e4997392a..fbaed58d0 100644 --- a/src/PolyhedraEndcapCalorimeter2_geo.cpp +++ b/src/PolyhedraEndcapCalorimeter2_geo.cpp @@ -74,7 +74,8 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s s_vol.setVisAttributes(description.visAttributes(x_slice.visStr())); sliceZ += s_thick / 2; - PlacedVolume s_phv = l_vol.placeVolume(s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ))); + PlacedVolume s_phv = l_vol.placeVolume( + s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ))); s_phv.addPhysVolID("slice", s_num); if (x_slice.isSensitive()) { sens.setType("calorimeter"); From 7e1498f20144bdba3a53ec0ce2d7904fb769435f Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Thu, 20 Jun 2024 12:40:47 -0400 Subject: [PATCH 48/50] Rename hcal_only.yml to backward_hcal_only.yml Signed-off-by: Kosarzewski --- configurations/{hcal_only.yml => backward_hcal_only.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename configurations/{hcal_only.yml => backward_hcal_only.yml} (100%) diff --git a/configurations/hcal_only.yml b/configurations/backward_hcal_only.yml similarity index 100% rename from configurations/hcal_only.yml rename to configurations/backward_hcal_only.yml From 46734ff0c9c3195dbadf42f5616f530e7bdde975 Mon Sep 17 00:00:00 2001 From: lkosarz <42405623+lkosarz@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:50:39 -0400 Subject: [PATCH 49/50] Rename hcal_only.yml to backward_hcal_only.yml --- configurations/{hcal_only.yml => backward_hcal_only.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename configurations/{hcal_only.yml => backward_hcal_only.yml} (100%) diff --git a/configurations/hcal_only.yml b/configurations/backward_hcal_only.yml similarity index 100% rename from configurations/hcal_only.yml rename to configurations/backward_hcal_only.yml From f776083bd43eb826755e08834dbee2c18e6ba6d3 Mon Sep 17 00:00:00 2001 From: Kosarzewski Date: Thu, 20 Jun 2024 13:51:34 -0400 Subject: [PATCH 50/50] Fix overlaps Signed-off-by: Kosarzewski --- compact/hcal/backward.xml | 2 +- src/PolyhedraEndcapCalorimeter2_geo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compact/hcal/backward.xml b/compact/hcal/backward.xml index 2df2373cd..5f23ab662 100644 --- a/compact/hcal/backward.xml +++ b/compact/hcal/backward.xml @@ -20,7 +20,7 @@ + value="HcalEndcapNSteelThickness + HcalEndcapNPolystyreneThickness + HcalEndcapNLayerGap"/> diff --git a/src/PolyhedraEndcapCalorimeter2_geo.cpp b/src/PolyhedraEndcapCalorimeter2_geo.cpp index e4997392a..cdcb46f88 100644 --- a/src/PolyhedraEndcapCalorimeter2_geo.cpp +++ b/src/PolyhedraEndcapCalorimeter2_geo.cpp @@ -70,7 +70,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s string s_name = _toString(s_num, "slice%d"); double s_thick = x_slice.thickness(); Material s_mat = description.material(x_slice.materialStr()); - Volume s_vol(s_name, PolyhedraRegular(numsides, rmin, rmax, s_thick), s_mat); + Volume s_vol(s_name, PolyhedraRegular(numsides, M_PI / numsides, rmin, rmax, s_thick), s_mat); s_vol.setVisAttributes(description.visAttributes(x_slice.visStr())); sliceZ += s_thick / 2;