Simple example on how to access CMS' NanoAOD files and read some information from it.
Note: Assuming (1) CMSSW environment is available, (2) the user have GRID certificate (3) registered to CMS' VO.
More info:
- https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookStartingGrid
- https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideLcgAccess
wget https://github.com/ftorresd/pyroot_example_nanoaod/archive/refs/heads/main.zip
unzip main.zip
cd pyroot_example_nanoaod-main
or
git clone https://github.com/ftorresd/pyroot_example_nanoaod.git
or
git clone [email protected]:ftorresd/pyroot_example_nanoaod.git
Only once per session.
source setup_env.sh
python analyser.py
Histograms will be saved at output_file.root
.