Skip to content

Commit 54d48ce

Browse files
committed
Re-writing README
1 parent f16e77d commit 54d48ce

File tree

1 file changed

+42
-117
lines changed

1 file changed

+42
-117
lines changed

README.md

Lines changed: 42 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,57 @@
1-
----------------------------
2-
# 2010-commissioning-dimuon|
3-
- -------------------------------------------------
4-
Validation code for 2010 Commissioning dataset, based on dimuon mass spectrum|
5-
------------------------------------------------------------------------------
6-
7-
How to install and run the validation benchmark of the Commissioning data set?
8-
This code for validation and benchmarking of the Commissioning data set, based on
9-
the dimuon mass spectrum, does NOT apply JSON preselection. It therefore includes
10-
benchmarking of non-JSON selected runs.
11-
It is set up at Research level what means, that it requires university student
12-
level programming experience. Minimal acquaintance with Linux, the ROOT analysis
13-
peckage (http://root.cern.ch/) and basic text editor is assumed in the following.
14-
15-
16-
----------------------------------------------
17-
1.) HOW TO INSTALL a CERN VIRTUAL MACHINE(VM)|
18-
----------------------------------------------
19-
NOTES: (it is better to read them before you start)
20-
-----
21-
NOTE_1:You will need administrative("root") privileges on every platform to
22-
perform the installation of VirtualBox.
23-
NOTE_2:The latest tested version of VirtualBox working with CMS-CERN VM
24-
image is 4.3.14. If you have troubles with the latest version of VirtualBox,
25-
pick that one. The full history of VirtualBox version is available on different
26-
page: (https://www.virtualbox.org/wiki/Downloads).
27-
NOTE_3:Before you download the CERN VM, note that the imported settings may
28-
not always work on your host machine. Please see Issues and Limitations on this
29-
page: (http://opendata.cern.ch/VM/CMS/2010#issues) if you encounter any problems
30-
with booting the CERN VM.
31-
32-
STEPS:
33-
-----
34-
You need to work in the CERN VM properly contextualized for CMS, this VM is
35-
available on the CERN Open Data Portal (http://opendata.cern.ch/record/250).
36-
Download the CMS CERN VM image as (.ova) file.
37-
For CERN VM you need to have VirtualBox. In case that you do not have it, you
38-
can download it from the Downloads page (https://www.virtualbox.org/wiki/Downloads).
39-
When VirtualBox is installed saccessfully you can go on. By double clicking the
40-
downloaded file, VirtualBox imports the image with ready to run settings. In case
41-
of any problem with booting with these default settings, see ISSUES AND LIMITATIONS:
42-
(http://opendata.cern.ch/VM/CMS/2010#issues). Then, you launch the CMS CERN VM, which
43-
boots into the graphical user interface and sets up the CMS enviroment.
44-
45-
46-
-------------------------------------------------------
47-
2.) SET UP THE CMS ENVIRONMENT AND RUN A DEMO ANALYZER|
48-
-------------------------------------------------------
49-
a.) Open a terminal with the X terminal emulator(an icon bottom-left of the VM screen)
50-
and ecexute the following command: cmsrel CMSSW_4_2_8
51-
this command builds the local release are for CMSSW, and only needs to be run once.
52-
b.) Then, change directory to the CMSSW_4_2_8/src/ with command: cd CMSSW_4_2_8/src/
53-
c.) Then, run the following command to create the CMS runtime variable: cmsenv
54-
d.) Create a working directory for the demo analyzer: mkdir Demo
55-
e.) Then, change directory: cd Demo
56-
f.) Create a "skeleton" for the analyzer: mkedanlzr DemoAnalyzer
57-
g.) Change directory: cd DemoAnalyzer
58-
h.) Compile: scram b
59-
i.) For testing, change the file name in the configuration file (demoanalyzer_cfg.py)
60-
in DemoAnalyzer directory:i.e. replace (file:myfile.root) with following file,
61-
(root://eospublic.cern.ch//eos/opendata/cms/Run2010B/Mu/AOD/Apr21ReReco-v1/0000/00459D48-EB70-E011-AF09-90E6BA19A252.root)
62-
and also change the max number of evetns to 10:i.e. change -1 to 10 in
63-
(process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1)).
64-
This point (i) is not necessary, just to be sure.
65-
j.) Then, move two directories back using: cd ../..
66-
k.) And then run: cmsRun Demo/DemoAnalyzer/demoanalyzer_cfg.py
67-
Your output should end with: System 3 3
68-
If everything works you can go on.
69-
70-
--------------------------
71-
3.) COMMISSIONING DIMUON|
72-
--------------------------
73-
In DemoAnalyzer directory, create datasets directory using this command: mkdir datasets
74-
75-
In the downloaded 2010-commissioning-dimuon repository from github are also index files with names:
1+
# 2010-commissioning-dimuon
2+
3+
Validation code for 2010 Commissioning dataset, based on dimuon mass spectrum
4+
5+
You need to work in a Virtual Machine properly contextualized for CMS.
6+
7+
In order to run the demoanalyzer_cfg.py to create the Commissioning ROOT files,
8+
you need to create a working area and set up a proper CMS environment.
9+
10+
## Creating the Working Area
11+
12+
This step is only needed the first time.
13+
...
14+
cmsrel CMSSW_4_2_8
15+
...
16+
17+
## Cloning and copying the 2010-commissioning-dimuon repository from Github
18+
...
19+
git clone https://github.com/cms-opendata-validation/2010-commissioning-dimuon
20+
cp -R 2010-commissioning-dimuon/Demo CMSSW_4_2_8/src
21+
...
22+
23+
## Setting up the CMS environment
24+
...
25+
cd CMSSW_4_2_8/src/Demo/DemoAnalyzer
26+
cmsenv
27+
...
28+
29+
## Compiling and Running
30+
...
31+
scram b
32+
cmsRun demoanalyzer_cfg.py
33+
...
34+
35+
After analysis, Commissioning00val.root file should be created.
36+
Then, is necessary to change input and also output files in demoanalyzer_cfg.py, to save these changes and to rerun program.
37+
In the repository from github are index files with names:
7638
CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0000_file_index.txt
7739
CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0002_file_index.txt
7840
CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0003_file_index.txt
7941
CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0004_file_index.txt
80-
Store these four files in Demo/DemoAnalyzer/datasets
8142

82-
In this repository are also these files:
83-
demoanalyzer_cfg.py
84-
DemoAnalyzer.cc
85-
BuildFile.xml
86-
In DemoAnalyzer directory are files with the same names. DemoAnalyzer.cc is in /DemoAnalyzer/src/DemoAnalyzer.cc directory.
87-
Replace these three files from DemoAnalyzer directory by the ones from github repository.
88-
For opening BuildFile.xml file is better to use terminal with command: vim BuildFile.xml
89-
When you open it with double clicking with mouse, this problem appers: (XML Parsing Error:syntax error)
90-
and you will not be able to read text in this file. The way how to solve this problem is not complicated.
91-
Just press (ctrl+u) when you are on this page. After that, a new window will be opened with text that you need.
92-
93-
When you replace files, it is necessary to recompile. In you terminal you should be in DemoAnalyze directory,
94-
if not go there. Execute command: scram b
95-
Than, move two directories back with command: cd ../..
96-
Rerun with command: cmsRun Demo/DemoAnalyzer/demoanalyzer_cfg.py
9743

98-
You should get an output file Commissioning00.root which contains histograms for all the
99-
files/events in the CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0000_file_index.txt index file.
100-
These can be looked at using a ROOT Browser. Just type in terminal command: root
101-
Then, type in this same window: new TBrowser
102-
A new window appears. In this window you can find your created root file.
103-
When you want to leave from ROOT, just type command: .q
104-
105-
This is the validation of a Commissioning sample, not dedicated to muon final states,
106-
so the number of events entering the mass plot is relatively small. To run over the full
107-
statistics, edit the relevant parts of the Python file demoanalyzer_cfg.py .
108-
These relevant parts of this code are located in section where we define the input data
109-
and where we define output file.
110-
This part where we define input data starts with this:
111-
# ****************************************************************************
112-
# define the input data set here by inserting the appropriate .txt file list *
113-
# ****************************************************************************
114-
There you must find the line where you define the file what will be loaded. This line seems like this:
115-
files2010data = FileUtils.loadListFromFile ('/home/cms-opendata/CMSSW_4_2_8/src/Demo/DemoAnalyzer/datasets/CMS_Run2010B_Commissioning_AOD_Apr21ReReco-v1_0000_file_index.txt')
116-
There you just replace part 0000 by 0002 .
117-
Similar thigs you must do with output file. At the end of this file is a part for this.
118-
Just replace Commissioning00val.root by Commissioning02val.root and save these changes.
119-
After that, just rerun. Do this for all index file. When you do this you should have four root files with names:
44+
When you rerun for all four index files you should have four root files with names:
12045
Commissioning00val.root
12146
Commissioning02val.root
12247
Commissioning03val.root
12348
Commissioning04val.root
12449

12550
The last thing what you should do is to merge these four root files into one root file.
126-
You do this as follow. In the downloaded repository is also file with name mergeCommissioning.C .
127-
Copy this file into the directory where these four root files are located. Then, press command: root
128-
for entering into ROOT programme. In this programe just type command: .x mergeCommissioning.C .
51+
You do this as follow. In the downloaded repository is also file with name mergeCommissioning.C
52+
Press command for opening ROOT program: root
53+
In this programe just type command: .x mergeCommissioning.C
12954
This merging create a root file called CommissioningAllval.root.
13055

131-
Look at this output with command: new TBrowser
56+
To look at this output, write down command: new TBrowser
13257
and navigate to relevant file.

0 commit comments

Comments
 (0)