Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:30

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 isMC = True
0004 
0005 process = cms.Process('RERECO')
0006 
0007 # import of standard configurations
0008 process.load('Configuration/StandardSequences/Services_cff')
0009 process.load('FWCore/MessageService/MessageLogger_cfi')
0010 process.load('Configuration/StandardSequences/GeometryExtended_cff')
0011 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
0012 process.load('Configuration/StandardSequences/Reconstruction_cff')
0013 process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0014 process.load('Configuration/EventContent/EventContent_cff')
0015 
0016 if (isMC):
0017     process.GlobalTag.globaltag ='START38_V10::All'
0018 else:
0019     process.GlobalTag.globaltag ='GR_R_38X_V11::All'
0020 
0021 process.maxEvents = cms.untracked.PSet(
0022     input = cms.untracked.int32(500)
0023 )
0024 
0025 process.options = cms.untracked.PSet(
0026     wantSummary = cms.untracked.bool(True)
0027 )
0028 
0029 # Input source
0030 if(isMC):
0031     process.source = cms.Source("PoolSource",
0032                                 fileNames = cms.untracked.vstring('/store/mc/Summer10/TTbar-mcatnlo/GEN-SIM-RECO/START37_V5_S09-v1/0000/0268EFE9-DC85-DF11-ABC0-002618943902.root',
0033                                                                   '/store/mc/Summer10/TTbar-mcatnlo/GEN-SIM-RECO/START37_V5_S09-v1/0000/02C33E82-EA85-DF11-A055-0026189437FE.root',
0034                                                                   '/store/mc/Summer10/TTbar-mcatnlo/GEN-SIM-RECO/START37_V5_S09-v1/0000/02CCE997-E985-DF11-971D-00261894389E.root',
0035                                                                   '/store/mc/Summer10/TTbar-mcatnlo/GEN-SIM-RECO/START37_V5_S09-v1/0000/0425AE78-E985-DF11-9510-003048678A80.root',
0036                                                                   '/store/mc/Summer10/TTbar-mcatnlo/GEN-SIM-RECO/START37_V5_S09-v1/0000/06226586-DA85-DF11-8F5B-0026189438B5.root')
0037                                 )
0038 else:
0039     process.source = cms.Source("PoolSource",
0040                                 fileNames = cms.untracked.vstring('/store/data/Commissioning10/MinimumBias/RECO/Apr20ReReco-v1/0160/00064D6A-8D4C-DF11-B7C4-002618943829.root',
0041                                                                   '/store/data/Commissioning10/MinimumBias/RECO/Apr20ReReco-v1/0160/0065C473-8F4C-DF11-A129-003048679080.root'
0042                                                                   )
0043                                 )
0044 
0045 # Output definition
0046 process.output = cms.OutputModule(
0047     "PoolOutputModule",
0048     splitLevel = cms.untracked.int32(0),
0049     outputCommands = process.RECOEventContent.outputCommands,
0050     fileName = cms.untracked.string('output.root'),
0051     dataset = cms.untracked.PSet(
0052         dataTier = cms.untracked.string('RECO'),
0053         filterName = cms.untracked.string('')
0054     )
0055 )
0056 process.output.outputCommands.append('keep *_*_*_RERECO')
0057 
0058 # Other statements
0059 process.MessageLogger.cerr.FwkReport.reportEvery = 10
0060 
0061 # modify severity level computer
0062 flag = 'HBHEIsolatedNoise'
0063 foundLevel10 = False
0064 for i in range(len(process.hcalRecAlgos.SeverityLevels)):
0065     level=process.hcalRecAlgos.SeverityLevels[i].Level.value()
0066     flags=process.hcalRecAlgos.SeverityLevels[i].RecHitFlags.value()
0067     if level!=10 and flag in flags: # remove flag if it's in a level != 10
0068         flags.remove(flag)
0069         process.hcalRecAlgos.SeverityLevels[i].RecHitFlags=flags
0070     elif level==10 and flags==['']: # add flag to level 10
0071         flags=[flag]
0072         process.hcalRecAlgos.SeverityLevels[i].RecHitFlags=flags
0073         foundLevel10 = True
0074     elif level==10 and flag not in flags:
0075         flags.append(flag)
0076         process.hcalRecAlgos.SeverityLevels[i].RecHitFlags=flags
0077         foundLevel10 = True
0078 if not foundLevel10:
0079     process.hcalRecAlgos.SeverityLevels.append(cms.PSet(Level=cms.int32(10),
0080                                                         RecHitFlags=cms.vstring(flag),
0081                                                         ChannelStatus=cms.vstring("")))
0082 
0083 # modify reconstruction sequence
0084 process.hbhereflag = process.hbhereco.clone()
0085 process.hbhereflag.hbheInput = 'hbhereco'
0086 process.towerMaker.hbheInput = 'hbhereflag'
0087 process.towerMakerWithHO.hbheInput = 'hbhereflag'
0088 process.hcalnoise.recHitCollName = 'hbhereflag'
0089 process.hcalnoise.fillDigis = False
0090 process.rereco_step = cms.Path(process.hbhereflag*process.caloTowersRec*(process.recoJets*process.recoJetIds+process.recoTrackJets)*process.recoJetAssociations*process.metrecoPlusHCALNoise)
0091 process.out_step = cms.EndPath(process.output)
0092 
0093 # Schedule definition
0094 process.schedule = cms.Schedule(process.rereco_step,
0095                                 process.out_step)