Skip to content

Commit

Permalink
Clean up the pixel local reconstruction code (#593)
Browse files Browse the repository at this point in the history
Address the pixel local reconstruction review comments.

General clean up of the pixel local reconstruction code:
  - remove commented out and obsolete code and data members
  - use named constants more consistently
  - update variable names to follow the coding rules and for better consistency
  - use member initializer lists in the constructors
  - allow `if constexpr` in CUDA code
  - use `std::size` instead of hardcoding the array size
  - convert iterator-based loops to range-based loops
  - replace `cout` and `printf` with `LogDebug` or `LogWarning`
  - use put tokens
  - reorganise the auto-generated cfi files and use them more consistently
  - adjust code after rearranging an `#ifdef GPU_DEBUG` block
  - apply code formatting
  - other minor changes

Improve comments:
  - improve comments and remove obsolete ones
  - clarify comments and types regarding `HostProduct`
  - update comments about `GPU_SMALL_EVENTS` being kept for testing purposes
  - add notes about the original cpu code

Reuse some more common code:
  - move common pixel cluster code to `PixelClusterizerBase`
  - extend the `SiPixelCluster` constructor

Rename classes and modules for better consistency:
  - remove the `TrackingRecHit2DCUDA.h` and `gpuClusteringConstants.h` forwarding headers
  - rename `PixelRecHits` to `PixelRecHitGPUKernel`
  - rename SiPixelRecHitFromSOA to SiPixelRecHitFromCUDA
  - rename `siPixelClustersCUDAPreSplitting` to `siPixelClustersPreSplittingCUDA`
  - rename `siPixelRecHitsCUDAPreSplitting` to `siPixelRecHitsPreSplittingCUDA`
  - rename `siPixelRecHitsLegacyPreSplitting` to `siPixelRecHitsPreSplittingLegacy`
  - rename `siPixelRecHitHostSoA` to `siPixelRecHitSoAFromLegacy`

Re-apply changes from cms-sw#29805 that were lost in the Patatrack branch.
  • Loading branch information
fwyzard committed Dec 26, 2020
1 parent 460c22c commit f44f5b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions HLTrigger/Configuration/python/customizeHLTforPatatrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ def customisePixelLocalReconstruction(process):
)

# SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromSOA_cfi import siPixelRecHitFromSOA as _siPixelRecHitFromSOA
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi import siPixelRecHitFromCUDA as _siPixelRecHitFromCUDA
process.hltSiPixelRecHits = SwitchProducerCUDA(
# legacy producer
cpu = process.hltSiPixelRecHits,
# converter to legacy format
cuda = _siPixelRecHitFromSOA.clone(
cuda = _siPixelRecHitFromCUDA.clone(
pixelRecHitSrc = "hltSiPixelRecHitsCUDA",
src = "hltSiPixelClusters"
)
Expand Down Expand Up @@ -237,8 +237,8 @@ def customisePixelTrackReconstruction(process):
# referenced in process.HLTRecoPixelTracksTask

# cpu only: convert the pixel rechits from legacy to SoA format
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitHostSoA_cfi import siPixelRecHitHostSoA as _siPixelRecHitHostSoA
process.hltSiPixelRecHitSoA = _siPixelRecHitHostSoA.clone(
from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi import siPixelRecHitSoAFromLegacy as _siPixelRecHitSoAFromLegacy
process.hltSiPixelRecHitSoA = _siPixelRecHitSoAFromLegacy.clone(
src = "hltSiPixelClusters",
beamSpot = "hltOnlineBeamSpot",
convertToLegacy = True
Expand Down

0 comments on commit f44f5b4

Please sign in to comment.