45 MonitorElement *hSumEta[4], *hSumPhi[4], *hPurityEta[3], *hPurityPhi[3];
48 for (
int i = 0;
i < 4; ++
i) {
49 sprintf(name,
"/heta%s", types[
i].c_str());
51 int nbinEta = igetter.
get(hname1)->
getTH1F()->GetNbinsX();
52 double xminEta = igetter.
get(hname1)->
getTH1F()->GetBinLowEdge(1);
54 igetter.
get(hname1)->
getTH1F()->GetBinLowEdge(nbinEta) + igetter.
get(hname1)->
getTH1F()->GetBinWidth(nbinEta);
55 sprintf(name,
"/hphi%s", types[
i].c_str());
57 int nbinPhi = igetter.
get(hname2)->
getTH1F()->GetNbinsX();
58 double xminPhi = igetter.
get(hname2)->
getTH1F()->GetBinLowEdge(1);
60 igetter.
get(hname2)->
getTH1F()->GetBinLowEdge(nbinEta) + igetter.
get(hname2)->
getTH1F()->GetBinWidth(nbinEta);
61 sprintf(name,
"hSum%sEta", types[
i].c_str());
62 hSumEta[
i] = ibooker.
book1D(name, name, nbinEta, xminEta, xmaxEta);
63 sprintf(name,
"hSum%sPhi", types[
i].c_str());
64 hSumPhi[
i] = ibooker.
book1D(name, name, nbinPhi, xminPhi, xmaxPhi);
66 sprintf(name,
"hPurity%sEta", types[
i].c_str());
67 sprintf(title,
"Purity of %s sample vs #eta", types[
i].c_str());
68 hPurityEta[
i] = ibooker.
book1D(name, title, nbinEta, xminEta, xmaxEta);
69 sprintf(name,
"hPurity%sPhi", types[
i].c_str());
70 sprintf(title,
"Purity of %s sample vs #phi", types[
i].c_str());
71 hPurityPhi[
i] = ibooker.
book1D(name, title, nbinPhi, xminPhi, xmaxPhi);
75 for (
int i = 0;
i < 4; ++
i) {
76 sprintf(name,
"/heta%s", types[
i].c_str());
79 std::cout <<
"PostProcesor " << hname1 <<
" " << igetter.
get(hname1) << std::endl;
82 sprintf(name,
"/hphi%s", types[
i].c_str());
85 std::cout <<
"PostProcesor " << hname2 <<
" " << igetter.
get(hname2) << std::endl;
90 for (
int i = 0;
i < 3; ++
i) {
91 hPurityEta[
i]->
getTH1F()->Divide(hSumEta[
i + 1]->getTH1F(), hSumEta[
i]->getTH1F(), 1, 1);
92 hPurityPhi[
i]->
getTH1F()->Divide(hSumPhi[
i + 1]->getTH1F(), hSumPhi[
i]->getTH1F(), 1, 1);
T getUntrackedParameter(std::string const &, T const &) const
DQMHcalIsoTrackPostProcessor(const edm::ParameterSet &pset)
#define DEFINE_FWK_MODULE(type)
MonitorElement * book1D(Args &&...args)
~DQMHcalIsoTrackPostProcessor() override
MonitorElement * get(std::string const &path)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::string const & pwd()
bool dirExists(std::string const &path)