Skip to content

Commit

Permalink
Merge pull request #81 from jieunyoo/master
Browse files Browse the repository at this point in the history
edits to address issue #74. syntax changed to directly access file instead of copying file to container, screenshot included
  • Loading branch information
jieunyoo authored Apr 27, 2022
2 parents 33d4138 + b70f16c commit 62f080e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
43 changes: 43 additions & 0 deletions docs/analysis/datasim/mcsimulations.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,46 @@ briefly describes the steps in the MC production chain.
The data format in use for Run1 MC data is Analysis Object Data (AODSIM). Starting from Run2, a slimmer version of this format called MINIAODSIM is used.
A brief description of data formats can be found in the
introductory [About CMS](http://opendata.cern.ch/docs/about-cms) under "*Primary and simulated datasets*".

## Cross section calculation

Cross sections can be calculated for MC samples.

Caveat: The cross-sections found with this tool are those predicted by the respective generators. There may be better estimates, coming from dedicated task forces, theory papers etc.

To account for the different running conditions in Run 1 vs Run 2, click the appropriate tab below for Run 1 vs Run 2 data.

=== "Run 1 Data"

* This page is under construction

=== "Run 2 Data"

* You can calculate a cross section using the GenXSecAnalyzer. To use it, you will need the file ana.py, which you can get by `curl https://raw.githubusercontent.com/cms-sw/genproductions/master/Utilities/calculateXSectionAndFilterEfficiency/genXsec_cfg.py -o ana.py `

* Next, fetch a CMSSW image and start a container. You can find a list of Docker container images available for CMS open data in the [guide page for CMS open data containers](http://opendata.cern.ch/docs/cms-guide-docker). A tutorial on working with docker is at [CMS open data containers](https://cms-opendata-workshop.github.io/workshop2022-lesson-docker/). If you named your container my_ord, you can fetch and start it by

``` bash

docker run --name my_od -P -p 5901:5901 -it cmsopendata/cmssw_7_6_7-slc6_amd64_gcc493 /bin/bash

cd CMSSW_7_6_7/src

cmsenv

```

* Then, copy the file ana.py to your container. You would also copy any root file/s you need to your container.

* Finally, to compute the cross-section, type `cmsRun ana.py inputFiles="file:xxxx.root" maxEvents=-1` Note that you must use the syntax "file:" before your root file name. For example, if your root file is called ttbar.root, you would type `cmsRun ana.py inputFiles="file:ttbar.root" maxEvents=-1`

* After running the above commands, you will get a log file.

* A cross-section summary will be printed out. The definition of each quantity is:

* Before matching: the cross section before jet matching and any filter
* After matching: the cross section after jet matching BUT before any filter
* Filter efficiency: the efficiency of the any filter.
* After filter: the cross section after jet matching and additional filter are applied. This is your final cross section.

* A file you can use for testing is 1A454199-F8B8-E511-A55D-7845C4FC374C.root from [Simulated dataset TGJets_TuneCUETP8M1_13TeV_amcatnlo_madspin_pythia8 in MINIAODSIM format for 2015 collision data](http://opendata.cern.ch/record/19924).
Binary file added docs/images/crossSectionLog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ nav:
- 'Tagging uncertainties': analysis/systematics/objectsuncertain/btaguncertain.md
- 'Pileup Uncertainty': analysis/systematics/pileupuncertain.md
- 'Interpretation':
- 'Statistics': analysis/interpretation/stats.md
- 'Cross Sections': analysis/interpretation/crossSections.md
- 'Statistics': analysis/interpretation/stats.md
- 'Upper-limit Calculations': analysis/interpretation/limits.md
- FAQ: faq.md
- About: about.md
Expand Down

0 comments on commit 62f080e

Please sign in to comment.