Skip to content

Do not create ECAL fibers in BUILD_DISPLAY DD4hep build type

Ben Couturier requested to merge simplify_calo_geo_for_display into master

Superseeds !512 (closed) as DD4hep now correctly passes the build type to all constructors. In the current version of the geometry there are 18569797 nodes, and avoiding to build the ECAL fibres reduces this number to 1285189. This changes the run time of this test from ~6.3s to ~3.6s.

In DD4hep, the geometry build types are the following:

   enum DetectorBuildType {
     BUILD_NONE = 0,
     BUILD_DEFAULT = 1,
     BUILD_SIMU = BUILD_DEFAULT,
     BUILD_RECO,
     BUILD_DISPLAY,
     BUILD_ENVELOPE
   };

And the build type has to be specified while loading the geometry like so:

description.fromXML( "compact/run3/trunk/LHCb.xml", dd4hep::DetectorBuildType::BUILD_DISPLAY );

What this MR proposes is to not create the ECAL fibres in the BUILD_DISPLAY and BUILD_ENVELOPE modes. The default when creating the geometry is BUILD_DEFAULT, so nothing is changed by default, but in some cases we may decide to use BUILD_DISPLAY.

As a follow up MR, we should see which tests of Detector could have the buildType changed, and how/when we do this within the LHCb stack.

FYI @jmarchan @mexu @tlatham @gcorti @clemenci @sponce : what do you think ?

P.S. The change to BCM was due to the fact that it does not work with build type display, I added the levels but maybe we should remove the build argument altogether.


Validated by

  • Core Software
  • RTA
  • Simulation
Edited by Sebastien Ponce

Merge request reports

Loading