From 0ff0554229dcb50d5e4868cd1f88e697125a396a Mon Sep 17 00:00:00 2001 From: chchatte92 Date: Tue, 11 Mar 2025 18:42:09 +0100 Subject: [PATCH 1/6] Aerogel tiled --- src/DRICH_geo.cpp | 54 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index afb889935a..b9bd0ebe08 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -300,11 +300,48 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec det.setPlacement(vesselPV); // BUILD RADIATOR ==================================================================== - + float aeroMin =0.; + float aeroMax =0.; + float phiStart=0.; + float phiEnd=0.; + int nTiles[5]={15,20,25,30,35}; // solid and volume: create aerogel and filter - Cone aerogelSolid(aerogelThickness / 2, radiatorRmin, radiatorRmax, - radiatorRmin + boreDelta * aerogelThickness / vesselLength, - radiatorRmax + snoutDelta * aerogelThickness / snoutLength); + for(int n=0; n<5; n++){ + for(int p=0; pGetName(), "string")); desc.add(Constant("DRICH_airgap_material", airgapMat.ptr()->GetName(), "string")); From e0598c4464272a3441957e984c37b4044d884fbc Mon Sep 17 00:00:00 2001 From: chchatte92 Date: Wed, 12 Mar 2025 11:56:09 +0100 Subject: [PATCH 2/6] Added carbon fiber ribs --- compact/pid/drich.xml | 5 +++++ src/DRICH_geo.cpp | 34 +++++++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/compact/pid/drich.xml b/compact/pid/drich.xml index cde823bfac..1ba614fc15 100644 --- a/compact/pid/drich.xml +++ b/compact/pid/drich.xml @@ -143,6 +143,11 @@ vis="DRICH_filter_vis" thickness="DRICH_filter_thickness" /> + diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index b9bd0ebe08..01bb6ebd2e 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -72,6 +72,11 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec auto airgapMat = desc.material(airgapElem.attr(_Unicode(material))); auto airgapVis = desc.visAttributes(airgapElem.attr(_Unicode(vis))); auto airgapThickness = airgapElem.attr(_Unicode(thickness)); + //ribs + auto ribElem = radiatorElem.child(_Unicode(rib)); + auto ribMat = desc.material(ribElem.attr(_Unicode(material))); + auto ribVis = desc.visAttributes(ribElem.attr(_Unicode(vis))); + auto ribThickness = ribElem.attr(_Unicode(thickness)); // - mirror auto mirrorElem = detElem.child(_Unicode(mirror)); auto mirrorMat = desc.material(mirrorElem.attr(_Unicode(material))); @@ -304,23 +309,24 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec float aeroMax =0.; float phiStart=0.; float phiEnd=0.; - int nTiles[5]={15,20,25,30,35}; + int nTiles[5]={10,20,25,30,35}; // solid and volume: create aerogel and filter for(int n=0; n<5; n++){ for(int p=0; p Date: Wed, 12 Mar 2025 12:24:33 +0100 Subject: [PATCH 3/6] Z pos adjusted --- src/DRICH_geo.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index 01bb6ebd2e..b58b65367a 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -311,6 +311,9 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec float phiEnd=0.; int nTiles[5]={10,20,25,30,35}; // solid and volume: create aerogel and filter + auto radiatorPos = Position(0., 0., radiatorFrontplane + 0.5 * aerogelThickness) + originFront; + + std::cout<GetName(), "string")); desc.add(Constant("DRICH_airgap_material", airgapMat.ptr()->GetName(), "string")); From 5492bad465fd76183e4063f598ed9876b52730cc Mon Sep 17 00:00:00 2001 From: chchatte92 Date: Wed, 12 Mar 2025 12:43:56 +0100 Subject: [PATCH 4/6] Aerogel Z pos WARN message fixed --- src/DRICH_geo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index b58b65367a..a419fcd00d 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -312,8 +312,7 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec int nTiles[5]={10,20,25,30,35}; // solid and volume: create aerogel and filter auto radiatorPos = Position(0., 0., radiatorFrontplane + 0.5 * aerogelThickness) + originFront; - - std::cout< Date: Wed, 12 Mar 2025 15:02:27 +0100 Subject: [PATCH 5/6] Bug fixes for Aerogel radial ribs --- src/DRICH_geo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index a419fcd00d..7a02f48ee8 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -347,9 +347,9 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec aerogelRibDE.setPlacement(aerogelRibPV); auto ribMin = radiatorRmin + (n+1)*((radiatorRmax- radiatorRmin)/5); - ConeSegment aerogelRibSolid1(ribThickness / 2, aeroMax,ribMin, aeroMin + boreDelta * aerogelThickness / vesselLength, - aeroMax + snoutDelta * aerogelThickness / snoutLength, phiEnd-0.001*M_PI, ribPhi); - Volume aerogelRib1Vol(detName + "_aerogel_rib_out", aerogelRibSolid, ribMat ); + ConeSegment aerogelRib1Solid(ribThickness / 2, aeroMax,ribMin, aeroMax + boreDelta * aerogelThickness / vesselLength, + ribMin + snoutDelta * aerogelThickness / snoutLength, 0, 2*M_PI); + Volume aerogelRib1Vol(detName + "_aerogel_rib_out", aerogelRib1Solid, ribMat ); aerogelRib1Vol.setVisAttributes(ribVis); auto aerogelRib1Placement = Translation3D(radiatorPos) * // re-center to originFront RotationY(radiatorPitch); // change polar angle to specified pitch From 166292cb9f2ee95984a1e538e1c7128d9e729ad9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 14:05:36 +0000 Subject: [PATCH 6/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/DRICH_geo.cpp | 94 ++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index 7a02f48ee8..71e4f3df36 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -73,10 +73,10 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec auto airgapVis = desc.visAttributes(airgapElem.attr(_Unicode(vis))); auto airgapThickness = airgapElem.attr(_Unicode(thickness)); //ribs - auto ribElem = radiatorElem.child(_Unicode(rib)); - auto ribMat = desc.material(ribElem.attr(_Unicode(material))); - auto ribVis = desc.visAttributes(ribElem.attr(_Unicode(vis))); - auto ribThickness = ribElem.attr(_Unicode(thickness)); + auto ribElem = radiatorElem.child(_Unicode(rib)); + auto ribMat = desc.material(ribElem.attr(_Unicode(material))); + auto ribVis = desc.visAttributes(ribElem.attr(_Unicode(vis))); + auto ribThickness = ribElem.attr(_Unicode(thickness)); // - mirror auto mirrorElem = detElem.child(_Unicode(mirror)); auto mirrorMat = desc.material(mirrorElem.attr(_Unicode(material))); @@ -305,60 +305,64 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec det.setPlacement(vesselPV); // BUILD RADIATOR ==================================================================== - float aeroMin =0.; - float aeroMax =0.; - float phiStart=0.; - float phiEnd=0.; - int nTiles[5]={10,20,25,30,35}; + float aeroMin = 0.; + float aeroMax = 0.; + float phiStart = 0.; + float phiEnd = 0.; + int nTiles[5] = {10, 20, 25, 30, 35}; // solid and volume: create aerogel and filter auto radiatorPos = Position(0., 0., radiatorFrontplane + 0.5 * aerogelThickness) + originFront; //std::cout<GetName(), "string")); desc.add(Constant("DRICH_airgap_material", airgapMat.ptr()->GetName(), "string"));