Merging several RooDataSets

Hi,

suppose I have several RooDataSets, that are stored in a list bkgperCat:

bkgperCat=[]
    while obj:
        objName=obj.GetName()
        catName=objName.replace('Nbkg_','')
        redData=data.reduce(ROOT.RooFit.Cut('sample==sample::%s'%catName))             
        bkgperCat.append( ROOT.RooDataSet('bkg'+catName, 'bkg '+catName,   redData, redData.get(), '', objName+'_sw') )
        obj = iterator.Next()

and now I want to add several RooDataSet stored in bkgperCat in one single Dataset. I tried:

bkg_inclusive=ROOT.RooDataSet() 
for i in xrange(0,len(bkgperCat)):

        bkg_inclusive.append(bkgperCat[i])

in order to add all in one dataset bkg_inclusive. However this does not work… What is the easiest way to do this? Thanks!

Hi,

Using append it should work if the data set share the same observables.
If not, please post a running script or open a JIRA ticket

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.