CMS 3D CMS Logo

Public Member Functions | Private Attributes

EgammaBasicClusters Class Reference

#include <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 ()
 EgammaBasicClusters (const edm::ParameterSet &)
virtual void endJob ()
 ~EgammaBasicClusters ()

Private Attributes

edm::InputTag barrelBasicClusterCollection_
DQMStoredbe_
edm::InputTag endcapBasicClusterCollection_
int hist_bins_ET_
int hist_bins_Eta_
int hist_bins_NumRecHits_
int hist_bins_Phi_
int hist_bins_R_
int hist_bins_Size_
MonitorElementhist_EB_BC_ET_
MonitorElementhist_EB_BC_ET_vs_Eta_
MonitorElementhist_EB_BC_ET_vs_Phi_
MonitorElementhist_EB_BC_Eta_
MonitorElementhist_EB_BC_NumRecHits_
MonitorElementhist_EB_BC_Phi_
MonitorElementhist_EB_BC_Size_
MonitorElementhist_EE_BC_ET_
MonitorElementhist_EE_BC_ET_vs_Eta_
MonitorElementhist_EE_BC_ET_vs_Phi_
MonitorElementhist_EE_BC_ET_vs_R_
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_R_
double hist_max_Size_
double hist_min_ET_
double hist_min_Eta_
double hist_min_NumRecHits_
double hist_min_Phi_
double hist_min_R_
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_, endcapBasicClusterCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_R_, hist_bins_Size_, hist_max_ET_, hist_max_Eta_, hist_max_NumRecHits_, hist_max_Phi_, hist_max_R_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_R_, hist_min_Size_, outputFile_, and verboseDBE_.

{
        outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
        //CMSSW_Version_ = ps.getUntrackedParameter<std::string>("CMSSW_Version", "");

        verboseDBE_ = ps.getUntrackedParameter<bool>("verboseDBE", false);

        hist_min_Size_ = ps.getParameter<double>("hist_min_Size");
        hist_max_Size_ = ps.getParameter<double>("hist_max_Size");
        hist_bins_Size_ = ps.getParameter<int>   ("hist_bins_Size");

        hist_min_NumRecHits_ = ps.getParameter<double>("hist_min_NumRecHits");
        hist_max_NumRecHits_ = ps.getParameter<double>("hist_max_NumRecHits");
        hist_bins_NumRecHits_ = ps.getParameter<int>   ("hist_bins_NumRecHits");

        hist_min_ET_ = ps.getParameter<double>("hist_min_ET");
        hist_max_ET_ = ps.getParameter<double>("hist_max_ET");
        hist_bins_ET_ = ps.getParameter<int>   ("hist_bins_ET");

        hist_min_Eta_ = ps.getParameter<double>("hist_min_Eta");
        hist_max_Eta_ = ps.getParameter<double>("hist_max_Eta");
        hist_bins_Eta_ = ps.getParameter<int>   ("hist_bins_Eta");

        hist_min_Phi_ = ps.getParameter<double>("hist_min_Phi");
        hist_max_Phi_ = ps.getParameter<double>("hist_max_Phi");
        hist_bins_Phi_ = ps.getParameter<int>   ("hist_bins_Phi");

        hist_min_R_ = ps.getParameter<double>("hist_min_R");
        hist_max_R_ = ps.getParameter<double>("hist_max_R");
        hist_bins_R_ = ps.getParameter<int>   ("hist_bins_R");

        barrelBasicClusterCollection_ = ps.getParameter<edm::InputTag>("barrelBasicClusterCollection");
        endcapBasicClusterCollection_ = ps.getParameter<edm::InputTag>("endcapBasicClusterCollection");
}
EgammaBasicClusters::~EgammaBasicClusters ( )

Definition at line 47 of file EgammaBasicClusters.cc.

{}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 124 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), hist_EB_BC_ET_, hist_EB_BC_ET_vs_Eta_, hist_EB_BC_ET_vs_Phi_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_ET_vs_Eta_, hist_EE_BC_ET_vs_Phi_, hist_EE_BC_ET_vs_R_, hist_EE_BC_Eta_, hist_EE_BC_NumRecHits_, hist_EE_BC_Phi_, hist_EE_BC_Size_, edm::HandleBase::isValid(), edm::InputTag::label(), funct::pow(), edm::Handle< T >::product(), and mathSSE::sqrt().

{
        edm::Handle<reco::BasicClusterCollection> pBarrelBasicClusters;
        evt.getByLabel(barrelBasicClusterCollection_, pBarrelBasicClusters);
        if (!pBarrelBasicClusters.isValid()) {
          edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " 
                                               << barrelBasicClusterCollection_.label();
        }

        const reco::BasicClusterCollection* barrelBasicClusters = pBarrelBasicClusters.product();
        hist_EB_BC_Size_->Fill(barrelBasicClusters->size());

        for(reco::BasicClusterCollection::const_iterator aClus = barrelBasicClusters->begin(); 
                aClus != barrelBasicClusters->end(); aClus++)
        {
                hist_EB_BC_NumRecHits_->Fill(aClus->size());
                hist_EB_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EB_BC_Eta_->Fill(aClus->position().eta());
                hist_EB_BC_Phi_->Fill(aClus->position().phi());
                
                hist_EB_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
                hist_EB_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
        }

        edm::Handle<reco::BasicClusterCollection> pEndcapBasicClusters;

        evt.getByLabel(endcapBasicClusterCollection_, pEndcapBasicClusters);
        if (!pEndcapBasicClusters.isValid()) {
          edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " 
                                               << endcapBasicClusterCollection_.label();
        }

        const reco::BasicClusterCollection* endcapBasicClusters = pEndcapBasicClusters.product();
        hist_EE_BC_Size_->Fill(endcapBasicClusters->size());

        for(reco::BasicClusterCollection::const_iterator aClus = endcapBasicClusters->begin(); 
                aClus != endcapBasicClusters->end(); aClus++)
        {
                hist_EE_BC_NumRecHits_->Fill(aClus->size());
                hist_EE_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EE_BC_Eta_->Fill(aClus->position().eta());
                hist_EE_BC_Phi_->Fill(aClus->position().phi());

                hist_EE_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
                hist_EE_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
                hist_EE_BC_ET_vs_R_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), 
                                           std::sqrt( std::pow(aClus->x(),2) + std::pow(aClus->y(),2) ) );

        }
}
void EgammaBasicClusters::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file EgammaBasicClusters.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_R_, hist_bins_Size_, hist_EB_BC_ET_, hist_EB_BC_ET_vs_Eta_, hist_EB_BC_ET_vs_Phi_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_ET_vs_Eta_, hist_EE_BC_ET_vs_Phi_, hist_EE_BC_ET_vs_R_, 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_R_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_R_, hist_min_Size_, cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), and verboseDBE_.

{
        dbe_ = edm::Service<DQMStore>().operator->();                   

        if ( verboseDBE_ )
        {
                dbe_->setVerbose(1);
                dbe_->showDirStructure();
        }
        else 
                dbe_->setVerbose(0);

        //dbe_->setCurrentFolder("Ecal/CMSSW_"+CMSSW_Version_+"/EcalClusters/BasicClusters/");
        dbe_->setCurrentFolder("EcalClusterV/EcalBasicClusters/");

        hist_EB_BC_Size_ 
                = dbe_->book1D("hist_EB_BC_Size_","# Basic Clusters in Barrel",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);
        hist_EE_BC_Size_ 
                = dbe_->book1D("hist_EE_BC_Size_","# Basic Clusters in Endcap",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);

        hist_EB_BC_NumRecHits_ 
                = dbe_->book1D("hist_EB_BC_NumRecHits_","# of RecHits in Basic Clusters in Barrel",
                        hist_bins_NumRecHits_,hist_min_NumRecHits_,hist_max_NumRecHits_);
        hist_EE_BC_NumRecHits_ 
                = dbe_->book1D("hist_EE_BC_NumRecHits_","# of RecHits in Basic Clusters in Endcap",
                        hist_bins_NumRecHits_,hist_min_NumRecHits_,hist_max_NumRecHits_);

        hist_EB_BC_ET_ 
                = dbe_->book1D("hist_EB_BC_ET_","ET of Basic Clusters in Barrel",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);
        hist_EE_BC_ET_ 
                = dbe_->book1D("hist_EE_BC_ET_","ET of Basic Clusters in Endcap",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);

        hist_EB_BC_Eta_ 
                = dbe_->book1D("hist_EB_BC_Eta_","Eta of Basic Clusters in Barrel",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
        hist_EE_BC_Eta_ 
                = dbe_->book1D("hist_EE_BC_Eta_","Eta of Basic Clusters in Endcap",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);

        hist_EB_BC_Phi_
                = dbe_->book1D("hist_EB_BC_Phi_","Phi of Basic Clusters in Barrel",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
        hist_EE_BC_Phi_ 
                = dbe_->book1D("hist_EE_BC_Phi_","Phi of Basic Clusters in Endcap",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);

        
        hist_EB_BC_ET_vs_Eta_ = dbe_->book2D( "hist_EB_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Barrel", 
                                              hist_bins_ET_, hist_min_ET_, hist_max_ET_,
                                              hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_ );

        hist_EB_BC_ET_vs_Phi_ = dbe_->book2D( "hist_EB_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Barrel", 
                                              hist_bins_ET_, hist_min_ET_, hist_max_ET_,
                                              hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_ );

        hist_EE_BC_ET_vs_Eta_ = dbe_->book2D( "hist_EE_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Endcap", 
                                              hist_bins_ET_, hist_min_ET_, hist_max_ET_,
                                              hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_ );

        hist_EE_BC_ET_vs_Phi_ = dbe_->book2D( "hist_EE_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Endcap", 
                                              hist_bins_ET_, hist_min_ET_, hist_max_ET_,
                                              hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_ );

        hist_EE_BC_ET_vs_R_ = dbe_->book2D( "hist_EE_BC_ET_vs_R_", "Basic Cluster ET versus Radius in Endcap", 
                                              hist_bins_ET_, hist_min_ET_, hist_max_ET_,
                                              hist_bins_R_,hist_min_R_,hist_max_R_ );



}
void EgammaBasicClusters::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 175 of file EgammaBasicClusters.cc.

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

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

Member Data Documentation

Definition at line 42 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

Definition at line 40 of file EgammaBasicClusters.h.

Referenced by beginJob(), and endJob().

Definition at line 43 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

Definition at line 64 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 71 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 57 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 78 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 82 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 50 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 59 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 84 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 85 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 66 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 52 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 73 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 45 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 60 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 87 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 88 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 89 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 67 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 53 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 74 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 46 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 63 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 70 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 56 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 77 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 81 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 49 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 62 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 69 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 55 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 76 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

Definition at line 80 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

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().

Definition at line 39 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().