def doEffMixed(self, types, dir, outdir): if not self.output.GetDirectory('mixed').GetDirectory(outdir): self.output.GetDirectory("mixed").mkdir(outdir) if not self.output.GetDirectory('mixed').GetDirectory(outdir).GetDirectory(dir): self.output.GetDirectory('mixed').GetDirectory(outdir).mkdir(dir) self.output.cd('mixed' + '/' + outdir + '/' + dir) result = self.getEffHist(self.mixb, self.mixa, self.mixunwb) eff = result[0] if self.var == 'MVA': eff = Drawer.setHistLabels(eff, 'MVA disc.', 'effieciency in %') self.mixa = Drawer.setHistLabels(self.mixa, 'MVA disc.', 'events') self.mixunwa = Drawer.setHistLabels(self.mixunwa, 'MVA disc.', 'unweigthed events') self.mixb = Drawer.setHistLabels(self.mixb, 'MVA disc.', 'events') self.mixunwb = Drawer.setHistLabels(self.mixunwb, 'MVA disc.', 'unweigthed events') elif self.var == 'met': eff = Drawer.setHistLabels(eff, 'missing E_{T} [GeV]', 'effieciency in %') self.mixa = Drawer.setHistLabels(self.mixa, 'missing E_{T} [GeV]', 'events') self.mixunwa = Drawer.setHistLabels(self.mixunwa, 'missing E_{T} [GeV]', 'unweigthed events') self.mixb = Drawer.setHistLabels(self.mixb, 'missing E_{T} [GeV]', 'events') self.mixunwb = Drawer.setHistLabels(self.mixunwb, 'missing E_{T} [GeV]', 'unweigthed events') eff = Drawer.setMarker(eff, 4, 3, 1) eff.Write() self.mixa.Write() self.mixunwa.Write() self.mixb.Write() self.mixunwb.Write() self.output.Cd('/') for effs in result[1]: # if self.debug: # print 'Eff for %s disc < %1.2f : %1.3f +- %1.3f' % (dir, effs[0], effs[1], effs[2]) self.setEff('mixed', dir, round(effs[0], 2), effs[1], effs[2])