CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

EgammaSuperClusters Class Reference

#include <EgammaSuperClusters.h>

Inheritance diagram for EgammaSuperClusters:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Private Member Functions

void closestMCParticle (const HepMC::GenEvent *genEvent, const reco::SuperCluster &sc, double &dRClosest, double &energyClosest)
float ecalEta (float EtaParticle, float Zvertex, float plane_Radius)

Private Attributes

edm::InputTag barrelCorSuperClusterCollection_
edm::InputTag barrelRawSuperClusterCollection_
edm::InputTag barrelRecHitCollection_
DQMStoredbe_
edm::InputTag endcapCorSuperClusterCollection_
edm::InputTag endcapPreSuperClusterCollection_
edm::InputTag endcapRawSuperClusterCollection_
edm::InputTag endcapRecHitCollection_
int hist_bins_deltaR_
int hist_bins_EoverTruth_
int hist_bins_ET_
int hist_bins_Eta_
int hist_bins_etaWidth_
int hist_bins_NumBC_
int hist_bins_Phi_
int hist_bins_phiWidth_
int hist_bins_preshowerE_
int hist_bins_R_
int hist_bins_S1toS9_
int hist_bins_S25toE_
int hist_bins_Size_
MonitorElementhist_EB_CorSC_deltaR_
MonitorElementhist_EB_CorSC_EoverTruth_
MonitorElementhist_EB_CorSC_ET_
MonitorElementhist_EB_CorSC_ET_vs_Eta_
MonitorElementhist_EB_CorSC_ET_vs_Phi_
MonitorElementhist_EB_CorSC_Eta_
MonitorElementhist_EB_CorSC_etaWidth_
MonitorElementhist_EB_CorSC_NumBC_
MonitorElementhist_EB_CorSC_Phi_
MonitorElementhist_EB_CorSC_phiWidth_
MonitorElementhist_EB_CorSC_S1toS9_
MonitorElementhist_EB_CorSC_S25toE_
MonitorElementhist_EB_CorSC_Size_
MonitorElementhist_EB_RawSC_deltaR_
MonitorElementhist_EB_RawSC_EoverTruth_
MonitorElementhist_EB_RawSC_ET_
MonitorElementhist_EB_RawSC_Eta_
MonitorElementhist_EB_RawSC_NumBC_
MonitorElementhist_EB_RawSC_Phi_
MonitorElementhist_EB_RawSC_S1toS9_
MonitorElementhist_EB_RawSC_S25toE_
MonitorElementhist_EB_RawSC_Size_
MonitorElementhist_EE_CorSC_deltaR_
MonitorElementhist_EE_CorSC_EoverTruth_
MonitorElementhist_EE_CorSC_ET_
MonitorElementhist_EE_CorSC_ET_vs_Eta_
MonitorElementhist_EE_CorSC_ET_vs_Phi_
MonitorElementhist_EE_CorSC_ET_vs_R_
MonitorElementhist_EE_CorSC_Eta_
MonitorElementhist_EE_CorSC_etaWidth_
MonitorElementhist_EE_CorSC_NumBC_
MonitorElementhist_EE_CorSC_Phi_
MonitorElementhist_EE_CorSC_phiWidth_
MonitorElementhist_EE_CorSC_preshowerE_
MonitorElementhist_EE_CorSC_S1toS9_
MonitorElementhist_EE_CorSC_S25toE_
MonitorElementhist_EE_CorSC_Size_
MonitorElementhist_EE_PreSC_deltaR_
MonitorElementhist_EE_PreSC_EoverTruth_
MonitorElementhist_EE_PreSC_ET_
MonitorElementhist_EE_PreSC_Eta_
MonitorElementhist_EE_PreSC_NumBC_
MonitorElementhist_EE_PreSC_Phi_
MonitorElementhist_EE_PreSC_preshowerE_
MonitorElementhist_EE_PreSC_S1toS9_
MonitorElementhist_EE_PreSC_S25toE_
MonitorElementhist_EE_PreSC_Size_
MonitorElementhist_EE_RawSC_deltaR_
MonitorElementhist_EE_RawSC_EoverTruth_
MonitorElementhist_EE_RawSC_ET_
MonitorElementhist_EE_RawSC_Eta_
MonitorElementhist_EE_RawSC_NumBC_
MonitorElementhist_EE_RawSC_Phi_
MonitorElementhist_EE_RawSC_S1toS9_
MonitorElementhist_EE_RawSC_S25toE_
MonitorElementhist_EE_RawSC_Size_
double hist_max_deltaR_
double hist_max_EoverTruth_
double hist_max_ET_
double hist_max_Eta_
double hist_max_etaWidth_
double hist_max_NumBC_
double hist_max_Phi_
double hist_max_phiWidth_
double hist_max_preshowerE_
double hist_max_R_
double hist_max_S1toS9_
double hist_max_S25toE_
double hist_max_Size_
double hist_min_deltaR_
double hist_min_EoverTruth_
double hist_min_ET_
double hist_min_Eta_
double hist_min_etaWidth_
double hist_min_NumBC_
double hist_min_Phi_
double hist_min_phiWidth_
double hist_min_preshowerE_
double hist_min_R_
double hist_min_S1toS9_
double hist_min_S25toE_
double hist_min_Size_
edm::InputTag MCTruthCollection_
std::string outputFile_
bool verboseDBE_

Detailed Description

Description: SVSuite Super Cluster Validation

Implementation: \

Author:
: Michael A. Balazs, Nov 2006

Definition at line 28 of file EgammaSuperClusters.h.


Constructor & Destructor Documentation

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

Definition at line 17 of file EgammaSuperClusters.cc.

References barrelCorSuperClusterCollection_, barrelRawSuperClusterCollection_, barrelRecHitCollection_, endcapCorSuperClusterCollection_, endcapPreSuperClusterCollection_, endcapRawSuperClusterCollection_, endcapRecHitCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hist_bins_deltaR_, hist_bins_EoverTruth_, hist_bins_ET_, hist_bins_Eta_, hist_bins_etaWidth_, hist_bins_NumBC_, hist_bins_Phi_, hist_bins_phiWidth_, hist_bins_preshowerE_, hist_bins_R_, hist_bins_S1toS9_, hist_bins_S25toE_, hist_bins_Size_, hist_max_deltaR_, hist_max_EoverTruth_, hist_max_ET_, hist_max_Eta_, hist_max_etaWidth_, hist_max_NumBC_, hist_max_Phi_, hist_max_phiWidth_, hist_max_preshowerE_, hist_max_R_, hist_max_S1toS9_, hist_max_S25toE_, hist_max_Size_, hist_min_deltaR_, hist_min_EoverTruth_, hist_min_ET_, hist_min_Eta_, hist_min_etaWidth_, hist_min_NumBC_, hist_min_Phi_, hist_min_phiWidth_, hist_min_preshowerE_, hist_min_R_, hist_min_S1toS9_, hist_min_S25toE_, hist_min_Size_, MCTruthCollection_, 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_NumBC_ = ps.getParameter<double>("hist_min_NumBC");
        hist_max_NumBC_ = ps.getParameter<double>("hist_max_NumBC");
        hist_bins_NumBC_ = ps.getParameter<int>   ("hist_bins_NumBC");

        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_S1toS9_ = ps.getParameter<double>("hist_min_S1toS9");
        hist_max_S1toS9_ = ps.getParameter<double>("hist_max_S1toS9");
        hist_bins_S1toS9_ = ps.getParameter<int>   ("hist_bins_S1toS9");

        hist_min_S25toE_ = ps.getParameter<double>("hist_min_S25toE");
        hist_max_S25toE_ = ps.getParameter<double>("hist_max_S25toE");
        hist_bins_S25toE_ = ps.getParameter<int>   ("hist_bins_S25toE");

        hist_min_EoverTruth_ = ps.getParameter<double>("hist_min_EoverTruth");
        hist_max_EoverTruth_ = ps.getParameter<double>("hist_max_EoverTruth");
        hist_bins_EoverTruth_ = ps.getParameter<int>   ("hist_bins_EoverTruth");
        
        hist_min_deltaR_ = ps.getParameter<double>("hist_min_deltaR");
        hist_max_deltaR_ = ps.getParameter<double>("hist_max_deltaR");
        hist_bins_deltaR_ = ps.getParameter<int>   ("hist_bins_deltaR");

        hist_min_phiWidth_ = ps.getParameter<double>("hist_min_phiWidth");
        hist_max_phiWidth_ = ps.getParameter<double>("hist_max_phiWidth");
        hist_bins_phiWidth_ = ps.getParameter<int>("hist_bins_phiWidth");

        hist_min_etaWidth_ = ps.getParameter<double>("hist_min_etaWidth");
        hist_max_etaWidth_ = ps.getParameter<double>("hist_max_etaWidth");
        hist_bins_etaWidth_ = ps.getParameter<int>("hist_bins_etaWidth");

        hist_bins_preshowerE_ = ps.getParameter<int>("hist_bins_preshowerE");
        hist_min_preshowerE_ = ps.getParameter<double>("hist_min_preshowerE");
        hist_max_preshowerE_ = ps.getParameter<double>("hist_max_preshowerE");

        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");

        MCTruthCollection_ = ps.getParameter<edm::InputTag>("MCTruthCollection");

        barrelRawSuperClusterCollection_ = ps.getParameter<edm::InputTag>("barrelRawSuperClusterCollection");
        barrelCorSuperClusterCollection_ = ps.getParameter<edm::InputTag>("barrelCorSuperClusterCollection");

        endcapRawSuperClusterCollection_ = ps.getParameter<edm::InputTag>("endcapRawSuperClusterCollection");
        endcapPreSuperClusterCollection_ = ps.getParameter<edm::InputTag>("endcapPreSuperClusterCollection");
        endcapCorSuperClusterCollection_ = ps.getParameter<edm::InputTag>("endcapCorSuperClusterCollection");

        barrelRecHitCollection_ = ps.getParameter<edm::InputTag>("barrelRecHitCollection");
        endcapRecHitCollection_ = ps.getParameter<edm::InputTag>("endcapRecHitCollection");
}
EgammaSuperClusters::~EgammaSuperClusters ( )

Definition at line 89 of file EgammaSuperClusters.cc.

{}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 318 of file EgammaSuperClusters.cc.

References barrelCorSuperClusterCollection_, barrelRawSuperClusterCollection_, barrelRecHitCollection_, closestMCParticle(), EcalClusterLazyTools::e3x3(), EcalClusterLazyTools::e5x5(), EcalClusterLazyTools::eMax(), endcapCorSuperClusterCollection_, endcapPreSuperClusterCollection_, endcapRawSuperClusterCollection_, endcapRecHitCollection_, MonitorElement::Fill(), MCTruth::genEvent, edm::Event::getByLabel(), hist_EB_CorSC_deltaR_, hist_EB_CorSC_EoverTruth_, hist_EB_CorSC_ET_, hist_EB_CorSC_ET_vs_Eta_, hist_EB_CorSC_ET_vs_Phi_, hist_EB_CorSC_Eta_, hist_EB_CorSC_etaWidth_, hist_EB_CorSC_NumBC_, hist_EB_CorSC_Phi_, hist_EB_CorSC_phiWidth_, hist_EB_CorSC_S1toS9_, hist_EB_CorSC_S25toE_, hist_EB_CorSC_Size_, hist_EB_RawSC_deltaR_, hist_EB_RawSC_EoverTruth_, hist_EB_RawSC_ET_, hist_EB_RawSC_Eta_, hist_EB_RawSC_NumBC_, hist_EB_RawSC_Phi_, hist_EB_RawSC_S1toS9_, hist_EB_RawSC_S25toE_, hist_EB_RawSC_Size_, hist_EE_CorSC_deltaR_, hist_EE_CorSC_EoverTruth_, hist_EE_CorSC_ET_, hist_EE_CorSC_ET_vs_Eta_, hist_EE_CorSC_ET_vs_Phi_, hist_EE_CorSC_ET_vs_R_, hist_EE_CorSC_Eta_, hist_EE_CorSC_etaWidth_, hist_EE_CorSC_NumBC_, hist_EE_CorSC_Phi_, hist_EE_CorSC_phiWidth_, hist_EE_CorSC_preshowerE_, hist_EE_CorSC_S1toS9_, hist_EE_CorSC_S25toE_, hist_EE_CorSC_Size_, hist_EE_PreSC_deltaR_, hist_EE_PreSC_EoverTruth_, hist_EE_PreSC_ET_, hist_EE_PreSC_Eta_, hist_EE_PreSC_NumBC_, hist_EE_PreSC_Phi_, hist_EE_PreSC_preshowerE_, hist_EE_PreSC_S1toS9_, hist_EE_PreSC_S25toE_, hist_EE_PreSC_Size_, hist_EE_RawSC_deltaR_, hist_EE_RawSC_EoverTruth_, hist_EE_RawSC_ET_, hist_EE_RawSC_Eta_, hist_EE_RawSC_NumBC_, hist_EE_RawSC_Phi_, hist_EE_RawSC_S1toS9_, hist_EE_RawSC_S25toE_, hist_EE_RawSC_Size_, edm::HandleBase::isValid(), edm::InputTag::label(), MCTruthCollection_, funct::pow(), edm::Handle< T >::product(), and mathSSE::sqrt().

{

        bool skipMC = false;
        bool skipBarrel = false;
        bool skipEndcap = false;

        //
        // Get MCTRUTH
        //
        edm::Handle<edm::HepMCProduct> pMCTruth ;
        evt.getByLabel(MCTruthCollection_, pMCTruth);
        if (!pMCTruth.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label "
                                               << MCTruthCollection_.label();
          skipMC = true;
        }
        const HepMC::GenEvent* genEvent = pMCTruth->GetEvent();

        if( skipMC ) return;

        //
        // Get the BARREL products 
        //
        edm::Handle<reco::SuperClusterCollection> pBarrelRawSuperClusters;
        evt.getByLabel(barrelRawSuperClusterCollection_, pBarrelRawSuperClusters);
        if (!pBarrelRawSuperClusters.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label " 
                                               << barrelRawSuperClusterCollection_.label();
          skipBarrel = true;
        }

        edm::Handle<reco::SuperClusterCollection> pBarrelCorSuperClusters;
        evt.getByLabel(barrelCorSuperClusterCollection_, pBarrelCorSuperClusters);
        if (!pBarrelCorSuperClusters.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label "
                                               << barrelCorSuperClusterCollection_.label();
          skipBarrel = true;
        }

        edm::Handle< EBRecHitCollection > pBarrelRecHitCollection;
        evt.getByLabel( barrelRecHitCollection_, pBarrelRecHitCollection );
        if ( ! pBarrelRecHitCollection.isValid() ) {
          skipBarrel = true;
        }
        edm::Handle< EERecHitCollection > pEndcapRecHitCollection;
        evt.getByLabel( endcapRecHitCollection_, pEndcapRecHitCollection );
        if ( ! pEndcapRecHitCollection.isValid() ) {
          skipEndcap = true;
        }

        if( skipBarrel || skipEndcap ) return;

        EcalClusterLazyTools lazyTool( evt, es, barrelRecHitCollection_, endcapRecHitCollection_ );

        // Get the BARREL collections        
        const reco::SuperClusterCollection* barrelRawSuperClusters = pBarrelRawSuperClusters.product();
        const reco::SuperClusterCollection* barrelCorSuperClusters = pBarrelCorSuperClusters.product();

        // Number of entries in collections
        hist_EB_RawSC_Size_->Fill(barrelRawSuperClusters->size());
        hist_EB_CorSC_Size_->Fill(barrelCorSuperClusters->size());

        // Do RAW BARREL SuperClusters
        for(reco::SuperClusterCollection::const_iterator aClus = barrelRawSuperClusters->begin(); 
                aClus != barrelRawSuperClusters->end(); aClus++)
        {
                // kinematics
                hist_EB_RawSC_NumBC_->Fill(aClus->clustersSize());
                hist_EB_RawSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EB_RawSC_Eta_->Fill(aClus->position().eta());
                hist_EB_RawSC_Phi_->Fill(aClus->position().phi());

                // cluster shape
                const reco::CaloClusterPtr seed = aClus->seed();
                hist_EB_RawSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
                hist_EB_RawSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );

                // truth
                double dRClosest = 999.9;
                double energyClosest = 0;
                closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);

                if (dRClosest < 0.1)
                {
                        hist_EB_RawSC_EoverTruth_->Fill(aClus->energy()/energyClosest);         
                        hist_EB_RawSC_deltaR_->Fill(dRClosest);

                }

        }

        // Do CORRECTED BARREL SuperClusters
        for(reco::SuperClusterCollection::const_iterator aClus = barrelCorSuperClusters->begin();
                aClus != barrelCorSuperClusters->end(); aClus++)
        {
                // kinematics
                hist_EB_CorSC_NumBC_->Fill(aClus->clustersSize());
                hist_EB_CorSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EB_CorSC_Eta_->Fill(aClus->position().eta());
                hist_EB_CorSC_Phi_->Fill(aClus->position().phi());

                hist_EB_CorSC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
                hist_EB_CorSC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );


                // cluster shape
                const reco::CaloClusterPtr seed = aClus->seed();
                hist_EB_CorSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
                hist_EB_CorSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );

                // correction variables
                hist_EB_CorSC_phiWidth_->Fill(aClus->phiWidth());
                hist_EB_CorSC_etaWidth_->Fill(aClus->etaWidth());

                // truth
                double dRClosest = 999.9;
                double energyClosest = 0;
                closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);

                if (dRClosest < 0.1)
                {
                        hist_EB_CorSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
                        hist_EB_CorSC_deltaR_->Fill(dRClosest);

                }

        }

        //
        // Get the ENDCAP products
        //
        edm::Handle<reco::SuperClusterCollection> pEndcapRawSuperClusters;
        evt.getByLabel(endcapRawSuperClusterCollection_, pEndcapRawSuperClusters);
        if (!pEndcapRawSuperClusters.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label " 
                                               << endcapRawSuperClusterCollection_.label();
        }

        edm::Handle<reco::SuperClusterCollection> pEndcapPreSuperClusters;
        evt.getByLabel(endcapPreSuperClusterCollection_, pEndcapPreSuperClusters);
        if (!pEndcapPreSuperClusters.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label "
                                               << endcapPreSuperClusterCollection_.label();
        }

        edm::Handle<reco::SuperClusterCollection> pEndcapCorSuperClusters;
        evt.getByLabel(endcapCorSuperClusterCollection_, pEndcapCorSuperClusters);
        if (!pEndcapCorSuperClusters.isValid()) {
          edm::LogError("EgammaSuperClusters") << "Error! can't get collection with label "
                                               << endcapCorSuperClusterCollection_.label();
        }

        // Get the ENDCAP collections
        const reco::SuperClusterCollection* endcapRawSuperClusters = pEndcapRawSuperClusters.product();
        const reco::SuperClusterCollection* endcapPreSuperClusters = pEndcapPreSuperClusters.product();
        const reco::SuperClusterCollection* endcapCorSuperClusters = pEndcapCorSuperClusters.product();

        // Number of entries in collections
        hist_EE_RawSC_Size_->Fill(endcapRawSuperClusters->size());
        hist_EE_PreSC_Size_->Fill(endcapPreSuperClusters->size());
        hist_EE_CorSC_Size_->Fill(endcapCorSuperClusters->size());

        // Do RAW ENDCAP SuperClusters
        for(reco::SuperClusterCollection::const_iterator aClus = endcapRawSuperClusters->begin(); 
                aClus != endcapRawSuperClusters->end(); aClus++)
        {
                hist_EE_RawSC_NumBC_->Fill(aClus->clustersSize());
                hist_EE_RawSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EE_RawSC_Eta_->Fill(aClus->position().eta());
                hist_EE_RawSC_Phi_->Fill(aClus->position().phi());

                const reco::CaloClusterPtr seed = aClus->seed();
                hist_EE_RawSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
                hist_EE_RawSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );

                // truth
                double dRClosest = 999.9;
                double energyClosest = 0;
                closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);

                if (dRClosest < 0.1)
                {
                        hist_EE_RawSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
                        hist_EE_RawSC_deltaR_->Fill(dRClosest);
                }

        }

        // Do ENDCAP SuperClusters with PRESHOWER
        for(reco::SuperClusterCollection::const_iterator aClus = endcapPreSuperClusters->begin();
                aClus != endcapPreSuperClusters->end(); aClus++)
        {
                hist_EE_PreSC_NumBC_->Fill(aClus->clustersSize());
                hist_EE_PreSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EE_PreSC_Eta_->Fill(aClus->position().eta());
                hist_EE_PreSC_Phi_->Fill(aClus->position().phi());
                hist_EE_PreSC_preshowerE_->Fill(aClus->preshowerEnergy());

                const reco::CaloClusterPtr seed = aClus->seed();
                hist_EE_PreSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
                hist_EE_PreSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );

                // truth
                double dRClosest = 999.9;
                double energyClosest = 0;
                closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);

                if (dRClosest < 0.1)
                {
                        hist_EE_PreSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
                        hist_EE_PreSC_deltaR_->Fill(dRClosest);
                }

        }

        // Do CORRECTED ENDCAP SuperClusters
        for(reco::SuperClusterCollection::const_iterator aClus = endcapCorSuperClusters->begin();
                aClus != endcapCorSuperClusters->end(); aClus++)
        {
                hist_EE_CorSC_NumBC_->Fill(aClus->clustersSize());
                hist_EE_CorSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
                hist_EE_CorSC_Eta_->Fill(aClus->position().eta());
                hist_EE_CorSC_Phi_->Fill(aClus->position().phi());
                hist_EE_CorSC_preshowerE_->Fill(aClus->preshowerEnergy());

                hist_EE_CorSC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
                hist_EE_CorSC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
                hist_EE_CorSC_ET_vs_R_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), 
                                              std::sqrt( std::pow(aClus->x(),2) + std::pow(aClus->y(),2) ) );


                // correction variables
                hist_EE_CorSC_phiWidth_->Fill(aClus->phiWidth());
                hist_EE_CorSC_etaWidth_->Fill(aClus->etaWidth());

                const reco::CaloClusterPtr seed = aClus->seed();
                hist_EE_CorSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
                hist_EE_CorSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );

                // truth
                double dRClosest = 999.9;
                double energyClosest = 0;
                closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);

                if (dRClosest < 0.1)
                {
                        hist_EE_CorSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
                        hist_EE_CorSC_deltaR_->Fill(dRClosest);
                }

        }

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

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file EgammaSuperClusters.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, hist_bins_deltaR_, hist_bins_EoverTruth_, hist_bins_ET_, hist_bins_Eta_, hist_bins_etaWidth_, hist_bins_NumBC_, hist_bins_Phi_, hist_bins_phiWidth_, hist_bins_preshowerE_, hist_bins_R_, hist_bins_S1toS9_, hist_bins_S25toE_, hist_bins_Size_, hist_EB_CorSC_deltaR_, hist_EB_CorSC_EoverTruth_, hist_EB_CorSC_ET_, hist_EB_CorSC_ET_vs_Eta_, hist_EB_CorSC_ET_vs_Phi_, hist_EB_CorSC_Eta_, hist_EB_CorSC_etaWidth_, hist_EB_CorSC_NumBC_, hist_EB_CorSC_Phi_, hist_EB_CorSC_phiWidth_, hist_EB_CorSC_S1toS9_, hist_EB_CorSC_S25toE_, hist_EB_CorSC_Size_, hist_EB_RawSC_deltaR_, hist_EB_RawSC_EoverTruth_, hist_EB_RawSC_ET_, hist_EB_RawSC_Eta_, hist_EB_RawSC_NumBC_, hist_EB_RawSC_Phi_, hist_EB_RawSC_S1toS9_, hist_EB_RawSC_S25toE_, hist_EB_RawSC_Size_, hist_EE_CorSC_deltaR_, hist_EE_CorSC_EoverTruth_, hist_EE_CorSC_ET_, hist_EE_CorSC_ET_vs_Eta_, hist_EE_CorSC_ET_vs_Phi_, hist_EE_CorSC_ET_vs_R_, hist_EE_CorSC_Eta_, hist_EE_CorSC_etaWidth_, hist_EE_CorSC_NumBC_, hist_EE_CorSC_Phi_, hist_EE_CorSC_phiWidth_, hist_EE_CorSC_preshowerE_, hist_EE_CorSC_S1toS9_, hist_EE_CorSC_S25toE_, hist_EE_CorSC_Size_, hist_EE_PreSC_deltaR_, hist_EE_PreSC_EoverTruth_, hist_EE_PreSC_ET_, hist_EE_PreSC_Eta_, hist_EE_PreSC_NumBC_, hist_EE_PreSC_Phi_, hist_EE_PreSC_preshowerE_, hist_EE_PreSC_S1toS9_, hist_EE_PreSC_S25toE_, hist_EE_PreSC_Size_, hist_EE_RawSC_deltaR_, hist_EE_RawSC_EoverTruth_, hist_EE_RawSC_ET_, hist_EE_RawSC_Eta_, hist_EE_RawSC_NumBC_, hist_EE_RawSC_Phi_, hist_EE_RawSC_S1toS9_, hist_EE_RawSC_S25toE_, hist_EE_RawSC_Size_, hist_max_deltaR_, hist_max_EoverTruth_, hist_max_ET_, hist_max_Eta_, hist_max_etaWidth_, hist_max_NumBC_, hist_max_Phi_, hist_max_phiWidth_, hist_max_preshowerE_, hist_max_R_, hist_max_S1toS9_, hist_max_S25toE_, hist_max_Size_, hist_min_deltaR_, hist_min_EoverTruth_, hist_min_ET_, hist_min_Eta_, hist_min_etaWidth_, hist_min_NumBC_, hist_min_Phi_, hist_min_phiWidth_, hist_min_preshowerE_, hist_min_R_, hist_min_S1toS9_, hist_min_S25toE_, 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/SuperClusters/");
        dbe_->setCurrentFolder("EcalClusterV/EcalSuperClusters/");

        // Number of SuperClusters
        //
        hist_EB_RawSC_Size_ 
                = dbe_->book1D("hist_EB_RawSC_Size_","# Raw SuperClusters in Barrel",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);
        hist_EE_RawSC_Size_ 
                = dbe_->book1D("hist_EE_RawSC_Size_","# Raw SuperClusters in Endcap",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);
        hist_EB_CorSC_Size_
                = dbe_->book1D("hist_EB_CorSC_Size_","# Corrected SuperClusters in Barrel",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);
        hist_EE_CorSC_Size_
                = dbe_->book1D("hist_EE_CorSC_Size_","# Corrected SuperClusters in Endcap",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);
        hist_EE_PreSC_Size_
                = dbe_->book1D("hist_EE_PreSC_Size_","# SuperClusters with Preshower in Endcap",
                        hist_bins_Size_,hist_min_Size_,hist_max_Size_);

        // Number of BasicClusters in SuperCluster
        //
        hist_EB_RawSC_NumBC_ 
                = dbe_->book1D("hist_EB_RawSC_NumBC_","# of Basic Clusters in Raw Super Clusters in Barrel",
                        hist_bins_NumBC_,hist_min_NumBC_,hist_max_NumBC_);
        hist_EE_RawSC_NumBC_ 
                = dbe_->book1D("hist_EE_RawSC_NumBC_","# of Basic Clusters in Raw Super Clusters in Endcap",
                hist_bins_NumBC_,hist_min_NumBC_,hist_max_NumBC_);
        hist_EB_CorSC_NumBC_
                = dbe_->book1D("hist_EB_CorSC_NumBC_","# of Basic Clusters in Corrected SuperClusters in Barrel",
                        hist_bins_NumBC_,hist_min_NumBC_,hist_max_NumBC_);
        hist_EE_CorSC_NumBC_
                = dbe_->book1D("hist_EE_CorSC_NumBC_","# of Basic Clusters in Corrected SuperClusters in Endcap",
                        hist_bins_NumBC_,hist_min_NumBC_,hist_max_NumBC_);
        hist_EE_PreSC_NumBC_
                = dbe_->book1D("hist_EE_PreSC_NumBC_","# of Basic Clusters in SuperClusters with Preshower in Endcap",
                        hist_bins_NumBC_,hist_min_NumBC_,hist_max_NumBC_);

        // ET distribution of SuperClusters
        //
        hist_EB_RawSC_ET_ 
                = dbe_->book1D("hist_EB_RawSC_ET_","ET of Raw SuperClusters in Barrel",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);
        hist_EE_RawSC_ET_ 
                = dbe_->book1D("hist_EE_RawSC_ET_","ET of Raw SuperClusters in Endcap",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);
        hist_EB_CorSC_ET_
                = dbe_->book1D("hist_EB_CorSC_ET_","ET of Corrected SuperClusters in Barrel",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);
        hist_EE_CorSC_ET_
                = dbe_->book1D("hist_EE_CorSC_ET_","ET of Corrected SuperClusters in Endcap",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);
        hist_EE_PreSC_ET_
                = dbe_->book1D("hist_EE_PreSC_ET_","ET of SuperClusters with Preshower in Endcap",
                        hist_bins_ET_,hist_min_ET_,hist_max_ET_);

        // Eta distribution of SuperClusters
        //
        hist_EB_RawSC_Eta_ 
                = dbe_->book1D("hist_EB_RawSC_Eta_","Eta of Raw SuperClusters in Barrel",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
        hist_EE_RawSC_Eta_ 
                = dbe_->book1D("hist_EE_RawSC_Eta_","Eta of Raw SuperClusters in Endcap",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
        hist_EB_CorSC_Eta_
                = dbe_->book1D("hist_EB_CorSC_Eta_","Eta of Corrected SuperClusters in Barrel",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
        hist_EE_CorSC_Eta_
                = dbe_->book1D("hist_EE_CorSC_Eta_","Eta of Corrected SuperClusters in Endcap",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);
        hist_EE_PreSC_Eta_
                = dbe_->book1D("hist_EE_PreSC_Eta_","Eta of SuperClusters with Preshower in Endcap",
                        hist_bins_Eta_,hist_min_Eta_,hist_max_Eta_);

        // Phi distribution of SuperClusters
        //
        hist_EB_RawSC_Phi_
                = dbe_->book1D("hist_EB_RawSC_Phi_","Phi of Raw SuperClusters in Barrel",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
        hist_EE_RawSC_Phi_
                = dbe_->book1D("hist_EE_RawSC_Phi_","Phi of Raw SuperClusters in Endcap",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
        hist_EB_CorSC_Phi_
                = dbe_->book1D("hist_EB_CorSC_Phi_","Phi of Corrected SuperClusters in Barrel",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
        hist_EE_CorSC_Phi_
                = dbe_->book1D("hist_EE_CorSC_Phi_","Phi of Corrected SuperClusters in Endcap",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);
        hist_EE_PreSC_Phi_
                = dbe_->book1D("hist_EE_PreSC_Phi_","Phi of SuperClusters with Preshower in Endcap",
                        hist_bins_Phi_,hist_min_Phi_,hist_max_Phi_);

        // S1/S9 distribution of SuperClusters
        //
        hist_EB_RawSC_S1toS9_ 
                = dbe_->book1D("hist_EB_RawSC_S1toS9_","S1/S9 of Raw Super Clusters in Barrel",
                        hist_bins_S1toS9_,hist_min_S1toS9_,hist_max_S1toS9_);
        hist_EE_RawSC_S1toS9_ 
                = dbe_->book1D("hist_EE_RawSC_S1toS9_","S1/S9 of Raw Super Clusters in Endcap",
                        hist_bins_S1toS9_,hist_min_S1toS9_,hist_max_S1toS9_);
        hist_EB_CorSC_S1toS9_
                = dbe_->book1D("hist_EB_CorSC_S1toS9_","S1/S9 of Corrected SuperClusters in Barrel",
                        hist_bins_S1toS9_,hist_min_S1toS9_,hist_max_S1toS9_);
        hist_EE_CorSC_S1toS9_
                = dbe_->book1D("hist_EE_CorSC_S1toS9_","S1/S9 of Corrected SuperClusters in Endcap",
                        hist_bins_S1toS9_,hist_min_S1toS9_,hist_max_S1toS9_);
        hist_EE_PreSC_S1toS9_
                = dbe_->book1D("hist_EE_PreSC_S1toS9_","S1/S9 of SuperClusters with Preshower in Endcap",
                        hist_bins_S1toS9_,hist_min_S1toS9_,hist_max_S1toS9_);

        // S25/E distribution of SuperClusters
        //
        hist_EB_RawSC_S25toE_ 
                = dbe_->book1D("hist_EB_RawSC_S25toE_","S25/E of Raw Super Clusters in Barrel",
                        hist_bins_S25toE_,hist_min_S25toE_,hist_max_S25toE_);
        hist_EE_RawSC_S25toE_ 
                = dbe_->book1D("hist_EE_RawSC_S25toE_","S25/E of Raw Super Clusters in Endcap",
                        hist_bins_S25toE_,hist_min_S25toE_,hist_max_S25toE_);
        hist_EB_CorSC_S25toE_
                = dbe_->book1D("hist_EB_CorSC_S25toE_","S25/E of Corrected SuperClusters in Barrel",
                        hist_bins_S25toE_,hist_min_S25toE_,hist_max_S25toE_);
        hist_EE_CorSC_S25toE_
                = dbe_->book1D("hist_EE_CorSC_S25toE_","S25/E of Corrected SuperClusters in Endcap",
                        hist_bins_S25toE_,hist_min_S25toE_,hist_max_S25toE_);
        hist_EE_PreSC_S25toE_
                = dbe_->book1D("hist_EE_PreSC_S25toE_","S25/E of SuperClusters with Preshower in Endcap",
                        hist_bins_S25toE_,hist_min_S25toE_,hist_max_S25toE_);

        // E/E(true) distribution of SuperClusters
        //
        hist_EB_RawSC_EoverTruth_ 
                = dbe_->book1D("hist_EB_RawSC_EoverTruth_","E/True E of Raw SuperClusters in Barrel",   
                        hist_bins_EoverTruth_,hist_min_EoverTruth_,hist_max_EoverTruth_);
        hist_EE_RawSC_EoverTruth_ 
                = dbe_->book1D("hist_EE_RawSC_EoverTruth_","E/True E of Raw SuperClusters in Endcap",
                        hist_bins_EoverTruth_,hist_min_EoverTruth_,hist_max_EoverTruth_);
        hist_EB_CorSC_EoverTruth_
                = dbe_->book1D("hist_EB_CorSC_EoverTruth_","E/True E of Corrected SuperClusters in Barrel",
                        hist_bins_EoverTruth_,hist_min_EoverTruth_,hist_max_EoverTruth_);
        hist_EE_CorSC_EoverTruth_
                = dbe_->book1D("hist_EE_CorSC_EoverTruth_","E/True E of Corrected SuperClusters in Endcap",
                        hist_bins_EoverTruth_,hist_min_EoverTruth_,hist_max_EoverTruth_);
        hist_EE_PreSC_EoverTruth_
                = dbe_->book1D("hist_EE_PreSC_EoverTruth_","E/True E of SuperClusters with Preshower in Endcap",
                        hist_bins_EoverTruth_,hist_min_EoverTruth_,hist_max_EoverTruth_);

        // dR distribution of SuperClusters from truth
        //
        hist_EB_RawSC_deltaR_ 
                = dbe_->book1D("hist_EB_RawSC_deltaR_","dR to MC truth of Raw Super Clusters in Barrel",
                        hist_bins_deltaR_,hist_min_deltaR_,hist_max_deltaR_);
        hist_EE_RawSC_deltaR_ 
                = dbe_->book1D("hist_EE_RawSC_deltaR_","dR to MC truth of Raw Super Clusters in Endcap",
                        hist_bins_deltaR_,hist_min_deltaR_,hist_max_deltaR_);
        hist_EB_CorSC_deltaR_
                = dbe_->book1D("hist_EB_CorSC_deltaR_","dR to MC truth of Corrected SuperClusters in Barrel",
                        hist_bins_deltaR_,hist_min_deltaR_,hist_max_deltaR_);
        hist_EE_CorSC_deltaR_
                = dbe_->book1D("hist_EE_CorSC_deltaR_","dR to MC truth of Corrected SuperClusters in Endcap",
                        hist_bins_deltaR_,hist_min_deltaR_,hist_max_deltaR_);
        hist_EE_PreSC_deltaR_
                = dbe_->book1D("hist_EE_PreSC_deltaR_","dR to MC truth of SuperClusters with Preshower in Endcap",
                        hist_bins_deltaR_,hist_min_deltaR_,hist_max_deltaR_);

        // phi width stored in corrected SuperClusters
        hist_EB_CorSC_phiWidth_
                = dbe_->book1D("hist_EB_CorSC_phiWidth_","phiWidth of Corrected Super Clusters in Barrel",
                        hist_bins_phiWidth_,hist_min_phiWidth_,hist_max_phiWidth_);
        hist_EE_CorSC_phiWidth_
                = dbe_->book1D("hist_EE_CorSC_phiWidth_","phiWidth of Corrected Super Clusters in Endcap",
                        hist_bins_phiWidth_,hist_min_phiWidth_,hist_max_phiWidth_);

        // eta width stored in corrected SuperClusters
        hist_EB_CorSC_etaWidth_
                = dbe_->book1D("hist_EB_CorSC_etaWidth_","etaWidth of Corrected Super Clusters in Barrel",
                        hist_bins_etaWidth_,hist_min_etaWidth_,hist_max_etaWidth_);
        hist_EE_CorSC_etaWidth_
                = dbe_->book1D("hist_EE_CorSC_etaWidth_","etaWidth of Corrected Super Clusters in Endcap",
                        hist_bins_etaWidth_,hist_min_etaWidth_,hist_max_etaWidth_);


        // preshower energy
        hist_EE_PreSC_preshowerE_
                = dbe_->book1D("hist_EE_PreSC_preshowerE_","preshower energy in Super Clusters with Preshower in Endcap",
                        hist_bins_preshowerE_,hist_min_preshowerE_,hist_max_preshowerE_);
        hist_EE_CorSC_preshowerE_
                = dbe_->book1D("hist_EE_CorSC_preshowerE_","preshower energy in Corrected Super Clusters with Preshower in Endcap",
                        hist_bins_preshowerE_,hist_min_preshowerE_,hist_max_preshowerE_);


        //
        hist_EB_CorSC_ET_vs_Eta_ = dbe_->book2D( "hist_EB_CorSC_ET_vs_Eta_", "Corr Super 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_CorSC_ET_vs_Phi_ = dbe_->book2D( "hist_EB_CorSC_ET_vs_Phi_", "Corr Super 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_CorSC_ET_vs_Eta_ = dbe_->book2D( "hist_EE_CorSC_ET_vs_Eta_", "Corr Super 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_CorSC_ET_vs_Phi_ = dbe_->book2D( "hist_EE_CorSC_ET_vs_Phi_", "Corr Super 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_CorSC_ET_vs_R_ = dbe_->book2D( "hist_EE_CorSC_ET_vs_R_", "Corr Super 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 EgammaSuperClusters::closestMCParticle ( const HepMC::GenEvent *  genEvent,
const reco::SuperCluster sc,
double &  dRClosest,
double &  energyClosest 
) [private]

Definition at line 581 of file EgammaSuperClusters.cc.

References SiPixelRawToDigiRegional_cfi::deltaPhi, deltaR(), dPhi(), ecalEta(), reco::CaloCluster::eta(), reco::CaloCluster::phi(), and mathSSE::sqrt().

Referenced by analyze().

{

        // SuperCluster eta, phi
        double scEta = sc.eta();
        double scPhi = sc.phi();

        // initialize dRClosest to a large number
        dRClosest = 999.9;

        // loop over the MC truth particles to find the
        // closest to the superCluster in dR space
        for(HepMC::GenEvent::particle_const_iterator currentParticle = genEvent->particles_begin();
                currentParticle != genEvent->particles_end(); currentParticle++ )
        {
                if((*currentParticle)->status() == 1)
                {
                        // need GenParticle in ECAL co-ordinates
                        HepMC::FourVector vtx = (*currentParticle)->production_vertex()->position();
                        double phiTrue = (*currentParticle)->momentum().phi();
                        double etaTrue = ecalEta((*currentParticle)->momentum().eta(), vtx.z()/10., vtx.perp()/10.);

                        double dPhi = reco::deltaPhi(phiTrue, scPhi);
                        double dEta = scEta - etaTrue;
                        double deltaR = std::sqrt(dPhi*dPhi + dEta*dEta);

                        if(deltaR < dRClosest)
                        {
                                dRClosest = deltaR;
                                energyClosest = (*currentParticle)->momentum().e();
                        }

                } // end if stable particle     

        } // end loop on get particles

}
float EgammaSuperClusters::ecalEta ( float  EtaParticle,
float  Zvertex,
float  plane_Radius 
) [private]

Definition at line 624 of file EgammaSuperClusters.cc.

References ETA, etaBarrelEndcap, create_public_lumi_plots::log, pi, R_ECAL, funct::tan(), and Z_Endcap.

Referenced by closestMCParticle().

{  
        const float R_ECAL           = 136.5;
        const float Z_Endcap         = 328.0;
        const float etaBarrelEndcap  = 1.479;

        if(EtaParticle != 0.)
        {
                float Theta = 0.0  ;
                float ZEcal = (R_ECAL-plane_Radius)*sinh(EtaParticle)+Zvertex;

                if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
                if(Theta<0.0) Theta = Theta+Geom::pi() ;

                float ETA = - log(tan(0.5*Theta));

                if( fabs(ETA) > etaBarrelEndcap )
                {
                        float Zend = Z_Endcap ;
                        if(EtaParticle<0.0 )  Zend = -Zend ;
                        float Zlen = Zend - Zvertex ;
                        float RR = Zlen/sinh(EtaParticle);
                        Theta = atan((RR+plane_Radius)/Zend);
                        if(Theta<0.0) Theta = Theta+Geom::pi() ;
                        ETA = - log(tan(0.5*Theta));
                }
                
                return ETA;
        }
        else
        {
                edm::LogWarning("")  << "[EgammaSuperClusters::ecalEta] Warning: Eta equals to zero, not correcting" ;
                return EtaParticle;
        }
}
void EgammaSuperClusters::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 573 of file EgammaSuperClusters.cc.

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

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

Member Data Documentation

Definition at line 50 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 49 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 58 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 43 of file EgammaSuperClusters.h.

Referenced by beginJob(), and endJob().

Definition at line 55 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 54 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 53 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 59 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

Definition at line 140 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 131 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 86 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 95 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 158 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 77 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 104 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 152 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 146 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 162 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 113 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 122 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 68 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 135 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 126 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 81 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 164 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 165 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 90 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 155 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 72 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 99 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 149 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 108 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 117 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 63 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 133 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 124 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 79 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 88 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 70 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 97 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 106 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 115 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 61 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 136 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 127 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 82 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 167 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 168 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 169 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 91 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 154 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 73 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 100 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 148 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 143 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 109 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 118 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 64 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 137 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 128 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 83 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 92 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 74 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 101 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 142 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 110 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 119 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 65 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 134 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 125 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 80 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 89 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 71 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 98 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 107 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 116 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 62 of file EgammaSuperClusters.h.

Referenced by analyze(), and beginJob().

Definition at line 139 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 130 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 85 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 94 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 157 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 76 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 103 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 151 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 145 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 161 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 112 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 121 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 67 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 138 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 129 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 84 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 93 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 156 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 75 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 102 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 150 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 144 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 160 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 111 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 120 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 66 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().

Definition at line 46 of file EgammaSuperClusters.h.

Referenced by analyze(), and EgammaSuperClusters().

std::string EgammaSuperClusters::outputFile_ [private]

Definition at line 39 of file EgammaSuperClusters.h.

Referenced by EgammaSuperClusters(), and endJob().

Definition at line 42 of file EgammaSuperClusters.h.

Referenced by beginJob(), and EgammaSuperClusters().