CMS 3D CMS Logo

List of all members | 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

Public Types

typedef math::XYZPoint Point
 
- Public Types inherited from reco::CaloCluster
enum  AlgoId {
  island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3,
  multi5x5 = 4, particleFlow = 5, hgcal_em = 6, hgcal_had = 7,
  hgcal_mixed = 8, hfnose = 9, undefined = 1000
}
 
typedef AlgoId AlgoID
 
enum  HCalFlags { badHcalMarker = 1 }
 
enum  SCFlags { cleanOnly = 0, common = 100, uncleanOnly = 200 }
 

Public Member Functions

void addCluster (const CaloClusterPtr &r)
 add reference to constituent BasicCluster More...
 
void addPreshowerCluster (const CaloClusterPtr &r)
 add reference to constituent BasicCluster More...
 
void clearHitsAndFractions ()
 
const CaloClusterPtrVectorclusters () const
 const access to the cluster list itself More...
 
CaloCluster_iterator clustersBegin () const
 fist iterator over BasicCluster constituents More...
 
CaloCluster_iterator clustersEnd () const
 last iterator over BasicCluster constituents More...
 
size_t clustersSize () const
 number of BasicCluster constituents More...
 
double etaWidth () const
 
const int getPreshowerPlanesStatus () const
 
double phiWidth () const
 obtain phi and eta width of the Super Cluster More...
 
const CaloClusterPtrVectorpreshowerClusters () const
 const access to the preshower cluster list itself More...
 
CaloCluster_iterator preshowerClustersBegin () const
 fist iterator over PreshowerCluster constituents More...
 
CaloCluster_iterator preshowerClustersEnd () const
 last iterator over PreshowerCluster constituents More...
 
size_t preshowerClustersSize () const
 number of BasicCluster PreShower constituents More...
 
double preshowerEnergy () const
 energy deposited in preshower More...
 
double preshowerEnergyPlane1 () const
 
double preshowerEnergyPlane2 () const
 
double rawEnergy () const
 raw uncorrected energy (sum of energies of component BasicClusters) More...
 
const CaloClusterPtrseed () const
 seed BasicCluster More...
 
void setClusters (const CaloClusterPtrVector &clusters)
 
void setEtaWidth (double ew)
 
void setPhiWidth (double pw)
 
void setPreshowerClusters (const CaloClusterPtrVector &clusters)
 
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 More...
 
 SuperCluster ()
 default constructor More...
 
 SuperCluster (double energy, const Point &position)
 constructor defined by CaloCluster - will have to use setSeed and add() separately More...
 
 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, const CaloClusterPtr &seed, const CaloClusterPtrVector &clusters, const CaloClusterPtrVector &preshowerClusters, double Epreshower=0., double phiWidth=0., double etaWidth=0., double Epreshower1=0., double Epreshower2=0.)
 
- Public Member Functions inherited from reco::CaloCluster
void addHitAndFraction (DetId id, float fraction)
 
AlgoId algo () const
 algorithm identifier More...
 
AlgoID algoID () const
 
 CaloCluster ()
 default constructor. Sets energy and position to zero More...
 
 CaloCluster (AlgoID algoID)
 constructor with algoId, to be used in all child classes More...
 
 CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID)
 
 CaloCluster (double energy, const math::XYZPoint &position)
 constructor from values More...
 
 CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID, const AlgoID &algoID, uint32_t flags=0)
 
 CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID, const std::vector< std::pair< DetId, float > > &usedHitsAndFractions, const AlgoId algoId, const DetId seedId=DetId(0), uint32_t flags=0)
 
 CaloCluster (double energy, const math::XYZPoint &position, float chi2, const std::vector< DetId > &usedHits, const AlgoId algoId, uint32_t flags=0)
 temporary compatibility constructor More...
 
const CaloIDcaloID () const
 
double correctedEnergy () const
 
float correctedEnergyUncertainty () const
 
double energy () const
 cluster energy More...
 
double eta () const
 pseudorapidity of cluster centroid More...
 
uint32_t flags () const
 
const std::vector< std::pair< DetId, float > > & hitsAndFractions () const
 
bool isInClean () const
 
bool isInUnclean () const
 
bool operator< (const CaloCluster &rhs) const
 comparison < operator More...
 
bool operator<= (const CaloCluster &rhs) const
 comparison <= operator More...
 
bool operator== (const CaloCluster &rhs) const
 comparison == operator More...
 
bool operator> (const CaloCluster &rhs) const
 comparison > operator More...
 
bool operator>= (const CaloCluster &rhs) const
 comparison >= operator More...
 
double phi () const
 azimuthal angle of cluster centroid More...
 
const math::XYZPointposition () const
 cluster centroid position More...
 
std::string printHitAndFraction (unsigned i) const
 print hitAndFraction More...
 
void reset ()
 resets the CaloCluster (position, energy, hitsAndFractions) More...
 
DetId seed () const
 return DetId of seed More...
 
void setAlgoId (const AlgoId &id)
 
void setCaloId (const CaloID &id)
 
void setCorrectedEnergy (double cenergy)
 
void setCorrectedEnergyUncertainty (float energyerr)
 
void setEnergy (double energy)
 
void setFlags (uint32_t flags)
 
void setPosition (const math::XYZPoint &p)
 
void setSeed (const DetId &id)
 
size_t size () const
 size in number of hits (e.g. in crystals for ECAL) More...
 
double x () const
 x coordinate of cluster centroid More...
 
double y () const
 y coordinate of cluster centroid More...
 
double z () const
 z coordinate of cluster centroid More...
 
virtual ~CaloCluster ()
 destructor More...
 

Private Member Functions

void computeRawEnergy ()
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from reco::CaloCluster
AlgoID algoID_
 
CaloID caloID_
 bitmask for detector information More...
 
double correctedEnergy_
 
float correctedEnergyUncertainty_
 
double energy_
 cluster energy More...
 
uint32_t flags_
 
std::vector< std::pair< DetId, float > > hitsAndFractions_
 
math::XYZPoint position_
 cluster centroid position More...
 
DetId seedId_
 DetId of seed. More...
 
- Static Protected Attributes inherited from reco::CaloCluster
static const uint32_t flagsMask_ = 0x0FFFFFFF
 
static const uint32_t flagsOffset_ = 28
 

Detailed Description

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

Author
Luca Lista, INFN

Definition at line 18 of file SuperCluster.h.

Member Typedef Documentation

◆ Point

Definition at line 20 of file SuperCluster.h.

Constructor & Destructor Documentation

◆ SuperCluster() [1/4]

reco::SuperCluster::SuperCluster ( )
inline

default constructor

Definition at line 23 of file SuperCluster.h.

24  : CaloCluster(0., Point(0., 0., 0.)),
26  rawEnergy_(-1.),
27  phiWidth_(0),
28  etaWidth_(0),
30  preshowerEnergy2_(0) {}
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:163
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:57
math::XYZPoint Point
Definition: SuperCluster.h:20

◆ SuperCluster() [2/4]

reco::SuperCluster::SuperCluster ( double  energy,
const Point position 
)

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

◆ SuperCluster() [3/4]

reco::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. 
)

◆ SuperCluster() [4/4]

reco::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. 
)

Member Function Documentation

◆ addCluster()

void reco::SuperCluster::addCluster ( const CaloClusterPtr r)
inline

add reference to constituent BasicCluster

Definition at line 122 of file SuperCluster.h.

References clusters_, computeRawEnergy(), edm::PtrVector< T >::push_back(), and alignCSCRings::r.

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

122  {
125  }
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:155
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149

◆ addPreshowerCluster()

void reco::SuperCluster::addPreshowerCluster ( const CaloClusterPtr r)
inline

add reference to constituent BasicCluster

Definition at line 128 of file SuperCluster.h.

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

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

void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158

◆ clearHitsAndFractions()

void reco::SuperCluster::clearHitsAndFractions ( )
inline

Definition at line 119 of file SuperCluster.h.

References reco::CaloCluster::hitsAndFractions_.

119 { hitsAndFractions_.clear(); }
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:234

◆ clusters()

const CaloClusterPtrVector& reco::SuperCluster::clusters ( ) const
inline

◆ clustersBegin()

CaloCluster_iterator reco::SuperCluster::clustersBegin ( ) const
inline

◆ clustersEnd()

CaloCluster_iterator reco::SuperCluster::clustersEnd ( ) const
inline

◆ clustersSize()

size_t reco::SuperCluster::clustersSize ( ) const
inline

number of BasicCluster constituents

Definition at line 98 of file SuperCluster.h.

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

Referenced by SuperClusterHelper::clustersSize(), EcalRegressionData::fill(), lowptgsfeleid::findEnergeticClusters(), and lowptgsfeleid::trackClusterMatching().

98 { return clusters_.size(); }
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:75
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:155

◆ computeRawEnergy()

void SuperCluster::computeRawEnergy ( )
private

Definition at line 82 of file SuperCluster.cc.

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

Referenced by addCluster(), and setClusters().

82  {
83  rawEnergy_ = 0.;
84  for (CaloClusterPtrVector::const_iterator bcItr = clustersBegin(); bcItr != clustersEnd(); bcItr++) {
85  rawEnergy_ += (*bcItr)->energy();
86  }
87 }
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:86
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:89

◆ etaWidth()

double reco::SuperCluster::etaWidth ( ) const
inline

◆ getPreshowerPlanesStatus()

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 146 of file SuperCluster.h.

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

146 { return (flags_ >> flagsOffset_); }
static const uint32_t flagsOffset_
Definition: CaloCluster.h:248

◆ phiWidth()

double reco::SuperCluster::phiWidth ( ) const
inline

◆ preshowerClusters()

const CaloClusterPtrVector& reco::SuperCluster::preshowerClusters ( ) const
inline

const access to the preshower cluster list itself

Definition at line 83 of file SuperCluster.h.

References preshowerClusters_.

Referenced by ReducedEGProducer::linkCaloClusters(), and ReducedEGProducer::relinkCaloClusters().

83 { return preshowerClusters_; }
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158

◆ preshowerClustersBegin()

CaloCluster_iterator reco::SuperCluster::preshowerClustersBegin ( ) const
inline

fist iterator over PreshowerCluster constituents

Definition at line 92 of file SuperCluster.h.

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

Referenced by PFEGammaAlgo::buildRefinedSuperCluster(), PFECALSuperClusterAlgo::buildSuperCluster(), and SuperClusterHelper::SuperClusterHelper().

92 { return preshowerClusters_.begin(); }
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158
const_iterator begin() const
Definition: PtrVector.h:144

◆ preshowerClustersEnd()

CaloCluster_iterator reco::SuperCluster::preshowerClustersEnd ( ) const
inline

last iterator over PreshowerCluster constituents

Definition at line 95 of file SuperCluster.h.

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

Referenced by PFEGammaAlgo::buildRefinedSuperCluster(), PFECALSuperClusterAlgo::buildSuperCluster(), and SuperClusterHelper::SuperClusterHelper().

95 { return preshowerClusters_.end(); }
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158
const_iterator end() const
Definition: PtrVector.h:146

◆ preshowerClustersSize()

size_t reco::SuperCluster::preshowerClustersSize ( ) const
inline

number of BasicCluster PreShower constituents

Definition at line 101 of file SuperCluster.h.

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

101 { return preshowerClusters_.size(); }
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:75
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158

◆ preshowerEnergy()

double reco::SuperCluster::preshowerEnergy ( ) const
inline

◆ preshowerEnergyPlane1()

double reco::SuperCluster::preshowerEnergyPlane1 ( ) const
inline

Definition at line 62 of file SuperCluster.h.

References preshowerEnergy1_.

62 { return preshowerEnergy1_; }

◆ preshowerEnergyPlane2()

double reco::SuperCluster::preshowerEnergyPlane2 ( ) const
inline

Definition at line 63 of file SuperCluster.h.

References preshowerEnergy2_.

63 { return preshowerEnergy2_; }

◆ rawEnergy()

double reco::SuperCluster::rawEnergy ( ) const
inline

◆ seed()

const CaloClusterPtr& reco::SuperCluster::seed ( ) const
inline

seed BasicCluster

Definition at line 77 of file SuperCluster.h.

References seed_.

Referenced by EGHcalRecHitSelector::addDetIds(), AlCaECALRecHitReducer::AddMiniRecHitCollection(), ContainmentCorrectionAnalyzer::analyze(), PFECALSuperClusterAlgo::buildSuperCluster(), EcalClusterPUCleaningTools::CleanedSuperCluster(), EcalClusterToolsT< noZS >::cluster2ndMoments(), egammaisolation::EgammaEcalExtractor::deposit(), EcalRegressionData::fill(), ZeeCalibration::fillEleInfo(), PFEGammaAlgo::fillPFCandidates(), SCRegressionCalculator< VarCalc >::getCorrection(), SCEnergyCorrectorSemiParm::getCorrections(), SCRegressionCalculator< VarCalc >::getCorrectionWithErrors(), EgammaEcalIsolation::getEcalEtSum(), RegressionHelper::getEcalRegression(), EgammaHcalIsolation::getHcalESumBc(), EgammaHcalIsolation::getHcalEtSumBc(), SCEnergyCorrectorSemiParm::getRegData(), SCEnergyCorrectorSemiParm::getRegDataECALHLTV1(), SCEnergyCorrectorSemiParm::getRegDataECALV1(), SCEnergyCorrectorSemiParm::getRegDataHGCALV1(), EG8XObjectUpdateModifier::getSaturationInfo(), EcalClusterEnergyCorrectionObjectSpecific::getValue(), EcalClusterCrackCorrection::getValue(), EcalDigiSelector::produce(), UncleanSCRecoveryProducer::produce(), UnifiedSCCollectionProducer::produce(), ReducedEGProducer::relinkCaloClusters(), EcalClusterToolsT< noZS >::scLocalCovariances(), BaselinePFSCRegression::set(), EcalClusterLazyToolsBase::SuperClusterSeedTime(), EcalClusterLazyToolsBase::SuperClusterTime(), and egamma::towersOf().

77 { return seed_; }
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:152

◆ setClusters()

void reco::SuperCluster::setClusters ( const CaloClusterPtrVector clusters)
inline

Definition at line 110 of file SuperCluster.h.

References clusters(), clusters_, and computeRawEnergy().

Referenced by LowPtGsfElectronSCProducer::produce(), and ReducedEGProducer::relinkCaloClusters().

110  {
113  }
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:155
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80

◆ setEtaWidth()

void reco::SuperCluster::setEtaWidth ( double  ew)
inline

◆ setPhiWidth()

void reco::SuperCluster::setPhiWidth ( double  pw)
inline

◆ setPreshowerClusters()

void reco::SuperCluster::setPreshowerClusters ( const CaloClusterPtrVector clusters)
inline

Definition at line 116 of file SuperCluster.h.

References clusters(), and preshowerClusters_.

Referenced by ReducedEGProducer::relinkCaloClusters().

CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80

◆ setPreshowerEnergy()

void reco::SuperCluster::setPreshowerEnergy ( double  preshowerEnergy)
inline

Definition at line 70 of file SuperCluster.h.

References preshowerEnergy(), and preshowerEnergy_.

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

double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:163
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61

◆ setPreshowerEnergyPlane1()

void reco::SuperCluster::setPreshowerEnergyPlane1 ( double  preshowerEnergy1)
inline

◆ setPreshowerEnergyPlane2()

void reco::SuperCluster::setPreshowerEnergyPlane2 ( double  preshowerEnergy2)
inline

Definition at line 72 of file SuperCluster.h.

References preshowerEnergy2_.

Referenced by PFEGammaAlgo::buildRefinedSuperCluster(), and PFECALSuperClusterAlgo::buildSuperCluster().

72 { preshowerEnergy2_ = preshowerEnergy2; };

◆ setPreshowerPlanesStatus()

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 136 of file SuperCluster.h.

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

Referenced by PreshowerClusterProducer::produce().

136  {
137  uint32_t flags = flags_ & flagsMask_;
138  flags_ = flags | (status << flagsOffset_);
139  }
uint32_t flags() const
Definition: CaloCluster.h:193
static const uint32_t flagsOffset_
Definition: CaloCluster.h:248
static const uint32_t flagsMask_
Definition: CaloCluster.h:247

◆ setSeed()

void reco::SuperCluster::setSeed ( const CaloClusterPtr r)
inline

Member Data Documentation

◆ clusters_

CaloClusterPtrVector reco::SuperCluster::clusters_
private

references to BasicCluster constitunets

Definition at line 155 of file SuperCluster.h.

Referenced by addCluster(), clusters(), clustersBegin(), clustersEnd(), clustersSize(), and setClusters().

◆ etaWidth_

double reco::SuperCluster::etaWidth_
private

Definition at line 168 of file SuperCluster.h.

Referenced by etaWidth(), and setEtaWidth().

◆ phiWidth_

double reco::SuperCluster::phiWidth_
private

Definition at line 167 of file SuperCluster.h.

Referenced by phiWidth(), and setPhiWidth().

◆ preshowerClusters_

CaloClusterPtrVector reco::SuperCluster::preshowerClusters_
private

references to BasicCluster constitunets

Definition at line 158 of file SuperCluster.h.

Referenced by addPreshowerCluster(), preshowerClusters(), preshowerClustersBegin(), preshowerClustersEnd(), preshowerClustersSize(), and setPreshowerClusters().

◆ preshowerEnergy1_

double reco::SuperCluster::preshowerEnergy1_
private

Definition at line 170 of file SuperCluster.h.

Referenced by preshowerEnergyPlane1(), and setPreshowerEnergyPlane1().

◆ preshowerEnergy2_

double reco::SuperCluster::preshowerEnergy2_
private

Definition at line 171 of file SuperCluster.h.

Referenced by preshowerEnergyPlane2(), and setPreshowerEnergyPlane2().

◆ preshowerEnergy_

double reco::SuperCluster::preshowerEnergy_
private

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

Definition at line 163 of file SuperCluster.h.

Referenced by preshowerEnergy(), and setPreshowerEnergy().

◆ rawEnergy_

double reco::SuperCluster::rawEnergy_
private

Definition at line 165 of file SuperCluster.h.

Referenced by computeRawEnergy(), and rawEnergy().

◆ seed_

CaloClusterPtr reco::SuperCluster::seed_
private

reference to BasicCluster seed

Definition at line 152 of file SuperCluster.h.

Referenced by seed(), and setSeed().