![]() |
![]() |
#include <EBRecoSummary.h>
Public Member Functions | |
EBRecoSummary (const edm::ParameterSet &) | |
~EBRecoSummary () | |
Protected Attributes | |
edm::InputTag | basicClusterCollection_EB_ |
double | ethrEB_ |
edm::InputTag | recHitCollection_EB_ |
edm::InputTag | redRecHitCollection_EB_ |
double | scEtThrEB_ |
edm::InputTag | superClusterCollection_EB_ |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
void | convxtalid (int &, int &) |
int | diff_neta_s (int, int) |
int | diff_nphi_s (int, int) |
virtual void | endJob () |
Private Attributes | |
DQMStore * | dqmStore_ |
MonitorElement * | h_basicClusters_recHits_EB_recoFlag |
MonitorElement * | h_recHits_EB_Chi2 |
MonitorElement * | h_recHits_EB_E1oE4 |
MonitorElement * | h_recHits_EB_energyMax |
MonitorElement * | h_recHits_EB_recoFlag |
MonitorElement * | h_redRecHits_EB_recoFlag |
MonitorElement * | h_superClusters_EB_E1oE4 |
MonitorElement * | h_superClusters_EB_nBC |
MonitorElement * | h_superClusters_EB_phi |
MonitorElement * | h_superClusters_eta |
std::string | prefixME_ |
Definition at line 42 of file EBRecoSummary.h.
EBRecoSummary::EBRecoSummary | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 68 of file EBRecoSummary.cc.
References basicClusterCollection_EB_, dqmStore_, ethrEB_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), h_basicClusters_recHits_EB_recoFlag, h_recHits_EB_Chi2, h_recHits_EB_E1oE4, h_recHits_EB_energyMax, h_recHits_EB_recoFlag, h_redRecHits_EB_recoFlag, h_superClusters_EB_E1oE4, h_superClusters_EB_nBC, h_superClusters_EB_phi, h_superClusters_eta, cmsCodeRules::cppFunctionSkipper::operator, prefixME_, recHitCollection_EB_, redRecHitCollection_EB_, scEtThrEB_, and superClusterCollection_EB_.
{ prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", ""); //now do what ever initialization is needed recHitCollection_EB_ = ps.getParameter<edm::InputTag>("recHitCollection_EB"); redRecHitCollection_EB_ = ps.getParameter<edm::InputTag>("redRecHitCollection_EB"); basicClusterCollection_EB_ = ps.getParameter<edm::InputTag>("basicClusterCollection_EB"); superClusterCollection_EB_ = ps.getParameter<edm::InputTag>("superClusterCollection_EB"); ethrEB_ = ps.getParameter<double>("ethrEB"); scEtThrEB_ = ps.getParameter<double>("scEtThrEB"); // DQM Store ------------------- dqmStore_= edm::Service<DQMStore>().operator->(); // Monitor Elements (ex THXD) dqmStore_->setCurrentFolder(prefixME_ + "/EBRecoSummary"); // to organise the histos in folders // ReducedRecHits ---------------------------------------------- // ... barrel h_redRecHits_EB_recoFlag = dqmStore_->book1D("redRecHits_EB_recoFlag","redRecHits_EB_recoFlag",16,-0.5,15.5); // RecHits ---------------------------------------------- // ... barrel h_recHits_EB_energyMax = dqmStore_->book1D("recHits_EB_energyMax","recHitsEB_energyMax",110,-10,100); h_recHits_EB_Chi2 = dqmStore_->book1D("recHits_EB_Chi2","recHits_EB_Chi2",200,0,100); h_recHits_EB_E1oE4 = dqmStore_->book1D("recHits_EB_E1oE4","recHitsEB_E1oE4",150, 0, 1.5); h_recHits_EB_recoFlag = dqmStore_->book1D("recHits_EB_recoFlag","recHits_EB_recoFlag",16,-0.5,15.5); // Basic Clusters ---------------------------------------------- // ... associated barrel rec hits h_basicClusters_recHits_EB_recoFlag = dqmStore_->book1D("basicClusters_recHits_EB_recoFlag","basicClusters_recHits_EB_recoFlag",16,-0.5,15.5); // Super Clusters ---------------------------------------------- // ... barrel h_superClusters_EB_nBC = dqmStore_->book1D("superClusters_EB_nBC","superClusters_EB_nBC",100,0.,100.); h_superClusters_EB_E1oE4 = dqmStore_->book1D("superClusters_EB_E1oE4","superClusters_EB_E1oE4",150,0,1.5); h_superClusters_eta = dqmStore_->book1D("superClusters_eta","superClusters_eta",150,-3.,3.); h_superClusters_EB_phi = dqmStore_->book1D("superClusters_EB_phi","superClusters_EB_phi",360,-3.1415927,3.1415927); }
EBRecoSummary::~EBRecoSummary | ( | ) |
Definition at line 116 of file EBRecoSummary.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void EBRecoSummary::analyze | ( | const edm::Event & | ev, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 128 of file EBRecoSummary.cc.
References abs, basicClusterCollection_EB_, edm::SortedCollection< T, SORT >::begin(), EcalClusterTools::eBottom(), EcalClusterTools::eLeft(), jptDQMConfig_cff::eMax, edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, EcalClusterTools::eRight(), eta(), ethrEB_, EcalClusterTools::eTop(), funct::exp(), MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::SortedCollection< T, SORT >::find(), geometry, edm::EventSetup::get(), edm::Event::getByLabel(), h_basicClusters_recHits_EB_recoFlag, h_recHits_EB_Chi2, h_recHits_EB_E1oE4, h_recHits_EB_energyMax, h_recHits_EB_recoFlag, h_redRecHits_EB_recoFlag, h_superClusters_EB_E1oE4, h_superClusters_EB_nBC, h_superClusters_EB_phi, h_superClusters_eta, EBDetId::ieta(), edm::HandleBase::isValid(), phi, edm::ESHandle< T >::product(), edm::Handle< T >::product(), recHitCollection_EB_, redRecHitCollection_EB_, scEtThrEB_, funct::sin(), superClusterCollection_EB_, and EcalTools::swissCross().
{ //Get the magnetic field edm::ESHandle<MagneticField> theMagField; iSetup.get<IdealMagneticFieldRecord>().get(theMagField); // calo geometry edm::ESHandle<CaloGeometry> pGeometry; iSetup.get<CaloGeometryRecord>().get(pGeometry); const CaloGeometry *geometry = pGeometry.product(); // calo topology edm::ESHandle<CaloTopology> pTopology; iSetup.get<CaloTopologyRecord>().get(pTopology); const CaloTopology *topology = pTopology.product(); // --- REDUCED REC HITS ------------------------------------------------------------------------------------- edm::Handle<EcalRecHitCollection> redRecHitsEB; ev.getByLabel( redRecHitCollection_EB_, redRecHitsEB ); const EcalRecHitCollection* theBarrelEcalredRecHits = redRecHitsEB.product () ; if ( ! redRecHitsEB.isValid() ) { edm::LogWarning("EBRecoSummary") << "redRecHitsEB not found"; } for ( EcalRecHitCollection::const_iterator itr = theBarrelEcalredRecHits->begin () ; itr != theBarrelEcalredRecHits->end () ;++itr) { h_redRecHits_EB_recoFlag->Fill( itr -> recoFlag() ); } // --- REC HITS ------------------------------------------------------------------------------------- // ... barrel edm::Handle<EcalRecHitCollection> recHitsEB; ev.getByLabel( recHitCollection_EB_, recHitsEB ); const EcalRecHitCollection* theBarrelEcalRecHits = recHitsEB.product () ; if ( ! recHitsEB.isValid() ) { edm::LogWarning("EBRecoSummary") << "recHitsEB not found"; } float maxRecHitEnergyEB = -999.; EBDetId ebid_MrecHitEB; for ( EcalRecHitCollection::const_iterator itr = theBarrelEcalRecHits->begin () ; itr != theBarrelEcalRecHits->end () ;++itr) { EBDetId ebid( itr -> id() ); GlobalPoint mycell = geometry -> getPosition(DetId(itr->id())); h_recHits_EB_recoFlag -> Fill( itr -> recoFlag() ); // max E rec hit if (itr -> energy() > maxRecHitEnergyEB ){ maxRecHitEnergyEB = itr -> energy() ; } if ( itr -> energy() > ethrEB_ ){ h_recHits_EB_Chi2 -> Fill( itr -> chi2() ); } float R4 = EcalTools::swissCross( ebid, *theBarrelEcalRecHits, 0. ); if ( itr -> energy() > 3. && abs(ebid.ieta())!=85 ) h_recHits_EB_E1oE4-> Fill( R4 ); } h_recHits_EB_energyMax -> Fill( maxRecHitEnergyEB ); //--- BASIC CLUSTERS -------------------------------------------------------------- // ... barrel edm::Handle<reco::BasicClusterCollection> basicClusters_EB_h; ev.getByLabel( basicClusterCollection_EB_, basicClusters_EB_h ); const reco::BasicClusterCollection* theBarrelBasicClusters = basicClusters_EB_h.product () ; if ( ! basicClusters_EB_h.isValid() ) { edm::LogWarning("EBRecoSummary") << "basicClusters_EB_h not found"; } for (reco::BasicClusterCollection::const_iterator itBC = theBarrelBasicClusters->begin(); itBC != theBarrelBasicClusters->end(); ++itBC ) { //Get the associated RecHits const std::vector<std::pair<DetId,float> > & hits= itBC->hitsAndFractions(); for (std::vector<std::pair<DetId,float> > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){ EBRecHitCollection::const_iterator itrechit = theBarrelEcalRecHits->find((*rh).first); if (itrechit==theBarrelEcalRecHits->end()) continue; h_basicClusters_recHits_EB_recoFlag -> Fill ( itrechit -> recoFlag() ); } } // Super Clusters // ... barrel edm::Handle<reco::SuperClusterCollection> superClusters_EB_h; ev.getByLabel( superClusterCollection_EB_, superClusters_EB_h ); const reco::SuperClusterCollection* theBarrelSuperClusters = superClusters_EB_h.product () ; if ( ! superClusters_EB_h.isValid() ) { edm::LogWarning("EBRecoSummary") << "superClusters_EB_h not found"; } for (reco::SuperClusterCollection::const_iterator itSC = theBarrelSuperClusters->begin(); itSC != theBarrelSuperClusters->end(); ++itSC ) { double scEt = itSC -> energy() * sin(2.*atan( exp(- itSC->position().eta() ))); if (scEt < scEtThrEB_ ) continue; h_superClusters_EB_nBC -> Fill( itSC -> clustersSize()); h_superClusters_eta -> Fill( itSC -> eta() ); h_superClusters_EB_phi -> Fill( itSC -> phi() ); float E1 = EcalClusterTools::eMax ( *itSC, theBarrelEcalRecHits); float E4 = EcalClusterTools::eTop ( *itSC, theBarrelEcalRecHits, topology )+ EcalClusterTools::eRight ( *itSC, theBarrelEcalRecHits, topology )+ EcalClusterTools::eBottom( *itSC, theBarrelEcalRecHits, topology )+ EcalClusterTools::eLeft ( *itSC, theBarrelEcalRecHits, topology ); if ( E1 > 3. ) h_superClusters_EB_E1oE4 -> Fill( 1.- E4/E1); } }
void EBRecoSummary::beginJob | ( | void | ) | [private, virtual] |
void EBRecoSummary::convxtalid | ( | int & | , |
int & | |||
) | [private] |
int EBRecoSummary::diff_neta_s | ( | int | , |
int | |||
) | [private] |
int EBRecoSummary::diff_nphi_s | ( | int | , |
int | |||
) | [private] |
void EBRecoSummary::endJob | ( | void | ) | [private, virtual] |
Definition at line 94 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
DQMStore* EBRecoSummary::dqmStore_ [private] |
Definition at line 61 of file EBRecoSummary.h.
Referenced by EBRecoSummary().
double EBRecoSummary::ethrEB_ [protected] |
Definition at line 97 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 79 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
MonitorElement* EBRecoSummary::h_recHits_EB_Chi2 [private] |
Definition at line 74 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
MonitorElement* EBRecoSummary::h_recHits_EB_E1oE4 [private] |
Definition at line 75 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 73 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 76 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 69 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 84 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 83 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 87 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
MonitorElement* EBRecoSummary::h_superClusters_eta [private] |
Definition at line 86 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
std::string EBRecoSummary::prefixME_ [private] |
Definition at line 63 of file EBRecoSummary.h.
Referenced by EBRecoSummary().
edm::InputTag EBRecoSummary::recHitCollection_EB_ [protected] |
Definition at line 92 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
edm::InputTag EBRecoSummary::redRecHitCollection_EB_ [protected] |
Definition at line 93 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
double EBRecoSummary::scEtThrEB_ [protected] |
Definition at line 99 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().
Definition at line 95 of file EBRecoSummary.h.
Referenced by analyze(), and EBRecoSummary().