Hi,
I am working with a 4D PDF and was cross checking some of the 2D Projections of the PDF. The 4 dimensions are r,z,S1,log10S2. In the attachment, top left and right pad are S1 vs log10S2 and r vs z. These look normal.
When I try to make a projection in r vs S1 (bottom left) the PDF looks WRONG on the bottom left pad. This is using the RooAbsPdf->generate->createHistogram() function with the following codes.
RooArgSet rS1(r,S1);
TH2* h_comptonRestPop_rS1 = (TH2*)comptonRestPop.generate(rS1,10000)->createHistogram(“r,S1”,NRBIN,NS1BIN);
I remade the r vs S1 (bottom right) using a projection command first using the following codes,
RooArgSet NotrS1(z,log10S2);
RooAbsPdf * comptonRestPop_rS1 = comptonRestPop.createProjection(NotrS1);
TH2* hProj_comptonRestPop_rS1 = (TH2*)comptonRestPop_rS1->generate(rS1,10000)->createHistogram("r,S1",NRBIN,NS1BIN);
I am just curious what’s actually the right way to look at the PDF and what does Roofit actually use? I hope that I am just wrong in generating a 2D projection straight out of a 4D histogram.