22 EEuncalibrechitCollection_token_ = consumes<EEUncalibratedRecHitCollection>(ps.
getParameter<
edm::InputTag>(
"EEuncalibrechitCollection"));
43 if ( verbose_ ) dbe_->showDirStructure();
48 meESRecHitsEnergy_ = 0;
49 meESRecHitsEnergy_zp1st_ = 0;
50 meESRecHitsEnergy_zp2nd_ = 0;
51 meESRecHitsEnergy_zm1st_ = 0;
52 meESRecHitsEnergy_zm2nd_ = 0;
53 meESRecHitsMultip_ = 0;
54 meESRecHitsMultip_zp1st_ = 0;
55 meESRecHitsMultip_zp2nd_ = 0;
56 meESRecHitsMultip_zm1st_ = 0;
57 meESRecHitsMultip_zm2nd_ = 0;
58 meESEERecHitsEnergy_zp_ = 0;
59 meESEERecHitsEnergy_zm_ = 0;
61 for (
int kk=0;
kk<32;
kk++)
63 meESRecHitsStripOccupancy_zp1st_[
kk] = 0;
64 meESRecHitsStripOccupancy_zm1st_[
kk] = 0;
65 meESRecHitsStripOccupancy_zp2nd_[
kk] = 0;
66 meESRecHitsStripOccupancy_zm2nd_[
kk] = 0;
74 dbe_->setCurrentFolder(
"EcalRecHitsV/EcalPreshowerRecHitsTask");
76 sprintf (histo,
"ES Energy" );
77 meESRecHitsEnergy_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
79 sprintf (histo,
"ES Energy Plane1 Side+" );
80 meESRecHitsEnergy_zp1st_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
82 sprintf (histo,
"ES Energy Plane2 Side+");
83 meESRecHitsEnergy_zp2nd_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
85 sprintf (histo,
"ES Energy Plane1 Side-");
86 meESRecHitsEnergy_zm1st_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
88 sprintf (histo,
"ES Energy Plane2 Side-");
89 meESRecHitsEnergy_zm2nd_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
91 sprintf (histo,
"ES Multiplicity" );
92 meESRecHitsMultip_ = dbe_->book1D(histo, histo, 100, 0., 700.);
94 sprintf (histo,
"ES Multiplicity Plane1 Side+");
95 meESRecHitsMultip_zp1st_ = dbe_->book1D(histo, histo, 100, 0., 700.);
97 sprintf (histo,
"ES Multiplicity Plane2 Side+");
98 meESRecHitsMultip_zp2nd_ = dbe_->book1D(histo, histo, 100, 0., 700.);
100 sprintf (histo,
"ES Multiplicity Plane1 Side-");
101 meESRecHitsMultip_zm1st_ = dbe_->book1D(histo, histo, 100, 0., 700.);
103 sprintf (histo,
"ES Multiplicity Plane2 Side-");
104 meESRecHitsMultip_zm2nd_ = dbe_->book1D(histo, histo, 100, 0., 700.);
106 sprintf (histo,
"Preshower EE vs ES energy Side+");
107 meESEERecHitsEnergy_zp_ = dbe_->book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
109 sprintf (histo,
"Preshower EE vs ES energy Side-");
110 meESEERecHitsEnergy_zm_ = dbe_->book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
112 for (
int kk=0;
kk<32;
kk++)
114 sprintf(histo,
"ES Occupancy Plane1 Side+ Strip%02d",
kk+1);
115 meESRecHitsStripOccupancy_zp1st_[
kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
117 sprintf(histo,
"ES Occupancy Plane2 Side+ Strip%02d",
kk+1);
118 meESRecHitsStripOccupancy_zp2nd_[
kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
120 sprintf(histo,
"ES Occupancy Plane1 Side- Strip%02d",
kk+1);
121 meESRecHitsStripOccupancy_zm1st_[
kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
123 sprintf(histo,
"ES Occupancy Plane2 Side- Strip%02d",
kk+1);
124 meESRecHitsStripOccupancy_zm2nd_[
kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
145 e.
getByToken( ESrechitCollection_token_, EcalRecHitES);
147 ESRecHit = EcalRecHitES.
product ();
155 e.
getByToken( EErechitCollection_token_, EcalRecHitEE);
157 EERecHit = EcalRecHitEE.
product ();
164 e.
getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE);
165 if (EcalUncalibRecHitEE.
isValid()) {
166 EEUncalibRecHit = EcalUncalibRecHitEE.
product() ;
183 float ene_zp1st = 0.;
184 float ene_zp2nd = 0.;
185 float ene_zm1st = 0.;
186 float ene_zm2nd = 0.;
194 int zside = ESid.
zside();
195 int plane = ESid.
plane();
196 int six = ESid.
six();
197 int siy = ESid.
siy();
198 int strip = ESid.
strip();
202 if (meESRecHitsEnergy_) meESRecHitsEnergy_ ->Fill(recHit->energy());
205 if ( (zside == +1) && (plane == 1) )
208 ene_zp1st += recHit->energy();
209 if ( meESRecHitsEnergy_zp1st_ ) { meESRecHitsEnergy_zp1st_ ->
Fill(recHit->energy()); }
210 if ( meESRecHitsStripOccupancy_zp1st_[strip-1] ){ meESRecHitsStripOccupancy_zp1st_[strip-1]->
Fill( six, siy ); }
215 if ( (zside == +1) && (plane == 2) )
218 ene_zp2nd += recHit->energy();
219 if ( meESRecHitsEnergy_zp2nd_ ) { meESRecHitsEnergy_zp2nd_ ->
Fill(recHit->energy()); }
220 if ( meESRecHitsStripOccupancy_zp2nd_[strip-1] ){ meESRecHitsStripOccupancy_zp2nd_[strip-1]->
Fill( six, siy ); }
225 if ( (zside == -1) && (plane == 1) )
228 ene_zm1st += recHit->energy();
229 if ( meESRecHitsEnergy_zm1st_ ) { meESRecHitsEnergy_zm1st_ ->
Fill(recHit->energy()); }
230 if ( meESRecHitsStripOccupancy_zm1st_[strip-1] ){ meESRecHitsStripOccupancy_zm1st_[strip-1]->
Fill( six, siy ); }
235 if ( (zside == -1) && (plane == 2) )
238 ene_zm2nd += recHit->energy();
239 if ( meESRecHitsEnergy_zm2nd_ ) { meESRecHitsEnergy_zm2nd_ ->
Fill(recHit->energy()); }
240 if ( meESRecHitsStripOccupancy_zm2nd_[strip-1] ){ meESRecHitsStripOccupancy_zm2nd_[strip-1]->
Fill( six, siy ); }
255 int mySide = EEid.
zside();
260 if (myRecHit != EERecHit->
end() )
262 if (mySide > 0) { zpEE = zpEE + myRecHit->energy(); }
263 if (mySide < 0) { zmEE = zmEE + myRecHit->energy(); }
270 if (meESRecHitsMultip_) { meESRecHitsMultip_ ->
Fill(mult_tot); }
271 if (meESRecHitsMultip_zp1st_ ) { meESRecHitsMultip_zp1st_ ->
Fill(mult_zp1st); }
272 if (meESRecHitsMultip_zp2nd_ ) { meESRecHitsMultip_zp2nd_ ->
Fill(mult_zp2nd); }
273 if (meESRecHitsMultip_zm1st_ ) { meESRecHitsMultip_zm1st_ ->
Fill(mult_zm1st); }
274 if (meESRecHitsMultip_zm2nd_ ) { meESRecHitsMultip_zm2nd_ ->
Fill(mult_zm2nd); }
275 if (meESEERecHitsEnergy_zp_) { meESEERecHitsEnergy_zp_ ->
Fill( (ene_zp1st + 0.7*ene_zp2nd)/0.09, zpEE ); }
276 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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
~EcalPreshowerRecHitsValidation()
Destructor.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const_iterator end() const
T const * product() const
iterator find(key_type k)
const_iterator begin() const