Skip to content
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

[DD4hep] [Simulation] [Validation] G4 Materials validation #28168

Closed
ianna opened this issue Oct 14, 2019 · 24 comments
Closed

[DD4hep] [Simulation] [Validation] G4 Materials validation #28168

ianna opened this issue Oct 14, 2019 · 24 comments

Comments

@ianna
Copy link
Contributor

ianna commented Oct 14, 2019

Compare G4 material properties produced with the DD4hep Geant4 converter vs produced with the DD one.

@cvuosalo - just making a traceable note what needs to be done to complete the migration

@cmsbuild
Copy link
Contributor

A new Issue was created by @ianna Ianna Osborne.

@davidlange6, @Dr15Jones, @smuzaffar, @fabiocos, @kpedro88 can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@fabiocos
Copy link
Contributor

assign geometry,simulation

@cmsbuild
Copy link
Contributor

New categories assigned: geometry,simulation

@Dr15Jones,@cvuosalo,@mdhildreth,@mdhildreth,@ianna,@civanch,@civanch you have been requested to review this Pull request/Issue and eventually sign? Thanks

@ianna
Copy link
Contributor Author

ianna commented Nov 4, 2019

DD4hep:

    <material name="hcalforwardmaterial_HFAbsorber0x7f52e629b740" state="solid">
       <P unit="pascal" value="101324.845390854"/>
       <MEE unit="eV" value="207.159300327033"/>
       <D unit="g/cm3" value="4797.63625441346"/>
       <fraction n="0.996816000004741" ref="CMS_element0x7f52e6848900"/>
       <fraction n="1.49880000000713e-06" ref="CMS_element0x7f52ef29ee80"/>
       <fraction n="0.00106178410721505" ref="CMS_element0x7f52ef29ed00"/>
       <fraction n="2.58000000001227e-08" ref="ARGON0x7f52ef29ef40"/>
       <fraction n="0.00010092261923448" ref="HYDROGEN0x7f52ef29ec40"/>
       <fraction n="0.000931689692794431" ref="CMS_element0x7f52ef29edc0"/>
       <fraction n="0.00108807897601517" ref="CMS_element0x7f52ef29eb80"/>
     </material>

vs DD:

    <material name="HFAbsorber0x7f732da01180" state="solid">
      <T unit="K" value="293.15"/>
      <MEE unit="eV" value="284.911565693922"/>
      <D unit="g/cm3" value="7.68665595559477"/>
      <fraction n="0.996816" ref="Fe0x7f733249cf00"/>
      <fraction n="1.4988e-06" ref="N0x7f733249c780"/>
      <fraction n="0.00106178410721" ref="O0x7f733249c840"/>
      <fraction n="2.58e-08" ref="Ar0x7f733249c900"/>
      <fraction n="0.000100922619234" ref="H0x7f733249c9c0"/>
      <fraction n="0.00093168969279" ref="Si0x7f733249d5c0"/>
      <fraction n="0.00108807897601" ref="C0x7f733249cfc0"/>
    </material>

@fabiocos
Copy link
Contributor

fabiocos commented Nov 6, 2019

@ianna to be clean, we are speaking of what happens in https://cmssdt.cern.ch/lxr/source/SimG4Core/Geometry/src/DDG4Builder.cc#0059 , under our control, vs what happens in https://cmssdt.cern.ch/lxr/source/SimG4Core/Geometry/src/DD4hep_DDG4Builder.cc#0034 inside DD4hep, am I correct?

@ianna ianna changed the title DD4hep: G4 Materials validation [DD4hep] [Simulation] [Validation] G4 Materials validation Nov 14, 2019
@ianna
Copy link
Contributor Author

ianna commented Nov 14, 2019

Material Validation Summary

The analyzers run in CMSSW_11_0_X_2019-11-13-2300 IB.

  • G4 materials created with DD4hep for 2021 geometry scenario:
NumberOfElements  42
NumberOfMaterials 381
NumberOfCouples   443
  • G4 materials created with DD for 2017 geometry scenario:
NumberOfElements  42
NumberOfMaterials 492
NumberOfCouples   447
  • Atomic mass number differs for 13 materials out of 42:

    • Created from DD:
 Element: Al (Al)   Z = 13.0   N =    27   A = 26.980 g/mole
         --->  Isotope:  Al27   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.000 %

 Element: Cl (Cl)   Z = 17.0   N =    35   A = 35.450 g/mole
         --->  Isotope:  Cl35   Z = 17   N =  35   A =  34.97 g/mole   abundance: 75.780 %
         --->  Isotope:  Cl37   Z = 17   N =  37   A =  36.97 g/mole   abundance: 24.220 %

 Element: Ti (Ti)   Z = 22.0   N =    48   A = 47.880 g/mole
         --->  Isotope:  Ti46   Z = 22   N =  46   A =  45.95 g/mole   abundance:  8.250 %
         --->  Isotope:  Ti47   Z = 22   N =  47   A =  46.95 g/mole   abundance:  7.440 %
         --->  Isotope:  Ti48   Z = 22   N =  48   A =  47.95 g/mole   abundance: 73.720 %
         --->  Isotope:  Ti49   Z = 22   N =  49   A =  48.95 g/mole   abundance:  5.410 %
         --->  Isotope:  Ti50   Z = 22   N =  50   A =  49.94 g/mole   abundance:  5.180 %

 Element: Sb (Sb)   Z = 51.0   N =   122   A = 121.750 g/mole
         --->  Isotope: Sb121   Z = 51   N = 121   A = 120.90 g/mole   abundance: 57.210 %
         --->  Isotope: Sb123   Z = 51   N = 123   A = 122.90 g/mole   abundance: 42.790 %

 Element: Fe (Fe)   Z = 26.0   N =    56   A = 55.850 g/mole
         --->  Isotope:  Fe54   Z = 26   N =  54   A =  53.94 g/mole   abundance:  5.845 %
         --->  Isotope:  Fe56   Z = 26   N =  56   A =  55.93 g/mole   abundance: 91.754 %
         --->  Isotope:  Fe57   Z = 26   N =  57   A =  56.94 g/mole   abundance:  2.119 %
         --->  Isotope:  Fe58   Z = 26   N =  58   A =  57.93 g/mole   abundance:  0.282 %

 Element: Pb (Pb)   Z = 82.0   N =   207   A = 207.190 g/mole
         --->  Isotope: Pb204   Z = 82   N = 204   A = 203.97 g/mole   abundance:  1.400 %
         --->  Isotope: Pb206   Z = 82   N = 206   A = 205.97 g/mole   abundance: 24.100 %
         --->  Isotope: Pb207   Z = 82   N = 207   A = 206.98 g/mole   abundance: 22.100 %
         --->  Isotope: Pb208   Z = 82   N = 208   A = 207.98 g/mole   abundance: 52.400 %

 Element: W (W)   Z = 74.0   N =   184   A = 183.850 g/mole
         --->  Isotope:  W180   Z = 74   N = 180   A = 179.95 g/mole   abundance:  0.120 %
         --->  Isotope:  W182   Z = 74   N = 182   A = 181.95 g/mole   abundance: 26.500 %
         --->  Isotope:  W183   Z = 74   N = 183   A = 182.95 g/mole   abundance: 14.310 %
         --->  Isotope:  W184   Z = 74   N = 184   A = 183.95 g/mole   abundance: 30.640 %
         --->  Isotope:  W186   Z = 74   N = 186   A = 185.95 g/mole   abundance: 28.430 %

 Element: Ag (Ag)   Z = 47.0   N =   108   A = 107.870 g/mole
         --->  Isotope: Ag107   Z = 47   N = 107   A = 106.90 g/mole   abundance: 51.839 %
         --->  Isotope: Ag109   Z = 47   N = 109   A = 108.91 g/mole   abundance: 48.161 %

 Element: Sn (Sn)   Z = 50.0   N =   119   A = 118.690 g/mole
         --->  Isotope: Sn112   Z = 50   N = 112   A = 111.90 g/mole   abundance:  0.970 %
         --->  Isotope: Sn114   Z = 50   N = 114   A = 113.90 g/mole   abundance:  0.660 %
         --->  Isotope: Sn115   Z = 50   N = 115   A = 114.90 g/mole   abundance:  0.340 %
         --->  Isotope: Sn116   Z = 50   N = 116   A = 115.90 g/mole   abundance: 14.540 %
         --->  Isotope: Sn117   Z = 50   N = 117   A = 116.90 g/mole   abundance:  7.680 %
         --->  Isotope: Sn118   Z = 50   N = 118   A = 117.90 g/mole   abundance: 24.220 %
         --->  Isotope: Sn119   Z = 50   N = 119   A = 118.90 g/mole   abundance:  8.590 %
         --->  Isotope: Sn120   Z = 50   N = 120   A = 119.90 g/mole   abundance: 32.580 %
         --->  Isotope: Sn122   Z = 50   N = 122   A = 121.90 g/mole   abundance:  4.630 %
         --->  Isotope: Sn124   Z = 50   N = 124   A = 123.91 g/mole   abundance:  5.790 %

 Element: Ba (Ba)   Z = 56.0   N =   137   A = 137.330 g/mole
         --->  Isotope: Ba130   Z = 56   N = 130   A = 129.91 g/mole   abundance:  0.106 %
         --->  Isotope: Ba132   Z = 56   N = 132   A = 131.90 g/mole   abundance:  0.101 %
         --->  Isotope: Ba134   Z = 56   N = 134   A = 133.91 g/mole   abundance:  2.417 %
         --->  Isotope: Ba135   Z = 56   N = 135   A = 134.91 g/mole   abundance:  6.592 %
         --->  Isotope: Ba136   Z = 56   N = 136   A = 135.91 g/mole   abundance:  7.854 %
         --->  Isotope: Ba137   Z = 56   N = 137   A = 136.91 g/mole   abundance: 11.232 %
         --->  Isotope: Ba138   Z = 56   N = 138   A = 137.91 g/mole   abundance: 71.698 %

 Element: Au (Au)   Z = 79.0   N =   197   A = 196.970 g/mole
         --->  Isotope: Au197   Z = 79   N = 197   A = 196.97 g/mole   abundance: 100.000 %

 Element: In (In)   Z = 49.0   N =   115   A = 114.820 g/mole
         --->  Isotope: In113   Z = 49   N = 113   A = 112.90 g/mole   abundance:  4.290 %
         --->  Isotope: In115   Z = 49   N = 115   A = 114.90 g/mole   abundance: 95.710 %

 Element: Zr (Zr)   Z = 40.0   N =    91   A = 91.220 g/mole
         --->  Isotope:  Zr90   Z = 40   N =  90   A =  89.90 g/mole   abundance: 51.450 %
         --->  Isotope:  Zr91   Z = 40   N =  91   A =  90.91 g/mole   abundance: 11.220 %
         --->  Isotope:  Zr92   Z = 40   N =  92   A =  91.91 g/mole   abundance: 17.150 %
         --->  Isotope:  Zr94   Z = 40   N =  94   A =  93.91 g/mole   abundance: 17.380 %
         --->  Isotope:  Zr96   Z = 40   N =  96   A =  95.91 g/mole   abundance:  2.800 %
  • Created from DD4hep:
 Element: ALUMINIUM (AL)   Z = 13.0   N =    27   A = 26.982 g/mole
         --->  Isotope:  AL27   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.000 %

 Element: CHLORINE (CL)   Z = 17.0   N =    35   A = 35.453 g/mole
         --->  Isotope:  CL35   Z = 17   N =  35   A =  34.97 g/mole   abundance: 75.780 %
         --->  Isotope:  CL37   Z = 17   N =  37   A =  36.97 g/mole   abundance: 24.220 %

 Element: TITANIUM (TI)   Z = 22.0   N =    48   A = 47.867 g/mole
         --->  Isotope:  TI46   Z = 22   N =  46   A =  45.95 g/mole   abundance:  8.250 %
         --->  Isotope:  TI47   Z = 22   N =  47   A =  46.95 g/mole   abundance:  7.440 %
         --->  Isotope:  TI48   Z = 22   N =  48   A =  47.95 g/mole   abundance: 73.720 %
         --->  Isotope:  TI49   Z = 22   N =  49   A =  48.95 g/mole   abundance:  5.410 %
         --->  Isotope:  TI50   Z = 22   N =  50   A =  49.94 g/mole   abundance:  5.180 %

 Element: ANTIMONY (SB)   Z = 51.0   N =   122   A = 121.760 g/mole
         --->  Isotope: SB121   Z = 51   N = 121   A = 120.90 g/mole   abundance: 57.210 %
         --->  Isotope: SB123   Z = 51   N = 123   A = 122.90 g/mole   abundance: 42.790 %

 Element: IRON (FE)   Z = 26.0   N =    56   A = 55.845 g/mole
         --->  Isotope:  FE54   Z = 26   N =  54   A =  53.94 g/mole   abundance:  5.845 %
         --->  Isotope:  FE56   Z = 26   N =  56   A =  55.93 g/mole   abundance: 91.754 %
         --->  Isotope:  FE57   Z = 26   N =  57   A =  56.94 g/mole   abundance:  2.119 %
         --->  Isotope:  FE58   Z = 26   N =  58   A =  57.93 g/mole   abundance:  0.282 %

 Element: LEAD (PB)   Z = 82.0   N =   207   A = 207.200 g/mole
         --->  Isotope: PB204   Z = 82   N = 204   A = 203.97 g/mole   abundance:  1.400 %
         --->  Isotope: PB206   Z = 82   N = 206   A = 205.97 g/mole   abundance: 24.100 %
         --->  Isotope: PB207   Z = 82   N = 207   A = 206.98 g/mole   abundance: 22.100 %
         --->  Isotope: PB208   Z = 82   N = 208   A = 207.98 g/mole   abundance: 52.400 %

 Element: TUNGSTEN (W)   Z = 74.0   N =   184   A = 183.840 g/mole
         --->  Isotope:  W180   Z = 74   N = 180   A = 179.95 g/mole   abundance:  0.120 %
         --->  Isotope:  W182   Z = 74   N = 182   A = 181.95 g/mole   abundance: 26.500 %
         --->  Isotope:  W183   Z = 74   N = 183   A = 182.95 g/mole   abundance: 14.310 %
         --->  Isotope:  W184   Z = 74   N = 184   A = 183.95 g/mole   abundance: 30.640 %
         --->  Isotope:  W186   Z = 74   N = 186   A = 185.95 g/mole   abundance: 28.430 %

 Element: SILVER (AG)   Z = 47.0   N =   108   A = 107.868 g/mole
         --->  Isotope: AG107   Z = 47   N = 107   A = 106.90 g/mole   abundance: 51.839 %
         --->  Isotope: AG109   Z = 47   N = 109   A = 108.91 g/mole   abundance: 48.161 %

 Element: TIN (SN)   Z = 50.0   N =   119   A = 118.710 g/mole
         --->  Isotope: SN112   Z = 50   N = 112   A = 111.90 g/mole   abundance:  0.970 %
         --->  Isotope: SN114   Z = 50   N = 114   A = 113.90 g/mole   abundance:  0.660 %
         --->  Isotope: SN115   Z = 50   N = 115   A = 114.90 g/mole   abundance:  0.340 %
         --->  Isotope: SN116   Z = 50   N = 116   A = 115.90 g/mole   abundance: 14.540 %
         --->  Isotope: SN117   Z = 50   N = 117   A = 116.90 g/mole   abundance:  7.680 %
         --->  Isotope: SN118   Z = 50   N = 118   A = 117.90 g/mole   abundance: 24.220 %
         --->  Isotope: SN119   Z = 50   N = 119   A = 118.90 g/mole   abundance:  8.590 %
         --->  Isotope: SN120   Z = 50   N = 120   A = 119.90 g/mole   abundance: 32.580 %
         --->  Isotope: SN122   Z = 50   N = 122   A = 121.90 g/mole   abundance:  4.630 %
         --->  Isotope: SN124   Z = 50   N = 124   A = 123.91 g/mole   abundance:  5.790 %

 Element: BARIUM (BA)   Z = 56.0   N =   137   A = 137.327 g/mole
         --->  Isotope: BA130   Z = 56   N = 130   A = 129.91 g/mole   abundance:  0.106 %
         --->  Isotope: BA132   Z = 56   N = 132   A = 131.90 g/mole   abundance:  0.101 %
         --->  Isotope: BA134   Z = 56   N = 134   A = 133.91 g/mole   abundance:  2.417 %
         --->  Isotope: BA135   Z = 56   N = 135   A = 134.91 g/mole   abundance:  6.592 %
         --->  Isotope: BA136   Z = 56   N = 136   A = 135.91 g/mole   abundance:  7.854 %
         --->  Isotope: BA137   Z = 56   N = 137   A = 136.91 g/mole   abundance: 11.232 %
         --->  Isotope: BA138   Z = 56   N = 138   A = 137.91 g/mole   abundance: 71.698 %

 Element: GOLD (AU)   Z = 79.0   N =   197   A = 196.967 g/mole
         --->  Isotope: AU197   Z = 79   N = 197   A = 196.97 g/mole   abundance: 100.000 %

 Element: INDIUM (IN)   Z = 49.0   N =   115   A = 114.818 g/mole
         --->  Isotope: IN113   Z = 49   N = 113   A = 112.90 g/mole   abundance:  4.290 %
         --->  Isotope: IN115   Z = 49   N = 115   A = 114.90 g/mole   abundance: 95.710 %

 Element: ZIRCONIUM (ZR)   Z = 40.0   N =    91   A = 91.224 g/mole
         --->  Isotope:  ZR90   Z = 40   N =  90   A =  89.90 g/mole   abundance: 51.450 %
         --->  Isotope:  ZR91   Z = 40   N =  91   A =  90.91 g/mole   abundance: 11.220 %
         --->  Isotope:  ZR92   Z = 40   N =  92   A =  91.91 g/mole   abundance: 17.150 %
         --->  Isotope:  ZR94   Z = 40   N =  94   A =  93.91 g/mole   abundance: 17.380 %
         --->  Isotope:  ZR96   Z = 40   N =  96   A =  95.91 g/mole   abundance:  2.800 %

  • The following definitions are completely wrong. It points to a bug in either our XML to ROOT material converter or DD4hep:
 Element: CMS element (Bor 10)   Z =  5.0   N =  6242   A = 6241.510 g/mole
         --->  Isotope: Bor 1010   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope: Bor 1011   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

 Element: CMS element (Bor 11)   Z =  5.0   N =  6866   A = 6865.661 g/mole
         --->  Isotope: Bor 1110   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope: Bor 1111   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

 Element: CMS element (Phosphor)   Z = 15.0   N = 19332   A = 19332.452 g/mole
         --->  Isotope: Phosphor31   Z = 15   N =  31   A =  30.97 g/mole   abundance: 100.000 %

they should be:

 Element: B (B)   Z =  5.0   N =    10   A = 10.000 g/mole
         --->  Isotope:   B10   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope:   B11   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

 Element: B (B)   Z =  5.0   N =    11   A = 11.000 g/mole
         --->  Isotope:   B10   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope:   B11   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

Element: P (P)   Z = 15.0   N =    31   A = 30.974 g/mole
         --->  Isotope:   P31   Z = 15   N =  31   A =  30.97 g/mole   abundance: 100.000 %

DD4hep Vacuum conversion:

 Element: CMS element (Vacuum)   Z =  1.0   N =   624   A = 624.151 g/mole
         --->  Isotope: Vacuum1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope: Vacuum2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %

DD definition of Vacuum:

 Material:   Vacuum    density:  0.000 kg/m3   RadL: 6254690362629.458 km   Nucl.Int.Length: 3500003503329.716 km 
                       Imean:  19.200 eV   temperature: 293.15 K  pressure:   1.00 atm

   --->  Element: H (H)   Z =  1.0   N =     1   A =  1.000 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
          ElmMassFraction: 100.00 %  ElmAbundance 100.00 % 


  • XML definition of the P (N=31), B(N=10), B(N=11) are not recognized by ROOT. New elements are created.

  • Two elementary materials present in DD G4. One must be "Vacuum"?

 Element: H (H)   Z =  1.0   N =     1   A =  1.008 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %

 Element: H (H)   Z =  1.0   N =     1   A =  1.000 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
  • Materials also differ, for example:

    • DD4hep:
### Material 213   10 elements
 Material: materials:Aluminium 2219    density: 1772.589 g/cm3   RadL: 126.659 um   Nucl.Int.Length: 604.274 um 
                       Imean: 174.491 eV   temperature: 273.15 K  pressure:   1.00 atm

   --->  Element: ALUMINIUM (AL)   Z = 13.0   N =    27   A = 26.982 g/mole
         --->  Isotope:  AL27   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.000 %
          ElmMassFraction:  91.68 %  ElmAbundance  96.13 % 

   --->  Element: COPPER (CU)   Z = 29.0   N =    64   A = 63.546 g/mole
         --->  Isotope:  CU63   Z = 29   N =  63   A =  62.93 g/mole   abundance: 69.170 %
         --->  Isotope:  CU65   Z = 29   N =  65   A =  64.93 g/mole   abundance: 30.830 %
          ElmMassFraction:   6.80 %  ElmAbundance   3.03 % 

   --->  Element: IRON (FE)   Z = 26.0   N =    56   A = 55.845 g/mole
         --->  Isotope:  FE54   Z = 26   N =  54   A =  53.94 g/mole   abundance:  5.845 %
         --->  Isotope:  FE56   Z = 26   N =  56   A =  55.93 g/mole   abundance: 91.754 %
         --->  Isotope:  FE57   Z = 26   N =  57   A =  56.94 g/mole   abundance:  2.119 %
         --->  Isotope:  FE58   Z = 26   N =  58   A =  57.93 g/mole   abundance:  0.282 %
          ElmMassFraction:   0.30 %  ElmAbundance   0.15 % 

   --->  Element: MAGNESIUM (MG)   Z = 12.0   N =    24   A = 24.305 g/mole
         --->  Isotope:  MG24   Z = 12   N =  24   A =  23.98 g/mole   abundance: 78.990 %
         --->  Isotope:  MG25   Z = 12   N =  25   A =  24.99 g/mole   abundance: 10.000 %
         --->  Isotope:  MG26   Z = 12   N =  26   A =  25.98 g/mole   abundance: 11.010 %
          ElmMassFraction:   0.02 %  ElmAbundance   0.02 % 

   --->  Element: MANGANESE (MN)   Z = 25.0   N =    55   A = 54.938 g/mole
         --->  Isotope:  MN55   Z = 25   N =  55   A =  54.94 g/mole   abundance: 100.000 %
          ElmMassFraction:   0.40 %  ElmAbundance   0.21 % 

   --->  Element: SILICON (SI)   Z = 14.0   N =    28   A = 28.085 g/mole
         --->  Isotope:  SI28   Z = 14   N =  28   A =  27.98 g/mole   abundance: 92.230 %
         --->  Isotope:  SI29   Z = 14   N =  29   A =  28.98 g/mole   abundance:  4.683 %
         --->  Isotope:  SI30   Z = 14   N =  30   A =  29.97 g/mole   abundance:  3.087 %
          ElmMassFraction:   0.20 %  ElmAbundance   0.20 % 

   --->  Element: TITANIUM (TI)   Z = 22.0   N =    48   A = 47.867 g/mole
         --->  Isotope:  TI46   Z = 22   N =  46   A =  45.95 g/mole   abundance:  8.250 %
         --->  Isotope:  TI47   Z = 22   N =  47   A =  46.95 g/mole   abundance:  7.440 %
         --->  Isotope:  TI48   Z = 22   N =  48   A =  47.95 g/mole   abundance: 73.720 %
         --->  Isotope:  TI49   Z = 22   N =  49   A =  48.95 g/mole   abundance:  5.410 %
         --->  Isotope:  TI50   Z = 22   N =  50   A =  49.94 g/mole   abundance:  5.180 %
          ElmMassFraction:   0.10 %  ElmAbundance   0.06 % 

   --->  Element: VANADIUM (V)   Z = 23.0   N =    51   A = 50.941 g/mole
         --->  Isotope:   V50   Z = 23   N =  50   A =  49.95 g/mole   abundance:  0.250 %
         --->  Isotope:   V51   Z = 23   N =  51   A =  50.94 g/mole   abundance: 99.750 %
          ElmMassFraction:   0.15 %  ElmAbundance   0.08 % 

   --->  Element: ZINC (ZN)   Z = 30.0   N =    65   A = 65.390 g/mole
         --->  Isotope:  ZN64   Z = 30   N =  64   A =  63.93 g/mole   abundance: 48.630 %
         --->  Isotope:  ZN66   Z = 30   N =  66   A =  65.93 g/mole   abundance: 27.900 %
         --->  Isotope:  ZN67   Z = 30   N =  67   A =  66.93 g/mole   abundance:  4.100 %
         --->  Isotope:  ZN68   Z = 30   N =  68   A =  67.92 g/mole   abundance: 18.750 %
         --->  Isotope:  ZN70   Z = 30   N =  70   A =  69.93 g/mole   abundance:  0.620 %
          ElmMassFraction:   0.10 %  ElmAbundance   0.04 % 

   --->  Element: ZIRCONIUM (ZR)   Z = 40.0   N =    91   A = 91.224 g/mole
         --->  Isotope:  ZR90   Z = 40   N =  90   A =  89.90 g/mole   abundance: 51.450 %
         --->  Isotope:  ZR91   Z = 40   N =  91   A =  90.91 g/mole   abundance: 11.220 %
         --->  Isotope:  ZR92   Z = 40   N =  92   A =  91.91 g/mole   abundance: 17.150 %
         --->  Isotope:  ZR94   Z = 40   N =  94   A =  93.91 g/mole   abundance: 17.380 %
         --->  Isotope:  ZR96   Z = 40   N =  96   A =  95.91 g/mole   abundance:  2.800 %
          ElmMassFraction:   0.25 %  ElmAbundance   0.08 % 


 Material : materials:Aluminium 2219
 Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 100 um 
 Energy thresholds :  gamma  62.9882 keV    e-  34.8847 MeV    e+  32.6175 MeV proton 10 keV

  • DD:
### Material 14   10 elements
 Material: Aluminium 2219    density:  2.840 g/cm3   RadL:   7.905 cm   Nucl.Int.Length:  37.715 cm 
                       Imean: 174.491 eV   temperature: 293.15 K  pressure:   1.00 atm

   --->  Element: Al (Al)   Z = 13.0   N =    27   A = 26.980 g/mole
         --->  Isotope:  Al27   Z = 13   N =  27   A =  26.98 g/mole   abundance: 100.000 %
          ElmMassFraction:  91.68 %  ElmAbundance  96.13 % 

   --->  Element: Cu (Cu)   Z = 29.0   N =    64   A = 63.546 g/mole
         --->  Isotope:  Cu63   Z = 29   N =  63   A =  62.93 g/mole   abundance: 69.170 %
         --->  Isotope:  Cu65   Z = 29   N =  65   A =  64.93 g/mole   abundance: 30.830 %
          ElmMassFraction:   6.80 %  ElmAbundance   3.03 % 

   --->  Element: Fe (Fe)   Z = 26.0   N =    56   A = 55.850 g/mole
         --->  Isotope:  Fe54   Z = 26   N =  54   A =  53.94 g/mole   abundance:  5.845 %
         --->  Isotope:  Fe56   Z = 26   N =  56   A =  55.93 g/mole   abundance: 91.754 %
         --->  Isotope:  Fe57   Z = 26   N =  57   A =  56.94 g/mole   abundance:  2.119 %
         --->  Isotope:  Fe58   Z = 26   N =  58   A =  57.93 g/mole   abundance:  0.282 %
          ElmMassFraction:   0.30 %  ElmAbundance   0.15 % 

   --->  Element: Mg (Mg)   Z = 12.0   N =    24   A = 24.305 g/mole
         --->  Isotope:  Mg24   Z = 12   N =  24   A =  23.98 g/mole   abundance: 78.990 %
         --->  Isotope:  Mg25   Z = 12   N =  25   A =  24.99 g/mole   abundance: 10.000 %
         --->  Isotope:  Mg26   Z = 12   N =  26   A =  25.98 g/mole   abundance: 11.010 %
          ElmMassFraction:   0.02 %  ElmAbundance   0.02 % 

   --->  Element: Mn (Mn)   Z = 25.0   N =    55   A = 54.938 g/mole
         --->  Isotope:  Mn55   Z = 25   N =  55   A =  54.94 g/mole   abundance: 100.000 %
          ElmMassFraction:   0.40 %  ElmAbundance   0.21 % 

   --->  Element: Si (Si)   Z = 14.0   N =    28   A = 28.090 g/mole
         --->  Isotope:  Si28   Z = 14   N =  28   A =  27.98 g/mole   abundance: 92.230 %
         --->  Isotope:  Si29   Z = 14   N =  29   A =  28.98 g/mole   abundance:  4.683 %
         --->  Isotope:  Si30   Z = 14   N =  30   A =  29.97 g/mole   abundance:  3.087 %
          ElmMassFraction:   0.20 %  ElmAbundance   0.20 % 

   --->  Element: Ti (Ti)   Z = 22.0   N =    48   A = 47.880 g/mole
         --->  Isotope:  Ti46   Z = 22   N =  46   A =  45.95 g/mole   abundance:  8.250 %
         --->  Isotope:  Ti47   Z = 22   N =  47   A =  46.95 g/mole   abundance:  7.440 %
         --->  Isotope:  Ti48   Z = 22   N =  48   A =  47.95 g/mole   abundance: 73.720 %
         --->  Isotope:  Ti49   Z = 22   N =  49   A =  48.95 g/mole   abundance:  5.410 %
         --->  Isotope:  Ti50   Z = 22   N =  50   A =  49.94 g/mole   abundance:  5.180 %
          ElmMassFraction:   0.10 %  ElmAbundance   0.06 % 

   --->  Element: V (V)   Z = 23.0   N =    51   A = 50.941 g/mole
         --->  Isotope:   V50   Z = 23   N =  50   A =  49.95 g/mole   abundance:  0.250 %
         --->  Isotope:   V51   Z = 23   N =  51   A =  50.94 g/mole   abundance: 99.750 %
          ElmMassFraction:   0.15 %  ElmAbundance   0.08 % 

   --->  Element: Zn (Zn)   Z = 30.0   N =    65   A = 65.390 g/mole
         --->  Isotope:  Zn64   Z = 30   N =  64   A =  63.93 g/mole   abundance: 48.630 %
         --->  Isotope:  Zn66   Z = 30   N =  66   A =  65.93 g/mole   abundance: 27.900 %
         --->  Isotope:  Zn67   Z = 30   N =  67   A =  66.93 g/mole   abundance:  4.100 %
         --->  Isotope:  Zn68   Z = 30   N =  68   A =  67.92 g/mole   abundance: 18.750 %
         --->  Isotope:  Zn70   Z = 30   N =  70   A =  69.93 g/mole   abundance:  0.620 %
          ElmMassFraction:   0.10 %  ElmAbundance   0.04 % 

   --->  Element: Zr (Zr)   Z = 40.0   N =    91   A = 91.220 g/mole
         --->  Isotope:  Zr90   Z = 40   N =  90   A =  89.90 g/mole   abundance: 51.450 %
         --->  Isotope:  Zr91   Z = 40   N =  91   A =  90.91 g/mole   abundance: 11.220 %
         --->  Isotope:  Zr92   Z = 40   N =  92   A =  91.91 g/mole   abundance: 17.150 %
         --->  Isotope:  Zr94   Z = 40   N =  94   A =  93.91 g/mole   abundance: 17.380 %
         --->  Isotope:  Zr96   Z = 40   N =  96   A =  95.91 g/mole   abundance:  2.800 %
          ElmMassFraction:   0.25 %  ElmAbundance   0.08 % 

 Material : Aluminium 2219
 Range cuts        :  gamma  1 mm     e-  1 mm     e+  1 mm  proton 1 mm 
 Energy thresholds :  gamma  7.73912 keV    e-  618.791 keV    e+  590.357 keV proton 100 keV

@ianna
Copy link
Contributor Author

ianna commented Nov 14, 2019

@civanch, @cvuosalo - FYI

Summary: the issues with units are still there, but DD4hep is going to move to G4 units as the default ones in the next release, I think.

The question is if we should ask for more precise material definition in ROOT and who will communicate it to the ROOT team?

@ianna
Copy link
Contributor Author

ianna commented Nov 15, 2019

The units converter bug is reported to DD4hep team and will be fixed asap.

@civanch
Copy link
Contributor

civanch commented Nov 15, 2019

@ianna , there are two separate issues: CMS material definition and DD4Hep. Concerning CMS I have in mind to define all elements differently both in DD and DD4Hep cases using G4 database. After that, some part of differences in materials may gone. What will be left is duplicated materials and materials which have different densities and/or compositions in DD and DD4Hep, which should be resolved one by one.

Independently you may send a ticket to DD4Hep with all problems we have.

@ianna
Copy link
Contributor Author

ianna commented Nov 15, 2019

#28404 fixes atomic weight and density issues.

@ianna
Copy link
Contributor Author

ianna commented Nov 15, 2019

@civanch - after testing with normalised after parsing xml values (PR#28404) all but one differences in materials have gone. The only difference I see is the temperature.

G4 from DD4hep 273.15 K:

Material: materials:Air    density:  1.214 mg/cm3  RadL: 301.522 m    Nucl.Int.Length: 704.082 m  
                       Imean:  85.538 eV   temperature: 273.15 K  pressure:   1.00 atm

   --->  Element: CMS element (Nitrogen)   Z =  7.0   N =    14   A = 14.007 g/mole
         --->  Isotope: Nitrogen14   Z =  7   N =  14   A =  14.00 g/mole   abundance: 99.632 %
         --->  Isotope: Nitrogen15   Z =  7   N =  15   A =  15.00 g/mole   abundance:  0.368 %
          ElmMassFraction:  74.94 %  ElmAbundance  77.06 % 

   --->  Element: CMS element (Oxygen)   Z =  8.0   N =    16   A = 15.999 g/mole
         --->  Isotope: Oxygen16   Z =  8   N =  16   A =  15.99 g/mole   abundance: 99.757 %
         --->  Isotope: Oxygen17   Z =  8   N =  17   A =  17.00 g/mole   abundance:  0.038 %
         --->  Isotope: Oxygen18   Z =  8   N =  18   A =  18.00 g/mole   abundance:  0.205 %
          ElmMassFraction:  23.69 %  ElmAbundance  21.33 % 

   --->  Element: ARGON (AR)   Z = 18.0   N =    40   A = 39.948 g/mole
         --->  Isotope:  AR36   Z = 18   N =  36   A =  35.97 g/mole   abundance:  0.337 %
         --->  Isotope:  AR38   Z = 18   N =  38   A =  37.96 g/mole   abundance:  0.063 %
         --->  Isotope:  AR40   Z = 18   N =  40   A =  39.96 g/mole   abundance: 99.600 %
          ElmMassFraction:   1.29 %  ElmAbundance   0.47 % 

   --->  Element: HYDROGEN (H)   Z =  1.0   N =     1   A =  1.008 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
          ElmMassFraction:   0.08 %  ElmAbundance   1.14 % 

vs
G4 from DD 293.15 K:

 Material:      Air    density:  1.214 mg/cm3  RadL: 301.522 m    Nucl.Int.Length: 704.082 m  
                       Imean:  85.538 eV   temperature: 293.15 K  pressure:   1.00 atm

   --->  Element: N (N)   Z =  7.0   N =    14   A = 14.007 g/mole
         --->  Isotope:   N14   Z =  7   N =  14   A =  14.00 g/mole   abundance: 99.632 %
         --->  Isotope:   N15   Z =  7   N =  15   A =  15.00 g/mole   abundance:  0.368 %
          ElmMassFraction:  74.94 %  ElmAbundance  77.06 % 

   --->  Element: O (O)   Z =  8.0   N =    16   A = 15.999 g/mole
         --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance: 99.757 %
         --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:  0.038 %
         --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:  0.205 %
          ElmMassFraction:  23.69 %  ElmAbundance  21.33 % 

   --->  Element: Ar (Ar)   Z = 18.0   N =    40   A = 39.948 g/mole
         --->  Isotope:  Ar36   Z = 18   N =  36   A =  35.97 g/mole   abundance:  0.337 %
         --->  Isotope:  Ar38   Z = 18   N =  38   A =  37.96 g/mole   abundance:  0.063 %
         --->  Isotope:  Ar40   Z = 18   N =  40   A =  39.96 g/mole   abundance: 99.600 %
          ElmMassFraction:   1.29 %  ElmAbundance   0.47 % 

   --->  Element: H (H)   Z =  1.0   N =     1   A =  1.008 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
          ElmMassFraction:   0.08 %  ElmAbundance   1.14 % 

@civanch
Copy link
Contributor

civanch commented Nov 15, 2019

@ianna , Great!

G4 temperature is more correct, it is 20C and not 0C defined in DD4Hep but this is really very minor problem, we may have work around and additionally notify DD4Hep developers.

@ianna
Copy link
Contributor Author

ianna commented Nov 15, 2019

@civanch - yes. It looks like G4 uses NTP: 20 C and 1 atm and ROOT uses STP: 0 C and 1 atm. DD4hep neither manipulate nor define these properties.

@ianna
Copy link
Contributor Author

ianna commented Nov 15, 2019

Updated GDML dump of the G4 geometry built with DD4hep defines MEE values close to the DD's.

For example, 284.911565734504 eV vs 284.911565693922 eV:

<material name="hcalforwardmaterial_HFAbsorber0x7fe222384740" state="solid">
      <P unit="pascal" value="101324.845390854"/>
      <MEE unit="eV" value="284.911565734504"/>
      <D unit="g/cm3" value="7.68666"/>
      <fraction n="0.996816000004741" ref="CMS_element0x7fe222ac7900"/>
      <fraction n="1.49880000000713e-06" ref="CMS_element0x7fe22ba9ee80"/>
      <fraction n="0.00106178410721505" ref="CMS_element0x7fe22ba9ed00"/>
      <fraction n="2.58000000001227e-08" ref="ARGON0x7fe22ba9ef40"/>
      <fraction n="0.00010092261923448" ref="HYDROGEN0x7fe22ba9ec40"/>
      <fraction n="0.000931689692794431" ref="CMS_element0x7fe22ba9edc0"/>
      <fraction n="0.00108807897601517" ref="CMS_element0x7fe22ba9eb80"/>
    </material>

@cvuosalo
Copy link
Contributor

@cvuosalo
Copy link
Contributor

cvuosalo commented Aug 6, 2020

@ianna Would you say this issue is resolved? If not, what would you say still needs to be fixed?

@ianna
Copy link
Contributor Author

ianna commented Aug 7, 2020

@cvuosalo - as I mentioned here #28168 (comment) DD4hep is moving to G4 units as the default ones. We haven't updated to this version yet. I'd rerun the tests after that to make sure all numbers match, then close this issue.

@ianna
Copy link
Contributor Author

ianna commented Sep 15, 2020

@cvuosalo and @civanch - The major differences have been fixed. I suppose, the issue can be closed.

Geant4Converter        ++ Created G4 Isotope Bor 10 from data: Z=5 N=10 A=10.000 [g/mole]
Geant4Converter        ++ Created G4 element  Element: CMS element (Bor 10)   Z =  5.0   N =    10   A = 10.000 g/mole
         --->  Isotope: Bor 1010   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope: Bor 1011   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

Geant4Converter        ++ Created G4 Isotope Bor 11 from data: Z=5 N=11 A=11.000 [g/mole]
Geant4Converter        ++ Created G4 element  Element: CMS element (Bor 11)   Z =  5.0   N =    11   A = 11.000 g/mole
         --->  Isotope: Bor 1110   Z =  5   N =  10   A =  10.01 g/mole   abundance: 19.900 %
         --->  Isotope: Bor 1111   Z =  5   N =  11   A =  11.01 g/mole   abundance: 80.100 %

Geant4Converter        ++ Created G4 Isotope Phosphor from data: Z=15 N=30 A=30.974 [g/mole]
Geant4Converter        ++ Created G4 element  Element: CMS element (Phosphor)   Z = 15.0   N =    31   A = 30.974 g/mole
         --->  Isotope: Phosphor31   Z = 15   N =  31   A =  30.97 g/mole   abundance: 100.000 %
Geant4Converter        ++ Created G4 Isotope Vacuum from data: Z=1 N=1 A=1.000 [g/mole]
Geant4Converter        ++ Created G4 element  Element: CMS element (Vacuum)   Z =  1.0   N =     1   A =  1.000 g/mole
         --->  Isotope: Vacuum1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope: Vacuum2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %

Geant4Converter        ++ Created G4 material  Material: materials:Vacuum    density:  0.000 kg/m3   RadL: 6254684107939.096 km   Nucl.Int.Length: 3500000003326.212 km 
                       Imean:  19.200 eV   temperature: 273.15 K  pressure:   1.00 atm

   --->  Element: CMS element (Vacuum)   Z =  1.0   N =     1   A =  1.000 g/mole
         --->  Isotope: Vacuum1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope: Vacuum2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
          ElmMassFraction: 100.00 %  ElmAbundance 100.00 % 

              log(MEE): -10.8606

@ianna
Copy link
Contributor Author

ianna commented Sep 15, 2020

+1

@ghugo83
Copy link
Contributor

ghugo83 commented Mar 23, 2021

There seem to be very few discrepancies left in G4 materials.
Could observe the following:

  • T= 293.15 K for DDD materials, 273.15 K in DD4hep materials.

  • pixfwdMaterials:FPix_CFSkin, FPix_CFSkin_InnerInnerRing, Pix_CFSkin_InnerOuterRing, FPix_CFSkin_OuterInnerRing, FPix_CFSkin_OuterOuterRing (all directly calling pixfwdMaterials:FPix_Disk_CF) have different composition in DDD than in DD4hep.

DDD description:

### Material 81   1 elements
Material: FPix_CFSkin    density:  3.435 g/cm3   RadL:  12.430 cm   Nucl.Int.Length:  23.334 cm 
                       Imean:  81.000 eV   temperature: 293.15 K  pressure:   1.00 atm

   --->  Element: C (C)   Z =  6.0   N =    12   A = 12.011 g/mole
         --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance: 98.930 %
         --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:  1.070 %
          ElmMassFraction: 100.00 %  ElmAbundance 100.00 % 

DD4hep description:

### Material 151   3 elements
Material: pixfwdMaterials:FPix_CFSkin    density:  3.435 g/cm3   RadL:  12.031 cm   Nucl.Int.Length:  22.292 cm 
                       Imean:  72.800 eV   temperature: 273.15 K  pressure:   1.00 atm

   --->  Element: CMS element (Carbon)   Z =  6.0   N =    12   A = 12.011 g/mole
         --->  Isotope: Carbon12   Z =  6   N =  12   A =  12.00 g/mole   abundance: 98.930 %
         --->  Isotope: Carbon13   Z =  6   N =  13   A =  13.00 g/mole   abundance:  1.070 %
          ElmMassFraction:  74.99 %  ElmAbundance  50.00 % 

   --->  Element: HYDROGEN (H)   Z =  1.0   N =     1   A =  1.008 g/mole
         --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance: 99.989 %
         --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:  0.011 %
          ElmMassFraction:   5.03 %  ElmAbundance  40.00 % 

   --->  Element: CMS element (Oxygen)   Z =  8.0   N =    16   A = 15.999 g/mole
         --->  Isotope: Oxygen16   Z =  8   N =  16   A =  15.99 g/mole   abundance: 99.757 %
         --->  Isotope: Oxygen17   Z =  8   N =  17   A =  17.00 g/mole   abundance:  0.038 %
         --->  Isotope: Oxygen18   Z =  8   N =  18   A =  18.00 g/mole   abundance:  0.205 %
          ElmMassFraction:  19.98 %  ElmAbundance  10.00 % 

  • Pix_Fwd_OuterBlade_AdhFilm and Aluminium 2219 have slightly different properties between DDD and DD4hep (possibly due to the difference of atomic mass numbers?).

@ghugo83
Copy link
Contributor

ghugo83 commented Mar 24, 2021

Alright, #33257 fixed the issue with pixfwdMaterials:FPix_CFSkin, FPix_CFSkin_InnerInnerRing, Pix_CFSkin_InnerOuterRing, FPix_CFSkin_OuterInnerRing, FPix_CFSkin_OuterOuterRing

@ghugo83
Copy link
Contributor

ghugo83 commented Mar 24, 2021

Present status, DDD <-> DD4hep materials:

  • buggy elementary materials (ROOT/DD4hep descriptions) properly fixed
  • units properly fixed.

What shall we do regarding:

  • T= 293.15 K for DDD materials, 273.15 K in DD4hep materials.
  • Elementary materials having slightly different atomic mass numbers in DDD <-> DD4hep? (leading to minor differences in DDD <-> DD4hep materials properties here and there?)

If these remaining points can be seen as fine, I guess we can close this issue indeed?

@civanch
Copy link
Contributor

civanch commented Jun 9, 2021

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2021

This issue is fully signed and ready to be closed.

@qliphy qliphy closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants