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.;
494 std::cout <<
"no HepMCProduct found" << std::endl;
501 double maxPt = -99999.;
503 const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
504 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
505 p != myGenEvent->particles_end(); ++
p ) {
506 double phip = (*p)->momentum().phi();
507 double etap = (*p)->momentum().eta();
510 double pt = (*p)->momentum().perp();
511 if(pt > maxPt) { npart++; maxPt =
pt; phi_MC = phip; eta_MC = etap; }
530 double ieta_MC = 9999;
531 double iphi_MC = 9999;
536 double sumEnergyHcal_HB = 0.;
537 double sumEnergyEcal_HB = 0.;
538 double sumEnergyHO_HB = 0.;
539 Int_t numFiredTowers_HB = 0;
545 double sumEnergyHcal_HE = 0.;
546 double sumEnergyEcal_HE = 0.;
547 double sumEnergyHO_HE = 0.;
548 Int_t numFiredTowers_HE = 0;
554 double sumEnergyHcal_HF = 0.;
555 double sumEnergyEcal_HF = 0.;
556 double sumEnergyHO_HF = 0.;
557 Int_t numFiredTowers_HF = 0;
563 for ( cal = towers->begin(); cal != towers->end(); ++cal ) {
565 double eE = cal->emEnergy();
566 double eH = cal->hadEnergy();
567 double eHO = cal->outerEnergy();
568 double etaT = cal->eta();
569 double phiT = cal->phi();
570 double en = cal->energy();
571 double etT = cal->et();
572 double had_tm = cal->hcalTime();
573 double em_tm = cal->ecalTime();
575 int numBadEcalCells = cal->numBadEcalCells();
576 int numRcvEcalCells = cal->numRecoveredEcalCells();
577 int numPrbEcalCells = cal->numProblematicEcalCells();
579 int numBadHcalCells = cal->numBadHcalCells();
580 int numRcvHcalCells = cal->numRecoveredHcalCells();
581 int numPrbHcalCells = cal->numProblematicHcalCells();
588 int ieta = idT.
ieta();
589 if(ieta > 0) ieta -= 1;
590 int iphi = idT.iphi();
594 std::vector<int> inEcals(2), inHcals(3);
595 unsigned int constitSize = cal->constituentsSize();
596 for(
unsigned int ic=0; ic<constitSize; ic++){
597 DetId detId = cal->constituent(ic);
621 double r =
dR(eta_MC, phi_MC, etaT, phiT);
629 if( fabs(eta_MC) < 3.0 && (ieta > 29 || ieta < -29)) {;}
647 && (fabs(etaT) <
etaMax[0] && fabs(etaT) >=
etaMin[0] )) {
663 sumEnergyHcal_HB += eH;
664 sumEnergyEcal_HB += eE;
665 sumEnergyHO_HB += eHO;
701 && (fabs(etaT) <
etaMax[1] && fabs(etaT) >=
etaMin[1] )) {
717 sumEnergyHcal_HE += eH;
718 sumEnergyEcal_HE += eE;
719 sumEnergyHO_HE += eHO;
750 && (fabs(etaT) <
etaMax[2] && fabs(etaT) >=
etaMin[2] )) {
766 sumEnergyHcal_HF += eH;
767 sumEnergyEcal_HF += eE;
768 sumEnergyHO_HF += eHO;
819 met =
sqrt(metx_HB*metx_HB + mety_HB*mety_HB);
820 Vector metv(metx_HB,mety_HB,metz_HB);
841 met =
sqrt(metx_HE*metx_HE + mety_HE*mety_HE);
842 Vector metv(metx_HE,mety_HE,metz_HE);
862 met =
sqrt(metx_HF*metx_HF + mety_HF*mety_HF);
863 Vector metv(metx_HF,mety_HF,metz_HF);
885 double PI = 3.1415926535898;
886 double deltaphi= phi1 - phi2;
887 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
888 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
889 double deltaeta = eta2 - eta1;
890 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