Functions
eventLabelToLeptonRetro Namespace Reference

Functions

def labelToLeptonRetro (entry)
 

Function Documentation

def eventLabelToLeptonRetro.labelToLeptonRetro (   entry)

Definition at line 1 of file eventLabelToLeptonRetro.py.

1 def labelToLeptonRetro( entry ):
2 
3  #list of event labels:
4  labelList = ["nM_QE","nM_RES","nM_DIS","nM_COH",
5  "nE_QE","nE_RES","nE_DIS","nE_COH",
6  "nT_QE","nT_RES","nT_DIS","nT_COH",
7  "NuOnE","NC","Cosmic"]
8 
9  #lookup entry:
10  label=labelList[entry]
11 
12  coarseLabel=-1;
13 
14  if "nM" in label:
15  coarseLabel=0
16  if "nE" in label:
17  coarseLabel=1
18  if "nT" in label:
19  coarseLabel=2
20  if "NC" in label:
21  coarseLabel=3
22  if "Cosmic" in label:
23  coarseLabel=4
24  if "kOther" in label:
25  coarseLabel=3
26 
27  if coarseLabel==-1:
28  print "Unknown label"
29 
30  return coarseLabel;
31 
32