Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:04

0001 # This was migrated to use reco::JetCorrector in Nov 2022.
0002 # This was not fully tested because this configuration
0003 # before the migration already failed with multiple errors
0004 # unrelated to JetCorrectors. At the least:
0005 #
0006 # Something unknown but unrelated to JetCorrectors in these
0007 # three lines in gammaJetAnalysis_cfi.py causes this file to
0008 # be unparseable by Python:
0009 #
0010 #   from RecoJets.Configuration.RecoJets_cff import *
0011 #   from RecoJets.Configuration.RecoPFJets_cff import *
0012 #   from CommonTools.ParticleFlow.pfNoPileUp_cff import *
0013 #
0014 # The input file does not exist in a publicly available
0015 # space. There may be other problems.
0016 
0017 import FWCore.ParameterSet.Config as cms
0018 process = cms.Process('ANALYSIS')
0019 
0020 process.load('Configuration.StandardSequences.Services_cff')
0021 # Specify IdealMagneticField ESSource (needed for CMSSW 730)
0022 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0023 process.load("Configuration.StandardSequences.MagneticField_cff")
0024 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0025 from Configuration.AlCa.autoCond import autoCond
0026 process.GlobalTag.globaltag=autoCond['run1_data']
0027 
0028 process.load('FWCore.MessageService.MessageLogger_cfi')
0029 process.MessageLogger.GammaJetAnalysis=dict()
0030 process.MessageLogger.cerr.FwkReport.reportEvery=cms.untracked.int32(1000)
0031 
0032 
0033 #load the analyzer
0034 process.load('Calibration.HcalCalibAlgos.gammaJetAnalysis_cfi')
0035 # load energy corrector
0036 process.load('JetMETCorrections.Configuration.CorrectedJetProducers_cff')
0037 
0038 # run over files
0039 process.GammaJetAnalysis.rootHistFilename = cms.string('PhoJet_tree_CHS_data2012.root')
0040 process.GammaJetAnalysis.doPFJets = cms.bool(True)
0041 process.GammaJetAnalysis.doGenJets = cms.bool(False)
0042 process.TFileService = cms.Service("TFileService",
0043                                    fileName = cms.string('PhoJet_tree_CHS_data2012.root'))
0044 
0045 # trigger names should not end with '_'
0046 process.GammaJetAnalysis.photonTriggers = cms.vstring(
0047     'HLT_Photon20_CaloIdVL_IsoL','HLT_Photon30_CaloIdVL_IsoL',
0048     'HLT_Photon50_CaloIdVL_IsoL','HLT_Photon75_CaloIdVL_IsoL',
0049     'HLT_Photon90_CaloIdVL_IsoL','HLT_Photon135',
0050     'HLT_Photon150','HLT_Photon160')
0051 # triggers for CMSSW 730
0052 process.GammaJetAnalysis.photonTriggers += cms.vstring(
0053     'HLT_Photon22', 'HLT_Photon30', 'HLT_Photon36',
0054     'HLT_Photon50', 'HLT_Photon75',
0055     'HLT_Photon90', 'HLT_Photon120', 'HLT_Photon175',
0056     'HLT_Photon250_NoHE', 'HLT_Photon300_NoHE'
0057 )
0058 # to disable photonTriggers assign an empty vstring
0059 #process.GammaJetAnalysis.photonTriggers = cms.vstring()
0060 
0061 process.source = cms.Source("PoolSource", 
0062                             fileNames = cms.untracked.vstring(
0063 #        'file:../../HcalAlCaRecoProducers/test/gjet_data2012.root'
0064         'file:/tmp/andriusj/gjet_Run2012A.root'
0065     )
0066 )
0067 
0068 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0069 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0070 
0071 # adapt input collections for Run2012
0072 process.GammaJetAnalysis.photonCollName= cms.string("photons")
0073 process.GammaJetAnalysis.electronCollName= cms.string("gsfElectrons")
0074 process.GammaJetAnalysis.photonIdLooseName= cms.InputTag("PhotonIDProd","PhotonCutBasedIDLoose")
0075 process.GammaJetAnalysis.photonIdTightName= cms.InputTag("PhotonIDProd","PhotonCutBasedIDTight")
0076 
0077 # name of the process that used the GammaJetProd producer
0078 process.GammaJetAnalysis.prodProcess = cms.untracked.string('MYGAMMAJET')
0079 # specify 'workOnAOD=2' to apply tokens from GammaJetProd producer
0080 process.GammaJetAnalysis.workOnAOD = cms.int32(2)
0081 process.GammaJetAnalysis.doGenJets = cms.bool(False)
0082 process.GammaJetAnalysis.debug     = cms.untracked.int32(0)
0083 
0084 process.p = cms.Path(
0085     process.GammaJetAnalysis, process.ak4PFCHSL2L3CorrectorTask
0086 )