(ROOT version used: 6.20/04 )

I am trying to implement decay time fit with event-level resolution function using Roofit

- I am doing a fit for the decay time of particle to obtain the lifetime.
- For the purpose of my question, consider I only have the signal component.
- so my lifetime pdf is , f(t,dt) = f(dt) X f(t|dt)
- f(dt) is the pdf for error dt in decay time t.
- ** f(t|dt) is a convolution of exponential with a gaussian resolution function using event-level errors in decay time.**

Following are the relevant lines of code I am using to implement event-level resolution function by two methods:

(Full fit macro and datasets are attached , see at the end)

**Method 1:**

```
RooRealVar mean("mean","mean",0.0001,-2,0.007);
RooRealVar sc1("sc1","sc1",1.0,0,2);
RooGaussModel gauss1("gauss1","gauss",t,mean,sc1,dt);
RooDecay decay("decay","lifetime",t,tau,gauss1,RooDecay::SingleSided);
```

**Method2:**

```
RooRealVar mean("mean","mean",0.0001,-2,0.007); // mean/bias
RooRealVar sc1("sc1","sc1",1.0,0,2); // scaling factor
RooFormulaVar sigma_t("sigma_t","sc1*dt",RooArgList(sc1,dt));
RooGaussModel gauss1("gauss1","gauss",t,mean,sigma_t);
RooDecay decay("decay","lifetime",t,tau,gauss1,RooDecay::SingleSided);
```

(All the fits are the unbinned maximum likelihood fits)

The results from the above two are very different:

**Fit results Method1:**

Note the value of lifetime **tau and the mean**

The value of mean doesn’t make sense as it is expected to be of the same order as lifetime tau.

**Fit results Method2:**

**The value of tau is different by -0.93 X 10-6**

What is the correct method and why are the two results different ??

Any feedback will be appreciated

Fit macro for method1: ds_lifetime_1.C (9.1 KB)

Fit macro for method2: ds_lifetime_2.C (9.1 KB)

data files:

signal_2dSR_2.txt (1.5 MB)

signal_2dSR_1.txt (1.5 MB)