CMS 3D CMS Logo

EgammaBasicClusters Class Reference

Description: SVSuite Basic Cluster Validation. More...

#include <Validation/EcalClusters/interface/EgammaBasicClusters.h>

Inheritance diagram for EgammaBasicClusters:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (edm::EventSetup const &)
 EgammaBasicClusters (const edm::ParameterSet &)
virtual void endJob ()
 ~EgammaBasicClusters ()

Private Attributes

edm::InputTag barrelBasicClusterCollection_
std::string CMSSW_Version_
DQMStoredbe_
edm::InputTag endcapBasicClusterCollection_
int hist_bins_ET_
int hist_bins_Eta_
int hist_bins_NumRecHits_
int hist_bins_Phi_
int hist_bins_Size_
MonitorElementhist_EB_BC_ET_
MonitorElementhist_EB_BC_Eta_
MonitorElementhist_EB_BC_NumRecHits_
MonitorElementhist_EB_BC_Phi_
MonitorElementhist_EB_BC_Size_
MonitorElementhist_EE_BC_ET_
MonitorElementhist_EE_BC_Eta_
MonitorElementhist_EE_BC_NumRecHits_
MonitorElementhist_EE_BC_Phi_
MonitorElementhist_EE_BC_Size_
double hist_max_ET_
double hist_max_Eta_
double hist_max_NumRecHits_
double hist_max_Phi_
double hist_max_Size_
double hist_min_ET_
double hist_min_Eta_
double hist_min_NumRecHits_
double hist_min_Phi_
double hist_min_Size_
std::string outputFile_
bool verboseDBE_


Detailed Description

Description: SVSuite Basic Cluster Validation.

Implementation: \

Author:
: Michael A. Balazs, Nov 2006

Definition at line 25 of file EgammaBasicClusters.h.


Constructor & Destructor Documentation

EgammaBasicClusters::EgammaBasicClusters ( const edm::ParameterSet ps  )  [explicit]

Definition at line 12 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, CMSSW_Version_, endcapBasicClusterCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_Size_, hist_max_ET_, hist_max_Eta_, hist_max_NumRecHits_, hist_max_Phi_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_Size_, outputFile_, and verboseDBE_.

00013 {
00014         outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
00015         CMSSW_Version_ = ps.getUntrackedParameter<std::string>("CMSSW_Version", "");
00016 
00017         verboseDBE_ = ps.getUntrackedParameter<bool>("verboseDBE", false);
00018 
00019         hist_min_Size_ = ps.getParameter<double>("hist_min_Size");
00020         hist_max_Size_ = ps.getParameter<double>("hist_max_Size");
00021         hist_bins_Size_ = ps.getParameter<int>   ("hist_bins_Size");
00022 
00023         hist_min_NumRecHits_ = ps.getParameter<double>("hist_min_NumRecHits");
00024         hist_max_NumRecHits_ = ps.getParameter<double>("hist_max_NumRecHits");
00025         hist_bins_NumRecHits_ = ps.getParameter<int>   ("hist_bins_NumRecHits");
00026 
00027         hist_min_ET_ = ps.getParameter<double>("hist_min_ET");
00028         hist_max_ET_ = ps.getParameter<double>("hist_max_ET");
00029         hist_bins_ET_ = ps.getParameter<int>   ("hist_bins_ET");
00030 
00031         hist_min_Eta_ = ps.getParameter<double>("hist_min_Eta");
00032         hist_max_Eta_ = ps.getParameter<double>("hist_max_Eta");
00033         hist_bins_Eta_ = ps.getParameter<int>   ("hist_bins_Eta");
00034 
00035         hist_min_Phi_ = ps.getParameter<double>("hist_min_Phi");
00036         hist_max_Phi_ = ps.getParameter<double>("hist_max_Phi");
00037         hist_bins_Phi_ = ps.getParameter<int>   ("hist_bins_Phi");
00038 
00039         barrelBasicClusterCollection_ = ps.getParameter<edm::InputTag>("barrelBasicClusterCollection");
00040         endcapBasicClusterCollection_ = ps.getParameter<edm::InputTag>("endcapBasicClusterCollection");
00041 }

EgammaBasicClusters::~EgammaBasicClusters (  ) 

Definition at line 43 of file EgammaBasicClusters.cc.

00043 {}


Member Function Documentation

void EgammaBasicClusters::analyze ( const edm::Event evt,
const edm::EventSetup es 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 95 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), hist_EB_BC_ET_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_Eta_, hist_EE_BC_NumRecHits_, hist_EE_BC_Phi_, hist_EE_BC_Size_, edm::Handle< T >::isValid(), edm::InputTag::label(), and edm::Handle< T >::product().

00096 {
00097         edm::Handle<reco::BasicClusterCollection> pBarrelBasicClusters;
00098         evt.getByLabel(barrelBasicClusterCollection_, pBarrelBasicClusters);
00099         if (!pBarrelBasicClusters.isValid()) {
00100           edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " 
00101                                                << barrelBasicClusterCollection_.label();
00102         }
00103 
00104         const reco::BasicClusterCollection* barrelBasicClusters = pBarrelBasicClusters.product();
00105         hist_EB_BC_Size_->Fill(barrelBasicClusters->size());
00106 
00107         for(reco::BasicClusterCollection::const_iterator aClus = barrelBasicClusters->begin(); 
00108                 aClus != barrelBasicClusters->end(); aClus++)
00109         {
00110                 hist_EB_BC_NumRecHits_->Fill(aClus->getHitsByDetId().size());
00111                 hist_EB_BC_ET_->Fill(aClus->energy()*aClus->position().theta());
00112                 hist_EB_BC_Eta_->Fill(aClus->position().eta());
00113                 hist_EB_BC_Phi_->Fill(aClus->position().phi());
00114         }
00115 
00116         edm::Handle<reco::BasicClusterCollection> pEndcapBasicClusters;
00117 
00118         evt.getByLabel(endcapBasicClusterCollection_, pEndcapBasicClusters);
00119         if (!pEndcapBasicClusters.isValid()) {
00120           edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " 
00121                                                << endcapBasicClusterCollection_.label();
00122         }
00123 
00124         const reco::BasicClusterCollection* endcapBasicClusters = pEndcapBasicClusters.product();
00125         hist_EE_BC_Size_->Fill(endcapBasicClusters->size());
00126 
00127         for(reco::BasicClusterCollection::const_iterator aClus = endcapBasicClusters->begin(); 
00128                 aClus != endcapBasicClusters->end(); aClus++)
00129         {
00130                 hist_EE_BC_NumRecHits_->Fill(aClus->getHitsByDetId().size());
00131                 hist_EE_BC_ET_->Fill(aClus->energy()*aClus->position().theta());
00132                 hist_EE_BC_Eta_->Fill(aClus->position().eta());
00133                 hist_EE_BC_Phi_->Fill(aClus->position().phi());
00134         }
00135 }

void EgammaBasicClusters::beginJob ( edm::EventSetup const &   )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 45 of file EgammaBasicClusters.cc.

References DQMStore::book1D(), CMSSW_Version_, dbe_, hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_Size_, hist_EB_BC_ET_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_Eta_, hist_EE_BC_NumRecHits_, hist_EE_BC_Phi_, hist_EE_BC_Size_, hist_max_ET_, hist_max_Eta_, hist_max_NumRecHits_, hist_max_Phi_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_Size_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), and verboseDBE_.

00046 {
00047         dbe_ = edm::Service<DQMStore>().operator->();                   
00048 
00049         if ( verboseDBE_ )
00050         {
00051                 dbe_->setVerbose(1);
00052                 dbe_->showDirStructure();
00053         }
00054         else 
00055                 dbe_->setVerbose(0);
00056 
00057         dbe_->setCurrentFolder("EcalClustersV/CMSSW_"+CMSSW_Version_+"/EcalClusters/BasicClusters/");
00058 
00059         hist_EB_BC_Size_ 
00060                 = dbe_->book1D("hist_EB_BC_Size_","# Basic Clusters in Barrel",
00061                         hist_bins_Size_,hist_min_Size_,hist_max_Size_);
00062         hist_EE_BC_Size_ 
00063                 = dbe_->book1D("hist_EE_BC_Size_","# Basic Clusters in Endcap",
00064                         hist_bins_Size_,hist_min_Size_,hist_max_Size_);
00065 
00066         hist_EB_BC_NumRecHits_ 
00067                 = dbe_->book1D("hist_EB_BC_NumRecHits_","# of RecHits in Basic Clusters in Barrel",
00068                         hist_bins_NumRecHits_,hist_min_NumRecHits_,hist_max_NumRecHits_);
00069         hist_EE_BC_NumRecHits_ 
00070                 = dbe_->book1D("hist_EE_BC_NumRecHits_","# of RecHits in Basic Clusters in Endcap",
00071                         hist_bins_NumRecHits_,hist_min_NumRecHits_,hist_max_NumRecHits_);
00072 
00073         hist_EB_BC_ET_ 
00074                 = dbe_->book1D("hist_EB_BC_ET_","ET of Basic Clusters in Barrel",
00075                         hist_bins_ET_,hist_min_ET_,hist_max_ET_);
00076         hist_EE_BC_ET_ 
00077                 = dbe_->book1D("hist_EE_BC_ET_","ET of Basic Clusters in Endcap",
00078                         hist_bins_ET_,hist_min_ET_,hist_max_ET_);
00079 
00080         hist_EB_BC_Eta_ 
00081                 = dbe_->book1D("hist_EB_BC_Eta_","Eta of Basic Clusters in Barrel",
00082                         hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
00083         hist_EE_BC_Eta_ 
00084                 = dbe_->book1D("hist_EE_BC_Eta_","Eta of Basic Clusters in Endcap",
00085                         hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
00086 
00087         hist_EB_BC_Phi_
00088                 = dbe_->book1D("hist_EB_BC_Phi_","Phi of Basic Clusters in Barrel",
00089                         hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
00090         hist_EE_BC_Phi_ 
00091                 = dbe_->book1D("hist_EE_BC_Phi_","Phi of Basic Clusters in Endcap",
00092                         hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
00093 }

void EgammaBasicClusters::endJob ( void   )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 137 of file EgammaBasicClusters.cc.

References dbe_, outputFile_, and DQMStore::save().

00138 {
00139         if (outputFile_.size() != 0 && dbe_) dbe_->save(outputFile_);
00140 }


Member Data Documentation

edm::InputTag EgammaBasicClusters::barrelBasicClusterCollection_ [private]

Definition at line 42 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

std::string EgammaBasicClusters::CMSSW_Version_ [private]

Definition at line 37 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

DQMStore* EgammaBasicClusters::dbe_ [private]

Definition at line 40 of file EgammaBasicClusters.h.

Referenced by beginJob(), and endJob().

edm::InputTag EgammaBasicClusters::endcapBasicClusterCollection_ [private]

Definition at line 43 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_ET_ [private]

Definition at line 64 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Eta_ [private]

Definition at line 71 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_NumRecHits_ [private]

Definition at line 57 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Phi_ [private]

Definition at line 78 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Size_ [private]

Definition at line 50 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_ [private]

Definition at line 59 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Eta_ [private]

Definition at line 66 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_NumRecHits_ [private]

Definition at line 52 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Phi_ [private]

Definition at line 73 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Size_ [private]

Definition at line 45 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_ [private]

Definition at line 60 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Eta_ [private]

Definition at line 67 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_NumRecHits_ [private]

Definition at line 53 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Phi_ [private]

Definition at line 74 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Size_ [private]

Definition at line 46 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

double EgammaBasicClusters::hist_max_ET_ [private]

Definition at line 63 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Eta_ [private]

Definition at line 70 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_NumRecHits_ [private]

Definition at line 56 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Phi_ [private]

Definition at line 77 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Size_ [private]

Definition at line 49 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_ET_ [private]

Definition at line 62 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Eta_ [private]

Definition at line 69 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_NumRecHits_ [private]

Definition at line 55 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Phi_ [private]

Definition at line 76 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Size_ [private]

Definition at line 48 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

std::string EgammaBasicClusters::outputFile_ [private]

Definition at line 36 of file EgammaBasicClusters.h.

Referenced by EgammaBasicClusters(), and endJob().

bool EgammaBasicClusters::verboseDBE_ [private]

Definition at line 39 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:09 2009 for CMSSW by  doxygen 1.5.4