Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-31 23:50:52

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process('ANALYSIS')
0003 
0004 process.load('Configuration.StandardSequences.Services_cff')
0005 # Specify IdealMagneticField ESSource (needed for CMSSW 730)
0006 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0007 process.load("Configuration.StandardSequences.MagneticField_cff")
0008 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0009 from Configuration.AlCa.autoCond import autoCond
0010 process.GlobalTag.globaltag=autoCond['run1_data']
0011 
0012 process.load('FWCore.MessageService.MessageLogger_cfi')
0013 process.MessageLogger.GammaJetAnalysis=dict()
0014 process.MessageLogger.cerr.FwkReport.reportEvery=cms.untracked.int32(1000)
0015 
0016 #load the analyzer
0017 process.load('Calibration.HcalCalibAlgos.gammaJetAnalysis_cfi')
0018 # load energy corrector
0019 process.load('JetMETCorrections.Configuration.JetCorrectionProducers_cff')
0020 
0021 # run over files
0022 process.GammaJetAnalysis.rootHistFilename = cms.string('PhoJet_tree_CHS_data2012_noGJetProd.root')
0023 process.GammaJetAnalysis.doPFJets = cms.bool(True)
0024 process.GammaJetAnalysis.doGenJets = cms.bool(False)
0025 process.TFileService = cms.Service("TFileService",
0026                                    fileName = cms.string('PhoJet_tree_CHS_data2012_noGJetProd.root'))
0027 
0028 # trigger names should not end with '_'
0029 process.GammaJetAnalysis.photonTriggers = cms.vstring(
0030     'HLT_Photon20_CaloIdVL_IsoL','HLT_Photon30_CaloIdVL_IsoL',
0031     'HLT_Photon50_CaloIdVL_IsoL','HLT_Photon75_CaloIdVL_IsoL',
0032     'HLT_Photon90_CaloIdVL_IsoL','HLT_Photon135',
0033     'HLT_Photon150','HLT_Photon160')
0034 # triggers for CMSSW 730
0035 process.GammaJetAnalysis.photonTriggers += cms.vstring(
0036     'HLT_Photon22', 'HLT_Photon30', 'HLT_Photon36',
0037     'HLT_Photon50', 'HLT_Photon75',
0038     'HLT_Photon90', 'HLT_Photon120', 'HLT_Photon175',
0039     'HLT_Photon250_NoHE', 'HLT_Photon300_NoHE'
0040 )
0041 # to disable photonTriggers assign an empty vstring
0042 #process.GammaJetAnalysis.photonTriggers = cms.vstring()
0043 
0044 process.source = cms.Source("PoolSource", 
0045                             fileNames = cms.untracked.vstring(
0046         'file:/tmp/andriusj/Run2012A_Photon_22Jan2013-002618943913.root'
0047     )
0048 )
0049 
0050 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0051 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0052 
0053 # Load jets and pfNoPileUP
0054 process.load('RecoJets.Configuration.RecoPFJets_cff')
0055 process.load('CommonTools.ParticleFlow.PF2PAT_cff')
0056 process.load("CommonTools.ParticleFlow.pfNoPileUp_cff")
0057 
0058 process.seq_ak4PFCHS= cms.Sequence( process.particleFlowPtrs *
0059                                     process.pfNoPileUpJMESequence *
0060                                     process.ak4PFJetsCHS )
0061 
0062 # adapt input collections
0063 process.GammaJetAnalysis.photonCollName= cms.string("photons")
0064 process.GammaJetAnalysis.electronCollName= cms.string("gsfElectrons")
0065 process.GammaJetAnalysis.photonIdLooseName= cms.InputTag("PhotonIDProd","PhotonCutBasedIDLoose")
0066 process.GammaJetAnalysis.photonIdTightName= cms.InputTag("PhotonIDProd","PhotonCutBasedIDTight")
0067 
0068 # name of the process that used the GammaJetProd producer
0069 #process.GammaJetAnalysis.prodProcess = cms.untracked.string('MYGAMMAJET')
0070 # specify 'workOnAOD=2' to apply tokens from GammaJetProd producer
0071 process.GammaJetAnalysis.workOnAOD = cms.int32(0)
0072 process.GammaJetAnalysis.doGenJets = cms.bool(False)
0073 process.GammaJetAnalysis.debug     = cms.untracked.int32(0)
0074 
0075 process.p = cms.Path(
0076     process.seq_ak4PFCHS *
0077     process.GammaJetAnalysis
0078 )