Skip to content

Commit 1c6c0c4

Browse files
committed
Merge branch 'master' of github.com:tamshai/cms-opendata-2011-jets
Conflicts: README.md
2 parents 4e20631 + ee9435e commit 1c6c0c4

File tree

4 files changed

+98
-45
lines changed

4 files changed

+98
-45
lines changed

AnalysisFW/python/OpenDataTreeProducer_dataPAT_2011_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# True : when running in OpenData virtual machine
1515
# False: when runing in lxplus
16-
runOnVM = False
16+
runOnVM = True
1717

1818
# Index of data files
1919
files2011data = FileUtils.loadListFromFile('CMS_Run2011A_Jet_AOD_12Oct2013-v1_20000_file_index.txt')

AnalysisFW/python/OpenDataTreeProducer_mcPAT_2011_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# True : when running in OpenData virtual machine
1515
# False: when runing in lxplus
16-
runOnVM = False
16+
runOnVM = True
1717

1818
# Local input
1919
fileList = FileUtils.loadListFromFile('CMS_MonteCarlo2011_Summer11LegDR_QCD_Pt-80to120_TuneZ2_7TeV_pythia6_AODSIM_PU_S13_START53_LV6-v1_00000_file_index.txt')

AnalysisFW/python/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Setup
2+
3+
With `cms-opendata-2011-jets/AnalysisFW/python/` as the current folder, run the following commands:
4+
5+
1. Download index files :
6+
7+
```
8+
wget http://opendata.cern.ch/record/21/files/CMS_Run2011A_Jet_AOD_12Oct2013-v1_20000_file_index.txt
9+
wget http://opendata.cern.ch/record/1562/files/CMS_MonteCarlo2011_Summer11LegDR_QCD_Pt-80to120_TuneZ2_7TeV_pythia6_AODSIM_PU_S13_START53_LV6-v1_00000_file_index.txt
10+
```
11+
12+
2. Download JSON of good runs:
13+
14+
```
15+
wget http://opendata.cern.ch/record/1001/files/Cert_160404-180252_7TeV_ReRecoNov08_Collisions11_JSON.txt
16+
```
17+
18+
3. Make link to the condition databases:
19+
20+
```
21+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA FT_53_LV5_AN1
22+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA.db FT_53_LV5_AN1_RUNA.db
23+
24+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1 START53_LV6A1
25+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1.db START53_LV6A1.db
26+
```
27+
28+
4. Run the configuration files:
29+
30+
```
31+
cmsRun OpenDataTreeProducer_dataPAT_2011_cfg.py
32+
cmsRun OpenDataTreeProducer_mcPAT_2011_cfg.py
33+
```
34+
35+
5. Open the tuples in ROOT:
36+
37+
```
38+
root OpenDataTree_*
39+
```

README.md

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
## Description
23
CMSSW module producing flat tuples from 2011A Jet data.
34

@@ -14,62 +15,75 @@ Create project directories:
1415
1516
```
1617

17-
## Troubleshooting
18-
19-
### Missing condition database symlinks
18+
=======
19+
# CMS Jet Tuple production 2011
2020

21-
```
22-
----- Begin Fatal Exception 15-Jul-2016 13:49:27 CEST-----------------------
23-
An exception of category 'StdException' occurred while
24-
[0] Constructing the EventProcessor
25-
[1] Constructing ESSource: class=PoolDBESSource label='GlobalTag'
26-
Exception Message:
27-
A std::exception was thrown.
28-
Connection on "sqlite_file:./FT_53_LV5_AN1/AlCaRecoHLTpaths8e29_1e31_v13_offline.db" cannot be established ( CORAL : "ConnectionPool::getSessionFromNewConnection" from "CORAL/Services/ConnectionService" )
29-
----- End Fatal Exception -------------------------------------------------
30-
```
21+
This project is a CMSSW module producing flat tuples from 2011A Jet data.
3122

32-
Data:
33-
34-
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA FT_53_LV5_AN1
35-
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA.db FT_53_LV5_AN1_RUNA.db
36-
37-
Monte Carlo:
38-
39-
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1 START53_LV6A1
40-
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1.db START53_LV6A1.db
23+
Source code was originally forked from the SMPJ Analysis Framework:
24+
https://twiki.cern.ch/twiki/bin/viewauth/CMS/SMPJAnalysisFW
25+
https://github.com/cms-smpj/SMPJ/tree/v1.0/
4126

27+
The instruction assume that you will work on a VM properly contextualized for CMS, available from http://opendata.cern.ch/VM/CMS.
4228

43-
### Missing Global tag
29+
## Creating the working area
4430

31+
This step is only needed the first time you run this program:
4532
```
46-
----- Begin Fatal Exception 15-Jul-2016 14:29:18 CEST-----------------------
47-
An exception of category 'Incomplete configuration' occurred while
48-
[0] Constructing the EventProcessor
49-
[1] Constructing ESSource: class=PoolDBESSource label='GlobalTag'
50-
Exception Message:
51-
Valid site-local-config not found at /cvmfs/cms.cern.ch/SITECONF/local/JobConfig/site-local-config.xml
52-
----- End Fatal Exception -------------------------------------------------
53-
```
33+
mkdir WorkingArea
34+
cd ./WorkingArea
35+
cmsrel CMSSW_5_3_32
36+
cd ./CMSSW_5_3_32/src
37+
cmsenv
38+
git cms-addpkg PhysicsTools/PatAlgos
39+
git clone https://github.com/tamshai/cms-opendata-2011-jets/
40+
cp cms-opendata-2011-jets/jetProducer_cfi.py PhysicsTools/PatAlgos/python/producersLayer1/
41+
scram b
42+
cd cms-opendata-2011-jets/AnalysisFW/python/
5443
55-
Add to the Python configuration:
44+
```
5645

57-
Data:
46+
## Setting up additional files
5847

59-
process.GlobalTag.connect = cms.string('sqlite_file:/cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA.db')
60-
process.GlobalTag.globaltag = 'FT_53_LV5_AN1::All'
48+
With `cms-opendata-2011-jets/AnalysisFW/python/` as the current folder, run the following commands:
6149

62-
Monte Carlo:
50+
1. Download index files :
51+
52+
```
53+
wget http://opendata.cern.ch/record/21/files/CMS_Run2011A_Jet_AOD_12Oct2013-v1_20000_file_index.txt
54+
wget http://opendata.cern.ch/record/1562/files/CMS_MonteCarlo2011_Summer11LegDR_QCD_Pt-80to120_TuneZ2_7TeV_pythia6_AODSIM_PU_S13_START53_LV6-v1_00000_file_index.txt
55+
```
56+
57+
2. Download JSON of good runs:
6358
64-
process.GlobalTag.connect = cms.string('sqlite_file:/cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1.db')
65-
process.GlobalTag.globaltag = cms.string('START53_LV6A1::All')
59+
```
60+
wget http://opendata.cern.ch/record/1001/files/Cert_160404-180252_7TeV_ReRecoNov08_Collisions11_JSON.txt
61+
```
62+
63+
3. Make link to the condition databases:
6664
65+
```
66+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA FT_53_LV5_AN1
67+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/FT_53_LV5_AN1_RUNA.db FT_53_LV5_AN1_RUNA.db
68+
69+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1 START53_LV6A1
70+
ln -sf /cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1.db START53_LV6A1.db
71+
```
72+
73+
## Run the program:
74+
To create tuples from data run the following command:
6775
68-
### Missing environment
76+
cmsRun OpenDataTreeProducer_dataPAT_2011_cfg.py
77+
78+
This command creates tuples from Monte Carlo simulations:
6979
70-
bash: cmsRun: command not found
80+
cmsRun OpenDataTreeProducer_mcPAT_2011_cfg.py
81+
82+
After running the code, you can browse the tuples by opening the produced files in ROOT:
7183
72-
Setup the environment by running:
73-
74-
cmsenv
84+
root OpenDataTree_*
85+
86+
Finally, run this command in the ROOT command prompt:
7587
88+
TBrowser t
89+

0 commit comments

Comments
 (0)