62 std::vector<MonitorElement*> vME;
63 std::vector<std::string> MEStrings = iget_.
getMEs();
64 std::for_each(MEStrings.begin(), MEStrings.end(), [&](
auto&
s) {
s.insert(0,
offsetDir); });
80 std::vector<std::string>::const_iterator it =
std::find(MEStrings.begin(), MEStrings.end(), stitle);
81 if (it == MEStrings.end())
83 mtmp = iget_.
get(stitle);
85 int iavg =
int(avg + 0.5);
94 else if (*
i ==
"mu" && iavg >=
muHigh)
100 stitle = (*i) +
"_mean";
103 vME.push_back(MEmean);
108 for (std::vector<std::string>::const_iterator
j =
pftypes.begin();
j !=
pftypes.end(); ++
j) {
113 else if ((*
i) ==
"mu")
119 mtmp = iget_.
get(stitle);
121 htmp = (TH1F*)hproftmp->ProjectionX();
122 TAxis*
xaxis = (TAxis*)htmp->GetXaxis();
124 hscaled =
new TH1F(stitle.c_str(), stitle.c_str(),
xaxis->GetNbins(),
xaxis->GetXbins()->GetArray());
126 htmp->Scale(
pow(
offsetR, 2) / 2. /
float(avg));
127 for (
int ibin = 1; ibin <= hscaled->GetNbinsX(); ibin++) {
128 hscaled->SetBinContent(ibin, htmp->GetBinContent(ibin) / htmp->GetBinWidth(ibin));
129 hscaled->SetBinError(ibin, htmp->GetBinError(ibin) / htmp->GetBinWidth(ibin));
134 mtmp = ibook_.
book1D(stitle.c_str(), hscaled);
143 for (std::vector<MonitorElement*>::const_iterator
i = vME.begin();
i != vME.end(); ++
i)
T getParameter(std::string const &) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual TProfile * getTProfile() const
virtual void setCurrentFolder(std::string const &fullpath)
virtual std::vector< std::string > getMEs() const
std::string to_string(const V &value)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::string offsetPlotBaseName
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
~OffsetDQMPostProcessor() override
std::vector< std::string > offsetVariableTypes
std::vector< std::string > pftypes
virtual TH1F * getTH1F() const
virtual MonitorElement * get(std::string const &fullpath) const
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
OffsetDQMPostProcessor(const edm::ParameterSet &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Power< A, B >::type pow(const A &a, const B &b)