Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:21

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 process = cms.Process("REPROD")
0005 process.load("Configuration.StandardSequences.Reconstruction_cff")
0006 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0007 #process.load("Configuration.StandardSequences.MagneticField_4T_cff")
0008 process.load("Configuration.StandardSequences.Geometry_cff")
0009 process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0010 from Configuration.AlCa.autoCond import autoCond
0011 process.GlobalTag.globaltag = autoCond['startup']
0012 #process.GlobalTag.globaltag = 'START50_V10::All'
0013 
0014 #process.Timing =cms.Service("Timing")
0015 process.maxEvents = cms.untracked.PSet(
0016     input = cms.untracked.int32(-1)
0017 )
0018 
0019 process.source = cms.Source(
0020     "PoolSource",
0021     fileNames = cms.untracked.vstring(    
0022     '/store/relval/CMSSW_7_1_0_pre5/RelValTTbar_13/GEN-SIM-RECO/PU25ns_POSTLS171_V1-v2/00000/1A198FA1-B3BC-E311-963F-02163E00CD6B.root'
0023     ),
0024     eventsToProcess = cms.untracked.VEventRange(),
0025     #eventsToProcess = cms.untracked.VEventRange('1:1217421-1:1217421'),
0026     #                                             '1:1220344-1:1220344',
0027     #                                             '1:1655912-1:1655912',
0028     #                                             '1:415027-1:415027',
0029     #                                             '1:460640-1:460640',
0030     #                                             '1:2054772-1:2054772'),
0031     secondaryFileNames = cms.untracked.vstring(),
0032     noEventSort = cms.untracked.bool(True),
0033     duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
0034 )
0035 
0036 #from RecoParticleFlow.Configuration.reco_QCDForPF_cff import fileNames
0037 #process.source.fileNames = fileNames
0038 
0039 process.dump = cms.EDAnalyzer("EventContentAnalyzer")
0040 
0041 
0042 process.load("RecoParticleFlow.Configuration.ReDisplay_EventContent_cff")
0043 process.display = cms.OutputModule("PoolOutputModule",
0044     process.DisplayEventContent,
0045     #outputCommands = cms.untracked.vstring('keep *'),
0046     fileName = cms.untracked.string('display.root')
0047 )
0048 
0049 process.load("Configuration.EventContent.EventContent_cff")
0050 process.reco = cms.OutputModule("PoolOutputModule",
0051     process.RECOSIMEventContent,
0052     fileName = cms.untracked.string('/afs/cern.ch/user/l/lgray/work/public/phogun_35GeV.root')
0053 )
0054 
0055 # modify reconstruction sequence
0056 #process.hbhereflag = process.hbhereco.clone()
0057 #process.hbhereflag.hbheInput = 'hbhereco'
0058 #process.towerMakerPF.hbheInput = 'hbhereflag'
0059 #process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbhereflag")
0060 process.particleFlowTmp.useHO = False
0061 
0062 # Local re-reco: Produce tracker rechits, pf rechits and pf clusters
0063 process.localReReco = cms.Sequence(process.siPixelRecHits+
0064                                    process.siStripMatchedRecHits+
0065                                    #process.hbhereflag+
0066                                    process.particleFlowCluster+
0067                                    process.ecalClusters)
0068 
0069 # Track re-reco
0070 process.globalReReco =  cms.Sequence(process.offlineBeamSpot+
0071                                      process.MeasurementTrackerEvent+
0072                                      process.recopixelvertexing+
0073                                      process.ckftracks+
0074                                      process.caloTowersRec+
0075                                      process.vertexreco+
0076                                      process.recoJets+
0077                                      process.muonrecoComplete+
0078                                      process.muoncosmicreco+
0079                                      process.egammaGlobalReco+
0080                                      process.pfTrackingGlobalReco+
0081                                      process.egammaHighLevelRecoPrePF+
0082                                      process.muoncosmichighlevelreco+
0083                                      process.metreco)
0084 
0085 # Particle Flow re-processing
0086 process.pfReReco = cms.Sequence(process.particleFlowReco+
0087                                 process.egammaHighLevelRecoPostPF+
0088                                 process.muonshighlevelreco+
0089                                 process.particleFlowLinks+
0090                                 process.recoPFJets+
0091                                 process.recoPFMET+
0092                                 process.PFTau)
0093 #pfeg switch
0094 def switch_on_pfeg(the_process):
0095     the_process.particleFlowTmp.useEGammaFilters = cms.bool(True)
0096     the_process.particleFlow.GsfElectrons = cms.InputTag('gedGsfElectrons')
0097     the_process.particleFlow.Photons = cms.InputTag('gedPhotons')
0098     the_process.particleFlowReco.remove(the_process.pfElectronTranslatorSequence)
0099     the_process.particleFlowReco.remove(the_process.pfPhotonTranslatorSequence)
0100     the_process.egammaHighLevelRecoPostPF.remove(the_process.gsfElectronMergingSequence)
0101     the_process.interestingEleIsoDetIdEB.emObjectLabel = \
0102                                               cms.InputTag('gedGsfElectrons')
0103     the_process.interestingEleIsoDetIdEE.emObjectLabel = \
0104                                               cms.InputTag('gedGsfElectrons')
0105     the_process.interestingGamIsoDetIdEB.emObjectLabel = \
0106                                               cms.InputTag('gedPhotons')
0107     the_process.interestingGamIsoDetIdEE.emObjectLabel = \
0108                                               cms.InputTag('gedPhotons')
0109     the_process.PhotonIDProd.photonProducer = cms.string('gedPhotons')
0110     the_process.eidRobustLoose.src = cms.InputTag('gedGsfElectrons')
0111     the_process.eidRobustTight.src = cms.InputTag('gedGsfElectrons')
0112     the_process.eidRobustHighEnergy.src = cms.InputTag('gedGsfElectrons')
0113     the_process.eidLoose.src = cms.InputTag('gedGsfElectrons')
0114     the_process.eidTight.src = cms.InputTag('gedGsfElectrons')
0115 switch_on_pfeg(process)
0116 
0117 # Gen Info re-processing
0118 process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi")
0119 process.load("RecoJets.Configuration.GenJetParticles_cff")
0120 process.load("RecoJets.Configuration.RecoGenJets_cff")
0121 process.load("RecoMET.Configuration.GenMETParticles_cff")
0122 process.load("RecoMET.Configuration.RecoGenMET_cff")
0123 process.load("RecoParticleFlow.PFProducer.particleFlowSimParticle_cff")
0124 process.load("RecoParticleFlow.Configuration.HepMCCopy_cfi")
0125 process.genReReco = cms.Sequence(process.generator+
0126                                  process.genParticles+
0127                                  process.genJetParticles+
0128                                  process.recoGenJets+
0129                                  process.genMETParticles+
0130                                  process.recoGenMET+
0131                                  process.particleFlowSimParticle)
0132 
0133 #process.load("RecoParticleFlow.PFProducer.particleFlowCandidateChecker_cfi")
0134 #process.particleFlowCandidateChecker.pfCandidatesReco = cms.InputTag("particleFlow","","REPROD")
0135 #process.particleFlowCandidateChecker.pfCandidatesReReco = cms.InputTag("particleFlow","","REPROD2")
0136 #process.particleFlowCandidateChecker.pfJetsReco = cms.InputTag("ak5PFJets","","REPROD")
0137 #process.particleFlowCandidateChecker.pfJetsReReco = cms.InputTag("ak5PFJets","","REPROD2")
0138 # The complete reprocessing
0139 process.p = cms.Path(process.localReReco+
0140                      process.globalReReco+
0141                      process.pfReReco+
0142                      process.genReReco
0143                      #+process.particleFlowEGammaCandidateChecker
0144                      )
0145 
0146 # And the output.
0147 process.outpath = cms.EndPath(
0148     process.reco + 
0149     process.display
0150 )
0151 
0152 # And the monitoring
0153 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0154                                         ignoreTotal=cms.untracked.int32(1),
0155                                         jobReportOutputOnly = cms.untracked.bool(True)
0156                                         )
0157 process.Timing = cms.Service("Timing",
0158                              summaryOnly = cms.untracked.bool(True)
0159                              )
0160 
0161 # And the logger
0162 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0163 process.options = cms.untracked.PSet(
0164     makeTriggerResults = cms.untracked.bool(True),
0165     wantSummary = cms.untracked.bool(True),
0166     Rethrow = cms.untracked.vstring('Unknown', 
0167         'ProductNotFound', 
0168         'DictionaryNotFound', 
0169         'InsertFailure', 
0170         'Configuration', 
0171         'LogicError', 
0172         'UnimplementedFeature', 
0173         'InvalidReference', 
0174         'NullPointerError', 
0175         'NoProductSpecified', 
0176         'EventTimeout', 
0177         'EventCorruption', 
0178         'ModuleFailure', 
0179         'ScheduleExecutionFailure', 
0180         'EventProcessorFailure', 
0181         'FileInPathError', 
0182         'FatalRootError', 
0183         'NotFound')
0184 )
0185 
0186 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0187 #process.MessageLogger.cout = cms.untracked.PSet(
0188 #    threshold = cms.untracked.string('INFO')
0189 #    )
0190 
0191