diff --git a/utils/threshAlgos.py b/utils/threshAlgos.py index 146a997c..1ac1df3b 100644 --- a/utils/threshAlgos.py +++ b/utils/threshAlgos.py @@ -1496,7 +1496,7 @@ def getDetName(entry): # make nVFATs TLines kneeLine= [] for vfat in range(0,nVFATS): - canv_Summary1D.cd(vfat + 1).SetLogy() + canv_Summary1D.cd(chamber_vfatPos2PadIdx[gemType][vfat]).SetLogy() # make sure the inflection point is there if dict_dacInflectPts[dacName][ohKey][vfat][0] == None: @@ -1508,16 +1508,13 @@ def getDetName(entry): if type(graph) == r.TH1F : graph = r.TGraph(graph) - # get maximum y value - y = graph.GetY() - y = np.array(y) - ymax = np.amax(y) + graph.GetYaxis().SetRangeUser(1e-1,1e8) # Draw a line on the graphs - kneeLine.append(r.TLine(dict_dacInflectPts[dacName][ohKey][vfat][0], 10.0, dict_dacInflectPts[dacName][ohKey][vfat][0], ymax) ) + kneeLine.append(r.TLine(dict_dacInflectPts[dacName][ohKey][vfat][0], 1e-1, dict_dacInflectPts[dacName][ohKey][vfat][0], 1e8)) kneeLine[vfat].SetLineColor(2) kneeLine[vfat].SetVertical() - canv_Summary1D.cd(chamber_vfatPos2PadIdx[gemType][vfat] ) + canv_Summary1D.cd(chamber_vfatPos2PadIdx[gemType][vfat]) kneeLine[vfat].Draw() canv_Summary1D.Update()