75 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
84 meSCEneSingleCrystal_ = 0;
86 meSCSeedMapOccSingleCrystal_ = 0;
87 meSCSeedMapOccTT_ = 0;
88 meSCSeedMapOccHighEne_ = 0;
91 meSCSeedMapTimeTT_ = 0;
92 meSCSeedMapTimeMod_ = 0;
93 meSCSeedTimeVsPhi_ = 0;
94 meSCSeedTimeVsAmp_ = 0;
97 meSCSeedTimeEBMTop_ = 0;
98 meSCSeedTimeEBPTop_ = 0;
99 meSCSeedTimeEBMBot_ = 0;
100 meSCSeedTimeEBPBot_ = 0;
101 for(
int i=0;
i!=36;++
i)
102 meSCSeedTimePerFed_[
i] = 0;
103 for(
int i=0;
i!=5;++
i) {
104 meSCSeedMapOccTrg_[
i] = 0;
105 meSCSeedMapOccTrgExcl_[
i] = 0;
106 meSCSeedMapTimeTrgMod_[
i] = 0;
110 meSCSizCrystalVsEne_ = 0;
113 meSCSeedMapOccHighEneTT_ = 0;
114 for(
int i=0;
i!=5;++
i) {
115 meSCSeedMapOccTrgTT_[
i] = 0;
116 meSCSeedMapOccTrgExclTT_[
i] = 0;
118 meSCSeedMapTimeTrgTT_[
i] = 0;
119 meSCSeedTimeTrg_[
i] = 0;
136 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
137 dqmStore_->rmdir(prefixME_ +
"/EBClusterTaskExtras");
146 if ( ! mergeRuns_ ) this->
reset();
155 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
156 if ( meSCSizCrystal_ ) meSCSizCrystal_->Reset();
157 if ( meSCSizBC_ ) meSCSizBC_->Reset();
158 if ( meSCSizPhi_ ) meSCSizPhi_->Reset();
160 if ( meSCSeedEne_ ) meSCSeedEne_->Reset();
161 if ( meSCEne2_ ) meSCEne2_->Reset();
162 if ( meSCEneLow_ ) meSCEneLow_->Reset();
163 if ( meSCEneHigh_ ) meSCEneHigh_->Reset();
164 if ( meSCEneSingleCrystal_ ) meSCEneSingleCrystal_->Reset();
166 if ( meSCSeedMapOccSingleCrystal_ ) meSCSeedMapOccSingleCrystal_->Reset();
167 if ( meSCSeedMapOccTT_ ) meSCSeedMapOccTT_->Reset();
168 if ( meSCSeedMapOccHighEne_ ) meSCSeedMapOccHighEne_->Reset();
170 if ( meSCSeedTime_ ) meSCSeedTime_->Reset();
171 if ( meSCSeedMapTimeTT_ ) meSCSeedMapTimeTT_->Reset();
172 if ( meSCSeedTimeVsPhi_ ) meSCSeedTimeVsPhi_->Reset();
173 if ( meSCSeedTimeVsAmp_ ) meSCSeedTimeVsAmp_->Reset();
174 if ( meSCSeedTimeEBM_ ) meSCSeedTimeEBM_->Reset();
175 if ( meSCSeedTimeEBP_ ) meSCSeedTimeEBP_->Reset();
176 if ( meSCSeedTimeEBMTop_ ) meSCSeedTimeEBMTop_->Reset();
177 if ( meSCSeedTimeEBPTop_ ) meSCSeedTimeEBPTop_->Reset();
178 if ( meSCSeedTimeEBMBot_ ) meSCSeedTimeEBMBot_->Reset();
179 if ( meSCSeedTimeEBPBot_ ) meSCSeedTimeEBPBot_->Reset();
181 for(
int i=0;
i!=36; ++
i)
182 if ( meSCSeedTimePerFed_[
i] ) meSCSeedTimePerFed_[
i]->Reset();
184 for(
int i=0;i!=5;++
i) {
185 if ( meSCSeedMapOccTrg_[i] ) meSCSeedMapOccTrg_[
i]->Reset();
186 if ( meSCSeedMapOccTrgExcl_[i] ) meSCSeedMapOccTrgExcl_[
i]->Reset();
187 if ( meSCSeedMapTimeTrgMod_[i] ) meSCSeedMapTimeTrgMod_[
i]->Reset();
190 if ( meSCSeedMapTimeMod_ ) meSCSeedMapTimeMod_->Reset();
193 if ( meSCSizCrystalVsEne_ ) meSCSizCrystalVsEne_->Reset();
195 if ( meSCSeedMapOcc_ ) meSCSeedMapOcc_->Reset();
196 if ( meSCSeedMapOccHighEneTT_ ) meSCSeedMapOccHighEneTT_->Reset();
199 for(
int i=0; i!=5; ++
i) {
200 if ( meSCSeedMapOccTrgTT_[i] ) meSCSeedMapOccTrgTT_[
i]->Reset();
201 if ( meSCSeedMapOccTrgExclTT_[i] ) meSCSeedMapOccTrgExclTT_[
i]->Reset();
203 if ( meSCSeedMapTimeTrgTT_[i] ) meSCSeedMapTimeTrgTT_[
i]->Reset();
204 if ( meSCSeedTimeTrg_[i] ) meSCSeedTimeTrg_[
i]->Reset();
206 if ( meTrg_ ) meTrg_->Reset();
207 if ( meTrgExcl_ ) meTrgExcl_->Reset();
217 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
219 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
221 sprintf(histo,
"EBCLTE SC size (crystal)");
222 meSCSizCrystal_ = dqmStore_->book1D(histo,histo,150,0,150);
223 meSCSizCrystal_->setAxisTitle(
"super cluster size (crystal)", 1);
225 sprintf(histo,
"EBCLTE SC size (basic clusters)");
226 meSCSizBC_ = dqmStore_->book1D(histo,histo,20,0,20);
227 meSCSizBC_->setAxisTitle(
"super cluster size (basic clusters)", 1);
229 sprintf(histo,
"EBCLTE SC size in basic clusters vs phi");
230 meSCSizPhi_ = dqmStore_->bookProfile(histo,histo,360/5,-3.14159,3.14159,20,0,20);
231 meSCSizPhi_->setAxisTitle(
"phi", 1);
232 meSCSizPhi_->setAxisTitle(
"super cluster size (basic clusters)", 2);
234 sprintf(histo,
"EBCLTE SC seed crystal energy");
235 meSCSeedEne_ = dqmStore_->book1D(histo,histo,200,0,1.8);
236 meSCSeedEne_->setAxisTitle(
"seed crystal energy (GeV)", 1);
238 sprintf(histo,
"EBCLTE SC seed e2");
239 meSCEne2_ = dqmStore_->book1D(histo,histo,200,0,1.8);
240 meSCEne2_->setAxisTitle(
"seed + highest neighbor crystal energy (GeV)", 1);
242 sprintf(histo,
"EBCLTE SC energy low scale");
243 meSCEneLow_ = dqmStore_->book1D(histo,histo,200,0,1.8);
244 meSCEneLow_->setAxisTitle(
"energy (GeV)", 1);
246 sprintf(histo,
"EBCLTE SC energy high scale");
247 meSCEneHigh_ = dqmStore_->book1D(histo,histo,200,0,200);
248 meSCEneHigh_->setAxisTitle(
"energy (GeV)", 1);
250 sprintf(histo,
"EBCLTE SC single crystal energy (GeV)");
251 meSCEneSingleCrystal_ = dqmStore_->book1D(histo,histo,200,0,200);
252 meSCEneSingleCrystal_->setAxisTitle(
"energy (GeV)", 1);
254 sprintf(histo,
"EBCLTE SC seed occupancy map trigger tower binned");
255 meSCSeedMapOccTT_ = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
256 meSCSeedMapOccTT_->setAxisTitle(
"jphi", 1);
257 meSCSeedMapOccTT_->setAxisTitle(
"jeta", 2);
259 sprintf(histo,
"EBCLTE SC seed occupancy map (high energy clusters) (crystal binned)");
260 meSCSeedMapOccHighEne_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
261 meSCSeedMapOccHighEne_->setAxisTitle(
"jphi", 1);
262 meSCSeedMapOccHighEne_->setAxisTitle(
"jeta", 2);
264 sprintf(histo,
"EBCLTE SC single crystal cluster occupancy map");
265 meSCSeedMapOccSingleCrystal_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
266 meSCSeedMapOccSingleCrystal_->setAxisTitle(
"jphi", 1);
267 meSCSeedMapOccSingleCrystal_->setAxisTitle(
"jeta", 2);
269 sprintf(histo,
"EBCLTE SC seed crystal timing");
270 meSCSeedTime_ = dqmStore_->book1D(histo,histo,78,0.,10.);
271 meSCSeedTime_->setAxisTitle(
"seed crystal timing");
273 sprintf(histo,
"EBCLTE SC seed crystal timing map trigger tower binned");
274 meSCSeedMapTimeTT_ = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
275 meSCSeedMapTimeTT_->setAxisTitle(
"jphi", 1);
276 meSCSeedMapTimeTT_->setAxisTitle(
"jeta", 2);
278 sprintf(histo,
"EBCLTE SC seed crystal timing map module binned");
279 meSCSeedMapTimeMod_ = dqmStore_->bookProfile2D(histo,histo,18,0,360,8,-85,85,78,0.,10.,
"s");
280 meSCSeedMapTimeMod_->setAxisTitle(
"jphi",1);
281 meSCSeedMapTimeMod_->setAxisTitle(
"jeta",2);
283 sprintf(histo,
"EBCLTE SC seed crystal timing vs phi");
284 meSCSeedTimeVsPhi_ = dqmStore_->bookProfile(histo, histo, 72, 0, 360, 78, -7, 7);
285 meSCSeedTimeVsPhi_->setAxisTitle(
"jphi",1);
286 meSCSeedTimeVsPhi_->setAxisTitle(
"seed crystal timing",2);
288 sprintf(histo,
"EBCLTE SC seed crystal energy vs relative timing");
289 meSCSeedTimeVsAmp_ = dqmStore_->bookProfile(histo, histo, 78, -7, 7, 200, 0, 1.8);
290 meSCSeedTimeVsAmp_->setAxisTitle(
"seed crystal timing", 1);
291 meSCSeedTimeVsAmp_->setAxisTitle(
"seed crystal energy (GeV)", 2);
293 sprintf(histo,
"EBCLTE SC seed crystal timing EB -");
294 meSCSeedTimeEBM_ = dqmStore_->book1D(histo,histo,78,0.,10.);
295 meSCSeedTimeEBM_->setAxisTitle(
"seed crystal timing");
297 sprintf(histo,
"EBCLTE SC seed crystal timing EB +");
298 meSCSeedTimeEBP_ = dqmStore_->book1D(histo,histo,78,0.,10.);
299 meSCSeedTimeEBP_->setAxisTitle(
"seed crystal timing");
301 sprintf(histo,
"EBCLTE SC seed crystal timing EB - top");
302 meSCSeedTimeEBMTop_ = dqmStore_->book1D(histo,histo,78,0.,10.);
303 meSCSeedTimeEBMTop_->setAxisTitle(
"seed crystal timing", 1);
305 sprintf(histo,
"EBCLTE SC seed crystal timing EB + top");
306 meSCSeedTimeEBPTop_ = dqmStore_->book1D(histo,histo,78,0.,10.);
307 meSCSeedTimeEBPTop_->setAxisTitle(
"seed crystal timing", 1);
309 sprintf(histo,
"EBCLTE SC seed crystal timing EB - bottom");
310 meSCSeedTimeEBMBot_ = dqmStore_->book1D(histo,histo,78,0.,10.);
311 meSCSeedTimeEBMBot_->setAxisTitle(
"seed crystal timing", 1);
313 sprintf(histo,
"EBCLTE SC seed crystal timing EB + bottom");
314 meSCSeedTimeEBPBot_ = dqmStore_->book1D(histo,histo,78,0.,10.);
315 meSCSeedTimeEBPBot_->setAxisTitle(
"seed crystal timing", 1);
317 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras/EBCLTE seed crystal timing per super module");
318 for(
int i=0;
i!=36;++
i) {
320 sprintf(histo,
"EBCLTE SC seed crystal timing EB - %i",
i+1);
322 sprintf(histo,
"EBCLTE SC seed crystal timing EB + %i",
i+1-18);
323 meSCSeedTimePerFed_[
i] = dqmStore_->book1D(histo,histo,78,0.,10.);
324 meSCSeedTimePerFed_[
i]->setAxisTitle(
"seed crystal timing", 1);
327 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
329 sprintf(histo,
"EBCLTE SC seed occupancy map (CSC exclusive triggered)");
330 meSCSeedMapOccTrgExcl_[0] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
331 meSCSeedMapOccTrgExcl_[0]->setAxisTitle(
"jphi", 1);
332 meSCSeedMapOccTrgExcl_[0]->setAxisTitle(
"jeta", 2);
334 sprintf(histo,
"EBCLTE SC seed occupancy map (DT exclusive triggered)");
335 meSCSeedMapOccTrgExcl_[1] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
336 meSCSeedMapOccTrgExcl_[1]->setAxisTitle(
"jphi", 1);
337 meSCSeedMapOccTrgExcl_[1]->setAxisTitle(
"jeta", 2);
339 sprintf(histo,
"EBCLTE SC seed occupancy map (ECAL exclusive triggered)");
340 meSCSeedMapOccTrgExcl_[2] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
341 meSCSeedMapOccTrgExcl_[2]->setAxisTitle(
"jphi", 1);
342 meSCSeedMapOccTrgExcl_[2]->setAxisTitle(
"jeta", 2);
344 sprintf(histo,
"EBCLTE SC seed occupancy map (HCAL exclusive triggered)");
345 meSCSeedMapOccTrgExcl_[3] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
346 meSCSeedMapOccTrgExcl_[3]->setAxisTitle(
"jphi", 1);
347 meSCSeedMapOccTrgExcl_[3]->setAxisTitle(
"jeta", 2);
349 sprintf(histo,
"EBCLTE SC seed occupancy map (RPC exclusive triggered)");
350 meSCSeedMapOccTrgExcl_[4] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
351 meSCSeedMapOccTrgExcl_[4]->setAxisTitle(
"jphi", 1);
352 meSCSeedMapOccTrgExcl_[4]->setAxisTitle(
"jeta", 2);
354 sprintf(histo,
"EBCLTE SC seed occupancy map (CSC triggered)");
355 meSCSeedMapOccTrg_[0] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
356 meSCSeedMapOccTrg_[0]->setAxisTitle(
"jphi", 1);
357 meSCSeedMapOccTrg_[0]->setAxisTitle(
"jeta", 2);
359 sprintf(histo,
"EBCLTE SC seed occupancy map (DT triggered)");
360 meSCSeedMapOccTrg_[1] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
361 meSCSeedMapOccTrg_[1]->setAxisTitle(
"jphi", 1);
362 meSCSeedMapOccTrg_[1]->setAxisTitle(
"jeta", 2);
364 sprintf(histo,
"EBCLTE SC seed occupancy map (ECAL triggered)");
365 meSCSeedMapOccTrg_[2] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
366 meSCSeedMapOccTrg_[2]->setAxisTitle(
"jphi", 1);
367 meSCSeedMapOccTrg_[2]->setAxisTitle(
"jeta", 2);
369 sprintf(histo,
"EBCLTE SC seed occupancy map (HCAL triggered)");
370 meSCSeedMapOccTrg_[3] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
371 meSCSeedMapOccTrg_[3]->setAxisTitle(
"jphi", 1);
372 meSCSeedMapOccTrg_[3]->setAxisTitle(
"jeta", 2);
374 sprintf(histo,
"EBCLTE SC seed occupancy map (RPC triggered)");
375 meSCSeedMapOccTrg_[4] = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
376 meSCSeedMapOccTrg_[4]->setAxisTitle(
"jphi", 1);
377 meSCSeedMapOccTrg_[4]->setAxisTitle(
"jeta", 2);
379 sprintf(histo,
"EBCLTE SC seed crystal timing map (CSC triggered) module binned");
380 meSCSeedMapTimeTrgMod_[0] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
381 meSCSeedMapTimeTrgMod_[0]->setAxisTitle(
"jphi", 1);
382 meSCSeedMapTimeTrgMod_[0]->setAxisTitle(
"jeta", 2);
384 sprintf(histo,
"EBCLTE SC seed crystal timing map (DT triggered) module binned");
385 meSCSeedMapTimeTrgMod_[1] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
386 meSCSeedMapTimeTrgMod_[1]->setAxisTitle(
"jphi", 1);
387 meSCSeedMapTimeTrgMod_[1]->setAxisTitle(
"jeta", 2);
389 sprintf(histo,
"EBCLTE SC seed crystal timing map (ECAL triggered) module binned");
390 meSCSeedMapTimeTrgMod_[2] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
391 meSCSeedMapTimeTrgMod_[2]->setAxisTitle(
"jphi", 1);
392 meSCSeedMapTimeTrgMod_[2]->setAxisTitle(
"jeta", 2);
394 sprintf(histo,
"EBCLTE SC seed crystal timing map (HCAL triggered) module binned");
395 meSCSeedMapTimeTrgMod_[3] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
396 meSCSeedMapTimeTrgMod_[3]->setAxisTitle(
"jphi", 1);
397 meSCSeedMapTimeTrgMod_[3]->setAxisTitle(
"jeta", 2);
399 sprintf(histo,
"EBCLTE SC seed crystal timing map (RPC triggered) module binned");
400 meSCSeedMapTimeTrgMod_[4] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
401 meSCSeedMapTimeTrgMod_[4]->setAxisTitle(
"jphi", 1);
402 meSCSeedMapTimeTrgMod_[4]->setAxisTitle(
"jeta", 2);
406 sprintf(histo,
"EBCLTE SC size (crystal) vs energy (GeV)");
407 meSCSizCrystalVsEne_ = dqmStore_->bookProfile(histo,histo,200,0.,10.,150,0,150);
408 meSCSizCrystalVsEne_->setAxisTitle(
"energy (GeV)", 1);
409 meSCSizCrystalVsEne_->setAxisTitle(
"super cluster size (crystal)", 2);
411 sprintf(histo,
"EBCLTE SC seed occupancy map");
412 meSCSeedMapOcc_ = dqmStore_->book2D(histo,histo,360,0,360,170,-85,85);
413 meSCSeedMapOcc_->setAxisTitle(
"jphi", 1);
414 meSCSeedMapOcc_->setAxisTitle(
"jeta", 2);
416 sprintf(histo,
"EBCLTE SC seed occupancy map (high energy clusters) trigger tower binned");
417 meSCSeedMapOccHighEneTT_ = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
418 meSCSeedMapOccHighEneTT_->setAxisTitle(
"jphi", 1);
419 meSCSeedMapOccHighEneTT_->setAxisTitle(
"jeta", 2);
421 sprintf(histo,
"EBCLTE SC seed occupancy map (CSC triggered) trigger tower binned");
422 meSCSeedMapOccTrgTT_[0] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
423 meSCSeedMapOccTrgTT_[0]->setAxisTitle(
"jphi", 1);
424 meSCSeedMapOccTrgTT_[0]->setAxisTitle(
"jeta", 2);
426 sprintf(histo,
"EBCLTE SC seed occupancy map (DT triggered) trigger tower binned");
427 meSCSeedMapOccTrgTT_[1] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
428 meSCSeedMapOccTrgTT_[1]->setAxisTitle(
"jphi", 1);
429 meSCSeedMapOccTrgTT_[1]->setAxisTitle(
"jeta", 2);
431 sprintf(histo,
"EBCLTE SC seed occupancy map (ECAL triggered) trigger tower binned");
432 meSCSeedMapOccTrgTT_[2] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
433 meSCSeedMapOccTrgTT_[2]->setAxisTitle(
"jphi", 1);
434 meSCSeedMapOccTrgTT_[2]->setAxisTitle(
"jeta", 2);
436 sprintf(histo,
"EBCLTE SC seed occupancy map (HCAL triggered) trigger tower binned");
437 meSCSeedMapOccTrgTT_[3] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
438 meSCSeedMapOccTrgTT_[3]->setAxisTitle(
"jphi", 1);
439 meSCSeedMapOccTrgTT_[3]->setAxisTitle(
"jeta", 2);
441 sprintf(histo,
"EBCLTE SC seed occupancy map (RPC triggered) trigger tower binned");
442 meSCSeedMapOccTrgTT_[4] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
443 meSCSeedMapOccTrgTT_[4]->setAxisTitle(
"jphi", 1);
444 meSCSeedMapOccTrgTT_[4]->setAxisTitle(
"jeta", 2);
446 sprintf(histo,
"EBCLTE SC seed occupancy map (CSC exclusive triggered) trigger tower binned");
447 meSCSeedMapOccTrgExclTT_[0] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
448 meSCSeedMapOccTrgExclTT_[0]->setAxisTitle(
"jphi", 1);
449 meSCSeedMapOccTrgExclTT_[0]->setAxisTitle(
"jeta", 2);
451 sprintf(histo,
"EBCLTE SC seed occupancy map (DT exclusive triggered) trigger tower binned");
452 meSCSeedMapOccTrgExclTT_[1] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
453 meSCSeedMapOccTrgExclTT_[1]->setAxisTitle(
"jphi", 1);
454 meSCSeedMapOccTrgExclTT_[1]->setAxisTitle(
"jeta", 2);
456 sprintf(histo,
"EBCLTE SC seed occupancy map (ECAL exclusive triggered) trigger tower binned");
457 meSCSeedMapOccTrgExclTT_[2] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
458 meSCSeedMapOccTrgExclTT_[2]->setAxisTitle(
"jphi", 1);
459 meSCSeedMapOccTrgExclTT_[2]->setAxisTitle(
"jeta", 2);
461 sprintf(histo,
"EBCLTE SC seed occupancy map (HCAL exclusive triggered) trigger tower binned");
462 meSCSeedMapOccTrgExclTT_[3] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
463 meSCSeedMapOccTrgExclTT_[3]->setAxisTitle(
"jphi", 1);
464 meSCSeedMapOccTrgExclTT_[3]->setAxisTitle(
"jeta", 2);
466 sprintf(histo,
"EBCLTE SC seed occupancy map (RPC exclusive triggered) trigger tower binned");
467 meSCSeedMapOccTrgExclTT_[4] = dqmStore_->book2D(histo,histo,72,0,360,34,-85,85);
468 meSCSeedMapOccTrgExclTT_[4]->setAxisTitle(
"jphi", 1);
469 meSCSeedMapOccTrgExclTT_[4]->setAxisTitle(
"jeta", 2);
471 sprintf(histo,
"EBCLTE SC seed crystal timing map (CSC exclusive triggered) trigger tower binned");
472 meSCSeedMapTimeTrgTT_[0] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
473 meSCSeedMapTimeTrgTT_[0]->setAxisTitle(
"jphi", 1);
474 meSCSeedMapTimeTrgTT_[0]->setAxisTitle(
"jeta", 2);
476 sprintf(histo,
"EBCLTE SC seed crystal timing map (DT exclusive triggered) trigger tower binned");
477 meSCSeedMapTimeTrgTT_[1] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
478 meSCSeedMapTimeTrgTT_[1]->setAxisTitle(
"jphi", 1);
479 meSCSeedMapTimeTrgTT_[1]->setAxisTitle(
"jeta", 2);
481 sprintf(histo,
"EBCLTE SC seed crystal timing map (ECAL exclusive triggered) trigger tower binned");
482 meSCSeedMapTimeTrgTT_[2] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
483 meSCSeedMapTimeTrgTT_[2]->setAxisTitle(
"jphi", 1);
484 meSCSeedMapTimeTrgTT_[2]->setAxisTitle(
"jeta", 2);
486 sprintf(histo,
"EBCLTE SC seed crystal timing map (HCAL exclusive triggered) trigger tower binned");
487 meSCSeedMapTimeTrgTT_[3] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
488 meSCSeedMapTimeTrgTT_[3]->setAxisTitle(
"jphi", 1);
489 meSCSeedMapTimeTrgTT_[3]->setAxisTitle(
"jeta", 2);
491 sprintf(histo,
"EBCLTE SC seed crystal timing map (RPC exclusive triggered) trigger tower binned");
492 meSCSeedMapTimeTrgTT_[4] = dqmStore_->bookProfile2D(histo,histo,72,0,360,34,-85,85,78,0.,10.,
"s");
493 meSCSeedMapTimeTrgTT_[4]->setAxisTitle(
"jphi", 1);
494 meSCSeedMapTimeTrgTT_[4]->setAxisTitle(
"jeta", 2);
496 sprintf(histo,
"EBCLTE SC seed crystal timing (CSC triggered)");
497 meSCSeedTimeTrg_[0] = dqmStore_->book1D(histo,histo,78,0.,10.);
498 meSCSeedTimeTrg_[0]->setAxisTitle(
"seed crystal timing",1);
500 sprintf(histo,
"EBCLTE SC seed crystal timing (DT triggered)");
501 meSCSeedTimeTrg_[1] = dqmStore_->book1D(histo,histo,78,0.,10.);
502 meSCSeedTimeTrg_[1]->setAxisTitle(
"seed crystal timing",1);
504 sprintf(histo,
"EBCLTE SC seed crystal timing (ECAL triggered)");
505 meSCSeedTimeTrg_[2] = dqmStore_->book1D(histo,histo,78,0.,10.);
506 meSCSeedTimeTrg_[2]->setAxisTitle(
"seed crystal timing",1);
508 sprintf(histo,
"EBCLTE SC seed crystal timing (HCAL triggered)");
509 meSCSeedTimeTrg_[3] = dqmStore_->book1D(histo,histo,78,0.,10.);
510 meSCSeedTimeTrg_[3]->setAxisTitle(
"seed crystal timing",1);
512 sprintf(histo,
"EBCLTE SC seed crystal timing (RPC triggered)");
513 meSCSeedTimeTrg_[4] = dqmStore_->book1D(histo,histo,78,0.,10.);
514 meSCSeedTimeTrg_[4]->setAxisTitle(
"seed crystal timing",1);
516 sprintf(histo,
"EBCLTE triggers");
517 meTrg_ = dqmStore_->book1D(histo, histo, 5, 0, 5);
518 meTrg_->setAxisTitle(
"triggers");
520 sprintf(histo,
"EBCLTE exclusive triggers");
521 meTrgExcl_ = dqmStore_->book1D(histo, histo, 5, 0, 5);
522 meTrgExcl_->setAxisTitle(
"triggers");
530 if ( ! init_ )
return;
533 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
535 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
536 if ( meSCSizCrystal_ ) dqmStore_->removeElement( meSCSizCrystal_->getName() );
539 if ( meSCSizBC_ ) dqmStore_->removeElement( meSCSizBC_->getName() );
542 if ( meSCSizPhi_ ) dqmStore_->removeElement( meSCSizPhi_->getName() );
545 if ( meSCSeedEne_ ) dqmStore_->removeElement( meSCSeedEne_->getName() );
548 if ( meSCEne2_ ) dqmStore_->removeElement( meSCEne2_->getName() );
551 if ( meSCEneLow_ ) dqmStore_->removeElement( meSCEneLow_->getName() );
554 if ( meSCEneHigh_ ) dqmStore_->removeElement( meSCEneHigh_->getName() );
557 if ( meSCEneSingleCrystal_ ) dqmStore_->removeElement( meSCEneSingleCrystal_->getName() );
558 meSCEneSingleCrystal_ = 0;
560 if ( meSCSeedMapOccTT_ ) dqmStore_->removeElement( meSCSeedMapOccTT_->getName() );
561 meSCSeedMapOccTT_ = 0;
563 if ( meSCSeedMapOccHighEne_ ) dqmStore_->removeElement( meSCSeedMapOccHighEne_->getName() );
564 meSCSeedMapOccHighEne_ = 0;
566 if ( meSCSeedMapOccSingleCrystal_ ) dqmStore_->removeElement( meSCSeedMapOccSingleCrystal_->getName() );
567 meSCSeedMapOccSingleCrystal_ = 0;
569 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras/EBCLTE seed crystal timing per super module");
570 for(
int i=0;
i!=36; ++
i) {
571 if( meSCSeedTimePerFed_[
i] ) dqmStore_->removeElement( meSCSeedTimePerFed_[i]->
getName() );
572 meSCSeedTimePerFed_[
i] = 0;
574 dqmStore_->setCurrentFolder(prefixME_ +
"/EBClusterTaskExtras");
576 if ( meSCSeedTime_ ) dqmStore_->removeElement( meSCSeedTime_->getName() );
578 if ( meSCSeedMapTimeTT_ ) dqmStore_->removeElement( meSCSeedMapTimeTT_->getName() );
579 meSCSeedMapTimeTT_ = 0;
580 if ( meSCSeedMapTimeMod_ ) dqmStore_->removeElement( meSCSeedMapTimeMod_->getName() );
581 meSCSeedMapTimeMod_ = 0;
582 if ( meSCSeedTimeVsPhi_ ) dqmStore_->removeElement( meSCSeedTimeVsPhi_->getName() );
583 meSCSeedTimeVsPhi_ = 0;
584 if ( meSCSeedTimeVsAmp_ ) dqmStore_->removeElement( meSCSeedTimeVsAmp_->getName() );
585 meSCSeedTimeVsAmp_ = 0;
586 if ( meSCSeedTimeEBM_ ) dqmStore_->removeElement( meSCSeedTimeEBM_->getName() );
587 meSCSeedTimeEBM_ = 0;
588 if ( meSCSeedTimeEBP_ ) dqmStore_->removeElement( meSCSeedTimeEBP_->getName() );
589 meSCSeedTimeEBP_ = 0;
590 if ( meSCSeedTimeEBMTop_ ) dqmStore_->removeElement( meSCSeedTimeEBMTop_->getName() );
591 meSCSeedTimeEBMTop_ = 0;
592 if ( meSCSeedTimeEBPTop_ ) dqmStore_->removeElement( meSCSeedTimeEBPTop_->getName() );
593 meSCSeedTimeEBPTop_ = 0;
594 if ( meSCSeedTimeEBMBot_ ) dqmStore_->removeElement( meSCSeedTimeEBMBot_->getName() );
595 meSCSeedTimeEBMBot_ = 0;
596 if ( meSCSeedTimeEBPBot_ ) dqmStore_->removeElement( meSCSeedTimeEBPBot_->getName() );
597 meSCSeedTimeEBPBot_ = 0;
599 for(
int i=0;
i!=5+ii) {
600 if ( meSCSeedMapOccTrg_[
i] ) dqmStore_->removeElement( meSCSeedMapOccTrg_[i]->
getName() );
601 meSCSeedMapOccTrg_[
i] = 0;
602 if ( meSCSeedMapOccTrgExcl_[i] ) dqmStore_->removeElement( meSCSeedMapOccTrgExcl_[i]->
getName() );
603 meSCSeedMapOccTrgExcl_[
i] = 0;
604 if ( meSCSeedMapTimeTrgMod_[i] ) dqmStore_->removeElement( meSCSeedMapTimeTrgMod_[i]->
getName() );
605 meSCSeedMapTimeTrgMod_[
i] = 0;
609 if ( meSCSizCrystalVsEne_ ) dqmStore_->removeElement( meSCSizCrystalVsEne_->getName() );
610 meSCSizCrystalVsEne_ = 0;
613 if ( meSCSeedMapOcc_ ) dqmStore_->removeElement( meSCSeedMapOcc_->getName() );
616 if ( meSCSeedMapOccHighEneTT_ ) dqmStore_->removeElement( meSCSeedMapOccHighEneTT_->getName() );
617 meSCSeedMapOccHighEneTT_ = 0;
619 for(
int i=0;
i!=5; ++
i) {
620 if ( meSCSeedMapOccTrgTT_[
i] ) dqmStore_->removeElement( meSCSeedMapOccTrgTT_[i]->
getName() );
621 meSCSeedMapOccTrgTT_[
i] = 0;
622 if ( meSCSeedMapOccTrgExclTT_[i] ) dqmStore_->removeElement( meSCSeedMapOccTrgExclTT_[i]->
getName() );
623 meSCSeedMapOccTrgExclTT_[
i] = 0;
625 if ( meSCSeedMapTimeTrgTT_[i] ) dqmStore_->removeElement( meSCSeedMapTimeTrgTT_[i]->
getName() );
626 meSCSeedMapTimeTrgTT_[
i] = 0;
628 if ( meSCSeedTimeTrg_[i] ) dqmStore_->removeElement( meSCSeedTimeTrg_[i]->
getName() );
629 meSCSeedTimeTrg_[
i] = 0;
632 if ( meTrg_ ) dqmStore_->removeElement( meTrg_->getName() );
635 if ( meTrgExcl_ ) dqmStore_->removeElement( meTrgExcl_->getName() );
647 LogInfo(
"EBClusterTaskExtras") <<
"analyzed " << ievt_ <<
" events";
649 if ( enableCleanup_ ) this->
cleanup();
657 if ( ! init_ ) this->
setup();
665 if ( e.
getByLabel(SuperClusterCollection_, pSuperClusters) ) {
672 for ( SuperClusterCollection::const_iterator sCluster = pSuperClusters->begin(); sCluster != pSuperClusters->end(); ++sCluster ) {
676 e.
getByLabel( EcalRecHitCollection_, pEBRecHits );
684 std::vector< std::pair<DetId,float> > sIds = sCluster->hitsAndFractions();
695 for(std::vector< std::pair<DetId,float> >::const_iterator idItr = sIds.begin(); idItr != sIds.end(); ++idItr) {
696 DetId id = idItr->first;
699 if(hitItr == ebRecHits->
end()) {
continue; }
700 if(hitItr->energy() > secondItr->energy()) { secondItr = hitItr; }
701 if(hitItr->energy() > seedItr->energy()) {
std::swap(seedItr,secondItr); }
704 eMax = seedItr->energy();
705 e2nd = secondItr->energy();
709 int ebeta = seedId.
ieta();
710 int ebphi = seedId.
iphi();
711 float xebeta = ebeta - 0.5 * seedId.
zside();
712 float xebphi = ebphi - 0.5;
718 vector<bool> triggers = determineTriggers(e,c);
720 #ifndef EBCLUSTERTASKEXTRAS_DQMOFFLINE
724 if(meSCEneLow_) meSCEneLow_->Fill( sCluster->energy() );
725 if(meSCEneHigh_) meSCEneHigh_->Fill( sCluster->energy() );
726 if(meSCSizBC_) meSCSizBC_->Fill(
float(sCluster->clustersSize()) );
727 if(meSCSizPhi_) meSCSizPhi_->Fill(xebphi,sCluster->clustersSize());
729 if(meSCSizCrystal_) meSCSizCrystal_->Fill(sIds.size());
730 if(meSCSeedEne_) meSCSeedEne_->Fill(eMax);
731 if(meSCEne2_) meSCEne2_->Fill(eMax+e2nd);
734 if(meSCSeedMapOccTT_) meSCSeedMapOccTT_->Fill(xebphi, xebeta);
735 if(sIds.size() == 1) {
736 if(meSCEneSingleCrystal_) meSCEneSingleCrystal_->Fill(sCluster->energy());
737 if(meSCSeedMapOccSingleCrystal_) meSCSeedMapOccSingleCrystal_->Fill(xebphi, xebeta);
740 if(sCluster->energy() > 2)
if(meSCSeedMapOccHighEne_) meSCSeedMapOccHighEne_->Fill(xebphi, xebeta);
743 if(seedItr->energy() / agc->
getEBValue() > 12) {
744 if(meSCSeedTimeVsAmp_) meSCSeedTimeVsAmp_->Fill(seedItr->time() + 5,sCluster->energy());
745 if(meSCSeedTime_) meSCSeedTime_->Fill(seedItr->time() + 5);
746 if (ism >= 1 && ism <= 18 && meSCSeedTimeEBM_) meSCSeedTimeEBM_->Fill(seedItr->time() + 5);
747 if (ism >= 19 && ism <= 36 && meSCSeedTimeEBP_) meSCSeedTimeEBP_->Fill(seedItr->time() + 5);
748 if (ism >= 4 && ism <= 7 && meSCSeedTimeEBMTop_) meSCSeedTimeEBMTop_->Fill(seedItr->time() + 5);
749 if (ism >= 22 && ism <= 25 && meSCSeedTimeEBPTop_) meSCSeedTimeEBPTop_->Fill(seedItr->time() + 5);
750 if (ism >= 13 && ism <= 16 && meSCSeedTimeEBMBot_) meSCSeedTimeEBMBot_->Fill(seedItr->time() + 5);
751 if (ism >= 31 && ism <= 34 && meSCSeedTimeEBPBot_) meSCSeedTimeEBPBot_->Fill(seedItr->time() + 5);
752 if(meSCSeedTimePerFed_[ism-1]) meSCSeedTimePerFed_[ism-1]->Fill(seedItr->time() + 5);
753 if(meSCSeedMapTimeTT_) meSCSeedMapTimeTT_->Fill(xebphi,xebeta,seedItr->time() + 5);
754 if(meSCSeedMapTimeMod_) meSCSeedMapTimeMod_->Fill(xebphi,xebeta,seedItr->time() + 5);
755 if(meSCSeedTimeVsPhi_) meSCSeedTimeVsPhi_->Fill(xebphi,seedItr->time() + 5);
759 LogWarning(
"EBClusterTaskExtras") <<
"EcalADCToGeVConstant not valid";
762 for(
int i=0;
i!=5;++
i) {
764 if(meSCSeedMapOccTrg_[i]) meSCSeedMapOccTrg_[
i]->Fill(xebphi, xebeta);
765 bool isExclusive =
true;
766 for(
int j=0;
j!=5;++
j) {
768 if(meSCSeedMapTimeTrgMod_[i]) meSCSeedMapTimeTrgMod_[
i]->Fill(xebphi, xebeta, seedItr->time() + 5);
769 if(
j != i && triggers[
j])
772 if(isExclusive)
if(meSCSeedMapOccTrgExcl_[i]) meSCSeedMapOccTrgExcl_[
i]->Fill(xebphi, xebeta);
776 if(meSCSizCrystalVsEne_) meSCSizCrystalVsEne_->Fill(sCluster->energy(),sIds.size());
778 if(meSCSeedMapOcc_) meSCSeedMapOcc_->Fill(xebphi, xebeta);
780 if(sCluster->energy() > 2)
if(meSCSeedMapOccHighEneTT_) meSCSeedMapOccHighEneTT_->Fill(xebphi, xebeta);
783 for(
int i=0;
i!=5;++
i) {
785 if(meSCSeedMapOccTrgTT_[i]) meSCSeedMapOccTrgTT_[
i]->Fill(xebphi, xebeta);
786 if(meTrg_) meTrg_->Fill(i);
789 if(meSCSeedMapTimeTrgTT_[i]) meSCSeedMapTimeTrgTT_[
i]->Fill(xebphi, xebeta, seedItr->time() + 5);
790 if(meSCSeedTimeTrg_[i]) meSCSeedTimeTrg_[
i]->Fill(seedItr->time() + 5);
793 LogWarning(
"EBClusterTaskExtras") <<
"EcalADCToGeVConstant not valid";
796 bool isExclusive =
true;
797 for(
int j=0;
j!=5;++
j) {
798 if(
j != i && triggers[
j])
802 if(isExclusive)
if(meTrgExcl_) meTrgExcl_->Fill(i);
807 LogWarning(
"EBClusterTaskExtras") << EcalRecHitCollection_ <<
" not available";
813 LogWarning(
"EBClusterTaskExtras") << SuperClusterCollection_ <<
" not available";
823 std::vector<bool> l1Triggers;
826 l1Triggers.push_back(
false);
830 iEvent.
getByLabel(l1GMTReadoutRecTag_,gmtrc_handle);
832 if (!(gmtrc_handle.isValid()))
834 LogWarning(
"EcalCosmicsHists") <<
"l1MuGMTReadoutCollection" <<
" not available";
850 bool l1SingleEG2 = menu->gtAlgorithmResult(
"L1_SingleEG2", dWord);
851 bool l1SingleEG5 = menu->gtAlgorithmResult(
"L1_SingleEG5", dWord);
852 bool l1SingleEG8 = menu->gtAlgorithmResult(
"L1_SingleEG8", dWord);
853 bool l1SingleEG10 = menu->gtAlgorithmResult(
"L1_SingleEG10", dWord);
854 bool l1SingleEG12 = menu->gtAlgorithmResult(
"L1_SingleEG12", dWord);
855 bool l1SingleEG15 = menu->gtAlgorithmResult(
"L1_SingleEG15", dWord);
856 bool l1SingleEG20 = menu->gtAlgorithmResult(
"L1_SingleEG20", dWord);
857 bool l1SingleEG25 = menu->gtAlgorithmResult(
"L1_SingleEG25", dWord);
858 bool l1DoubleNoIsoEGBTBtight = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_tight", dWord);
859 bool l1DoubleNoIsoEGBTBloose = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_loose ", dWord);
860 bool l1DoubleNoIsoEGTopBottom = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottom", dWord);
861 bool l1DoubleNoIsoEGTopBottomCen = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen", dWord);
862 bool l1DoubleNoIsoEGTopBottomCen2 = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen2", dWord);
863 bool l1DoubleNoIsoEGTopBottomCenVert = menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCenVert", dWord);
865 l1Triggers[ECAL_TRIGGER] = l1SingleEG2 || l1SingleEG5 || l1SingleEG8 || l1SingleEG10 || l1SingleEG12 || l1SingleEG15
866 || l1SingleEG20 || l1SingleEG25 || l1DoubleNoIsoEGBTBtight || l1DoubleNoIsoEGBTBloose
867 || l1DoubleNoIsoEGTopBottom || l1DoubleNoIsoEGTopBottomCen || l1DoubleNoIsoEGTopBottomCen2
868 || l1DoubleNoIsoEGTopBottomCenVert;
870 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
871 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
872 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
873 std::vector<L1MuRegionalCand>::const_iterator iter1;
874 std::vector<L1MuRegionalCand> rmc;
878 rmc = igmtrr->getDTBXCands();
879 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
880 if ( !(*iter1).empty() ) {
886 if(igmtrr->getBxInEvent()==0 && idt>0) l1Triggers[DT_TRIGGER] =
true;
890 rmc = igmtrr->getBrlRPCCands();
891 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
892 if ( !(*iter1).empty() ) {
898 if(igmtrr->getBxInEvent()==0 && irpcb>0) l1Triggers[RPC_TRIGGER] =
true;
902 rmc = igmtrr->getCSCCands();
903 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
904 if ( !(*iter1).empty() ) {
910 if(igmtrr->getBxInEvent()==0 && icsc>0) l1Triggers[CSC_TRIGGER] =
true;
915 for(
int ibx=-1; ibx<=1; ibx++) {
916 bool hcal_top =
false;
917 bool hcal_bot =
false;
918 const L1GtPsbWord psb = gtrr->gtPsbWord(0xbb0d,ibx);
919 std::vector<int> valid_phi;
920 if((psb.
aData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(4)>>10)&0x1f ); }
921 if((psb.
bData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(4)>>10)&0x1f ); }
922 if((psb.
aData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(5)>>10)&0x1f ); }
923 if((psb.
bData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(5)>>10)&0x1f ); }
924 std::vector<int>::const_iterator iphi;
925 for(iphi=valid_phi.begin(); iphi!=valid_phi.end(); iphi++) {
927 if(*iphi<9) hcal_top=
true;
928 if(*iphi>8) hcal_bot=
true;
930 if(ibx==0 && hcal_top && hcal_bot) l1Triggers[HCAL_TRIGGER]=
true;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
Some "id" conversions.
std::vector< T >::const_iterator const_iterator
static void cleanup(const Factory::MakerMap::value_type &v)
int iphi() const
get the crystal iphi
static int iSM(const int ism, const EcalSubdetector subdet)
std::vector< bool > DecisionWord
typedefs
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
int ieta() const
get the crystal ieta
std::string getName(Reflex::Type &cc)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const boost::uint16_t aData(int iA) const
get/set A_DATA_CH_IA
const_iterator end() const
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
const boost::uint16_t bData(int iB) const
get/set B_DATA_CH_IB
T const * product() const
T const * product() const
iterator find(key_type k)
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)