Skip to content

Commit be6c3e3

Browse files
committed
signal DSCB pdf
1 parent fb66101 commit be6c3e3

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

PWGHF/D2H/Macros/HFInvMassFitter.cxx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "HFInvMassFitter.h"
2323

2424
#include <RooAddPdf.h>
25+
#include <RooCrystalBall.h>
2526
#include <RooDataHist.h>
2627
#include <RooExponential.h>
2728
#include <RooFitResult.h>
@@ -516,6 +517,29 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
516517
RooAbsPdf* reflFuncDoubleGaus = new RooAddPdf("reflFuncDoubleGaus", "reflection pdf", RooArgList(gausRefl1, gausRefl2), fracRefl);
517518
workspace.import(*reflFuncDoubleGaus);
518519
delete reflFuncDoubleGaus;
520+
// signal DSCB pdf
521+
const ParameterRanges dscbAlphaLParamRanges{mDscbAlphaLLowLimit, mDscbAlphaLUpLimit, mDscbAlphaLInitialValue};
522+
const ParameterRanges dscbNLParamRanges{mDscbNLLowLimit, mDscbNLUpLimit, mDscbNLInitialValue};
523+
const ParameterRanges dscbAlphaRParamRanges{mDscbAlphaRLowLimit, mDscbAlphaRUpLimit, mDscbAlphaRInitialValue};
524+
const ParameterRanges dscbNRParamRanges{mDscbNRLowLimit, mDscbNRUpLimit, mDscbNRInitialValue};
525+
RooRealVar alphaL("alphaL", "left tail alpha", randomizeInitialParameter(dscbAlphaLParamRanges), dscbAlphaLParamRanges.lower, dscbAlphaLParamRanges.upper);
526+
RooRealVar nL("nL", "left tail n", randomizeInitialParameter(dscbNLParamRanges), dscbNLParamRanges.lower, dscbNLParamRanges.upper);
527+
RooRealVar alphaR("alphaR", "right tail alpha", randomizeInitialParameter(dscbAlphaRParamRanges), dscbAlphaRParamRanges.lower, dscbAlphaRParamRanges.upper);
528+
RooRealVar nR("nR", "right tail n", randomizeInitialParameter(dscbNRParamRanges), dscbNRParamRanges.lower, dscbNRParamRanges.upper);
529+
if (mFixedDscbTailParams) {
530+
printf("Fixing DSCB tail parameters to initial values.\n");
531+
alphaL.setVal(mDscbAlphaLInitialValue);
532+
alphaL.setConstant(true);
533+
alphaR.setVal(mDscbAlphaRInitialValue);
534+
alphaR.setConstant(true);
535+
nL.setVal(mDscbNLInitialValue);
536+
nL.setConstant(true);
537+
nR.setVal(mDscbNRInitialValue);
538+
nR.setConstant(true);
539+
}
540+
RooAbsPdf* sgnFuncDSCB = new RooCrystalBall("sgnFuncDSCB", "double sided crystal ball signal", mass, mean, sigma, alphaL, nL, alphaR, nR);
541+
workspace.import(*sgnFuncDSCB);
542+
delete sgnFuncDSCB;
519543
// reflection poly3
520544
const ParameterRanges polyReflParam0ParamRanges{-1., 1., 0.5, 0.1};
521545
RooRealVar const polyReflParam0("polyReflParam0", "polyReflParam0", randomizeInitialParameter(polyReflParam0ParamRanges), polyReflParam0ParamRanges.lower, polyReflParam0ParamRanges.upper);

PWGHF/D2H/Macros/config_massfitter.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@
155155
"0 for SingleGaus",
156156
"1 for DoubleGaus",
157157
"2 for DoubleGausSigmaRatioPar",
158-
"3 for GausSec"
158+
"3 for GausSec",
159+
"4 for DoubleSidedCrystalBall"
159160
],
160161
"DrawBgPrefit": true,
161162
"HighlightPeakRegion": true,

0 commit comments

Comments
 (0)