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

MTD geometry/reconstruction: define new ETL reco layer geometry, update LGAD pixel structure, activate workflows for scenarios D72 and D73 #31765

Merged
merged 28 commits into from Oct 29, 2020

Conversation

fabiocos
Copy link
Contributor

PR description:

This PR is built on top of #31710 (here fully embedded), where the new ETL geometries implemented by @icosivi are integrated, and needs #31654 to provide physically meaningful results. Its full scrutiny will benefit from the updated MTD validation for 2-discs ETL prepared by @gsorrentino18 which will be presented in a separate PR.

To complete the basic geometry definition in view of the reconstruction, the logical partitioning of LGADs encoded in the MTD topology (from mtdParameters.xml) is updated to the TDR scenario of 2 ROCs per LGAD, 16x32 pixels of 1.3x1.3 mm**2.

The heart of the PR is the full update of RecoMTD/DetLayers package to add, in parallel to the existing ring-based layer, a sector-based layer suitable to describe both scenario D72 (4 sectors per disc face) and D73 (2 sectors per disc face). A parallel set of classes is built, and the choice of which layer geometry to build is made based on the MTDTopologyMode parameter provided by the topology ES. In order to describe the sector, which is a bounded disc sector, the existing classes developed for the tracker are used, and moved outside the RecoTracker/TkDetLayers area into the more standard DataFormats/GeometrySurface package (where other similar objects are stored).

Since at present this code must simultaneously describe two different detector designs, the strategy chosen to search for compatibleDets within a sector is kept simple, without and optimized navigation of the module matrix for the time being. As it cannot exploit existing geometrical ordering strategies (as for rings, concentring rings ordered in radius with modules ordered in phi), the numerical sorting of modules within a sectors by ETLDetId provides an approximate ordering of modules (same module number, different types corresponding to left/right side of a modules' strip). This ordering would be pair-wide lexicographic in a x,y matrix of modules, but for the fact that the left and right number of modules does not fully match, as can be seen from a geometry display for one of the D73 discs.

image

When the module of closest approach to the track extrapolation onto the sector surface is identified in a loop probing the distance of all modules, a range of modules around the closest one is explored to search for possible other compatibilities. In order to limit the CPU time taken by the search, a fixed-range window of modules is defined around the closest one, and modules are sorted according to distances are sorted just in that range (and not on the whole sector), so the sorting involves at most 100 elements (in the present implementation), based on the geometry of the setups and observed behaviour.

PR validation:

The standard benchmark workflows for scenarios D72 and D73 , defined already in #31710, are activated in this PR to allow tests to systematically probe also this new code. They have been verified to smoothly run on 100 events. A refreshed dedicated test code is provided in the test area of RecoMTD/DetLayers, it has been used to check the structure of layers and behaviour of the search code, and can be easily turned into a unit test like those running already for the Geometry/MTD* packages. A preliminary check with the updated MTD DQM performed by @gsorrentino18 on a late development stage of this PR showed reasonable results (to be reverified).

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31765/18996

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fabiocos (Fabio Cossutti) for master.

It involves the following packages:

Configuration/Geometry
Configuration/PyReleaseValidation
Configuration/StandardSequences
DataFormats/GeometrySurface
Geometry/CMSCommonData
Geometry/MTDCommonData
Geometry/MTDGeometryBuilder
RecoLocalFastTime/FTLClusterizer
RecoMTD/DetLayers
RecoMTD/Records
RecoTracker/TkDetLayers

@perrotta, @civanch, @Dr15Jones, @jordan-martins, @chayanit, @cvuosalo, @wajidalikhan, @ianna, @mdhildreth, @cmsbuild, @makortel, @franzoni, @silviodonato, @kpedro88, @slava77, @jpata, @qliphy, @fabiocos, @davidlange6 can you please review it and eventually sign? Thanks.
@vargasa, @makortel, @felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @Martin-Grunewald, @mschrode, @lecriste, @gpetruc, @ebrondol, @mtosi, @dgulhan, @slomeo this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@fabiocos
Copy link
Contributor Author

please test workflow 33034.0,33434.0

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 13, 2020

The tests are being triggered in jenkins.
Test Parameters:

@cmsbuild
Copy link
Contributor

-1

Tested at: da87430

CMSSW: CMSSW_11_2_X_2020-10-12-2300
SCRAM_ARCH: slc7_amd64_gcc820
You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88e4fa/9905/summary.html

I found follow errors while testing this PR

Failed tests: ClangBuild

  • Clang:

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors/Fireworks only changes/No short matrix requested (RelVals and Igprof tests were also skipped)

@cvuosalo
Copy link
Contributor

+1

@bsunanda
Copy link
Contributor

bsunanda commented Oct 27, 2020 via email

@jbsauvan
Copy link
Contributor

The trigger mappings used are the same for v11 (C9) and v12 (C11):
https://github.com/cms-sw/cmssw/blob/master/L1Trigger/L1THGCal/python/hgcalTriggerPrimitives_cff.py#L26
I suppose this might be due to additional partial wafers in v12 that are not present in v11?

@civanch
Copy link
Contributor

civanch commented Oct 28, 2020

+1

@jpata
Copy link
Contributor

jpata commented Oct 28, 2020

+reconstruction

@fabiocos
Copy link
Contributor Author

fabiocos commented Oct 28, 2020

@jpata I did a test with wf 33634.0 with PU = 200, using some 10k generated MinBias with the same scenario as pileup file, and running igprof on 100 events. As expected the MTD geometry initialization disappears from the top part of the list.

   1.0      300.16  TrackExtenderWithMTDT<std::vector<reco::Track, std::allocator<reco::Track> > >::produce(edm::Event&, edm::EventSetup const&) [220]

is the highest MTD contribution to CPU consumption, and concerning this PR:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
            0.1  ..........       33.73 / 34.16         MTDSectorForwardDoubleLayer::groupedCompatibleDets(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimato
r const&) const [928]
[932]       0.1       33.73        0.27 / 33.46       MTDSectorForwardLayer::compatibleDets(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const
            0.1  ..........       31.56 / 31.56         MTDDetSector::compatibleDets(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const [955]
            0.0  ..........        1.22 / 37.13         ForwardDetLayer::compatible(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const [883]
            0.0  ..........        0.28 / 0.34          DiskSectorBounds::inside(Point3DBase<float, LocalTag> const&, LocalError const&, float) const [7556]
            0.0  ..........        0.18 / 102.73        BasicTrajectoryState::createLocalErrorFromCurvilinearError() const [505]
            0.0  ..........        0.16 / 0.24          void std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > >::_M_range_insert<__gnu_cxx::__normal_iterator<std::pair<GeomDet const*, TrajectoryStateOnSurface>*, std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > > > >(__gnu_cxx::__normal_iterator<std::pair<GeomDet const*, TrajectoryStateOnSurface>*, std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > > >, __gnu_cxx::__normal_iterator<std::pair<GeomDet const*, TrajectoryStateOnSurface>*, std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > > >, __gnu_cxx::__normal_iterator<std::pair<GeomDet const*, TrajectoryStateOnSurface>*, std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > > >, std::forward_iterator_tag) [8379]
            0.0  ..........        0.03 / 184.64        __libc_free [343]
            0.0  ..........        0.01 / 33.59         BasicTrajectoryState::~BasicTrajectoryState() [935]
            0.0  ..........        0.01 / 18.49         std::_Sp_counted_ptr_inplace<BasicSingleTrajectoryState, churn_allocator<BasicSingleTrajectoryState>, (__gnu_cxx::_Lock_policy)2>::_M_destroy() [2034]
            0.0  ..........        0.00 / 196.92        _init [324]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
            0.1  ..........       31.56 / 33.73         MTDSectorForwardLayer::compatibleDets(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) con
st [932]
[955]       0.1       31.56       21.90 / 9.65        MTDDetSector::compatibleDets(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const
            0.0  ..........        5.28 / 5.28          MTDDetSector::add(unsigned long, std::vector<std::pair<GeomDet const*, TrajectoryStateOnSurface>, std::allocator<std::pair<GeomDet const*, TrajectoryStateOnSurface> > >&, TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const [2973]
            0.0  ..........        2.48 / 2.48          void std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, long, __gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, __gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, long, __gnu_cxx::__ops::_Iter_less_iter) [clone .isra.128] [3846]
            0.0  ..........        1.10 / 1.10          MTDDetSector::compatible(TrajectoryStateOnSurface const&, Propagator const&, MeasurementEstimator const&) const [5124]
            0.0  ..........        0.34 / 0.34          void std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, __gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, __gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, __gnu_cxx::__ops::_Iter_less_iter) [7516]
            0.0  ..........        0.15 / 405.07        operator new(unsigned long) [141]
            0.0  ..........        0.12 / 0.12          std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > >::_M_erase(__gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >, __gnu_cxx::__normal_iterator<std::pair<double, unsigned long>*, std::vector<std::pair<double, unsigned long>, std::allocator<std::pair<double, unsigned long> > > >) [10431]
            0.0  ..........        0.06 / 173.22        je_free_default [358]
            0.0  ..........        0.03 / 184.64        __libc_free [343]
            0.0  ..........        0.02 / 196.92        _init [324]
            0.0  ..........        0.01 / 33.59         BasicTrajectoryState::~BasicTrajectoryState() [935]
            0.0  ..........        0.01 / 18.49         std::_Sp_counted_ptr_inplace<BasicSingleTrajectoryState, churn_allocator<BasicSingleTrajectoryState>, (__gnu_cxx::_Lock_policy)2>::_M_destroy() [2034]
            0.0  ..........        0.01 / 11.73         operator delete(void*) [2337]
            0.0  ..........        0.00 / 1.91          _dl_runtime_resolve_xsave [4199]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

@fabiocos
Copy link
Contributor Author

@chaynit questions? Comments?

@chayanit
Copy link

+1

@silviodonato
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will be automatically merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet