Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b50b0b4
Implement Phase 2 PixelTracks CA Extension
rovere May 20, 2025
4baf69b
Cache PinPSinOTBarrel. Use vector and unordered_map instead of set.
rovere Jun 14, 2025
434fd5c
Move geometry-related logic in BeginRun.
rovere Jun 14, 2025
3a4ec3e
Update logic in PixelTrackProducerFromSoAAlpaka to reuse the HitModul…
JanGerritSchulz Jun 16, 2025
9451d7c
Fix a few CA bugs, add procModifier to enable the extension
JanGerritSchulz Jun 17, 2025
30ce3ff
Reduce code duplication and improve readability in SoA merging
Parsifal-2045 Jul 9, 2025
e4615d1
Add new vector cuts for doublet building in CA
JanGerritSchulz Jul 16, 2025
4bf0a50
Add option in PixelTrackProducerFromSoAAlpaka to exclude quadruplets …
JanGerritSchulz Jul 16, 2025
4a89851
make chi2 cut on CA Tracks dependent on the number of ReCHits
JanGerritSchulz Jul 24, 2025
36452aa
change default for Phase2 CA extension to requiring quadruplets to ha…
JanGerritSchulz Jul 25, 2025
ac549e8
Apply improved CA cuts for regular and extend configurations
JanGerritSchulz Jul 25, 2025
f40a01f
Change effect of useCAExtension flag in PixelTrack converter to inclu…
JanGerritSchulz Jul 31, 2025
1b60dae
Unify CA cuts for min/max inner/outer r/z based on the type of layer …
JanGerritSchulz Aug 1, 2025
f71bbb4
Remove OT recHits conversion from sequences without CA extension
Parsifal-2045 Aug 6, 2025
fc18bbf
Restructure Phase2 PixelTracking configuration and ngtScouting modifier
mmusich Jun 24, 2025
58af36a
Fix isOuterLadder of CA PixelDoubletAlgo for Phase-2
JanGerritSchulz Aug 28, 2025
e832f28
Make Patatrack Pixel Tracking the default for Phase2
JanGerritSchulz Sep 4, 2025
3177402
Simplify isPh2Pixel check
Parsifal-2045 Sep 5, 2025
ba94208
allow SingleMuPt15Eta0p_0p4 configuration fragment for NGT scouting w…
mmusich May 27, 2025
1db267f
Add CA Extension workflows to ph2_hlt short matrix and IB matrix
Parsifal-2045 Sep 5, 2025
f9bd845
Add customization of HLT Run3 for new CA cuts introduced in CA exten…
JanGerritSchulz Sep 8, 2025
810ed2d
restructure HLTPhase2PixelTracksAndVerticesSequence for vertex trimmi…
mmusich Sep 14, 2025
6754585
Improve PixelTrack selection settings for non-extended CA in Phase-2
JanGerritSchulz Sep 25, 2025
90e87ed
Remove printouts and cleanup PixelTrack converter from SoA
JanGerritSchulz Sep 26, 2025
4ef5585
Rename maxChi2Quadruplets in Pixel Tracking to maxChi2TripletsOrQuadr…
JanGerritSchulz Sep 26, 2025
f96a0a7
Add column types to SoA descriptor
Parsifal-2045 Jul 10, 2025
8b1026d
Fix check-by-index for scalar in recHits SoA
Parsifal-2045 Jul 10, 2025
1ffe2c6
Remove unecessary loop and alpaka::memcpy
Parsifal-2045 Sep 26, 2025
e79b668
Change back max pT for multiple scattering in BrokenLinFit
JanGerritSchulz Oct 2, 2025
d6d9f0d
Set max number of modules in ClusteringConstants to the actual number…
JanGerritSchulz Oct 2, 2025
eb576a6
Improve CA and SimplePixelTopology
JanGerritSchulz Oct 2, 2025
291918e
Update SoA view accessors in CA OT RecHit converter chain
JanGerritSchulz Oct 3, 2025
a0e0b7c
Introduce phase2LegacyPixelTracks procModifier to enable the usage of…
JanGerritSchulz Oct 2, 2025
a0b7c14
Simplify usage of +1 in merging hitModuleStart SoAs
Parsifal-2045 Oct 5, 2025
9e62c1e
Improve function getNSkippedLayer in PixelTrackProducerFromSoAAlpaka
JanGerritSchulz Oct 6, 2025
7b08d55
Reset modules' maps and indices in beginRun
Parsifal-2045 Oct 8, 2025
456bf55
add phase2CAExtension to the list of modifiers used to run HLT OT Rec…
mmusich Oct 16, 2025
daef64b
addition of offline Patatrack workflow for Phase2 CA extension with OT
mmusich Oct 7, 2025
772af6e
Let the framework handle host to device copies
Parsifal-2045 Oct 23, 2025
262716c
Correctly handle skipped tracks when converting SoA to Legacy
Parsifal-2045 Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Configuration/ProcessModifiers/python/ngtScouting_cff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import FWCore.ParameterSet.Config as cms

# This modifier is for running ngt scouting menu validation

# This modifier is for running ngt scouting menu
ngtScouting = cms.Modifier()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

# This modifiers enables the extension of the Pixel CA algorithm to the first 3 layers of the Outer Tracker
phase2CAExtension = cms.Modifier()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

# This modifiers reverts the Pixel Tracking in the HLT Phase-2 to the Legacy algorithm from Run-2
phase2LegacyPixelTracks = cms.Modifier()
6 changes: 5 additions & 1 deletion Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The offsets currently in use are:
* 0.75: HLT phase-2 timing menu
* 0.7501: HLT phase-2 tracking-only menu
* 0.751: HLT phase-2 timing menu Alpaka variant
* 0.7511: HLT phase-2 timing menu, with PixelTracks CA Extension
* 0.752: HLT phase-2 timing menu ticl_v5 variant
* 0.753: HLT phase-2 timing menu Alpaka, single tracking iteration variant
* 0.754: HLT phase-2 timing menu Alpaka, single tracking iteration, LST building variant
Expand All @@ -66,10 +67,13 @@ The offsets currently in use are:
* 0.757: HLT phase-2 timing menu Alpaka, single tracking iteration, LST seeding + CKF building variant
* 0.758 HLT phase-2 timing menu ticl_barrel variant
* 0.759: HLT phase-2 timing menu, with NANO:@Phase2HLT
* 0.76: HLT phase-2 reduced menu, with DIGI step
* 0.77: HLT phase-2 NGT Scouting menu
* 0.771: HLT phase-2 NGT Scouting menu, Alpaka, TICL-v5, TICL-Barrel
* 0.771: HLT phase-2 NGT Scouting menu, Alpaka, TICL-v5, TICL-Barrel, CA Extension
* 0.772: HLT phase-2 NGT Scouting menu, with NANO:@NGTScouting
* 0.773: HLT phase-2 NGT Scouting menu, with NANO:@NGTScoutingVal
* 0.774: HLT phase-2 NGT Scouting menu Alpaka variant, with PixelTracks CA Extension as GeneralTracks
* 0.775: HLT phase-2 NGT Scouting menu Alpaka variant, with Pixeltracks CA Extension + LST T5s as GeneralTracks
* 0.778 L3 Tracker Muons reconstruction Outside-In first, HLT Muon NanoAOD
* 0.78: Complete L1 workflow
* 0.781: Complete L1 workflow, producing FEVT and NANO output L1/P2GT objects
Expand Down
3 changes: 3 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_Run4.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
# Phase-2 HLT tests
numWFIB.extend([prefixDet+34.7501])# HLTTrackingOnly75e33
numWFIB.extend([prefixDet+34.751]) # HLTTiming75e33, alpaka
numWFIB.extend([prefixDet+34.7511])# HLTTiming75e33, phase2CAExtension
numWFIB.extend([prefixDet+34.752]) # HLTTiming75e33, ticl_v5
numWFIB.extend([prefixDet+34.753]) # HLTTiming75e33, alpaka,singleIterPatatrack
numWFIB.extend([prefixDet+34.754]) # HLTTiming75e33, alpaka,singleIterPatatrack,trackingLST
Expand All @@ -84,6 +85,8 @@
numWFIB.extend([prefixDet+34.771]) # NGTScouting + alpaka + TICL-v5 + TICL-Barrel
numWFIB.extend([prefixDet+34.772]) # NGTScouting + NANO
numWFIB.extend([prefixDet+34.773]) # NGTScouting + NANO (including validation)
numWFIB.extend([prefixDet+34.774]) # NGTScouting + Phase2CAExtension as GeneneralTracks
numWFIB.extend([prefixDet+34.775]) # NGTScouting + Phase2CAExtension&LSTT5 as GeneralTracks

for numWF in numWFIB:
workflows[numWF] = _upgrade_workflows[numWF]
8 changes: 4 additions & 4 deletions Configuration/PyReleaseValidation/python/relval_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
# Alpaka pixel-only quadruplets: Single Nu E10 with PU: any backend
# mc Run4
# no PU
# Alpaka pixel-only: TTbar: quadruplets any backend, any backend vs cpu validation, profiling, triplets
# Alpaka pixel-only: TTbar: quadruplets any backend, CA Extension any backend, any backend vs cpu validation, profiling, triplets
# Alpaka ECAL-only development: TTbar: any backend
# Alpaka pixel-only: Single Nu E10: any backend
# Alpaka LST-only: TTbar: TRK-only w/ 2 iterations and LST building on any backend
# Alpaka HLTTiming75e33: TTbar: any backend
# Alpaka HLTTiming75e33: Single Nu E10: any backend
# with PU
# Alpaka pixel-only: TTbar: quadruplets any backend, any backend vs cpu validation, profiling
# Alpaka pixel-only: TTbar: quadruplets any backend, CA Extension any backend, any backend vs cpu validation, profiling
# Alpaka LST-only: TTbar: TRK-only w/ 2 iterations and LST building on any backend
# Alpaka HLTTiming75e33: TTbar: any backend
numWFIB = [
Expand Down Expand Up @@ -72,15 +72,15 @@
17061.402,

# Run4, Alpaka-based noPU
29634.402, 29634.403, 29634.404, 29634.406,
29634.402, 29634.4021, 29634.403, 29634.404, 29634.406,
29634.612,
29661.402,
29634.704,
29634.751,
29661.751,

# Run4, Alpaka-based PU
29834.402, 29834.403, 29834.404,
29834.402, 29834.4021, 29834.403, 29834.404,
29834.704,
29834.751,
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,28 @@ def setup_(self, step, stepName, stepDict, k, properties):
offset = 0.402,
)


# Pixel-only quadruplets with CA Extension workflow running on GPU (optional)
# - Pixel-only with CA Extension reconstruction with Alpaka, with DQM and validation
# - harvesting

upgradeWFs['PatatrackPixelOnlyAlpakaCAExtension'] = PatatrackWorkflow(
digi = {
'--procModifiers': 'alpaka,phase2CAExtension',
'--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
},
reco = {
'-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
'--procModifiers': 'alpaka,phase2CAExtension',
'--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
},
harvest = {
'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
},
suffix = 'Patatrack_PixelOnlyAlpakaCAExtension',
offset = 0.4021,
)

# Pixel-only quadruplets workflow running on GPU (optional)
# - Pixel-only reconstruction with Alpaka, with standard and CPUvsGPU DQM and validation
# - harvesting for CPUvsGPU validation
Expand Down Expand Up @@ -2014,6 +2036,19 @@ def condition(self, fragment, stepList, key, hasHarvest):
'-s':'HARVESTING:@hltValidation'
}

upgradeWFs['HLTTiming75e33CAExtension'] = deepcopy(upgradeWFs['HLTTiming75e33'])
upgradeWFs['HLTTiming75e33CAExtension'].suffix = '_HLT75e33TimingCAExtension'
upgradeWFs['HLTTiming75e33CAExtension'].offset = 0.7511
upgradeWFs['HLTTiming75e33CAExtension'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing,VALIDATION:@hltValidation',
'--procModifiers': 'phase2CAExtension',
'--datatier':'GEN-SIM-DIGI-RAW,DQMIO',
'--eventcontent':'FEVTDEBUGHLT,DQMIO'
}
upgradeWFs['HLTTiming75e33CAExtension'].step3 = {
'-s':'HARVESTING:@hltValidation'
}

class UpgradeWorkflow_HLTPhase2_WithNano(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
# skip RECO, ALCA and HLT
Expand Down Expand Up @@ -2121,7 +2156,7 @@ def setup_(self, step, stepName, stepDict, k, properties):
else:
stepDict[stepName][k] = merge([stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return fragment=="TTbar_14TeV" and 'Run4' in key
return (fragment=="TTbar_14TeV" or fragment=="SingleMuPt15Eta0p_0p4") and 'Run4' in key
upgradeWFs['NGTScouting'] = UpgradeWorkflow_NGTScouting(
steps = [
'Reco',
Expand Down Expand Up @@ -2160,12 +2195,38 @@ def condition(self, fragment, stepList, key, hasHarvest):
upgradeWFs['NGTScoutingAll'].offset = 0.771
upgradeWFs['NGTScoutingAll'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:NGTScouting,VALIDATION:@hltValidation',
'--procModifiers': 'ngtScouting,alpaka,ticl_v5,ticl_barrel',
'--procModifiers': 'ngtScouting,alpaka,ticl_v5,ticl_barrel,phase2CAExtension',
'--datatier':'GEN-SIM-DIGI-RAW,DQMIO',
'--eventcontent':'FEVTDEBUGHLT,DQMIO'
}
upgradeWFs['NGTScoutingAll'].step3 = {
'--procModifiers': 'ngtScouting,alpaka,ticl_v5,ticl_barrel',
'-s':'HARVESTING:@hltValidation'
}

upgradeWFs['NGTScoutingCAExtensionPixelOnly'] = deepcopy(upgradeWFs['NGTScouting'])
upgradeWFs['NGTScoutingCAExtensionPixelOnly'].suffix = '_NGTScoutingCAExtensionPixelOnly'
upgradeWFs['NGTScoutingCAExtensionPixelOnly'].offset = 0.774
upgradeWFs['NGTScoutingCAExtensionPixelOnly'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:NGTScouting,VALIDATION:@hltValidation',
'--procModifiers': 'ngtScouting,phase2CAExtension',
'--datatier':'GEN-SIM-DIGI-RAW,DQMIO',
'--eventcontent':'FEVTDEBUGHLT,DQMIO'
}
upgradeWFs['NGTScoutingCAExtensionPixelOnly'].step3 = {
'-s':'HARVESTING:@hltValidation'
}

upgradeWFs['NGTScoutingCAExtensionMergeT5'] = deepcopy(upgradeWFs['NGTScouting'])
upgradeWFs['NGTScoutingCAExtensionMergeT5'].suffix = '_NGTScoutingCAExtensionMergeT5'
upgradeWFs['NGTScoutingCAExtensionMergeT5'].offset = 0.775
upgradeWFs['NGTScoutingCAExtensionMergeT5'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing,VALIDATION:@hltValidation',
'--procModifiers': 'ngtScouting,phase2CAExtension,trackingLST',
'--datatier':'GEN-SIM-DIGI-RAW,DQMIO',
'--eventcontent':'FEVTDEBUGHLT,DQMIO'
}
upgradeWFs['NGTScoutingCAExtensionMergeT5'].step3 = {
'-s':'HARVESTING:@hltValidation'
}

Expand Down
7 changes: 5 additions & 2 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def runSelected(opt):
'ph2_hlt' : [29634.75, # HLT phase-2 timing menu
29634.7501, # HLT phase-2 tracking-only menu
29634.751, # HLT phase-2 timing menu Alpaka variant
29634.7511, # HLT phase-2 timing menu Phase2CAExtension variant
29634.752, # HLT phase-2 timing menu ticl_v5 variant
29634.753, # HLT phase-2 timing menu Alpaka, single tracking iteration variant
29634.754, # HLT phase-2 timing menu Alpaka, single tracking iteration, LST building variant
Expand All @@ -169,9 +170,11 @@ def runSelected(opt):
29634.758, # HLT phase-2 timing menu ticl_barrel variant
29634.759, # HLT phase-2 timing menu Alpaka, single tracking iteration, LST seeding + CKF building variant
29634.77, # HLT phase-2 NGT Scouting menu
29634.771, # HLT phase-2 NGT Scouting menu, Alpaka, TICL-v5, TICL-Barrel
29634.771, # HLT phase-2 NGT Scouting menu, Alpaka, TICL-v5, TICL-Barrel, CA Extension
29634.772, # HLT phase-2 NGT Scouting menu, with NANO:@NGTScouting
29634.773] # HLT phase-2 NGT Scouting menu, with NANO:@NGTScoutingVal
29634.773, # HLT phase-2 NGT Scouting menu, with NANO:@NGTScoutingVal
29634.774, # HLT phase-2 NGT Scouting menu, Phase2CAExtension as GeneralTracks
29634.775], # HLT phase-2 NGT Scouting menu, Phase2CAExtension&LSTT5 as GeneralTracks
}

predefinedSet['limited'] = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace pixelClustering {
constexpr uint16_t clusterThresholdPhase2OtherLayers = 4000;

constexpr uint32_t maxNumDigis = 3 * 256 * 1024; // @PU=200 µ=530k σ=50k this is >4σ away
constexpr uint16_t maxNumModules = 5000; // This is an upperlimit taking into account D110 has 4000 modules
constexpr uint16_t maxNumModules = 4000 + 2872; // This is an upper limit taking into account D110 has 4000 modules
// plus 3 layers of OT for CA Extension

constexpr int32_t maxNumClustersPerModules = maxHitsInModule();
constexpr uint16_t invalidModuleId = std::numeric_limits<uint16_t>::max() - 1;
Expand Down
7 changes: 4 additions & 3 deletions DataFormats/SoATemplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ This view can point to data belonging to different SoAs and thus not contiguous

## Descriptor

The nested class `ConstDescriptor` can only be instantiated passing a `View` or a `ConstView` and provides access to
each column through a `std::tuple<std::span<T>...>`. This class should be considered an internal implementation detail,
The nested class `ConstDescriptor` can only be instantiated passing a `View` or a `ConstView` and provides access to columns
and related information. This class should be considered an internal implementation detail,
used solely by the SoA and EDM frameworks for performing heterogeneous memory operations. It is used to implement the
`deepCopy` from a `View` referencing different memory buffers, as shown in
[`PortableHostCollection<T>`](../../DataFormats/Portable/README.md#portablehostCollection)
and [`PortableDeviceCollection<T, TDev>`](../../DataFormats/Portable/README.md#portabledeviceCollection) sections.
It should likely not be used for other purposes.
More specifically, it provides access to the each column through a `std::tuple<std::span<T>...>` accessible via `descriptor.buff`
as well as the types of the columns via a `std::tuple<cms::soa::SoAColumnType>` accessible via `descriptor.columnTypes`.

## Metadata subclass

Expand Down
14 changes: 14 additions & 0 deletions DataFormats/SoATemplate/interface/SoALayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ namespace cms::soa {
BOOST_PP_EMPTY(), \
BOOST_PP_EXPAND(_ASSIGN_SPAN_TO_COLUMNS_IMPL TYPE_NAME))

#define _DECLARE_COLUMN_TYPE_IMPL(VALUE_TYPE, CPP_TYPE, NAME, ARGS) \
BOOST_PP_IF(BOOST_PP_GREATER(VALUE_TYPE, _VALUE_LAST_COLUMN_TYPE), \
BOOST_PP_EMPTY(), \
(cms::soa::SoAColumnType::BOOST_PP_IF( \
BOOST_PP_EQUAL(VALUE_TYPE, _VALUE_TYPE_SCALAR), \
scalar, \
BOOST_PP_IF(BOOST_PP_EQUAL(VALUE_TYPE, _VALUE_TYPE_COLUMN), column, eigen))))

#define _DECLARE_COLUMN_TYPE(R, DATA, TYPE_NAME) BOOST_PP_EXPAND(_DECLARE_COLUMN_TYPE_IMPL TYPE_NAME)

// clang-format off
#define _DECLARE_MEMBER_TRIVIAL_CONSTRUCTION_IMPL(VALUE_TYPE, CPP_TYPE, NAME, ARGS) \
_SWITCH_ON_TYPE(VALUE_TYPE, \
Expand Down Expand Up @@ -1684,6 +1694,8 @@ _SWITCH_ON_TYPE(VALUE_TYPE,
: buff{ _ITERATE_ON_ALL_COMMA(_ASSIGN_SPAN_TO_COLUMNS, ~, __VA_ARGS__)} {} \
\
std::tuple<_ITERATE_ON_ALL_COMMA(_DECLARE_CONST_DESCRIPTOR_SPANS, ~, __VA_ARGS__)> buff; \
static constexpr std::array<cms::soa::SoAColumnType, std::tuple_size_v<decltype(buff)>> columnTypes = {{ \
_ITERATE_ON_ALL_COMMA(_DECLARE_COLUMN_TYPE, ~, __VA_ARGS__)}}; \
static constexpr size_type num_cols = std::tuple_size<std::tuple< \
_ITERATE_ON_ALL_COMMA(_DECLARE_CONST_DESCRIPTOR_SPANS, ~, __VA_ARGS__)>>::value; \
}; \
Expand All @@ -1696,6 +1708,8 @@ _SWITCH_ON_TYPE(VALUE_TYPE,
: buff{ _ITERATE_ON_ALL_COMMA(_ASSIGN_SPAN_TO_COLUMNS, ~, __VA_ARGS__)} {} \
\
std::tuple<_ITERATE_ON_ALL_COMMA(_DECLARE_DESCRIPTOR_SPANS, ~, __VA_ARGS__)> buff; \
static constexpr std::array<cms::soa::SoAColumnType, std::tuple_size_v<decltype(buff)>> columnTypes = {{ \
_ITERATE_ON_ALL_COMMA(_DECLARE_COLUMN_TYPE, ~, __VA_ARGS__)}}; \
static constexpr size_type num_cols = std::tuple_size<std::tuple< \
_ITERATE_ON_ALL_COMMA(_DECLARE_DESCRIPTOR_SPANS, ~, __VA_ARGS__)>>::value; \
}; \
Expand Down
19 changes: 17 additions & 2 deletions DataFormats/TrackSoA/interface/alpaka/TrackUtilities.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h
#define DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h

//#define NTUPLE_FIT_DEBUG

#include <algorithm>
#include <cmath>
#include <cstdint>
Expand Down Expand Up @@ -43,7 +45,9 @@ namespace pixelTrack {
(std::abs(reco::zip(tracks, it)) < region.maxZip);
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks, int it) const {
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks,
[[maybe_unused]] int nHits,
int it) const {
auto roughLog = [](float x) {
// max diff [0.5,12] at 1.25 0.16143
// average diff 0.0662998
Expand Down Expand Up @@ -83,6 +87,8 @@ namespace pixelTrack {
using TrackSoAConstView = reco::TrackSoAConstView;

float maxChi2;
float maxChi2TripletsOrQuadruplets;
float maxChi2Quintuplets;
float minPt;
float maxTip;
float maxZip;
Expand All @@ -91,11 +97,20 @@ namespace pixelTrack {
return (std::abs(reco::tip(tracks, it)) < maxTip) and (tracks.pt(it) > minPt) and
(std::abs(reco::zip(tracks, it)) < maxZip);
}
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks, int it) const {
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks, int nHits, int it) const {
if (nHits <= 4) {
return tracks.chi2(it) >= maxChi2TripletsOrQuadruplets;
}
if (nHits == 5) {
return tracks.chi2(it) >= maxChi2Quintuplets;
}
return tracks.chi2(it) >= maxChi2;
}
};

// mark tracks that were skipped in the indToEdm map in SoA to legacy conversion
constexpr uint32_t skippedTrack = std::numeric_limits<uint32_t>::max();

} // namespace pixelTrack

#endif // DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "HeterogeneousCore/AlpakaInterface/interface/CopyToHost.h"
#include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "HeterogeneousCore/AlpakaInterface/interface/concepts.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE::reco {

Expand Down Expand Up @@ -57,7 +58,7 @@ namespace cms::alpakatools {

template <>
struct CopyToDevice<::reco::TrackingRecHitHost> {
template <typename TQueue>
template <cms::alpakatools::NonCPUQueue TQueue>
static auto copyAsync(TQueue& queue, reco::TrackingRecHitHost const& hostData) {
using TDevice = typename alpaka::trait::DevType<TQueue>::type;

Expand Down
Loading