PhysicsTools
TagAndProbe
src
ZGeneratorLineShape.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/TagAndProbe/interface/ZGeneratorLineShape.h
"
2
3
ClassImp
(
ZGeneratorLineShape
);
4
5
ZGeneratorLineShape::ZGeneratorLineShape
(
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
14
ZGeneratorLineShape::ZGeneratorLineShape
(
const
ZGeneratorLineShape
&
other
,
const
char
*
name
)
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:209
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:72
trackingPlots.other
other
Definition:
trackingPlots.py:1460
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
Generated for CMSSW Reference Manual by
1.8.16