CMS 3D CMS Logo

ClusterTask.cc
Go to the documentation of this file.
2 
16 
17 namespace ecaldqm {
19  : DQWorkerTask(),
20  ebHits_(nullptr),
21  eeHits_(nullptr),
22  // ievt_(0),
23  // massCalcPrescale_(_workerParams.getUntrackedParameter<int>("massCalcPrescale")),
24  doExtra_(true),
25  energyThreshold_(0.),
26  swissCrossMaxThreshold_(3.),
27  egTriggerAlgos_(),
28  trigTypeToME_{0, 1, 2, 3, 4},
29  L1GlobalTriggerReadoutRecordTag_(),
30  L1MuGMTReadoutCollectionTag_(),
31  L1GlobalTriggerReadoutRecordToken_(),
32  L1MuGMTReadoutCollectionToken_() {}
33 
35  doExtra_ = _params.getUntrackedParameter<bool>("doExtra");
36 
37  if (!doExtra_) {
38  MEs_.erase(std::string("SCSizeVsEnergy"));
39  MEs_.erase(std::string("SCSeedOccupancyHighE"));
40  MEs_.erase(std::string("SCSeedOccupancyTrig"));
41  MEs_.erase(std::string("SCSeedTimeTrigEx"));
42  MEs_.erase(std::string("SCSeedTimeMapTrigEx"));
43  MEs_.erase(std::string("SCOccupancyProjEta"));
44  MEs_.erase(std::string("SCOccupancyProjPhi"));
45  MEs_.erase(std::string("SCSwissCross"));
46  MEs_.erase(std::string("Triggers"));
47  MEs_.erase(std::string("ExclusiveTriggers"));
48 
49  return;
50  }
51 
52  energyThreshold_ = _params.getUntrackedParameter<double>("energyThreshold");
53  swissCrossMaxThreshold_ = _params.getUntrackedParameter<double>("swissCrossMaxThreshold");
54  egTriggerAlgos_ = _params.getUntrackedParameter<std::vector<std::string> >("egTriggerAlgos");
55  L1GlobalTriggerReadoutRecordTag_ = _params.getUntrackedParameter<edm::InputTag>("L1GlobalTriggerReadoutRecordTag");
56  L1MuGMTReadoutCollectionTag_ = _params.getUntrackedParameter<edm::InputTag>("L1MuGMTReadoutCollectionTag");
57 
59 
60  std::string triggerTypeNames[nTriggerTypes] = {"ECAL", "HCAL", "CSC", "DT", "RPC"};
61 
62  MESetMulti& occupancy(static_cast<MESetMulti&>(MEs_.at("SCSeedOccupancyTrig")));
63  for (unsigned iT(0); iT != nTriggerTypes; ++iT) {
64  repl["trig"] = triggerTypeNames[iT];
65  trigTypeToME_[iT] = occupancy.getIndex(repl);
66  }
67  }
68 
72  }
73 
74  void ClusterTask::beginEvent(edm::Event const& _evt, edm::EventSetup const& _es, bool const&, bool&) {
75  if (!doExtra_)
76  return;
77 
78  triggered_.reset();
79 
80  // TODO IS THIS THE MOST UP-TO-DATE ACCESSOR TO L1 INFO?
81 
84 
85  if (!l1GTHndl.isValid()) {
86  edm::LogError("L1GlobalTriggerReadoutRecord")
87  << "Failed to retrieve L1GlobalTriggerReadoutRecord from the Event!";
88  return; // Exit the function early if the handle is invalid
89  }
90 
91  DecisionWord const& dWord(l1GTHndl->decisionWord());
92 
93  //Ecal
94 
95  L1GtTriggerMenu const* menu(&_es.getData(menuRcd));
96 
97  if (!dWord.empty()) { //protect against no L1GT in run
98  for (unsigned iT(0); iT != egTriggerAlgos_.size(); ++iT) {
99  if (menu->gtAlgorithmResult(egTriggerAlgos_[iT], dWord)) {
101  break;
102  }
103  }
104  }
105 
106  //Hcal
107  bool hcal_top = false;
108  bool hcal_bot = false;
109  const L1GtPsbWord psb = l1GTHndl->gtPsbWord(0xbb0d, 0);
110  std::vector<int> valid_phi;
111  if ((psb.aData(4) & 0x3f) >= 1) {
112  valid_phi.push_back((psb.aData(4) >> 10) & 0x1f);
113  }
114  if ((psb.bData(4) & 0x3f) >= 1) {
115  valid_phi.push_back((psb.bData(4) >> 10) & 0x1f);
116  }
117  if ((psb.aData(5) & 0x3f) >= 1) {
118  valid_phi.push_back((psb.aData(5) >> 10) & 0x1f);
119  }
120  if ((psb.bData(5) & 0x3f) >= 1) {
121  valid_phi.push_back((psb.bData(5) >> 10) & 0x1f);
122  }
123  std::vector<int>::const_iterator iphi;
124  for (iphi = valid_phi.begin(); iphi != valid_phi.end(); iphi++) {
125  if (*iphi < 9)
126  hcal_top = true;
127  if (*iphi > 8)
128  hcal_bot = true;
129  }
130  if (hcal_top && hcal_bot)
132 
133  //Muons
135  if (!_evt.getByToken(L1MuGMTReadoutCollectionToken_, l1MuHndl))
136  return;
137  std::vector<L1MuGMTReadoutRecord> const& records(l1MuHndl->getRecords());
138 
139  for (unsigned iR(0); iR != records.size(); ++iR) {
140  if (records[iR].getBxInEvent() != 0)
141  continue;
142 
143  unsigned iC(0);
144 
145  //DT triggers
146  std::vector<L1MuRegionalCand> dtBXCands(records[iR].getDTBXCands());
147  for (iC = 0; iC != dtBXCands.size(); ++iC)
148  if (!dtBXCands[iC].empty())
149  break;
150  if (iC != dtBXCands.size())
151  triggered_.set(kDTTrigger);
152 
153  //RPC triggers
154  std::vector<L1MuRegionalCand> brlRPCCands(records[iR].getBrlRPCCands());
155  for (iC = 0; iC != brlRPCCands.size(); ++iC)
156  if (!brlRPCCands[iC].empty())
157  break;
158  if (iC != brlRPCCands.size())
159  triggered_.set(kRPCTrigger);
160 
161  //CSC Triggers
162  std::vector<L1MuRegionalCand> cscCands(records[iR].getCSCCands());
163  for (iC = 0; iC != cscCands.size(); ++iC)
164  if (!cscCands[iC].empty())
165  break;
166  if (iC != cscCands.size())
167  triggered_.set(kCSCTrigger);
168  }
169 
170  if (triggered_.none())
171  return;
172 
173  MESet& meTriggers(MEs_.at("Triggers"));
174  MESet& meExclusiveTriggers(MEs_.at("ExclusiveTriggers"));
175 
176  for (unsigned iT(0); iT != nTriggerTypes; ++iT) {
177  if (!triggered_[iT])
178  continue;
179  meTriggers.fill(getEcalDQMSetupObjects(), iT + 0.5);
180  if (triggered_.count() == 1)
181  meExclusiveTriggers.fill(getEcalDQMSetupObjects(), iT + 0.5);
182  }
183  }
184 
186  // ++ievt_;
187 
188  ebHits_ = nullptr;
189  eeHits_ = nullptr;
190  }
191 
192  bool ClusterTask::filterRunType(short const* _runType) {
193  for (unsigned iFED(0); iFED != nDCC; iFED++) {
194  if (_runType[iFED] == EcalDCCHeaderBlock::COSMIC || _runType[iFED] == EcalDCCHeaderBlock::MTCC ||
195  _runType[iFED] == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
196  _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_GLOBAL || _runType[iFED] == EcalDCCHeaderBlock::COSMICS_LOCAL ||
197  _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_LOCAL)
198  return true;
199  }
200 
201  return false;
202  }
203 
205  switch (_collection) {
206  case kEBRecHit:
207  ebHits_ = &_hits;
208  break;
209  case kEERecHit:
210  eeHits_ = &_hits;
211  break;
212  default:
213  break;
214  }
215  }
216 
218  MESet& meBCE(MEs_.at("BCE"));
219  MESet& meBCEMap(MEs_.at("BCEMap"));
220  MESet& meBCEMapProjEta(MEs_.at("BCEMapProjEta"));
221  MESet& meBCEMapProjPhi(MEs_.at("BCEMapProjPhi"));
222  MESet& meBCEtMapProjEta(MEs_.at("BCEtMapProjEta"));
223  MESet& meBCEtMapProjPhi(MEs_.at("BCEtMapProjPhi"));
224  MESet& meBCOccupancy(MEs_.at("BCOccupancy"));
225  MESet& meBCOccupancyProjEta(MEs_.at("BCOccupancyProjEta"));
226  MESet& meBCOccupancyProjPhi(MEs_.at("BCOccupancyProjPhi"));
227  MESet& meBCSize(MEs_.at("BCSize"));
228  MESet& meTrendBCSize(MEs_.at("TrendBCSize"));
229  MESet& meBCSizeMap(MEs_.at("BCSizeMap"));
230  MESet& meBCSizeMapProjEta(MEs_.at("BCSizeMapProjEta"));
231  MESet& meBCSizeMapProjPhi(MEs_.at("BCSizeMapProjPhi"));
232  MESet& meBCNum(MEs_.at("BCNum"));
233  MESet& meTrendNBC(MEs_.at("TrendNBC"));
234 
235  int nBC[] = {0, 0};
236  bool isBarrel(_collection == kEBBasicCluster);
237 
238  // vector<reco::BasicCluster const*> lowMassCands;
239 
240  for (edm::View<reco::CaloCluster>::const_iterator bcItr(_bcs.begin()); bcItr != _bcs.end(); ++bcItr) {
241  if (bcItr->caloID().detectors() != 0) {
242  if (isBarrel && !bcItr->caloID().detector(reco::CaloID::DET_ECAL_BARREL))
243  continue;
244  if (!isBarrel && !bcItr->caloID().detector(reco::CaloID::DET_ECAL_ENDCAP))
245  continue;
246  }
247 
248  math::XYZPoint const& position(bcItr->position());
249 
250  DetId id(bcItr->seed());
251  if (id.null()) {
252  GlobalPoint gp(position.x(), position.y(), position.z());
253  CaloSubdetectorGeometry const* subgeom(
254  GetGeometry()->getSubdetectorGeometry(DetId::Ecal, isBarrel ? EcalBarrel : EcalEndcap));
255 
256  id = subgeom->getClosestCell(gp);
257  }
258 
259  if (id.null() || (id.subdetId() == EcalBarrel && !isBarrel) || (id.subdetId() == EcalEndcap && isBarrel))
260  continue;
261 
262  float energy(bcItr->energy());
263  float posEta(position.eta());
264  float posPhi(phi(position.phi()));
265  float et(energy / std::cosh(posEta));
266  int subdet(isBarrel ? EcalBarrel : EcalEndcap);
267  if (subdet == EcalEndcap && position.z() < 0.)
268  subdet = -EcalEndcap;
269 
270  meBCE.fill(getEcalDQMSetupObjects(), id, energy);
271 
272  meBCEMap.fill(getEcalDQMSetupObjects(), id, energy);
273  meBCEMapProjEta.fill(getEcalDQMSetupObjects(), posEta, energy);
274  meBCEMapProjPhi.fill(getEcalDQMSetupObjects(), subdet, posPhi, energy);
275  meBCEtMapProjEta.fill(getEcalDQMSetupObjects(), posEta, et);
276  meBCEtMapProjPhi.fill(getEcalDQMSetupObjects(), subdet, posPhi, et);
277 
278  meBCOccupancy.fill(getEcalDQMSetupObjects(), id);
279  meBCOccupancyProjEta.fill(getEcalDQMSetupObjects(), posEta);
280  meBCOccupancyProjPhi.fill(getEcalDQMSetupObjects(), subdet, posPhi);
281 
282  float size(bcItr->size());
283 
284  meBCSize.fill(getEcalDQMSetupObjects(), id, size);
285  meTrendBCSize.fill(getEcalDQMSetupObjects(), id, double(timestamp_.iLumi), size);
286 
287  meBCSizeMap.fill(getEcalDQMSetupObjects(), id, size);
288  meBCSizeMapProjEta.fill(getEcalDQMSetupObjects(), posEta, size);
289  meBCSizeMapProjPhi.fill(getEcalDQMSetupObjects(), subdet, posPhi, size);
290 
291  int zside(position.z() > 0 ? 1 : 0);
292  nBC[zside]++;
293 
294  // if(ievt_ % massCalcPrescale_ != 0) continue;
295 
296  // if(energy > 10.) continue;
297 
298  // EcalRecHitCollection::const_iterator hitItr(isBarrel ? ebHits_->find(id) : eeHits_->find(id));
299  // if(hitItr == (isBarrel ? ebHits_->end() : eeHits_->end())) continue;
300 
301  // // cuts here must be parametrized
302  // if(hitItr->energy() < 0.5) continue;
303 
304  // if(hitItr->energy() / energy > 0.95) continue;
305 
306  // lowMassCands.push_back(&(*bcItr));
307  }
308 
309  if (isBarrel) {
310  meBCNum.fill(getEcalDQMSetupObjects(), EcalBarrel, nBC[0] + nBC[1]);
311  meTrendNBC.fill(getEcalDQMSetupObjects(), EcalBarrel, double(timestamp_.iLumi), nBC[0] + nBC[1]);
312  } else {
313  meBCNum.fill(getEcalDQMSetupObjects(), -EcalEndcap, nBC[0]);
314  meBCNum.fill(getEcalDQMSetupObjects(), EcalEndcap, nBC[1]);
315  meTrendNBC.fill(getEcalDQMSetupObjects(), EcalEndcap, double(timestamp_.iLumi), nBC[0] + nBC[1]);
316  }
317 
318  // if(ievt_ % massCalcPrescale_ != 0) return;
319 
320  // double const pi(3.14159265);
321 
322  // for(vector<reco::BasicCluster const*>::iterator bcItr1(lowMassCands.begin()); bcItr1 != lowMassCands.end(); ++bcItr1){
323  // reco::BasicCluster const& bc1(**bcItr1);
324  // float energy1(bc1.energy());
325  // float px1(energy1 * sin(bc1.position().theta()) * cos(bc1.phi()));
326  // float py1(energy1 * sin(bc1.position().theta()) * sin(bc1.phi()));
327  // float pz1(energy1 * cos(bc1.position().theta()));
328 
329  // for(vector<reco::BasicCluster const*>::iterator bcItr2(lowMassCands.begin()); bcItr2 != lowMassCands.end(); ++bcItr2){
330  // if(*bcItr1 == *bcItr2) continue;
331  // reco::BasicCluster const& bc2(**bcItr2);
332  // float energy2(bc2.energy());
333  // float px2(energy2 * sin(bc2.position().theta()) * cos(bc2.phi()));
334  // float py2(energy2 * sin(bc2.position().theta()) * sin(bc2.phi()));
335  // float pz2(energy2 * cos(bc2.position().theta()));
336 
337  // float ptpair(sqrt((px1 + px2) * (px1 + px2) + (py1 + py2) * (py1 + py2)));
338  // if(ptpair < 2.5) continue;
339 
340  // float epair(energy1 + energy2);
341  // float pzpair(abs(pz1 + pz2));
342 
343  // float m2(epair * epair - pzpair * pzpair - ptpair * ptpair);
344  // if(m2 < 0.) continue;
345 
346  // float eta(0.5 * log((epair + pzpair)/(epair - pzpair)));
347  // float phi(atan2(px1 + px2, py1 + py2));
348 
349  // float iso(0.);
350  // for(reco::BasicClusterCollection::const_iterator bcItr(_bcs.begin()); bcItr != _bcs.end(); ++bcItr){
351  // float dEta(bcItr->eta() - eta);
352  // float dPhi(bcItr->phi() - phi);
353  // if(dPhi > 2. * pi) dPhi -= 2. * pi;
354  // else if(dPhi < -2. * pi) dPhi += 2. * pi;
355  // if(sqrt(dEta * dEta + dPhi * dPhi) < 0.2) iso += bcItr->energy() * sin(bcItr->position().theta());
356  // }
357  // if(iso > 0.5) continue;
358 
359  // float mass(sqrt(m2));
360  // MEs_[kPi0]->fill(mass);
361  // MEs_[kJPsi]->fill(mass);
362  // }
363  // }
364  }
365 
367  bool isBarrel(_collection == kEBSuperCluster);
369 
370  MESet& meSCE(MEs_.at("SCE"));
371  MESet& meSCELow(MEs_.at("SCELow"));
372  MESet& meSCRawE(MEs_.at("SCRawE"));
373  MESet& meSCRawELow(MEs_.at("SCRawELow"));
374  MESet& meSCRawEHigh(MEs_.at("SCRawEHigh"));
375  MESet& meSCNBCs(MEs_.at("SCNBCs"));
376  MESet& meSCNcrystals(MEs_.at("SCNcrystals"));
377  MESet& meTrendSCSize(MEs_.at("TrendSCSize"));
378  MESet& meSCSeedEnergy(MEs_.at("SCSeedEnergy"));
379  MESet& meSCClusterVsSeed(MEs_.at("SCClusterVsSeed"));
380  MESet& meSCSeedOccupancy(MEs_.at("SCSeedOccupancy"));
381  MESet& meSingleCrystalCluster(MEs_.at("SingleCrystalCluster"));
382  MESet& meSCR9(MEs_.at("SCR9"));
383  MESet& meSCR9Raw(MEs_.at("SCR9Raw"));
384  MESet& meSCR9Full(MEs_.at("SCR9Full"));
385  MESet& meSCR9FullRaw(MEs_.at("SCR9FullRaw"));
386 
387  MESet* meSCSizeVsEnergy(doExtra_ ? &MEs_.at("SCSizeVsEnergy") : nullptr);
388  MESet* meSCSeedOccupancyHighE(doExtra_ ? &MEs_.at("SCSeedOccupancyHighE") : nullptr);
389  MESet* meSCSeedOccupancyTrig(doExtra_ ? &MEs_.at("SCSeedOccupancyTrig") : nullptr);
390  MESet* meSCSeedTimeTrigEx(doExtra_ ? &MEs_.at("SCSeedTimeTrigEx") : nullptr);
391  MESet* meSCSeedTimeMapTrigEx(doExtra_ ? &MEs_.at("SCSeedTimeMapTrigEx") : nullptr);
392  MESet* meSCOccupancyProjEta(doExtra_ ? &MEs_.at("SCOccupancyProjEta") : nullptr);
393  MESet* meSCOccupancyProjPhi(doExtra_ ? &MEs_.at("SCOccupancyProjPhi") : nullptr);
394  MESet* meSCSwissCross(doExtra_ ? &MEs_.at("SCSwissCross") : nullptr);
395 
397 
398  // reco::SuperCluster const* leading(0);
399  // reco::SuperCluster const* subLeading(0);
400 
401  int nSC(0);
402 
403  for (reco::SuperClusterCollection::const_iterator scItr(_scs.begin()); scItr != _scs.end(); ++scItr) {
404  DetId seedId(scItr->seed()->seed());
405  if (seedId.null()) {
406  math::XYZPoint const& position(scItr->position());
407 
408  GlobalPoint gp(position.x(), position.y(), position.z());
409 
410  CaloSubdetectorGeometry const* subgeom(
411  GetGeometry()->getSubdetectorGeometry(DetId::Ecal, isBarrel ? EcalBarrel : EcalEndcap));
412 
413  seedId = subgeom->getClosestCell(gp);
414  }
415 
416  if (seedId.null() || (seedId.subdetId() != subdet))
417  continue;
418 
420  if (seedItr == hits->end())
421  continue;
422 
423  ++nSC;
424 
425  float energy(scItr->energy());
426  float rawEnergy(scItr->rawEnergy());
427  float size(scItr->size());
428 
429  meSCE.fill(getEcalDQMSetupObjects(), seedId, energy);
430  meSCELow.fill(getEcalDQMSetupObjects(), seedId, energy);
431 
432  meSCRawE.fill(getEcalDQMSetupObjects(), seedId, rawEnergy);
433  meSCRawELow.fill(getEcalDQMSetupObjects(), seedId, rawEnergy);
434  meSCRawEHigh.fill(getEcalDQMSetupObjects(), seedId, rawEnergy);
435 
436  meSCNBCs.fill(getEcalDQMSetupObjects(), seedId, scItr->clustersSize());
437  meSCNcrystals.fill(getEcalDQMSetupObjects(), seedId, size);
438 
439  if (doExtra_) [[clang::suppress]]
440  meSCSizeVsEnergy->fill(getEcalDQMSetupObjects(), subdet, energy, size);
441 
442  meTrendSCSize.fill(getEcalDQMSetupObjects(), seedId, double(timestamp_.iLumi), size);
443 
444  meSCSeedEnergy.fill(getEcalDQMSetupObjects(), seedId, seedItr->energy());
445  meSCClusterVsSeed.fill(getEcalDQMSetupObjects(), seedId, seedItr->energy(), energy);
446 
447  meSCSeedOccupancy.fill(getEcalDQMSetupObjects(), seedId);
449  meSCSeedOccupancyHighE->fill(getEcalDQMSetupObjects(), seedId);
450 
451  if (scItr->size() == 1)
452  meSingleCrystalCluster.fill(getEcalDQMSetupObjects(), seedId);
453 
454  float e3x3(EcalClusterTools::e3x3(*scItr->seed(), hits, GetTopology()));
455  float e3x3Full(noZS::EcalClusterTools::e3x3(*scItr->seed(), hits, GetTopology()));
456 
457  meSCR9.fill(getEcalDQMSetupObjects(), seedId, e3x3 / energy);
458  meSCR9Raw.fill(getEcalDQMSetupObjects(), seedId, e3x3 / rawEnergy);
459  meSCR9Full.fill(getEcalDQMSetupObjects(), seedId, e3x3Full / energy);
460  meSCR9FullRaw.fill(getEcalDQMSetupObjects(), seedId, e3x3Full / rawEnergy);
461 
462  if (doExtra_) {
463  for (unsigned iT(0); iT != nTriggerTypes; ++iT) {
464  if (!triggered_[iT])
465  continue;
466 
467  [[clang::suppress]] static_cast<MESetMulti*>(meSCSeedOccupancyTrig)->use(trigTypeToME_[iT]);
468  meSCSeedOccupancyTrig->fill(getEcalDQMSetupObjects(), seedId);
469 
470  // exclusive
471  if (triggered_.count() == 1) {
472  static_cast<MESetMulti*>(meSCSeedTimeTrigEx)->use(trigTypeToME_[iT]);
473  static_cast<MESetMulti*>(meSCSeedTimeMapTrigEx)->use(trigTypeToME_[iT]);
474  meSCSeedTimeTrigEx->fill(getEcalDQMSetupObjects(), subdet, seedItr->time());
475  meSCSeedTimeMapTrigEx->fill(getEcalDQMSetupObjects(), seedId, seedItr->time());
476  }
477  }
478 
479  meSCOccupancyProjEta->fill(getEcalDQMSetupObjects(), subdet, scItr->eta());
480  meSCOccupancyProjPhi->fill(getEcalDQMSetupObjects(), subdet, phi(scItr->phi()));
481 
482  if (isBarrel) {
483  float e1(EcalClusterTools::eMax(*scItr, ebHits_));
484  if (e1 > swissCrossMaxThreshold_) {
485  float e4(EcalClusterTools::eTop(*scItr, ebHits_, GetTopology()) +
489 
490  meSCSwissCross->fill(getEcalDQMSetupObjects(), 1. - e4 / e1);
491  }
492  }
493  }
494 
495  // if(ievt_ % massCalcPrescale_ != 0) continue;
496 
497  // float et(energy * sin(scItr->position().theta()));
498  // if(!leading || et > leading->energy() * sin(leading->position().theta())){
499  // subLeading = leading;
500  // leading = &(*scItr);
501  // }
502  // else if(!subLeading || et > subLeading->energy() * sin(subLeading->position().theta())){
503  // subLeading = &(*scItr);
504  // }
505  }
506 
507  MEs_.at("SCNum").fill(getEcalDQMSetupObjects(), subdet, nSC);
508  MEs_.at("TrendNSC").fill(getEcalDQMSetupObjects(), subdet, double(timestamp_.iLumi), nSC);
509 
510  // if(ievt_ % massCalcPrescale_ != 0) return;
511 
512  // // implement isolation & cuts
513  // if(!leading || !subLeading) return;
514  // float e(leading->energy() + subLeading->energy());
515  // float px(leading->energy() * sin(leading->position().theta()) * cos(leading->phi()) + subLeading->energy() * sin(subLeading->position().theta()) * cos(subLeading->phi()));
516  // float py(leading->energy() * sin(leading->position().theta()) * sin(leading->phi()) + subLeading->energy() * sin(subLeading->position().theta()) * sin(subLeading->phi()));
517  // float pz(leading->energy() * cos(leading->position().theta()) + subLeading->energy() * cos(subLeading->position().theta()));
518  // float m2(e * e - px * px - py * py - pz * pz);
519  // if(m2 < 0.) return;
520  // float mass(sqrt(m2));
521  // MEs_[kZ]->fill(mass);
522  // MEs_[kHighMass]->fill(mass);
523  }
524 
529  menuRcd = _collector.esConsumes();
530  }
531 
533 } // namespace ecaldqm
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
Definition: ClusterTask.cc:217
#define DEFINE_ECALDQM_WORKER(TYPE)
Definition: DQWorker.h:168
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void endEvent(edm::Event const &, edm::EventSetup const &) override
Definition: ClusterTask.cc:185
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:48
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
Definition: L1GtPsbWord.cc:181
void addDependencies(DependencySet &) override
Definition: ClusterTask.cc:69
MESet & at(const std::string &key)
Definition: MESet.h:401
EcalRecHitCollection const * ebHits_
Definition: ClusterTask.h:47
std::vector< EcalRecHit >::const_iterator const_iterator
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
Definition: ClusterTask.h:60
const DecisionWord & decisionWord(int bxInEventValue) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:526
int zside(DetId const &)
Log< level::Error, false > LogError
CaloTopology const * GetTopology()
Definition: DQWorker.cc:165
CaloGeometry const * GetGeometry()
Definition: DQWorker.cc:160
void fill(EcalDQMSetupObjects const edso, DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:29
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
Definition: L1GtPsbWord.cc:253
std::vector< std::string > egTriggerAlgos_
Definition: ClusterTask.h:54
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
float swissCrossMaxThreshold_
Definition: ClusterTask.h:53
std::vector< bool > DecisionWord
typedefs
virtual void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.)
Definition: MESet.h:74
unsigned trigTypeToME_[nTriggerTypes]
Definition: ClusterTask.h:56
bool filterRunType(short const *) override
Definition: ClusterTask.cc:192
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: ClusterTask.cc:74
EcalRecHitCollection const * eeHits_
Definition: ClusterTask.h:48
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
Definition: ClusterTask.h:61
Definition: DetId.h:17
unsigned getIndex(PathReplacements const &) const
Definition: MESetMulti.cc:140
Timestamp timestamp_
Definition: DQWorker.h:134
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: ClusterTask.cc:204
static constexpr int nDCC
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
MESetCollection MEs_
Definition: DQWorker.h:131
void setTokens(edm::ConsumesCollector &) override
Definition: ClusterTask.cc:525
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
Definition: ClusterTask.cc:366
edm::InputTag L1GlobalTriggerReadoutRecordTag_
Definition: ClusterTask.h:58
bool isValid() const
Definition: HandleBase.h:70
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
static int position[264][3]
Definition: ReadPGInfo.cc:289
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::bitset< nTriggerTypes > triggered_
Definition: ClusterTask.h:55
const_iterator begin() const
edm::InputTag L1MuGMTReadoutCollectionTag_
Definition: ClusterTask.h:59
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:46
EcalSubdetector
void push_back(Dependency const &_d)
Definition: DQWorkerTask.h:46
double phi(EBDetId const &)
const_iterator end() const
void erase(const std::string &key)
Definition: MESet.h:392
void setParams(edm::ParameterSet const &) override
Definition: ClusterTask.cc:34
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > menuRcd
Definition: ClusterTask.h:62