forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#89 from kurtejung/addForestDataCfg
adding data cfg and fixing jet cfgs
- Loading branch information
Showing
7 changed files
with
367 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
HeavyIonsAnalysis/JetAnalysis/python/FullJetSequence_DataPPb.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from HeavyIonsAnalysis.JetAnalysis.jets.HiReRecoJets_pPb_cff import * | ||
|
||
from HeavyIonsAnalysis.JetAnalysis.jets.ak4PFJetSequence_pp_data_cff import * | ||
from HeavyIonsAnalysis.JetAnalysis.jets.akPu4PFJetSequence_pp_data_cff import * | ||
from HeavyIonsAnalysis.JetAnalysis.jets.ak4CaloJetSequence_pp_data_cff import * | ||
from HeavyIonsAnalysis.JetAnalysis.jets.akPu4CaloJetSequence_pp_data_cff import * | ||
|
||
## put this back in if you need to rebuild the rho analyzer eta maps... | ||
#from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets | ||
#from RecoHI.HiJetAlgos.hiFJRhoProducer import hiFJRhoProducer | ||
#from RecoHI.HiJetAlgos.hiFJGridEmptyAreaCalculator_cff import hiFJGridEmptyAreaCalculator | ||
#kt4PFJets.src = cms.InputTag('particleFlow') | ||
#kt4PFJets.doAreaFastjet = True | ||
#kt4PFJets.jetPtMin = cms.double(0.0) | ||
#kt4PFJets.GhostArea = cms.double(0.005) | ||
#kt2PFJets = kt4PFJets.clone(rParam = cms.double(0.2)) | ||
|
||
ak4PFJetAnalyzer.doSubEvent = True | ||
ak4CaloJetAnalyzer.doSubEvent = True | ||
|
||
from HeavyIonsAnalysis.JetAnalysis.makePartons_cff import * | ||
highPurityTracks = cms.EDFilter("TrackSelector", | ||
src = cms.InputTag("generalTracks"), | ||
cut = cms.string('quality("highPurity")') | ||
) | ||
|
||
#custom for 80X | ||
PFTowers.src = cms.InputTag("particleFlow") | ||
|
||
jetSequences = cms.Sequence( | ||
hiReRecoCaloJets + | ||
PFTowers + | ||
hiReRecoPFJets + | ||
highPurityTracks + | ||
ak4PFJetSequence + | ||
akPu4PFJetSequence + | ||
ak4CaloJetSequence + | ||
akPu4CaloJetSequence | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
245 changes: 245 additions & 0 deletions
245
HeavyIonsAnalysis/JetAnalysis/test/runForestAOD_pPb_DATA_80X.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
### HiForest Configuration | ||
# Collisions: pp | ||
# Type: MC | ||
# Input: AOD | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process('HiForest') | ||
process.options = cms.untracked.PSet() | ||
|
||
##################################################################################### | ||
# HiForest labelling info | ||
##################################################################################### | ||
|
||
process.load("HeavyIonsAnalysis.JetAnalysis.HiForest_cff") | ||
process.HiForest.inputLines = cms.vstring("HiForest V3",) | ||
import subprocess | ||
version = subprocess.Popen(["(cd $CMSSW_BASE/src && git describe --tags)"], stdout=subprocess.PIPE, shell=True).stdout.read() | ||
|
||
if version == '': | ||
version = 'no git info' | ||
process.HiForest.HiForestVersion = cms.string(version) | ||
|
||
##################################################################################### | ||
# Input source | ||
##################################################################################### | ||
|
||
process.source = cms.Source("PoolSource", | ||
duplicateCheckMode = cms.untracked.string("noDuplicateCheck"), | ||
fileNames = cms.untracked.vstring( | ||
'file:/afs/cern.ch/user/k/kjung/run2Validation/HLTchecks/CMSSW_8_0_22/src/pPb_5TeVEpos_RECO.root' | ||
) | ||
) | ||
|
||
# Number of events we want to process, -1 = all events | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(-1)) | ||
|
||
|
||
##################################################################################### | ||
# Load Global Tag, Geometry, etc. | ||
##################################################################################### | ||
|
||
process.load('Configuration.StandardSequences.Services_cff') | ||
process.load('Configuration.Geometry.GeometryDB_cff') | ||
process.load('Configuration.StandardSequences.MagneticField_38T_cff') | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') | ||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load("CondCore.DBCommon.CondDBCommon_cfi") | ||
|
||
from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, '80X_mcRun2_asymptotic_2016_miniAODv2_v1', '') | ||
process.HiForest.GlobalTagLabel = process.GlobalTag.globaltag | ||
|
||
|
||
# Customization | ||
from HeavyIonsAnalysis.Configuration.CommonFunctions_cff import overrideJEC_pPb8TeV | ||
process = overrideJEC_pPb8TeV(process) | ||
|
||
process.GlobalTag.toGet.extend([ | ||
cms.PSet(record = cms.string("HeavyIonRcd"), | ||
#tag = cms.string("CentralityTable_HFtowersPlusTrunc200_EPOS8TeV_v80x01_mc"), | ||
tag = cms.string("CentralityTable_HFtowersPlusTrunc200_EPOS5TeV_v80x01_mc"), | ||
connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS"), | ||
label = cms.untracked.string("HFtowersPlusTruncEpos") | ||
) | ||
]) | ||
|
||
##################################################################################### | ||
# Define tree output | ||
##################################################################################### | ||
|
||
process.TFileService = cms.Service("TFileService", | ||
fileName=cms.string("HiForestAOD.root")) | ||
|
||
##################################################################################### | ||
# Additional Reconstruction and Analysis: Main Body | ||
##################################################################################### | ||
|
||
#################################################################################### | ||
|
||
############################# | ||
# Jets | ||
############################# | ||
|
||
process.load("HeavyIonsAnalysis.JetAnalysis.FullJetSequence_DataPPb") | ||
|
||
##################################################################################### | ||
|
||
############################ | ||
# Event Analysis | ||
############################ | ||
|
||
## temporary centrality bin | ||
process.load("RecoHI.HiCentralityAlgos.CentralityBin_cfi") | ||
process.centralityBin.Centrality = cms.InputTag("pACentrality") | ||
process.centralityBin.centralityVariable = cms.string("HFtowersPlusTrunc") | ||
#process.centralityBin.nonDefaultGlauberModel = cms.string("Hydjet_Drum") | ||
process.centralityBin.nonDefaultGlauberModel = cms.string("Epos") | ||
|
||
process.load('HeavyIonsAnalysis.EventAnalysis.hltanalysis_cff') | ||
process.load('HeavyIonsAnalysis.EventAnalysis.hltobject_pPb_cfi') | ||
process.load('HeavyIonsAnalysis.EventAnalysis.hievtanalyzer_data_cfi') #use data version to avoid PbPb MC | ||
process.hiEvtAnalyzer.Vertex = cms.InputTag("offlinePrimaryVertices") | ||
process.hiEvtAnalyzer.doCentrality = cms.bool(True) | ||
process.hiEvtAnalyzer.CentralitySrc = cms.InputTag("pACentrality") | ||
process.hiEvtAnalyzer.CentralityBinSrc = cms.InputTag("centralityBin","HFtowersPlusTrunc") | ||
process.hiEvtAnalyzer.doEvtPlane = cms.bool(False) | ||
process.hiEvtAnalyzer.doMC = cms.bool(True) #general MC info | ||
process.hiEvtAnalyzer.doHiMC = cms.bool(False) #HI specific MC info | ||
|
||
process.load('HeavyIonsAnalysis.EventAnalysis.runanalyzer_cff') | ||
process.load("HeavyIonsAnalysis.JetAnalysis.pfcandAnalyzer_pp_cfi") | ||
process.pfcandAnalyzer.pfPtMin = 0 | ||
process.pfcandAnalyzer.pfCandidateLabel = cms.InputTag("particleFlow") | ||
process.pfcandAnalyzer.doVS = cms.untracked.bool(False) | ||
process.pfcandAnalyzer.doUEraw_ = cms.untracked.bool(False) | ||
|
||
##################################################################################### | ||
|
||
######################### | ||
# Track Analyzer | ||
######################### | ||
process.load('HeavyIonsAnalysis.JetAnalysis.ExtraTrackReco_cff') | ||
process.load('HeavyIonsAnalysis.JetAnalysis.TrkAnalyzers_cff') | ||
|
||
# Use this instead for track corrections | ||
## process.load('HeavyIonsAnalysis.JetAnalysis.TrkAnalyzers_Corr_cff') | ||
|
||
##################################################################################### | ||
|
||
##################### | ||
# photons | ||
###################### | ||
process.load('HeavyIonsAnalysis.PhotonAnalysis.ggHiNtuplizer_cfi') | ||
process.ggHiNtuplizer.gsfElectronLabel = cms.InputTag("gedGsfElectrons") | ||
process.ggHiNtuplizer.recoPhotonHiIsolationMap = cms.InputTag('photonIsolationHIProducerpp') | ||
process.ggHiNtuplizer.VtxLabel = cms.InputTag("offlinePrimaryVertices") | ||
process.ggHiNtuplizer.particleFlowCollection = cms.InputTag("particleFlow") | ||
process.ggHiNtuplizer.doVsIso = cms.bool(False) | ||
process.ggHiNtuplizer.doElectronVID = cms.bool(True) | ||
process.ggHiNtuplizerGED = process.ggHiNtuplizer.clone(recoPhotonSrc = cms.InputTag('gedPhotons'), | ||
recoPhotonHiIsolationMap = cms.InputTag('photonIsolationHIProducerppGED')) | ||
|
||
#################################################################################### | ||
##################### | ||
# Electron ID | ||
##################### | ||
|
||
from PhysicsTools.SelectorUtils.tools.vid_id_tools import * | ||
# turn on VID producer, indicate data format to be processed | ||
# DataFormat.AOD or DataFormat.MiniAOD | ||
dataFormat = DataFormat.AOD | ||
switchOnVIDElectronIdProducer(process, dataFormat) | ||
|
||
# define which IDs we want to produce. Check here https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedElectronIdentificationRun2#Recipe_for_regular_users_for_7_4 | ||
my_id_modules = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff'] | ||
|
||
#add them to the VID producer | ||
for idmod in my_id_modules: | ||
setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection) | ||
##################################################################################### | ||
##################### | ||
# Rechit analyzer | ||
##################### | ||
process.load('HeavyIonsAnalysis.JetAnalysis.rechitanalyzer_pp_cfi') | ||
process.rechitanalyzer.doVS = cms.untracked.bool(False) | ||
process.rechitanalyzer.doEcal = cms.untracked.bool(False) | ||
process.rechitanalyzer.doHcal = cms.untracked.bool(False) | ||
process.rechitanalyzer.doHF = cms.untracked.bool(False) | ||
process.rechitanalyzer.JetSrc = cms.untracked.InputTag("ak4CaloJets") | ||
process.pfTowers.JetSrc = cms.untracked.InputTag("ak4CaloJets") | ||
|
||
##################### | ||
# New rho analyzer | ||
##################### | ||
process.load('HeavyIonsAnalysis.JetAnalysis.hiFJRhoAnalyzer_cff') | ||
|
||
##################### | ||
# Muon Analyzer | ||
##################### | ||
process.load('HeavyIonsAnalysis.MuonAnalysis.hltMuTree_cfi') | ||
process.hltMuTree.vertices = cms.InputTag("offlinePrimaryVertices") | ||
|
||
######################### | ||
# Main analysis list | ||
######################### | ||
process.ana_step = cms.Path(process.hltanalysis * | ||
process.hltobject * | ||
process.centralityBin * | ||
process.hiEvtAnalyzer * | ||
process.jetSequences + | ||
process.egmGsfElectronIDSequence + #Should be added in the path for VID module | ||
process.ggHiNtuplizer + | ||
process.ggHiNtuplizerGED + | ||
process.hiFJRhoAnalyzer + | ||
process.pfcandAnalyzer + | ||
process.hltMuTree + | ||
process.HiForest + | ||
process.trackSequencesPP + | ||
process.runAnalyzer + | ||
process.rechitanalyzer | ||
) | ||
|
||
##################################################################################### | ||
|
||
######################### | ||
# Event Selection | ||
######################### | ||
|
||
process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff') | ||
process.pHBHENoiseFilterResultProducer = cms.Path( process.HBHENoiseFilterResultProducer ) | ||
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult) | ||
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1) | ||
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose) | ||
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight) | ||
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult) | ||
|
||
process.PAprimaryVertexFilter = cms.EDFilter("VertexSelector", | ||
src = cms.InputTag("offlinePrimaryVertices"), | ||
cut = cms.string("!isFake && abs(z) <= 25 && position.Rho <= 2 && tracksSize >= 2"), | ||
filter = cms.bool(True), # otherwise it won't filter the events | ||
) | ||
|
||
process.NoScraping = cms.EDFilter("FilterOutScraping", | ||
applyfilter = cms.untracked.bool(True), | ||
debugOn = cms.untracked.bool(False), | ||
numtrack = cms.untracked.uint32(10), | ||
thresh = cms.untracked.double(0.25) | ||
) | ||
|
||
process.pPAprimaryVertexFilter = cms.Path(process.PAprimaryVertexFilter) | ||
process.pBeamScrapingFilter=cms.Path(process.NoScraping) | ||
|
||
process.load("HeavyIonsAnalysis.VertexAnalysis.PAPileUpVertexFilter_cff") | ||
|
||
process.pVertexFilterCutG = cms.Path(process.pileupVertexFilterCutG) | ||
process.pVertexFilterCutGloose = cms.Path(process.pileupVertexFilterCutGloose) | ||
process.pVertexFilterCutGtight = cms.Path(process.pileupVertexFilterCutGtight) | ||
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus) | ||
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE) | ||
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG) | ||
|
||
process.pAna = cms.EndPath(process.skimanalysis) | ||
|
||
# Customization |
Oops, something went wrong.