Skip to content

Rich remove final use of DetDesc in DD4HEP builds

Removes the final use of RICH DetDesc objects in DD4HEP builds.

Requires Detector!166 (merged) Rec!2836 (merged)

Also adds a new QM test that exercises the gas volume intersections. To be used to commission the new new DD4HEP version.

Note, some ref updates are expected as the new implementations are not bitwise identical to the old ones.

@bcouturi @seaso @bmalecki @tlin FYI

Update (5/5/2022)

This MR now contains a number of fixes that means when running on some recent MC generated by @bmalecki (thanks again?) I finally am starting to get good physics performance with dd4hep.

Comparing the CK theta resolutions I see for DetDesc

rich1-detdesc rich2-detdesc

whereas for DD4HEP

rich1-dd4hep rich2-dd4hep

So for RICH1, thing are pretty close.

For RICH2 I see a bit worse performance in the dd4hep builds compared to DetDec. There is a slight bias in the resolution, and the width is a bit worse. There are a few possible reasons for this

  1. We know that for RICH2 (unlike RICh1) the form of the calculation used to compute the refractive index values is not the same as that in DetDesc. dd4hep uses the simple 'classic' sellmeir form for pure CF4 whereas DetDesc uses a different form that takes the CO2/CF4 mixture into account.
  2. If I compare a verbose dump of the geometry information for dd4hep compared to detdesc, there are small differences for RICH2 that are not there for RICH1. See

https://gitlab.cern.ch/jonrob/LHCb/-/blob/RICH-remove-DetDesc-in-DD4HEP-builds/Rich/RichDetectors/tests/refs/instanciate-pmt-detdesc-data.ref

https://gitlab.cern.ch/jonrob/LHCb/-/blob/RICH-remove-DetDesc-in-DD4HEP-builds/Rich/RichDetectors/tests/refs/instanciate-pmt-detdesc-data.ref.dd4hep

If you diff the two, and scan down to the RICH2 mirror part, you will see for the 56 primary mirrors small diffs in the CoC values. e.g.

detdesc

TestDerivedDets     DEBUG  56 Primary Mirrors :-
TestDerivedDets     DEBUG  -> [ Num=0 RoC=8608 CoC=(3272.03,18.5183,3280.45) CentrePnt=(12.9344,-1154.24,11160.8) CentreNorm=(0.378613,0.136241,-0.915473) Refl={ NumBins=643 Min(X,Y)=(1.24312e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24312e-05,0) } ]
TestDerivedDets     DEBUG  -> [ Num=1 RoC=8611 CoC=(3272.63,18.9424,3277.5) CentrePnt=(435.244,-1166.25,11320.7) CentreNorm=(0.329507,0.137637,-0.934067) Refl={ NumBins=643 Min(X,Y)=(1.24312e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24312e-05,0) } ]
TestDerivedDets     DEBUG  -> [ Num=2 RoC=8568 CoC=(3260.04,13.0171,3318.17) CentrePnt=(858.49,-1168.11,11457.5) CentreNorm=(0.280292,0.137853,-0.949965) Refl={ NumBins=643 Min(X,Y)=(1.24312e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24312e-05,0) } ]

dd4hep

TestDerivedDets     DEBUG  56 Primary Mirrors :-
TestDerivedDets     DEBUG  -> [ Num=0 RoC=8608 CoC=(3272.03,18.5184,3280.44) CentrePnt=(12.9344,-1154.24,11160.8) CentreNorm=(0.378613,0.136241,-0.915473) Refl={ NumBins=643 Min(X,Y)=(1.24313e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24313e-05,0) } ]
TestDerivedDets     DEBUG  -> [ Num=1 RoC=8611 CoC=(3272.63,18.9425,3277.48) CentrePnt=(435.244,-1166.25,11320.7) CentreNorm=(0.329507,0.137637,-0.934067) Refl={ NumBins=643 Min(X,Y)=(1.24313e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24313e-05,0) } ]
TestDerivedDets     DEBUG  -> [ Num=2 RoC=8568 CoC=(3260.04,13.0175,3318.04) CentrePnt=(858.49,-1168.11,11457.3) CentreNorm=(0.280292,0.137853,-0.949965) Refl={ NumBins=643 Min(X,Y)=(1.24313e-06,0.8) Median(X,Y)=(6.83719e-06,0) Max(X,Y)=(1.24313e-05,0) } ]

these diffs then also propagate through to the computed nominal values for the RICH as a whole

TestDerivedDets     DEBUG  NomRoC=8588.11
TestDerivedDets     DEBUG  NomCoCs=(3263.64,18.2838,3304.78),(-3268.49,17.2016,3294.1)
TestDerivedDets     DEBUG  NomRoC=8600
TestDerivedDets     DEBUG  NomCoCs=(3269.89,17.3292,3288.16),(-3269.35,17.3292,3288.16)

These diffs are small, but could well be enough to explain the effect.

@seaso can you comment on why we have these residual diffs in the CoC values for the RICH2 primary mirrors ?

here is a screen shot showing more details on the diffs I observe, using kdiff4 to compare the logs

r2-mirror-diffs

Edited by Christopher Rob Jones

Merge request reports

Loading