ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/interface/fitInfo.hpp
(Generate patch)

Comparing UserCode/VHbb/interface/fitInfo.hpp (file contents):
Revision 1.2 by bortigno, Wed May 2 19:20:07 2012 UTC vs.
Revision 1.3 by bortigno, Tue May 8 08:13:57 2012 UTC

# Line 139 | Line 139 | class fitInfo{
139        templates.push_back( new RooDataHist((s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),(s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(), RooArgList(*var), cr->histo(fixedTemplateNames.at(i) )));
140        if(!SF) tr_vars.push_back( new RooRealVar(("tr_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),("tr_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(), cr->count(fixedTemplateNames.at(i))/cr_signal->count(fixedTemplateNames.at(i))) );
141        else tr_vars.push_back( new RooRealVar(("tr_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),("tr_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(), cr->count(fixedTemplateNames.at(i)) ) );
142      //tr_vars.push_back( new RooRealVar(("tr_"+s_region+"cr_"+fixedTemplateNames.at(i)).c_str(),("tr_"+s_region+"cr_"+fixedTemplateNames.at(i)).c_str(), cr->count(fixedTemplateNames.at(i)) ) );
142        fit_vars.push_back( new RooFormulaVar(("fit_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),("fit_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),"@0*@1", RooArgList(*f_vars.at(i),*tr_vars.at(i) ) ) );
143        pdfs.push_back( new RooHistPdf(  ("pdf_"+fixedTemplateNames.at(i)+"_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(),("pdf_"+fixedTemplateNames.at(i)+"_"+s_region+"_cr_"+fixedTemplateNames.at(i)).c_str(), RooArgList(*var), *templates.at(i) ) );
144 +
145        pdfList->addOwned(*pdfs.at(i));
146        varList->addOwned(*fit_vars.at(i));
147      }
# Line 152 | Line 152 | class fitInfo{
152        templates.push_back( new RooDataHist((s_region+"_cr_"+templateNames.at(i)).c_str(),(s_region+"_cr_"+templateNames.at(i)).c_str(), RooArgList(*var), cr->histo(templateNames.at(i))));
153        if(!SF) tr_vars.push_back( new RooRealVar(("tr_"+s_region+"_cr_"+templateNames.at(i)).c_str(),("tr_"+s_region+"_cr_"+templateNames.at(i)).c_str(), cr->count(templateNames.at(i))/cr_signal->count(templateNames.at(i))) );
154        else tr_vars.push_back( new RooRealVar(("tr_"+s_region+"_cr_"+templateNames.at(i)).c_str(),("tr_"+s_region+"_cr_"+templateNames.at(i)).c_str(), cr->count(templateNames.at(i)) ) );
155      //tr_vars.push_back( new RooRealVar(("tr_"+s_region+"_cr_"+templateNames.at(i)).c_str(),("tr_"+s_region+"cr_"+templateNames.at(i)).c_str(), cr->count(templateNames.at(i)) ) );
155        fit_vars.push_back( new RooFormulaVar(("fit_"+s_region+"_cr_"+templateNames.at(i)).c_str(),("fit_"+s_region+"_cr_"+templateNames.at(i)).c_str(),"@0*@1", RooArgList(*f_vars.at(j),*tr_vars.at(j) ) ) );
156        pdfs.push_back( new RooHistPdf(  ("pdf_"+templateNames.at(i)+"_"+s_region+"_cr_"+templateNames.at(i)).c_str(),("pdf_"+templateNames.at(i)+"_"+s_region+"_cr_"+templateNames.at(i)).c_str(), RooArgList(*var), *templates.at(j) ) );
157 +
158        pdfList->addOwned(*pdfs.at(j));
159        varList->addOwned(*fit_vars.at(j));
160      }
161  
162      pdfList->Print();
163      varList->Print();
164 <    model = new RooAddPdf( ("model_"+s_region+s_var).c_str(),("model_"+s_region+s_var).c_str(), *pdfList, *varList, kFALSE );
164 >    model = new RooAddPdf( ("model_"+s_region+s_var+s_suffix).c_str(),("model_"+s_region+s_var+s_suffix).c_str(), *pdfList, *varList, kFALSE );
165    }
166  
167  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines