CMS 3D CMS Logo

ZGeneratorLineShape.cc
Go to the documentation of this file.
2 
4 
6  const char* name, const char* title, RooAbsReal& _m, const char* genfile, const char* histoName)
7  : RooAbsPdf(name, title), m("m", "m", this, _m), dataHist(nullptr) {
8  TFile* f_gen = TFile::Open(genfile);
9  TH1F* mass_th1f = (TH1F*)f_gen->Get(histoName);
10  dataHist = new RooDataHist("Mass_gen", "Mass_gen", _m, mass_th1f);
11  f_gen->Close();
12 }
13 
15  : RooAbsPdf(other, name), m("m", this, other.m), dataHist(other.dataHist) {}
16 
17 Double_t ZGeneratorLineShape::evaluate() const {
18  // std::cout<<"gen shape: m, evaluate= "<<m<<", "<<dataHist->weight(m.arg())<<std::endl;
19  return dataHist->weight(m.arg());
20 }
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
ClassImp
ClassImp(ZGeneratorLineShape)
ZGeneratorLineShape
Definition: ZGeneratorLineShape.h:10
ZGeneratorLineShape.h
ZGeneratorLineShape::ZGeneratorLineShape
ZGeneratorLineShape()
Definition: ZGeneratorLineShape.h:12
hgcalDigitizer_cfi._m
_m
Definition: hgcalDigitizer_cfi.py:211
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
trackingPlots.other
other
Definition: trackingPlots.py:1464
ZGeneratorLineShape::dataHist
RooDataHist * dataHist
Definition: ZGeneratorLineShape.h:28
ZGeneratorLineShape::m
RooRealProxy m
Definition: ZGeneratorLineShape.h:27
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17