Functions | Variables
ResimTags Namespace Reference

Functions

def CreateTags ()
 
def print_seq (tags, form)
 

Variables

 pm = params[tag]
 
list recoparts = []
 

Function Documentation

def ResimTags.CreateTags ( )

Definition at line 5 of file ResimTags.py.

5 def CreateTags():
6  preqes = [ 25, 30, 40 ]
7  prethrs = [ 1, 3 ]
8  prerefs = [ "Opt", "Pes" ]
9 
10  defqes = [ 35 ]
11  defthrs = [ 2 ]
12  defrefs = [ "Non" ]
13 
14  areas = {}
15  noises = {}
16  snrs = {}
17  reflected = {}
18 
19 
20  sets = [ ("DEF", defqes, defrefs, defthrs),
21  ("EFF", preqes, defrefs, defthrs),
22  ("REF", defqes, prerefs, defthrs),
23  ("THR", defqes, defrefs, prethrs) ]
24 
25 
26  params = {}
27 
28  # Fixed noise value
29  noise = 100
30  snr = 5
31  peakadc = 9
32 
33  for ( name, iqes, irefs, ithrs ) in sets:
34  for qe in iqes:
35  for ref in irefs:
36  for thr in ithrs:
37  tag = "{0}{1:02d}QE{2}Refl{3:d}PE".format(name, qe, ref, thr)
38 
39  # Reduce Eff by 30% for shadowing
40  qeval = float(qe) / 1000.
41 
42  # Produce the parameter tables
43  params[tag] = {}
44  params[tag]["qe"] = qeval
45  params[tag]["darkrate"] = noise
46  params[tag]["linerms"] = float(peakadc)/snr
47  params[tag]["thresh"] = int( (float(thr)-0.3) * peakadc )
48 
49  # Reflections
50  if ref == "Opt":
51  params[tag]["refqe"] = 1.44*qeval
52  elif ref == "Pes":
53  params[tag]["refqe"] = 0.84*qeval
54  params[tag]["qe"] /= 2
55  else:
56  params[tag]["refqe"] = 0
57 
58 
59  tags = sorted(params.keys())
60  return tags, params
61 
62 
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
def CreateTags()
Definition: ResimTags.py:5
def ResimTags.print_seq (   tags,
  form 
)

Definition at line 63 of file ResimTags.py.

63 def print_seq(tags, form):
64  for tag in tags[:-1]:
65  print(form.format(tag)+",")
66  else:
67  print(form.format(tags[-1]))
68 
69 
70 tags, params = CreateTags()
71 
72 
73 
74 print("""
75 #include "largeantmodules_dune.fcl"
76 #include "detsimmodules_dune.fcl"
77 #include "opticaldetectormodules_dune.fcl"
78 #include "OpSlicer.fcl"
79 #include "FlashMatchAna.fcl"
80 #include "SNAna.fcl"
81 """)
82 print("BEGIN_PROLOG")
83 print()
84 
85 print()
86 print("############################################################################")
87 print("pd_detsim_modules: {")
def CreateTags()
Definition: ResimTags.py:5
def print_seq(tags, form)
Definition: ResimTags.py:63

Variable Documentation

ResimTags.pm = params[tag]

Definition at line 94 of file ResimTags.py.

list ResimTags.recoparts = []

Definition at line 128 of file ResimTags.py.