9 theCaloTowerCollectionLabel(conf.getUntrackedParameter<edm::InputTag>(
"CaloTowerCollectionLabel"))
27 if(hcalselector_ ==
"HB")
isub = 1;
28 if(hcalselector_ ==
"HE")
isub = 2;
29 if(hcalselector_ ==
"HF")
isub = 3;
32 if(mc_ ==
"no")
imc = 0;
37 edm::LogInfo(
"OutputInfo") <<
" Hcal RecHit Task histograms will NOT be saved";
55 sprintf (histo,
"Ntowers_per_event_vs_ieta" );
58 sprintf (histo,
"CaloTowersTask_map_Nentries" );
66 sprintf (histo,
"emean_vs_ieta_E" );
68 sprintf (histo,
"emean_vs_ieta_H" );
70 sprintf (histo,
"emean_vs_ieta_EH" );
74 sprintf (histo,
"emean_vs_ieta_E1" );
76 sprintf (histo,
"emean_vs_ieta_H1" );
78 sprintf (histo,
"emean_vs_ieta_EH1" );
84 sprintf (histo,
"CaloTowersTask_map_energy_E" );
86 sprintf (histo,
"CaloTowersTask_map_energy_H");
88 sprintf (histo,
"CaloTowersTask_map_energy_EH" );
94 sprintf (histo,
"number_of_bad_cells_Ecal_EB");
96 sprintf (histo,
"number_of_bad_cells_Ecal_EE");
98 sprintf (histo,
"number_of_recovered_cells_Ecal_EB");
100 sprintf (histo,
"number_of_recovered_cells_Ecal_EE");
102 sprintf (histo,
"number_of_problematic_cells_Ecal_EB");
104 sprintf (histo,
"number_of_problematic_cells_Ecal_EE");
108 sprintf (histo,
"CaloTowersTask_map_occupancy" );
111 sprintf (histo,
"CaloTowersTask_occupancy_vs_ieta" );
116 sprintf (histo,
"number_of_bad_cells_Hcal_HB");
118 sprintf (histo,
"number_of_recovered_cells_Hcal_HB");
120 sprintf (histo,
"number_of_problematic_cells_Hcal_HB");
125 sprintf (histo,
"CaloTowersTask_energy_HCAL_HB" ) ;
128 sprintf (histo,
"CaloTowersTask_energy_ECAL_HB" ) ;
131 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HB" ) ;
134 sprintf (histo,
"CaloTowersTask_MET_HB" ) ;
137 sprintf (histo,
"CaloTowersTask_SET_HB" ) ;
143 sprintf (histo,
"CaloTowersTask_EM_Timing_HB" ) ;
146 sprintf (histo,
"CaloTowersTask_HAD_Timing_HB" ) ;
151 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HB" ) ;
154 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HB" ) ;
157 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_High_HB" ) ;
160 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HB" ) ;
163 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HB" ) ;
166 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_High_HB" ) ;
170 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HB" ) ;
173 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HB" ) ;
176 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_High_HB" ) ;
179 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HB" ) ;
182 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HB" ) ;
185 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_High_HB" ) ;
191 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HB") ;
194 sprintf (histo,
"CaloTowersTask_energy_OUTER_HB" ) ;
197 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HB" ) ;
200 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HB" ) ;
203 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HB" ) ;
206 sprintf (histo,
"CaloTowersTask_map_energy_HB" );
208 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HB");
210 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HB" );
213 sprintf (histo,
"CaloTowersTask_phi_MET_HB" ) ;
220 sprintf (histo,
"number_of_bad_cells_Hcal_HE");
222 sprintf (histo,
"number_of_recovered_cells_Hcal_HE");
224 sprintf (histo,
"number_of_problematic_cells_Hcal_HE");
229 sprintf (histo,
"CaloTowersTask_energy_HCAL_HE" ) ;
232 sprintf (histo,
"CaloTowersTask_energy_ECAL_HE" ) ;
235 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HE" ) ;
238 sprintf (histo,
"CaloTowersTask_MET_HE" ) ;
241 sprintf (histo,
"CaloTowersTask_SET_HE" ) ;
247 sprintf (histo,
"CaloTowersTask_EM_Timing_HE" ) ;
250 sprintf (histo,
"CaloTowersTask_HAD_Timing_HE" ) ;
255 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HE" ) ;
258 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HE" ) ;
261 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HE" ) ;
264 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HE" ) ;
268 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HE" ) ;
271 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HE" ) ;
274 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HE" ) ;
277 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HE" ) ;
283 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HE") ;
286 sprintf (histo,
"CaloTowersTask_energy_OUTER_HE" ) ;
289 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HE" ) ;
292 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HE" ) ;
295 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HE" ) ;
298 sprintf (histo,
"CaloTowersTask_map_energy_HE" );
300 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HE");
302 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HE" );
305 sprintf (histo,
"CaloTowersTask_phi_MET_HE" ) ;
313 sprintf (histo,
"number_of_bad_cells_Hcal_HF");
315 sprintf (histo,
"number_of_recovered_cells_Hcal_HF");
317 sprintf (histo,
"number_of_problematic_cells_Hcal_HF");
322 sprintf (histo,
"CaloTowersTask_energy_HCAL_HF" ) ;
325 sprintf (histo,
"CaloTowersTask_energy_ECAL_HF" ) ;
328 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HF" ) ;
331 sprintf (histo,
"CaloTowersTask_MET_HF" ) ;
334 sprintf (histo,
"CaloTowersTask_SET_HF" ) ;
340 sprintf (histo,
"CaloTowersTask_EM_Timing_HF" ) ;
343 sprintf (histo,
"CaloTowersTask_HAD_Timing_HF" ) ;
347 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HF" ) ;
350 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HF" ) ;
354 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HF" ) ;
357 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HF" ) ;
360 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HF" ) ;
363 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HF" ) ;
369 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HF") ;
372 sprintf (histo,
"CaloTowersTask_energy_OUTER_HF" ) ;
375 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HF" ) ;
378 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HF" ) ;
381 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HF" ) ;
384 sprintf (histo,
"CaloTowersTask_map_energy_HF" );
386 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HF");
388 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HF" );
391 sprintf (histo,
"CaloTowersTask_phi_MET_HF" ) ;
485 double phi_MC = 9999.;
486 double eta_MC = 9999.;
491 event.getByLabel(
"generator",evtMC);
493 std::cout <<
"no HepMCProduct found" << std::endl;
500 double maxPt = -99999.;
502 const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
503 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
504 p != myGenEvent->particles_end(); ++
p ) {
505 double phip = (*p)->momentum().phi();
506 double etap = (*p)->momentum().eta();
509 double pt = (*p)->momentum().perp();
510 if(pt > maxPt) { npart++; maxPt =
pt; phi_MC = phip; eta_MC = etap; }
529 double ieta_MC = 9999;
530 double iphi_MC = 9999;
535 double sumEnergyHcal_HB = 0.;
536 double sumEnergyEcal_HB = 0.;
537 double sumEnergyHO_HB = 0.;
538 Int_t numFiredTowers_HB = 0;
544 double sumEnergyHcal_HE = 0.;
545 double sumEnergyEcal_HE = 0.;
546 double sumEnergyHO_HE = 0.;
547 Int_t numFiredTowers_HE = 0;
553 double sumEnergyHcal_HF = 0.;
554 double sumEnergyEcal_HF = 0.;
555 double sumEnergyHO_HF = 0.;
556 Int_t numFiredTowers_HF = 0;
562 for ( cal = towers->begin(); cal != towers->end(); ++cal ) {
564 double eE = cal->emEnergy();
565 double eH = cal->hadEnergy();
566 double eHO = cal->outerEnergy();
567 double etaT = cal->eta();
568 double phiT = cal->phi();
569 double en = cal->energy();
570 double etT = cal->et();
571 double had_tm = cal->hcalTime();
572 double em_tm = cal->ecalTime();
574 int numBadEcalCells = cal->numBadEcalCells();
575 int numRcvEcalCells = cal->numRecoveredEcalCells();
576 int numPrbEcalCells = cal->numProblematicEcalCells();
578 int numBadHcalCells = cal->numBadHcalCells();
579 int numRcvHcalCells = cal->numRecoveredHcalCells();
580 int numPrbHcalCells = cal->numProblematicHcalCells();
587 int ieta = idT.
ieta();
588 if(ieta > 0) ieta -= 1;
589 int iphi = idT.iphi();
593 std::vector<int> inEcals(2), inHcals(3);
594 unsigned int constitSize = cal->constituentsSize();
595 for(
unsigned int ic=0; ic<constitSize; ic++){
596 DetId detId = cal->constituent(ic);
620 double r =
dR(eta_MC, phi_MC, etaT, phiT);
628 if( fabs(eta_MC) < 3.0 && (ieta > 29 || ieta < -29)) {;}
646 && (fabs(etaT) <
etaMax[0] && fabs(etaT) >=
etaMin[0] )) {
662 sumEnergyHcal_HB += eH;
663 sumEnergyEcal_HB += eE;
664 sumEnergyHO_HB += eHO;
700 && (fabs(etaT) <
etaMax[1] && fabs(etaT) >=
etaMin[1] )) {
716 sumEnergyHcal_HE += eH;
717 sumEnergyEcal_HE += eE;
718 sumEnergyHO_HE += eHO;
749 && (fabs(etaT) <
etaMax[2] && fabs(etaT) >=
etaMin[2] )) {
765 sumEnergyHcal_HF += eH;
766 sumEnergyEcal_HF += eE;
767 sumEnergyHO_HF += eHO;
810 mapEnergy_E -> Fill(
double(ieta_MC),
double(iphi_MC), Ee1);
811 mapEnergy_H -> Fill(
double(ieta_MC),
double(iphi_MC), Eh1);
812 mapEnergy_EH -> Fill(
double(ieta_MC),
double(iphi_MC), Ee1+Eh1);
814 mapEnergy_N -> Fill(
double(ieta_MC),
double(iphi_MC), 1.);
818 met =
sqrt(metx_HB*metx_HB + mety_HB*mety_HB);
819 Vector metv(metx_HB,mety_HB,metz_HB);
840 met =
sqrt(metx_HE*metx_HE + mety_HE*mety_HE);
841 Vector metv(metx_HE,mety_HE,metz_HE);
861 met =
sqrt(metx_HF*metx_HF + mety_HF*mety_HF);
862 Vector metv(metx_HF,mety_HF,metz_HF);
884 double PI = 3.1415926535898;
885 double deltaphi= phi1 - phi2;
886 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
887 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
888 double deltaeta = eta2 - eta1;
889 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
MonitorElement * emean_vs_ieta_E1
T getUntrackedParameter(std::string const &, T const &) const
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * emean_vs_ieta_H1
MonitorElement * mapEnergyEcal_HE
MonitorElement * phiMET_HF
MonitorElement * hadEnergyTiming_profile_Low_HE
HcalSubdetector subdet() const
get the subdetector
MonitorElement * emEnergyTiming_HE
MonitorElement * meEnergyHcalTower_HB
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * mapEnergy_HE
MonitorElement * meTotEnergy_HF
MonitorElement * hadTiming_HE
MonitorElement * hadEnergyTiming_profile_HF
#define DEFINE_FWK_MODULE(type)
MonitorElement * mapEnergyEcal_HB
virtual void analyze(edm::Event const &e, edm::EventSetup const &c)
MonitorElement * hadEnergyTiming_profile_HB
MonitorElement * mapEnergy_HF
MonitorElement * meEnergyHcalvsEcal_HE
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * meEnergyEcal_HB
MonitorElement * meTotEnergy_HB
MonitorElement * numPrbCellsHcal_HE
MonitorElement * hadEnergyTiming_profile_High_HB
MonitorElement * meNumFiredTowers_HF
edm::InputTag theCaloTowerCollectionLabel
MonitorElement * phiMET_HE
MonitorElement * mapEnergyHcal_HB
MonitorElement * hadEnergyTiming_profile_HE
MonitorElement * meNumFiredTowers_HE
MonitorElement * hadTiming_HB
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
MonitorElement * emTiming_HB
MonitorElement * hadEnergyTiming_Low_HE
MonitorElement * numBadCellsHcal_HB
MonitorElement * numBadCellsEcal_EE
MonitorElement * hadEnergyTiming_profile_Low_HF
MonitorElement * numRcvCellsEcal_EB
MonitorElement * meEnergyHcalTower_HF
MonitorElement * meEnergyEcalTower_HB
MonitorElement * numPrbCellsEcal_EB
MonitorElement * numBadCellsEcal_EB
MonitorElement * emean_vs_ieta_EH
MonitorElement * emEnergyTiming_High_HB
MonitorElement * mapEnergyHcal_HE
MonitorElement * phiMET_HB
MonitorElement * hadEnergyTiming_profile_Low_HB
MonitorElement * emTiming_HF
MonitorElement * emEnergyTiming_Low_HE
MonitorElement * mapEnergy_E
MonitorElement * numBadCellsHcal_HF
MonitorElement * numPrbCellsHcal_HB
MonitorElement * meEnergyEcalTower_HE
MonitorElement * meEnergyHcal_HF
MonitorElement * occupancy_vs_ieta
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * numPrbCellsHcal_HF
MonitorElement * meEnergyEcalTower_HF
MonitorElement * meEnergyHcalvsEcal_HF
MonitorElement * hadEnergyTiming_High_HB
MonitorElement * emEnergyTiming_HF
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * mapEnergy_H
MonitorElement * emTiming_HE
std::string hcalselector_
MonitorElement * emEnergyTiming_profile_Low_HB
MonitorElement * hadEnergyTiming_HF
MonitorElement * numRcvCellsEcal_EE
MonitorElement * meEnergyHO_HE
MonitorElement * numBadCellsHcal_HE
MonitorElement * hadTiming_HF
MonitorElement * numRcvCellsHcal_HE
MonitorElement * meEnergyHcal_HE
MonitorElement * meEnergyEcal_HF
MonitorElement * meEnergyHcalTower_HE
MonitorElement * hadEnergyTiming_HB
MonitorElement * numRcvCellsHcal_HB
MonitorElement * emEnergyTiming_HB
MonitorElement * emEnergyTiming_profile_HF
MonitorElement * numRcvCellsHcal_HF
MonitorElement * numPrbCellsEcal_EE
MonitorElement * hadEnergyTiming_Low_HB
MonitorElement * meEnergyHO_HF
MonitorElement * meEnergyHcal_HB
MonitorElement * emEnergyTiming_Low_HB
std::vector< std::vector< double > > tmp
MonitorElement * meNumFiredTowers_HB
MonitorElement * Ntowers_vs_ieta
MonitorElement * emean_vs_ieta_EH1
MonitorElement * meEnergyEcal_HE
MonitorElement * occupancy_map
MonitorElement * hadEnergyTiming_Low_HF
MonitorElement * meTotEnergy_HE
MonitorElement * mapEnergyHcal_HF
MonitorElement * emEnergyTiming_profile_Low_HE
MonitorElement * hadEnergyTiming_HE
MonitorElement * emean_vs_ieta_E
int ieta() const
get the tower ieta
MonitorElement * emean_vs_ieta_H
MonitorElement * meEnergyHcalvsEcal_HB
MonitorElement * emEnergyTiming_profile_HE
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Detector det() const
get the detector field from this detid
MonitorElement * meEnergyHO_HB
MonitorElement * emEnergyTiming_profile_HB
MonitorElement * mapEnergy_EH
MonitorElement * emEnergyTiming_profile_High_HB
const double Rmin[kNumberCalorimeter]
math::RhoEtaPhiVector Vector
MonitorElement * mapEnergy_N
CaloTowersValidation(edm::ParameterSet const &conf)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mapEnergyEcal_HF
MonitorElement * mapEnergy_HB