Variables
produceTreeForValidation Namespace Reference

Variables

 parser = argparse.ArgumentParser()
 
 type
 
 str
 
 required
 
 args = parser.parse_args()
 
int count = 0
 
int correct = 0
 
 matrix = defaultdict(int)
 
 labels_set = set()
 
 net = caffe.Net(args.proto, args.model, caffe.TEST)
 
 db = leveldb.LevelDB(args.leveldb)
 
string fileNameH = args.hdf5+".0.h5"
 
 h_f = h5py.File(fileNameH, "r")
 
 a_group_key = h_f.keys()[0]
 
 h_data = list(h_f[a_group_key])
 
 h_size = len(h_data)
 
 t = ROOT.TTree( 't1', 'tree with histos' )
 
 fout = ROOT.TFile("output.root", "RECREATE")
 
 arrpidNuMu = np.zeros(1, dtype=float)
 
 arrpidNue = np.zeros(1, dtype=float)
 
 arrpidNuTau = np.zeros(1, dtype=float)
 
 arrpidNC = np.zeros(1, dtype=float)
 
 arrpidCosmic = np.zeros(1, dtype=float)
 
 truelabel = np.zeros(1, dtype=int)
 
 nhit = np.zeros(1, dtype=int)
 
 tVertX = np.zeros(1, dtype=float)
 
 tVertY = np.zeros(1, dtype=float)
 
 tVertZ = np.zeros(1, dtype=float)
 
int nEvents = 100000
 
int h_count = 0
 
int fileCountH = 0
 
 datum = caffe.proto.caffe_pb2.Datum()
 
 label = int(datum.label)
 
 image = caffe.io.datum_to_array(datum)
 
string fileNameHadd = args.hdf5+"."
 
 hadd_f = h5py.File(fileNameHadd, "r")
 
 a_group_key_add = hadd_f.keys()[0]
 
 out = net.forward_all(data=np.asarray([image]))
 
 plabel = int(out['prob'][0].argmax(axis=0))
 
 lepSum = np.zeros(5, dtype=float)
 
 lepton = eltl.labelToLepton(entry)
 
 iscorrect = plabel
 

Variable Documentation

produceTreeForValidation.a_group_key = h_f.keys()[0]

Definition at line 34 of file produceTreeForValidation.py.

produceTreeForValidation.a_group_key_add = hadd_f.keys()[0]

Definition at line 100 of file produceTreeForValidation.py.

produceTreeForValidation.args = parser.parse_args()

Definition at line 20 of file produceTreeForValidation.py.

produceTreeForValidation.arrpidCosmic = np.zeros(1, dtype=float)

Definition at line 55 of file produceTreeForValidation.py.

produceTreeForValidation.arrpidNC = np.zeros(1, dtype=float)

Definition at line 54 of file produceTreeForValidation.py.

produceTreeForValidation.arrpidNue = np.zeros(1, dtype=float)

Definition at line 52 of file produceTreeForValidation.py.

produceTreeForValidation.arrpidNuMu = np.zeros(1, dtype=float)

Definition at line 51 of file produceTreeForValidation.py.

produceTreeForValidation.arrpidNuTau = np.zeros(1, dtype=float)

Definition at line 53 of file produceTreeForValidation.py.

produceTreeForValidation.correct = 0

Definition at line 23 of file produceTreeForValidation.py.

int produceTreeForValidation.count = 0

Definition at line 22 of file produceTreeForValidation.py.

produceTreeForValidation.datum = caffe.proto.caffe_pb2.Datum()

Definition at line 85 of file produceTreeForValidation.py.

produceTreeForValidation.db = leveldb.LevelDB(args.leveldb)

Definition at line 29 of file produceTreeForValidation.py.

int produceTreeForValidation.fileCountH = 0

Definition at line 79 of file produceTreeForValidation.py.

string produceTreeForValidation.fileNameH = args.hdf5+".0.h5"

Definition at line 32 of file produceTreeForValidation.py.

string produceTreeForValidation.fileNameHadd = args.hdf5+"."

Definition at line 98 of file produceTreeForValidation.py.

produceTreeForValidation.fout = ROOT.TFile("output.root", "RECREATE")

Definition at line 45 of file produceTreeForValidation.py.

int produceTreeForValidation.h_count = 0

Definition at line 78 of file produceTreeForValidation.py.

produceTreeForValidation.h_data = list(h_f[a_group_key])

Definition at line 35 of file produceTreeForValidation.py.

produceTreeForValidation.h_f = h5py.File(fileNameH, "r")

Definition at line 33 of file produceTreeForValidation.py.

produceTreeForValidation.h_size = len(h_data)

Definition at line 36 of file produceTreeForValidation.py.

produceTreeForValidation.hadd_f = h5py.File(fileNameHadd, "r")

Definition at line 99 of file produceTreeForValidation.py.

produceTreeForValidation.image = caffe.io.datum_to_array(datum)

Definition at line 90 of file produceTreeForValidation.py.

produceTreeForValidation.iscorrect = plabel

Definition at line 131 of file produceTreeForValidation.py.

produceTreeForValidation.label = int(datum.label)

Definition at line 87 of file produceTreeForValidation.py.

produceTreeForValidation.labels_set = set()

Definition at line 25 of file produceTreeForValidation.py.

produceTreeForValidation.lepSum = np.zeros(5, dtype=float)

Definition at line 114 of file produceTreeForValidation.py.

produceTreeForValidation.lepton = eltl.labelToLepton(entry)
produceTreeForValidation.matrix = defaultdict(int)

Definition at line 24 of file produceTreeForValidation.py.

produceTreeForValidation.net = caffe.Net(args.proto, args.model, caffe.TEST)

Definition at line 27 of file produceTreeForValidation.py.

int produceTreeForValidation.nEvents = 100000

Definition at line 77 of file produceTreeForValidation.py.

produceTreeForValidation.nhit = np.zeros(1, dtype=int)

Definition at line 59 of file produceTreeForValidation.py.

produceTreeForValidation.out = net.forward_all(data=np.asarray([image]))

Definition at line 110 of file produceTreeForValidation.py.

produceTreeForValidation.parser = argparse.ArgumentParser()

Definition at line 14 of file produceTreeForValidation.py.

produceTreeForValidation.plabel = int(out['prob'][0].argmax(axis=0))

Definition at line 112 of file produceTreeForValidation.py.

produceTreeForValidation.required

Definition at line 15 of file produceTreeForValidation.py.

produceTreeForValidation.str

Definition at line 15 of file produceTreeForValidation.py.

produceTreeForValidation.t = ROOT.TTree( 't1', 'tree with histos' )

Definition at line 43 of file produceTreeForValidation.py.

produceTreeForValidation.truelabel = np.zeros(1, dtype=int)

Definition at line 57 of file produceTreeForValidation.py.

produceTreeForValidation.tVertX = np.zeros(1, dtype=float)

Definition at line 61 of file produceTreeForValidation.py.

produceTreeForValidation.tVertY = np.zeros(1, dtype=float)

Definition at line 62 of file produceTreeForValidation.py.

produceTreeForValidation.tVertZ = np.zeros(1, dtype=float)

Definition at line 63 of file produceTreeForValidation.py.

produceTreeForValidation.type

Definition at line 15 of file produceTreeForValidation.py.