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

HGCal raw data handling: Unpacker, Geometry, Local Reco #45665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IzaakWN
Copy link
Contributor

@IzaakWN IzaakWN commented Aug 7, 2024

PR description:

This adds work from the Raw Data Handling Group of the HGCal DPG.

This PR includes:

  1. Updates to the unpacker (for the test beam last week)
    • Follow up on PR HGCal emulator and unpacker #41461.
    • We moved the emulators to more appropriate location (EventFilter/HGCalRawToDigiSimCalorimetry/HGCalSimAlgos), they will be subject of a future PR.
  2. Updates to the logical mapping & (dense) indexing in Geometry/HGCalMapping.
  3. The introduction of electronics configuration & calibrations, read from JSONs in CondFormats.
    • No need to create special tag for these records yet as this is work in progress.
  4. New Alpaka SoA formats for DIGI and RecHits in DataFormats/HGCalDigi/interface/HGCalDigiSoA.h.
  5. Alpaka calibration kernels for the DIGI → RecHit step.
  6. Adding TH2Poly for DQM. Removed from this PR (see below).

We kindly request this to be merged into CMSSW_14_1_0_pre7 in time for the coming September test beams where validation will continue.

PR validation:

No CMSSW workflow is impacted by this PR.

We validated this with test beam data last week. You can find latest DQM plots here: http://hgc-vm-2024.cern.ch:8070/dqm/online-dev/session

Further documentation

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45665/41204

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@pfs
Copy link
Contributor

pfs commented Aug 7, 2024

assign hgcal-dpg

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45665/41205

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

New categories assigned: hgcal-dpg

@rovere,@cseez,@pfs,@felicepantaleo you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

A new Pull Request was created by @IzaakWN for master.

It involves the following packages:

  • CondFormats/DataRecord (alca, db)
  • CondFormats/HGCalObjects (alca, upgrade, db)
  • DQMServices/Core (dqm)
  • DataFormats/HGCalDigi (upgrade, simulation)
  • DataFormats/HGCalRecHit (****)
  • DataFormats/Histograms (core, dqm)
  • EventFilter/HGCalRawToDigi (reconstruction, upgrade)
  • Geometry/HGCalMapping (geometry, upgrade)
  • RecoLocalCalo/HGCalRecAlgos (reconstruction, upgrade)
  • SimCalorimetry/HGCalSimAlgos (upgrade, simulation)
  • SimCalorimetry/HGCalSimProducers (upgrade, simulation)

The following packages do not have a category, yet:

DataFormats/HGCalRecHit
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

@Dr15Jones, @antoniovagnerini, @bsunanda, @civanch, @cmsbuild, @consuegs, @cseez, @felicepantaleo, @francescobrivio, @jfernan2, @makortel, @mandrenguyen, @mdhildreth, @nothingface0, @perrotta, @pfs, @rovere, @rvenditti, @saumyaphor4252, @smuzaffar, @srimanob, @subirsarkar, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks.
@JanChyczynski, @Martin-Grunewald, @PonIlya, @ReyerBand, @apsallid, @argiro, @barvic, @bsunanda, @cseez, @edjtscott, @fabiocos, @felicepantaleo, @hatakeyamak, @lgray, @martinamalberti, @missirol, @mmusich, @pfs, @rchatter, @rovere, @rsreds, @sameasy, @seemasharmafnal, @sethzenz, @thomreis, @tocheng, @vandreev11, @wang0jin, @youyingli, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@fwyzard
Copy link
Contributor

fwyzard commented Jan 6, 2025

+heterogeneous

The following is a squashed commit of the contributions of different people

Co-authored-by: IzaakWN <iwn_@hotmail.com>
Co-authored-by: Lovisa <lovisa.rygaard@cern.ch>
Co-authored-by: Matti Kortelainen <matti.kortelainen@cern.ch>
Co-authored-by: Pedro Silva <psilva@cern.ch>
Co-authored-by: Yulun Miao <60363605+yulunmiao@users.noreply.github.com>
Co-authored-by: ineuteli <izaak.neutelings@cern.ch>
Co-authored-by: ywkao <ywkao@hep1.phys.ntu.edu.tw>

A summary of contents follows. Note this has been edited (ammended by @pfs):

- HGCal Electronics Mapping for alpaka (#161)
   - add dense index map for HGCalElectronicsId
   - add getMaxDataSize & getMaxERxSize functions
   - fix getDenseIndex bug; add typcode map to ModuleIndexer (to retrieve module dense index offset); use regexp for type code
   - add getFedAndModuleIndex; rename getDenseIndex -> getIndexForModule(Data) for elecID
   - add typecode regexp; pass typecode to modIndexer_.processNewModule
   - adding dense index info producer
   - adding hgcalmapping customise
   - fix misunderstanding in max data size expected from indexer
   - remove_if was missing a call to std::vector::erase to effectively remove unused entries
   - typecodemap was missing a reset with the final indices
   - usage of command line options was missing in module map tester
   - do not use moduleLUT in DenseIndexInfoESProducer!! it has the full dimensions before trimming to the actual number of ECON-Ds in a FED
   - Add irot to module mapper (#134)
   - move variables to private, use getters and move bulky code to .cc in HGCalMappingModuleIndexer / apply code checks

- CondFormats
   - add calibrations Alpaka ESProducer
   - rename ES_HGCal*Parameter.cc -> HGCal*ParameterHostCollection.cc for clarity
   - moving to single record as all conds produced have the same IOV
   - add HGCal configuration ESProducers + record + tester
   - Record descriptions added
   - Re-introducing 1 record per payload, addressing additional code comments
   - rename ES_HGCal*Parameter.cc -> HGCal*ParameterHostCollection.cc for clarity
   - rename HGCal*ParameterHostCollection.cc -> HGCal*ParameterDeviceCollection.cc for clarity
   - rename 'HGCal.*(Device|Host)Collection -> (Device|Host)' for readability; move calib SoAs to CondFormats/HGCalObjects/; move TestHGCalRecHitESProducers to test
   - fill HGCal config structs for unpacker (header marks, charMode)
   - read HGCal FED & ECON-D configuration from JSON

- Adding digi SoAs
   - moving digi soa filler to alpaka and adding extra tools
   - rename 'HGCal.*(Device|Host)Collection -> HGCal.*(Device|Host)' for readability

- Refactor unpacker.
   - parse arrays of gain-dependent calibration parameters in eRx-blocks (simplified in latter commits to remove explicit gain-dependence)
   - add missing Noise attribute
   - Convert ECON-D payload to 32b words.
   - rebase the unpacker on denseIdx and SoA digis
   - Moving emulators to SimCalorimetry/HGCalSimAlgos, adapting paths
      - fix undefined left shift in HGCalRawDataPackingTools.cc; remove duplicate line in HGCalMappingTools.h (32 -> 31 to solve undefined left shift)
   - SoA format of HGCal ECON-D header
   - Unpack header information to HGCalECONDInfoSoA; Add in quality checks for ECON-D
   - Update unpacker to use HGCalConfiguration structure
   - Add flags for passthrough ECON-Ds
   - Fix the number of channel in eRx;Add default flag for digi, representing digi not read in raw data
   - Add parsing function for econd flag; renaming HGCalECONDInfo to HGCalECONDPacketInfo
   - Add in common mode in ECOND packet information
   - enable FED-level Parallelization through config
   - Remove change of location when something wrong in S-Link trailer

- Add HGCalRecHit
   - add DIGI2RECO calibration algorithms (see https://gitlab.cern.ch/hgcal-dpg/hgcal-comm/-/merge_requests/3)[C; remove detId/elecId from SoAs (should be redundant since common indexer); add HGCROCChannelDataFrame<HGCalDetId> to classes_def.xml
   - Move HGCalRawDataDefinitions.h.
   - Update and rename HGCalRecHitProducer.cc to HGCalRecHitProducers.cc
   - update calibration kernels
   - bugfix in the cm Sum
   - fill rec hitflags
   - update kernel after closure
   - swap arguments in tot kernel

- Code formats / checks
   - Removing unused includes and delarations
   - Re-introducing headers.h file needed for serialization classes
   - Remove data and change locations to cms-data folder
   - moving to printf, removing unused product, and message logger
   - int -> uint32_t; uncomment debugging print out
   - Change to LogDebug
@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 6, 2025

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 6, 2025

@pfs
Copy link
Contributor

pfs commented Jan 6, 2025

please test

@pfs
Copy link
Contributor

pfs commented Jan 6, 2025

+hgcal-dpg

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 6, 2025

+1

Size: This PR adds an extra 44KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2092d3/43631/summary.html
COMMIT: ed8369d
CMSSW: CMSSW_15_0_X_2025-01-05-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45665/43631/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

jfernan2 commented Jan 7, 2025

+1

@perrotta
Copy link
Contributor

perrotta commented Jan 7, 2025

+1

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.

10 participants