19 EEuncalibrechitCollection_token_ =
29 meESRecHitsEnergy_ =
nullptr;
30 meESRecHitsEnergy_zp1st_ =
nullptr;
31 meESRecHitsEnergy_zp2nd_ =
nullptr;
32 meESRecHitsEnergy_zm1st_ =
nullptr;
33 meESRecHitsEnergy_zm2nd_ =
nullptr;
34 meESRecHitsMultip_ =
nullptr;
35 meESRecHitsMultip_zp1st_ =
nullptr;
36 meESRecHitsMultip_zp2nd_ =
nullptr;
37 meESRecHitsMultip_zm1st_ =
nullptr;
38 meESRecHitsMultip_zm2nd_ =
nullptr;
39 meESEERecHitsEnergy_zp_ =
nullptr;
40 meESEERecHitsEnergy_zm_ =
nullptr;
42 for (
int kk = 0;
kk < 32;
kk++) {
43 meESRecHitsStripOccupancy_zp1st_[
kk] =
nullptr;
44 meESRecHitsStripOccupancy_zm1st_[
kk] =
nullptr;
45 meESRecHitsStripOccupancy_zp2nd_[
kk] =
nullptr;
46 meESRecHitsStripOccupancy_zm2nd_[
kk] =
nullptr;
59 sprintf(
histo,
"ES Energy");
62 sprintf(
histo,
"ES Energy Plane1 Side+");
65 sprintf(
histo,
"ES Energy Plane2 Side+");
68 sprintf(
histo,
"ES Energy Plane1 Side-");
71 sprintf(
histo,
"ES Energy Plane2 Side-");
74 sprintf(
histo,
"ES Multiplicity");
77 sprintf(
histo,
"ES Multiplicity Plane1 Side+");
80 sprintf(
histo,
"ES Multiplicity Plane2 Side+");
83 sprintf(
histo,
"ES Multiplicity Plane1 Side-");
86 sprintf(
histo,
"ES Multiplicity Plane2 Side-");
89 sprintf(
histo,
"Preshower EE vs ES energy Side+");
90 meESEERecHitsEnergy_zp_ = ibooker.
book2D(
histo,
histo, 100, 0., 0.2, 100, 0., 150.);
92 sprintf(
histo,
"Preshower EE vs ES energy Side-");
93 meESEERecHitsEnergy_zm_ = ibooker.
book2D(
histo,
histo, 100, 0., 0.2, 100, 0., 150.);
95 for (
int kk = 0;
kk < 32;
kk++) {
96 sprintf(
histo,
"ES Occupancy Plane1 Side+ Strip%02d",
kk + 1);
97 meESRecHitsStripOccupancy_zp1st_[
kk] = ibooker.
book2D(
histo,
histo, 40, 0., 40., 40, 0., 40.);
99 sprintf(
histo,
"ES Occupancy Plane2 Side+ Strip%02d",
kk + 1);
100 meESRecHitsStripOccupancy_zp2nd_[
kk] = ibooker.
book2D(
histo,
histo, 40, 0., 40., 40, 0., 40.);
102 sprintf(
histo,
"ES Occupancy Plane1 Side- Strip%02d",
kk + 1);
103 meESRecHitsStripOccupancy_zm1st_[
kk] = ibooker.
book2D(
histo,
histo, 40, 0., 40., 40, 0., 40.);
105 sprintf(
histo,
"ES Occupancy Plane2 Side- Strip%02d",
kk + 1);
106 meESRecHitsStripOccupancy_zm2nd_[
kk] = ibooker.
book2D(
histo,
histo, 40, 0., 40., 40, 0., 40.);
113 e.getByToken(ESrechitCollection_token_, EcalRecHitES);
115 ESRecHit = EcalRecHitES.
product();
123 e.getByToken(EErechitCollection_token_, EcalRecHitEE);
132 e.getByToken(EEuncalibrechitCollection_token_, EcalUncalibRecHitEE);
133 if (EcalUncalibRecHitEE.
isValid()) {
149 float ene_zp1st = 0.;
150 float ene_zp2nd = 0.;
151 float ene_zm1st = 0.;
152 float ene_zm2nd = 0.;
159 int plane = ESid.
plane();
160 int six = ESid.
six();
161 int siy = ESid.
siy();
166 if (meESRecHitsEnergy_)
167 meESRecHitsEnergy_->Fill(
recHit->energy());
170 if ((
zside == +1) && (plane == 1)) {
172 ene_zp1st +=
recHit->energy();
173 if (meESRecHitsEnergy_zp1st_) {
174 meESRecHitsEnergy_zp1st_->Fill(
recHit->energy());
176 if (meESRecHitsStripOccupancy_zp1st_[
strip - 1]) {
177 meESRecHitsStripOccupancy_zp1st_[
strip - 1]->Fill(six, siy);
182 if ((
zside == +1) && (plane == 2)) {
184 ene_zp2nd +=
recHit->energy();
185 if (meESRecHitsEnergy_zp2nd_) {
186 meESRecHitsEnergy_zp2nd_->Fill(
recHit->energy());
188 if (meESRecHitsStripOccupancy_zp2nd_[
strip - 1]) {
189 meESRecHitsStripOccupancy_zp2nd_[
strip - 1]->Fill(six, siy);
194 if ((
zside == -1) && (plane == 1)) {
196 ene_zm1st +=
recHit->energy();
197 if (meESRecHitsEnergy_zm1st_) {
198 meESRecHitsEnergy_zm1st_->Fill(
recHit->energy());
200 if (meESRecHitsStripOccupancy_zm1st_[
strip - 1]) {
201 meESRecHitsStripOccupancy_zm1st_[
strip - 1]->Fill(six, siy);
206 if ((
zside == -1) && (plane == 2)) {
208 ene_zm2nd +=
recHit->energy();
209 if (meESRecHitsEnergy_zm2nd_) {
210 meESRecHitsEnergy_zm2nd_->Fill(
recHit->energy());
212 if (meESRecHitsStripOccupancy_zm2nd_[
strip - 1]) {
213 meESRecHitsStripOccupancy_zm2nd_[
strip - 1]->Fill(six, siy);
227 int mySide = EEid.
zside();
234 zpEE = zpEE + myRecHit->energy();
237 zmEE = zmEE + myRecHit->energy();
244 if (meESRecHitsMultip_) {
245 meESRecHitsMultip_->Fill(mult_tot);
247 if (meESRecHitsMultip_zp1st_) {
248 meESRecHitsMultip_zp1st_->Fill(mult_zp1st);
250 if (meESRecHitsMultip_zp2nd_) {
251 meESRecHitsMultip_zp2nd_->Fill(mult_zp2nd);
253 if (meESRecHitsMultip_zm1st_) {
254 meESRecHitsMultip_zm1st_->Fill(mult_zm1st);
256 if (meESRecHitsMultip_zm2nd_) {
257 meESRecHitsMultip_zm2nd_->Fill(mult_zm2nd);
259 if (meESEERecHitsEnergy_zp_) {
260 meESEERecHitsEnergy_zp_->Fill((ene_zp1st + 0.7 * ene_zp2nd) / 0.09, zpEE);
262 if (meESEERecHitsEnergy_zm_) {
263 meESEERecHitsEnergy_zm_->Fill((ene_zm1st + 0.7 * ene_zm2nd) / 0.09, zmEE);
EcalPreshowerRecHitsValidation(const edm::ParameterSet &ps)
Constructor.
T getParameter(std::string const &) const
~EcalPreshowerRecHitsValidation() override
Destructor.
virtual void setCurrentFolder(std::string const &fullpath)
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
const_iterator begin() const
Namespace of DDCMS conversion namespace.
const_iterator end() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())