36 for (
int i = 0;
i < 2; ++
i)
37 for (
int j = 0;
j < 2; ++
j) {
42 hEnDensity_[
i][
i] = 0;
47 hSelEnDensity_[
i][
j] = 0;
50 for (
int i = 0;
i<2; ++
i)
53 dqmStore_->setCurrentFolder(prefixME_ +
"/ESOccupancyTask");
58 for (
int i=0 ;
i<2; ++
i)
59 for (
int j=0 ;
j<2; ++
j) {
60 int iz = (
i==0)? 1:-1;
61 sprintf(histo,
"ES RecHit 2D Occupancy Z %d P %d", iz,
j+1);
62 hRecOCC_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
63 hRecOCC_[
i][
j]->setAxisTitle(
"Si X", 1);
64 hRecOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
67 sprintf(histo,
"ES Energy Density Z %d P %d", iz,
j+1);
68 hEnDensity_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
69 hEnDensity_[
i][
j]->setAxisTitle(
"Si X", 1);
70 hEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
72 sprintf(histo,
"ES Num of RecHits Z %d P %d", iz,
j+1);
73 hRecNHit_[
i][
j] = dqmStore_->book1DD(histo, histo, 60, 0, 1920);
74 hRecNHit_[
i][
j]->setAxisTitle(
"# of RecHits", 1);
75 hRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
77 sprintf(histo,
"ES Num of Good RecHits Z %d P %d", iz,
j+1);
78 hDigiNHit_[
i][
j] = dqmStore_->book1DD(histo, histo, 60, 0, 1920);
79 hDigiNHit_[
i][
j]->setAxisTitle(
"# of good RecHits", 1);
80 hDigiNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
82 sprintf(histo,
"ES RecHit Energy Z %d P %d", iz,
j+1);
83 hEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.001);
84 hEng_[
i][
j]->setAxisTitle(
"RecHit Energy", 1);
85 hEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
87 sprintf(histo,
"ES Event Energy Z %d P %d", iz,
j+1);
88 hEvEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.1);
89 hEvEng_[
i][
j]->setAxisTitle(
"Event Energy", 1);
90 hEvEng_[
i][
j]->setAxisTitle(
"Num of Events", 2);
93 sprintf(histo,
"ES RecHit Energy with selected hits Z %d P %d", iz,
j+1);
94 hSelEng_[
i][
j] = dqmStore_->book1DD(histo, histo, 50, 0, 0.001);
95 hSelEng_[
i][
j]->setAxisTitle(
"RecHit Energy", 1);
96 hSelEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
98 sprintf(histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j+1);
99 hSelOCC_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
100 hSelOCC_[
i][
j]->setAxisTitle(
"Si X", 1);
101 hSelOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
103 sprintf(histo,
"ES Energy Density with selected hits Z %d P %d", iz,
j+1);
104 hSelEnDensity_[
i][
j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
105 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si X", 1);
106 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
109 hE1E2_[0] = dqmStore_->book2D(
"ES+ EP1 vs EP2",
"ES+ EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
110 hE1E2_[1] = dqmStore_->book2D(
"ES- EP1 vs EP2",
"ES- EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
125 runNum_ = e.
id().
run();
129 int zside, plane, ix, iy;
130 int sum_RecHits[2][2], sum_DigiHits[2][2];
131 float sum_Energy[2][2];
133 for (
int i = 0;
i < 2; ++
i)
134 for (
int j = 0;
j < 2; ++
j) {
135 sum_RecHits[
i][
j] = 0;
136 sum_DigiHits[
i][
j] = 0;
137 sum_Energy[
i][
j] = 0;
152 int i = (zside==1)? 0:1;
156 sum_Energy[
i][
j] += hitItr->energy();
157 hRecOCC_[
i][
j]->Fill(ix, iy);
158 if (hitItr->energy() != 0) {
159 hEng_[
i][
j]->Fill(hitItr->energy());
160 hEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
162 if (hitItr->recoFlag()==14 || hitItr->recoFlag()==1 || (hitItr->recoFlag()<=10 && hitItr->recoFlag()>=5))
continue;
163 hSelEng_[
i][
j]->Fill(hitItr->energy());
164 hSelEnDensity_[
i][
j]->Fill(ix, iy, hitItr->energy());
165 hSelOCC_[
i][
j]->Fill(ix, iy);
170 LogWarning(
"ESOccupancyTask") << rechitlabel_ <<
" not available";
174 for (
int i = 0;
i < 2; ++
i)
175 for (
int j = 0;
j < 2; ++
j) {
177 hRecNHit_[
i][
j]->Fill(sum_RecHits[
i][
j]);
178 hDigiNHit_[
i][
j]->Fill(sum_DigiHits[
i][j]);
179 hEvEng_[
i][
j]->Fill(sum_Energy[
i][j]);
182 hRecOCC_[
i][
j]->setBinContent(40,40,eCount_);
183 hEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
185 hSelOCC_[
i][
j]->setBinContent(40,40,eCount_);
186 hSelEnDensity_[
i][
j]->setBinContent(40,40,eCount_);
189 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
190 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()
DEFINE_FWK_MODULE(TauMET)
std::vector< EcalRecHit >::const_iterator const_iterator
virtual void endJob(void)
virtual void beginJob(void)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
ESOccupancyTask(const edm::ParameterSet &ps)
virtual void analyze(const edm::Event &, const edm::EventSetup &)