Custom PDF class not loading with RooStats::ProofConfig

_ROOT Version:6.12.06


This issue has been posted about before at Custom PDF class not loading using RooStats::ProofConfig

I am using ProofConfig with the FrequentistCalculator in RooStats, to calculate some upper limits. This works fine when I use classes that are built into ROOT, but when I try to use a fit where I have used a custom class (RooHypatia2), I run into the same issue as @kaplan above.

@Ganis had suggested using


but this does not work because ProofConfig does not have access to the gProof object. I also tried the solution @moneta suggested above while making the input workspace, but it still doesn’t work.

I have attached the .cpp and .h files for the custom class (RooHypatia2.cpp & RooHypatia2.h),
my input workspace (myWS.root), the log file from running StdHypoTestInvDemo and the PROOF log file (worker-0.0.txt), and the script that I use to run the Hypo Inverter (StandardHypoTestInvDemo_Hypatia.C). The script is just a modified version of the tutorial script.

The command I use to run the script is

root -l 'StandardHypoTestInvDemo_Hypatia.C+("myWS.root","w","ModelConfig","bkgOnlyModel","combData",0,3,true,20,0,500,100,false,0)'

I would appreciate any advice on getting PROOF to work with this custom class.
Thanks in advance,

RooHypatia2.cpp (6.0 KB) RooHypatia2.h (1.9 KB) StandardHypoTestInvDemo_Hypatia.C (43.4 KB)
myWS.root (728.6 KB)
testing.txt (39.9 KB)
worker-0.0.txt (12.9 KB)

Hello Arvind,

I have no clue how to use Proof, but let me ask the following:
Is it running the Stand…Hypatia.C on all workers?
That is, is the script somehow serialised and sent to the workers?

Hi Stephan,

My understanding is that PROOF is used to run the ToyMCSampler. The relevant lines of code are

// can speed up using proof-lite
   if (mUseProof) {
      ProofConfig pc(*w, mNWorkers, "", kFALSE);
      toymcs->SetProofConfig(&pc);    // enable proof

In order to generate the toys, I guess the RooWorkspace must be shared among the workers, and so must the custom fit class. For some reason, PROOF is unable to load and share this custom class among its workers.


I don’t see a way to make PROOF do what you want. A solution could be to make a ROOT that comes with RooHypatia2.

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