-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] CAD beampipe implementation #283
Conversation
Why ±2.5m AlBeMet, when it should only be ±1.19 m (1.28m?), as far as I understand our note. |
Yes, according to the beampipe is AlBeMet only up to the bellows (±1.2) and after that copper. The CAD with the right design exists, but for the moment I have a single CAD file for the beampipe down to ±2.5m to reach also the separation region, and for technical reasons the volume can be given only one material. After completing this first implementation I will add the complete one, also because some small adjustments are still ongoing in particular on the bellow/remote vacuum connection area. I add this note to the description above anyway, thanks for noticing |
@andresailer is |
Yes @aciarma , that name is more precise than Paraffin. |
…and trapezoidal chambers)
@andresailer for the moment I added all the volumes for the beampipe description, so to me this PR is ready. The realistic part from the bellows on (1.2~2.5m) will be added once the remote vacuum connection and BPM designs will be completed. I've checked with Are there some other checks that needs to be done? |
sync with main
Could you please fill the RELEASENOTES like in the other PRs here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Can you add a compact file with everything needed to have the beampipe "complete" (i.e. including both Beampipe_onlylegs.xml
and Beampipe_CADimport.xml
), named e.g. Beampipe_o1_v01.xml
+ a test running with this compact file? See e.g. https://github.com/key4hep/k4geo/blob/master/lcgeoTests/CMakeLists.txt#L57-L60
To display the beampipe: | ||
geoDisplay standalone_CADbp.xml | ||
|
||
To use in simulation, include in the main xml file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that both files should be included to have a 'complete' beampipe? Can you say a word why the beampipe is 'split' into two compact files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now only one .xml file for the beampipe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README is very similar to the one in FCCee/CAD_beampipe/
, should it be updated? Are they both needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it, it was a leftover duplicate of an old version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove from this file all constants that are not relevant to the beampipe and rename the file FCCee_BeampipeDimensions.xml
@andresailer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As now all the geometries are imported directly from CAD (so they are not parametric) there is no need for a FCCee_BeampipeDimensions.xml
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current folder structure (Pipe_17032023
and Pipe_18072023
) suggests that they are two versions of the beampipe. But both are actually needed. I would propose to merge Pipe_17032023
and Pipe_18072023
into one folder or to rename them according to their content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the old Pipe_xxxxxx folders as they had some issues in the design, and am now left with only the latest one. In the future when other versions (with different designs or more details) will be added, every folder will contain all the necessary files, and if they are duplicated from old versions a symlink can be used, as we discussed the other day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see only the CAD part of the beampipe here, should'nt there be also the part with DD4hep_Beampipe_o1_v01
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still believe it would be better to append o1_v01 to this filename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now everything is CAD, also the legs (it was easier to just extend directly the model instead that trying to match the two volumes). No DD4hep volumes anymore. I will add the o1_v01 and change the file names
|
||
<detectors> | ||
|
||
<detector id="1" name="Beampipe_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to remove the 'id' there or is it crashing? It may conflict with id defined in other detectors when importing this xml...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done for all
</check> | ||
</detector> | ||
|
||
<detector id="12" name="Beampipe_crotch_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
</check> | ||
</detector> | ||
|
||
<detector id="2" name="Cooling_trap_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
</detector> | ||
|
||
|
||
<detector id="3" name="Gold_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
</detector> | ||
|
||
|
||
<detector id="4" name="Paraffin_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
</check> | ||
</detector> | ||
|
||
<detector id="5" name="Water_STL" type="DD4hep_TestShape_Creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
Thanks Andrea! Except for the file |
Thank you, |
I think it is useful to have this script there, other people may be interested in studying the beampipe material budget and starting with an example is always easier. Also, I guess that the Gaudi based MaterialScan will not work due to the CAD import. About the materials.xml shared across detectors, it is something we could indeed discuss, but not for this PR. All good to me @andresailer ! |
Today/monday I will also add the tungsten SR mask (simple template as the real design does not exist yet). I am waiting for the CAD model to be ready so I can import it. After that to me it is good. |
Hi @aciarma, is this PR ready on your side? |
Hi @BrieucF, the geometry models are there and are displayed correctly with geoDisplay/jsroot, but the tests are failing so I'll try to understand what is wrong. |
Hi, The test can not run because the relative paths only seem to work when the working directory is the compact directory. Since it is just for a test, the option to run the test inside that directory can be added by modifying the line 93 of the file
The warnings I found when running ddsim appear if the facet is smaller than the surface thickness 1e-9 mm, so nothing to worry about. |
Hi, The number of vertices is quite high, and I think it is related to the high level of detail (there are vertices 1e-16 cm apart). Is this level of detail really needed? If not, would be it possible to get rid of some vertices easily? Thank you for your time. |
lcgeoTests/CMakeLists.txt
Outdated
|
||
SET( test_name "test_FCCee_CAD_beampipe" ) | ||
ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" | ||
ddsim --compactFile=${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CAD_beampipe/compact/testBeampipe_CADimport_o1_v01.xml --runType=batch -G -N=1 --outputFile=testBeampipe_CADimport_o1_v01.slcio ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make the ddsim run,
ddsim --compactFile=${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CAD_beampipe/compact/testBeampipe_CADimport_o1_v01.xml --runType=batch -G -N=1 --outputFile=testBeampipe_CADimport_o1_v01.slcio ) | |
ddsim --compactFile=${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CAD_beampipe/compact/testBeampipe_CADimport_o1_v01.xml --runType=batch -G -N=1 --outputFile=testBeampipe_CADimport_o1_v01.slcio --part.userParticleHandler= ) |
lcgeoTests/CMakeLists.txt
Outdated
SET( test_name "test_FCCee_CAD_beampipe" ) | ||
ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" | ||
ddsim --compactFile=${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CAD_beampipe/compact/testBeampipe_CADimport_o1_v01.xml --runType=batch -G -N=1 --outputFile=testBeampipe_CADimport_o1_v01.slcio ) | ||
SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" ) | |
SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "ERROR;Error" ) |
Could you please remove Exception;EXCEPTION
from the list of Regular expresion?
3 facets are too small, and probably trigger this error when closing the geometry
14: -------- WWWW ------- G4Exception-START -------- WWWW -------
14: *** G4Exception : GeomSolids1001
14: issued by : G4TessellatedSolid::SetSolidClosed()
14: Defects in solid: ASCII_shape_0x30e3ac0 - some facets have wrong orientation!
14: *** This is just a warning message. ***
14: -------- WWWW -------- G4Exception-END --------- WWWW -------
14:
14:
14: -------- WWWW ------- G4Exception-START -------- WWWW -------
14: *** G4Exception : GeomSolids1001
14: issued by : G4TessellatedSolid::SetSolidClosed()
14: Defects in solid: ASCII_shape_0x30e3ac0 - there are holes in the surface!
14: *** This is just a warning message. ***
14: -------- WWWW -------- G4Exception-END --------- WWWW -------
Hi, When Geant4 builds the CAD design, it finds the following errors:
The interpretation is the following: Changing line #84 in G4TriangularFacet.cc to
means that the tessellated solids contains a pair of edges which have the same directions. Тhe reason for this needs to be investigated. Possibly, some parts of the solid touch each other. |
In the previous message I just listed the errors, but no solutions. I am not expert in CAD, so I do not know exactly how this can be tackled, but I would propose:
|
…xis points outside the ring
I think I should close this other PR right? it is old and outdated by #344 |
Yes you can close this one |
BEGINRELEASENOTES
Imported beampipe from CAD model, including:
Added in a separated folder
FCCee/CAD_beampipe
as it is independent from the detector.Added a dedicated .xml file to visualise it (i.e. geoDisplay) but the beampipe files should be included in the main .xml of the detectors.
-- A more complete description, with bellows/remote vacuum connection/flanges etc will come --
ENDRELEASENOTES