31 for (
int i = 0;
i < 2; ++
i)
32 for (
int j = 0;
j < 2; ++
j) {
33 hRecOCC_[
i][
j] =
nullptr;
34 hRecNHit_[
i][
j] =
nullptr;
35 hEng_[
i][
j] =
nullptr;
36 hEvEng_[
i][
j] =
nullptr;
37 hEnDensity_[
i][
i] =
nullptr;
38 hGoodRecNHit_[
i][
j] =
nullptr;
40 hSelEng_[
i][
j] =
nullptr;
41 hSelOCC_[
i][
j] =
nullptr;
42 hSelEnDensity_[
i][
j] =
nullptr;
45 for (
int i = 0;
i < 2; ++
i)
55 for (
int i = 0;
i < 2; ++
i)
56 for (
int j = 0;
j < 2; ++
j) {
57 int iz = (
i == 0) ? 1 : -1;
58 sprintf(
histo,
"ES RecHit 2D Occupancy Z %d P %d", iz,
j + 1);
61 hRecOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
64 sprintf(
histo,
"ES Energy Density Z %d P %d", iz,
j + 1);
67 hEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
69 sprintf(
histo,
"ES Num of RecHits Z %d P %d", iz,
j + 1);
72 hRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
74 sprintf(
histo,
"ES Num of Good RecHits Z %d P %d", iz,
j + 1);
77 hGoodRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
79 sprintf(
histo,
"ES RecHit Energy Z %d P %d", iz,
j + 1);
82 hEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
84 sprintf(
histo,
"ES Event Energy Z %d P %d", iz,
j + 1);
87 hEvEng_[
i][
j]->setAxisTitle(
"Num of Events", 2);
90 sprintf(
histo,
"ES RecHit Energy with selected hits Z %d P %d", iz,
j + 1);
93 hSelEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
95 sprintf(
histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j + 1);
98 hSelOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
100 sprintf(
histo,
"ES Energy Density with selected hits Z %d P %d", iz,
j + 1);
103 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
106 hE1E2_[0] = iBooker.
book2D(
"ES+ EP1 vs EP2",
"ES+ EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
107 hE1E2_[1] = iBooker.
book2D(
"ES- EP1 vs EP2",
"ES- EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
111 runNum_ =
e.id().run();
115 int zside, plane, ix, iy;
116 int sum_RecHits[2][2], sum_GoodRecHits[2][2];
117 float sum_Energy[2][2];
119 for (
int i = 0;
i < 2; ++
i)
120 for (
int j = 0;
j < 2; ++
j) {
121 sum_RecHits[
i][
j] = 0;
122 sum_GoodRecHits[
i][
j] = 0;
123 sum_Energy[
i][
j] = 0;
127 if (
e.getByToken(rechittoken_, ESRecHit)) {
136 int i = (
zside == 1) ? 0 : 1;
140 sum_Energy[
i][
j] += hitItr->energy();
141 hRecOCC_[
i][
j]->Fill(ix, iy);
142 if (hitItr->energy() != 0) {
143 hEng_[
i][
j]->Fill(hitItr->energy());
144 hEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
146 if (hitItr->recoFlag() == 14 || hitItr->recoFlag() == 1 ||
147 (hitItr->recoFlag() <= 10 && hitItr->recoFlag() >= 5))
149 sum_GoodRecHits[
i][
j]++;
150 hSelEng_[
i][
j]->Fill(hitItr->energy());
151 hSelEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
152 hSelOCC_[
i][
j]->Fill(ix, iy);
156 LogWarning(
"ESOccupancyTask") <<
"RecHitCollection not available";
160 for (
int i = 0;
i < 2; ++
i)
161 for (
int j = 0;
j < 2; ++
j) {
162 hRecNHit_[
i][
j]->Fill(sum_RecHits[
i][
j]);
163 hGoodRecNHit_[
i][
j]->Fill(sum_GoodRecHits[
i][
j]);
164 hEvEng_[
i][
j]->Fill(sum_Energy[
i][
j]);
167 hRecOCC_[
i][
j]->setBinContent(40, 40, eCount_);
168 hEnDensity_[
i][
j]->setBinContent(40, 40, eCount_);
170 hSelOCC_[
i][
j]->setBinContent(40, 40, eCount_);
171 hSelEnDensity_[
i][
j]->setBinContent(40, 40, eCount_);
174 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
175 hE1E2_[1]->Fill(sum_Energy[1][0], sum_Energy[1][1]);
T getParameter(std::string const &) const
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< EcalRecHit >::const_iterator const_iterator
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
const_iterator begin() const
ESOccupancyTask(const edm::ParameterSet &ps)
Namespace of DDCMS conversion namespace.
const_iterator end() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Log< level::Warning, false > LogWarning
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)