33 for (
int i = 0;
i < 2; ++
i)
34 for (
int j = 0; j < 2; ++j) {
35 hRecOCC_[
i][j] =
nullptr;
36 hRecNHit_[
i][j] =
nullptr;
37 hEng_[
i][j] =
nullptr;
38 hEvEng_[
i][j] =
nullptr;
39 hEnDensity_[
i][
i] =
nullptr;
40 hGoodRecNHit_[
i][j] =
nullptr;
42 hSelEng_[
i][j] =
nullptr;
43 hSelOCC_[
i][j] =
nullptr;
44 hSelEnDensity_[
i][j] =
nullptr;
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 hGoodRecNHit_[
i][j] = iBooker.
book1DD(histo, histo, 60, 0, 1920);
81 hGoodRecNHit_[
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_GoodRecHits[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_GoodRecHits[
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 sum_GoodRecHits[
i][j]++;
155 hSelEng_[
i][j]->Fill(hitItr->energy());
156 hSelEnDensity_[
i][j]->Fill(ix, iy, hitItr->energy());
157 hSelOCC_[
i][j]->Fill(ix, iy);
162 LogWarning(
"ESOccupancyTask") <<
"RecHitCollection not available";
166 for (
int i = 0;
i < 2; ++
i)
167 for (
int j = 0; j < 2; ++j) {
169 hRecNHit_[
i][j]->Fill(sum_RecHits[
i][j]);
170 hGoodRecNHit_[
i][j]->Fill(sum_GoodRecHits[
i][j]);
171 hEvEng_[
i][j]->Fill(sum_Energy[
i][j]);
174 hRecOCC_[
i][j]->setBinContent(40,40,eCount_);
175 hEnDensity_[
i][j]->setBinContent(40,40,eCount_);
177 hSelOCC_[
i][j]->setBinContent(40,40,eCount_);
178 hSelEnDensity_[
i][j]->setBinContent(40,40,eCount_);
181 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
182 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
void analyze(const edm::Event &, const edm::EventSetup &) override
ESOccupancyTask(const edm::ParameterSet &ps)
const_iterator end() const
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)
const_iterator begin() const