Skip to content

Commit

Permalink
Merge pull request #42411 from missirol/devel_customHLTforCMSSW_post4…
Browse files Browse the repository at this point in the history
…1632_132X

fix configuration of GPU Pixel unpacker in Run-3 HLT menus post-#41632 [`13_2_X`]
  • Loading branch information
cmsbuild authored Aug 1, 2023
2 parents 5a2d5b0 + d81614b commit a42837d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
34 changes: 34 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def customisePixelGainForRun2Input(process):
producer.VCaltoElectronOffset_L1 = -670

for producer in producers_by_type(process, "SiPixelRawToClusterCUDA"):
producer.VCaltoElectronGain = cms.double(1.)
producer.VCaltoElectronGain_L1 = cms.double(1.)
producer.VCaltoElectronOffset = cms.double(0.)
producer.VCaltoElectronOffset_L1 = cms.double(0.)
producer.isRun2 = True

return process
Expand Down Expand Up @@ -236,6 +240,34 @@ def customizeHLTfor41815(process):

return process

def customizeHLTfor41632(process):
for producerType in [
'SiPixelRawToClusterCUDA',
'SiPixelRawToClusterCUDAPhase1',
'SiPixelRawToClusterCUDAHIonPhase1',
]:
for producer in producers_by_type(process, producerType):
# use explicit cms.double as parameters may not already be present, and
# set values to the correct Run-3 values (even when the parameters are already defined)
producer.VCaltoElectronGain = cms.double(1.)
producer.VCaltoElectronGain_L1 = cms.double(1.)
producer.VCaltoElectronOffset = cms.double(0.)
producer.VCaltoElectronOffset_L1 = cms.double(0.)

return process

def customizeHLTfor42410(process):
for producerType in [
'SiPixelRawToClusterCUDA',
'SiPixelRawToClusterCUDAPhase1',
'SiPixelRawToClusterCUDAHIonPhase1',
]:
for producer in producers_by_type(process, producerType):
if hasattr(producer, 'isRun2'):
del producer.isRun2

return process

# CMSSW version specific customizations
def customizeHLTforCMSSW(process, menuType="GRun"):

Expand All @@ -247,5 +279,7 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
process = customizeHLTfor41058(process)
process = customizeHLTfor41495(process)
process = customizeHLTfor41815(process)
process = customizeHLTfor41632(process)
process = customizeHLTfor42410(process)

return process
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class SiPixelRawToClusterCUDAT : public edm::stream::EDProducer<edm::ExternalWor
GPUAlgo gpuAlgo_;
PixelDataFormatter::Errors errors_;

const bool isRun2_;
const bool includeErrors_;
const bool useQuality_;
uint32_t nDigis_;
Expand All @@ -94,7 +93,6 @@ SiPixelRawToClusterCUDAT<TrackerTraits>::SiPixelRawToClusterCUDAT(const edm::Par
gainsToken_(esConsumes<SiPixelGainCalibrationForHLTGPU, SiPixelGainCalibrationForHLTGPURcd>()),
cablingMapToken_(esConsumes<SiPixelFedCablingMap, SiPixelFedCablingMapRcd>(
edm::ESInputTag("", iConfig.getParameter<std::string>("CablingMapLabel")))),
isRun2_(iConfig.getParameter<bool>("isRun2")),
includeErrors_(iConfig.getParameter<bool>("IncludeErrors")),
useQuality_(iConfig.getParameter<bool>("UseQualityInfo")),
clusterThresholds_{iConfig.getParameter<int32_t>("clusterThreshold_layer1"),
Expand All @@ -116,7 +114,6 @@ SiPixelRawToClusterCUDAT<TrackerTraits>::SiPixelRawToClusterCUDAT(const edm::Par
template <typename TrackerTraits>
void SiPixelRawToClusterCUDAT<TrackerTraits>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<bool>("isRun2", true);
desc.add<bool>("IncludeErrors", true);
desc.add<bool>("UseQualityInfo", false);
// Note: this parameter is obsolete: it is ignored and will have no effect.
Expand Down Expand Up @@ -269,8 +266,7 @@ void SiPixelRawToClusterCUDAT<TrackerTraits>::acquire(const edm::Event& iEvent,
wordFedAppender.initializeWordFed(fedIds_[i], index[i], start[i], words[i]);
}

gpuAlgo_.makePhase1ClustersAsync(isRun2_,
clusterThresholds_,
gpuAlgo_.makePhase1ClustersAsync(clusterThresholds_,
gpuMap,
gpuModulesToUnpack,
gpuGains,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ namespace pixelgpudetails {
// Interface to outside
template <typename TrackerTraits>
void SiPixelRawToClusterGPUKernel<TrackerTraits>::makePhase1ClustersAsync(
bool isRun2,
const SiPixelClusterThresholds clusterThresholds,
const SiPixelROCsStatusAndMapping *cablingMap,
const unsigned char *modToUnp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ namespace pixelgpudetails {
SiPixelRawToClusterGPUKernel& operator=(const SiPixelRawToClusterGPUKernel&) = delete;
SiPixelRawToClusterGPUKernel& operator=(SiPixelRawToClusterGPUKernel&&) = delete;

void makePhase1ClustersAsync(bool isRun2,
const SiPixelClusterThresholds clusterThresholds,
void makePhase1ClustersAsync(const SiPixelClusterThresholds clusterThresholds,
const SiPixelROCsStatusAndMapping* cablingMap,
const unsigned char* modToUnp,
const SiPixelGainForHLTonGPU* gains,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

run3_common.toModify(siPixelClustersPreSplittingCUDA,
# use the pixel channel calibrations scheme for Run 3
isRun2 = False,
clusterThreshold_layer1 = 4000,
VCaltoElectronGain = 1, # all gains=1, pedestals=0
VCaltoElectronGain_L1 = 1,
Expand Down

0 comments on commit a42837d

Please sign in to comment.