33 for (
int i = 0;
i < 2; ++
i)
34 for (
int j = 0;
j < 2; ++
j) {
39 hEnDensity_[
i][
i] = 0;
44 hSelEnDensity_[
i][
j] = 0;
47 for (
int i = 0;
i<2; ++
i)
59 for (
int i=0 ;
i<2; ++
i)
60 for (
int j=0 ;
j<2; ++
j) {
61 int iz = (
i==0)? 1:-1;
62 sprintf(histo,
"ES RecHit 2D Occupancy Z %d P %d", iz,
j+1);
63 hRecOCC_[
i][
j] = iBooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
65 hRecOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
68 sprintf(histo,
"ES Energy Density Z %d P %d", iz,
j+1);
69 hEnDensity_[
i][
j] = iBooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
71 hEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
73 sprintf(histo,
"ES Num of RecHits Z %d P %d", iz,
j+1);
74 hRecNHit_[
i][
j] = iBooker.
book1DD(histo, histo, 60, 0, 1920);
76 hRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
78 sprintf(histo,
"ES Num of Good RecHits Z %d P %d", iz,
j+1);
79 hDigiNHit_[
i][
j] = iBooker.
book1DD(histo, histo, 60, 0, 1920);
81 hDigiNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
83 sprintf(histo,
"ES RecHit Energy Z %d P %d", iz,
j+1);
84 hEng_[
i][
j] = iBooker.
book1DD(histo, histo, 50, 0, 0.001);
86 hEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
88 sprintf(histo,
"ES Event Energy Z %d P %d", iz,
j+1);
89 hEvEng_[
i][
j] = iBooker.
book1DD(histo, histo, 50, 0, 0.1);
91 hEvEng_[
i][
j]->setAxisTitle(
"Num of Events", 2);
94 sprintf(histo,
"ES RecHit Energy with selected hits Z %d P %d", iz,
j+1);
95 hSelEng_[
i][
j] = iBooker.
book1DD(histo, histo, 50, 0, 0.001);
97 hSelEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
99 sprintf(histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j+1);
100 hSelOCC_[
i][
j] = iBooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
102 hSelOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
104 sprintf(histo,
"ES Energy Density with selected hits Z %d P %d", iz,
j+1);
105 hSelEnDensity_[
i][
j] = iBooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
107 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
110 hE1E2_[0] = iBooker.
book2D(
"ES+ EP1 vs EP2",
"ES+ EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
111 hE1E2_[1] = iBooker.
book2D(
"ES- EP1 vs EP2",
"ES- EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
116 runNum_ = e.
id().
run();
120 int zside, plane, ix, iy;
121 int sum_RecHits[2][2], sum_DigiHits[2][2];
122 float sum_Energy[2][2];
124 for (
int i = 0;
i < 2; ++
i)
125 for (
int j = 0;
j < 2; ++
j) {
126 sum_RecHits[
i][
j] = 0;
127 sum_DigiHits[
i][
j] = 0;
128 sum_Energy[
i][
j] = 0;
143 int i = (zside==1)? 0:1;
147 sum_Energy[
i][
j] += hitItr->energy();
148 hRecOCC_[
i][
j]->Fill(ix, iy);
149 if (hitItr->energy() != 0) {
150 hEng_[
i][
j]->Fill(hitItr->energy());
151 hEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
153 if (hitItr->recoFlag()==14 || hitItr->recoFlag()==1 || (hitItr->recoFlag()<=10 && hitItr->recoFlag()>=5))
continue;
154 hSelEng_[
i][
j]->Fill(hitItr->energy());
155 hSelEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
156 hSelOCC_[
i][
j]->Fill(ix, iy);
161 LogWarning(
"ESOccupancyTask") <<
"RecHitCollection not available";
165 for (
int i = 0;
i < 2; ++
i)
166 for (
int j = 0;
j < 2; ++
j) {
168 hRecNHit_[
i][
j]->Fill(sum_RecHits[
i][
j]);
169 hDigiNHit_[
i][
j]->Fill(sum_DigiHits[
i][j]);
170 hEvEng_[
i][
j]->Fill(sum_Energy[
i][j]);
173 hRecOCC_[
i][
j]->setBinContent(40,40,eCount_);
174 hEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
176 hSelOCC_[
i][
j]->setBinContent(40,40,eCount_);
177 hSelEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
180 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
181 hE1E2_[1]->Fill(sum_Energy[1][0], sum_Energy[1][1]);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
ESOccupancyTask(const edm::ParameterSet &ps)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * book1DD(Args &&...args)