#include <Validation/RecoMET/interface/HCALRecHitAnalyzer.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
HCALRecHitAnalyzer (const edm::ParameterSet &) | |
Private Member Functions | |
void | DumpGeometry () |
void | FillGeometry (const edm::EventSetup &) |
Private Attributes | |
DQMStore * | dbe_ |
bool | debug_ |
bool | dumpGeometry_ |
std::string | geometryFile_ |
edm::InputTag | hBHERecHitsLabel_ |
edm::InputTag | hFRecHitsLabel_ |
edm::InputTag | hORecHitsLabel_ |
std::map< std::string, MonitorElement * > | me |
int | Nevents |
std::string | outputFile_ |
Definition at line 19 of file HCALRecHitAnalyzer.h.
HCALRecHitAnalyzer::HCALRecHitAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 50 of file HCALRecHitAnalyzer.cc.
References debug_, geometryFile_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hBHERecHitsLabel_, hFRecHitsLabel_, and hORecHitsLabel_.
00051 { 00052 00053 // Retrieve Information from the Configuration File 00054 geometryFile_ = iConfig.getUntrackedParameter<std::string>("GeometryFile"); 00055 // outputFile_ = iConfig.getUntrackedParameter<std::string>("OutputFile"); 00056 00057 hBHERecHitsLabel_ = iConfig.getParameter<edm::InputTag>("HBHERecHitsLabel"); 00058 hORecHitsLabel_ = iConfig.getParameter<edm::InputTag>("HORecHitsLabel"); 00059 hFRecHitsLabel_ = iConfig.getParameter<edm::InputTag>("HFRecHitsLabel"); 00060 00061 debug_ = iConfig.getParameter<bool>("Debug"); 00062 00063 //if (outputFile_.size() > 0) 00064 // edm::LogInfo("OutputInfo") << " MET/HCALRecHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; 00065 //else edm::LogInfo("OutputInfo") << " MET/HCALRecHit Task histograms will NOT be saved"; 00066 00067 }
void HCALRecHitAnalyzer::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 406 of file HCALRecHitAnalyzer.cc.
References edm::SortedCollection< T, SORT >::begin(), DEBUG, HcalDetId::depth(), edm::SortedCollection< T, SORT >::end(), ET, eta, funct::exp(), edm::Event::getByLabel(), hBHERecHitsLabel_, HcalBarrel, hFRecHitsLabel_, hORecHitsLabel_, i, HcalDetId::ieta(), HcalDetId::iphi(), edm::Handle< T >::isValid(), j, me, Nevents, phi, edm::Handle< T >::product(), HcalDetId::subdet(), theta, and v_.
00407 { 00408 Nevents++; 00409 me["hHCAL_Nevents"]->Fill(0); 00410 // ========================================================== 00411 // Retrieve! 00412 // ========================================================== 00413 00414 const HBHERecHitCollection *HBHERecHits; 00415 const HORecHitCollection *HORecHits; 00416 const HFRecHitCollection *HFRecHits; 00417 00418 edm::Handle<HBHERecHitCollection> HBHERecHitsHandle; 00419 iEvent.getByLabel(hBHERecHitsLabel_,HBHERecHitsHandle); 00420 if (!HBHERecHitsHandle.isValid()) { 00421 edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task " 00422 << "HCALRecHitAnalyzer::analyze!\n"; return; 00423 } else { 00424 HBHERecHits = HBHERecHitsHandle.product(); 00425 } 00426 edm::Handle<HORecHitCollection> HORecHitsHandle; 00427 iEvent.getByLabel(hORecHitsLabel_,HORecHitsHandle); 00428 if (!HORecHitsHandle.isValid()) { 00429 edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task " 00430 << "HCALRecHitAnalyzer::analyze!\n"; return; 00431 } else { 00432 HORecHits = HORecHitsHandle.product(); 00433 } 00434 edm::Handle<HFRecHitCollection> HFRecHitsHandle; 00435 iEvent.getByLabel(hFRecHitsLabel_,HFRecHitsHandle); 00436 if (!HFRecHitsHandle.isValid()) { 00437 edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Handle, Aborting Task " 00438 << "HCALRecHitAnalyzer::analyze!\n"; return; 00439 } else { 00440 HFRecHits = HFRecHitsHandle.product(); 00441 } 00442 00443 // ========================================================== 00444 // Fill Histograms! 00445 // ========================================================== 00446 00447 TLorentzVector vHBHEMET_EtaRing[83][4]; 00448 int HBHEActiveRing[83][4]; 00449 int HBHENActiveCells[83][4]; 00450 double HBHESET_EtaRing[83][4]; 00451 double HBHEMinEnergy_EtaRing[83][4]; 00452 double HBHEMaxEnergy_EtaRing[83][4]; 00453 00454 for (int i = 0; i < 83; i++) { 00455 for (int j = 0; j < 4; j++) { 00456 00457 HBHEActiveRing[i][j] = 0; 00458 HBHENActiveCells[i][j] = 0; 00459 HBHESET_EtaRing[i][j] = 0; 00460 HBHEMinEnergy_EtaRing[i][j] = 14E3; 00461 HBHEMaxEnergy_EtaRing[i][j] = -999; 00462 } 00463 } 00464 00465 // Loop over HBHERecHit's 00466 HBHERecHitCollection::const_iterator hbherechit; 00467 int nHBrechit = 0, nHErechit = 0; 00468 00469 for (hbherechit = HBHERecHits->begin(); hbherechit != HBHERecHits->end(); hbherechit++) { 00470 00471 HcalDetId det = hbherechit->id(); 00472 double Energy = hbherechit->energy(); 00473 Int_t depth = det.depth(); 00474 Int_t ieta = det.ieta(); 00475 Int_t iphi = det.iphi(); 00476 int EtaRing = 41 + ieta; // this counts from 0 00477 double eta = me["hHCAL_ieta_iphi_etaMap"]->getBinContent(EtaRing+1,iphi); 00478 double phi = me["hHCAL_ieta_iphi_phiMap"]->getBinContent(EtaRing+1,iphi); 00479 double theta = 2*TMath::ATan(exp(-1*eta)); 00480 double ET = Energy*TMath::Sin(theta); 00481 HcalSubdetector HcalNum = det.subdet(); 00482 TLorentzVector v_; 00483 00484 00485 00486 if (Energy>0) // zero suppress 00487 { 00488 HBHEActiveRing[EtaRing][depth-1] = 1; 00489 HBHENActiveCells[EtaRing][depth-1]++; 00490 HBHESET_EtaRing[EtaRing][depth-1]+=ET; 00491 v_.SetPtEtaPhiE(ET, 0, phi, ET); 00492 vHBHEMET_EtaRing[EtaRing][depth-1]-=v_; 00493 00494 00495 DEBUG( EtaRing << " " << Energy << " " << ET << " " << theta << " " << eta << " " << phi << " : " << vHBHEMET_EtaRing[EtaRing][depth-1].Phi() << " " << vHBHEMET_EtaRing[EtaRing][depth-1].Pt() ); 00496 00497 switch (depth) { 00498 case 1: 00499 me["hHCAL_D1_Occ_ieta_iphi"]->Fill(ieta,iphi); 00500 break; 00501 case 2: 00502 me["hHCAL_D2_Occ_ieta_iphi"]->Fill(ieta,iphi); 00503 break; 00504 case 3: 00505 me["hHCAL_D3_Occ_ieta_iphi"]->Fill(ieta,iphi); 00506 break; 00507 } // end switch 00508 } 00509 00510 if (Energy > HBHEMaxEnergy_EtaRing[EtaRing][depth-1]) 00511 HBHEMaxEnergy_EtaRing[EtaRing][depth-1] = Energy; 00512 if (Energy < HBHEMinEnergy_EtaRing[EtaRing][depth-1]) 00513 HBHEMinEnergy_EtaRing[EtaRing][depth-1] = Energy; 00514 00515 switch (depth) { 00516 case 1: 00517 me["hHCAL_D1_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00518 me["hHCAL_D1_energyvsieta"]->Fill(ieta,Energy); 00519 if (Energy>me["hHCAL_D1_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00520 me["hHCAL_D1_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00521 if (Energy<me["hHCAL_D1_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00522 me["hHCAL_D1_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00523 00524 break; 00525 case 2: 00526 me["hHCAL_D2_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00527 00528 me["hHCAL_D2_energyvsieta"]->Fill(ieta,Energy); 00529 if (Energy>me["hHCAL_D2_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00530 me["hHCAL_D2_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00531 if (Energy<me["hHCAL_D2_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00532 me["hHCAL_D2_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00533 break; 00534 case 3: 00535 me["hHCAL_D3_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00536 00537 me["hHCAL_D3_energyvsieta"]->Fill(ieta,Energy); 00538 if (Energy>me["hHCAL_D3_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00539 me["hHCAL_D3_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00540 if (Energy<me["hHCAL_D3_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00541 me["hHCAL_D3_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00542 break; 00543 } // end switch 00544 00545 00546 if (HcalNum == HcalBarrel) { 00547 nHBrechit++; 00548 } else { // HcalEndcap 00549 nHErechit++; 00550 } 00551 } // end loop over HBHERecHit's 00552 00553 // Fill eta-ring MET quantities 00554 for (int iEtaRing=0; iEtaRing < 83; iEtaRing++) { 00555 for (int jDepth=0; jDepth < 3; jDepth++) { 00556 00557 switch (jDepth+1) { 00558 case 1: 00559 me["hHCAL_D1_Maxenergyvsieta"]->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]); 00560 me["hHCAL_D1_Minenergyvsieta"]->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]); 00561 break; 00562 case 2: 00563 me["hHCAL_D2_Maxenergyvsieta"]->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]); 00564 me["hHCAL_D2_Minenergyvsieta"]->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]); 00565 break; 00566 case 3: 00567 me["hHCAL_D3_Maxenergyvsieta"]->Fill(iEtaRing-41, HBHEMaxEnergy_EtaRing[iEtaRing][jDepth]); 00568 me["hHCAL_D3_Minenergyvsieta"]->Fill(iEtaRing-41, HBHEMinEnergy_EtaRing[iEtaRing][jDepth]); 00569 break; 00570 } 00571 00572 if (HBHEActiveRing[iEtaRing][jDepth]) { 00573 00574 switch (jDepth+1) { 00575 case 1: 00576 me["hHCAL_D1_METPhivsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi()); 00577 me["hHCAL_D1_MExvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px()); 00578 me["hHCAL_D1_MEyvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py()); 00579 me["hHCAL_D1_METvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt()); 00580 me["hHCAL_D1_SETvsieta"]->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]); 00581 me["hHCAL_D1_Occvsieta"]->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]); 00582 break; 00583 case 2: 00584 me["hHCAL_D2_METPhivsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi()); 00585 me["hHCAL_D2_MExvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px()); 00586 me["hHCAL_D2_MEyvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py()); 00587 me["hHCAL_D2_METvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt()); 00588 me["hHCAL_D2_SETvsieta"]->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]); 00589 me["hHCAL_D2_Occvsieta"]->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]); 00590 break; 00591 case 3: 00592 me["hHCAL_D3_METPhivsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Phi()); 00593 me["hHCAL_D3_MExvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Px()); 00594 me["hHCAL_D3_MEyvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Py()); 00595 me["hHCAL_D3_METvsieta"]->Fill(iEtaRing-41, vHBHEMET_EtaRing[iEtaRing][jDepth].Pt()); 00596 me["hHCAL_D3_SETvsieta"]->Fill(iEtaRing-41, HBHESET_EtaRing[iEtaRing][jDepth]); 00597 me["hHCAL_D3_Occvsieta"]->Fill(iEtaRing-41, HBHENActiveCells[iEtaRing][jDepth]); 00598 break; 00599 } //switch 00600 } //activering 00601 }//depth 00602 } //etaring 00603 00604 00605 //-------------------------------------------------HO 00606 TLorentzVector vHOMET_EtaRing[83]; 00607 int HOActiveRing[83]; 00608 int HONActiveCells[83]; 00609 double HOSET_EtaRing[83]; 00610 double HOMinEnergy_EtaRing[83]; 00611 double HOMaxEnergy_EtaRing[83]; 00612 00613 for (int i=0;i<83; i++) { 00614 00615 HOActiveRing[i] = 0; 00616 HONActiveCells[i] = 0; 00617 HOSET_EtaRing[i] = 0; 00618 HOMinEnergy_EtaRing[i] = 14E3; 00619 HOMaxEnergy_EtaRing[i] = -999; 00620 } 00621 00622 // Loop over HORecHit's 00623 HORecHitCollection::const_iterator horechit; 00624 int nHOrechit = 0; 00625 00626 for (horechit = HORecHits->begin(); horechit != HORecHits->end(); horechit++) { 00627 00628 nHOrechit++; 00629 00630 HcalDetId det = horechit->id(); 00631 double Energy = horechit->energy(); 00632 Int_t depth = det.depth(); //always 4 00633 Int_t ieta = det.ieta(); 00634 Int_t iphi = det.iphi(); 00635 int EtaRing = 41+ieta; // this counts from 0 00636 double eta = me["hHCAL_ieta_iphi_etaMap"]->getBinContent(EtaRing+1,iphi); 00637 double phi = me["hHCAL_ieta_iphi_phiMap"]->getBinContent(EtaRing+1,iphi); 00638 double theta = 2*TMath::ATan(exp(-1*eta)); 00639 double ET = Energy*TMath::Sin(theta); 00640 TLorentzVector v_; 00641 00642 00643 if (Energy>0) // zero suppress 00644 { 00645 HOActiveRing[EtaRing] = 1; 00646 HONActiveCells[EtaRing]++; 00647 HOSET_EtaRing[EtaRing]+=ET; 00648 v_.SetPtEtaPhiE(ET, 0, phi, ET); 00649 vHOMET_EtaRing[EtaRing]-=v_; 00650 00651 me["hHCAL_D4_Occ_ieta_iphi"]->Fill(ieta,iphi); 00652 } 00653 00654 if (Energy > HOMaxEnergy_EtaRing[EtaRing]) 00655 HOMaxEnergy_EtaRing[EtaRing] = Energy; 00656 if (Energy < HOMinEnergy_EtaRing[EtaRing]) 00657 HOMinEnergy_EtaRing[EtaRing] = Energy; 00658 00659 me["hHCAL_D4_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00660 00661 me["hHCAL_D4_energyvsieta"]->Fill(ieta,Energy); 00662 if (Energy>me["hHCAL_D4_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00663 me["hHCAL_D4_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00664 if (Energy<me["hHCAL_D4_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00665 me["hHCAL_D4_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00666 00667 } // end loop over HORecHit's 00668 00669 // Fill eta-ring MET quantities 00670 for (int iEtaRing=0; iEtaRing<83; iEtaRing++) { 00671 me["hHCAL_D4_Maxenergyvsieta"]->Fill(iEtaRing-41, HOMaxEnergy_EtaRing[iEtaRing]); 00672 me["hHCAL_D4_Minenergyvsieta"]->Fill(iEtaRing-41, HOMinEnergy_EtaRing[iEtaRing]); 00673 00674 if (HOActiveRing[iEtaRing]) { 00675 00676 me["hHCAL_D4_METPhivsieta"]->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Phi()); 00677 me["hHCAL_D4_MExvsieta"]->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Px()); 00678 me["hHCAL_D4_MEyvsieta"]->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Py()); 00679 me["hHCAL_D4_METvsieta"]->Fill(iEtaRing-41, vHOMET_EtaRing[iEtaRing].Pt()); 00680 me["hHCAL_D4_SETvsieta"]->Fill(iEtaRing-41, HOSET_EtaRing[iEtaRing]); 00681 me["hHCAL_D4_Occvsieta"]->Fill(iEtaRing-41, HONActiveCells[iEtaRing]); 00682 00683 } 00684 00685 } 00686 00687 //------------------------------------------------HF 00688 00689 TLorentzVector vHFMET_EtaRing[83][2]; 00690 int HFActiveRing[83][2]; 00691 int HFNActiveCells[83][2]; 00692 double HFSET_EtaRing[83][2]; 00693 double HFMinEnergy_EtaRing[83][2]; 00694 double HFMaxEnergy_EtaRing[83][2]; 00695 00696 for (int i=0;i<83; i++) { 00697 for (int j=0;j<2; j++) { 00698 00699 HFActiveRing[i][j] = 0; 00700 HFNActiveCells[i][j] = 0; 00701 HFSET_EtaRing[i][j] = 0; 00702 HFMinEnergy_EtaRing[i][j] = 14E3; 00703 HFMaxEnergy_EtaRing[i][j] = -999; 00704 00705 } 00706 } 00707 00708 // Loop over HFRecHit's 00709 HFRecHitCollection::const_iterator hfrechit; 00710 int nHFrechit = 0; 00711 00712 for (hfrechit = HFRecHits->begin(); hfrechit != HFRecHits->end(); hfrechit++) { 00713 00714 nHFrechit++; 00715 00716 HcalDetId det = hfrechit->id(); 00717 double Energy = hfrechit->energy(); 00718 Int_t depth = det.depth(); 00719 Int_t ieta = det.ieta(); 00720 Int_t iphi = det.iphi(); 00721 int EtaRing = 41+ieta; // this counts from 0 00722 double eta = me["hHCAL_ieta_iphi_etaMap"]->getBinContent(EtaRing+1,iphi); 00723 double phi = me["hHCAL_ieta_iphi_phiMap"]->getBinContent(EtaRing+1,iphi); 00724 double theta = 2*TMath::ATan(exp(-1*eta)); 00725 double ET = Energy*TMath::Sin(theta); 00726 00727 TLorentzVector v_; 00728 if (Energy>0) // zero suppress 00729 { 00730 HFActiveRing[EtaRing][depth-1] = 1; 00731 HFNActiveCells[EtaRing][depth-1]++; 00732 HFSET_EtaRing[EtaRing][depth-1]+=ET; 00733 v_.SetPtEtaPhiE(ET, 0, phi, ET); 00734 vHFMET_EtaRing[EtaRing][depth-1]-=v_; 00735 00736 switch (depth) { 00737 case 1: 00738 me["hHCAL_D1_Occ_ieta_iphi"]->Fill(ieta,iphi); 00739 break; 00740 case 2: 00741 me["hHCAL_D2_Occ_ieta_iphi"]->Fill(ieta,iphi); 00742 break; 00743 00744 } 00745 } 00746 00747 if (Energy > HFMaxEnergy_EtaRing[EtaRing][depth-1]) 00748 HFMaxEnergy_EtaRing[EtaRing][depth-1] = Energy; 00749 if (Energy < HFMinEnergy_EtaRing[EtaRing][depth-1]) 00750 HFMinEnergy_EtaRing[EtaRing][depth-1] = Energy; 00751 00752 00753 switch (depth) { 00754 case 1: 00755 me["hHCAL_D1_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00756 00757 me["hHCAL_D1_energyvsieta"]->Fill(ieta,Energy); 00758 if (Energy>me["hHCAL_D1_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00759 me["hHCAL_D1_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00760 if (Energy<me["hHCAL_D1_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00761 me["hHCAL_D1_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00762 break; 00763 case 2: 00764 me["hHCAL_D2_energy_ieta_iphi"]->Fill(ieta,iphi,Energy); 00765 00766 me["hHCAL_D2_energyvsieta"]->Fill(ieta,Energy); 00767 if (Energy>me["hHCAL_D2_Maxenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00768 me["hHCAL_D2_Maxenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00769 if (Energy<me["hHCAL_D2_Minenergy_ieta_iphi"]->getBinContent(EtaRing+1, iphi)) 00770 me["hHCAL_D2_Minenergy_ieta_iphi"]->setBinContent(EtaRing+1, iphi, Energy); 00771 break; 00772 } 00773 00774 } // end loop over HFRecHit's 00775 00776 // Fill eta-ring MET quantities 00777 for (int iEtaRing=0; iEtaRing<83; iEtaRing++) { 00778 for (int jDepth=0; jDepth<2; jDepth++) { 00779 switch (jDepth+1) { 00780 case 1: 00781 me["hHCAL_D1_Maxenergyvsieta"]->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]); 00782 me["hHCAL_D1_Minenergyvsieta"]->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]); 00783 break; 00784 case 2: 00785 me["hHCAL_D2_Maxenergyvsieta"]->Fill(iEtaRing-41, HFMaxEnergy_EtaRing[iEtaRing][jDepth]); 00786 me["hHCAL_D2_Minenergyvsieta"]->Fill(iEtaRing-41, HFMinEnergy_EtaRing[iEtaRing][jDepth]); 00787 break; 00788 } 00789 00790 00791 if (HFActiveRing[iEtaRing][jDepth]) { 00792 00793 switch (jDepth+1) { 00794 case 1: 00795 00796 me["hHCAL_D1_METPhivsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi()); 00797 me["hHCAL_D1_MExvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px()); 00798 me["hHCAL_D1_MEyvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py()); 00799 me["hHCAL_D1_METvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt()); 00800 me["hHCAL_D1_SETvsieta"]->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]); 00801 me["hHCAL_D1_Occvsieta"]->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]); 00802 break; 00803 00804 case 2: 00805 00806 me["hHCAL_D2_METPhivsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Phi()); 00807 me["hHCAL_D2_MExvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Px()); 00808 me["hHCAL_D2_MEyvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Py()); 00809 me["hHCAL_D2_METvsieta"]->Fill(iEtaRing-41, vHFMET_EtaRing[iEtaRing][jDepth].Pt()); 00810 me["hHCAL_D2_SETvsieta"]->Fill(iEtaRing-41, HFSET_EtaRing[iEtaRing][jDepth]); 00811 me["hHCAL_D2_Occvsieta"]->Fill(iEtaRing-41, HFNActiveCells[iEtaRing][jDepth]); 00812 break; 00813 00814 } 00815 } 00816 } 00817 } 00818 00819 00820 00821 }
void HCALRecHitAnalyzer::beginJob | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 69 of file HCALRecHitAnalyzer.cc.
References DQMStore::book1D(), DQMStore::book2D(), dbe_, FillGeometry(), i, j, me, Nevents, and DQMStore::setCurrentFolder().
00070 { 00071 Nevents = 0; 00072 // get ahold of back-end interface 00073 dbe_ = edm::Service<DQMStore>().operator->(); 00074 00075 if (dbe_) { 00076 00077 dbe_->setCurrentFolder("RecoMETV/METTask/RecHits/HCAL/geometry"); 00078 me["hHCAL_ieta_iphi_HBMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_HBMap","",83,-41,42,72,1,73); 00079 me["hHCAL_ieta_iphi_HEMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_HEMap","",83,-41,42,72,1,73); 00080 me["hHCAL_ieta_iphi_HFMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_HFMap","",83,-41,42,72,1,73); 00081 me["hHCAL_ieta_iphi_HOMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_HOMap","",83,-41,42,72,1,73); 00082 me["hHCAL_ieta_iphi_etaMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_etaMap","",83,-41,42,72,1,73); 00083 me["hHCAL_ieta_iphi_phiMap"] = dbe_->book2D("METTask_HCAL_ieta_iphi_phiMap","",83,-41,42,72,1,73); 00084 me["hHCAL_ieta_detaMap"] = dbe_->book1D("METTask_HCAL_ieta_detaMap","",83,-41,42); 00085 me["hHCAL_ieta_dphiMap"] = dbe_->book1D("METTask_HCAL_ieta_dphiMap","",83,-41,42); 00086 00087 // Initialize bins for geometry to -999 because z = 0 is a valid entry 00088 for (int i = 1; i <= 83; i++) { 00089 00090 me["hHCAL_ieta_detaMap"]->setBinContent(i,-999); 00091 me["hHCAL_ieta_dphiMap"]->setBinContent(i,-999); 00092 00093 for (int j = 1; j <= 72; j++) { 00094 00095 me["hHCAL_ieta_iphi_HBMap"]->setBinContent(i,j,0); 00096 me["hHCAL_ieta_iphi_HEMap"]->setBinContent(i,j,0); 00097 me["hHCAL_ieta_iphi_HFMap"]->setBinContent(i,j,0); 00098 me["hHCAL_ieta_iphi_HOMap"]->setBinContent(i,j,0); 00099 me["hHCAL_ieta_iphi_etaMap"]->setBinContent(i,j,-999); 00100 me["hHCAL_ieta_iphi_phiMap"]->setBinContent(i,j,-999); 00101 00102 } 00103 00104 } 00105 00106 dbe_->setCurrentFolder("RecoMETV/METTask/RecHits/HCAL/data"); 00107 //--Store number of events used 00108 me["hHCAL_Nevents"] = dbe_->book1D("METTask_HCAL_Nevents","",1,0,1); 00109 //--Data integrated over all events and stored by HCAL(ieta,iphi) 00110 me["hHCAL_D1_energy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D1_energy_ieta_iphi","",83,-41,42,72,1,73); 00111 me["hHCAL_D2_energy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D2_energy_ieta_iphi","",83,-41,42,72,1,73); 00112 me["hHCAL_D3_energy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D3_energy_ieta_iphi","",83,-41,42,72,1,73); 00113 me["hHCAL_D4_energy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D4_energy_ieta_iphi","",83,-41,42,72,1,73); 00114 00115 me["hHCAL_D1_Minenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D1_Minenergy_ieta_iphi","",83,-41,42,72,1,73); 00116 me["hHCAL_D2_Minenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D2_Minenergy_ieta_iphi","",83,-41,42,72,1,73); 00117 me["hHCAL_D3_Minenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D3_Minenergy_ieta_iphi","",83,-41,42,72,1,73); 00118 me["hHCAL_D4_Minenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D4_Minenergy_ieta_iphi","",83,-41,42,72,1,73); 00119 00120 me["hHCAL_D1_Maxenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D1_Maxenergy_ieta_iphi","",83,-41,42,72,1,73); 00121 me["hHCAL_D2_Maxenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D2_Maxenergy_ieta_iphi","",83,-41,42,72,1,73); 00122 me["hHCAL_D3_Maxenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D3_Maxenergy_ieta_iphi","",83,-41,42,72,1,73); 00123 me["hHCAL_D4_Maxenergy_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D4_Maxenergy_ieta_iphi","",83,-41,42,72,1,73); 00124 00125 // need to initialize those 00126 for (int i=1; i<=83; i++) 00127 for (int j=1; j<=73; j++) 00128 { 00129 me["hHCAL_D1_Maxenergy_ieta_iphi"]->setBinContent(i,j,-999); 00130 me["hHCAL_D2_Maxenergy_ieta_iphi"]->setBinContent(i,j,-999); 00131 me["hHCAL_D3_Maxenergy_ieta_iphi"]->setBinContent(i,j,-999); 00132 me["hHCAL_D4_Maxenergy_ieta_iphi"]->setBinContent(i,j,-999); 00133 00134 me["hHCAL_D1_Minenergy_ieta_iphi"]->setBinContent(i,j, 14000); 00135 me["hHCAL_D2_Minenergy_ieta_iphi"]->setBinContent(i,j, 14000); 00136 me["hHCAL_D3_Minenergy_ieta_iphi"]->setBinContent(i,j, 14000); 00137 me["hHCAL_D4_Minenergy_ieta_iphi"]->setBinContent(i,j, 14000); 00138 } 00139 00140 me["hHCAL_D1_Occ_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D1_Occ_ieta_iphi","",83,-41,42,72,1,73); 00141 me["hHCAL_D2_Occ_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D2_Occ_ieta_iphi","",83,-41,42,72,1,73); 00142 me["hHCAL_D3_Occ_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D3_Occ_ieta_iphi","",83,-41,42,72,1,73); 00143 me["hHCAL_D4_Occ_ieta_iphi"] = dbe_->book2D("METTask_HCAL_D4_Occ_ieta_iphi","",83,-41,42,72,1,73); 00144 //--Data over eta-rings 00145 // CaloTower values 00146 me["hHCAL_D1_energyvsieta"] = dbe_->book2D("METTask_HCAL_D1_energyvsieta","",83,-41,42,20101,-100,2001); 00147 me["hHCAL_D2_energyvsieta"] = dbe_->book2D("METTask_HCAL_D2_energyvsieta","",83,-41,42,20101,-100,2001); 00148 me["hHCAL_D3_energyvsieta"] = dbe_->book2D("METTask_HCAL_D3_energyvsieta","",83,-41,42,20101,-100,2001); 00149 me["hHCAL_D4_energyvsieta"] = dbe_->book2D("METTask_HCAL_D4_energyvsieta","",83,-41,42,20101,-100,2001); 00150 00151 me["hHCAL_D1_Minenergyvsieta"] = dbe_->book2D("METTask_HCAL_D1_Minenergyvsieta","",83,-41,42,20101,-100,2001); 00152 me["hHCAL_D2_Minenergyvsieta"] = dbe_->book2D("METTask_HCAL_D2_Minenergyvsieta","",83,-41,42,20101,-100,2001); 00153 me["hHCAL_D3_Minenergyvsieta"] = dbe_->book2D("METTask_HCAL_D3_Minenergyvsieta","",83,-41,42,20101,-100,2001); 00154 me["hHCAL_D4_Minenergyvsieta"] = dbe_->book2D("METTask_HCAL_D4_Minenergyvsieta","",83,-41,42,20101,-100,2001); 00155 00156 me["hHCAL_D1_Maxenergyvsieta"] = dbe_->book2D("METTask_HCAL_D1_Maxenergyvsieta","",83,-41,42,20101,-100,2001); 00157 me["hHCAL_D2_Maxenergyvsieta"] = dbe_->book2D("METTask_HCAL_D2_Maxenergyvsieta","",83,-41,42,20101,-100,2001); 00158 me["hHCAL_D3_Maxenergyvsieta"] = dbe_->book2D("METTask_HCAL_D3_Maxenergyvsieta","",83,-41,42,20101,-100,2001); 00159 me["hHCAL_D4_Maxenergyvsieta"] = dbe_->book2D("METTask_HCAL_D4_Maxenergyvsieta","",83,-41,42,20101,-100,2001); 00160 00161 // Integrated over phi 00162 me["hHCAL_D1_Occvsieta"] = dbe_->book2D("METTask_HCAL_D1_Occvsieta","",83,-41,42,73,0,73); 00163 me["hHCAL_D2_Occvsieta"] = dbe_->book2D("METTask_HCAL_D2_Occvsieta","",83,-41,42,73,0,73); 00164 me["hHCAL_D3_Occvsieta"] = dbe_->book2D("METTask_HCAL_D3_Occvsieta","",83,-41,42,73,0,73); 00165 me["hHCAL_D4_Occvsieta"] = dbe_->book2D("METTask_HCAL_D4_Occvsieta","",83,-41,42,73,0,73); 00166 00167 me["hHCAL_D1_SETvsieta"] = dbe_->book2D("METTask_HCAL_D1_SETvsieta","",83,-41,42,20001,0,2001); 00168 me["hHCAL_D2_SETvsieta"] = dbe_->book2D("METTask_HCAL_D2_SETvsieta","",83,-41,42,20001,0,2001); 00169 me["hHCAL_D3_SETvsieta"] = dbe_->book2D("METTask_HCAL_D3_SETvsieta","",83,-41,42,20001,0,2001); 00170 me["hHCAL_D4_SETvsieta"] = dbe_->book2D("METTask_HCAL_D4_SETvsieta","",83,-41,42,20001,0,2001); 00171 00172 me["hHCAL_D1_METvsieta"] = dbe_->book2D("METTask_HCAL_D1_METvsieta","",83,-41,42,20001,0,2001); 00173 me["hHCAL_D2_METvsieta"] = dbe_->book2D("METTask_HCAL_D2_METvsieta","",83,-41,42,20001,0,2001); 00174 me["hHCAL_D3_METvsieta"] = dbe_->book2D("METTask_HCAL_D3_METvsieta","",83,-41,42,20001,0,2001); 00175 me["hHCAL_D4_METvsieta"] = dbe_->book2D("METTask_HCAL_D4_METvsieta","",83,-41,42,20001,0,2001); 00176 00177 me["hHCAL_D1_METPhivsieta"] = dbe_->book2D("METTask_HCAL_D1_METPhivsieta","",83,-41,42, 80, -4,4); 00178 me["hHCAL_D2_METPhivsieta"] = dbe_->book2D("METTask_HCAL_D2_METPhivsieta","",83,-41,42, 80, -4,4); 00179 me["hHCAL_D3_METPhivsieta"] = dbe_->book2D("METTask_HCAL_D3_METPhivsieta","",83,-41,42, 80, -4,4); 00180 me["hHCAL_D4_METPhivsieta"] = dbe_->book2D("METTask_HCAL_D4_METPhivsieta","",83,-41,42, 80, -4,4); 00181 00182 me["hHCAL_D1_MExvsieta"] = dbe_->book2D("METTask_HCAL_D1_MExvsieta","",83,-41,42, 10001,-500,501); 00183 me["hHCAL_D2_MExvsieta"] = dbe_->book2D("METTask_HCAL_D2_MExvsieta","",83,-41,42, 10001,-500,501); 00184 me["hHCAL_D3_MExvsieta"] = dbe_->book2D("METTask_HCAL_D3_MExvsieta","",83,-41,42, 10001,-500,501); 00185 me["hHCAL_D4_MExvsieta"] = dbe_->book2D("METTask_HCAL_D4_MExvsieta","",83,-41,42, 10001,-500,501); 00186 00187 me["hHCAL_D1_MEyvsieta"] = dbe_->book2D("METTask_HCAL_D1_MEyvsieta","",83,-41,42, 10001,-500,501); 00188 me["hHCAL_D2_MEyvsieta"] = dbe_->book2D("METTask_HCAL_D2_MEyvsieta","",83,-41,42, 10001,-500,501); 00189 me["hHCAL_D3_MEyvsieta"] = dbe_->book2D("METTask_HCAL_D3_MEyvsieta","",83,-41,42, 10001,-500,501); 00190 me["hHCAL_D4_MEyvsieta"] = dbe_->book2D("METTask_HCAL_D4_MEyvsieta","",83,-41,42, 10001,-500,501); 00191 } 00192 00193 // Inspect Setup for CaloTower Geometry 00194 FillGeometry(iSetup); 00195 00196 }
void HCALRecHitAnalyzer::DumpGeometry | ( | ) | [private] |
Definition at line 824 of file HCALRecHitAnalyzer.cc.
Referenced by endJob().
00825 { 00826 /* 00827 edm::LogInfo("OutputInfo") << "Tower Definitions: " << endl; 00828 for (int i=1; i<=hCT_ieta_iphi_etaMap->GetNbinsX(); i++) 00829 { 00830 edm::LogInfo("OutputInfo") << "ieta Bin " << i << endl; 00831 edm::LogInfo("OutputInfo") << " dPhi = " << hCT_ieta_dphiMap->getBinContent(i, 1) << endl; 00832 edm::LogInfo("OutputInfo") << " dEta = " << hCT_ieta_detaMap->getBinContent(i, 1) << endl; 00833 edm::LogInfo("OutputInfo") << " Eta = " << hCT_ieta_iphi_etaMap->getBinContent(i, 1)<< endl; 00834 edm::LogInfo("OutputInfo") << endl; 00835 } 00836 edm::LogInfo("OutputInfo") << endl; 00837 */ 00838 }
Reimplemented from edm::EDAnalyzer.
Definition at line 841 of file HCALRecHitAnalyzer.cc.
References DumpGeometry(), and dumpGeometry_.
00842 { 00843 00844 00845 // Store the DAQ Histograms 00846 //if (outputFile_.size() > 0 && dbe_) 00847 // dbe_->save(outputFile_); 00848 00849 // Dump Geometry Info to a File 00850 if (dumpGeometry_); DumpGeometry(); 00851 00852 }
void HCALRecHitAnalyzer::FillGeometry | ( | const edm::EventSetup & | iSetup | ) | [private] |
Definition at line 198 of file HCALRecHitAnalyzer.cc.
References eta, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), CaloSubdetectorGeometry::getValidDetIds(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, me, PV3DBase< T, PVType, FrameType >::phi(), and phi.
Referenced by beginJob().
00199 { 00200 00201 // ========================================================== 00202 // Retrieve! 00203 // ========================================================== 00204 00205 const CaloSubdetectorGeometry* HBgeom; 00206 const CaloSubdetectorGeometry* HEgeom; 00207 const CaloSubdetectorGeometry* HOgeom; 00208 const CaloSubdetectorGeometry* HFgeom; 00209 00210 try { 00211 00212 edm::ESHandle<CaloGeometry> pG; 00213 iSetup.get<CaloGeometryRecord>().get(pG); 00214 const CaloGeometry cG = *pG; 00215 00216 HBgeom = cG.getSubdetectorGeometry(DetId::Hcal,HcalBarrel); 00217 HEgeom = cG.getSubdetectorGeometry(DetId::Hcal,HcalEndcap); 00218 HOgeom = cG.getSubdetectorGeometry(DetId::Hcal,HcalOuter); 00219 HFgeom = cG.getSubdetectorGeometry(DetId::Hcal,HcalForward); 00220 00221 } catch (...) { 00222 00223 edm::LogInfo("OutputInfo") << "Failed to retrieve an Event Setup Handle, Aborting Task " 00224 << "HCALRecHitAnalyzer::FillGeometry!\n"; return; 00225 00226 } 00227 00228 // ========================================================== 00229 // Fill Histograms! 00230 // ========================================================== 00231 00232 std::vector<DetId>::iterator i; 00233 00234 int HBmin_ieta = 99, HBmax_ieta = -99; 00235 int HBmin_iphi = 99, HBmax_iphi = -99; 00236 00237 // Loop Over all Hcal Barrel DetId's 00238 int nHBdetid = 0; 00239 std::vector<DetId> HBids = HBgeom->getValidDetIds(DetId::Hcal,HcalBarrel); 00240 00241 for (i = HBids.begin(); i != HBids.end(); i++) { 00242 00243 nHBdetid++; 00244 00245 const CaloCellGeometry* cell = HBgeom->getGeometry(*i); 00246 HcalDetId HcalID(i->rawId()); 00247 //GlobalPoint p = cell->getPosition(); 00248 00249 int Calo_ieta = 42 + HcalID.ieta(); 00250 int Calo_iphi = HcalID.iphi(); 00251 double Calo_eta = cell->getPosition().eta(); 00252 double Calo_phi = cell->getPosition().phi(); 00253 00254 if (me["hHCAL_ieta_iphi_etaMap"]->getBinContent(Calo_ieta,Calo_iphi) == -999) { 00255 00256 me["hHCAL_ieta_iphi_etaMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_eta); 00257 me["hHCAL_ieta_iphi_phiMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI); 00258 00259 } 00260 00261 if (Calo_ieta > HBmax_ieta) HBmax_ieta = Calo_ieta; 00262 if (Calo_ieta < HBmin_ieta) HBmin_ieta = Calo_ieta; 00263 if (Calo_iphi > HBmax_iphi) HBmax_iphi = Calo_iphi; 00264 if (Calo_iphi > HBmax_iphi) HBmin_iphi = Calo_iphi; 00265 00266 } 00267 00268 int HEmin_ieta = 99, HEmax_ieta = -99; 00269 int HEmin_iphi = 99, HEmax_iphi = -99; 00270 00271 // Loop Over all Hcal Endcap DetId's 00272 int nHEdetid = 0; 00273 std::vector<DetId> HEids = HEgeom->getValidDetIds(DetId::Hcal,HcalEndcap); 00274 00275 for (i = HEids.begin(); i != HEids.end(); i++) { 00276 00277 nHEdetid++; 00278 00279 const CaloCellGeometry* cell = HEgeom->getGeometry(*i); 00280 HcalDetId HcalID(i->rawId()); 00281 //GlobalPoint p = cell->getPosition(); 00282 00283 int Calo_ieta = 42 + HcalID.ieta(); 00284 int Calo_iphi = HcalID.iphi(); 00285 double Calo_eta = cell->getPosition().eta(); 00286 double Calo_phi = cell->getPosition().phi(); 00287 00288 // HCAL to HE eta, phi map comparison 00289 if (me["hHCAL_ieta_iphi_etaMap"]->getBinContent(Calo_ieta,Calo_iphi) == -999) { 00290 me["hHCAL_ieta_iphi_etaMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_eta); 00291 me["hHCAL_ieta_iphi_phiMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI); 00292 } 00293 00294 if (Calo_ieta > HEmax_ieta) HEmax_ieta = Calo_ieta; 00295 if (Calo_ieta < HEmin_ieta) HEmin_ieta = Calo_ieta; 00296 if (Calo_iphi > HEmax_iphi) HEmax_iphi = Calo_iphi; 00297 if (Calo_iphi > HEmax_iphi) HEmin_iphi = Calo_iphi; 00298 00299 } 00300 00301 int HFmin_ieta = 99, HFmax_ieta = -99; 00302 int HFmin_iphi = 99, HFmax_iphi = -99; 00303 00304 // Loop Over all Hcal Forward DetId's 00305 int nHFdetid = 0; 00306 std::vector<DetId> HFids = HFgeom->getValidDetIds(DetId::Hcal,HcalForward); 00307 00308 for (i = HFids.begin(); i != HFids.end(); i++) { 00309 00310 nHFdetid++; 00311 00312 const CaloCellGeometry* cell = HFgeom->getGeometry(*i); 00313 HcalDetId HcalID(i->rawId()); 00314 //GlobalPoint p = cell->getPosition(); 00315 00316 int Calo_ieta = 42 + HcalID.ieta(); 00317 int Calo_iphi = HcalID.iphi(); 00318 double Calo_eta = cell->getPosition().eta(); 00319 double Calo_phi = cell->getPosition().phi(); 00320 00321 // HCAL to HF eta, phi map comparison 00322 if (me["hHCAL_ieta_iphi_etaMap"]->getBinContent(Calo_ieta,Calo_iphi) == -999) { 00323 me["hHCAL_ieta_iphi_etaMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_eta); 00324 me["hHCAL_ieta_iphi_phiMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI); 00325 } 00326 00327 if (Calo_ieta > HFmax_ieta) HFmax_ieta = Calo_ieta; 00328 if (Calo_ieta < HFmin_ieta) HFmin_ieta = Calo_ieta; 00329 if (Calo_iphi > HFmax_iphi) HFmax_iphi = Calo_iphi; 00330 if (Calo_iphi > HFmax_iphi) HFmin_iphi = Calo_iphi; 00331 00332 } 00333 00334 int HOmin_ieta = 99, HOmax_ieta = -99; 00335 int HOmin_iphi = 99, HOmax_iphi = -99; 00336 00337 // Loop Over all Hcal Outer DetId's 00338 int nHOdetid = 0; 00339 std::vector<DetId> HOids = HOgeom->getValidDetIds(DetId::Hcal,HcalOuter); 00340 00341 for (i = HOids.begin(); i != HOids.end(); i++) { 00342 00343 nHOdetid++; 00344 00345 const CaloCellGeometry* cell = HOgeom->getGeometry(*i); 00346 HcalDetId HcalID(i->rawId()); 00347 //GlobalPoint p = cell->getPosition(); 00348 00349 int Calo_ieta = 42 + HcalID.ieta(); 00350 int Calo_iphi = HcalID.iphi(); 00351 double Calo_eta = cell->getPosition().eta(); 00352 double Calo_phi = cell->getPosition().phi(); 00353 00354 // HCAL to HO eta, phi map comparison 00355 if (me["hHCAL_ieta_iphi_etaMap"]->getBinContent(Calo_ieta,Calo_iphi) == -999) { 00356 me["hHCAL_ieta_iphi_etaMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_eta); 00357 me["hHCAL_ieta_iphi_phiMap"]->setBinContent(Calo_ieta,Calo_iphi,Calo_phi*180.0/M_PI); 00358 } 00359 00360 if (Calo_ieta > HOmax_ieta) HOmax_ieta = Calo_ieta; 00361 if (Calo_ieta < HOmin_ieta) HOmin_ieta = Calo_ieta; 00362 if (Calo_iphi > HOmax_iphi) HOmax_iphi = Calo_iphi; 00363 if (Calo_iphi > HOmax_iphi) HOmin_iphi = Calo_iphi; 00364 00365 } 00366 00367 // Set the Cell Size for each (ieta, iphi) Bin 00368 double currentLowEdge_eta = 0; //double currentHighEdge_eta = 0; 00369 for (int ieta = 1; ieta < 42 ; ieta++) { 00370 00371 int ieta_ = 42 + ieta; 00372 double eta = me["hHCAL_ieta_iphi_etaMap"]->getBinContent(ieta_,3); 00373 double phi = me["hHCAL_ieta_iphi_phiMap"]->getBinContent(ieta_,3); 00374 double deta = 2.0*(eta-currentLowEdge_eta); 00375 deta = ((float)((int)(1.0E3*deta + 0.5)))/1.0E3; 00376 double dphi = 2.0*phi; 00377 if (ieta==40 || ieta==41) dphi = 20; 00378 if (ieta<=39 && ieta>=21) dphi = 10; 00379 if (ieta<=20) dphi = 5; 00380 // BS: This is WRONG...need to correct overlap 00381 if (ieta == 28) deta = 0.218; 00382 if (ieta == 29) deta= 0.096; 00383 currentLowEdge_eta += deta; 00384 00385 // BS: This is WRONG...need to correct overlap 00386 if (ieta == 29) currentLowEdge_eta = 2.964; 00387 00388 me["hHCAL_ieta_detaMap"]->setBinContent(ieta_,deta); // positive rings 00389 me["hHCAL_ieta_dphiMap"]->setBinContent(ieta_,dphi); // positive rings 00390 me["hHCAL_ieta_detaMap"]->setBinContent(42-ieta,deta); // negative rings 00391 me["hHCAL_ieta_dphiMap"]->setBinContent(42-ieta,dphi); // negative rings 00392 00393 } // end loop over ieta 00394 00395 edm::LogInfo("OutputInfo") << "HB ieta range: " << HBmin_ieta << " " << HBmax_ieta; 00396 edm::LogInfo("OutputInfo") << "HB iphi range: " << HBmin_iphi << " " << HBmax_iphi; 00397 edm::LogInfo("OutputInfo") << "HE ieta range: " << HEmin_ieta << " " << HEmax_ieta; 00398 edm::LogInfo("OutputInfo") << "HE iphi range: " << HEmin_iphi << " " << HEmax_iphi; 00399 edm::LogInfo("OutputInfo") << "HF ieta range: " << HFmin_ieta << " " << HFmax_ieta; 00400 edm::LogInfo("OutputInfo") << "HF iphi range: " << HFmin_iphi << " " << HFmax_iphi; 00401 edm::LogInfo("OutputInfo") << "HO ieta range: " << HOmin_ieta << " " << HOmax_ieta; 00402 edm::LogInfo("OutputInfo") << "HO iphi range: " << HOmin_iphi << " " << HOmax_iphi; 00403 00404 }
DQMStore* HCALRecHitAnalyzer::dbe_ [private] |
bool HCALRecHitAnalyzer::debug_ [private] |
bool HCALRecHitAnalyzer::dumpGeometry_ [private] |
std::string HCALRecHitAnalyzer::geometryFile_ [private] |
Definition at line 37 of file HCALRecHitAnalyzer.h.
Referenced by analyze(), and HCALRecHitAnalyzer().
Definition at line 38 of file HCALRecHitAnalyzer.h.
Referenced by analyze(), and HCALRecHitAnalyzer().
Definition at line 39 of file HCALRecHitAnalyzer.h.
Referenced by analyze(), and HCALRecHitAnalyzer().
std::map<std::string, MonitorElement*> HCALRecHitAnalyzer::me [private] |
Definition at line 32 of file HCALRecHitAnalyzer.h.
Referenced by analyze(), beginJob(), and FillGeometry().
int HCALRecHitAnalyzer::Nevents [private] |
std::string HCALRecHitAnalyzer::outputFile_ [private] |
Definition at line 35 of file HCALRecHitAnalyzer.h.