CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

reco::SuperCluster Class Reference

#include <DataFormats/EgammaReco/interface/SuperCluster.h>

Inheritance diagram for reco::SuperCluster:
reco::CaloCluster

List of all members.

Public Types

typedef math::XYZPoint Point

Public Member Functions

void addCluster (const CaloClusterPtr &r)
 add reference to constituent BasicCluster
void addPreshowerCluster (const CaloClusterPtr &r)
 add reference to constituent BasicCluster
CaloCluster_iterator clustersBegin () const
 fist iterator over BasicCluster constituents
CaloCluster_iterator clustersEnd () const
 last iterator over BasicCluster constituents
size_t clustersSize () const
 number of BasicCluster constituents
double etaWidth () const
const int getPreshowerPlanesStatus () const
double phiWidth () const
 obtain phi and eta width of the Super Cluster
CaloCluster_iterator preshowerClustersBegin () const
 fist iterator over PreshowerCluster constituents
CaloCluster_iterator preshowerClustersEnd () const
 last iterator over PreshowerCluster constituents
double preshowerEnergy () const
 energy deposited in preshower
double rawEnergy () const
 raw uncorrected energy (sum of energies of component BasicClusters)
const CaloClusterPtrseed () const
 seed BasicCluster
void setEtaWidth (double ew)
void setPhiWidth (double pw)
void setPreshowerEnergy (double preshowerEnergy)
void setPreshowerPlanesStatus (const uint32_t &status)
void setSeed (const CaloClusterPtr &r)
 list of used xtals by DetId // now inherited by CaloCluster
 SuperCluster (double energy, const Point &position)
 constructor defined by CaloCluster - will have to use setSeed and add() separately
 SuperCluster (double energy, const Point &position, const CaloClusterPtr &seed, const CaloClusterPtrVector &clusters, const CaloClusterPtrVector &preshowerClusters, double Epreshower=0., double phiWidth=0., double etaWidth=0.)
 SuperCluster ()
 default constructor
 SuperCluster (double energy, const Point &position, const CaloClusterPtr &seed, const CaloClusterPtrVector &clusters, double Epreshower=0., double phiWidth=0., double etaWidth=0.)

Private Member Functions

void computeRawEnergy ()

Private Attributes

CaloClusterPtrVector clusters_
 references to BasicCluster constitunets
double etaWidth_
double phiWidth_
CaloClusterPtrVector preshowerClusters_
 references to BasicCluster constitunets
double preshowerEnergy_
 used hits by detId - retrieved from BC constituents -- now inherited from CaloCluster
double rawEnergy_
CaloClusterPtr seed_
 reference to BasicCluster seed

Detailed Description

A SuperCluster reconstructed in the Electromagnetic Calorimeter contains references to seed and constituent BasicClusters

Author:
Luca Lista, INFN
Version:
Id:
SuperCluster.h,v 1.24 2011/02/18 09:47:04 argiro Exp

Definition at line 20 of file SuperCluster.h.


Member Typedef Documentation

Definition at line 23 of file SuperCluster.h.


Constructor & Destructor Documentation

reco::SuperCluster::SuperCluster ( ) [inline]

default constructor

Definition at line 26 of file SuperCluster.h.

: CaloCluster(0., Point(0.,0.,0.)), preshowerEnergy_(0), rawEnergy_(-1.), phiWidth_(0), etaWidth_(0) {}
SuperCluster::SuperCluster ( double  energy,
const Point position 
)

constructor defined by CaloCluster - will have to use setSeed and add() separately

Definition at line 6 of file SuperCluster.cc.

SuperCluster::SuperCluster ( double  energy,
const Point position,
const CaloClusterPtr seed,
const CaloClusterPtrVector clusters,
double  Epreshower = 0.,
double  phiWidth = 0.,
double  etaWidth = 0. 
)

Definition at line 12 of file SuperCluster.cc.

References edm::PtrVector< T >::begin(), clusters_, computeRawEnergy(), edm::PtrVector< T >::end(), etaWidth(), etaWidth_, reco::CaloCluster::hitsAndFractions_, phiWidth(), phiWidth_, preshowerEnergy_, edm::PtrVector< T >::push_back(), seed(), and seed_.

                                                                                 :
  CaloCluster(energy,position), rawEnergy_(0)
{
  phiWidth_ = phiWidth;
  etaWidth_ = etaWidth;
  seed_ = seed;
  preshowerEnergy_ = Epreshower;

  // set references to constituent basic clusters and update list of rechits
  for(CaloClusterPtrVector::const_iterator bcit  = clusters.begin();
                                            bcit != clusters.end();
                                          ++bcit) {
    clusters_.push_back( (*bcit) );

    // updated list of used hits
    const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
    for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
                                            diIt != v1.end();
                                           ++diIt ) {
      hitsAndFractions_.push_back( (*diIt) );
    } // loop over rechits
  } // loop over basic clusters
  
  computeRawEnergy();
}
SuperCluster::SuperCluster ( double  energy,
const Point position,
const CaloClusterPtr seed,
const CaloClusterPtrVector clusters,
const CaloClusterPtrVector preshowerClusters,
double  Epreshower = 0.,
double  phiWidth = 0.,
double  etaWidth = 0. 
)

Definition at line 43 of file SuperCluster.cc.

References edm::PtrVector< T >::begin(), clusters_, computeRawEnergy(), edm::PtrVector< T >::end(), etaWidth(), etaWidth_, reco::CaloCluster::hitsAndFractions_, phiWidth(), phiWidth_, preshowerClusters_, preshowerEnergy_, edm::PtrVector< T >::push_back(), seed(), and seed_.

                                                                                 :
  CaloCluster(energy,position), rawEnergy_(-1.)
{
  phiWidth_ = phiWidth;
  etaWidth_ = etaWidth;
  seed_ = seed;
  preshowerEnergy_ = Epreshower;

  // set references to constituent basic clusters and update list of rechits
  for(CaloClusterPtrVector::const_iterator bcit  = clusters.begin();
                                            bcit != clusters.end();
                                          ++bcit) {
    clusters_.push_back( (*bcit) );

    // updated list of used hits
    const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
    for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
                                            diIt != v1.end();
                                           ++diIt ) {
      hitsAndFractions_.push_back( (*diIt) );
    } // loop over rechits
  } // loop over basic clusters

  // set references to preshower clusters
  for(CaloClusterPtrVector::const_iterator pcit  = preshowerClusters.begin();
                                            pcit != preshowerClusters.end();
                                          ++pcit) {
    preshowerClusters_.push_back( (*pcit) );
  }
  computeRawEnergy();
}

Member Function Documentation

void reco::SuperCluster::addCluster ( const CaloClusterPtr r) [inline]
void reco::SuperCluster::addPreshowerCluster ( const CaloClusterPtr r) [inline]

add reference to constituent BasicCluster

Definition at line 92 of file SuperCluster.h.

References preshowerClusters_, and edm::PtrVector< T >::push_back().

Referenced by PFElectronTranslator::createSuperClusters(), and PFPhotonTranslator::createSuperClusters().

{ preshowerClusters_.push_back( r ); }
CaloCluster_iterator reco::SuperCluster::clustersBegin ( ) const [inline]
CaloCluster_iterator reco::SuperCluster::clustersEnd ( ) const [inline]
size_t reco::SuperCluster::clustersSize ( ) const [inline]

number of BasicCluster constituents

Definition at line 77 of file SuperCluster.h.

References clusters_, and edm::PtrVectorBase::size().

Referenced by ErsatzMEt::analyze().

{ return clusters_.size(); }
void SuperCluster::computeRawEnergy ( ) [private]

Definition at line 81 of file SuperCluster.cc.

References clustersBegin(), clustersEnd(), and rawEnergy_.

Referenced by addCluster(), and SuperCluster().

                                    {

  rawEnergy_ = 0.;
  for(CaloClusterPtrVector::const_iterator bcItr = clustersBegin(); 
      bcItr != clustersEnd(); bcItr++){
      rawEnergy_ += (*bcItr)->energy();
  }
}
double reco::SuperCluster::etaWidth ( ) const [inline]
const int reco::SuperCluster::getPreshowerPlanesStatus ( ) const [inline]

Get preshower planes status : 0 : both planes working 1 : only first plane working 2 : only second plane working 3 : both planes dead

Definition at line 110 of file SuperCluster.h.

References reco::CaloCluster::flags_, and reco::CaloCluster::flagsOffset_.

                                                {
      return (flags_>>flagsOffset_);
    }
double reco::SuperCluster::phiWidth ( ) const [inline]

obtain phi and eta width of the Super Cluster

Definition at line 53 of file SuperCluster.h.

References phiWidth_.

Referenced by fBremScCorr(), EcalClusterEnergyUncertainty::getValue(), EcalClusterEnergyCorrection::getValue(), and SuperCluster().

{ return phiWidth_; }
CaloCluster_iterator reco::SuperCluster::preshowerClustersBegin ( ) const [inline]

fist iterator over PreshowerCluster constituents

Definition at line 71 of file SuperCluster.h.

References edm::PtrVector< T >::begin(), and preshowerClusters_.

{ return preshowerClusters_.begin(); }
CaloCluster_iterator reco::SuperCluster::preshowerClustersEnd ( ) const [inline]

last iterator over PreshowerCluster constituents

Definition at line 74 of file SuperCluster.h.

References edm::PtrVector< T >::end(), and preshowerClusters_.

{ return preshowerClusters_.end(); }
double reco::SuperCluster::preshowerEnergy ( ) const [inline]
double reco::SuperCluster::rawEnergy ( ) const [inline]
const CaloClusterPtr& reco::SuperCluster::seed ( ) const [inline]
void reco::SuperCluster::setEtaWidth ( double  ew) [inline]
void reco::SuperCluster::setPhiWidth ( double  pw) [inline]
void reco::SuperCluster::setPreshowerEnergy ( double  preshowerEnergy) [inline]
void reco::SuperCluster::setPreshowerPlanesStatus ( const uint32_t &  status) [inline]

Set preshower planes status : 0 : both planes working 1 : only first plane working 2 : only second plane working 3 : both planes dead

Definition at line 100 of file SuperCluster.h.

References reco::CaloCluster::flags(), reco::CaloCluster::flags_, reco::CaloCluster::flagsMask_, and reco::CaloCluster::flagsOffset_.

Referenced by PreshowerClusterProducer::produce().

                                                         {
      uint32_t flags = flags_ & flagsMask_;
      flags_= flags | (status << flagsOffset_);
    }
void reco::SuperCluster::setSeed ( const CaloClusterPtr r) [inline]

list of used xtals by DetId // now inherited by CaloCluster

set reference to seed BasicCluster

Definition at line 83 of file SuperCluster.h.

References csvReporter::r, and seed_.

Referenced by PFPhotonTranslator::createSuperClusters(), and PFElectronTranslator::createSuperClusters().

{ seed_ = r; }

Member Data Documentation

references to BasicCluster constitunets

Definition at line 122 of file SuperCluster.h.

Referenced by addCluster(), clustersBegin(), clustersEnd(), clustersSize(), and SuperCluster().

Definition at line 135 of file SuperCluster.h.

Referenced by etaWidth(), setEtaWidth(), and SuperCluster().

Definition at line 134 of file SuperCluster.h.

Referenced by phiWidth(), setPhiWidth(), and SuperCluster().

references to BasicCluster constitunets

Definition at line 125 of file SuperCluster.h.

Referenced by addPreshowerCluster(), preshowerClustersBegin(), preshowerClustersEnd(), and SuperCluster().

used hits by detId - retrieved from BC constituents -- now inherited from CaloCluster

Definition at line 130 of file SuperCluster.h.

Referenced by preshowerEnergy(), setPreshowerEnergy(), and SuperCluster().

Definition at line 132 of file SuperCluster.h.

Referenced by computeRawEnergy(), and rawEnergy().

reference to BasicCluster seed

Definition at line 119 of file SuperCluster.h.

Referenced by seed(), setSeed(), and SuperCluster().