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 preshowerEnergyPlane1 () const
double preshowerEnergyPlane2 () const
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 setPreshowerEnergyPlane1 (double preshowerEnergy1)
void setPreshowerEnergyPlane2 (double preshowerEnergy2)
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, const CaloClusterPtr &seed, const CaloClusterPtrVector &clusters, double Epreshower=0., double phiWidth=0., double etaWidth=0., double Epreshower1=0., double Epreshower2=0.)
 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., double Epreshower1=0., double Epreshower2=0.)
 SuperCluster ()
 default constructor

Private Member Functions

void computeRawEnergy ()

Private Attributes

CaloClusterPtrVector clusters_
 references to BasicCluster constitunets
double etaWidth_
double phiWidth_
CaloClusterPtrVector preshowerClusters_
 references to BasicCluster constitunets
double preshowerEnergy1_
double preshowerEnergy2_
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.26 2013/04/12 12:05:18 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.

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.,
double  Epreshower1 = 0.,
double  Epreshower2 = 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_, preshowerEnergy1_, preshowerEnergy2_, preshowerEnergy_, edm::PtrVector< T >::push_back(), seed(), and seed_.

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

  // 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.,
double  Epreshower1 = 0.,
double  Epreshower2 = 0. 
)

Definition at line 45 of file SuperCluster.cc.

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

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

  // 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]
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 83 of file SuperCluster.h.

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

Referenced by ErsatzMEt::analyze().

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

Definition at line 85 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 116 of file SuperCluster.h.

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

                                                {
      return (flags_>>flagsOffset_);
    }
double reco::SuperCluster::phiWidth ( ) const [inline]
CaloCluster_iterator reco::SuperCluster::preshowerClustersBegin ( ) const [inline]
CaloCluster_iterator reco::SuperCluster::preshowerClustersEnd ( ) const [inline]
double reco::SuperCluster::preshowerEnergy ( ) const [inline]
double reco::SuperCluster::preshowerEnergyPlane1 ( ) const [inline]

Definition at line 53 of file SuperCluster.h.

References preshowerEnergy1_.

{return preshowerEnergy1_; }
double reco::SuperCluster::preshowerEnergyPlane2 ( ) const [inline]

Definition at line 54 of file SuperCluster.h.

References preshowerEnergy2_.

{return preshowerEnergy2_; }
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::setPreshowerEnergyPlane1 ( double  preshowerEnergy1) [inline]

Definition at line 62 of file SuperCluster.h.

References preshowerEnergy1_.

Referenced by PFECALSuperClusterAlgo::buildSuperCluster(), and PreshowerPhiClusterProducer::produce().

{ preshowerEnergy1_ = preshowerEnergy1; }; 
void reco::SuperCluster::setPreshowerEnergyPlane2 ( double  preshowerEnergy2) [inline]

Definition at line 63 of file SuperCluster.h.

References preshowerEnergy2_.

Referenced by PFECALSuperClusterAlgo::buildSuperCluster().

{ preshowerEnergy2_ = preshowerEnergy2; }; 
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 106 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 89 of file SuperCluster.h.

References alignCSCRings::r, and seed_.

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

{ seed_ = r; }

Member Data Documentation

references to BasicCluster constitunets

Definition at line 128 of file SuperCluster.h.

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

Definition at line 141 of file SuperCluster.h.

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

Definition at line 140 of file SuperCluster.h.

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

references to BasicCluster constitunets

Definition at line 131 of file SuperCluster.h.

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

Definition at line 143 of file SuperCluster.h.

Referenced by preshowerEnergyPlane1(), setPreshowerEnergyPlane1(), and SuperCluster().

Definition at line 144 of file SuperCluster.h.

Referenced by preshowerEnergyPlane2(), setPreshowerEnergyPlane2(), and SuperCluster().

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

Definition at line 136 of file SuperCluster.h.

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

Definition at line 138 of file SuperCluster.h.

Referenced by computeRawEnergy(), and rawEnergy().

reference to BasicCluster seed

Definition at line 125 of file SuperCluster.h.

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