Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-29 23:13:16

0001 # Configuration file to run only TICL on an already existing step3.root file
0002 import FWCore.ParameterSet.Config as cms
0003 import FWCore.ParameterSet.VarParsing as VarParsing
0004 
0005 from Configuration.Eras.Era_Phase2C9_cff import Phase2C9
0006 
0007 options = VarParsing.VarParsing ('standard')
0008 options.register('inputFile', 'step3.root', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Input file")
0009 options.register('outputFile', 'step3_reReco_ticlOnly.root', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Output file")
0010 options.register ('globalTag', 'auto:phase2_realistic_T15', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "GlobalTag")
0011 options.parseArguments()
0012 
0013 print("Input file: ", options.inputFile)
0014 print("Output file: ", options.outputFile)
0015 print("GlobalTag: ", options.globalTag)
0016 
0017 process = cms.Process('TICL',Phase2C9)
0018 
0019 # import of standard configurations
0020 process.load('Configuration.StandardSequences.Services_cff')
0021 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0022 process.load('FWCore.MessageService.MessageLogger_cfi')
0023 process.load('Configuration.EventContent.EventContent_cff')
0024 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0025 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0026 process.load('Configuration.StandardSequences.MagneticField_cff')
0027 process.load('Configuration.StandardSequences.RawToDigi_cff')
0028 process.load('Configuration.StandardSequences.L1Reco_cff')
0029 process.load('Configuration.StandardSequences.Reconstruction_cff')
0030 process.load('Configuration.StandardSequences.RecoSim_cff')
0031 process.load('Configuration.StandardSequences.Validation_cff')
0032 process.load('DQMServices.Core.DQMStoreNonLegacy_cff')
0033 process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
0034 
0035 process.maxEvents = cms.untracked.PSet(
0036     input = cms.untracked.int32(-1),
0037     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0038 )
0039 
0040 # Input source
0041 process.source = cms.Source("PoolSource",
0042     fileNames = cms.untracked.vstring('file:'+options.inputFile),
0043     secondaryFileNames = cms.untracked.vstring()
0044 )
0045 process.source.duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
0046 
0047 process.options = cms.untracked.PSet(
0048     IgnoreCompletely = cms.untracked.vstring(),
0049     Rethrow = cms.untracked.vstring(),
0050     TryToContinue = cms.untracked.vstring(),
0051     allowUnscheduled = cms.obsolete.untracked.bool,
0052     canDeleteEarly = cms.untracked.vstring(),
0053     emptyRunLumiMode = cms.obsolete.untracked.string,
0054     eventSetup = cms.untracked.PSet(
0055         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0056             allowAnyLabel_=cms.required.untracked.uint32
0057         ),
0058         numberOfConcurrentIOVs = cms.untracked.uint32(1)
0059     ),
0060     fileMode = cms.untracked.string('FULLMERGE'),
0061     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0062     makeTriggerResults = cms.obsolete.untracked.bool,
0063     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0064     numberOfConcurrentRuns = cms.untracked.uint32(1),
0065     numberOfStreams = cms.untracked.uint32(0),
0066     numberOfThreads = cms.untracked.uint32(1),
0067     printDependencies = cms.untracked.bool(False),
0068     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0069     throwIfIllegalParameter = cms.untracked.bool(True),
0070     wantSummary = cms.untracked.bool(False)
0071 )
0072 
0073 # Production Info
0074 process.configurationMetadata = cms.untracked.PSet(
0075     annotation = cms.untracked.string('step3 nevts:10'),
0076     name = cms.untracked.string('Applications'),
0077     version = cms.untracked.string('$Revision: 1.19 $')
0078 )
0079 
0080 # Output definition
0081 
0082 process.ticl_FEVToutput = cms.OutputModule("PoolOutputModule",
0083     dataset = cms.untracked.PSet(
0084         dataTier = cms.untracked.string('GEN-SIM-RECO'),
0085         filterName = cms.untracked.string('')
0086     ),
0087     fileName = cms.untracked.string('file:'+options.outputFile),
0088     outputCommands = cms.untracked.vstring( (
0089         'drop *', 
0090         'keep *_HGCalRecHit_*_*', 
0091         'keep recoCaloClusters_hgcalLayerClusters_*_*', 
0092         'keep *_hgcalLayerClusters_timeLayerCluster_*', 
0093         'keep *_hgcalLayerClusters_InitialLayerClustersMask_*',
0094         'keep *_hgcalMultiClusters_*_*', 
0095         'keep *_iterHGCalMultiClusters_*_*',
0096         'keep *_ticlTracksters*_*_*', 
0097         'keep *_ticlSimTracksters*_*_*',
0098         'keep *_ticlMultiClustersFromTracksters*_*_*', 
0099         'keep *_ticlMultiClustersFromSimTracksters*_*_*', 
0100         'keep *_genParticle*_*_*', 
0101         'keep *_generator_*_*', 
0102         'keep *_mix*_MergedCaloTruth_*',
0103         'keep *_genPUProtons_*_*', 
0104     ) ),
0105     splitLevel = cms.untracked.int32(0)
0106 )
0107 
0108 process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
0109     dataset = cms.untracked.PSet(
0110         dataTier = cms.untracked.string('DQMIO'),
0111         filterName = cms.untracked.string('')
0112     ),
0113     fileName = cms.untracked.string('file:step3_inDQM.root'),
0114     outputCommands = process.DQMEventContent.outputCommands,
0115     splitLevel = cms.untracked.int32(0)
0116 )
0117 
0118 # Additional output definition
0119 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0120 from Configuration.AlCa.GlobalTag import GlobalTag
0121 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0122 
0123 process.ticl_seq = cms.Sequence(
0124     process.iterTICLTask
0125 )
0126 
0127 process.ticl_step = cms.Path(process.ticl_seq)
0128 process.ticl_prevalidation_step = cms.Path(process.globalPrevalidationHGCal)
0129 process.ticl_validation = cms.Sequence(process.hgcalLayerClusters+process.recHitMapProducer+process.hgcalValidatorSequence)
0130 process.ticl_validation_step = cms.EndPath(process.ticl_validation)
0131 process.ticl_FEVToutput_step = cms.EndPath(process.ticl_FEVToutput)
0132 process.DQMoutput_step = cms.EndPath(process.DQMoutput)
0133 
0134 # Schedule definition
0135 process.schedule = cms.Schedule(
0136     process.ticl_step,
0137     process.ticl_prevalidation_step,
0138     process.ticl_validation_step,
0139     process.ticl_FEVToutput_step,
0140     process.DQMoutput_step)
0141 
0142 # customisation of the process.
0143 
0144 # Customisation from command line
0145 
0146 #Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule
0147 from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
0148 process = customiseLogErrorHarvesterUsingOutputCommands(process)
0149 
0150 # Add early deletion of temporary data products to reduce peak memory need
0151 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0152 process = customiseEarlyDelete(process)
0153 # End adding early deletion