Hello,

Sorry to ask this question again (And I think it is better to move here).

So, I followed Wouter’s instructions in

http://root.cern.ch/phpBB2/viewtopic.php?t=7539&highlight=

To be simple, I just used a single Gaussian for the K factor, but it doesn’t work. I expect that after doing the Mellin convolution, the k is ntegrated out, and the pdf (versus t) should be something like exponential convoluted with a Gaussian. But what I obtained is a flat line. Did I do something wrong?

[code]void tesMellinCov(){

using namespace RooFit;

RooRealVar *t = new RooRealVar( “t”, “proper time”, -0.5 , 10.0 , “ps” );

RooRealVar *st = new RooRealVar(“st”, “proper time resolution”, 0.05, 0.10, “ps” );

RooRealVar *k = new RooRealVar( “k”, “k factor”, 0.3 , 3.0 );

RooRealVar *Tau = new RooRealVar(“Tau”, “lifetime”, 1.5, 0.1, 3.0, “ps”);

RooRealVar *TauResScale = new RooRealVar(“TauResScale”,“resolutions scale”,1.185, 0.5, 3);

RooRealVar *TauResBias = new RooRealVar(“TauResBias”,“bias”,0.,-5,5);

RooRealVar *TauResBiasScale = new RooRealVar(“TauResBiasScale”,“bias scale”,1.0,0.5,3);

RooResolutionModel *TauRes = new RooGaussModel(“TauRes”,“resolution model”,

*t,*TauResBias,*st,*TauResBiasScale,*TauResScale);

// Exp(t|tau) fConv Gau(st) — fConv: Fourier convolution

RooAbsPdf *TauPdf = new RooDecay(“BcTauPdf”, “proper time pdf”, *t, *Tau, *TauRes,RooDecay::SingleSided);

TauResBias->setConstant(kTRUE);

TauResBiasScale->setConstant(kTRUE);

// Take into account K factor

RooFormulaVar *PseudoTau = new RooFormulaVar(“PseudoTau”, “pseudo lifetime”, "k*Tau", RooArgSet(*k,*Tau));

RooAbsPdf *PseudoTauPdf = new RooDecay(“PseudoTauPdf”, “proper time pdf”, *t, *PseudoTau, *TauRes, RooDecay::SingleSided);

// K factor distribution, one Gaussian

RooRealVar *gauMean = new RooRealVar( “gauMean” , “mean” , 1.0, 0.8, 1.2 );

RooRealVar *gauSigma = new RooRealVar( “gauSigma”, “sigma”, 0.2, 0.1, 0.3 );

RooAbsPdf *kPdf = new RooGaussian(“kPdf”, “k distribution”, *k, *gauMean, *gauSigma) ;

// [ Exp(t|k*tau) fConv Gau(st)] mConv Gau(k) — mConv: Mellin convolution, k integrated out

k->setBins(10000,“cache”) ;

RooAbsPdf *PseudoPdf = new RooFFTConvPdf(“PseudoPdf”, “PseudoPdf”, *k, *PseudoTauPdf, *kPdf );

RooPlot *tframe = t->frame();

PseudoPdf->plotOn(tframe);

tframe->Draw();

}[/code]

Thank you very much.

Cheers, Jibo