Histograms

For basic vars for 10000 events of GluGlu_MC. HistDump.pdf

Config itself

## import skeleton process
from PhysicsTools.PatAlgos.patTemplate_cfg import *
# load the PAT config
process.load("PhysicsTools.PatAlgos.patSequences_cff")

############ General options ####################
process.options.wantSummary = True
process.maxEvents.input = 10000
process.MessageLogger.cerr.FwkReport.reportEvery = 100
runOnMC = True

##################################################
########### Global Tag ###########################
##################################################
process.GlobalTag.globaltag = 'START53_V7F::All'

#For 53x Data and MC, the default Jet Probability Calibration from the
#GlobalTag is not optimal and needs to be replaced in the following way,
#when using CRAB: 
process.GlobalTag.toGet = cms.VPSet(
  cms.PSet(record = cms.string("BTagTrackProbability2DRcd"),
              tag = cms.string("TrackProbabilityCalibration_2D_MC53X_v2"),
          connect = cms.untracked.string("frontier://FrontierPrep/CMS_COND_BTAU")),
  cms.PSet(record = cms.string("BTagTrackProbability3DRcd"),
              tag = cms.string("TrackProbabilityCalibration_3D_MC53X_v2"),
          connect = cms.untracked.string("frontier://FrontierPrep/CMS_COND_BTAU"))
)

##################################################
########### Input files ##########################
##################################################

process.source.fileNames = [
    '/store/mc/Summer12/GluGluToHToZZTo2L2Q_M-125_8TeV-powheg-pythia6/AODSIM/PU_S7_START52_V9-v1/0000/705180E0-DDEE-E111-AF81-90E6BA19A225.root'
]


########################################################
############### PF2PAT Setup ###########################
########################################################

if runOnMC: jetCorrections=['L1FastJet','L2Relative','L3Absolute']
else:       jetCorrections=['L1FastJet','L2Relative','L3Absolute','L2L3Residual']

from PhysicsTools.PatAlgos.tools.pfTools import *

postfix = "AK5PF"
jetAlgo = "AK5"
usePF2PAT(process,runPF2PAT=True, jetAlgo=jetAlgo, runOnMC=True, postfix=postfix)

# top projections in PF2PAT:
getattr(process,"pfNoPileUp"  + postfix).enable = True
getattr(process,"pfNoMuon"    + postfix).enable = True 
getattr(process,"pfNoElectron"+ postfix).enable = True 
getattr(process,"pfNoTau"     + postfix).enable = True 
getattr(process,"pfNoJet"     + postfix).enable = True

# removing default cuts on muons     
getattr(process,"pfMuonsFromVertex"+postfix).dzCut = 99     
getattr(process,"pfMuonsFromVertex"+postfix).d0Cut = 99     
getattr(process,"pfSelectedMuons"  +postfix).cut="pt()>3"     
getattr(process,"pfIsolatedMuons"  +postfix).isolationCut = 999999     

# removing default cuts on electrons     
getattr(process,"pfElectronsFromVertex"+postfix).dzCut = 99     
getattr(process,"pfElectronsFromVertex"+postfix).d0Cut = 99     
getattr(process,"pfSelectedElectrons"  +postfix).cut="pt()>3"     
getattr(process,"pfIsolatedElectrons"  +postfix).isolationCut = 999999     

# make sure about patJets input
switchToPFJets(process, input=cms.InputTag('pfJets'+postfix), algo=jetAlgo, postfix = postfix, jetCorrections=('AK5PF', jetCorrections))

# Kinematic selection 
process.selectedPatMuons.cut     = cms.string( "pt > 3. && abs(eta) < 2.4")
process.selectedPatElectrons.cut = cms.string( "pt > 3. && abs(eta) < 2.5")
process.selectedPatJetsAK5PF.cut = cms.string( "pt > 3.")

# Let it run
process.p = cms.Path(getattr(process,"patPF2PATSequence"+postfix))

########################################################
##################### Output ###########################
########################################################

#http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/PhysicsTools/PatAlgos/python/patEventContent_cff.py
from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning 

process.out.outputCommands = cms.untracked.vstring(
         'drop *',
         'keep recoPFCandidates_particleFlow_*_*',
         'keep recoGenParticles_genParticles*_*_*',
         'keep GenEventInfoProduct_*_*_*',
         'keep GenRunInfoProduct_*_*_*',
         'keep edmTriggerResults_TriggerResults_*_HLT',
         *patEventContentNoCleaning 
      )


process.out.fileName = 'KostyaConfigTest.root'

-- KostyaKanishchev - 23-Oct-2012

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf HistDump.pdf r1 manage 97.6 K 2012-10-23 - 16:10 KostyaKanishchev  
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2012-10-23 - KostyaKanishchev
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback