5 #include "RooGlobalFunc.h" 6 #include "RooRealVar.h" 7 #include "RooDataSet.h" 8 #include "RooBreitWigner.h" 9 #include "RooDataHist.h" 10 #include "RooFitResult.h" 28 verbose_ = parameters_.getParameter<
bool>(
"verbose");
30 if(verbose_)
cout <<
">>> Constructor (PhotonDataCertification) <<<" << endl;
44 if (verbose_)
std::cout <<
">>> endJob (PhotonDataCertification) <<<" << std::endl;
48 reportSummary_ = ibooker.
bookFloat(
"reportSummary");
49 reportSummaryMap_ = ibooker.
book2D(
"reportSummaryMap",
"reportSummaryMap",3,0,3,1,0,1);
51 TH2F * reportSummaryMapTH2 = reportSummaryMap_->
getTH2F();
52 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"EB");
53 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"EE");
54 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Total");
55 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"InvMassTest");
57 float EBResult = invMassZtest(
"Egamma/stdPhotonAnalyzer/InvMass/h_02_invMassIsoPhotonsEBarrel",
58 "invMassIsolatedPhotonsEB", igetter);
60 float EEResult = invMassZtest(
"Egamma/stdPhotonAnalyzer/InvMass/h_03_invMassIsoPhotonsEEndcap",
61 "invMassIsolatedPhotonsEE", igetter);
63 float AllResult = invMassZtest(
"Egamma/stdPhotonAnalyzer/InvMass/h_01_invMassAllIsolatedPhotons",
64 "invMassAllIsolatedPhotons", igetter);
67 std::cout <<
"EBResult: " << EBResult << std::endl;
68 std::cout <<
"EEResult: " << EEResult << std::endl;
69 std::cout <<
"AllResult: " << AllResult << std::endl;
72 reportSummaryMapTH2->SetBinContent(1, 1, EBResult);
73 reportSummaryMapTH2->SetBinContent(2, 1, EEResult);
74 reportSummaryMapTH2->SetBinContent(3, 1, AllResult);
75 reportSummary_->Fill(AllResult);
84 TestElem = igetter.
get(path);
85 if (TestElem == 0)
return 0;
86 TH1F *TestHist = TestElem->
getTH1F();
87 if (TestHist == 0)
return 0;
89 RooRealVar
mass(
"mass",
"Mass_{2#gamma}", 0, 200,
"GeV");
90 RooRealVar mRes(
"M_{Z}",
"Z Mass", ZMass, 70, 110);
91 RooRealVar
gamma(
"#Gamma",
"#Gamma", ZWidth, 0, 10.0);
92 RooBreitWigner BreitWigner(
"BreitWigner",
"Breit-Wigner", mass, mRes, gamma);
93 RooDataHist
test(name, name, mass, TestHist);
95 BreitWigner.fitTo(test,
RooFit::Range(80, 100),RooFit::PrintLevel(-1000));
97 if (
std::abs(mRes.getValV() - ZMass) < ZWidth) {
99 }
else if (
std::abs(mRes.getValV() - ZMass) < gamma.getValV()) {
static PFTauRenderPlugin instance
PhotonDataCertification(const edm::ParameterSet &pset)
MonitorElement * get(const std::string &path)
float invMassZtest(std::string path, TString name, DQMStore::IGetter &)
PixelRecoRange< float > Range
Abs< T >::type abs(const T &t)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
TH1F * getTH1F(void) const
~PhotonDataCertification()
MonitorElement * bookFloat(Args &&...args)
TH2F * getTH2F(void) const
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override