CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
ZGeneratorLineShape Class Reference

#include <ZGeneratorLineShape.h>

Inheritance diagram for ZGeneratorLineShape:

Public Member Functions

virtual TObject * clone (const char *newname) const
 
Double_t evaluate () const
 
 ZGeneratorLineShape ()
 
 ZGeneratorLineShape (const char *name, const char *title, RooAbsReal &_m, const char *genfile="ZeeGenLevel.root", const char *histoName="Mass")
 
 ZGeneratorLineShape (const ZGeneratorLineShape &other, const char *name)
 
 ~ZGeneratorLineShape ()
 

Protected Attributes

RooDataHist * dataHist
 
RooRealProxy m
 

Detailed Description

Definition at line 10 of file ZGeneratorLineShape.h.

Constructor & Destructor Documentation

ZGeneratorLineShape::ZGeneratorLineShape ( )
inline

Definition at line 13 of file ZGeneratorLineShape.h.

Referenced by clone().

13 {} ;
ZGeneratorLineShape::ZGeneratorLineShape ( const char *  name,
const char *  title,
RooAbsReal &  _m,
const char *  genfile = "ZeeGenLevel.root",
const char *  histoName = "Mass" 
)

Definition at line 5 of file ZGeneratorLineShape.cc.

References hltbtagharvestinganalyzer_cfi::histoName.

8  :
9  RooAbsPdf(name,title),
10  m("m","m", this,_m),
11  dataHist(0)
12 {
13  TFile *f_gen= TFile::Open(genfile);
14  TH1F* mass_th1f = (TH1F*) f_gen->Get(histoName);
15  dataHist = new RooDataHist("Mass_gen", "Mass_gen", _m, mass_th1f );
16  f_gen->Close();
17 }
ZGeneratorLineShape::ZGeneratorLineShape ( const ZGeneratorLineShape other,
const char *  name 
)

Definition at line 20 of file ZGeneratorLineShape.cc.

20  :
21  RooAbsPdf(other,name),
22  m("m", this,other.m),
23  dataHist(other.dataHist)
24 {
25 }
ZGeneratorLineShape::~ZGeneratorLineShape ( )
inline

Definition at line 22 of file ZGeneratorLineShape.h.

22 {};

Member Function Documentation

virtual TObject* ZGeneratorLineShape::clone ( const char *  newname) const
inlinevirtual

Definition at line 21 of file ZGeneratorLineShape.h.

References ZGeneratorLineShape().

21 { return new ZGeneratorLineShape(*this,newname);}
Double_t ZGeneratorLineShape::evaluate ( ) const

Definition at line 28 of file ZGeneratorLineShape.cc.

References dataHist, and m.

28  {
29 
30  // std::cout<<"gen shape: m, evaluate= "<<m<<", "<<dataHist->weight(m.arg())<<std::endl;
31  return dataHist->weight(m.arg()) ;
32 }

Member Data Documentation

RooDataHist* ZGeneratorLineShape::dataHist
protected

Definition at line 27 of file ZGeneratorLineShape.h.

Referenced by evaluate().

RooRealProxy ZGeneratorLineShape::m
protected

Definition at line 26 of file ZGeneratorLineShape.h.

Referenced by evaluate().