forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts to test muon tomography for 2026D49 as well as a few othe…
…rs - backport of cms-sw#39299
- Loading branch information
Sunanda
committed
Sep 4, 2022
1 parent
459c35b
commit 84e6f75
Showing
3 changed files
with
395 additions
and
19 deletions.
There are no files selected for viewing
189 changes: 189 additions & 0 deletions
189
Validation/HGCalValidation/scripts/testHGCalDigiSingleMuonPt100_cfg.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
############################################################################### | ||
# Way to use this: | ||
# cmsRun testHGCalDigi_cfg.py geometry=D92 | ||
# | ||
# Options for geometry D49, D88, D92, D93 | ||
# | ||
############################################################################### | ||
import FWCore.ParameterSet.Config as cms | ||
import os, sys, imp, re, random | ||
import FWCore.ParameterSet.VarParsing as VarParsing | ||
|
||
#################################################################### | ||
### SETUP OPTIONS | ||
options = VarParsing.VarParsing('standard') | ||
options.register('geometry', | ||
"D92", | ||
VarParsing.VarParsing.multiplicity.singleton, | ||
VarParsing.VarParsing.varType.string, | ||
"geometry of operations: D49, D88, D92, D93") | ||
|
||
### get and parse the command line arguments | ||
options.parseArguments() | ||
|
||
print(options) | ||
|
||
#################################################################### | ||
# Use the options | ||
|
||
if (options.geometry == "D49"): | ||
from Configuration.Eras.Era_Phase2C9_cff import Phase2C9 | ||
process = cms.Process('SingleMuonDigi',Phase2C9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff') | ||
globalTag = "auto:phase2_realistic_T15" | ||
elif (options.geometry == "D88"): | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonDigi',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
elif (options.geometry == "D93"): | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonDigi',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
else: | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonDigi',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
|
||
print("Global Tag: ", globalTag) | ||
|
||
# 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.MagneticField_cff') | ||
process.load('Configuration.StandardSequences.Digi_cff') | ||
process.load('Configuration.StandardSequences.L1TrackTrigger_cff') | ||
process.load('Configuration.StandardSequences.SimL1Emulator_cff') | ||
process.load('Configuration.StandardSequences.DigiToRaw_cff') | ||
process.load('HLTrigger.Configuration.HLT_Fake2_cff') | ||
process.load('Configuration.StandardSequences.EndOfProcess_cff') | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(-1), | ||
output = cms.optional.untracked.allowed(cms.int32,cms.PSet) | ||
) | ||
|
||
# Input source | ||
process.source = cms.Source("PoolSource", | ||
dropDescendantsOfDroppedBranches = cms.untracked.bool(False), | ||
fileNames = cms.untracked.vstring('file:step1.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( | ||
FailPath = cms.untracked.vstring(), | ||
IgnoreCompletely = cms.untracked.vstring(), | ||
Rethrow = cms.untracked.vstring(), | ||
SkipEvent = cms.untracked.vstring(), | ||
accelerators = cms.untracked.vstring('*'), | ||
allowUnscheduled = cms.obsolete.untracked.bool, | ||
canDeleteEarly = cms.untracked.vstring(), | ||
deleteNonConsumedUnscheduledModules = cms.untracked.bool(True), | ||
dumpOptions = cms.untracked.bool(False), | ||
emptyRunLumiMode = cms.obsolete.untracked.string, | ||
eventSetup = cms.untracked.PSet( | ||
forceNumberOfConcurrentIOVs = cms.untracked.PSet( | ||
allowAnyLabel_=cms.required.untracked.uint32 | ||
), | ||
numberOfConcurrentIOVs = cms.untracked.uint32(0) | ||
), | ||
fileMode = cms.untracked.string('FULLMERGE'), | ||
forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False), | ||
makeTriggerResults = cms.obsolete.untracked.bool, | ||
numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0), | ||
numberOfConcurrentRuns = cms.untracked.uint32(1), | ||
numberOfStreams = cms.untracked.uint32(0), | ||
numberOfThreads = cms.untracked.uint32(1), | ||
printDependencies = cms.untracked.bool(False), | ||
sizeOfStackForThreadsInKB = cms.optional.untracked.uint32, | ||
throwIfIllegalParameter = cms.untracked.bool(True), | ||
wantSummary = cms.untracked.bool(False) | ||
) | ||
|
||
# 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-DIGI-RAW'), | ||
filterName = cms.untracked.string('') | ||
), | ||
fileName = cms.untracked.string('file:step2.root'), | ||
outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands, | ||
splitLevel = cms.untracked.int32(0) | ||
) | ||
|
||
# Additional output definition | ||
|
||
# Other statements | ||
process.mix.digitizers = cms.PSet(process.theDigitizersValid) | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, globalTag, '') | ||
|
||
# Path and EndPath definitions | ||
process.digitisation_step = cms.Path(process.pdigi_valid) | ||
process.L1TrackTrigger_step = cms.Path(process.L1TrackTrigger) | ||
process.L1simulation_step = cms.Path(process.SimL1Emulator) | ||
process.digi2raw_step = cms.Path(process.DigiToRaw) | ||
process.endjob_step = cms.EndPath(process.endOfProcess) | ||
process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput) | ||
|
||
# Schedule definition | ||
# process.schedule imported from cff in HLTrigger.Configuration | ||
process.schedule.insert(0, process.digitisation_step) | ||
process.schedule.insert(1, process.L1TrackTrigger_step) | ||
process.schedule.insert(2, process.L1simulation_step) | ||
process.schedule.insert(3, process.digi2raw_step) | ||
process.schedule.extend([process.endjob_step,process.FEVTDEBUGHLToutput_step]) | ||
|
||
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask | ||
associatePatAlgosToolsTask(process) | ||
|
||
# customisation of the process. | ||
|
||
# Automatic addition of the customisation function from HLTrigger.Configuration.customizeHLTforMC | ||
from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC | ||
|
||
#call to customisation function customizeHLTforMC imported from HLTrigger.Configuration.customizeHLTforMC | ||
process = customizeHLTforMC(process) | ||
|
||
# End of customisation functions | ||
|
||
|
||
# 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 |
164 changes: 164 additions & 0 deletions
164
Validation/HGCalValidation/scripts/testHGCalRecoSingleMuonPt100_cfg.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
############################################################################### | ||
# Way to use this: | ||
# cmsRun testHGCalDigi_cfg.py geometry=D92 | ||
# | ||
# Options for geometry D49, D88, D92, D93 | ||
# | ||
############################################################################### | ||
import FWCore.ParameterSet.Config as cms | ||
import os, sys, imp, re, random | ||
import FWCore.ParameterSet.VarParsing as VarParsing | ||
|
||
#################################################################### | ||
### SETUP OPTIONS | ||
options = VarParsing.VarParsing('standard') | ||
options.register('geometry', | ||
"D92", | ||
VarParsing.VarParsing.multiplicity.singleton, | ||
VarParsing.VarParsing.varType.string, | ||
"geometry of operations: D49, D88, D92, D93") | ||
|
||
### get and parse the command line arguments | ||
options.parseArguments() | ||
|
||
print(options) | ||
|
||
#################################################################### | ||
# Use the options | ||
|
||
if (options.geometry == "D49"): | ||
from Configuration.Eras.Era_Phase2C9_cff import Phase2C9 | ||
process = cms.Process('SingleMuonReco',Phase2C9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff') | ||
globalTag = "auto:phase2_realistic_T15" | ||
elif (options.geometry == "D88"): | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonReco',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
elif (options.geometry == "D93"): | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonReco',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
else: | ||
from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 | ||
process = cms.Process('SingleMuonReco',Phase2C11I13M9) | ||
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff') | ||
globalTag = "auto:phase2_realistic_T21" | ||
|
||
print("Global Tag: ", globalTag) | ||
|
||
# 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.Geometry.GeometryExtended2026D88Reco_cff') | ||
process.load('Configuration.StandardSequences.MagneticField_cff') | ||
process.load('Configuration.StandardSequences.RawToDigi_cff') | ||
process.load('Configuration.StandardSequences.Reconstruction_cff') | ||
process.load('Configuration.StandardSequences.RecoSim_cff') | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(-1), | ||
output = cms.optional.untracked.allowed(cms.int32,cms.PSet) | ||
) | ||
|
||
# Input source | ||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring('file:step2.root'), | ||
secondaryFileNames = cms.untracked.vstring() | ||
) | ||
|
||
process.options = cms.untracked.PSet( | ||
FailPath = cms.untracked.vstring(), | ||
IgnoreCompletely = cms.untracked.vstring(), | ||
Rethrow = cms.untracked.vstring(), | ||
SkipEvent = cms.untracked.vstring(), | ||
accelerators = cms.untracked.vstring('*'), | ||
allowUnscheduled = cms.obsolete.untracked.bool, | ||
canDeleteEarly = cms.untracked.vstring(), | ||
deleteNonConsumedUnscheduledModules = cms.untracked.bool(True), | ||
dumpOptions = cms.untracked.bool(False), | ||
emptyRunLumiMode = cms.obsolete.untracked.string, | ||
eventSetup = cms.untracked.PSet( | ||
forceNumberOfConcurrentIOVs = cms.untracked.PSet( | ||
allowAnyLabel_=cms.required.untracked.uint32 | ||
), | ||
numberOfConcurrentIOVs = cms.untracked.uint32(0) | ||
), | ||
fileMode = cms.untracked.string('FULLMERGE'), | ||
forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False), | ||
makeTriggerResults = cms.obsolete.untracked.bool, | ||
numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0), | ||
numberOfConcurrentRuns = cms.untracked.uint32(1), | ||
numberOfStreams = cms.untracked.uint32(0), | ||
numberOfThreads = cms.untracked.uint32(1), | ||
printDependencies = cms.untracked.bool(False), | ||
sizeOfStackForThreadsInKB = cms.optional.untracked.uint32, | ||
throwIfIllegalParameter = cms.untracked.bool(True), | ||
wantSummary = cms.untracked.bool(False) | ||
) | ||
|
||
# Production Info | ||
process.configurationMetadata = cms.untracked.PSet( | ||
annotation = cms.untracked.string('step3 nevts:10'), | ||
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('') | ||
), | ||
fileName = cms.untracked.string('file:step3.root'), | ||
outputCommands = cms.untracked.vstring( | ||
'keep *_*hbhe*_*_*', | ||
'keep *_g4SimHits_*_*', | ||
'keep *_*HGC*_*_*', | ||
), | ||
splitLevel = cms.untracked.int32(0) | ||
) | ||
|
||
# Additional output definition | ||
|
||
# Other statements | ||
process.mix.playback = True | ||
process.mix.digitizers = cms.PSet() | ||
for a in process.aliases: delattr(process, a) | ||
process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer") | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, globalTag, '') | ||
|
||
# Path and EndPath definitions | ||
process.raw2digi_step = cms.Path(process.RawToDigi) | ||
process.reconstruction_step = cms.Path(process.reconstruction) | ||
process.recosim_step = cms.Path(process.recosim) | ||
process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput) | ||
|
||
# Schedule definition | ||
process.schedule = cms.Schedule(process.raw2digi_step, | ||
process.reconstruction_step, | ||
process.recosim_step, | ||
process.FEVTDEBUGHLToutput_step) | ||
|
||
# customisation of the process. | ||
|
||
# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff | ||
from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn | ||
|
||
#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff | ||
process = setCrossingFrameOn(process) | ||
|
||
# End of customisation functions | ||
|
||
# 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 |
Oops, something went wrong.