slhaplot

changeset 120
bffefe12df80
parent 116
e63729bbb044
child 121
402d6abf64b7
equal deleted inserted replaced
119:6b918f65b962 120:bffefe12df80
143 help="treatment of labels for particle IDs, from none/merge/shift. 'none' shows " 143 help="treatment of labels for particle IDs, from none/merge/shift. 'none' shows "
144 "no labels at all, 'merge' combines would-be-overlapping labels into a single " 144 "no labels at all, 'merge' combines would-be-overlapping labels into a single "
145 "comma-separated list, and 'shift' vertically shifts the clashing labels to avoid " 145 "comma-separated list, and 'shift' vertically shifts the clashing labels to avoid "
146 "collisions (default: %default)", 146 "collisions (default: %default)",
147 dest="PARTICLES_LABELS", default="shift") 147 dest="PARTICLES_LABELS", default="shift")
148 parser.add_option("--show-gravitino", action="store_true", 148 # parser.add_option("--hide-gravitino", action="store_false",
149 help="show the gravitino if available", 149 # help="hide the gravitino",
150 dest="SHOW_GRAVITINO", default=False) 150 # dest="SHOW_GRAVITINO", default=False)
151 151
152 152
153 ## Run parser and sort out a few resulting details 153 ## Run parser and sort out a few resulting details
154 opts, args = parser.parse_args() 154 opts, args = parser.parse_args()
155 opts.PARTICLES_LABELS_SHOW = (opts.PARTICLES_LABELS != "none") 155 opts.PARTICLES_LABELS_SHOW = (opts.PARTICLES_LABELS != "none")
156 opts.PARTICLES_LABELS_MERGE = (opts.PARTICLES_LABELS == "merge") 156 opts.PARTICLES_LABELS_MERGE = (opts.PARTICLES_LABELS == "merge")
157 opts.PARTICLES_LABELS_SHIFT = (opts.PARTICLES_LABELS == "shift") 157 opts.PARTICLES_LABELS_SHIFT = (opts.PARTICLES_LABELS == "shift")
158 # 158 #
159 if not opts.SHOW_GRAVITINO: 159 # if not opts.SHOW_GRAVITINO:
160 del PDETAILS[1000039] 160 # del PDETAILS[1000039]
161 # 161 #
162 if opts.DECAYS_MINBR.endswith("%"): 162 if opts.DECAYS_MINBR.endswith("%"):
163 opts.DECAYS_MINBR = float(opts.DECAYS_MINBR[:-1]) / 100 163 opts.DECAYS_MINBR = float(opts.DECAYS_MINBR[:-1]) / 100
164 else: 164 else:
165 opts.DECAYS_MINBR = float(opts.DECAYS_MINBR) 165 opts.DECAYS_MINBR = float(opts.DECAYS_MINBR)
215 if d.br > opts.DECAYS_MINBR: 215 if d.br > opts.DECAYS_MINBR:
216 for pid2 in d.ids: 216 for pid2 in d.ids:
217 if PDETAILS.has_key(pid2): 217 if PDETAILS.has_key(pid2):
218 xyto = (PDETAILS[pid2].xedges.centre, PDETAILS[pid2].mass) 218 xyto = (PDETAILS[pid2].xedges.centre, PDETAILS[pid2].mass)
219 DDETAILS[pid][pid2] = DecayDetails(pid, xyfrom, pid2, xyto, d.br) 219 DDETAILS[pid][pid2] = DecayDetails(pid, xyfrom, pid2, xyto, d.br)
220 if not DDETAILS[pid]: 220 if DDETAILS.has_key(pid) and not DDETAILS[pid]:
221 del DDETAILS[pid] 221 del DDETAILS[pid]
222 222
223 223
224 ## Labels 224 ## Labels
225 PLABELS = [] 225 PLABELS = []

mercurial