Variables
caf_analysis Namespace Reference

Variables

 parser = OptionParser()
 
 help
 
 action
 
 type
 
 dest
 
 default
 
 options
 
 args
 
 mc_mode
 
dictionary figures = {}
 Book histograms. More...
 
 keys = figures.keys()
 Reco plots. More...
 
 figure_keys = figures.keys()
 Store plot keys. More...
 
list int_types
 Sub-samples. More...
 
string name = "%s-%s"
 
 counters = OrderedDict()
 Initialise a counter dictionary. More...
 
 files = glob.glob(options.input_files)
 
string r_chain_name = "recTree"
 
 r_chain = ROOT.TChain(r_chain_name)
 
string s_chain_name = "spillTree"
 
 s_chain = ROOT.TChain(s_chain_name)
 
 nevents = r_chain.GetEntries()
 
 s_nevents = s_chain.GetEntries()
 
list active_branches
 Optimisations. More...
 
 start_time = time.time()
 Run analysis. More...
 
 print_every_n_events
 
 dt = time.time()-start_time
 Begin loop. More...
 
 pass_numu_cuts
 Nu mu analysis cuts These are the standard nu mu analysis cuts used in first analysis. More...
 
int weight = 1
 Fill reconstruction values. More...
 
dictionary values = {}
 
 true_event_types = tools.DetermineTruthEventType(r_chain, verbose=options.verbose)
 Truth studies if the '-m' option is set then we assume this is MC if so we run some simple truth analysis. More...
 
 true_neutrino = r_chain.rec.mc.nu[0]
 
 true_muon = None
 
 x_variable = figure.split("_vs")[0]
 Fill histograms. More...
 
 y_variable = figure.split("vs_")[1]
 
string bad_runs_file = "/nova/app/users/tamsett/art/python/bad_timing_runs.txt"
 Bad timing list. More...
 
 bad_runs_list = set([int(r.strip()) for r in open(bad_runs_file,"r").readlines()])
 
int total_pot = 0
 Spill tree. More...
 
 trigger_int = int(repr(s_chain.spill.trigger)[3:-1])
 
tuple timing_dq = (s_chain.spill.run not in bad_runs_list)
 Analysis cuts the full analysis cuts should be applied here timing dq. More...
 
 spill = tools.standardSpillCut(s_chain.spill)
 
 saved_root_file = ROOT.TFile(options.output_file, "RECREATE" )
 print counters More...
 
string prefix = "mixed-"
 

Variable Documentation

caf_analysis.action

Definition at line 5 of file caf_analysis.py.

list caf_analysis.active_branches
Initial value:
1 = [
2  "hdr.run",
3  "hdr.subrun",
4  "hdr.evt",
5  "hdr.det",
6  "sel.remid.len",
7  "sel.remid.bestidx",
8  "energy.numusimp.trkccE",
9  "energy.numusimp.hadcalE",
10  "energy.numusimp.hadtrkE",
11  "energy.mutrkE.E",
12  "mc.nu",
13  "mc.nnu",
14  "mc.nu.iscc",
15  "mc.nu.pdg",
16  "mc.nu.pdgorig",
17  "mc.nu.E",
18  "mc.nu.*",
19 ]

Optimisations.

Definition at line 130 of file caf_analysis.py.

caf_analysis.args

Definition at line 10 of file caf_analysis.py.

string caf_analysis.bad_runs_file = "/nova/app/users/tamsett/art/python/bad_timing_runs.txt"

Bad timing list.

Definition at line 236 of file caf_analysis.py.

caf_analysis.bad_runs_list = set([int(r.strip()) for r in open(bad_runs_file,"r").readlines()])

Definition at line 237 of file caf_analysis.py.

caf_analysis.counters = OrderedDict()

Initialise a counter dictionary.

Definition at line 69 of file caf_analysis.py.

caf_analysis.default

Definition at line 5 of file caf_analysis.py.

caf_analysis.dest

Definition at line 5 of file caf_analysis.py.

caf_analysis.dt = time.time()-start_time

Begin loop.

Event loop finished.

Get entries

Definition at line 165 of file caf_analysis.py.

caf_analysis.figure_keys = figures.keys()

Store plot keys.

Definition at line 57 of file caf_analysis.py.

dictionary caf_analysis.figures = {}

Book histograms.

Definition at line 31 of file caf_analysis.py.

caf_analysis.files = glob.glob(options.input_files)

Definition at line 96 of file caf_analysis.py.

caf_analysis.help

Definition at line 5 of file caf_analysis.py.

list caf_analysis.int_types
Initial value:
1 = [
2  "QE","Res","DIS", "Coh","MEC",
3  ]

Sub-samples.

Definition at line 60 of file caf_analysis.py.

caf_analysis.keys = figures.keys()
caf_analysis.mc_mode

Definition at line 18 of file caf_analysis.py.

string caf_analysis.name = "%s-%s"

Definition at line 66 of file caf_analysis.py.

caf_analysis.nevents = r_chain.GetEntries()

Definition at line 117 of file caf_analysis.py.

caf_analysis.options

Definition at line 10 of file caf_analysis.py.

caf_analysis.parser = OptionParser()

Definition at line 4 of file caf_analysis.py.

caf_analysis.pass_numu_cuts

Nu mu analysis cuts These are the standard nu mu analysis cuts used in first analysis.

Definition at line 174 of file caf_analysis.py.

string caf_analysis.prefix = "mixed-"

Definition at line 285 of file caf_analysis.py.

caf_analysis.print_every_n_events

Definition at line 156 of file caf_analysis.py.

caf_analysis.r_chain = ROOT.TChain(r_chain_name)

Definition at line 104 of file caf_analysis.py.

string caf_analysis.r_chain_name = "recTree"

Definition at line 103 of file caf_analysis.py.

caf_analysis.s_chain = ROOT.TChain(s_chain_name)

Definition at line 107 of file caf_analysis.py.

string caf_analysis.s_chain_name = "spillTree"

Definition at line 106 of file caf_analysis.py.

caf_analysis.s_nevents = s_chain.GetEntries()

Definition at line 118 of file caf_analysis.py.

caf_analysis.saved_root_file = ROOT.TFile(options.output_file, "RECREATE" )

print counters

Save histograms

Definition at line 281 of file caf_analysis.py.

caf_analysis.spill = tools.standardSpillCut(s_chain.spill)
caf_analysis.start_time = time.time()

Run analysis.

Definition at line 155 of file caf_analysis.py.

tuple caf_analysis.timing_dq = (s_chain.spill.run not in bad_runs_list)

Analysis cuts the full analysis cuts should be applied here timing dq.

Definition at line 261 of file caf_analysis.py.

int caf_analysis.total_pot = 0

Spill tree.

Definition at line 241 of file caf_analysis.py.

caf_analysis.trigger_int = int(repr(s_chain.spill.trigger)[3:-1])

Definition at line 254 of file caf_analysis.py.

list caf_analysis.true_event_types = tools.DetermineTruthEventType(r_chain, verbose=options.verbose)

Truth studies if the '-m' option is set then we assume this is MC if so we run some simple truth analysis.

Fill truth values.

Definition at line 192 of file caf_analysis.py.

caf_analysis.true_muon = None

Definition at line 196 of file caf_analysis.py.

caf_analysis.true_neutrino = r_chain.rec.mc.nu[0]

Definition at line 195 of file caf_analysis.py.

caf_analysis.type

Definition at line 5 of file caf_analysis.py.

dictionary caf_analysis.values = {}

Definition at line 183 of file caf_analysis.py.

int caf_analysis.weight = 1

Fill reconstruction values.

Definition at line 182 of file caf_analysis.py.

caf_analysis.x_variable = figure.split("_vs")[0]

Fill histograms.

Definition at line 221 of file caf_analysis.py.

caf_analysis.y_variable = figure.split("vs_")[1]

Definition at line 222 of file caf_analysis.py.