def newDatasetOK(dataset, newDMap): keepGoing = False if datasetOK(dataset): keepGoing = True else: for old_dataset in newDMap.keys(): if not (dataset in newDMap[old_dataset]): continue if datasetOK(old_dataset): keepGoing = True break return keepGoing
ROOT.gStyle.SetOptStat(0) ROOT.gStyle.SetPalette(kInvertedDarkBodyRadiator) #file=ROOT.TFile("final.root","r") root_file = ROOT.TFile("Results/corr_histos.root", "R") #root_file=ROOT.TFile("Results/Raw/Root/corr_histos_120.root","R") tD_histo = root_file.Get("trigger_dataset_corr") dD_histo = root_file.Get("dataset_dataset_corr") triggerDataset_histo = [] icount = -1 for i in range(0, tD_histo.GetNbinsX()): dataset = tD_histo.GetXaxis().GetBinLabel(i + 1) if not datasetOK(dataset): continue nbinsY = 0 triggerList = [] for j in range(1, tD_histo.GetNbinsY() + 1): trigger = tD_histo.GetYaxis().GetBinLabel(j) if not trigger in triggersDatasetMap: continue if dataset in triggersDatasetMap[trigger] and physicsStreamOK(trigger): nbinsY += 1 triggerList.append(trigger) if (nbinsY <= 0): continue n = nbinsY // max_y_entries + 1 equi_div = nbinsY // n + 1 if (nbinsY > max_y_entries): for nn in range(0, n): nnbinsY = 1 if (nn == n - 1):