44 if ( verbose_ ) dbe_->showDirStructure();
49 meESRecHitsEnergy_ = 0;
50 meESRecHitsEnergy_zp1st_ = 0;
51 meESRecHitsEnergy_zp2nd_ = 0;
52 meESRecHitsEnergy_zm1st_ = 0;
53 meESRecHitsEnergy_zm2nd_ = 0;
54 meESRecHitsMultip_ = 0;
55 meESRecHitsMultip_zp1st_ = 0;
56 meESRecHitsMultip_zp2nd_ = 0;
57 meESRecHitsMultip_zm1st_ = 0;
58 meESRecHitsMultip_zm2nd_ = 0;
59 meESEERecHitsEnergy_zp_ = 0;
60 meESEERecHitsEnergy_zm_ = 0;
62 for (
int kk=0; kk<32; kk++)
64 meESRecHitsStripOccupancy_zp1st_[kk] = 0;
65 meESRecHitsStripOccupancy_zm1st_[kk] = 0;
66 meESRecHitsStripOccupancy_zp2nd_[kk] = 0;
67 meESRecHitsStripOccupancy_zm2nd_[kk] = 0;
75 dbe_->setCurrentFolder(
"EcalRecHitsV/EcalPreshowerRecHitsTask");
77 sprintf (histo,
"ES Energy" );
78 meESRecHitsEnergy_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
80 sprintf (histo,
"ES Energy Plane1 Side+" );
81 meESRecHitsEnergy_zp1st_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
83 sprintf (histo,
"ES Energy Plane2 Side+");
84 meESRecHitsEnergy_zp2nd_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
86 sprintf (histo,
"ES Energy Plane1 Side-");
87 meESRecHitsEnergy_zm1st_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
89 sprintf (histo,
"ES Energy Plane2 Side-");
90 meESRecHitsEnergy_zm2nd_ = dbe_->book1D(histo, histo, 210, -0.0005, 0.01);
92 sprintf (histo,
"ES Multiplicity" );
93 meESRecHitsMultip_ = dbe_->book1D(histo, histo, 100, 0., 700.);
95 sprintf (histo,
"ES Multiplicity Plane1 Side+");
96 meESRecHitsMultip_zp1st_ = dbe_->book1D(histo, histo, 100, 0., 700.);
98 sprintf (histo,
"ES Multiplicity Plane2 Side+");
99 meESRecHitsMultip_zp2nd_ = dbe_->book1D(histo, histo, 100, 0., 700.);
101 sprintf (histo,
"ES Multiplicity Plane1 Side-");
102 meESRecHitsMultip_zm1st_ = dbe_->book1D(histo, histo, 100, 0., 700.);
104 sprintf (histo,
"ES Multiplicity Plane2 Side-");
105 meESRecHitsMultip_zm2nd_ = dbe_->book1D(histo, histo, 100, 0., 700.);
107 sprintf (histo,
"Preshower EE vs ES energy Side+");
108 meESEERecHitsEnergy_zp_ = dbe_->book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
110 sprintf (histo,
"Preshower EE vs ES energy Side-");
111 meESEERecHitsEnergy_zm_ = dbe_->book2D(histo, histo, 100, 0., 0.2, 100, 0., 150.);
113 for (
int kk=0; kk<32; kk++)
115 sprintf(histo,
"ES Occupancy Plane1 Side+ Strip%02d", kk+1);
116 meESRecHitsStripOccupancy_zp1st_[kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
118 sprintf(histo,
"ES Occupancy Plane2 Side+ Strip%02d", kk+1);
119 meESRecHitsStripOccupancy_zp2nd_[kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
121 sprintf(histo,
"ES Occupancy Plane1 Side- Strip%02d", kk+1);
122 meESRecHitsStripOccupancy_zm1st_[kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
124 sprintf(histo,
"ES Occupancy Plane2 Side- Strip%02d", kk+1);
125 meESRecHitsStripOccupancy_zm2nd_[kk] = dbe_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
146 e.
getByLabel( ESrechitCollection_, EcalRecHitES);
148 ESRecHit = EcalRecHitES.
product ();
156 e.
getByLabel( EErechitCollection_, EcalRecHitEE);
158 EERecHit = EcalRecHitEE.
product ();
165 e.
getByLabel( EEuncalibrechitCollection_, EcalUncalibRecHitEE);
166 if (EcalUncalibRecHitEE.
isValid()) {
167 EEUncalibRecHit = EcalUncalibRecHitEE.
product() ;
184 float ene_zp1st = 0.;
185 float ene_zp2nd = 0.;
186 float ene_zm1st = 0.;
187 float ene_zm2nd = 0.;
195 int zside = ESid.
zside();
196 int plane = ESid.
plane();
197 int six = ESid.
six();
198 int siy = ESid.
siy();
203 if (meESRecHitsEnergy_) meESRecHitsEnergy_ ->Fill(recHit->energy());
206 if ( (zside == +1) && (plane == 1) )
209 ene_zp1st += recHit->energy();
210 if ( meESRecHitsEnergy_zp1st_ ) { meESRecHitsEnergy_zp1st_ -> Fill(recHit->energy()); }
211 if ( meESRecHitsStripOccupancy_zp1st_[strip-1] ){ meESRecHitsStripOccupancy_zp1st_[strip-1]-> Fill( six, siy ); }
216 if ( (zside == +1) && (plane == 2) )
219 ene_zp2nd += recHit->energy();
220 if ( meESRecHitsEnergy_zp2nd_ ) { meESRecHitsEnergy_zp2nd_ -> Fill(recHit->energy()); }
221 if ( meESRecHitsStripOccupancy_zp2nd_[strip-1] ){ meESRecHitsStripOccupancy_zp2nd_[strip-1]-> Fill( six, siy ); }
226 if ( (zside == -1) && (plane == 1) )
229 ene_zm1st += recHit->energy();
230 if ( meESRecHitsEnergy_zm1st_ ) { meESRecHitsEnergy_zm1st_ -> Fill(recHit->energy()); }
231 if ( meESRecHitsStripOccupancy_zm1st_[strip-1] ){ meESRecHitsStripOccupancy_zm1st_[strip-1]-> Fill( six, siy ); }
236 if ( (zside == -1) && (plane == 2) )
239 ene_zm2nd += recHit->energy();
240 if ( meESRecHitsEnergy_zm2nd_ ) { meESRecHitsEnergy_zm2nd_ -> Fill(recHit->energy()); }
241 if ( meESRecHitsStripOccupancy_zm2nd_[strip-1] ){ meESRecHitsStripOccupancy_zm2nd_[strip-1]-> Fill( six, siy ); }
256 int mySide = EEid.
zside();
261 if (myRecHit != EERecHit->
end() )
263 if (mySide > 0) { zpEE = zpEE + myRecHit->energy(); }
264 if (mySide < 0) { zmEE = zmEE + myRecHit->energy(); }
271 if (meESRecHitsMultip_) { meESRecHitsMultip_ -> Fill(mult_tot); }
272 if (meESRecHitsMultip_zp1st_ ) { meESRecHitsMultip_zp1st_ -> Fill(mult_zp1st); }
273 if (meESRecHitsMultip_zp2nd_ ) { meESRecHitsMultip_zp2nd_ -> Fill(mult_zp2nd); }
274 if (meESRecHitsMultip_zm1st_ ) { meESRecHitsMultip_zm1st_ -> Fill(mult_zm1st); }
275 if (meESRecHitsMultip_zm2nd_ ) { meESRecHitsMultip_zm2nd_ -> Fill(mult_zm2nd); }
276 if (meESEERecHitsEnergy_zp_) { meESEERecHitsEnergy_zp_ -> Fill( (ene_zp1st + 0.7*ene_zp2nd)/0.09, zpEE ); }
277 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
std::vector< T >::const_iterator const_iterator
~EcalPreshowerRecHitsValidation()
Destructor.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
T const * product() const
iterator find(key_type k)
const_iterator begin() const