22 EEuncalibrechitCollection_token_ = consumes<EEUncalibratedRecHitCollection>(ps.
getParameter<
edm::InputTag>(
"EEuncalibrechitCollection"));
32 meESRecHitsEnergy_ =
nullptr;
33 meESRecHitsEnergy_zp1st_ =
nullptr;
34 meESRecHitsEnergy_zp2nd_ =
nullptr;
35 meESRecHitsEnergy_zm1st_ =
nullptr;
36 meESRecHitsEnergy_zm2nd_ =
nullptr;
37 meESRecHitsMultip_ =
nullptr;
38 meESRecHitsMultip_zp1st_ =
nullptr;
39 meESRecHitsMultip_zp2nd_ =
nullptr;
40 meESRecHitsMultip_zm1st_ =
nullptr;
41 meESRecHitsMultip_zm2nd_ =
nullptr;
42 meESEERecHitsEnergy_zp_ =
nullptr;
43 meESEERecHitsEnergy_zm_ =
nullptr;
45 for (
int kk=0;
kk<32;
kk++)
47 meESRecHitsStripOccupancy_zp1st_[
kk] =
nullptr;
48 meESRecHitsStripOccupancy_zm1st_[
kk] =
nullptr;
49 meESRecHitsStripOccupancy_zp2nd_[
kk] =
nullptr;
50 meESRecHitsStripOccupancy_zm2nd_[
kk] =
nullptr;
64 sprintf (histo,
"ES Energy" );
65 meESRecHitsEnergy_ = ibooker.
book1D(histo, histo, 210, -0.0005, 0.01);
67 sprintf (histo,
"ES Energy Plane1 Side+" );
68 meESRecHitsEnergy_zp1st_ = ibooker.
book1D(histo, histo, 210, -0.0005, 0.01);
70 sprintf (histo,
"ES Energy Plane2 Side+");
71 meESRecHitsEnergy_zp2nd_ = ibooker.
book1D(histo, histo, 210, -0.0005, 0.01);
73 sprintf (histo,
"ES Energy Plane1 Side-");
74 meESRecHitsEnergy_zm1st_ = ibooker.
book1D(histo, histo, 210, -0.0005, 0.01);
76 sprintf (histo,
"ES Energy Plane2 Side-");
77 meESRecHitsEnergy_zm2nd_ = ibooker.
book1D(histo, histo, 210, -0.0005, 0.01);
79 sprintf (histo,
"ES Multiplicity" );
80 meESRecHitsMultip_ = ibooker.
book1D(histo, histo, 100, 0., 700.);
82 sprintf (histo,
"ES Multiplicity Plane1 Side+");
83 meESRecHitsMultip_zp1st_ = ibooker.
book1D(histo, histo, 100, 0., 700.);
85 sprintf (histo,
"ES Multiplicity Plane2 Side+");
86 meESRecHitsMultip_zp2nd_ = ibooker.
book1D(histo, histo, 100, 0., 700.);
88 sprintf (histo,
"ES Multiplicity Plane1 Side-");
89 meESRecHitsMultip_zm1st_ = ibooker.
book1D(histo, histo, 100, 0., 700.);
91 sprintf (histo,
"ES Multiplicity Plane2 Side-");
92 meESRecHitsMultip_zm2nd_ = ibooker.
book1D(histo, histo, 100, 0., 700.);
94 sprintf (histo,
"Preshower EE vs ES energy Side+");
95 meESEERecHitsEnergy_zp_ = ibooker.
book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
97 sprintf (histo,
"Preshower EE vs ES energy Side-");
98 meESEERecHitsEnergy_zm_ = ibooker.
book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
100 for (
int kk=0;
kk<32;
kk++)
102 sprintf(histo,
"ES Occupancy Plane1 Side+ Strip%02d",
kk+1);
103 meESRecHitsStripOccupancy_zp1st_[
kk] = ibooker.
book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
105 sprintf(histo,
"ES Occupancy Plane2 Side+ Strip%02d",
kk+1);
106 meESRecHitsStripOccupancy_zp2nd_[
kk] = ibooker.
book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
108 sprintf(histo,
"ES Occupancy Plane1 Side- Strip%02d",
kk+1);
109 meESRecHitsStripOccupancy_zm1st_[
kk] = ibooker.
book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
111 sprintf(histo,
"ES Occupancy Plane2 Side- Strip%02d",
kk+1);
112 meESRecHitsStripOccupancy_zm2nd_[
kk] = ibooker.
book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
120 e.
getByToken( ESrechitCollection_token_, EcalRecHitES);
122 ESRecHit = EcalRecHitES.
product ();
130 e.
getByToken( EErechitCollection_token_, EcalRecHitEE);
132 EERecHit = EcalRecHitEE.
product ();
139 e.
getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE);
140 if (EcalUncalibRecHitEE.
isValid()) {
141 EEUncalibRecHit = EcalUncalibRecHitEE.
product() ;
158 float ene_zp1st = 0.;
159 float ene_zp2nd = 0.;
160 float ene_zm1st = 0.;
161 float ene_zm2nd = 0.;
170 int plane = ESid.
plane();
171 int six = ESid.
six();
172 int siy = ESid.
siy();
177 if (meESRecHitsEnergy_) meESRecHitsEnergy_ ->Fill(
recHit->energy());
180 if ( (zside == +1) && (plane == 1) )
183 ene_zp1st +=
recHit->energy();
184 if ( meESRecHitsEnergy_zp1st_ ) { meESRecHitsEnergy_zp1st_ ->
Fill(
recHit->energy()); }
185 if ( meESRecHitsStripOccupancy_zp1st_[strip-1] ){ meESRecHitsStripOccupancy_zp1st_[strip-1]->
Fill( six, siy ); }
190 if ( (zside == +1) && (plane == 2) )
193 ene_zp2nd +=
recHit->energy();
194 if ( meESRecHitsEnergy_zp2nd_ ) { meESRecHitsEnergy_zp2nd_ ->
Fill(
recHit->energy()); }
195 if ( meESRecHitsStripOccupancy_zp2nd_[strip-1] ){ meESRecHitsStripOccupancy_zp2nd_[strip-1]->
Fill( six, siy ); }
200 if ( (zside == -1) && (plane == 1) )
203 ene_zm1st +=
recHit->energy();
204 if ( meESRecHitsEnergy_zm1st_ ) { meESRecHitsEnergy_zm1st_ ->
Fill(
recHit->energy()); }
205 if ( meESRecHitsStripOccupancy_zm1st_[strip-1] ){ meESRecHitsStripOccupancy_zm1st_[strip-1]->
Fill( six, siy ); }
210 if ( (zside == -1) && (plane == 2) )
213 ene_zm2nd +=
recHit->energy();
214 if ( meESRecHitsEnergy_zm2nd_ ) { meESRecHitsEnergy_zm2nd_ ->
Fill(
recHit->energy()); }
215 if ( meESRecHitsStripOccupancy_zm2nd_[strip-1] ){ meESRecHitsStripOccupancy_zm2nd_[strip-1]->
Fill( six, siy ); }
230 int mySide = EEid.
zside();
235 if (myRecHit != EERecHit->
end() )
237 if (mySide > 0) { zpEE = zpEE + myRecHit->energy(); }
238 if (mySide < 0) { zmEE = zmEE + myRecHit->energy(); }
245 if (meESRecHitsMultip_) { meESRecHitsMultip_ ->
Fill(mult_tot); }
246 if (meESRecHitsMultip_zp1st_ ) { meESRecHitsMultip_zp1st_ ->
Fill(mult_zp1st); }
247 if (meESRecHitsMultip_zp2nd_ ) { meESRecHitsMultip_zp2nd_ ->
Fill(mult_zp2nd); }
248 if (meESRecHitsMultip_zm1st_ ) { meESRecHitsMultip_zm1st_ ->
Fill(mult_zm1st); }
249 if (meESRecHitsMultip_zm2nd_ ) { meESRecHitsMultip_zm2nd_ ->
Fill(mult_zm2nd); }
250 if (meESEERecHitsEnergy_zp_) { meESEERecHitsEnergy_zp_ ->
Fill( (ene_zp1st + 0.7*ene_zp2nd)/0.09, zpEE ); }
251 if (meESEERecHitsEnergy_zm_) { meESEERecHitsEnergy_zm_ ->
Fill( (ene_zm1st + 0.7*ene_zm2nd)/0.09, zmEE ); }
EcalPreshowerRecHitsValidation(const edm::ParameterSet &ps)
Constructor.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
~EcalPreshowerRecHitsValidation() override
Destructor.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
Namespace of DDCMS conversion namespace.
const_iterator end() const
void setCurrentFolder(const std::string &fullpath)
T const * product() const
MonitorElement * book2D(Args &&...args)
iterator find(key_type k)
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
const_iterator begin() const