Functions | Variables
optimization_test Namespace Reference

Functions

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

Variables

list hierarchies = ["nh","ih"]
 
list plotvars = ["cp_75thpercentile","mh_minimum"]
 
 optimization = Optimizations.Optimization("CP_run3")
 
list amounts_varied = [177,3544,4177,6177,6911,7177,7862,8177,8186]
 
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 = []
 
string var = "Optimizations_CP_run3_"
 
string file_prefix = var+"_"
 
 t_file = ROOT.TFile("/lbne/data/users/lblpwg_tools/FastMC_Data/outputs/ljf26/Sensitivity_Plots/"+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/v3r3p2/QGSP_BERT/Optimizations-CP_run3-"
 
string varrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r3p2/QGSP_BERT/Optimizations-CP_run3-"
 
 energy = optimization.getEnergy(float(amounts_varied_good_files[var]),"")
 
float antinufrac = 0.5
 
string type = "cp"
 
 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]));
 
 m_graph = ROOT.TGraph(len(amounts_varied_good_files),array.array('d',amounts_varied_good_files),array.array('d',metrics[i]));
 
 leg = ROOT.TLegend(0.4,0.2,0.6,0.4);
 

Function Documentation

def optimization_test.GetMinimum (   histo)

Definition at line 20 of file optimization_test.py.

20 def GetMinimum(histo):
21  min = 99999
22  for i in range(0,histo.GetNbinsX()):
23  if histo.GetBinContent(i+1) < min:
24  min = histo.GetBinContent(i+1)
25  return min
26 
def optimization_test.GetPercentile (   histo,
  X 
)

Definition at line 3 of file optimization_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 optimization_test.amounts_varied = [177,3544,4177,6177,6911,7177,7862,8177,8186]

Definition at line 36 of file optimization_test.py.

list optimization_test.amounts_varied_good_files = []

Definition at line 56 of file optimization_test.py.

float optimization_test.antinufrac = 0.5

Definition at line 103 of file optimization_test.py.

optimization_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 41 of file optimization_test.py.

list optimization_test.baseline_medians = []

Definition at line 39 of file optimization_test.py.

optimization_test.c1 = ROOT.TCanvas(file_prefix);

Definition at line 122 of file optimization_test.py.

optimization_test.energy = optimization.getEnergy(float(amounts_varied_good_files[var]),"")

Definition at line 102 of file optimization_test.py.

string optimization_test.file_prefix = var+"_"

Definition at line 61 of file optimization_test.py.

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

Definition at line 27 of file optimization_test.py.

list optimization_test.histos = [[],[],[]]

Definition at line 54 of file optimization_test.py.

optimization_test.leg = ROOT.TLegend(0.4,0.2,0.6,0.4);

Definition at line 159 of file optimization_test.py.

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

Definition at line 128 of file optimization_test.py.

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

Definition at line 127 of file optimization_test.py.

optimization_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 150 of file optimization_test.py.

list optimization_test.medians = [[],[],[]]

Definition at line 52 of file optimization_test.py.

list optimization_test.metrics = [[],[],[]]

Definition at line 92 of file optimization_test.py.

int optimization_test.mgraph = 0

Definition at line 125 of file optimization_test.py.

optimization_test.mixing_param = plotvar[0:2]

Definition at line 40 of file optimization_test.py.

string optimization_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 95 of file optimization_test.py.

string optimization_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 96 of file optimization_test.py.

optimization_test.optimization = Optimizations.Optimization("CP_run3")

Definition at line 31 of file optimization_test.py.

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

Definition at line 28 of file optimization_test.py.

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

Definition at line 63 of file optimization_test.py.

list optimization_test.t_graphs = []

Definition at line 124 of file optimization_test.py.

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

Definition at line 132 of file optimization_test.py.

string optimization_test.type = "cp"

Definition at line 105 of file optimization_test.py.

string optimization_test.var = "Optimizations_CP_run3_"

Definition at line 60 of file optimization_test.py.

string optimization_test.varfhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r3p2/QGSP_BERT/Optimizations-CP_run3-"

Definition at line 99 of file optimization_test.py.

string optimization_test.varrhcfile = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r3p2/QGSP_BERT/Optimizations-CP_run3-"

Definition at line 100 of file optimization_test.py.