44 MonitorElement *hSumEta[4], *hSumPhi[4], *hPurityEta[3], *hPurityPhi[3];
47 for (
int i = 0;
i < 4; ++
i) {
48 sprintf(name,
"/heta%s", types[
i].c_str());
50 int nbinEta = igetter.
get(hname1)->
getTH1F()->GetNbinsX();
51 double xminEta = igetter.
get(hname1)->
getTH1F()->GetBinLowEdge(1);
53 igetter.
get(hname1)->
getTH1F()->GetBinLowEdge(nbinEta) + igetter.
get(hname1)->
getTH1F()->GetBinWidth(nbinEta);
54 sprintf(name,
"/hphi%s", types[
i].c_str());
56 int nbinPhi = igetter.
get(hname2)->
getTH1F()->GetNbinsX();
57 double xminPhi = igetter.
get(hname2)->
getTH1F()->GetBinLowEdge(1);
59 igetter.
get(hname2)->
getTH1F()->GetBinLowEdge(nbinEta) + igetter.
get(hname2)->
getTH1F()->GetBinWidth(nbinEta);
60 sprintf(name,
"hSum%sEta", types[
i].c_str());
61 hSumEta[
i] = ibooker.
book1D(name, name, nbinEta, xminEta, xmaxEta);
62 sprintf(name,
"hSum%sPhi", types[
i].c_str());
63 hSumPhi[
i] = ibooker.
book1D(name, name, nbinPhi, xminPhi, xmaxPhi);
65 sprintf(name,
"hPurity%sEta", types[
i].c_str());
66 sprintf(title,
"Purity of %s sample vs #eta", types[
i].c_str());
67 hPurityEta[
i] = ibooker.
book1D(name, title, nbinEta, xminEta, xmaxEta);
68 sprintf(name,
"hPurity%sPhi", types[
i].c_str());
69 sprintf(title,
"Purity of %s sample vs #phi", types[
i].c_str());
70 hPurityPhi[
i] = ibooker.
book1D(name, title, nbinPhi, xminPhi, xmaxPhi);
74 for (
int i = 0;
i < 4; ++
i) {
75 sprintf(name,
"/heta%s", types[
i].c_str());
78 std::cout <<
"PostProcesor " << hname1 <<
" " << igetter.
get(hname1) << std::endl;
81 sprintf(name,
"/hphi%s", types[
i].c_str());
84 std::cout <<
"PostProcesor " << hname2 <<
" " << igetter.
get(hname2) << std::endl;
89 for (
int i = 0;
i < 3; ++
i) {
90 hPurityEta[
i]->
getTH1F()->Divide(hSumEta[
i + 1]->getTH1F(), hSumEta[
i]->getTH1F(), 1, 1);
91 hPurityPhi[
i]->
getTH1F()->Divide(hSumPhi[
i + 1]->getTH1F(), hSumPhi[
i]->getTH1F(), 1, 1);
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getUntrackedParameter(std::string const &, T const &) const
virtual TH1F * getTH1F() const
DQMHcalIsoTrackPostProcessor(const edm::ParameterSet &pset)
bool dirExists(std::string const &path)
#define DEFINE_FWK_MODULE(type)
~DQMHcalIsoTrackPostProcessor() override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::string const & pwd()
MonitorElement * get(std::string const &path)