From a77c41c6212bbaa1c1030577b5fc74b50bbbfa13 Mon Sep 17 00:00:00 2001 From: Roman Tkachenko Date: Wed, 28 Aug 2024 11:37:09 +0300 Subject: [PATCH 1/4] Move sensor material parameters to XML file --- compact/pid/pfrich.xml | 7 +++++++ src/PFRICH_geo.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/compact/pid/pfrich.xml b/compact/pid/pfrich.xml index 2126303ab..33e6d4bb1 100644 --- a/compact/pid/pfrich.xml +++ b/compact/pid/pfrich.xml @@ -88,6 +88,13 @@ + + + + + + + diff --git a/src/PFRICH_geo.cpp b/src/PFRICH_geo.cpp index 19b542857..b469f23cb 100644 --- a/src/PFRICH_geo.cpp +++ b/src/PFRICH_geo.cpp @@ -334,10 +334,10 @@ static Ref_t createDetector(Detector& description, xml_h e, SensitiveDetector se /*--------------------------------------------------*/ // HRPPD material definition: - auto HRPPD_WindowMat = description.material("Quartz"); - auto HRPPD_PCBMat = description.material("G10"); - auto HRPPD_MPDMat = description.material("SiliconDioxide"); - auto HRPPD_ASICMat = description.material("SiliconCarbide"); + auto HRPPD_WindowMat = description.material(description.constant("PFRICH_HRPPD_WindowMat")); + auto HRPPD_PCBMat = description.material(description.constant("PFRICH_HRPPD_PCBMat")); + auto HRPPD_MPDMat = description.material(description.constant("PFRICH_HRPPD_MPDMat")); + auto HRPPD_ASICMat = description.material(description.constant("PFRICH_HRPPD_ASICMat")); Box hrppd_Solid(xysize / 2, xysize / 2, hrppd_container_volume_thickness / 2); From 841f61b22c17e993affce5618d2aa59a4c3bde25 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:13:23 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/PFRICH_geo.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/PFRICH_geo.cpp b/src/PFRICH_geo.cpp index b469f23cb..128bbdf43 100644 --- a/src/PFRICH_geo.cpp +++ b/src/PFRICH_geo.cpp @@ -334,10 +334,14 @@ static Ref_t createDetector(Detector& description, xml_h e, SensitiveDetector se /*--------------------------------------------------*/ // HRPPD material definition: - auto HRPPD_WindowMat = description.material(description.constant("PFRICH_HRPPD_WindowMat")); - auto HRPPD_PCBMat = description.material(description.constant("PFRICH_HRPPD_PCBMat")); - auto HRPPD_MPDMat = description.material(description.constant("PFRICH_HRPPD_MPDMat")); - auto HRPPD_ASICMat = description.material(description.constant("PFRICH_HRPPD_ASICMat")); + auto HRPPD_WindowMat = + description.material(description.constant("PFRICH_HRPPD_WindowMat")); + auto HRPPD_PCBMat = + description.material(description.constant("PFRICH_HRPPD_PCBMat")); + auto HRPPD_MPDMat = + description.material(description.constant("PFRICH_HRPPD_MPDMat")); + auto HRPPD_ASICMat = + description.material(description.constant("PFRICH_HRPPD_ASICMat")); Box hrppd_Solid(xysize / 2, xysize / 2, hrppd_container_volume_thickness / 2); From ceac99400d855a8d5d3f937ef8891fc91746112a Mon Sep 17 00:00:00 2001 From: billlee77 Date: Mon, 23 Sep 2024 09:22:55 -0500 Subject: [PATCH 3/4] Corrected the material diffinition --- compact/pid/pfrich.xml | 11 ++++------- src/PFRICH_geo.cpp | 14 +++++--------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/compact/pid/pfrich.xml b/compact/pid/pfrich.xml index 33e6d4bb1..3652d0c46 100644 --- a/compact/pid/pfrich.xml +++ b/compact/pid/pfrich.xml @@ -88,13 +88,6 @@ - - - - - - - @@ -136,6 +129,10 @@ side="PFRICH_sensor_sensitive_size" thickness="PFRICH_sensor_thickness" gap="0.2*mm" + windowmat="Quartz" + pcbmat="G10" + mpdmat="SiliconDioxide" + asicmat="SiliconCarbide" /> (_Unicode(thickness)); auto readoutName = detElem.attr(_Unicode(readout)); + auto HRPPD_WindowMat = description.material(sensorElem.attr(_Unicode(windowmat))); + auto HRPPD_PCBMat = description.material(sensorElem.attr(_Unicode(pcbmat))); + auto HRPPD_MPDMat = description.material(sensorElem.attr(_Unicode(mpdmat))); + auto HRPPD_ASICMat = description.material(sensorElem.attr(_Unicode(asicmat))); + double vesselRmin0 = dims.attr(_Unicode(rmin0)); double vesselRmin1 = dims.attr(_Unicode(rmin1)); double vesselRmax0 = dims.attr(_Unicode(rmax0)); @@ -334,15 +339,6 @@ static Ref_t createDetector(Detector& description, xml_h e, SensitiveDetector se /*--------------------------------------------------*/ // HRPPD material definition: - auto HRPPD_WindowMat = - description.material(description.constant("PFRICH_HRPPD_WindowMat")); - auto HRPPD_PCBMat = - description.material(description.constant("PFRICH_HRPPD_PCBMat")); - auto HRPPD_MPDMat = - description.material(description.constant("PFRICH_HRPPD_MPDMat")); - auto HRPPD_ASICMat = - description.material(description.constant("PFRICH_HRPPD_ASICMat")); - Box hrppd_Solid(xysize / 2, xysize / 2, hrppd_container_volume_thickness / 2); Volume hrppdVol_air(detName + "_air_hrppd", hrppd_Solid, air); From c9449c1e216bbc188a83d6a353681696725cfda3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:24:19 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/PFRICH_geo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PFRICH_geo.cpp b/src/PFRICH_geo.cpp index 41cd9b231..07fec6bd1 100644 --- a/src/PFRICH_geo.cpp +++ b/src/PFRICH_geo.cpp @@ -83,9 +83,9 @@ static Ref_t createDetector(Detector& description, xml_h e, SensitiveDetector se auto readoutName = detElem.attr(_Unicode(readout)); auto HRPPD_WindowMat = description.material(sensorElem.attr(_Unicode(windowmat))); - auto HRPPD_PCBMat = description.material(sensorElem.attr(_Unicode(pcbmat))); - auto HRPPD_MPDMat = description.material(sensorElem.attr(_Unicode(mpdmat))); - auto HRPPD_ASICMat = description.material(sensorElem.attr(_Unicode(asicmat))); + auto HRPPD_PCBMat = description.material(sensorElem.attr(_Unicode(pcbmat))); + auto HRPPD_MPDMat = description.material(sensorElem.attr(_Unicode(mpdmat))); + auto HRPPD_ASICMat = description.material(sensorElem.attr(_Unicode(asicmat))); double vesselRmin0 = dims.attr(_Unicode(rmin0)); double vesselRmin1 = dims.attr(_Unicode(rmin1));