Skip to content

Commit

Permalink
Merge pull request #73 from alefisico/jetToolbox_102X
Browse files Browse the repository at this point in the history
jetToolbox with NanoAOD option
  • Loading branch information
alefisico authored Jul 18, 2019
2 parents 88aa03c + 84d61e1 commit 4cc5a6c
Show file tree
Hide file tree
Showing 7 changed files with 1,786 additions and 1,573 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ Python framework for configuration of jet tools via the jet toolbox.

## Instructions

### Notice that the parameter `miniAOD=True` has changed to `dataTier=miniAOD`

Check the branch for the correspondent release. This branch is for *CMSSW_10_2_X* and higher.
Then for example:
```
cmsrel CMSSW_10_2_9/
cd CMSSW_10_2_9/src/
cmsrel CMSSW_10_2_15/
cd CMSSW_10_2_15/src/
git cms-init
git clone [email protected]:cms-jet/JetToolbox.git JMEAnalysis/JetToolbox -b jetToolbox_102X_v1
git clone [email protected]:cms-jet/JetToolbox.git JMEAnalysis/JetToolbox -b jetToolbox_102X_v2
scram b -j 18
```

Expand All @@ -23,6 +25,25 @@ cmsRun JMEAnalysis/JetToolbox/test/ClusterWithToolboxAndMakeHistos.py
~~~
In this python file you also can see a basic example on how to use the toolbox.

## Instruction to produce modified nanoAOD with the jetToolbox (beta version)

This is a beta version on how to modify nanoAOD production to incorporate different jet collections in nanoAOD format. This will create the standard nanoAOD variables plus new variables run by the jetToolbox.

The only file that needs to be modified is [JMEAnalysis/JetToolbox/python/nanoAOD_jetToolbox_cff.py](python/nanoAOD_jetToolbox_cff.py), using the same setting as in the miniAOD case.
*The main change is the dataTier parameter, in case of nanoAOD:* `dataTier="nanoAOD"`.
After modify the `setupCustomizedJetToolbox` function in that file, one can run a cmsDriver command. For instance (for nanoAOD v5 2018):

~~~
cmsDriver.py nanoAOD_jetToolbox_cff -s NANO --mc --eventcontent NANOAODSIM --datatier NANOAODSIM --no_exec --conditions 102X_upgrade2018_realistic_v19 --era Run2_2018,run2_nanoAOD_102Xv1 --customise_commands="process.add_(cms.Service('InitRootHandlers', EnableIMT = cms.untracked.bool(False)))" --customise JMEAnalysis/JetToolbox/nanoAOD_jetToolbox_cff.nanoJTB_customizeMC --filein /store/mc/RunIIAutumn18MiniAOD/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/102X_upgrade2018_realistic_v15_ext1-v2/20000/7E65457A-87E5-C146-8321-9A48B4F56ED1.root --fileout file:jetToolbox_nano_mc.root
~~~

Notice that the `--customise` option points to the file [JMEAnalysis/JetToolbox/python/nanoAOD_jetToolbox_cff.py](python/nanoAOD_jetToolbox_cff.py).


A working example, after running the cmsDriver command shown above, is located here: [JMEAnalysis/JetToolbox/test/jetToolbox_nanoAODv05_cfg.py](test/jetToolbox_nanoAODv05_cfg.py).

All the variables created by the jetToolbox start with `selectedPatJets**`.


## More Information

Expand Down
Loading

0 comments on commit 4cc5a6c

Please sign in to comment.