RooHosPdf: Convolution

From: Anil Singh <anil79_at_fnal.gov>
Date: Sat, 26 Sep 2009 15:51:31 +0500

HI All,

I am trying to do following:

  1. Obtain a RooHistPdf from generated Z boson mass (using pythia).
  2. Convolve it with detector resolution function (Gaussian with mean close to zero and some finite width).
  3. Fit the detector level Z (dilepton) invariant mass to above PDF.

Well step 1, and step 2 seem to work fine. But the fit results are kind of strange. The effect of convolution is more to shift the mean of original RooHisPdf, while the width remains almost same. But I think that we expect opposite to happen (the convolved-fitted function should be wider). Any assistance is appreciated. I have attached the plot showing : RooHisPdf, reco level data points(red) and Fitted PDF. Also I am writing my code below.

thanks,
Lovedeep

//==========================================================================================

{
using namespace::RooFit;

//Define a variable to read data

RooRealVar m("m","M_{ee}",80,100);
m.setBins(40);

//Read true data

RooDataSet* d1=RooDataSet::read("Zmass_MC.txt",m);

//Fill in a histogram

RooDataHist data("data","data",m,*d1);

//Obtain PDF from true data

RooHistPdf his("his","his",m,data,4);

//Read Detector level data

RooDataSet* d2=RooDataSet::read("Zmass_reco.txt",m); RooDataHist data2("data2","data2",m,*d2);

//Define gauss fn

RooRealVar mean("mean","mean",0);
RooRealVar width("width","width",3,0,10); RooGaussian gauss("gauss","gauss",m,mean,width);
//Convolve RooHistPDF with gauss fn

RooFFTConvPdf con("con","con",m,his,gauss);

//Define frame

RooPlot* plot = m.frame();

//plot true data

data.plotOn(plot,RooFit::LineColor(kBlue));
//plot pdf of true data

his.plotOn(plot,RooFit::LineColor(kBlue));
//plot reco data

data2.plotOn(plot,RooFit::LineColor(kRed));
//fit convolved function on reco data

con.fitTo((data2));
//plot it on frame

con.plotOn(plot,RooFit::LineColor(kRed)); plot->Draw();
}
//===================================================================================================


      | O son of Kunti ! If you die in battle, you will attain heaven | || And if you win, (you) will attain earth, (so) getup and fight it out ||

Bhagvad Geeta, Chapter: 2, Verse:37


Received on Sat Sep 26 2009 - 12:51:41 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 30 2009 - 17:50:02 CEST