Created
December 10, 2018 10:59
-
-
Save mmusich/e4243ce79db1051a82d175fd233186fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# run it on the output of: | |
# cmsDriver.py ZMM_13TeV_TuneCUETP8M1_cfi --conditions auto:phase1_2017_realistic -n 10 --era Run2_2017 --eventcontent FEVTDEBUG --relval 18000,100 -s GEN,SIM --datatier GEN-SIM --beamspot Realistic25ns13TeVEarly2017Collision --geometry DB:Extended | |
# | |
import FWCore.ParameterSet.Config as cms | |
process = cms.Process("Test") | |
process.load("FWCore.MessageLogger.MessageLogger_cfi") | |
# process.load("Configuration.StandardSequences.Geometry_cff") | |
#process.load("Configuration.Geometry.GeometryIdeal_cff") | |
process.load("Configuration.Geometry.GeometryRecoDB_cff") | |
process.load("Configuration.StandardSequences.MagneticField_38T_cff") | |
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") | |
process.load("Configuration.StandardSequences.Services_cff") | |
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") | |
# from v7 | |
#process.load("SimGeneral.MixingModule.pixelDigitizer_cfi") | |
# process.load("SimTracker.Configuration.SimTracker_cff") | |
process.load("SimG4Core.Configuration.SimG4Core_cff") | |
# process.load("SimGeneral.MixingModule.mixNoPU_cfi") | |
from SimGeneral.MixingModule.aliases_cfi import * | |
from SimGeneral.MixingModule.mixObjects_cfi import * | |
# from SimGeneral.MixingModule.digitizers_cfi import * | |
from SimGeneral.MixingModule.pixelDigitizer_cfi import * | |
from SimGeneral.MixingModule.stripDigitizer_cfi import * | |
from SimGeneral.MixingModule.trackingTruthProducer_cfi import * | |
process.simSiPixelDigis = cms.EDProducer("MixingModule", | |
# digitizers = cms.PSet(theDigitizers), | |
# digitizers = cms.PSet( | |
# mergedtruth = cms.PSet( | |
# trackingParticles | |
# ) | |
# ), | |
digitizers = cms.PSet( | |
pixel = cms.PSet( | |
pixelDigitizer | |
), | |
# strip = cms.PSet( | |
# stripDigitizer | |
# ), | |
), | |
#theDigitizersValid = cms.PSet( | |
# pixel = cms.PSet( | |
# pixelDigitizer | |
# ), | |
# strip = cms.PSet( | |
# stripDigitizer | |
# ), | |
# ecal = cms.PSet( | |
# ecalDigitizer | |
# ), | |
# hcal = cms.PSet( | |
# hcalDigitizer | |
# ), | |
# castor = cms.PSet( | |
# castorDigitizer | |
# ), | |
# mergedtruth = cms.PSet( | |
# trackingParticles | |
# ) | |
#), | |
LabelPlayback = cms.string(' '), | |
maxBunch = cms.int32(3), | |
minBunch = cms.int32(-5), ## in terms of 25 ns | |
bunchspace = cms.int32(25), | |
mixProdStep1 = cms.bool(False), | |
mixProdStep2 = cms.bool(False), | |
playback = cms.untracked.bool(False), | |
useCurrentProcessOnly = cms.bool(False), | |
mixObjects = cms.PSet( | |
mixTracks = cms.PSet( | |
mixSimTracks | |
), | |
mixVertices = cms.PSet( | |
mixSimVertices | |
), | |
mixSH = cms.PSet( | |
# mixPixSimHits | |
# mixPixSimHits = cms.PSet( | |
input = cms.VInputTag(cms.InputTag("g4SimHits","TrackerHitsPixelBarrelHighTof"), | |
cms.InputTag("g4SimHits","TrackerHitsPixelBarrelLowTof"), | |
cms.InputTag("g4SimHits","TrackerHitsPixelEndcapHighTof"), | |
cms.InputTag("g4SimHits","TrackerHitsPixelEndcapLowTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTECHighTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTECLowTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTIBHighTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTIBLowTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTIDHighTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTIDLowTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTOBHighTof"), | |
# cms.InputTag("g4SimHits","TrackerHitsTOBLowTof") | |
), | |
type = cms.string('PSimHit'), | |
subdets = cms.vstring( | |
'TrackerHitsPixelBarrelHighTof', | |
'TrackerHitsPixelBarrelLowTof', | |
'TrackerHitsPixelEndcapHighTof', | |
'TrackerHitsPixelEndcapLowTof', | |
# 'TrackerHitsTECHighTof', | |
# 'TrackerHitsTECLowTof', | |
# 'TrackerHitsTIBHighTof', | |
# 'TrackerHitsTIBLowTof', | |
# 'TrackerHitsTIDHighTof', | |
# 'TrackerHitsTIDLowTof', | |
# 'TrackerHitsTOBHighTof', | |
# 'TrackerHitsTOBLowTof' | |
), | |
crossingFrames = cms.untracked.vstring(), | |
# 'MuonCSCHits', | |
# 'MuonDTHits', | |
# 'MuonRPCHits'), | |
#) | |
), | |
mixHepMC = cms.PSet( | |
mixHepMCProducts | |
) | |
) | |
) | |
process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService", | |
# simMuonCSCDigis = cms.PSet( | |
# initialSeed = cms.untracked.uint32(1234567), | |
# engineName = cms.untracked.string('TRandom3') | |
# ), | |
simSiPixelDigis = cms.PSet( | |
initialSeed = cms.untracked.uint32(1234567), | |
engineName = cms.untracked.string('TRandom3') | |
) | |
) | |
process.maxEvents = cms.untracked.PSet( | |
input = cms.untracked.int32(-1) | |
) | |
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( | |
'file:ZMM_13TeV_TuneCUETP8M1_cfi_GEN_SIM.root' | |
) | |
) | |
# Choose the global tag here: | |
# for v7.0 | |
#process.GlobalTag.globaltag = 'MC_70_V1::All' | |
#process.GlobalTag.globaltag = "START70_V1::All" | |
#process.GlobalTag.globaltag = "START71_V1::All" | |
#process.GlobalTag.globaltag = 'MC_71_V1::All' | |
process.GlobalTag.globaltag = "103X_mc2017_realistic_v2" #'auto:phase1_2017_realistic' | |
#process.GlobalTag.globaltag = "PRE_MC_71_V2::All" | |
process.GlobalTag.globaltag.toGet = cms.VPSet(cms.PSet(record = cms.string('SiPixelStatusScenariosRcd'), | |
tag = cms.string('SiPixelFEDChannelContainer_StuckTBM_2018_v1_mc'), # choose tag you want | |
connect = cms.string("sqlite_file:/afs/cern.ch/user/m/musich/public/forStuckTBM/SiPixelStatusScenarios_v1.db") | |
), | |
cms.PSet(record = cms.string('SiPixelStatusScenarioProbabilityRcd'), | |
tag = cms.vstring('SiPixelQualityProbabilities_v0_mc'), | |
connect = cms.string("sqlite_file:/afs/cern.ch/user/m/musich/public/forStuckTBM/SiPixelStatusScenarioProbabilities.db") | |
) | |
) | |
process.o1 = cms.OutputModule("PoolOutputModule", | |
outputCommands = cms.untracked.vstring('drop *','keep *_*_*_Test'), | |
fileName = cms.untracked.string('file:DIGI_ZMM_13TeV_TuneCUETP8M1_cfi_GEN_SIM.root') | |
# fileName = cms.untracked.string('file:dummy.root') | |
) | |
process.g4SimHits.Generator.HepMCProductLabel = 'source' | |
process.simSiPixelDigis.digitizers.pixel.AddPixelInefficiency = cms.bool(False) | |
process.simSiPixelDigis.digitizers.pixel.KillBadFEDChannels = cms.bool(False) | |
# modify digitizer parameters | |
#process.simSiPixelDigis.ThresholdInElectrons_BPix = 3500.0 | |
#process.mix.digitizers.pixel.ThresholdInElectrons_BPix = 3500.0 | |
#This process is to run the digitizer, pixel gitizer is now clled by the mix module | |
process.p1 = cms.Path(process.simSiPixelDigis) | |
process.outpath = cms.EndPath(process.o1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment