Unique IDs to materials and media
Proposed solution to G4 issue reading media as discussed in #2913.
Index numbers are attached to Materials and Media, with the corresponding media to corresponding material only matching accidentally due to loading. Additionally Material and Media names normally match but not always. As we have seen FairRoot, CbmRoot and G4 have been interpreting material and media differently when overlaps of index numbers occurs. Each of these have sought the solution to shuffle index numbers when issued arose but because they do so differently this causes issues and causes materials/media to be swapped. This latest problem is highlighted by differences between G3 and G4 interpretation of media and is not seen by examining the material in root.
The proposed solution here, is to "uniquely" convert the name of the material/media into index (Int_t 4 billion unqiues) This is definitely cannot be achieved strictly, as an Int_t would only guarantee uniqueness for 4 ascii characters, for this reason uppercase and lowercase letters are treated identically and common symbols concatenated.
Merge request reports
Activity
added 6 commits
-
b63b5cc6...87460033 - 5 commits from branch
computing:master
- 380bf357 - Unique indices for Materials and Media
-
b63b5cc6...87460033 - 5 commits from branch
Dear @f.uhlig, @s.lebedev, @p.-a.loizeau,
you have been identified as code owner of at least one file which was changed with this merge request.
Please check the changes and approve them or request changes.
added CodeOwners label
This solves the issue regarding G4 conversion and makes indices more consistent between media and their materials and between indices and the names of materials. In general, however, we should strive to remove further functions to simply and standardise the importing of geometries to allow for a more consistent behaviour.
One slight negative to this commit is ugly index numbers. Here are the list of materials
4 Material BP_aluminium A=26.9815 Z=13 rho=2.7 radlen=8.8756 intlen=38.8623 index=1049312482 10 Material BP_vacuum A=1e-16 Z=1e-16 rho=1e-16 radlen=1e+30 intlen=1e+30 index=410003736 4 Material MAG_Copper A=63.546 Z=29 rho=8.96 radlen=1.43516 intlen=15.5142 index=24488696 26 Material MAG_Iron A=55.847 Z=26 rho=7.874 radlen=1.75672 intlen=16.9589 index=1781809830 4 Material MAG_Vacuum A=1 Z=0.5 rho=1e-09 radlen=1e+30 intlen=1e+30 index=956775076 144 Material MVD_fpc A=63.54 Z=29 rho=8.96 radlen=1.43502 intlen=15.5142 index=1397437501 576 Material MVD_glue A=26.98 Z=13 rho=2.7 radlen=8.87509 intlen=38.8623 index=1871691172 16 Material MVD_tpg A=12.011 Z=6 rho=2.25 radlen=18.8878 intlen=35.6451 index=1340407665 14 Material STSBoxCarbonFibre A=12.011 Z=6 rho=1.5 radlen=28.3318 intlen=53.4676 index=1514660653 876 Material STScable A=28.0855 Z=14 rho=2.33 radlen=9.34959 intlen=45.7533 index=1764102335 216 Material TRDcarbon A=12.011 Z=6 rho=2.265 radlen=18.7628 intlen=35.409 index=1113768405 232 Material TRDcopper A=63.54 Z=29 rho=8.96 radlen=1.43503 intlen=15.5141 index=6106495 1735 Material aluminium A=26.98 Z=13 rho=2.7 radlen=8.87509 intlen=38.8623 index=602243688 20934 Material carbon A=12.011 Z=6 rho=2.265 radlen=18.7628 intlen=35.409 index=2079327442 4315 Material dummy A=0 Z=0 rho=0 radlen=0 intlen=0 index=400972441 92 Material iron A=55.847 Z=26 rho=7.87 radlen=1.75761 intlen=16.9675 index=14635899 44 Material lead A=207.1 Z=82 rho=11.34 radlen=0.561956 intlen=18.2753 index=14428515 1452 Material silicon A=28.0855 Z=14 rho=2.33 radlen=9.34959 intlen=45.7533 index=1345933662 1 Material targetMaterial A=196.967 Z=79 rho=19.32 radlen=0.334723 intlen=10.5392 index=43 8 Material tof_pole_aluminium A=26.98 Z=13 rho=2.7 radlen=8.8751 intlen=38.8622 index=580221507 2 Material vacuum A=1e-16 Z=1e-16 rho=1e-16 radlen=1e+30 intlen=1e+30 index=2068530242 36 Mixture BP_carbonfiber Aeff=12.6698 Zeff=6.3243 rho=1.5 radlen=27.1539 intlen=52.9091 index=1113682455 9 Mixture BP_stainless Aeff=56.4962 Zeff=26.2553 rho=8 radlen=1.71785 intlen=16.6514 index=1364741856 75264 Mixture CsI Aeff=129.974 Zeff=54.0231 rho=4.53 radlen=1.85297 intlen=39.1134 index=538518 40 Mixture PsdFibre Aeff=11.159 Zeff=5.61284 rho=1.032 radlen=42.0435 intlen=70.7394 index=564720211 44 Mixture PsdPolyethylene Aeff=10.428 Zeff=5.265 rho=1.12 radlen=39.6858 intlen=60.6865 index=1276054532 2640 Mixture PsdScint Aeff=11.159 Zeff=5.61284 rho=1.032 radlen=42.0435 intlen=70.7394 index=1260031485 2640 Mixture PsdTyvek Aeff=10.4296 Zeff=5.28139 rho=0.93 radlen=47.5076 intlen=72.8966 index=118977908 3027 Mixture RICHgas_CO2_dis Aeff=14.9091 Zeff=7.45455 rho=0.001977 radlen=18234.7 intlen=43428.7 index=1210716047 1 Mixture RICHgas_CO2_dis+ Aeff=14.9091 Zeff=7.45455 rho=0.001977 radlen=18234.7 intlen=43428.7 index=1210715977 82 Mixture RICHglass Aeff=21.6517 Zeff=10.8048 rho=2.2 radlen=12.264 intlen=43.608 index=563487399 420420 Mixture RPCgas Aeff=17.4875 Zeff=8.38964 rho=0.00427 radlen=7988.06 intlen=20520.2 index=2143719703 230 Mixture RPCgas_noact Aeff=17.4875 Zeff=8.38964 rho=0.00427 radlen=7988.06 intlen=20520.2 index=1853523127 15520 Mixture RPCglass Aeff=22.368 Zeff=11.1529 rho=2.5 radlen=10.5375 intlen=38.6223 index=939404991 212 Mixture STSFEBMaterial Aeff=23.9656 Zeff=11.6277 rho=2.4425 radlen=10.6137 intlen=37.7449 index=772986615 64 Mixture STSPOBMaterial Aeff=21.7759 Zeff=10.7059 rho=2.008 radlen=13.3961 intlen=39.0393 index=778497855 7 Mixture STS_Airex_Foam Aeff=12.8918 Zeff=6.463 rho=0.065 radlen=610.365 intlen=1207.37 index=1484278301 11880 Mixture TRDG10 Aeff=13.1273 Zeff=6.696 rho=1.7 radlen=21.1964 intlen=36.4725 index=1307849941 216 Mixture TRDaramide Aeff=13.3097 Zeff=6.68576 rho=0.032 radlen=1198.84 intlen=2414.88 index=765437038 216 Mixture TRDgas Aeff=124.791 Zeff=51.401 rho=0.004944 radlen=1792.89 intlen=33993.1 index=2143720488 216 Mixture TRDkapton Aeff=12.7017 Zeff=6.35993 rho=1.42 radlen=28.4101 intlen=55.8666 index=1536292751 216 Mixture TRDpefoam20 Aeff=10.4286 Zeff=5.28133 rho=0.02 radlen=2208.95 intlen=3389.65 index=1605409215 14686 Mixture air Aeff=14.6873 Zeff=7.32 rho=0.001205 radlen=30422.5 intlen=70886.9 index=544807 2 Mixture kapton Aeff=12.7017 Zeff=6.35993 rho=1.42 radlen=28.4101 intlen=55.8667 index=2079680286
added 7 commits
-
35a66caf...e0f5c273 - 6 commits from branch
computing:master
- 571b2d33 - Unique indices for Materials and Media
-
35a66caf...e0f5c273 - 6 commits from branch
mentioned in merge request CbmSoft/cbmroot_geometry!228 (merged)