Skip to content

Commit 683f0f1

Browse files
committed
signal DSCB pdf
1 parent 6859e4a commit 683f0f1

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