Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:57

0001 # EGM skimmer
0002 # Author: Rafael Lopes de Sa
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 # Run with the 2017 detector
0007 from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
0008 process = cms.Process('SKIM',Run2_2017)
0009 
0010 # Import the standard packages for reconstruction and digitization
0011 process.load('Configuration.StandardSequences.Services_cff')
0012 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0013 process.load('FWCore.MessageService.MessageLogger_cfi')
0014 process.load('Configuration.EventContent.EventContent_cff')
0015 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0016 process.load('Configuration.StandardSequences.Digi_cff')
0017 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0018 process.load('Configuration.StandardSequences.MagneticField_cff')
0019 process.load('Configuration.StandardSequences.RawToDigi_cff')
0020 process.load('Configuration.StandardSequences.L1Reco_cff')
0021 process.load('Configuration.StandardSequences.Reconstruction_cff')
0022 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0023 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0024 process.load('RecoEgamma.EgammaMCTools.pfClusterMatchedToPhotonsSelector_cfi')
0025 
0026 # Global Tag configuration ... just using the same as in the RelVal
0027 from Configuration.AlCa.GlobalTag import GlobalTag
0028 process.GlobalTag = GlobalTag(process.GlobalTag, '81X_upgrade2017_realistic_v26', '')
0029 
0030 process.MessageLogger.cerr.threshold = 'ERROR'
0031 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0032 
0033 process.options = cms.untracked.PSet( allowUnscheduled = cms.untracked.bool(True) )
0034 
0035 # This is where users have some control.
0036 # Define which collections to save and which dataformat we are using
0037 savedCollections = cms.untracked.vstring('drop *',
0038 # The commented ones are large collections that can be kept for debug
0039 #                                         'keep EcalRecHitsSorted_*_*_*',
0040 #                                         'keep recoPFClusters_*_*_*',
0041 #                                         'keep recoCaloClusters_*_*_*',
0042 #                                         'keep recoSuperClusters_*_*_*', 
0043 #                                         'keep recoGsfElectron*_*_*_*',
0044 #                                         'keep recoPhoton*_*_*_*',
0045 #                                         'keep *_mix_MergedTrackTruth_*',
0046                                          'keep *_reducedEcalRecHits*_*_*',
0047                                          'keep double_fixedGridRho*_*_*',
0048                                          'keep recoGenParticles_*_*_*',
0049                                          'keep GenEventInfoProduct_*_*_*',
0050                                          'keep PileupSummaryInfos_*_*_*',
0051                                          'keep *_ecalDigis_*_*',
0052                                          'keep *_offlinePrimaryVertices_*_*',
0053                                          'keep *_particleFlowCluster*_*_*')
0054 
0055 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(15))
0056 
0057 process.source = cms.Source("PoolSource",                 
0058                             fileNames = cms.untracked.vstring(
0059         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/AODSIM/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/005AB6CE-27ED-E611-98CA-E0071B7A8590.root'
0060         ),
0061                             secondaryFileNames = cms.untracked.vstring(
0062         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/0416D6B7-04ED-E611-B342-E0071B7A8550.root',
0063         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/14829DD8-04ED-E611-8049-A0000420FE80.root',
0064         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/54AFE9C4-04ED-E611-952D-A0000420FE80.root',
0065         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/5A32C6B9-04ED-E611-B1EB-E0071B7A8550.root',
0066         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/60E162B8-04ED-E611-898D-E0071B7A58F0.root',
0067         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/6A47DD1A-FEEC-E611-81EB-A0000420FE80.root',
0068         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/92B923B6-04ED-E611-9DC9-24BE05C48821.root',
0069         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/B40E77B4-04ED-E611-9E30-E0071B7A45D0.root',
0070         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/C48157B5-04ED-E611-BEC1-E0071B7A45D0.root',
0071         '/store/mc/PhaseIFall16DR/GluGluHToGG_M-125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_81X_upgrade2017_realistic_v26-v1/100000/CAED3A16-FEEC-E611-8262-24BE05CEFB41.root'
0072 )
0073                             )
0074 process.PFCLUSTERoutput = cms.OutputModule("PoolOutputModule",
0075                                            dataset = cms.untracked.PSet(dataTier = cms.untracked.string('RECO'),
0076                                                                         filterName = cms.untracked.string('')
0077                                                                         ),
0078                                            eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0079                                            fileName = cms.untracked.string('skimEGMobjects_fromRAW.root'),
0080                                            outputCommands = savedCollections,
0081                                            splitLevel = cms.untracked.int32(0)
0082                                            )
0083 
0084 # Run the digitizer to make the trackingparticles
0085 process.mix.digitizers = cms.PSet(process.theDigitizersValid)
0086 process.trackingtruth_step = cms.Path(process.pdigi_valid)
0087 
0088 # Remake the PFClusters
0089 process.pfclusters_step = cms.Path(process.bunchSpacingProducer *
0090                                    process.ecalDigis * 
0091                                    process.ecalPreshowerDigis * 
0092                                    process.ecalPreshowerRecHit *
0093                                    process.ecalMultiFitUncalibRecHit *
0094                                    process.ecalDetIdToBeRecovered *
0095                                    process.ecalRecHit *
0096                                    process.particleFlowRecHitPS * 
0097                                    process.particleFlowRecHitECAL * 
0098                                    process.particleFlowClusterECALUncorrected * 
0099                                    process.particleFlowClusterPS *
0100                                    process.particleFlowClusterECAL)
0101 
0102 # Select the PFClusters we want to calibrate
0103 process.particleFlowClusterECALMatchedToPhotons = process.pfClusterMatchedToPhotonsSelector.clone()
0104 process.selection_step = cms.Path(process.particleFlowClusterECALMatchedToPhotons)
0105 
0106 # Ends job and writes our output
0107 process.endjob_step = cms.EndPath(process.endOfProcess)
0108 process.output_step = cms.EndPath(process.PFCLUSTERoutput)
0109 
0110 # Schedule definition, rebuilding rechits
0111 process.schedule = cms.Schedule(process.trackingtruth_step,process.pfclusters_step,process.selection_step,process.endjob_step,process.output_step)
0112 
0113