Last active
January 7, 2017 23:44
-
-
Save kpedro88/7eb3da871c406729daf6aef489757073 to your computer and use it in GitHub Desktop.
testSiPMs
This file contains hidden or 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
import FWCore.ParameterSet.Config as cms | |
from FWCore.ParameterSet.VarParsing import VarParsing | |
options = VarParsing("analysis") | |
# geant time, photostatistics, pedestal width (noise), timeslew, dark current, crosstalk, nonlinearity | |
_params = ["GT", "PS", "PW", "TS", "DC", "CT", "NL"] | |
for p in _params: | |
options.register(p, False, VarParsing.multiplicity.singleton, VarParsing.varType.bool) | |
options.register("outpre", "step2", VarParsing.multiplicity.singleton, VarParsing.varType.string) | |
options.register("output", "FEVTDEBUGHLToutput", VarParsing.multiplicity.singleton, VarParsing.varType.string) | |
options.register("config", "step2_DIGI_L1_DIGI2RAW_RAW2DIGI_L1Reco_RECO", VarParsing.multiplicity.singleton, VarParsing.varType.string) | |
options.parseArguments() | |
if len(options.inputFiles)==0: | |
options.inputFiles = "file:step1.root" | |
# output name definition | |
_outname = options.outpre | |
for p in _params: | |
if getattr(options,p): | |
_outname += "_"+p | |
else: | |
_outname += "_no"+p | |
_outname += ".root" | |
# import process | |
process = getattr(__import__(options.config,fromlist=["process"]),"process") | |
# settings | |
process.maxEvents.input = cms.untracked.int32(options.maxEvents) | |
process.source.fileNames = cms.untracked.vstring(options.inputFiles) | |
getattr(process,options.output).fileName = cms.untracked.string('file:'+_outname) | |
# customization | |
from SLHCUpgradeSimulations.Configuration.HCalCustoms import load_HcalHardcode | |
process = load_HcalHardcode(process) | |
process.es_hardcode.useHFUpgrade = cms.bool(True) | |
process.es_hardcode.useHEUpgrade = cms.bool(True) | |
process.es_hardcode.toGet = cms.untracked.vstring('GainWidths','SiPMParameters','SiPMCharacteristics') | |
if not options.GT: | |
process.mix.digitizers.hcal.ignoreGeantTime = cms.bool(True) | |
if not options.PS: | |
process.mix.digitizers.hcal.he.doPhotoStatistics = cms.bool(False) | |
if not options.PW: | |
process.mix.digitizers.hcal.doNoise = cms.bool(False) | |
if not options.TS: | |
process.mix.digitizers.hcal.doTimeSlew = cms.bool(False) | |
if hasattr(process,"hbheprereco"): process.hbheprereco.algorithm.applyTimeSlew = cms.bool(False) | |
if not options.DC: | |
process.es_hardcode.heUpgrade.darkCurrent = cms.vdouble(0,0) | |
if not options.CT: | |
process.es_hardcode.SiPMCharacteristics[2].crosstalk = cms.double(0.0) | |
process.es_hardcode.SiPMCharacteristics[3].crosstalk = cms.double(0.0) | |
if not options.NL: | |
process.mix.digitizers.hcal.he.sipmTau = cms.double(0.0) | |
process.es_hardcode.SiPMCharacteristics[2].nonlin1 = cms.double(1.0) | |
process.es_hardcode.SiPMCharacteristics[3].nonlin1 = cms.double(1.0) | |
process.es_hardcode.SiPMCharacteristics[2].nonlin2 = cms.double(0.0) | |
process.es_hardcode.SiPMCharacteristics[3].nonlin2 = cms.double(0.0) | |
process.es_hardcode.SiPMCharacteristics[2].nonlin3 = cms.double(0.0) | |
process.es_hardcode.SiPMCharacteristics[3].nonlin3 = cms.double(0.0) |
This file contains hidden or 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
# Auto generated configuration file | |
# using: | |
# Revision: 1.19 | |
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v | |
# with command line options: SinglePiE50HCAL_pythia8_cfi --conditions auto:phase1_2017_realistic -n 10 --era Run2_2017 --eventcontent FEVTDEBUG --relval 10000,100 -s GEN,SIM --datatier GEN-SIM --beamspot Realistic50ns13TeVCollision --geometry DB:Extended --fileout file:step1.root | |
import FWCore.ParameterSet.Config as cms | |
from Configuration.StandardSequences.Eras import eras | |
process = cms.Process('SIM',eras.Run2_2017) | |
# import of standard configurations | |
process.load('Configuration.StandardSequences.Services_cff') | |
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') | |
process.load('FWCore.MessageService.MessageLogger_cfi') | |
process.load('Configuration.EventContent.EventContent_cff') | |
process.load('SimGeneral.MixingModule.mixNoPU_cfi') | |
process.load('Configuration.StandardSequences.GeometryRecoDB_cff') | |
process.load('Configuration.StandardSequences.GeometrySimDB_cff') | |
process.load('Configuration.StandardSequences.MagneticField_cff') | |
process.load('Configuration.StandardSequences.Generator_cff') | |
process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollision_cfi') | |
process.load('GeneratorInterface.Core.genFilterSummary_cff') | |
process.load('Configuration.StandardSequences.SimIdeal_cff') | |
process.load('Configuration.StandardSequences.EndOfProcess_cff') | |
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | |
process.maxEvents = cms.untracked.PSet( | |
input = cms.untracked.int32(10) | |
) | |
# Input source | |
process.source = cms.Source("EmptySource") | |
process.options = cms.untracked.PSet( | |
) | |
# Production Info | |
process.configurationMetadata = cms.untracked.PSet( | |
annotation = cms.untracked.string('SinglePiE50HCAL_pythia8_cfi nevts:10'), | |
name = cms.untracked.string('Applications'), | |
version = cms.untracked.string('$Revision: 1.19 $') | |
) | |
# Output definition | |
process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule", | |
SelectEvents = cms.untracked.PSet( | |
SelectEvents = cms.vstring('generation_step') | |
), | |
dataset = cms.untracked.PSet( | |
dataTier = cms.untracked.string('GEN-SIM'), | |
filterName = cms.untracked.string('') | |
), | |
eventAutoFlushCompressedSize = cms.untracked.int32(5242880), | |
fileName = cms.untracked.string('file:step1.root'), | |
outputCommands = process.FEVTDEBUGEventContent.outputCommands, | |
splitLevel = cms.untracked.int32(0) | |
) | |
# Additional output definition | |
# Other statements | |
process.XMLFromDBSource.label = cms.string("Extended") | |
process.genstepfilter.triggerConditions=cms.vstring("generation_step") | |
from Configuration.AlCa.GlobalTag import GlobalTag | |
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2017_realistic', '') | |
process.generator = cms.EDFilter("Pythia8EGun", | |
PGunParameters = cms.PSet( | |
AddAntiParticle = cms.bool(True), | |
MaxE = cms.double(50.01), | |
MaxEta = cms.double(5.0), | |
MaxPhi = cms.double(3.14159265359), | |
MinE = cms.double(49.99), | |
MinEta = cms.double(-5.0), | |
MinPhi = cms.double(-3.14159265359), | |
ParticleID = cms.vint32(211) | |
), | |
PythiaParameters = cms.PSet( | |
parameterSets = cms.vstring() | |
), | |
Verbosity = cms.untracked.int32(0), | |
firstRun = cms.untracked.uint32(1), | |
psethack = cms.string('single pi E 50 HCAL') | |
) | |
# Path and EndPath definitions | |
process.generation_step = cms.Path(process.pgen) | |
process.simulation_step = cms.Path(process.psim) | |
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) | |
process.endjob_step = cms.EndPath(process.endOfProcess) | |
process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput) | |
# Schedule definition | |
process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step) | |
# filter all path with the production filter sequence | |
for path in process.paths: | |
getattr(process,path)._seq = process.generator * getattr(process,path)._seq | |
# Customisation from command line | |
# Add early deletion of temporary data products to reduce peak memory need | |
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete | |
process = customiseEarlyDelete(process) | |
# End adding early deletion |
This file contains hidden or 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
# Auto generated configuration file | |
# using: | |
# Revision: 1.19 | |
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v | |
# with command line options: step2 --conditions auto:phase1_2017_realistic -n 1000 --era Run2_2017 --eventcontent FEVTDEBUGHLT -s DIGI,L1,DIGI2RAW,RAW2DIGI,L1Reco,RECO:localreco --datatier GEN-SIM-RECO --fileout file:step2.root --no_exec | |
import FWCore.ParameterSet.Config as cms | |
from Configuration.StandardSequences.Eras import eras | |
process = cms.Process('RECO',eras.Run2_2017) | |
# import of standard configurations | |
process.load('Configuration.StandardSequences.Services_cff') | |
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') | |
process.load('FWCore.MessageService.MessageLogger_cfi') | |
process.load('Configuration.EventContent.EventContent_cff') | |
process.load('SimGeneral.MixingModule.mixNoPU_cfi') | |
process.load('Configuration.StandardSequences.GeometryRecoDB_cff') | |
process.load('Configuration.StandardSequences.MagneticField_cff') | |
process.load('Configuration.StandardSequences.Digi_cff') | |
process.load('Configuration.StandardSequences.SimL1Emulator_cff') | |
process.load('Configuration.StandardSequences.DigiToRaw_cff') | |
process.load('Configuration.StandardSequences.RawToDigi_cff') | |
process.load('Configuration.StandardSequences.L1Reco_cff') | |
process.load('Configuration.StandardSequences.Reconstruction_cff') | |
process.load('Configuration.StandardSequences.EndOfProcess_cff') | |
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | |
process.maxEvents = cms.untracked.PSet( | |
input = cms.untracked.int32(1000) | |
) | |
# Input source | |
process.source = cms.Source("PoolSource", | |
dropDescendantsOfDroppedBranches = cms.untracked.bool(False), | |
fileNames = cms.untracked.vstring('file:step2_SIM.root'), | |
inputCommands = cms.untracked.vstring('keep *', | |
'drop *_genParticles_*_*', | |
'drop *_genParticlesForJets_*_*', | |
'drop *_kt4GenJets_*_*', | |
'drop *_kt6GenJets_*_*', | |
'drop *_iterativeCone5GenJets_*_*', | |
'drop *_ak4GenJets_*_*', | |
'drop *_ak7GenJets_*_*', | |
'drop *_ak8GenJets_*_*', | |
'drop *_ak4GenJetsNoNu_*_*', | |
'drop *_ak8GenJetsNoNu_*_*', | |
'drop *_genCandidatesForMET_*_*', | |
'drop *_genParticlesForMETAllVisible_*_*', | |
'drop *_genMetCalo_*_*', | |
'drop *_genMetCaloAndNonPrompt_*_*', | |
'drop *_genMetTrue_*_*', | |
'drop *_genMetIC5GenJs_*_*'), | |
secondaryFileNames = cms.untracked.vstring() | |
) | |
process.options = cms.untracked.PSet( | |
) | |
# Production Info | |
process.configurationMetadata = cms.untracked.PSet( | |
annotation = cms.untracked.string('step2 nevts:1000'), | |
name = cms.untracked.string('Applications'), | |
version = cms.untracked.string('$Revision: 1.19 $') | |
) | |
# Output definition | |
process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule", | |
dataset = cms.untracked.PSet( | |
dataTier = cms.untracked.string('GEN-SIM-RECO'), | |
filterName = cms.untracked.string('') | |
), | |
eventAutoFlushCompressedSize = cms.untracked.int32(10485760), | |
fileName = cms.untracked.string('file:step2.root'), | |
outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands, | |
splitLevel = cms.untracked.int32(0) | |
) | |
# Additional output definition | |
# Other statements | |
from Configuration.AlCa.GlobalTag import GlobalTag | |
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2017_realistic', '') | |
# Path and EndPath definitions | |
process.digitisation_step = cms.Path(process.pdigi) | |
process.L1simulation_step = cms.Path(process.SimL1Emulator) | |
process.digi2raw_step = cms.Path(process.DigiToRaw) | |
process.raw2digi_step = cms.Path(process.RawToDigi) | |
process.L1Reco_step = cms.Path(process.L1Reco) | |
process.reconstruction_step = cms.Path(process.localreco) | |
process.endjob_step = cms.EndPath(process.endOfProcess) | |
process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput) | |
# Schedule definition | |
process.schedule = cms.Schedule(process.digitisation_step,process.L1simulation_step,process.digi2raw_step,process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step,process.FEVTDEBUGHLToutput_step) | |
# Customisation from command line | |
# Add early deletion of temporary data products to reduce peak memory need | |
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete | |
process = customiseEarlyDelete(process) | |
# End adding early deletion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment