64 SuperClusterCollection_ = consumes<reco::SuperClusterCollection>(ps.
getParameter<
edm::InputTag>(
"SuperClusterCollection"));
70 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
79 meSCEneSingleCrystal_ = 0;
81 meSCSeedMapOccSingleCrystal_ = 0;
82 meSCSeedMapOccTT_ = 0;
83 meSCSeedMapOccHighEne_ = 0;
86 meSCSeedMapTimeTT_ = 0;
87 meSCSeedMapTimeMod_ = 0;
88 meSCSeedTimeVsPhi_ = 0;
89 meSCSeedTimeVsAmp_ = 0;
92 meSCSeedTimeEBMTop_ = 0;
93 meSCSeedTimeEBPTop_ = 0;
94 meSCSeedTimeEBMBot_ = 0;
95 meSCSeedTimeEBPBot_ = 0;
96 for(
int i=0;
i!=36;++
i)
97 meSCSeedTimePerFed_[
i] = 0;
98 for(
int i=0;
i!=5;++
i) {
99 meSCSeedMapOccTrg_[
i] = 0;
100 meSCSeedMapOccTrgExcl_[
i] = 0;
101 meSCSeedMapTimeTrgMod_[
i] = 0;
105 meSCSizCrystalVsEne_ = 0;
108 meSCSeedMapOccHighEneTT_ = 0;
109 for(
int i=0;
i!=5;++
i) {
110 meSCSeedMapOccTrgTT_[
i] = 0;
111 meSCSeedMapOccTrgExclTT_[
i] = 0;
113 meSCSeedMapTimeTrgTT_[
i] = 0;
114 meSCSeedTimeTrg_[
i] = 0;
131 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
132 dqmStore_->rmdir(prefixME_ +
"/EBClusterTaskExtras");
141 if ( ! mergeRuns_ ) this->
reset();
150 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
151 if ( meSCSizCrystal_ ) meSCSizCrystal_->Reset();
152 if ( meSCSizBC_ ) meSCSizBC_->Reset();
153 if ( meSCSizPhi_ ) meSCSizPhi_->Reset();
155 if ( meSCSeedEne_ ) meSCSeedEne_->Reset();
156 if ( meSCEne2_ ) meSCEne2_->Reset();
157 if ( meSCEneLow_ ) meSCEneLow_->Reset();
158 if ( meSCEneHigh_ ) meSCEneHigh_->Reset();
159 if ( meSCEneSingleCrystal_ ) meSCEneSingleCrystal_->Reset();
161 if ( meSCSeedMapOccSingleCrystal_ ) meSCSeedMapOccSingleCrystal_->Reset();
162 if ( meSCSeedMapOccTT_ ) meSCSeedMapOccTT_->Reset();
163 if ( meSCSeedMapOccHighEne_ ) meSCSeedMapOccHighEne_->Reset();
165 if ( meSCSeedTime_ ) meSCSeedTime_->Reset();
166 if ( meSCSeedMapTimeTT_ ) meSCSeedMapTimeTT_->Reset();
167 if ( meSCSeedTimeVsPhi_ ) meSCSeedTimeVsPhi_->Reset();
168 if ( meSCSeedTimeVsAmp_ ) meSCSeedTimeVsAmp_->Reset();
169 if ( meSCSeedTimeEBM_ ) meSCSeedTimeEBM_->Reset();
170 if ( meSCSeedTimeEBP_ ) meSCSeedTimeEBP_->Reset();
171 if ( meSCSeedTimeEBMTop_ ) meSCSeedTimeEBMTop_->Reset();
172 if ( meSCSeedTimeEBPTop_ ) meSCSeedTimeEBPTop_->Reset();
173 if ( meSCSeedTimeEBMBot_ ) meSCSeedTimeEBMBot_->Reset();
174 if ( meSCSeedTimeEBPBot_ ) meSCSeedTimeEBPBot_->Reset();
176 for(
int i=0;
i!=36; ++
i)
177 if ( meSCSeedTimePerFed_[
i] ) meSCSeedTimePerFed_[
i]->Reset();
179 for(
int i=0;i!=5;++
i) {
180 if ( meSCSeedMapOccTrg_[i] ) meSCSeedMapOccTrg_[
i]->Reset();
181 if ( meSCSeedMapOccTrgExcl_[i] ) meSCSeedMapOccTrgExcl_[
i]->Reset();
182 if ( meSCSeedMapTimeTrgMod_[i] ) meSCSeedMapTimeTrgMod_[
i]->Reset();
185 if ( meSCSeedMapTimeMod_ ) meSCSeedMapTimeMod_->Reset();
188 if ( meSCSizCrystalVsEne_ ) meSCSizCrystalVsEne_->Reset();
190 if ( meSCSeedMapOcc_ ) meSCSeedMapOcc_->Reset();
191 if ( meSCSeedMapOccHighEneTT_ ) meSCSeedMapOccHighEneTT_->Reset();
194 for(
int i=0; i!=5; ++
i) {
195 if ( meSCSeedMapOccTrgTT_[i] ) meSCSeedMapOccTrgTT_[
i]->Reset();
196 if ( meSCSeedMapOccTrgExclTT_[i] ) meSCSeedMapOccTrgExclTT_[
i]->Reset();
198 if ( meSCSeedMapTimeTrgTT_[i] ) meSCSeedMapTimeTrgTT_[
i]->Reset();
199 if ( meSCSeedTimeTrg_[i] ) meSCSeedTimeTrg_[
i]->Reset();
201 if ( meTrg_ ) meTrg_->Reset();
202 if ( meTrgExcl_ ) meTrgExcl_->Reset();
212 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
214 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
216 histo =
"EBCLTE SC size (crystal)";
217 meSCSizCrystal_ = dqmStore_->book1D(histo,histo,150,0,150);
218 meSCSizCrystal_->setAxisTitle(
"super cluster size (crystal)", 1);
220 histo =
"EBCLTE SC size (basic clusters)";
221 meSCSizBC_ = dqmStore_->book1D(histo,histo,20,0,20);
222 meSCSizBC_->setAxisTitle(
"super cluster size (basic clusters)", 1);
224 histo =
"EBCLTE SC size in basic clusters vs phi";
225 meSCSizPhi_ = dqmStore_->bookProfile(histo,histo,360/5,-3.14159,3.14159,20,0,20);
226 meSCSizPhi_->setAxisTitle(
"phi", 1);
227 meSCSizPhi_->setAxisTitle(
"super cluster size (basic clusters)", 2);
229 histo =
"EBCLTE SC seed crystal energy";
230 meSCSeedEne_ = dqmStore_->book1D(histo,histo,200,0,1.8);
231 meSCSeedEne_->setAxisTitle(
"seed crystal energy (GeV)", 1);
233 histo =
"EBCLTE SC seed e2";
234 meSCEne2_ = dqmStore_->book1D(histo,histo,200,0,1.8);
235 meSCEne2_->setAxisTitle(
"seed + highest neighbor crystal energy (GeV)", 1);
237 histo =
"EBCLTE SC energy low scale";
238 meSCEneLow_ = dqmStore_->book1D(histo,histo,200,0,1.8);
239 meSCEneLow_->setAxisTitle(
"energy (GeV)", 1);
241 histo =
"EBCLTE SC energy high scale";
242 meSCEneHigh_ = dqmStore_->book1D(histo,histo,200,0,200);
243 meSCEneHigh_->setAxisTitle(
"energy (GeV)", 1);
245 histo =
"EBCLTE SC single crystal energy (GeV)";
246 meSCEneSingleCrystal_ = dqmStore_->book1D(histo,histo,200,0,200);
247 meSCEneSingleCrystal_->setAxisTitle(
"energy (GeV)", 1);
249 histo =
"EBCLTE SC seed occupancy map trigger tower binned";
250 meSCSeedMapOccTT_ = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
251 meSCSeedMapOccTT_->setAxisTitle(
"jphi", 1);
252 meSCSeedMapOccTT_->setAxisTitle(
"jeta", 2);
254 histo =
"EBCLTE SC seed occupancy map (high energy clusters) (crystal binned)";
255 meSCSeedMapOccHighEne_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
256 meSCSeedMapOccHighEne_->setAxisTitle(
"jphi", 1);
257 meSCSeedMapOccHighEne_->setAxisTitle(
"jeta", 2);
259 histo =
"EBCLTE SC single crystal cluster occupancy map";
260 meSCSeedMapOccSingleCrystal_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
261 meSCSeedMapOccSingleCrystal_->setAxisTitle(
"jphi", 1);
262 meSCSeedMapOccSingleCrystal_->setAxisTitle(
"jeta", 2);
264 histo =
"EBCLTE SC seed crystal timing";
265 meSCSeedTime_ = dqmStore_->book1D(histo,histo,78,0.,10.);
266 meSCSeedTime_->setAxisTitle(
"seed crystal timing");
268 histo =
"EBCLTE SC seed crystal timing map trigger tower binned";
269 meSCSeedMapTimeTT_ = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
270 meSCSeedMapTimeTT_->setAxisTitle(
"jphi", 1);
271 meSCSeedMapTimeTT_->setAxisTitle(
"jeta", 2);
273 histo =
"EBCLTE SC seed crystal timing map module binned";
274 meSCSeedMapTimeMod_ = dqmStore_->bookProfile2D(histo,histo,18,0,360,8,-85,85,78,0.,10.,
"s");
275 meSCSeedMapTimeMod_->setAxisTitle(
"jphi",1);
276 meSCSeedMapTimeMod_->setAxisTitle(
"jeta",2);
278 histo =
"EBCLTE SC seed crystal timing vs phi";
279 meSCSeedTimeVsPhi_ = dqmStore_->bookProfile(histo, histo, 72, 0, 360, 78, -7, 7);
280 meSCSeedTimeVsPhi_->setAxisTitle(
"jphi",1);
281 meSCSeedTimeVsPhi_->setAxisTitle(
"seed crystal timing",2);
283 histo =
"EBCLTE SC seed crystal energy vs relative timing";
284 meSCSeedTimeVsAmp_ = dqmStore_->bookProfile(histo, histo, 78, -7, 7, 200, 0, 1.8);
285 meSCSeedTimeVsAmp_->setAxisTitle(
"seed crystal timing", 1);
286 meSCSeedTimeVsAmp_->setAxisTitle(
"seed crystal energy (GeV)", 2);
288 histo =
"EBCLTE SC seed crystal timing EB -";
289 meSCSeedTimeEBM_ = dqmStore_->book1D(histo,histo,78,0.,10.);
290 meSCSeedTimeEBM_->setAxisTitle(
"seed crystal timing");
292 histo =
"EBCLTE SC seed crystal timing EB +";
293 meSCSeedTimeEBP_ = dqmStore_->book1D(histo,histo,78,0.,10.);
294 meSCSeedTimeEBP_->setAxisTitle(
"seed crystal timing");
296 histo =
"EBCLTE SC seed crystal timing EB - top";
297 meSCSeedTimeEBMTop_ = dqmStore_->book1D(histo,histo,78,0.,10.);
298 meSCSeedTimeEBMTop_->setAxisTitle(
"seed crystal timing", 1);
300 histo =
"EBCLTE SC seed crystal timing EB + top";
301 meSCSeedTimeEBPTop_ = dqmStore_->book1D(histo,histo,78,0.,10.);
302 meSCSeedTimeEBPTop_->setAxisTitle(
"seed crystal timing", 1);
304 histo =
"EBCLTE SC seed crystal timing EB - bottom";
305 meSCSeedTimeEBMBot_ = dqmStore_->book1D(histo,histo,78,0.,10.);
306 meSCSeedTimeEBMBot_->setAxisTitle(
"seed crystal timing", 1);
308 histo =
"EBCLTE SC seed crystal timing EB + bottom";
309 meSCSeedTimeEBPBot_ = dqmStore_->book1D(histo,histo,78,0.,10.);
310 meSCSeedTimeEBPBot_->setAxisTitle(
"seed crystal timing", 1);
312 std::stringstream ss;
314 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras/EBCLTE seed crystal timing per super module");
315 for(
int i=0;
i!=36;++
i) {
318 ss <<
"EBCLTE SC seed crystal timing EB - " <<
i+1;
322 ss <<
"EBCLTE SC seed crystal timing EB + " <<
i+1-18;
325 meSCSeedTimePerFed_[
i] = dqmStore_->book1D(histo,histo,78,0.,10.);
326 meSCSeedTimePerFed_[
i]->setAxisTitle(
"seed crystal timing", 1);
329 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
331 histo =
"EBCLTE SC seed occupancy map (CSC exclusive triggered)";
332 meSCSeedMapOccTrgExcl_[0] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
333 meSCSeedMapOccTrgExcl_[0]->setAxisTitle(
"jphi", 1);
334 meSCSeedMapOccTrgExcl_[0]->setAxisTitle(
"jeta", 2);
336 histo =
"EBCLTE SC seed occupancy map (DT exclusive triggered)";
337 meSCSeedMapOccTrgExcl_[1] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
338 meSCSeedMapOccTrgExcl_[1]->setAxisTitle(
"jphi", 1);
339 meSCSeedMapOccTrgExcl_[1]->setAxisTitle(
"jeta", 2);
341 histo =
"EBCLTE SC seed occupancy map (ECAL exclusive triggered)";
342 meSCSeedMapOccTrgExcl_[2] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
343 meSCSeedMapOccTrgExcl_[2]->setAxisTitle(
"jphi", 1);
344 meSCSeedMapOccTrgExcl_[2]->setAxisTitle(
"jeta", 2);
346 histo =
"EBCLTE SC seed occupancy map (HCAL exclusive triggered)";
347 meSCSeedMapOccTrgExcl_[3] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
348 meSCSeedMapOccTrgExcl_[3]->setAxisTitle(
"jphi", 1);
349 meSCSeedMapOccTrgExcl_[3]->setAxisTitle(
"jeta", 2);
351 histo =
"EBCLTE SC seed occupancy map (RPC exclusive triggered)";
352 meSCSeedMapOccTrgExcl_[4] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
353 meSCSeedMapOccTrgExcl_[4]->setAxisTitle(
"jphi", 1);
354 meSCSeedMapOccTrgExcl_[4]->setAxisTitle(
"jeta", 2);
356 histo =
"EBCLTE SC seed occupancy map (CSC triggered)";
357 meSCSeedMapOccTrg_[0] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
358 meSCSeedMapOccTrg_[0]->setAxisTitle(
"jphi", 1);
359 meSCSeedMapOccTrg_[0]->setAxisTitle(
"jeta", 2);
361 histo =
"EBCLTE SC seed occupancy map (DT triggered)";
362 meSCSeedMapOccTrg_[1] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
363 meSCSeedMapOccTrg_[1]->setAxisTitle(
"jphi", 1);
364 meSCSeedMapOccTrg_[1]->setAxisTitle(
"jeta", 2);
366 histo =
"EBCLTE SC seed occupancy map (ECAL triggered)";
367 meSCSeedMapOccTrg_[2] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
368 meSCSeedMapOccTrg_[2]->setAxisTitle(
"jphi", 1);
369 meSCSeedMapOccTrg_[2]->setAxisTitle(
"jeta", 2);
371 histo =
"EBCLTE SC seed occupancy map (HCAL triggered)";
372 meSCSeedMapOccTrg_[3] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
373 meSCSeedMapOccTrg_[3]->setAxisTitle(
"jphi", 1);
374 meSCSeedMapOccTrg_[3]->setAxisTitle(
"jeta", 2);
376 histo =
"EBCLTE SC seed occupancy map (RPC triggered)";
377 meSCSeedMapOccTrg_[4] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
378 meSCSeedMapOccTrg_[4]->setAxisTitle(
"jphi", 1);
379 meSCSeedMapOccTrg_[4]->setAxisTitle(
"jeta", 2);
381 histo =
"EBCLTE SC seed crystal timing map (CSC triggered) module binned";
382 meSCSeedMapTimeTrgMod_[0] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
383 meSCSeedMapTimeTrgMod_[0]->setAxisTitle(
"jphi", 1);
384 meSCSeedMapTimeTrgMod_[0]->setAxisTitle(
"jeta", 2);
386 histo =
"EBCLTE SC seed crystal timing map (DT triggered) module binned";
387 meSCSeedMapTimeTrgMod_[1] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
388 meSCSeedMapTimeTrgMod_[1]->setAxisTitle(
"jphi", 1);
389 meSCSeedMapTimeTrgMod_[1]->setAxisTitle(
"jeta", 2);
391 histo =
"EBCLTE SC seed crystal timing map (ECAL triggered) module binned";
392 meSCSeedMapTimeTrgMod_[2] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
393 meSCSeedMapTimeTrgMod_[2]->setAxisTitle(
"jphi", 1);
394 meSCSeedMapTimeTrgMod_[2]->setAxisTitle(
"jeta", 2);
396 histo =
"EBCLTE SC seed crystal timing map (HCAL triggered) module binned";
397 meSCSeedMapTimeTrgMod_[3] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
398 meSCSeedMapTimeTrgMod_[3]->setAxisTitle(
"jphi", 1);
399 meSCSeedMapTimeTrgMod_[3]->setAxisTitle(
"jeta", 2);
401 histo =
"EBCLTE SC seed crystal timing map (RPC triggered) module binned";
402 meSCSeedMapTimeTrgMod_[4] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
403 meSCSeedMapTimeTrgMod_[4]->setAxisTitle(
"jphi", 1);
404 meSCSeedMapTimeTrgMod_[4]->setAxisTitle(
"jeta", 2);
408 histo =
"EBCLTE SC size (crystal) vs energy (GeV)";
409 meSCSizCrystalVsEne_ = dqmStore_->bookProfile(histo,histo,200,0.,10.,150,0,150);
410 meSCSizCrystalVsEne_->setAxisTitle(
"energy (GeV)", 1);
411 meSCSizCrystalVsEne_->setAxisTitle(
"super cluster size (crystal)", 2);
413 histo =
"EBCLTE SC seed occupancy map";
414 meSCSeedMapOcc_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
415 meSCSeedMapOcc_->setAxisTitle(
"jphi", 1);
416 meSCSeedMapOcc_->setAxisTitle(
"jeta", 2);
418 histo =
"EBCLTE SC seed occupancy map (high energy clusters) trigger tower binned";
419 meSCSeedMapOccHighEneTT_ = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
420 meSCSeedMapOccHighEneTT_->setAxisTitle(
"jphi", 1);
421 meSCSeedMapOccHighEneTT_->setAxisTitle(
"jeta", 2);
423 histo =
"EBCLTE SC seed occupancy map (CSC triggered) trigger tower binned";
424 meSCSeedMapOccTrgTT_[0] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
425 meSCSeedMapOccTrgTT_[0]->setAxisTitle(
"jphi", 1);
426 meSCSeedMapOccTrgTT_[0]->setAxisTitle(
"jeta", 2);
428 histo =
"EBCLTE SC seed occupancy map (DT triggered) trigger tower binned";
429 meSCSeedMapOccTrgTT_[1] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
430 meSCSeedMapOccTrgTT_[1]->setAxisTitle(
"jphi", 1);
431 meSCSeedMapOccTrgTT_[1]->setAxisTitle(
"jeta", 2);
433 histo =
"EBCLTE SC seed occupancy map (ECAL triggered) trigger tower binned";
434 meSCSeedMapOccTrgTT_[2] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
435 meSCSeedMapOccTrgTT_[2]->setAxisTitle(
"jphi", 1);
436 meSCSeedMapOccTrgTT_[2]->setAxisTitle(
"jeta", 2);
438 histo =
"EBCLTE SC seed occupancy map (HCAL triggered) trigger tower binned";
439 meSCSeedMapOccTrgTT_[3] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
440 meSCSeedMapOccTrgTT_[3]->setAxisTitle(
"jphi", 1);
441 meSCSeedMapOccTrgTT_[3]->setAxisTitle(
"jeta", 2);
443 histo =
"EBCLTE SC seed occupancy map (RPC triggered) trigger tower binned";
444 meSCSeedMapOccTrgTT_[4] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
445 meSCSeedMapOccTrgTT_[4]->setAxisTitle(
"jphi", 1);
446 meSCSeedMapOccTrgTT_[4]->setAxisTitle(
"jeta", 2);
448 histo =
"EBCLTE SC seed occupancy map (CSC exclusive triggered) trigger tower binned";
449 meSCSeedMapOccTrgExclTT_[0] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
450 meSCSeedMapOccTrgExclTT_[0]->setAxisTitle(
"jphi", 1);
451 meSCSeedMapOccTrgExclTT_[0]->setAxisTitle(
"jeta", 2);
453 histo =
"EBCLTE SC seed occupancy map (DT exclusive triggered) trigger tower binned";
454 meSCSeedMapOccTrgExclTT_[1] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
455 meSCSeedMapOccTrgExclTT_[1]->setAxisTitle(
"jphi", 1);
456 meSCSeedMapOccTrgExclTT_[1]->setAxisTitle(
"jeta", 2);
458 histo =
"EBCLTE SC seed occupancy map (ECAL exclusive triggered) trigger tower binned";
459 meSCSeedMapOccTrgExclTT_[2] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
460 meSCSeedMapOccTrgExclTT_[2]->setAxisTitle(
"jphi", 1);
461 meSCSeedMapOccTrgExclTT_[2]->setAxisTitle(
"jeta", 2);
463 histo =
"EBCLTE SC seed occupancy map (HCAL exclusive triggered) trigger tower binned";
464 meSCSeedMapOccTrgExclTT_[3] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
465 meSCSeedMapOccTrgExclTT_[3]->setAxisTitle(
"jphi", 1);
466 meSCSeedMapOccTrgExclTT_[3]->setAxisTitle(
"jeta", 2);
468 histo =
"EBCLTE SC seed occupancy map (RPC exclusive triggered) trigger tower binned";
469 meSCSeedMapOccTrgExclTT_[4] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
470 meSCSeedMapOccTrgExclTT_[4]->setAxisTitle(
"jphi", 1);
471 meSCSeedMapOccTrgExclTT_[4]->setAxisTitle(
"jeta", 2);
473 histo =
"EBCLTE SC seed crystal timing map (CSC exclusive triggered) trigger tower binned";
474 meSCSeedMapTimeTrgTT_[0] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
475 meSCSeedMapTimeTrgTT_[0]->setAxisTitle(
"jphi", 1);
476 meSCSeedMapTimeTrgTT_[0]->setAxisTitle(
"jeta", 2);
478 histo =
"EBCLTE SC seed crystal timing map (DT exclusive triggered) trigger tower binned";
479 meSCSeedMapTimeTrgTT_[1] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
480 meSCSeedMapTimeTrgTT_[1]->setAxisTitle(
"jphi", 1);
481 meSCSeedMapTimeTrgTT_[1]->setAxisTitle(
"jeta", 2);
483 histo =
"EBCLTE SC seed crystal timing map (ECAL exclusive triggered) trigger tower binned";
484 meSCSeedMapTimeTrgTT_[2] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
485 meSCSeedMapTimeTrgTT_[2]->setAxisTitle(
"jphi", 1);
486 meSCSeedMapTimeTrgTT_[2]->setAxisTitle(
"jeta", 2);
488 histo =
"EBCLTE SC seed crystal timing map (HCAL exclusive triggered) trigger tower binned";
489 meSCSeedMapTimeTrgTT_[3] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
490 meSCSeedMapTimeTrgTT_[3]->setAxisTitle(
"jphi", 1);
491 meSCSeedMapTimeTrgTT_[3]->setAxisTitle(
"jeta", 2);
493 histo =
"EBCLTE SC seed crystal timing map (RPC exclusive triggered) trigger tower binned";
494 meSCSeedMapTimeTrgTT_[4] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
495 meSCSeedMapTimeTrgTT_[4]->setAxisTitle(
"jphi", 1);
496 meSCSeedMapTimeTrgTT_[4]->setAxisTitle(
"jeta", 2);
498 histo =
"EBCLTE SC seed crystal timing (CSC triggered)";
499 meSCSeedTimeTrg_[0] = dqmStore_->book1D(histo,histo,78,0.,10.);
500 meSCSeedTimeTrg_[0]->setAxisTitle(
"seed crystal timing",1);
502 histo =
"EBCLTE SC seed crystal timing (DT triggered)";
503 meSCSeedTimeTrg_[1] = dqmStore_->book1D(histo,histo,78,0.,10.);
504 meSCSeedTimeTrg_[1]->setAxisTitle(
"seed crystal timing",1);
506 histo =
"EBCLTE SC seed crystal timing (ECAL triggered)";
507 meSCSeedTimeTrg_[2] = dqmStore_->book1D(histo,histo,78,0.,10.);
508 meSCSeedTimeTrg_[2]->setAxisTitle(
"seed crystal timing",1);
510 histo =
"EBCLTE SC seed crystal timing (HCAL triggered)";
511 meSCSeedTimeTrg_[3] = dqmStore_->book1D(histo,histo,78,0.,10.);
512 meSCSeedTimeTrg_[3]->setAxisTitle(
"seed crystal timing",1);
514 histo =
"EBCLTE SC seed crystal timing (RPC triggered)";
515 meSCSeedTimeTrg_[4] = dqmStore_->book1D(histo,histo,78,0.,10.);
516 meSCSeedTimeTrg_[4]->setAxisTitle(
"seed crystal timing",1);
518 histo =
"EBCLTE triggers";
519 meTrg_ = dqmStore_->book1D(histo, histo, 5, 0, 5);
520 meTrg_->setAxisTitle(
"triggers");
522 histo =
"EBCLTE exclusive triggers";
523 meTrgExcl_ = dqmStore_->book1D(histo, histo, 5, 0, 5);
524 meTrgExcl_->setAxisTitle(
"triggers");
532 if ( ! init_ )
return;
535 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
537 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
538 if ( meSCSizCrystal_ ) dqmStore_->removeElement( meSCSizCrystal_->getName() );
541 if ( meSCSizBC_ ) dqmStore_->removeElement( meSCSizBC_->getName() );
544 if ( meSCSizPhi_ ) dqmStore_->removeElement( meSCSizPhi_->getName() );
547 if ( meSCSeedEne_ ) dqmStore_->removeElement( meSCSeedEne_->getName() );
550 if ( meSCEne2_ ) dqmStore_->removeElement( meSCEne2_->getName() );
553 if ( meSCEneLow_ ) dqmStore_->removeElement( meSCEneLow_->getName() );
556 if ( meSCEneHigh_ ) dqmStore_->removeElement( meSCEneHigh_->getName() );
559 if ( meSCEneSingleCrystal_ ) dqmStore_->removeElement( meSCEneSingleCrystal_->getName() );
560 meSCEneSingleCrystal_ = 0;
562 if ( meSCSeedMapOccTT_ ) dqmStore_->removeElement( meSCSeedMapOccTT_->getName() );
563 meSCSeedMapOccTT_ = 0;
565 if ( meSCSeedMapOccHighEne_ ) dqmStore_->removeElement( meSCSeedMapOccHighEne_->getName() );
566 meSCSeedMapOccHighEne_ = 0;
568 if ( meSCSeedMapOccSingleCrystal_ ) dqmStore_->removeElement( meSCSeedMapOccSingleCrystal_->getName() );
569 meSCSeedMapOccSingleCrystal_ = 0;
571 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras/EBCLTE seed crystal timing per super module");
572 for(
int i=0;
i!=36; ++
i) {
573 if( meSCSeedTimePerFed_[
i] ) dqmStore_->removeElement( meSCSeedTimePerFed_[i]->getName() );
574 meSCSeedTimePerFed_[
i] = 0;
576 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
578 if ( meSCSeedTime_ ) dqmStore_->removeElement( meSCSeedTime_->getName() );
580 if ( meSCSeedMapTimeTT_ ) dqmStore_->removeElement( meSCSeedMapTimeTT_->getName() );
581 meSCSeedMapTimeTT_ = 0;
582 if ( meSCSeedMapTimeMod_ ) dqmStore_->removeElement( meSCSeedMapTimeMod_->getName() );
583 meSCSeedMapTimeMod_ = 0;
584 if ( meSCSeedTimeVsPhi_ ) dqmStore_->removeElement( meSCSeedTimeVsPhi_->getName() );
585 meSCSeedTimeVsPhi_ = 0;
586 if ( meSCSeedTimeVsAmp_ ) dqmStore_->removeElement( meSCSeedTimeVsAmp_->getName() );
587 meSCSeedTimeVsAmp_ = 0;
588 if ( meSCSeedTimeEBM_ ) dqmStore_->removeElement( meSCSeedTimeEBM_->getName() );
589 meSCSeedTimeEBM_ = 0;
590 if ( meSCSeedTimeEBP_ ) dqmStore_->removeElement( meSCSeedTimeEBP_->getName() );
591 meSCSeedTimeEBP_ = 0;
592 if ( meSCSeedTimeEBMTop_ ) dqmStore_->removeElement( meSCSeedTimeEBMTop_->getName() );
593 meSCSeedTimeEBMTop_ = 0;
594 if ( meSCSeedTimeEBPTop_ ) dqmStore_->removeElement( meSCSeedTimeEBPTop_->getName() );
595 meSCSeedTimeEBPTop_ = 0;
596 if ( meSCSeedTimeEBMBot_ ) dqmStore_->removeElement( meSCSeedTimeEBMBot_->getName() );
597 meSCSeedTimeEBMBot_ = 0;
598 if ( meSCSeedTimeEBPBot_ ) dqmStore_->removeElement( meSCSeedTimeEBPBot_->getName() );
599 meSCSeedTimeEBPBot_ = 0;
601 for(
int i=0;
i!=5+
ii) {
602 if ( meSCSeedMapOccTrg_[
i] ) dqmStore_->removeElement( meSCSeedMapOccTrg_[i]->getName() );
603 meSCSeedMapOccTrg_[
i] = 0;
604 if ( meSCSeedMapOccTrgExcl_[i] ) dqmStore_->removeElement( meSCSeedMapOccTrgExcl_[i]->getName() );
605 meSCSeedMapOccTrgExcl_[
i] = 0;
606 if ( meSCSeedMapTimeTrgMod_[i] ) dqmStore_->removeElement( meSCSeedMapTimeTrgMod_[i]->getName() );
607 meSCSeedMapTimeTrgMod_[
i] = 0;
611 if ( meSCSizCrystalVsEne_ ) dqmStore_->removeElement( meSCSizCrystalVsEne_->getName() );
612 meSCSizCrystalVsEne_ = 0;
615 if ( meSCSeedMapOcc_ ) dqmStore_->removeElement( meSCSeedMapOcc_->getName() );
618 if ( meSCSeedMapOccHighEneTT_ ) dqmStore_->removeElement( meSCSeedMapOccHighEneTT_->getName() );
619 meSCSeedMapOccHighEneTT_ = 0;
621 for(
int i=0;
i!=5; ++
i) {
622 if ( meSCSeedMapOccTrgTT_[
i] ) dqmStore_->removeElement( meSCSeedMapOccTrgTT_[i]->getName() );
623 meSCSeedMapOccTrgTT_[
i] = 0;
624 if ( meSCSeedMapOccTrgExclTT_[i] ) dqmStore_->removeElement( meSCSeedMapOccTrgExclTT_[i]->getName() );
625 meSCSeedMapOccTrgExclTT_[
i] = 0;
627 if ( meSCSeedMapTimeTrgTT_[i] ) dqmStore_->removeElement( meSCSeedMapTimeTrgTT_[i]->getName() );
628 meSCSeedMapTimeTrgTT_[
i] = 0;
630 if ( meSCSeedTimeTrg_[i] ) dqmStore_->removeElement( meSCSeedTimeTrg_[i]->getName() );
631 meSCSeedTimeTrg_[
i] = 0;
634 if ( meTrg_ ) dqmStore_->removeElement( meTrg_->getName() );
637 if ( meTrgExcl_ ) dqmStore_->removeElement( meTrgExcl_->getName() );
649 LogInfo(
"EBClusterTaskExtras") <<
"analyzed " << ievt_ <<
" events";
651 if ( enableCleanup_ ) this->
cleanup();
659 if ( ! init_ ) this->
setup();
667 if ( e.
getByToken(SuperClusterCollection_, pSuperClusters) ) {
674 for ( SuperClusterCollection::const_iterator sCluster = pSuperClusters->begin(); sCluster != pSuperClusters->end(); ++sCluster ) {
678 e.
getByToken( EcalRecHitCollection_, pEBRecHits );
686 std::vector< std::pair<DetId,float> > sIds = sCluster->hitsAndFractions();
696 for(std::vector< std::pair<DetId,float> >::const_iterator idItr = sIds.begin(); idItr != sIds.end(); ++idItr) {
697 DetId id = idItr->first;
700 if(hitItr == ebRecHits->
end()) {
continue; }
701 if(hitItr->energy() > secondItr->energy()) { secondItr = hitItr; }
702 if(hitItr->energy() > seedItr->energy()) {
std::swap(seedItr,secondItr); }
708 int ebeta = seedId.
ieta();
709 int ebphi = seedId.
iphi();
710 float xebeta = ebeta - 0.5 * seedId.
zside();
711 float xebphi = ebphi - 0.5;
717 vector<bool>
triggers = determineTriggers(e,c);
719 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
720 float e2nd = secondItr->energy();
721 float eMax = seedItr->energy();
725 if(meSCEneLow_) meSCEneLow_->Fill( sCluster->energy() );
726 if(meSCEneHigh_) meSCEneHigh_->Fill( sCluster->energy() );
727 if(meSCSizBC_) meSCSizBC_->Fill(
float(sCluster->clustersSize()) );
728 if(meSCSizPhi_) meSCSizPhi_->Fill(xebphi,sCluster->clustersSize());
730 if(meSCSizCrystal_) meSCSizCrystal_->Fill(sIds.size());
731 if(meSCSeedEne_) meSCSeedEne_->Fill(eMax);
732 if(meSCEne2_) meSCEne2_->Fill(eMax+e2nd);
735 if(meSCSeedMapOccTT_) meSCSeedMapOccTT_->Fill(xebphi, xebeta);
736 if(sIds.size() == 1) {
737 if(meSCEneSingleCrystal_) meSCEneSingleCrystal_->Fill(sCluster->energy());
738 if(meSCSeedMapOccSingleCrystal_) meSCSeedMapOccSingleCrystal_->Fill(xebphi, xebeta);
741 if(sCluster->energy() > 2)
if(meSCSeedMapOccHighEne_) meSCSeedMapOccHighEne_->Fill(xebphi, xebeta);
744 if(seedItr->energy() / agc->
getEBValue() > 12) {
745 if(meSCSeedTimeVsAmp_) meSCSeedTimeVsAmp_->Fill(seedItr->time() + 5,sCluster->energy());
746 if(meSCSeedTime_) meSCSeedTime_->Fill(seedItr->time() + 5);
747 if (ism >= 1 && ism <= 18 && meSCSeedTimeEBM_) meSCSeedTimeEBM_->Fill(seedItr->time() + 5);
748 if (ism >= 19 && ism <= 36 && meSCSeedTimeEBP_) meSCSeedTimeEBP_->Fill(seedItr->time() + 5);
749 if (ism >= 4 && ism <= 7 && meSCSeedTimeEBMTop_) meSCSeedTimeEBMTop_->Fill(seedItr->time() + 5);
750 if (ism >= 22 && ism <= 25 && meSCSeedTimeEBPTop_) meSCSeedTimeEBPTop_->Fill(seedItr->time() + 5);
751 if (ism >= 13 && ism <= 16 && meSCSeedTimeEBMBot_) meSCSeedTimeEBMBot_->Fill(seedItr->time() + 5);
752 if (ism >= 31 && ism <= 34 && meSCSeedTimeEBPBot_) meSCSeedTimeEBPBot_->Fill(seedItr->time() + 5);
753 if(meSCSeedTimePerFed_[ism-1]) meSCSeedTimePerFed_[ism-1]->Fill(seedItr->time() + 5);
754 if(meSCSeedMapTimeTT_) meSCSeedMapTimeTT_->Fill(xebphi,xebeta,seedItr->time() + 5);
755 if(meSCSeedMapTimeMod_) meSCSeedMapTimeMod_->Fill(xebphi,xebeta,seedItr->time() + 5);
756 if(meSCSeedTimeVsPhi_) meSCSeedTimeVsPhi_->Fill(xebphi,seedItr->time() + 5);
760 LogWarning(
"EBClusterTaskExtras") <<
"EcalADCToGeVConstant not valid";
763 for(
int i=0;
i!=5;++
i) {
765 if(meSCSeedMapOccTrg_[i]) meSCSeedMapOccTrg_[
i]->Fill(xebphi, xebeta);
766 bool isExclusive =
true;
767 for(
int j=0;
j!=5;++
j) {
769 if(meSCSeedMapTimeTrgMod_[i]) meSCSeedMapTimeTrgMod_[
i]->Fill(xebphi, xebeta, seedItr->time() + 5);
770 if(
j != i && triggers[
j])
773 if(isExclusive)
if(meSCSeedMapOccTrgExcl_[i]) meSCSeedMapOccTrgExcl_[
i]->Fill(xebphi, xebeta);
777 if(meSCSizCrystalVsEne_) meSCSizCrystalVsEne_->Fill(sCluster->energy(),sIds.size());
779 if(meSCSeedMapOcc_) meSCSeedMapOcc_->Fill(xebphi, xebeta);
781 if(sCluster->energy() > 2)
if(meSCSeedMapOccHighEneTT_) meSCSeedMapOccHighEneTT_->Fill(xebphi, xebeta);
784 for(
int i=0;
i!=5;++
i) {
786 if(meSCSeedMapOccTrgTT_[i]) meSCSeedMapOccTrgTT_[
i]->Fill(xebphi, xebeta);
787 if(meTrg_) meTrg_->Fill(i);
790 if(meSCSeedMapTimeTrgTT_[i]) meSCSeedMapTimeTrgTT_[
i]->Fill(xebphi, xebeta, seedItr->time() + 5);
791 if(meSCSeedTimeTrg_[i]) meSCSeedTimeTrg_[
i]->Fill(seedItr->time() + 5);
794 LogWarning(
"EBClusterTaskExtras") <<
"EcalADCToGeVConstant not valid";
797 bool isExclusive =
true;
798 for(
int j=0;
j!=5;++
j) {
799 if(
j != i && triggers[
j])
803 if(isExclusive)
if(meTrgExcl_) meTrgExcl_->Fill(i);
808 LogWarning(
"EBClusterTaskExtras") <<
"EcalRecHitCollection not available";
824 std::vector<bool> l1Triggers;
827 l1Triggers.push_back(
false);
831 iEvent.
getByToken(l1GMTReadoutRecToken_,gmtrc_handle);
833 if (!(gmtrc_handle.isValid()))
835 LogWarning(
"EcalCosmicsHists") <<
"l1MuGMTReadoutCollection" <<
" not available";
840 iEvent.
getByToken(l1GTReadoutRecToken_,L1GTRR);
849 bool l1SingleEG2 =
menu->gtAlgorithmResult(
"L1_SingleEG2", dWord);
850 bool l1SingleEG5 =
menu->gtAlgorithmResult(
"L1_SingleEG5", dWord);
851 bool l1SingleEG8 =
menu->gtAlgorithmResult(
"L1_SingleEG8", dWord);
852 bool l1SingleEG10 =
menu->gtAlgorithmResult(
"L1_SingleEG10", dWord);
853 bool l1SingleEG12 =
menu->gtAlgorithmResult(
"L1_SingleEG12", dWord);
854 bool l1SingleEG15 =
menu->gtAlgorithmResult(
"L1_SingleEG15", dWord);
855 bool l1SingleEG20 =
menu->gtAlgorithmResult(
"L1_SingleEG20", dWord);
856 bool l1SingleEG25 =
menu->gtAlgorithmResult(
"L1_SingleEG25", dWord);
857 bool l1DoubleNoIsoEGBTBtight =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_tight", dWord);
858 bool l1DoubleNoIsoEGBTBloose =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_loose ", dWord);
859 bool l1DoubleNoIsoEGTopBottom =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottom", dWord);
860 bool l1DoubleNoIsoEGTopBottomCen =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen", dWord);
861 bool l1DoubleNoIsoEGTopBottomCen2 =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen2", dWord);
862 bool l1DoubleNoIsoEGTopBottomCenVert =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCenVert", dWord);
864 l1Triggers[ECAL_TRIGGER] = l1SingleEG2 || l1SingleEG5 || l1SingleEG8 || l1SingleEG10 || l1SingleEG12 || l1SingleEG15
865 || l1SingleEG20 || l1SingleEG25 || l1DoubleNoIsoEGBTBtight || l1DoubleNoIsoEGBTBloose
866 || l1DoubleNoIsoEGTopBottom || l1DoubleNoIsoEGTopBottomCen || l1DoubleNoIsoEGTopBottomCen2
867 || l1DoubleNoIsoEGTopBottomCenVert;
869 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
870 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
871 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
872 std::vector<L1MuRegionalCand>::const_iterator iter1;
873 std::vector<L1MuRegionalCand> rmc;
877 rmc = igmtrr->getDTBXCands();
878 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
879 if ( !(*iter1).empty() ) {
885 if(igmtrr->getBxInEvent()==0 && idt>0) l1Triggers[DT_TRIGGER] =
true;
889 rmc = igmtrr->getBrlRPCCands();
890 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
891 if ( !(*iter1).empty() ) {
897 if(igmtrr->getBxInEvent()==0 && irpcb>0) l1Triggers[RPC_TRIGGER] =
true;
901 rmc = igmtrr->getCSCCands();
902 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
903 if ( !(*iter1).empty() ) {
909 if(igmtrr->getBxInEvent()==0 && icsc>0) l1Triggers[CSC_TRIGGER] =
true;
914 for(
int ibx=-1; ibx<=1; ibx++) {
915 bool hcal_top =
false;
916 bool hcal_bot =
false;
917 const L1GtPsbWord psb = gtrr->gtPsbWord(0xbb0d,ibx);
918 std::vector<int> valid_phi;
919 if((psb.
aData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(4)>>10)&0x1f ); }
920 if((psb.
bData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(4)>>10)&0x1f ); }
921 if((psb.
aData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(5)>>10)&0x1f ); }
922 if((psb.
bData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(5)>>10)&0x1f ); }
923 std::vector<int>::const_iterator iphi;
924 for(iphi=valid_phi.begin(); iphi!=valid_phi.end(); iphi++) {
926 if(*iphi<9) hcal_top=
true;
927 if(*iphi>8) hcal_bot=
true;
929 if(ibx==0 && hcal_top && hcal_bot) l1Triggers[HCAL_TRIGGER]=
true;
T getParameter(std::string const &) const
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
std::vector< EcalRecHit >::const_iterator const_iterator
static void cleanup(const Factory::MakerMap::value_type &v)
int iphi() const
get the crystal iphi
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
std::vector< bool > DecisionWord
typedefs
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
int ieta() const
get the crystal ieta
const_iterator end() const
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
T const * product() const
T const * product() const
iterator find(key_type k)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
int ism(int ieta, int iphi)
void reset(double vett[256])
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
const_iterator begin() const
int zside() const
get the z-side of the crystal (1/-1)