68 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");
151 sprintf (histo,
"CaloTowersTask_energy_HCAL_HB" ) ;
154 sprintf (histo,
"CaloTowersTask_energy_ECAL_HB" ) ;
157 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HB" ) ;
160 sprintf (histo,
"CaloTowersTask_MET_HB" ) ;
161 MET_HB = ibooker.
book1D(histo, histo, 3000, 0. , 3000. ) ;
163 sprintf (histo,
"CaloTowersTask_SET_HB" ) ;
164 SET_HB = ibooker.
book1D(histo, histo, 8000, 0. , 8000. ) ;
169 sprintf (histo,
"CaloTowersTask_EM_Timing_HB" ) ;
172 sprintf (histo,
"CaloTowersTask_HAD_Timing_HB" ) ;
177 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HB" ) ;
180 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HB" ) ;
183 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_High_HB" ) ;
186 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HB" ) ;
189 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HB" ) ;
192 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_High_HB" ) ;
196 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HB" ) ;
199 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HB" ) ;
202 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_High_HB" ) ;
205 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HB" ) ;
208 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HB" ) ;
211 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_High_HB" ) ;
215 sprintf (histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HBP" ) ;
217 sprintf (histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HBM" ) ;
224 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HB") ;
227 sprintf (histo,
"CaloTowersTask_energy_OUTER_HB" ) ;
230 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HB" ) ;
233 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HB" ) ;
236 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HB" ) ;
239 sprintf (histo,
"CaloTowersTask_map_energy_HB" );
241 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HB");
243 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HB" );
246 sprintf (histo,
"CaloTowersTask_phi_MET_HB" ) ;
247 phiMET_HB = ibooker.
book1D(histo, histo, 72, -3.1415926535898, 3.1415926535898 ) ;
253 sprintf (histo,
"number_of_bad_cells_Hcal_HE");
255 sprintf (histo,
"number_of_recovered_cells_Hcal_HE");
257 sprintf (histo,
"number_of_problematic_cells_Hcal_HE");
262 sprintf (histo,
"CaloTowersTask_energy_HCAL_HE" ) ;
265 sprintf (histo,
"CaloTowersTask_energy_ECAL_HE" ) ;
268 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HE" ) ;
271 sprintf (histo,
"CaloTowersTask_MET_HE" ) ;
272 MET_HE = ibooker.
book1D(histo, histo, 1000, 0. , 1000. ) ;
274 sprintf (histo,
"CaloTowersTask_SET_HE" ) ;
275 SET_HE = ibooker.
book1D(histo, histo, 2000, 0. , 2000. ) ;
280 sprintf (histo,
"CaloTowersTask_EM_Timing_HE" ) ;
283 sprintf (histo,
"CaloTowersTask_HAD_Timing_HE" ) ;
288 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HE" ) ;
291 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HE" ) ;
294 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HE" ) ;
297 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HE" ) ;
301 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HE" ) ;
304 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HE" ) ;
307 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HE" ) ;
310 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HE" ) ;
314 sprintf (histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HEP" ) ;
316 sprintf (histo,
"CaloTowersTask_Iphi_HCAL_component_of_tower_HEM" ) ;
323 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HE") ;
326 sprintf (histo,
"CaloTowersTask_energy_OUTER_HE" ) ;
329 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HE" ) ;
332 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HE" ) ;
335 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HE" ) ;
338 sprintf (histo,
"CaloTowersTask_map_energy_HE" );
340 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HE");
342 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HE" );
345 sprintf (histo,
"CaloTowersTask_phi_MET_HE" ) ;
346 phiMET_HE = ibooker.
book1D(histo, histo, 72, -3.1415926535898, 3.1415926535898 ) ;
353 sprintf (histo,
"number_of_bad_cells_Hcal_HF");
355 sprintf (histo,
"number_of_recovered_cells_Hcal_HF");
357 sprintf (histo,
"number_of_problematic_cells_Hcal_HF");
362 sprintf (histo,
"CaloTowersTask_energy_HCAL_HF" ) ;
365 sprintf (histo,
"CaloTowersTask_energy_ECAL_HF" ) ;
368 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HF" ) ;
371 sprintf (histo,
"CaloTowersTask_MET_HF" ) ;
372 MET_HF = ibooker.
book1D(histo, histo, 500, 0. , 500. ) ;
374 sprintf (histo,
"CaloTowersTask_SET_HF" ) ;
375 SET_HF = ibooker.
book1D(histo, histo, 2000, 0. , 2000. ) ;
380 sprintf (histo,
"CaloTowersTask_EM_Timing_HF" ) ;
383 sprintf (histo,
"CaloTowersTask_HAD_Timing_HF" ) ;
387 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HF" ) ;
390 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HF" ) ;
394 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HF" ) ;
397 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HF" ) ;
400 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HF" ) ;
403 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HF" ) ;
407 sprintf (histo,
"CaloTowersTask_Iphi_tower_HFP" ) ;
409 sprintf (histo,
"CaloTowersTask_Iphi_tower_HFM" ) ;
416 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HF") ;
419 sprintf (histo,
"CaloTowersTask_energy_OUTER_HF" ) ;
422 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HF" ) ;
425 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HF" ) ;
428 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HF" ) ;
431 sprintf (histo,
"CaloTowersTask_map_energy_HF" );
433 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HF");
435 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HF" );
438 sprintf (histo,
"CaloTowersTask_phi_MET_HF" ) ;
439 phiMET_HF = ibooker.
book1D(histo, histo, 72, -3.1415926535898, 3.1415926535898 ) ;
473 double ieta_MC = 9999;
474 double iphi_MC = 9999;
477 double sumEnergyHcal_HB = 0.;
478 double sumEnergyEcal_HB = 0.;
479 double sumEnergyHO_HB = 0.;
480 Int_t numFiredTowers_HB = 0;
486 double sumEnergyHcal_HE = 0.;
487 double sumEnergyEcal_HE = 0.;
488 double sumEnergyHO_HE = 0.;
489 Int_t numFiredTowers_HE = 0;
495 double sumEnergyHcal_HF = 0.;
496 double sumEnergyEcal_HF = 0.;
497 double sumEnergyHO_HF = 0.;
498 Int_t numFiredTowers_HF = 0;
504 for ( cal = towers->
begin(); cal != towers->
end(); ++cal ) {
506 double eE = cal->emEnergy();
507 double eH = cal->hadEnergy();
508 double eHO = cal->outerEnergy();
509 double etaT = cal->eta();
511 double en = cal->energy();
512 double etT = cal->et();
513 double had_tm = cal->hcalTime();
514 double em_tm = cal->ecalTime();
516 int numBadEcalCells = cal->numBadEcalCells();
517 int numRcvEcalCells = cal->numRecoveredEcalCells();
518 int numPrbEcalCells = cal->numProblematicEcalCells();
520 int numBadHcalCells = cal->numBadHcalCells();
521 int numRcvHcalCells = cal->numRecoveredHcalCells();
522 int numPrbHcalCells = cal->numProblematicHcalCells();
529 int ieta = idT.
ieta();
530 int iphi = idT.iphi();
534 std::vector<int> inEcals(2), inHcals(3);
535 unsigned int constitSize = cal->constituentsSize();
536 for(
unsigned int ic=0; ic<constitSize; ic++){
537 DetId detId = cal->constituent(ic);
565 && (fabs(etaT) <
etaMax[0] && fabs(etaT) >=
etaMin[0] )) {
586 sumEnergyHcal_HB += eH;
587 sumEnergyEcal_HB += eE;
588 sumEnergyHO_HB += eHO;
624 && (fabs(etaT) <
etaMax[1] && fabs(etaT) >=
etaMin[1] )) {
645 sumEnergyHcal_HE += eH;
646 sumEnergyEcal_HE += eE;
647 sumEnergyHO_HE += eHO;
678 && (fabs(etaT) <
etaMax[2] && fabs(etaT) >=
etaMin[2] )) {
697 sumEnergyHcal_HF += eH;
698 sumEnergyEcal_HF += eE;
699 sumEnergyHO_HF += eHO;
735 met =
sqrt(metx_HB*metx_HB + mety_HB*mety_HB);
736 Vector metv(metx_HB,mety_HB,metz_HB);
757 met =
sqrt(metx_HE*metx_HE + mety_HE*mety_HE);
758 Vector metv(metx_HE,mety_HE,metz_HE);
778 met =
sqrt(metx_HF*metx_HF + mety_HF*mety_HF);
779 Vector metv(metx_HF,mety_HF,metz_HF);
801 double PI = 3.1415926535898;
802 double deltaphi= phi1 - phi2;
803 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
804 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
805 double deltaeta = eta2 - eta1;
806 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
MonitorElement * emean_vs_ieta_EH1
MonitorElement * mapEnergyEcal_HF
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meNumFiredTowers_HF
MonitorElement * hadEnergyTiming_profile_High_HB
MonitorElement * hadEnergyTiming_HF
MonitorElement * meEnergyHcalTower_HF
MonitorElement * meEnergyHcalvsEcal_HE
HcalSubdetector subdet() const
get the subdetector
MonitorElement * hadEnergyTiming_Low_HE
MonitorElement * meEnergyHcalTower_HE
MonitorElement * numRcvCellsHcal_HF
MonitorElement * phiMET_HF
MonitorElement * emEnergyTiming_profile_Low_HB
MonitorElement * bookProfile(Args &&...args)
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
#define DEFINE_FWK_MODULE(type)
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
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * hadTiming_HE
MonitorElement * mapEnergyEcal_HB
MonitorElement * meEnergyHO_HF
MonitorElement * occupancy_vs_ieta
MonitorElement * mapEnergy_EH
MonitorElement * phiMET_HB
void setCurrentFolder(std::string const &fullpath)
MonitorElement * meEnergyEcal_HE
MonitorElement * hadEnergyTiming_profile_HB
MonitorElement * meEnergyEcal_HB
MonitorElement * numBadCellsHcal_HE
MonitorElement * meTotEnergy_HE
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mapEnergy_E
MonitorElement * hadEnergyTiming_Low_HF
MonitorElement * numRcvCellsHcal_HB
MonitorElement * meNumFiredTowers_HB
MonitorElement * numPrbCellsHcal_HB
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * mapEnergyHcal_HF
MonitorElement * book1D(Args &&...args)
MonitorElement * meEnergyHcal_HE
void analyze(edm::Event const &e, edm::EventSetup const &c) override
MonitorElement * hadTiming_HB
edm::EDGetTokenT< CaloTowerCollection > tok_towers_
MonitorElement * numBadCellsEcal_EE
MonitorElement * numPrbCellsEcal_EE
MonitorElement * mapEnergy_HE
MonitorElement * mapEnergy_HF
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
const_iterator end() const
MonitorElement * hadEnergyTiming_HB
MonitorElement * numPrbCellsHcal_HF
MonitorElement * hadEnergyTiming_profile_HF
MonitorElement * numBadCellsHcal_HB
MonitorElement * book2D(Args &&...args)
MonitorElement * Ntowers_vs_ieta
MonitorElement * emEnergyTiming_HB
MonitorElement * meEnergyHO_HE
MonitorElement * hadEnergyTiming_profile_HE
MonitorElement * emEnergyTiming_Low_HE
MonitorElement * emean_vs_ieta_E
MonitorElement * numPrbCellsEcal_EB
MonitorElement * emean_vs_ieta_EH
std::vector< std::vector< double > > tmp
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
const HcalDDDRecConstants * hcons
MonitorElement * emEnergyTiming_profile_HE
MonitorElement * mapEnergy_N
int ieta() const
get the tower ieta
MonitorElement * meEnergyHcalvsEcal_HB
MonitorElement * mapEnergyHcal_HB
MonitorElement * emEnergyTiming_profile_HB
MonitorElement * meEnergyHcalvsEcal_HF
MonitorElement * emean_vs_ieta_E1
MonitorElement * meNumFiredTowers_HE
const_iterator begin() const
MonitorElement * emEnergyTiming_HF
MonitorElement * hadEnergyTiming_profile_Low_HF
MonitorElement * mapEnergy_H
MonitorElement * meIphiCaloTower_HFP
int getNPhi(const int &type) const
MonitorElement * meIphiHcalTower_HBM
constexpr Detector det() const
get the detector field from this detid
MonitorElement * meEnergyEcal_HF