The ntuples are on the LEPP lnx cluster in /cdat/tem/jmt46/flattrees/:
[jmt46@lnx201 ~] $ ls -lh /cdat/tem/jmt46/flattrees/
total 25G
drwxr-xr-x 2 jmt46 cms 4.0K Jun 17 10:11 logs
-rw-r--r-- 1 jmt46 cms 196M Jun 17 01:03 mfv_neutralino_tau0100um_M0400.root
-rw-r--r-- 1 jmt46 cms 213M Jun 17 01:04 mfv_neutralino_tau0300um_M0400.root
-rw-r--r-- 1 jmt46 cms 231M Jun 17 01:04 mfv_neutralino_tau1000um_M0400.root
-rw-r--r-- 1 jmt46 cms 244M Jun 17 01:05 mfv_neutralino_tau9900um_M0400.root
-rw-r--r-- 1 jmt46 cms 60M Jun 17 01:05 qcdht0100.root
-rw-r--r-- 1 jmt46 cms 1.2G Jun 17 01:06 qcdht0250.root
-rw-r--r-- 1 jmt46 cms 6.9G Jun 17 01:08 qcdht0500.root
-rw-r--r-- 1 jmt46 cms 4.6G Jun 17 01:11 qcdht1000.root
-rw-r--r-- 1 jmt46 cms 1.3G Jun 17 01:12 ttbardilep.root
-rw-r--r-- 1 jmt46 cms 4.0G Jun 17 01:16 ttbarhadronic.root
-rw-r--r-- 1 jmt46 cms 5.5G Jun 17 01:19 ttbarsemilep.root
You can work from the lnx cluster, or you can copy them to your
laptop, but be prepared for it to take a while.
Log in to lnx201 with your CLASSE username/password. Then set up
root (and a bunch of other things) via the command
. /nfs/acc/libs/cesr/cesr_online.bashrc
The syntax to copy is
scp username@lnx201.lns.cornell.edu:/cdat/tem/jmt46/flattrees/ttbarhadronic.root .
along with the rest of the files.
The best option is to fork this repository -- then you have your own version-controlled setup so you can track changes you make to the code.
This requires you sign up for a github account, and set it up on the machine you will work on: https://help.github.com/articles/set-up-git
Then you can fork this repository: https://github.com/jordantucker/summercamp2014/fork
If you don't want to do it that way (but you really should!) you can just clone the repository:
git clone https://github.com/jordantucker/summercamp2014.git
Some skeleton code to read them and output the number of events
consists of the .C and .h file in this directory.
If you're working on your laptop, put the .root files in the same
directory as the .C and .h in this package.
Or if you're working at lnx, you can edit
this line of the .h
from
#elif defined(ATLNX)
to
#elif 1
(Or follow the compilation instruction below using -DATLNX.)
Then you can do
[user@localhost $] root -l MFVFlatNtupleReader.C+
root [0] MFVFlatNtupleReader r
root [1] r.Loop()
Be sure not to forget the + so that root compiles the macro, or it
will be slower than it already is.
An even better way is to compile the code into a standalone executable and run it:
g++ -Wall -DSTANDALONE -DATLNX `root-config --cflags --libs --glibs` MFVFlatNtupleReader.C -o read
./read
You should eventually see output like
done!
sample mfv_neutralino_tau0100um_M0400 events read: 96043
sample mfv_neutralino_tau0300um_M0400 events read: 96653
sample mfv_neutralino_tau1000um_M0400 events read: 96975
sample mfv_neutralino_tau9900um_M0400 events read: 96734
sample ttbarhadronic events read: 2503538
sample ttbarsemilep events read: 3489937
sample ttbardilep events read: 796885
sample qcdht0100 events read: 37489
sample qcdht0250 events read: 822457
sample qcdht0500 events read: 4759413
sample qcdht1000 events read: 3088150
The .C and .h were mostly generated by TTree::MakeClass -- you
can read about that in the root user's guide. Don't worry about lots
of parts of the .h, it's auto-generated code. The part to read are
the descriptions of the variables on
these lines.
The only thing you might want to edit in the .h are the filenames
and the path to them: see
these lines.
You can run on only one sample to do tests by commenting out the rest
of the filenames.
The event loop is in the .C in the Loop() method
here. The
only thing it does right now is count the number of events read per
sample. Then the final "analysis" prints out those counts
here.
To start, try to implement the cuts from the current analysis to count what we call good vertices:
- number of tracks >= 5
- number of tracks w/ pT > 3 GeV >= 3
- track pair delta R min < 0.4
- 1.2 < track pair delta R max < 4
- uncertainty on xy distance to beamspot < 25 microns
- number of associated jets >= 1
- sum of number of hits on tracks behind vertex position == 0
Count the number of events in just the qcdht1000 sample (3088150 events) that have
- at least one good vertex (you should find 22743),
- at least two good vertices (you should find 19),
- at least two good vertices, one pair of which are separated in the xy plane by more than 500 microns (you should find 2).