Skip to content

Guard for No Digis for Phase2 and Patatrack NuGun #41255

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

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion Configuration/PyReleaseValidation/python/relval_2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
# (Patatrack pixel-only: ZMM - on CPU: quadruplets, triplets)
# (TTbar FastSim, TTbar FastSim PU, MinBiasFS for mixing))
# (ZEE)
# (Nu Gun)
# 2024 (TTbar, TTbar PU, TTbar PU premix)

numWFIB = [10001.0,10002.0,10003.0,10004.0,10005.0,10006.0,10007.0,10008.0,10009.0,10059.0,10071.0,
10042.0,10024.0,10025.0,10026.0,10023.0,10224.0,10225.0,10424.0,
10024.1,10024.2,10024.3,10024.4,10024.5,
Expand Down Expand Up @@ -85,7 +87,8 @@
12450.501,12450.505,
14034.0,14234.0,14040.303,
12446.0,
12834.0,13034.0,13034.99,]
12461.0,
12834.0,13034.0,13034.99,]

for numWF in numWFIB:
if not numWF in _upgrade_workflows:
Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_2026.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#CloseByPGun for HGCAL
numWFIB.extend([24896.0]) #CE_E_Front_120um D98
numWFIB.extend([24900.0]) #CE_H_Coarse_Scint D98
# NuGun
numWFIB.extend([24861.0]) #Nu Gun 2026D98

for numWF in numWFIB:
workflows[numWF] = _upgrade_workflows[numWF]
4 changes: 4 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# Patatrack pixel-only triplets, ECAL, HCAL: TTbar - on GPU (optional), GPU-vs-CPU validation, profiling (to be implemented)
# full reco with Patatrack pixel-only quadruplets: TTbar - on GPU (optional), GPU-vs-CPU validation
# full reco with Patatrack pixel-only triplets: TTbar - on GPU (optional), GPU-vs-CPU validation
# Patatrack Single Nu E10 on GPU (optional)
# mc 2026 Patatrack Single Nu E10 on GPU (optional)
numWFIB = [
# 2023
12450.502, 12450.503, 12450.504,
Expand All @@ -35,6 +37,8 @@
12434.586, 12434.587, # 12434.588,
12434.592, 12434.593,
12434.596, 12434.597,
12461.502,
24861.502
]

for numWF in numWFIB:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,13 @@ def condition(self, fragment, stepList, key, hasHarvest):
# - 2018 conditions, TTbar
# - 2018 conditions, Z->mumu
# - 2022 conditions (labelled "2021"), TTbar
# - 2022 conditions (labelled "2021"), NuGun
# - 2022 conditions (labelled "2021"), Z->mumu
# - 2023 conditions, TTbar
# - 2023 conditions, NuGun
# - 2023 conditions, Z->mumu
# - 2026 conditions, TTbar
# - 2026 conditions, NuGu
class PatatrackWorkflow(UpgradeWorkflow):
def __init__(self, digi = {}, reco = {}, mini = {}, harvest = {}, **kwargs):
# adapt the parameters for the UpgradeWorkflow init method
Expand Down Expand Up @@ -843,10 +846,12 @@ def condition(self, fragment, stepList, key, hasHarvest):
('2018' in key and fragment == "TTbar_13"),
('2021' in key and fragment == "TTbar_14TeV" and 'FS' not in key),
('2023' in key and fragment == "TTbar_14TeV" and 'FS' not in key),
('2021' in key and fragment == "NuGun"),
('2023' in key and fragment == "NuGun"),
('2018' in key and fragment == "ZMM_13"),
('2021' in key and fragment == "ZMM_14" and 'FS' not in key),
('2023' in key and fragment == "ZMM_14" and 'FS' not in key),
('2026' in key and fragment == "TTbar_14TeV"),
('2026' in key and (fragment == "TTbar_14TeV" or fragment=="NuGun")),
(('HI' in key) and 'Hydjet' in fragment and "PixelOnly" in self.suffix )
]
result = any(selected) and hasHarvest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class SiPixelPhase2DigiToClusterCUDA : public edm::stream::EDProducer<edm::Exter

const bool includeErrors_;
const SiPixelClusterThresholds clusterThresholds_;
uint32_t nDigis_;
};

SiPixelPhase2DigiToClusterCUDA::SiPixelPhase2DigiToClusterCUDA(const edm::ParameterSet& iConfig)
Expand Down Expand Up @@ -111,7 +112,7 @@ void SiPixelPhase2DigiToClusterCUDA::acquire(const edm::Event& iEvent,

const TrackerGeometry* geom_ = &iSetup.getData(geomToken_);

uint32_t nDigis = 0;
nDigis_ = 0;

auto xDigis = cms::cuda::make_host_unique<uint16_t[]>(gpuClustering::maxNumDigis, ctx.stream());
auto yDigis = cms::cuda::make_host_unique<uint16_t[]>(gpuClustering::maxNumDigis, ctx.stream());
Expand All @@ -126,34 +127,46 @@ void SiPixelPhase2DigiToClusterCUDA::acquire(const edm::Event& iEvent,
const GeomDetUnit* genericDet = geom_->idToDetUnit(detIdObject);
auto const gind = genericDet->index();
for (auto const& px : *DSViter) {
moduleIds[nDigis] = uint16_t(gind);
moduleIds[nDigis_] = uint16_t(gind);

xDigis[nDigis] = uint16_t(px.row());
yDigis[nDigis] = uint16_t(px.column());
adcDigis[nDigis] = uint16_t(px.adc());
xDigis[nDigis_] = uint16_t(px.row());
yDigis[nDigis_] = uint16_t(px.column());
adcDigis[nDigis_] = uint16_t(px.adc());

packedData[nDigis] = uint32_t(px.packedData());
packedData[nDigis_] = uint32_t(px.packedData());

rawIds[nDigis] = uint32_t(detid);
rawIds[nDigis_] = uint32_t(detid);

nDigis++;
nDigis_++;
}
}

if (nDigis_ == 0)
return;

gpuAlgo_.makePhase2ClustersAsync(clusterThresholds_,
moduleIds.get(),
xDigis.get(),
yDigis.get(),
adcDigis.get(),
packedData.get(),
rawIds.get(),
nDigis,
nDigis_,
ctx.stream());
}

void SiPixelPhase2DigiToClusterCUDA::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
cms::cuda::ScopedContextProduce ctx{ctxState_};

if (nDigis_ == 0) {
ctx.emplace(iEvent, digiPutToken_, nDigis_, ctx.stream());
ctx.emplace(iEvent, clusterPutToken_, pixelTopology::Phase2::numberOfModules, ctx.stream());
if (includeErrors_) {
ctx.emplace(iEvent, digiErrorPutToken_, SiPixelDigiErrorsCUDA{});
}
return;
}

auto tmp = gpuAlgo_.getResults();
ctx.emplace(iEvent, digiPutToken_, std::move(tmp.first));
ctx.emplace(iEvent, clusterPutToken_, std::move(tmp.second));
Expand Down