8 : hcalDDDRecConstantsToken_{esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>()} {
9 tok_towers_ = consumes<CaloTowerCollection>(conf.getUntrackedParameter<
edm::InputTag>(
"CaloTowerCollectionLabel"));
12 outputFile_ = conf.getUntrackedParameter<
std::string>(
"outputFile",
"myfile.root");
14 hcalselector_ = conf.getUntrackedParameter<
std::string>(
"hcalselector",
"all");
16 useAllHistos_ = conf.getUntrackedParameter<
bool>(
"useAllHistos",
false);
27 NphiMax = (hcons.
getNPhi(1) > NphiMax ? hcons.
getNPhi(1) : NphiMax);
28 NphiMax = (hcons.
getNPhi(2) > NphiMax ? hcons.
getNPhi(2) : NphiMax);
29 NphiMax = (hcons.
getNPhi(3) > NphiMax ? hcons.
getNPhi(3) : NphiMax);
71 edm::LogInfo(
"OutputInfo") <<
" Hcal RecHit Task histograms will NOT be saved";
81 sprintf(
histo,
"Ntowers_per_event_vs_ieta");
84 sprintf(
histo,
"CaloTowersTask_map_Nentries");
92 sprintf(
histo,
"emean_vs_ieta_E");
94 sprintf(
histo,
"emean_vs_ieta_H");
96 sprintf(
histo,
"emean_vs_ieta_EH");
100 sprintf(
histo,
"emean_vs_ieta_E1");
102 sprintf(
histo,
"emean_vs_ieta_H1");
104 sprintf(
histo,
"emean_vs_ieta_EH1");
110 sprintf(
histo,
"CaloTowersTask_map_energy_E");
112 sprintf(
histo,
"CaloTowersTask_map_energy_H");
114 sprintf(
histo,
"CaloTowersTask_map_energy_EH");
120 sprintf(
histo,
"number_of_bad_cells_Ecal_EB");
122 sprintf(
histo,
"number_of_bad_cells_Ecal_EE");
124 sprintf(
histo,
"number_of_recovered_cells_Ecal_EB");
126 sprintf(
histo,
"number_of_recovered_cells_Ecal_EE");
128 sprintf(
histo,
"number_of_problematic_cells_Ecal_EB");
130 sprintf(
histo,
"number_of_problematic_cells_Ecal_EE");
134 sprintf(
histo,
"CaloTowersTask_map_occupancy");
137 sprintf(
histo,
"CaloTowersTask_occupancy_vs_ieta");
142 sprintf(
histo,
"number_of_bad_cells_Hcal_HB");
144 sprintf(
histo,
"number_of_recovered_cells_Hcal_HB");
146 sprintf(
histo,
"number_of_problematic_cells_Hcal_HB");
152 sprintf(
histo,
"CaloTowersTask_energy_HCAL_HB");
155 sprintf(
histo,
"CaloTowersTask_energy_ECAL_HB");
158 sprintf(
histo,
"CaloTowersTask_number_of_fired_towers_HB");
161 sprintf(
histo,
"CaloTowersTask_MET_HB");
164 sprintf(
histo,
"CaloTowersTask_SET_HB");
170 sprintf(
histo,
"CaloTowersTask_EM_Timing_HB");
173 sprintf(
histo,
"CaloTowersTask_HAD_Timing_HB");
178 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_Low_HB");
181 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_HB");
184 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_High_HB");
187 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HB");
190 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_HB");
193 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_High_HB");
197 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HB");
200 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_HB");
203 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_High_HB");
206 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HB");
209 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HB");
212 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_High_HB");
216 sprintf(
histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HBP");
218 sprintf(
histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HBM");
225 sprintf(
histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HB");
228 sprintf(
histo,
"CaloTowersTask_energy_OUTER_HB");
231 sprintf(
histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HB");
234 sprintf(
histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HB");
237 sprintf(
histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HB");
240 sprintf(
histo,
"CaloTowersTask_map_energy_HB");
242 sprintf(
histo,
"CaloTowersTask_map_energy_HCAL_HB");
245 sprintf(
histo,
"CaloTowersTask_map_energy_ECAL_HB");
249 sprintf(
histo,
"CaloTowersTask_phi_MET_HB");
256 sprintf(
histo,
"number_of_bad_cells_Hcal_HE");
258 sprintf(
histo,
"number_of_recovered_cells_Hcal_HE");
260 sprintf(
histo,
"number_of_problematic_cells_Hcal_HE");
266 sprintf(
histo,
"CaloTowersTask_energy_HCAL_HE");
269 sprintf(
histo,
"CaloTowersTask_energy_ECAL_HE");
272 sprintf(
histo,
"CaloTowersTask_number_of_fired_towers_HE");
275 sprintf(
histo,
"CaloTowersTask_MET_HE");
278 sprintf(
histo,
"CaloTowersTask_SET_HE");
284 sprintf(
histo,
"CaloTowersTask_EM_Timing_HE");
287 sprintf(
histo,
"CaloTowersTask_HAD_Timing_HE");
292 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_Low_HE");
295 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_HE");
298 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HE");
301 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_HE");
305 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HE");
308 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_HE");
311 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HE");
314 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HE");
318 sprintf(
histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HEP");
320 sprintf(
histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HEM");
327 sprintf(
histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HE");
330 sprintf(
histo,
"CaloTowersTask_energy_OUTER_HE");
333 sprintf(
histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HE");
336 sprintf(
histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HE");
339 sprintf(
histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HE");
342 sprintf(
histo,
"CaloTowersTask_map_energy_HE");
344 sprintf(
histo,
"CaloTowersTask_map_energy_HCAL_HE");
347 sprintf(
histo,
"CaloTowersTask_map_energy_ECAL_HE");
351 sprintf(
histo,
"CaloTowersTask_phi_MET_HE");
358 sprintf(
histo,
"number_of_bad_cells_Hcal_HF");
360 sprintf(
histo,
"number_of_recovered_cells_Hcal_HF");
362 sprintf(
histo,
"number_of_problematic_cells_Hcal_HF");
368 sprintf(
histo,
"CaloTowersTask_energy_HCAL_HF");
371 sprintf(
histo,
"CaloTowersTask_energy_ECAL_HF");
374 sprintf(
histo,
"CaloTowersTask_number_of_fired_towers_HF");
377 sprintf(
histo,
"CaloTowersTask_MET_HF");
380 sprintf(
histo,
"CaloTowersTask_SET_HF");
386 sprintf(
histo,
"CaloTowersTask_EM_Timing_HF");
389 sprintf(
histo,
"CaloTowersTask_HAD_Timing_HF");
393 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_HF");
396 sprintf(
histo,
"CaloTowersTask_EM_Energy_Timing_profile_HF");
400 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HF");
403 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_HF");
406 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HF");
409 sprintf(
histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HF");
413 sprintf(
histo,
"CaloTowersTask_Iphi_tower_HFP");
415 sprintf(
histo,
"CaloTowersTask_Iphi_tower_HFM");
422 sprintf(
histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HF");
425 sprintf(
histo,
"CaloTowersTask_energy_OUTER_HF");
428 sprintf(
histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HF");
431 sprintf(
histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HF");
434 sprintf(
histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HF");
437 sprintf(
histo,
"CaloTowersTask_map_energy_HF");
439 sprintf(
histo,
"CaloTowersTask_map_energy_HCAL_HF");
442 sprintf(
histo,
"CaloTowersTask_map_energy_ECAL_HF");
446 sprintf(
histo,
"CaloTowersTask_phi_MET_HF");
471 double ieta_MC = 9999;
472 double iphi_MC = 9999;
475 double sumEnergyHcal_HB = 0.;
476 double sumEnergyEcal_HB = 0.;
477 double sumEnergyHO_HB = 0.;
478 Int_t numFiredTowers_HB = 0;
484 double sumEnergyHcal_HE = 0.;
485 double sumEnergyEcal_HE = 0.;
486 double sumEnergyHO_HE = 0.;
487 Int_t numFiredTowers_HE = 0;
493 double sumEnergyHcal_HF = 0.;
494 double sumEnergyEcal_HF = 0.;
495 double sumEnergyHO_HF = 0.;
496 Int_t numFiredTowers_HF = 0;
502 for (cal =
towers->begin(); cal !=
towers->end(); ++cal) {
503 double eE = cal->emEnergy();
504 double eH = cal->hadEnergy();
505 double eHO = cal->outerEnergy();
506 double etaT = cal->eta();
508 double en = cal->energy();
509 double etT = cal->et();
510 double had_tm = cal->hcalTime();
511 double em_tm = cal->ecalTime();
513 int numBadEcalCells = cal->numBadEcalCells();
514 int numRcvEcalCells = cal->numRecoveredEcalCells();
515 int numPrbEcalCells = cal->numProblematicEcalCells();
517 int numBadHcalCells = cal->numBadHcalCells();
518 int numRcvHcalCells = cal->numRecoveredHcalCells();
519 int numPrbHcalCells = cal->numProblematicHcalCells();
526 int ieta = idT.ieta();
527 int iphi = idT.iphi();
531 std::vector<int> inEcals(2), inHcals(3);
532 unsigned int constitSize = cal->constituentsSize();
533 for (
unsigned int ic = 0; ic < constitSize; ic++) {
588 sumEnergyHcal_HB += eH;
589 sumEnergyEcal_HB += eE;
590 sumEnergyHO_HB += eHO;
647 sumEnergyHcal_HE += eH;
648 sumEnergyEcal_HE += eE;
649 sumEnergyHO_HE += eHO;
699 sumEnergyHcal_HF += eH;
700 sumEnergyEcal_HF += eE;
701 sumEnergyHO_HF += eHO;
735 met =
sqrt(metx_HB * metx_HB + mety_HB * mety_HB);
736 Vector metv(metx_HB, mety_HB, metz_HB);
755 met =
sqrt(metx_HE * metx_HE + mety_HE * mety_HE);
756 Vector metv(metx_HE, mety_HE, metz_HE);
775 met =
sqrt(metx_HF * metx_HF + mety_HF * mety_HF);
776 Vector metv(metx_HF, mety_HF, metz_HF);
796 double PI = 3.1415926535898;
797 double deltaphi = phi1 - phi2;
799 deltaphi = phi2 - phi1;
802 deltaphi = 2. *
PI - deltaphi;
805 double tmp =
sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
MonitorElement * emean_vs_ieta_EH1
MonitorElement * mapEnergyEcal_HF
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * meNumFiredTowers_HF
MonitorElement * hadEnergyTiming_profile_High_HB
MonitorElement * hadEnergyTiming_HF
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
MonitorElement * meEnergyHcalTower_HF
MonitorElement * meEnergyHcalvsEcal_HE
MonitorElement * hadEnergyTiming_Low_HE
MonitorElement * meEnergyHcalTower_HE
MonitorElement * numRcvCellsHcal_HF
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * phiMET_HF
MonitorElement * emEnergyTiming_profile_Low_HB
MonitorElement * phiMET_HE
MonitorElement * meEnergyEcalTower_HF
MonitorElement * hadEnergyTiming_profile_Low_HE
CaloTowersAnalyzer(edm::ParameterSet const &conf)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int getNPhi(const int &type) const
MonitorElement * emEnergyTiming_Low_HB
MonitorElement * emTiming_HE
MonitorElement * meEnergyEcalTower_HE
MonitorElement * numRcvCellsEcal_EB
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * meEnergyHcalTower_HB
MonitorElement * emEnergyTiming_profile_Low_HE
MonitorElement * meIphiHcalTower_HEM
MonitorElement * numRcvCellsEcal_EE
MonitorElement * meIphiHcalTower_HEP
MonitorElement * meEnergyHcal_HF
MonitorElement * meEnergyHcal_HB
MonitorElement * meEnergyHO_HB
MonitorElement * emTiming_HB
MonitorElement * occupancy_map
std::string hcalselector_
MonitorElement * emEnergyTiming_HE
MonitorElement * hadEnergyTiming_Low_HB
MonitorElement * hadEnergyTiming_profile_Low_HB
MonitorElement * emean_vs_ieta_H
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
MonitorElement * hadTiming_HE
MonitorElement * mapEnergyEcal_HB
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * meEnergyHO_HF
MonitorElement * occupancy_vs_ieta
constexpr HcalSubdetector subdet() const
get the subdetector
MonitorElement * mapEnergy_EH
MonitorElement * phiMET_HB
MonitorElement * meEnergyEcal_HE
MonitorElement * hadEnergyTiming_profile_HB
MonitorElement * meEnergyEcal_HB
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * numBadCellsHcal_HE
MonitorElement * meTotEnergy_HE
MonitorElement * mapEnergy_E
MonitorElement * hadEnergyTiming_Low_HF
MonitorElement * numRcvCellsHcal_HB
MonitorElement * meNumFiredTowers_HB
MonitorElement * numPrbCellsHcal_HB
MonitorElement * mapEnergyHcal_HF
MonitorElement * meEnergyHcal_HE
MonitorElement * hadTiming_HB
edm::EDGetTokenT< CaloTowerCollection > tok_towers_
MonitorElement * numBadCellsEcal_EE
MonitorElement * numPrbCellsEcal_EE
MonitorElement * mapEnergy_HE
MonitorElement * mapEnergy_HF
#define DEFINE_FWK_MODULE(type)
MonitorElement * mapEnergy_HB
MonitorElement * meEnergyEcalTower_HB
MonitorElement * meIphiHcalTower_HBP
MonitorElement * emean_vs_ieta_H1
MonitorElement * emEnergyTiming_High_HB
math::RhoEtaPhiVector Vector
MonitorElement * numRcvCellsHcal_HE
MonitorElement * emEnergyTiming_profile_HF
MonitorElement * hadEnergyTiming_HE
MonitorElement * numPrbCellsHcal_HE
MonitorElement * emEnergyTiming_profile_High_HB
MonitorElement * meTotEnergy_HB
MonitorElement * meTotEnergy_HF
MonitorElement * hadEnergyTiming_High_HB
MonitorElement * mapEnergyHcal_HE
Log< level::Info, false > LogInfo
MonitorElement * hadEnergyTiming_HB
MonitorElement * numPrbCellsHcal_HF
MonitorElement * hadEnergyTiming_profile_HF
MonitorElement * numBadCellsHcal_HB
MonitorElement * Ntowers_vs_ieta
MonitorElement * emEnergyTiming_HB
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hcalDDDRecConstantsToken_
MonitorElement * meEnergyHO_HE
MonitorElement * hadEnergyTiming_profile_HE
MonitorElement * emEnergyTiming_Low_HE
MonitorElement * emean_vs_ieta_E
MonitorElement * numPrbCellsEcal_EB
MonitorElement * emean_vs_ieta_EH
MonitorElement * numBadCellsHcal_HF
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * hadTiming_HF
MonitorElement * numBadCellsEcal_EB
~CaloTowersAnalyzer() override
MonitorElement * mapEnergyEcal_HE
MonitorElement * emTiming_HF
MonitorElement * meIphiCaloTower_HFM
MonitorElement * emEnergyTiming_profile_HE
MonitorElement * mapEnergy_N
MonitorElement * meEnergyHcalvsEcal_HB
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void analyze(edm::Event const &, edm::EventSetup const &) override
MonitorElement * mapEnergyHcal_HB
MonitorElement * emEnergyTiming_profile_HB
MonitorElement * meEnergyHcalvsEcal_HF
MonitorElement * emean_vs_ieta_E1
MonitorElement * meNumFiredTowers_HE
MonitorElement * emEnergyTiming_HF
MonitorElement * hadEnergyTiming_profile_Low_HF
MonitorElement * mapEnergy_H
MonitorElement * meIphiCaloTower_HFP
MonitorElement * meIphiHcalTower_HBM
MonitorElement * meEnergyEcal_HF