Functions | Variables
antinufrac_test Namespace Reference

Functions

def GetPercentile (histo, X)
 
def GetMedian (histo)
 
def GetMinimum (histo)
 

Variables

list hierarchies = ["nh","ih"]
 
list plotvars = ["cp_75thpercentile","mh_minimum"]
 
list tweaks = ["antinufrac"]
 
list amounts_varied = [0,10,25,50,75,90,100]
 
list baseline_medians = []
 
 mixing_param = plotvar[0:2]
 
 baseline_file = ROOT.TFile("/lbne/data/users/lblpwg_tools/FastMC_Data/outputs/ljf26/Sensitivity_Plots/ProtonP120GeV_"+hierarchy+"_"+mixing_param+"_histos.root");
 
list medians = [[],[],[]]
 
list histos = [[],[],[]]
 
list amounts_varied_good_files = []
 
 var = tweak+str(amount_varied)
 
string file_prefix = var+"_"
 
 t_file = ROOT.TFile("/lbne/data/users/lblpwg_tools/FastMC_Data/outputs/ljf26/Sensitivity_Plots/bug/"+file_prefix+"_histos.root");
 
list metrics = [[],[],[]]
 
string nomfhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_200kA_LBNEFD_fastmc.root"
 
string nomrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/-200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_-200kA_LBNEFD_fastmc.root"
 
string varfhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_200kA_LBNEFD_fastmc.root"
 
string varrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/-200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_-200kA_LBNEFD_fastmc.root"
 
int power = 120
 
float antinufrac = 0.5
 
 c1 = ROOT.TCanvas(file_prefix);
 
list t_graphs = []
 
int mgraph = 0
 
list line_styles = [1,2,3]
 
list line_colors = [1,2,4]
 
 temp = ROOT.TGraph(len(amounts_varied_good_files),array.array('d',amounts_varied_good_files),array.array('d',medians[i]));
 
 leg = ROOT.TLegend(0.35,0.2,0.65,0.5);
 
 m_graph = ROOT.TGraph(len(amounts_varied_good_files),array.array('d',amounts_varied_good_files),array.array('d',metrics[i]));
 

Function Documentation

def antinufrac_test.GetMedian (   histo)

Definition at line 20 of file antinufrac_test.py.

20 def GetMedian(histo):
21  n = histo.GetNbinsX();
22  x = []
23  y = []
24 
25  for i in range(0,n):
26  x.append(histo.GetBinCenter(i+1));
27  y.append(histo.GetBinContent(i+1));
28  y_array = array.array('d',y)
29 
30  return ROOT.TMath.Median(n,y_array);
31 
32 
33 
34 
def GetMedian(histo)
def antinufrac_test.GetMinimum (   histo)

Definition at line 35 of file antinufrac_test.py.

35 def GetMinimum(histo):
36  min = 99999
37  for i in range(0,histo.GetNbinsX()):
38  if histo.GetBinContent(i+1) < min:
39  min = histo.GetBinContent(i+1)
40  return min
41 
def GetMinimum(histo)
def antinufrac_test.GetPercentile (   histo,
  X 
)

Definition at line 3 of file antinufrac_test.py.

3 def GetPercentile(histo,X):
4  n = histo.GetNbinsX();
5  x = []
6  y = []
7 
8  for i in range(0,n):
9  x.append(histo.GetBinCenter(i+1));
10  y.append(histo.GetBinContent(i+1));
11  y_array = array.array('d',y)
12 
13  percentiles = array.array('d',[0.0]);
14  probs = array.array('d',[1-float(X)/100.0])
15 
16  ROOT.TMath.Quantiles(n,1,y_array,percentiles,probs,False);
17  return percentiles[0]
18 
19 
def GetPercentile(histo, X)

Variable Documentation

list antinufrac_test.amounts_varied = [0,10,25,50,75,90,100]

Definition at line 52 of file antinufrac_test.py.

list antinufrac_test.amounts_varied_good_files = []

Definition at line 83 of file antinufrac_test.py.

float antinufrac_test.antinufrac = 0.5

Definition at line 143 of file antinufrac_test.py.

antinufrac_test.baseline_file = ROOT.TFile("/lbne/data/users/lblpwg_tools/FastMC_Data/outputs/ljf26/Sensitivity_Plots/ProtonP120GeV_"+hierarchy+"_"+mixing_param+"_histos.root");

Definition at line 59 of file antinufrac_test.py.

list antinufrac_test.baseline_medians = []

Definition at line 57 of file antinufrac_test.py.

antinufrac_test.c1 = ROOT.TCanvas(file_prefix);

Definition at line 166 of file antinufrac_test.py.

string antinufrac_test.file_prefix = var+"_"

Definition at line 88 of file antinufrac_test.py.

list antinufrac_test.hierarchies = ["nh","ih"]

Definition at line 42 of file antinufrac_test.py.

list antinufrac_test.histos = [[],[],[]]

Definition at line 81 of file antinufrac_test.py.

antinufrac_test.leg = ROOT.TLegend(0.35,0.2,0.65,0.5);

Definition at line 212 of file antinufrac_test.py.

list antinufrac_test.line_colors = [1,2,4]

Definition at line 172 of file antinufrac_test.py.

list antinufrac_test.line_styles = [1,2,3]

Definition at line 171 of file antinufrac_test.py.

antinufrac_test.m_graph = ROOT.TGraph(len(amounts_varied_good_files),array.array('d',amounts_varied_good_files),array.array('d',metrics[i]));

Definition at line 223 of file antinufrac_test.py.

list antinufrac_test.medians = [[],[],[]]

Definition at line 79 of file antinufrac_test.py.

list antinufrac_test.metrics = [[],[],[]]

Definition at line 133 of file antinufrac_test.py.

int antinufrac_test.mgraph = 0

Definition at line 169 of file antinufrac_test.py.

antinufrac_test.mixing_param = plotvar[0:2]

Definition at line 58 of file antinufrac_test.py.

string antinufrac_test.nomfhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_200kA_LBNEFD_fastmc.root"

Definition at line 136 of file antinufrac_test.py.

string antinufrac_test.nomrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/-200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_-200kA_LBNEFD_fastmc.root"

Definition at line 137 of file antinufrac_test.py.

list antinufrac_test.plotvars = ["cp_75thpercentile","mh_minimum"]

Definition at line 43 of file antinufrac_test.py.

int antinufrac_test.power = 120

Definition at line 142 of file antinufrac_test.py.

antinufrac_test.t_file = ROOT.TFile("/lbne/data/users/lblpwg_tools/FastMC_Data/outputs/ljf26/Sensitivity_Plots/bug/"+file_prefix+"_histos.root");

Definition at line 91 of file antinufrac_test.py.

list antinufrac_test.t_graphs = []

Definition at line 168 of file antinufrac_test.py.

antinufrac_test.temp = ROOT.TGraph(len(amounts_varied_good_files),array.array('d',amounts_varied_good_files),array.array('d',medians[i]));

Definition at line 176 of file antinufrac_test.py.

list antinufrac_test.tweaks = ["antinufrac"]

Definition at line 46 of file antinufrac_test.py.

antinufrac_test.var = tweak+str(amount_varied)

Definition at line 87 of file antinufrac_test.py.

string antinufrac_test.varfhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_200kA_LBNEFD_fastmc.root"

Definition at line 139 of file antinufrac_test.py.

string antinufrac_test.varrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r2p4/QGSP_BERT/Nominal/-200kA/flux/histos_g4lbne_v3r2p4_QGSP_BERT_Nominal_-200kA_LBNEFD_fastmc.root"

Definition at line 140 of file antinufrac_test.py.