28 if(hcalselector_ ==
"HB")
isub = 1;
29 if(hcalselector_ ==
"HE")
isub = 2;
30 if(hcalselector_ ==
"HF")
isub = 3;
33 if(mc_ ==
"no")
imc = 0;
35 if ( outputFile_.size() != 0 ) {
36 edm::LogInfo(
"OutputInfo") <<
" Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() <<
"'";
38 edm::LogInfo(
"OutputInfo") <<
" Hcal RecHit Task histograms will NOT be saved";
56 sprintf (histo,
"Ntowers_per_event_vs_ieta" );
59 sprintf (histo,
"CaloTowersTask_map_Nentries" );
67 sprintf (histo,
"emean_vs_ieta_E" );
69 sprintf (histo,
"emean_vs_ieta_H" );
71 sprintf (histo,
"emean_vs_ieta_EH" );
75 sprintf (histo,
"emean_vs_ieta_E1" );
77 sprintf (histo,
"emean_vs_ieta_H1" );
79 sprintf (histo,
"emean_vs_ieta_EH1" );
85 sprintf (histo,
"CaloTowersTask_map_energy_E" );
87 sprintf (histo,
"CaloTowersTask_map_energy_H");
89 sprintf (histo,
"CaloTowersTask_map_energy_EH" );
95 sprintf (histo,
"number_of_bad_cells_Ecal_EB");
97 sprintf (histo,
"number_of_bad_cells_Ecal_EE");
99 sprintf (histo,
"number_of_recovered_cells_Ecal_EB");
101 sprintf (histo,
"number_of_recovered_cells_Ecal_EE");
103 sprintf (histo,
"number_of_problematic_cells_Ecal_EB");
105 sprintf (histo,
"number_of_problematic_cells_Ecal_EE");
109 sprintf (histo,
"CaloTowersTask_map_occupancy" );
112 sprintf (histo,
"CaloTowersTask_occupancy_vs_ieta" );
117 sprintf (histo,
"number_of_bad_cells_Hcal_HB");
119 sprintf (histo,
"number_of_recovered_cells_Hcal_HB");
121 sprintf (histo,
"number_of_problematic_cells_Hcal_HB");
126 sprintf (histo,
"CaloTowersTask_energy_HCAL_HB" ) ;
129 sprintf (histo,
"CaloTowersTask_energy_ECAL_HB" ) ;
132 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HB" ) ;
135 sprintf (histo,
"CaloTowersTask_MET_HB" ) ;
138 sprintf (histo,
"CaloTowersTask_SET_HB" ) ;
144 sprintf (histo,
"CaloTowersTask_EM_Timing_HB" ) ;
147 sprintf (histo,
"CaloTowersTask_HAD_Timing_HB" ) ;
152 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HB" ) ;
155 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HB" ) ;
158 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_High_HB" ) ;
161 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HB" ) ;
164 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HB" ) ;
167 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_High_HB" ) ;
171 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HB" ) ;
174 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HB" ) ;
177 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_High_HB" ) ;
180 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HB" ) ;
183 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HB" ) ;
186 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_High_HB" ) ;
192 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HB") ;
195 sprintf (histo,
"CaloTowersTask_energy_OUTER_HB" ) ;
198 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HB" ) ;
201 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HB" ) ;
204 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HB" ) ;
207 sprintf (histo,
"CaloTowersTask_map_energy_HB" );
209 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HB");
211 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HB" );
214 sprintf (histo,
"CaloTowersTask_phi_MET_HB" ) ;
221 sprintf (histo,
"number_of_bad_cells_Hcal_HE");
223 sprintf (histo,
"number_of_recovered_cells_Hcal_HE");
225 sprintf (histo,
"number_of_problematic_cells_Hcal_HE");
230 sprintf (histo,
"CaloTowersTask_energy_HCAL_HE" ) ;
233 sprintf (histo,
"CaloTowersTask_energy_ECAL_HE" ) ;
236 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HE" ) ;
239 sprintf (histo,
"CaloTowersTask_MET_HE" ) ;
242 sprintf (histo,
"CaloTowersTask_SET_HE" ) ;
248 sprintf (histo,
"CaloTowersTask_EM_Timing_HE" ) ;
251 sprintf (histo,
"CaloTowersTask_HAD_Timing_HE" ) ;
256 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_Low_HE" ) ;
259 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HE" ) ;
262 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_Low_HE" ) ;
265 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HE" ) ;
269 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HE" ) ;
272 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HE" ) ;
275 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HE" ) ;
278 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HE" ) ;
284 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HE") ;
287 sprintf (histo,
"CaloTowersTask_energy_OUTER_HE" ) ;
290 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HE" ) ;
293 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HE" ) ;
296 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HE" ) ;
299 sprintf (histo,
"CaloTowersTask_map_energy_HE" );
301 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HE");
303 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HE" );
306 sprintf (histo,
"CaloTowersTask_phi_MET_HE" ) ;
314 sprintf (histo,
"number_of_bad_cells_Hcal_HF");
316 sprintf (histo,
"number_of_recovered_cells_Hcal_HF");
318 sprintf (histo,
"number_of_problematic_cells_Hcal_HF");
323 sprintf (histo,
"CaloTowersTask_energy_HCAL_HF" ) ;
326 sprintf (histo,
"CaloTowersTask_energy_ECAL_HF" ) ;
329 sprintf (histo,
"CaloTowersTask_number_of_fired_towers_HF" ) ;
332 sprintf (histo,
"CaloTowersTask_MET_HF" ) ;
335 sprintf (histo,
"CaloTowersTask_SET_HF" ) ;
341 sprintf (histo,
"CaloTowersTask_EM_Timing_HF" ) ;
344 sprintf (histo,
"CaloTowersTask_HAD_Timing_HF" ) ;
348 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_HF" ) ;
351 sprintf (histo,
"CaloTowersTask_EM_Energy_Timing_profile_HF" ) ;
355 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_Low_HF" ) ;
358 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_HF" ) ;
361 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_Low_HF" ) ;
364 sprintf (histo,
"CaloTowersTask_HAD_Energy_Timing_profile_HF" ) ;
370 sprintf (histo,
"CaloTowersTask_sum_of_energy_HCAL_vs_ECAL_HF") ;
373 sprintf (histo,
"CaloTowersTask_energy_OUTER_HF" ) ;
376 sprintf (histo,
"CaloTowersTask_energy_of_ECAL_component_of_tower_HF" ) ;
379 sprintf (histo,
"CaloTowersTask_energy_of_HCAL_component_of_tower_HF" ) ;
382 sprintf (histo,
"CaloTowersTask_energy_HcalPlusEcalPlusHO_HF" ) ;
385 sprintf (histo,
"CaloTowersTask_map_energy_HF" );
387 sprintf (histo,
"CaloTowersTask_map_energy_HCAL_HF");
389 sprintf (histo,
"CaloTowersTask_map_energy_ECAL_HF" );
392 sprintf (histo,
"CaloTowersTask_phi_MET_HF" ) ;
486 double phi_MC = 9999.;
487 double eta_MC = 9999.;
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;
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
tuple met
____________________________________________________________________________||
MonitorElement * hadEnergyTiming_profile_Low_HE
HcalSubdetector subdet() const
get the subdetector
MonitorElement * emEnergyTiming_HE
MonitorElement * meEnergyHcalTower_HB
edm::EDGetTokenT< CaloTowerCollection > tok_calo_
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
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
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
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