Skip to content

Commit

Permalink
differences for PR #6
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 24, 2024
1 parent f981063 commit d510841
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions 02-nanoaod-miniaod.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ Can you find the basic variables such as `charge`, `eta` and `pt` for electrons?

:::::::::::::: solution

For NanoAOD, see for example the [SingleElectron dataset](https://opendata.cern.ch/eos/opendata/cms/dataset-semantics/NanoAOD/30529/SingleElectron_doc.html).
For NanoAOD, see for example the [SingleElectron dataset](https://opendata.cern.ch/eos/opendata/cms/dataset-semantics/NanoAOD/30529/SingleElectron_doc.html). You will find `Electron_charge`, `Electron_eta` and `Electron_pt` in the listing.

For MiniAOD, read the general description in the [WorkBook](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMiniAOD2016#High_level_physics_objects) and open the reference page for [`pat::Electron`](https://cmsdoxygen.web.cern.ch/cmsdoxygen/CMSSW_10_6_25/doc/html/d2/d1f/classpat_1_1Electron.html).

For MiniAOD, we will not find `eta` or `pt` explicitly in the class description as they can be obtained through the `LorentzVector` object. This is transparent in the code when accessing those values, but much less so in the documentation!
For MiniAOD, we will not find `charge`, `eta` or `pt` explicitly in the class description as they were functions inherited from `reco::LeafCandidate`. This is transparent in the code when accessing those values, but much less so in the documentation! You can expand the list of functions inherited for each parent class in the reference manual page:

![](fig/patElectronClassInherited.png){alt='pat Electron class in the reference manual'}

::::::::::::::

Expand All @@ -72,15 +74,15 @@ Find information about the calorimeter cluster and the track connected to an ele

In MiniAOD, access to the track information is provided through a member function `gsfTrack`.

The full track information is not available in NanoAOD, but the most pertinent information from its associated track is its impact parameter with respect to the primary interaction vertex. This information is available in NanoAOD, read more about it in the [pre-learning material](https://cms-opendata-workshop.github.io/workshop2024-lesson-physics-objects/instructor/02-electrons.html#electron-4-vector-and-track-information).
The full track information is not available in NanoAOD, but it contains, for example, the most pertinent information from its associated track: its impact parameter with respect to the primary interaction vertex. This information is available in NanoAOD variable , read more about it in the [pre-learning material](https://cms-opendata-workshop.github.io/workshop2024-lesson-physics-objects/instructor/02-electrons.html#electron-4-vector-and-track-information).

::::::::::::::

::::::::::::::::::::

## NanoAOD with Particle Flow candidates

Many CMS open data users have relied on the [Particle Flow information](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMiniAOD2016#Packed_ParticleFlow_Candidates), available in the AOD and MiniAOD formats but not in the NanoAOD format. See the class description: [`pat::PackeedCandidate`](https://cmsdoxygen.web.cern.ch/cmsdoxygen/CMSSW_10_6_25/doc/html/d8/d79/classpat_1_1PackedCandidate.html).
Many CMS open data users have relied on the [Particle Flow information](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMiniAOD2016#Packed_ParticleFlow_Candidates), available in the AOD and MiniAOD formats but not in the NanoAOD format. See the class description: [`pat::PackedCandidate`](https://cmsdoxygen.web.cern.ch/cmsdoxygen/CMSSW_10_6_25/doc/html/d8/d79/classpat_1_1PackedCandidate.html).

For the 2016 collision data, a selection of datasets has been processed in NanoAOD format enhanced with Particle Flow information. These datasets can be used in the same way as the usual NanoAOD datasets, they just contain more information.

Expand Down Expand Up @@ -249,12 +251,14 @@ unsigned int "bunchSpacingProducer" ""

::::::::::::::::::::::::

You would follow the [instructions](https://opendata.cern.ch/docs/cms-getting-started-miniaod#data) to build a CMSSW analyzer module of your own to select the events and physics object of interest, compile the code and run the analysis in the container. The CMSSW output files are in the ROOT format and you could use the Python tools or the Root container to analyze them further.
You would follow the [instructions](https://opendata.cern.ch/docs/cms-getting-started-miniaod#data) to build a CMSSW analyzer module of your own to select the events and physics object of interest, compile the code and run the analysis in the container. The CMSSW output files are in the Root format and you could use the Python tools or the Root container to analyze them further.

The [previous workshops](https://cms-opendata-guide.web.cern.ch/cmsOpenData/workshops/) have extensive learning material for using CMSSW with MiniAOD (or AOD) data formats. Feel free to explore them!

::::::::::::::::::::::::::::::::::::: keypoints

- Analyses that require detailed information about physics object constituents may require using MiniAOD instead of NanoAOD
- Selected datasets include Particle flow candidates in an enriched NanoAOD format are available and their use does not require using CMS-specific software
- Selected datasets include Particle Flow candidates in an enriched NanoAOD format are available and their use does not require using CMS-specific software
- CMSSW environment is available as a Docker container and can be used to work with MiniAOD


Expand Down
Binary file added fig/patElectronClassInherited.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"index.md" "a02c9c785ed98ddd84fe3d34ddb12fcd" "site/built/index.md" "2024-06-19"
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2024-06-19"
"episodes/01-introduction.md" "071ce7b92b927ab433dce73a8449fd9a" "site/built/01-introduction.md" "2024-07-23"
"episodes/02-nanoaod-miniaod.md" "19f80ef488f8bbb48b2619f4ef84ad15" "site/built/02-nanoaod-miniaod.md" "2024-07-24"
"episodes/02-nanoaod-miniaod.md" "3cd5bd403f3181a50eac0fef747d2bc8" "site/built/02-nanoaod-miniaod.md" "2024-07-24"
"episodes/03-nanoaod-dataset.md" "286712650ebb187b2c69f5aa00492a37" "site/built/03-nanoaod-dataset.md" "2024-07-23"
"episodes/04-nanoaod-exercises.md" "2bc567228a634cb85f32cf1838941cb3" "site/built/04-nanoaod-exercises.md" "2024-07-23"
"instructors/instructor-notes.md" "cae72b6712578d74a49fea7513099f8c" "site/built/instructor-notes.md" "2024-06-19"
Expand Down

0 comments on commit d510841

Please sign in to comment.