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

Migrate module config in Configuration, TauAnalysis to use default cfipython #36137

Merged
merged 1 commit into from Nov 26, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,12 +14,12 @@
fileNames = cms.untracked.vstring('file:/u1/meridian/data/h4/2006/h4b.00013247.A.0.0.root')
)

process.ecal2006TBRecHit = cms.EDProducer("EcalRecHitProducer",
process.load("RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why you use process.load instead of

from RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi import ecalRecHit as _mod

as in the past? I may have simply missed the reason.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think it's because this file has process already defined, so it's keeping the same style.

process.ecal2006TBRecHit = process.ecalRecHit.clone(
EEuncalibRecHitCollection = cms.string(''),
uncalibRecHitProducer = cms.string('ecal2006TBWeightUncalibRecHit'),
EBuncalibRecHitCollection = cms.string('EcalUncalibRecHitsEB'),
EBrechitCollection = cms.string('EcalRecHitsEB'),
EErechitCollection = cms.string('')
EErechitCollection = ''
)

process.out = cms.OutputModule("PoolOutputModule",
Expand Down
6 changes: 2 additions & 4 deletions TauAnalysis/MCEmbeddingTools/python/customisers.py
Expand Up @@ -5,7 +5,6 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms


################################ Customizer for skimming ###########################
### There are four different parts.
##First step is the SELECT (former SKIM) part, where we identfy the events which are good for Embedding. Need to store RAWRECO [RAW is needed for the MERG and RECO for the CLEAN step]
Expand Down Expand Up @@ -443,9 +442,8 @@ def customisoptions(process):
process.options = cms.untracked.PSet()
process.options.emptyRunLumiMode = cms.untracked.string('doNotHandleEmptyRunsAndLumis')
if not hasattr(process, "bunchSpacingProducer"):
process.bunchSpacingProducer = cms.EDProducer("BunchSpacingProducer")
process.bunchSpacingProducer.bunchSpacingOverride = cms.uint32(25)
process.bunchSpacingProducer.overrideBunchSpacing = cms.bool(True)
process.load('RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well the same question as above. Also, I wonder if it would be better to put the import in the beginning of the file, like

from RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi import bunchSpacingProducer as _bunchSpacingProducer

process.bunchSpacingProducer = process.bunchSpacingProducer.clone(overrideBunchSpacing = True)
process.options.numberOfThreads = cms.untracked.uint32(1)
process.options.numberOfStreams = cms.untracked.uint32(0)
return process
Expand Down