Skip to content

Commit

Permalink
updating 106x_v1 recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
alefisico committed Jul 13, 2020
2 parents 292f539 + a6379cd commit 3d6f73b
Show file tree
Hide file tree
Showing 26 changed files with 812 additions and 279 deletions.
4 changes: 4 additions & 0 deletions BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<use name="DataFormats/Common"/>
<use name="DataFormats/StdDictionaries"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/PatCandidates"/>
<use name="CommonTools/Utils"/>
<use name="CommonTools/UtilAlgos"/>
<use name="CommonTools/CandAlgos"/>
<use name="DataFormats/NanoAOD"/>
<use name="boost"/>
<export>
Expand Down
52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,67 @@
# NanoAODJMAR

This is a [NanoAOD](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookNanoAOD) framework for advance developments of jet algorithms.
The current content of this branch can be seen [here](http://algomez.web.cern.ch/algomez/testWeb/JMARNanoAODv6_106X_v00_size.html).
This format can be used with [fastjet](http://fastjet.fr) directly.
The current content of this branch can be seen [here](http://algomez.web.cern.ch/algomez/testWeb/PFnanoplusBtag_content_106x_v01.html) and the size [here](http://algomez.web.cern.ch/algomez/testWeb/PFnanoplusBtag_size_106x_v01.html).

## Recipe


For **UL** 2016, 2017 and 2018 data and MC **NanoAODv6** according to the [XPOG recommendations](https://gitlab.cern.ch/cms-nanoAOD/nanoaod-doc/-/wikis/Releases/NanoAODv6):
For **UL** 2016, 2017 and 2018 data and MC **NanoAODv6** according to the [XPOG](https://gitlab.cern.ch/cms-nanoAOD/nanoaod-doc/-/wikis/Releases/NanoAODv6) and [PPD](https://twiki.cern.ch/twiki/bin/view/CMS/PdmVLegacy2017Analysis) recommendations:

```
cmsrel CMSSW_10_6_5
cd CMSSW_10_6_5/src
cmsrel CMSSW_10_6_14
cd CMSSW_10_6_14/src
cmsenv
git clone [email protected]:cms-jet/NanoAODJMAR.git -b dev_106x PhysicsTools/NanoAODJMAR
git cms-addpkg PhysicsTools/NanoAOD
git clone https://github.com/cms-jet/NanoAODJMAR.git PhysicsTools/NanoAODJMAR -b 106x_v01
scram b -j 10
cd PhysicsTools/NanoAODJMAR/test
```
Note: This configuration has been tested for this combination of CMSSW release, global tag, era and dataset. When running over a new dataset you should check with [the nanoAOD workbook twiki](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookNanoAOD#Running_on_various_datasets_from) to see if the era modifiers in the CRAB configuration files are correct. The jet correction versions are taken from the global tag.

## Local Usage:

2017 MC:
UL2017 MC:
```
cmsRun nano106X_on_mini106X_2017_mc_NANO.py
```

2017 DATA:
UL2017 DATA:
```
cmsRun nano106X_on_mini106X_2017_data_NANO.py
```

<!--
## Submission to CRAB

```
python submit_all.py -c nano102x_on_mini94x_2016_mc_NANO.py -f 2016mc_miniAODv3_DY.txt -d NANO2016MC
python submit_all.py -c nano102x_on_mini94x_2017_mc_NANO.py -f 2017mc_miniAODv2_DY.txt -d NANO2017MC
python submit_all.py -c nano102x_on_mini102x_2018_mc_NANO.py -f 2018mc_DY.txt -d NANO2018MC
The `submit_all.py` script submit several crab jobs depending on the python config (specify with `-c`). A list of datasets can be included in a txt file after option `-f`, your T2/T3 site should be specify with `-s` and `-d` will create a folder for the crab jobs. For data, `-l` is for the JSON file. For example:

* For MC:
```
python submit_all.py -c nano106X_on_mini106X_2017_mc_NANO.py -f datasets/MC_UL2017.txt -d NANOUL2017MC -s T3_US_FNALLPC
```

python submit_all.py -c nano102x_on_mini94x_2016_data_NANO.py -f 2016data_17Jul2018.txt -d NANO2016 -l Cert_271036-284044_13TeV_23Sep2016ReReco_Collisions16_JSON.txt
python submit_all.py -c nano102x_on_mini94x_2017_data_NANO.py -f 2017data_31Mar2018.txt -d NANO2017 -l Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt
* For Data:
```
python submit_all.py -c nano106X_on_mini106X_2017_data_NANO.py -f datasets/SingleMuon_UL2017.txt -d NANOUL2017 -s T3_US_FNALLPC -l /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions17/13TeV/Legacy_2017/Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt
```

## Documenting the Extended NanoAOD Samples

Please document the input and output datasets on the following [google spreadsheet](https://docs.google.com/spreadsheets/d/1puQgU7gn7qeU2SfL_EUkKTG1X_EZ3SbVjiGC-QlkJCI/edit#gid=0). For the MC, the number of events can be found by looking up the output dataset in DAS, or with the `report` option of crab. For the data, you will need to run brilcalc to get the total luminosity of the dataset. See the instructions below.

python submit_all.py -c nano102x_on_mini102x_2018_data_abc_NANO.py -f 2018data_17Sep2018.txt -d NANO2018 -l Cert_314472-325175_13TeV_PromptReco_Collisions18_JSON.txt
## How to create python files using cmsDriver

python submit_all.py -c nano102x_on_mini102x_2018_data_d_NANO.py -f datasets_2018D.txt -d NANO2018 -l Cert_314472-325175_13TeV_PromptReco_Collisions18_JSON.txt
All the previous python config files were produced with `cmsDriver.py`. Two imporant parameters that one needs to verify in the central nanoAOD documentation are `--conditions` and `--era`. Then, an example of how to create those file, if needed, is shown below:

```
cmsDriver.py nano106X_on_mini106X_2017_mc -s NANO --mc --eventcontent NANOAODSIM --datatier NANOAODSIM --conditions 106X_mc2017_realistic_v6 --era Run2_2017 --customise_commands="process.add_(cms.Service('InitRootHandlers', EnableIMT = cms.untracked.bool(False)))" --nThreads 8 --customise PhysicsTools/NanoAODJMAR/nano_jmar_cff.JMARnano_customizeMC -n 100 --filein /store/mc/RunIISummer19UL17MiniAOD/QCD_Pt-15to7000_TuneCP5_Flat_13TeV_pythia8/MINIAODSIM/106X_mc2017_realistic_v6_ext2-v2/40000/DC8FEA2E-191B-834F-96C3-53FCF0291ADB.root
```

## Documenting the Extended NanoAOD Samples
## How to create website with nanoAOD content

Please document the input and output datasets on the following twiki: https://twiki.cern.ch/twiki/bin/view/CMS/JetMET/JMARNanoAODv1. For the MC, the number of events can be found by looking up the output dataset in DAS. For the data, you will need to run brilcalc to get the total luminosity of the dataset. See the instructions below.
To create nice websites like [this one](http://algomez.web.cern.ch/algomez/testWeb/JMECustomNano102x_mc_v01.html#Jet) with the content of nanoAOD, use the `inspectNanoFile.py` file from the `PhysicsTools/nanoAOD` package as:
```
python PhysicsTools/NanoAOD/test/inspectNanoFile.py NANOAOD.root -s website_with_collectionsize.html -d website_with_collectiondescription.html
```

## Running brilcalc
These are condensed instructions from the lumi POG TWiki (https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM). Also see the brilcalc quickstart guide: https://twiki.cern.ch/twiki/bin/viewauth/CMS/BrilcalcQuickStart.
Expand Down Expand Up @@ -88,4 +93,3 @@ The luminosity of interest will be listed under "totrecorded(/fb)." You can also

Note: '-b "STABLE BEAMS"' is optional if you've already run over the golden json.
Using the normtag is NOT OPTIONAL, as it defines the final calibrations and detectors that are used for a given run.
-->
3 changes: 2 additions & 1 deletion plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<use name="DataFormats/VertexReco"/>
<use name="DataFormats/NanoAOD"/>
<use name="CommonTools/Utils"/>
<use name="CommonTools/UtilAlgos"/>
<use name="CommonTools/CandAlgos"/>
<use name="RecoBTag/FeatureTools"/>
<use name="RecoJets/JetAlgorithms"/>
<use name="PhysicsTools/Pancakes"/>
<use name="TrackingTools/Records"/>
<use name="roottmva"/>
<use name="fastjet"/>
Expand Down
Loading

0 comments on commit 3d6f73b

Please sign in to comment.