Variables
produceTreeForValidationProng 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")
 
 arrpidProton = np.zeros(1, dtype=float)
 
 arrpidPion = np.zeros(1, dtype=float)
 
 arrpidGamma = np.zeros(1, dtype=float)
 
 arrpidMuon = np.zeros(1, dtype=float)
 
 arrpidElectron = np.zeros(1, dtype=float)
 
 arrpidPiZero = np.zeros(1, dtype=float)
 
 arrpidNeutron = np.zeros(1, dtype=float)
 
 truelabel = np.zeros(1, dtype=int)
 
 truelabelall = np.zeros(1, dtype=int)
 
 selectedlabel = 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 = 5000000
 
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))
 
 iscorrect = plabel
 

Variable Documentation

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

Definition at line 34 of file produceTreeForValidationProng.py.

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

Definition at line 108 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.args = parser.parse_args()

Definition at line 20 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidElectron = np.zeros(1, dtype=float)

Definition at line 55 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidGamma = np.zeros(1, dtype=float)

Definition at line 53 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidMuon = np.zeros(1, dtype=float)

Definition at line 54 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidNeutron = np.zeros(1, dtype=float)

Definition at line 57 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidPion = np.zeros(1, dtype=float)

Definition at line 52 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidPiZero = np.zeros(1, dtype=float)

Definition at line 56 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.arrpidProton = np.zeros(1, dtype=float)

Definition at line 51 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.correct = 0

Definition at line 23 of file produceTreeForValidationProng.py.

int produceTreeForValidationProng.count = 0

Definition at line 22 of file produceTreeForValidationProng.py.

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

Definition at line 92 of file produceTreeForValidationProng.py.

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

Definition at line 29 of file produceTreeForValidationProng.py.

int produceTreeForValidationProng.fileCountH = 0

Definition at line 86 of file produceTreeForValidationProng.py.

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

Definition at line 32 of file produceTreeForValidationProng.py.

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

Definition at line 106 of file produceTreeForValidationProng.py.

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

Definition at line 45 of file produceTreeForValidationProng.py.

int produceTreeForValidationProng.h_count = 0

Definition at line 85 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.h_data = list(h_f[a_group_key])

Definition at line 35 of file produceTreeForValidationProng.py.

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

Definition at line 33 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.h_size = len(h_data)

Definition at line 36 of file produceTreeForValidationProng.py.

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

Definition at line 107 of file produceTreeForValidationProng.py.

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

Definition at line 98 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.iscorrect = plabel

Definition at line 136 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.label = int(datum.label)

Definition at line 94 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.labels_set = set()

Definition at line 25 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.matrix = defaultdict(int)

Definition at line 24 of file produceTreeForValidationProng.py.

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

Definition at line 27 of file produceTreeForValidationProng.py.

int produceTreeForValidationProng.nEvents = 5000000

Definition at line 84 of file produceTreeForValidationProng.py.

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

Definition at line 63 of file produceTreeForValidationProng.py.

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

Definition at line 118 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.parser = argparse.ArgumentParser()

Definition at line 14 of file produceTreeForValidationProng.py.

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

Definition at line 120 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.required

Definition at line 15 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.selectedlabel = np.zeros(1, dtype=int)

Definition at line 61 of file produceTreeForValidationProng.py.

Referenced by confusionMatrixProng().

produceTreeForValidationProng.str

Definition at line 15 of file produceTreeForValidationProng.py.

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

Definition at line 43 of file produceTreeForValidationProng.py.

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

Definition at line 59 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.truelabelall = np.zeros(1, dtype=int)

Definition at line 60 of file produceTreeForValidationProng.py.

Referenced by confusionMatrixProng(), and pidPlotProng().

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

Definition at line 65 of file produceTreeForValidationProng.py.

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

Definition at line 66 of file produceTreeForValidationProng.py.

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

Definition at line 67 of file produceTreeForValidationProng.py.

produceTreeForValidationProng.type

Definition at line 15 of file produceTreeForValidationProng.py.