def __init__(self,
                 dsetMgr,
                 dsetLabelData,
                 dsetLabelEwk,
                 histoName,
                 dataPath,
                 ewkPath,
                 luminosity,
                 optionUseInclusiveNorm,
                 verbose=False):
        self._verbose = verbose
        self._uniqueN = 0
        self._splittedHistoReader = splittedHistoReader.SplittedHistoReader(
            dsetMgr, dsetLabelData)
        self._histoName = histoName
        self._optionUseInclusiveNorm = optionUseInclusiveNorm
        dataFullName = os.path.join(dataPath, histoName)
        ewkFullName = os.path.join(ewkPath, histoName)

        if (self._optionUseInclusiveNorm):
            msg = "Will create \"Inclusive\"-histogram results"
            self.Verbose(
                ShellStyles.NoteStyle() + msg + ShellStyles.NormalStyle(),
                False)
            self._dataList = list(
                self._getInclusiveHistogramsFromSingleSource(
                    dsetMgr, dsetLabelData, dataFullName,
                    luminosity))  # was called by default
            self._ewkList = list(
                self._getInclusiveHistogramsFromSingleSource(
                    dsetMgr, dsetLabelEwk, ewkFullName,
                    luminosity))  # was called by default
        else:
            msg = "Will create \"Splitted\"-histogram results"
            self.Verbose(
                ShellStyles.NoteStyle() + msg + ShellStyles.NormalStyle(),
                False)
            self._dataList = list(
                self._splittedHistoReader.getSplittedBinHistograms(
                    dsetMgr, dsetLabelData, dataFullName,
                    luminosity))  #FIXME: Does this work for Inclusive?
            self._ewkList = list(
                self._splittedHistoReader.getSplittedBinHistograms(
                    dsetMgr, dsetLabelEwk, ewkFullName,
                    luminosity))  #FIXME: Does this work for Inclusive?
        return
Ejemplo n.º 2
0
 def __init__(self, dsetMgr, dsetLabelData, dsetLabelEwk, histoName,
              dataPath, ewkPath, luminosity):
     #dataDrivenFakeTaus=False,
     #EWKUncertaintyFactor=1.0,
     #UncertAffectsTT = True):
     self._uniqueN = 0
     self._splittedHistoReader = splittedHistoReader.SplittedHistoReader(
         dsetMgr, dsetLabelData)
     self._histoName = histoName
     dataFullName = os.path.join(dataPath, histoName)
     self._dataList = list(
         self._splittedHistoReader.getSplittedBinHistograms(
             dsetMgr, dsetLabelData, dataFullName, luminosity))
     ewkFullName = os.path.join(ewkPath, histoName)
     self._ewkList = list(
         self._splittedHistoReader.getSplittedBinHistograms(
             dsetMgr, dsetLabelEwk, ewkFullName, luminosity))
Ejemplo n.º 3
0
    def __init__(self,
                 dsetMgr,
                 dsetLabelData,
                 dsetLabelEwk,
                 histoName,
                 dataPath,
                 ewkPath,
                 luminosity,
                 optionUseInclusiveNorm,
                 verbose=False):
        self._verbose = verbose
        self._uniqueN = 0
        self._splittedHistoReader = splittedHistoReader.SplittedHistoReader(
            dsetMgr, dsetLabelData)
        self._histoName = histoName
        self._optionUseInclusiveNorm = optionUseInclusiveNorm  #ALEX-NEW
        dataFullName = os.path.join(dataPath, histoName)
        ewkFullName = os.path.join(ewkPath, histoName)

        # ALEX-NEW
        if (self._optionUseInclusiveNorm):
            msg = "Disabled call for getting splitted histograms. Getting \"Inclusive\" histogram only instead."
            self.Verbose(ShellStyles.WarningLabel() + msg, self._verbose)
            self._dataList = list(
                self._getInclusiveHistogramsFromSingleSource(
                    dsetMgr, dsetLabelData, dataFullName,
                    luminosity))  # was called by default
            self._ewkList = list(
                self._getInclusiveHistogramsFromSingleSource(
                    dsetMgr, dsetLabelEwk, ewkFullName,
                    luminosity))  # was called by default
        else:
            msg = "This splitted histograms method is not validated! Use \"Inclusive\" histogram only instead."
            self.Print(ShellStyles.WarningLabel() + msg, False)
            self._dataList = list(
                self._splittedHistoReader.getSplittedBinHistograms(
                    dsetMgr, dsetLabelData, dataFullName,
                    luminosity))  #FIXME: Does this work for Inclusive?
            self._ewkList = list(
                self._splittedHistoReader.getSplittedBinHistograms(
                    dsetMgr, dsetLabelEwk, ewkFullName,
                    luminosity))  #FIXME: Does this work for Inclusive?
        return