I have the following setup:
RooCategory cp( "cp", "CP Tag" );
cp.defineType( "plus", +1 );
cp.defineType( "minus", -1 );
RooCategory flv( "flv", "Flavour Tag" );
flv.defineType( "B0", +1 );
flv.defineType( "b0", -1 );
RooSuperCategory tag( "tag", "[flv X cp]", RooArgSet( flv, cp ) );
A bit later, I’m trying to plot the different categories seperately, naturally I expected this
ds.plotOn( frame, Cut( "tag == tag::{B0;plus}" ) );
to work as expected, however, the code terminates with a segfault:
Edit: Is guess I should add that calling
RooTable * tb_tag = ds.table( tag );
tb_tag->Print();
prints the expected number of entries per sub-category.
Is this a bug or is my expectation wrong? If this is a bug, is there a workaround (other than the one I’m using now, which is listed below)?
For the moment I’m using
ds.plotOn( frame, Cut( "cp == cp::plus && flv == flv::B0" ) );
but given that there exists such a thing as a super category I’d really like it to work as the normal category does.