SLHC Jet Energy Corrections

This page describes how to compute and apply the jet energy scale corrections in CMSSW_6_1_2_SLHC6_patch1.

Recipe

The JEC are computed using the reco file.

Reco file production

Here is the reco file production recipe from the HE Radiation Damage Jet Team Code:

setenv SCRAM_ARCH slc5_amd64_gcc472
cmsrel CMSSW_6_1_2_SLHC6_patch1
cd CMSSW_6_1_2_SLHC6_patch1/src
cmsenv
git cms-merge-topic HERadDamJetTeam:CMSSW_6_1_2_SLHC6_patch1_HERadDamJets
git clone git@github.com:HERadDamJetTeam/HERadDamJets
scram b -j 4

The reco file is produced with a config file like: HERadDamJets/FullSim/jets/MonoJet_DIGI-RECO_temp_split_cfg.py

When you produce a reco file, you need to keep some additional collections to be able to compute the JEC. Here are the collections you need to keep (don't forget to modify your config file to keep these collections):

# Output definition
process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule",
    splitLevel = cms.untracked.int32(0),
    eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
    #outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands,
    outputCommands = cms.untracked.vstring('drop *',
                              'keep PCaloHits_g4SimHits_EcalHitsEB_*',
                              'keep PCaloHits_g4SimHits_EcalHitsEE_*',
                              'keep PCaloHits_g4SimHits_HcalHits_*',
                              'keep EcalRecHitsSorted_ecalRecHit_*_*',
                              'keep HBHERecHitsSorted_*_*_*',
                              'keep HFRecHitsSorted_*_*_*',
                              'keep HORecHitsSorted_horeco_*_*',
                              'keep CaloTowersSorted_towerMaker_*_*',
                              'keep recoCaloJets_ak5CaloJets_*_*',
                              'keep recoGenJets_ak5GenJets_*_*',
                              'keep recoPFJets_ak5PFJets_*_*',
                              'keep recoCaloJets_*_*_*',
                              'keep *_genParticles_*_*',
                              'keep *_offlinePrimaryVertices_*_*',
                              'keep *_particleFlow_*_*'
                              ),
    fileName = cms.untracked.string('file:jet_digireco_2017_part1.root'),
    dataset = cms.untracked.PSet(
        filterName = cms.untracked.string(''),
        dataTier = cms.untracked.string('GEN-SIM-RECO')
    )
)

JEC computation

In a fresh CMSSW_6_1_2_SLHC6_patch1/src release: You need the following packages:

cvs co -r V00-09-01 JetMETAnalysis/JetUtilities
cvs co -r V01-01-01 JetMETAnalysis/JetAnalyzers
addpkg CondFormats/JetMETObjects
cp /afs/cern.ch/user/l/lacroix/public/HCAL/jet_inspect_histos_x.cc JetMETAnalysis/JetUtilities/bin
scram b -j 4

The JEC are binned in eta and pT. The binning choice is defined in the following config file:

cp /afs/cern.ch/user/l/lacroix/public/HCAL/jra_fl.config JetMETAnalysis/JetAnalyzers/config

To produce the JEC:

# in CMSSW_6_1_2_SLHC6_patch1/src:

# usual set up: (for tsch, please translate for your own shell)
setenv SCRAM_ARCH slc5_amd64_gcc472
source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh
eval `scramv1 runtime -csh`
cmsenv

cd JetMETAnalysis/JetAnalyzers/test
cp /afs/cern.ch/user/l/lacroix/public/HCAL/run_JRA_FL_cfg.py .
(you need to specify the input reco file with the right global tag in run_JRA_FL_cfg.py)
cmsRun run_JRA_FL_cfg.py

This will produce a file: JRA.root From this root file, you can create the txt files containing the L2 and L3 corrections by doing (please adjust the pt/eta range for your reco file in ../config/jra_fl.config and other jet_response_analyzer_x parameters):

jet_response_analyzer_x ../config/jra_fl.config -input JRA.root -etabarrelmin 1.7 -etabarrelmax 3.1  -etarspmin 1.7 -etarspmax 3.1
jet_response_fitter_x -input jra.root
jet_l3_correction_x -input jra_f.root -era era2017
jet_l2_correction_x -input jra_f.root -era era2017
# if you get a seg fault, it can be because you are not running on enough events

Cross-check plots can be obtained by doing:

jet_inspect_histos_x -inputs jra_f.root -algs ak5calo ak5pf

Applying the JEC

To apply the JEC stored in era2017_L2Relative_AK5PF.txt and era2017_L3Absolute_AK5PF.txt, you need to do:

addpkg JetMETCorrections/Modules

cp JetMETAnalysis/JetAnalyzers/test/era2017_L*.txt CondFormats/JetMETObjects/data
cp /afs/cern.ch/user/l/lacroix/public/HCAL/JetCorrectionDBWriter_cfg.py JetMETCorrections/Modules/test/JetCorrectionDBWriter_cfg.py

cd JetMETCorrections/Modules/test/
cmsRun JetCorrectionDBWriter_cfg.py

cp era2017.db ../../../JetMETAnalysis/JetAnalyzers/test
cd ../../../JetMETAnalysis/JetAnalyzers/test

cp /afs/cern.ch/user/l/lacroix/public/HCAL/applyJEC_cfg.py .
cmsRun applyJEC_cfg.py
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2014-03-01 - KevinPedro
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 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