forked from UMN-CMS/ZFinder
-
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.
Split configuration into combined and extended
Combined uses selections designed for the combined Electron-Muon results. Extended uses selections designed for the extended Eta coverage possible with electrons.
- Loading branch information
Alexander Gude
committed
May 21, 2014
1 parent
e27e17c
commit 62f9e4c
Showing
6 changed files
with
136 additions
and
16 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("ZFinderData") | ||
|
||
# Set up message output and logging | ||
from FWCore.MessageService.MessageLogger_cfi import MessageLogger | ||
process.MessageLogger = MessageLogger | ||
process.MessageLogger.cerr.FwkReport.reportEvery = 100 # Report status ever 100 events | ||
|
||
# Number of events from each file to process. It should be -1 (all) when | ||
# running for an analysis | ||
N_EVENTS_TO_PROCESS = -1 | ||
if N_EVENTS_TO_PROCESS != -1: | ||
print "NOT RUNNING ON ALL EVENTS IN THE FILE!" | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(N_EVENTS_TO_PROCESS) | ||
) | ||
|
||
# Input file | ||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring('file:/local/cms/phedex/store/data/Run2012A/DoubleElectron/AOD/22Jan2013-v1/20000/003EC246-5E67-E211-B103-00259059642E.root') | ||
) | ||
|
||
# Output file | ||
process.TFileService = cms.Service("TFileService", | ||
fileName = cms.string("test_combined_data.root") | ||
) | ||
|
||
# Run only on lumis specified in the lumi file | ||
# Recipe from: | ||
# https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuidePythonTips#Use_a_JSON_file_of_good_lumi_sec | ||
from FWCore.ParameterSet.Types import untracked, VLuminosityBlockRange | ||
from FWCore.PythonUtilities.LumiList import LumiList | ||
json_file = "../../Metadata/lumi_json/Run2012ABCD.json" # File location | ||
run_2012abcd_lumis = LumiList(filename = json_file).getCMSSWString().split(',') | ||
process.source.lumisToProcess = untracked(VLuminosityBlockRange(run_2012abcd_lumis)) | ||
|
||
# Import rho value for isolation correction | ||
from ZFinder.Event.kt6_pfjets_cfi import kt6PFJetsForIsolation | ||
process.kt6PFJetsForIsolation = kt6PFJetsForIsolation.clone() | ||
|
||
# Particle flow isolation | ||
from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso | ||
process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') | ||
process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) | ||
|
||
# ZFinder | ||
from ZFinder.Event.zdefinitions_cfi import zdefs_combined_data | ||
from ZFinder.Event.zfinder_cfi import ZFinder | ||
process.ZFinder = ZFinder.clone( | ||
ZDefinitions = zdefs_combined_data, | ||
) | ||
|
||
# RUN | ||
process.p = cms.Path( | ||
process.kt6PFJetsForIsolation | ||
* process.pfiso | ||
* process.ZFinder | ||
) |
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
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,51 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("ZFinderMC") | ||
|
||
# Set up message output and logging | ||
from FWCore.MessageService.MessageLogger_cfi import MessageLogger | ||
process.MessageLogger = MessageLogger | ||
process.MessageLogger.cerr.FwkReport.reportEvery = 100 # Report status ever 100 events | ||
|
||
# Number of events from each file to process. It should be -1 (all) when | ||
# running for an analysis | ||
N_EVENTS_TO_PROCESS = -1 | ||
if N_EVENTS_TO_PROCESS != -1: | ||
print "NOT RUNNING ON ALL EVENTS IN THE FILE!" | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(N_EVENTS_TO_PROCESS) | ||
) | ||
|
||
# Input file | ||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring('file:/local/cms/phedex/store/mc/Summer12_DR53X/DYToEE_M-20_CT10_TuneZ2star_8TeV-powheg-pythia6/AODSIM/PU_S10_START53_V7A-v1/0000/AC6646E7-36F0-E111-B2F8-00259073E3FC.root') | ||
) | ||
|
||
# Output file | ||
process.TFileService = cms.Service("TFileService", | ||
fileName = cms.string("test_extended_mc.root") | ||
) | ||
|
||
# Import rho value for isolation correction | ||
from ZFinder.Event.kt6_pfjets_cfi import kt6PFJetsForIsolation | ||
process.kt6PFJetsForIsolation = kt6PFJetsForIsolation.clone() | ||
|
||
# Particle flow isolation | ||
from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso | ||
process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') | ||
process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) | ||
|
||
# ZFinder | ||
from ZFinder.Event.zdefinitions_cfi import zdefs_extended_mc | ||
from ZFinder.Event.zfinder_cfi import ZFinder | ||
process.ZFinder = ZFinder.clone( | ||
ZDefinitions = zdefs_extended_mc, | ||
is_mc = cms.bool(True), | ||
) | ||
|
||
# RUN | ||
process.p = cms.Path( | ||
process.kt6PFJetsForIsolation | ||
* process.pfiso | ||
* process.ZFinder | ||
) |