Esempio n. 1
0
 cut0 = cut_cond
 data1 = data
 leg = TLegend(0.7, 0.7, 0.9, 0.9)
 for ros in range(rosmin, rosmax):
     for mod in range(modmin - 1, modmax):
         for chn in range(chanmin, chanmax + 1):
             for adc in range(gainmin, gainmax + 1):
                 if "%d" in data:
                     data1 = data.replace(
                         "%d", str((adc - gainmin) * nval + val_n))
                 if "%d" in cut_cond:
                     cut0 = cut_cond.replace(
                         "%d", str((adc - gainmin) * nval + val_n))
                 cut1 = "(ros == %d && module == %d && channel == %d) && %s" % (
                     ros, mod, chn, cut0)
                 tree.Project("htemp", data1, cut1)
                 if tree.GetSelectedRows() > 0:
                     color = color + 1
                     gr = TGraph(tree.GetSelectedRows(), tree.GetV2(),
                                 tree.GetV1())
                     yy = gr.GetY()
                     for ii in range(len(yy)):
                         vv = yy[ii]
                         if vv < vmin:
                             vmin = vv
                         if vv > vmax:
                             vmax = vv
                     grall += [gr]
                     leg.AddEntry(
                         gr, "%s%2.2d ch %2.2d" %
                         (list(part_dict.keys())[list(