In [1]:
%run scripts/HltSamples.py
import subprocess

Generate code bin


In [2]:
!g++ scripts/generate_csv.cc -I /usr/local/include/root/ -L /usr/local/lib/root/ -lTree -lCore -lPhysics -lRIO -o scripts/generate_csv

In [3]:
!g++ scripts/skim.cc -I /usr/local/include/root/ -L /usr/local/lib/root/ -lTree -lCore -lPhysics -lRIO -o scripts/skim

In [4]:
!mkdir datasets/skims

In [5]:
!mkdir datasets/prepared_hlt_track

In [6]:
!mkdir datasets/prepared_hlt_body

Generate data


In [7]:
%%time
with open("skim.log", "w") as l:
    threads = []
    for ch,val in Samples.iteritems():
        threads.append(subprocess.Popen(["scripts/skim", str(ch), str(val["mother"]), str(len(val["children"])),
                                         "datasets"],
                                        stdout=subprocess.PIPE, stderr=subprocess.PIPE))

    for thread in threads:
        t,e = thread.communicate()
        l.write(t)
        l.write("\n")
        l.write(e)
        l.write("\n")

with open("generate_hlt1.log", "w") as l:
    threads = []
    for ch,val in Samples.iteritems():
        threads.append(subprocess.Popen(["scripts/generate_csv", str(ch), str(val["mother"]), str(len(val["children"])),
                                         "datasets"],
                                        stdout=subprocess.PIPE, stderr=subprocess.PIPE))

    for thread in threads:
        t,e = thread.communicate()
        l.write(t)
        l.write("\n")
        l.write(e)
        l.write("\n")


CPU times: user 40 ms, sys: 84 ms, total: 124 ms
Wall time: 13min 39s

In [8]:
! cat generate_hlt1.log


Mode: 13102412
Events: 31938; No tracks: 0; No sv: 2844
0.951844 0.592366 0.605705


Mode: 11114001
Events: 61102; No tracks: 0; No sv: 1732
0.993159 0.880397 0.873196


Mode: 11536011
Events: 13893; No tracks: 0; No sv: 157
0.995753 0.867775 0.899734


Mode: 11102003
Events: 22317; No tracks: 0; No sv: 982
0.975758 0.772416 0.77022


Mode: 12873002
Events: 9480; No tracks: 0; No sv: 317
0.991983 0.779536 0.79789


Mode: 12875500
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.12875500.root

Mode: 13246001
Events: 37313; No tracks: 0; No sv: 838
0.995685 0.910219 0.907485


Mode: 25103000
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.25103000.root

Mode: 25103110
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.25103110.root

Mode: 12165106
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.12165106.root

Mode: 12873432
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.12873432.root

Mode: 11124001
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.11124001.root

Mode: 13264021
Events: 25165; No tracks: 0; No sv: 398
0.995112 0.881303 0.901411


Mode: 13104012
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.13104012.root

Mode: 11874042
Events: 3942; No tracks: 0; No sv: 97
0.995941 0.80619 0.8379


Mode: 13144020
Events: 39278; No tracks: 0; No sv: 1119
0.993228 0.882682 0.877769


Mode: 11296013
Events: 17149; No tracks: 0; No sv: 84
0.998834 0.934982 0.949326


Mode: 27163002
Events: 848; No tracks: 0; No sv: 129
0.913915 0.542453 0.520047


Mode: 11874004
Events: 27212; No tracks: 0; No sv: 580
0.994671 0.827172 0.850728


Mode: 20000000
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.20000000.root

Mode: 11104121
Events: 21960; No tracks: 0; No sv: 1361
0.969262 0.63174 0.651503


Mode: 23103110
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.23103110.root

Mode: 13144001
Events: 54266; No tracks: 0; No sv: 1379
0.993937 0.894575 0.889028


Mode: 12103035
Events: 25250; No tracks: 0; No sv: 713
0.98602 0.852911 0.855842


Mode: 21263002
Events: 8871; No tracks: 0; No sv: 836
0.955022 0.654718 0.661143


Mode: 13112001
Events: 34736; No tracks: 0; No sv: 1325
0.989377 0.831875 0.828391


Mode: 30000000
Events: 111306; No tracks: 786; No sv: 73271
0.861211 0.116445 0.099222


Mode: 15164001
Events: 7130; No tracks: 0; No sv: 143
0.992146 0.892286 0.891445


Mode: 27265001
Events: 871; No tracks: 0; No sv: 144
0.9093 0.466131 0.439724


Mode: 13774002
Events: 12589; No tracks: 0; No sv: 349
0.993169 0.820716 0.85114


Mode: 13102201
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan


Mode: 27163400
Events: 380; No tracks: 0; No sv: 89
0.876316 0.355263 0.35


Mode: 12265042
Events: 0; No tracks: 0; No sv: 0
-nan -nan -nan

Error in <TChain::LoadTree>: Cannot find tree with name data in file datasets/skims/small.12265042.root

Mode: 13512010
Events: 43379; No tracks: 0; No sv: 3056
0.973075 0.65315 0.668042


Mode: 12103121
Events: 22180; No tracks: 0; No sv: 3517
0.90239 0.103652 0.129666


Mode: 11114101
Events: 36257; No tracks: 0; No sv: 2246
0.984693 0.677469 0.691039


Mode: 15512011
Events: 27799; No tracks: 0; No sv: 2047
0.966042 0.634627 0.643656


Mode: 27265101
Events: 2192; No tracks: 0; No sv: 507
0.855383 0.286953 0.26688



In [9]:
!mkdir models




In [10]:
!mkdir bbdt_run2/

In [ ]: