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 hSelOCCByLS_[
i][
j] =
nullptr;
43 hSelEnDensity_[
i][
j] =
nullptr;
46 for (
int i = 0;
i < 2; ++
i)
52 auto lumiCache = std::make_shared<ESOccLSCache>();
53 lumiCache->ievtLS_ = 0;
55 for (
int iz = 0; iz < 2; ++iz) {
56 for (
int ip = 0; ip < 2; ++ip) {
57 hSelOCCByLS_[iz][ip]->Reset();
71 for (
int i = 0;
i < 2; ++
i)
72 for (
int j = 0;
j < 2; ++
j) {
73 int iz = (
i == 0) ? 1 : -1;
74 sprintf(
histo,
"ES RecHit 2D Occupancy Z %d P %d", iz,
j + 1);
77 hRecOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
80 sprintf(
histo,
"ES Energy Density Z %d P %d", iz,
j + 1);
83 hEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
85 sprintf(
histo,
"ES Num of RecHits Z %d P %d", iz,
j + 1);
88 hRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
90 sprintf(
histo,
"ES Num of Good RecHits Z %d P %d", iz,
j + 1);
93 hGoodRecNHit_[
i][
j]->setAxisTitle(
"Num of Events", 2);
95 sprintf(
histo,
"ES RecHit Energy Z %d P %d", iz,
j + 1);
98 hEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
100 sprintf(
histo,
"ES Event Energy Z %d P %d", iz,
j + 1);
103 hEvEng_[
i][
j]->setAxisTitle(
"Num of Events", 2);
106 sprintf(
histo,
"ES RecHit Energy with selected hits Z %d P %d", iz,
j + 1);
109 hSelEng_[
i][
j]->setAxisTitle(
"Num of ReHits", 2);
111 sprintf(
histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j + 1);
114 hSelOCC_[
i][
j]->setAxisTitle(
"Si Y", 2);
116 sprintf(
histo,
"ES Energy Density with selected hits Z %d P %d", iz,
j + 1);
119 hSelEnDensity_[
i][
j]->setAxisTitle(
"Si Y", 2);
122 hE1E2_[0] = iBooker.
book2D(
"ES+ EP1 vs EP2",
"ES+ EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
123 hE1E2_[1] = iBooker.
book2D(
"ES- EP1 vs EP2",
"ES- EP1 vs EP2", 50, 0, 0.1, 50, 0, 0.1);
127 for (
int i = 0;
i < 2; ++
i) {
128 for (
int j = 0;
j < 2; ++
j) {
129 int iz = (
i == 0) ? 1 : -1;
130 sprintf(
histo,
"ES Occupancy with selected hits Z %d P %d", iz,
j + 1);
133 hSelOCCByLS_[
i][
j]->setAxisTitle(
"Si Y", 2);
139 runNum_ =
e.id().run();
144 int sum_RecHits[2][2], sum_GoodRecHits[2][2];
145 float sum_Energy[2][2];
147 for (
int i = 0;
i < 2; ++
i)
148 for (
int j = 0;
j < 2; ++
j) {
149 sum_RecHits[
i][
j] = 0;
150 sum_GoodRecHits[
i][
j] = 0;
151 sum_Energy[
i][
j] = 0;
155 if (
e.getByToken(rechittoken_, ESRecHit)) {
164 int i = (
zside == 1) ? 0 : 1;
168 sum_Energy[
i][
j] += hitItr->energy();
169 hRecOCC_[
i][
j]->Fill(
ix,
iy);
170 if (hitItr->energy() != 0) {
171 hEng_[
i][
j]->Fill(hitItr->energy());
172 hEnDensity_[
i][
j]->Fill(
ix,
iy, hitItr->energy());
174 if (hitItr->recoFlag() == 14 || hitItr->recoFlag() == 1 ||
175 (hitItr->recoFlag() <= 10 && hitItr->recoFlag() >= 5))
177 sum_GoodRecHits[
i][
j]++;
178 hSelEng_[
i][
j]->Fill(hitItr->energy());
179 hSelEnDensity_[
i][
j]->Fill(
ix,
iy, hitItr->energy());
180 hSelOCC_[
i][
j]->Fill(
ix,
iy);
181 hSelOCCByLS_[
i][
j]->Fill(
ix,
iy);
185 LogWarning(
"ESOccupancyTask") <<
"RecHitCollection not available";
189 for (
int i = 0;
i < 2; ++
i)
190 for (
int j = 0;
j < 2; ++
j) {
191 hRecNHit_[
i][
j]->Fill(sum_RecHits[
i][
j]);
192 hGoodRecNHit_[
i][
j]->Fill(sum_GoodRecHits[
i][
j]);
193 hEvEng_[
i][
j]->Fill(sum_Energy[
i][
j]);
196 hRecOCC_[
i][
j]->setBinContent(40, 40, eCount_);
197 hEnDensity_[
i][
j]->setBinContent(40, 40, eCount_);
199 hSelOCC_[
i][
j]->setBinContent(40, 40, eCount_);
200 hSelOCCByLS_[
i][
j]->setBinContent(40, 40, eCount_);
201 hSelEnDensity_[
i][
j]->setBinContent(40, 40, eCount_);
204 hE1E2_[0]->Fill(sum_Energy[0][0], sum_Energy[0][1]);
205 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
void globalEndLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &c) override
End Lumi.
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
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
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())
std::shared_ptr< ESOccLSCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &c) const override
Begin Lumi.
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
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)