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!