forked from olaiya/NTupler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNtupleNotes.txt
51 lines (39 loc) · 1.7 KB
/
NtupleNotes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Ntuple code runs over miniAOD and produces ROOT ntuples
# The Ntuple code is checked into my own git repository on gitlab
#
#THIS IS ONLY FOR WHEN WORKING AT RAL. Set up environment for sh/bash etc. Ignore the next two lines at CERN or elsewhere
export VO_CMS_SW_DIR=/cvmfs/cms.cern.ch
source $VO_CMS_SW_DIR/cmsset_default.sh
#checkout release
cmsrel CMSSW_7_4_4
cd CMSSW_7_4_4/src
cmsenv
git clone https://github.com/Sam-Harper/usercode.git SHarper
cd SHarper/
git checkout 74XNtup
cd ..
#check out NTupler package
git clone ssh://[email protected]:7999/olaiya/NTupler.git
#build
scramv1 b -j 20
#change into ntuple directory
cd NTupler/PATNTupler/plugins
#If you want to run the ntuple code directly edit nTupleProduction.py to specify the file you want to run over
cmsRun nTupleProduction.py
#Alternatively if you want to run a crab production edit the crab config file crabConfig_nTupleProd.py to run over the dataset and specify the output directory on the T2 where you want the ntuple to be written. Then submit
source /cvmfs/cms.cern.ch/crab3/crab.csh
crab submit -c crabConfig_nTupleProd.py
#check the status
crab status crab_projects/crab_RAL_nTuple_production --long
Running over the Ntuples
========================
#To run over the ntuples go into the main directory where there is an example of running over the ntuples. Go into this directory and compile the code.
cd NTupler/PATNTupler/main
gmake
#The code main.cc gives examples of how you can access the variables in the ntuple.
#To run over a list of file execute the command
./run test.list
# the file test.list contains the list of root files to run over.
cat test.list
../plugins/nTuple.root
#main.cc has two examples of accessing root file.