34 for (
int i = 0;
i < 2; ++
i)
35 for (
int j = 0;
j < 2; ++
j) {
40 hEnDensity_[
i][
i] = 0;
45 hSelEnDensity_[
i][
j] = 0;
48 for (
int i = 0;
i<2; ++
i)
51 dqmStore_->setCurrentFolder(prefixME_ +
"/ESOccupancyTask");
56 for (
int i=0 ;
i<2; ++
i)
57 for (
int j=0 ;
j<2; ++
j) {
58 int iz = (
i==0)? 1:-1;
59 sprintf(histo,
"ES RecHit 2D Occupancy Z %d P %d", iz,
j+1);
60 hRecOCC_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
61 hRecOCC_[
i][
j]->setAxisTitle(
"Si X", 1);
62 hRecOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
65 sprintf(histo,
"ES Energy Density Z %d P %d", iz,
j+1);
66 hEnDensity_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
67 hEnDensity_[
i][
j]->setAxisTitle(
"Si X", 1);
68 hEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
70 sprintf(histo,
"ES Num of RecHits Z %d P %d", iz,
j+1);
71 hRecNHit_[
i][
j] = dqmStore_->book1DD(histo, histo, 60, 0, 1920);
72 hRecNHit_[
i][
j]->setAxisTitle(
"# of RecHits", 1);
73 hRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
75 sprintf(histo,
"ES Num of Good RecHits Z %d P %d", iz,
j+1);
76 hDigiNHit_[
i][
j] = dqmStore_->book1DD(histo, histo, 60, 0, 1920);
77 hDigiNHit_[
i][
j]->setAxisTitle(
"# of good RecHits", 1);
78 hDigiNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
80 sprintf(histo,
"ES RecHit Energy Z %d P %d", iz,
j+1);
81 hEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.001);
82 hEng_[
i][
j]->setAxisTitle(
"RecHit Energy", 1);
83 hEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
85 sprintf(histo,
"ES Event Energy Z %d P %d", iz,
j+1);
86 hEvEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.1);
87 hEvEng_[
i][
j]->setAxisTitle(
"Event Energy", 1);
88 hEvEng_[
i][
j]->setAxisTitle(
"Num of Events", 2);
91 sprintf(histo,
"ES RecHit Energy with selected hits Z %d P %d", iz,
j+1);
92 hSelEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.001);
93 hSelEng_[
i][
j]->setAxisTitle(
"RecHit Energy", 1);
94 hSelEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
96 sprintf(histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j+1);
97 hSelOCC_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
98 hSelOCC_[
i][
j]->setAxisTitle(
"Si X", 1);
99 hSelOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
101 sprintf(histo,
"ES Energy Density with selected hits Z %d P %d", iz,
j+1);
102 hSelEnDensity_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
103 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si X", 1);
104 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
107 hE1E2_[0] = dqmStore_->book2D(
"ES+ EP1 vs EP2",
"ES+ EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
108 hE1E2_[1] = dqmStore_->book2D(
"ES- EP1 vs EP2",
"ES- EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
123 runNum_ = e.
id().
run();
127 int zside, plane, ix, iy;
128 int sum_RecHits[2][2], sum_DigiHits[2][2];
129 float sum_Energy[2][2];
131 for (
int i = 0;
i < 2; ++
i)
132 for (
int j = 0;
j < 2; ++
j) {
133 sum_RecHits[
i][
j] = 0;
134 sum_DigiHits[
i][
j] = 0;
135 sum_Energy[
i][
j] = 0;
150 int i = (zside==1)? 0:1;
154 sum_Energy[
i][
j] += hitItr->energy();
155 hRecOCC_[
i][
j]->Fill(ix, iy);
156 if (hitItr->energy() != 0) {
157 hEng_[
i][
j]->Fill(hitItr->energy());
158 hEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
160 if (hitItr->recoFlag()==14 || hitItr->recoFlag()==1 || (hitItr->recoFlag()<=10 && hitItr->recoFlag()>=5))
continue;
161 hSelEng_[
i][
j]->Fill(hitItr->energy());
162 hSelEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
163 hSelOCC_[
i][
j]->Fill(ix, iy);
168 LogWarning(
"ESOccupancyTask") <<
"RecHitCollection not available";
172 for (
int i = 0;
i < 2; ++
i)
173 for (
int j = 0;
j < 2; ++
j) {
175 hRecNHit_[
i][
j]->Fill(sum_RecHits[
i][
j]);
176 hDigiNHit_[
i][
j]->Fill(sum_DigiHits[
i][j]);
177 hEvEng_[
i][
j]->Fill(sum_Energy[
i][j]);
180 hRecOCC_[
i][
j]->setBinContent(40,40,eCount_);
181 hEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
183 hSelOCC_[
i][
j]->setBinContent(40,40,eCount_);
184 hSelEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
187 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
188 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
virtual ~ESOccupancyTask()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
virtual void endJob(void)
virtual void beginJob(void)
ESOccupancyTask(const edm::ParameterSet &ps)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
DEFINE_FWK_MODULE(CaloMETProducer)