How to fit a Double Sided Crystal Ball in Roofit

Dear Rooters,

I am a totally newbie to Roofit. I am trying to fit a Double Sided Crystal Ball to a histogram. My code is running normally in root, but I want to convert it to a roofit version because I need to apply a constraint to a normalization parameters wrt to another one from a different signal region in a later step. However I have a few problems defining the DSCB as an external function. I have checked the tutorials but I found only examples where predefined functions are used to fit histograms using Roofit. What should I do to define the DSCB as a RooAbsPdf or a RooGenericPdf or something that could be used from Roofit?

DCB.C (2.2 KB)

I would appreciate any kind of help,
Best wishes,

Hi Giorgios,

Attached you find your macro completed with the RooFit code for the Double sided Crystal Ball. You would need to use ROOT version 6.24 for this to work

DCB.C (2.7 KB)

Hi Lorenzo,

thank you very much for your help! With the correct version of ROOT I managed to run the RooFit code you provided! Thank you very much :slight_smile:


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