CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
reco::PFCluster Class Reference

Particle flow cluster, see clustering algorithm in PFClusterAlgo. More...

#include <PFCluster.h>

Inheritance diagram for reco::PFCluster:
reco::CaloCluster reco::HGCalMultiCluster reco::PFSuperCluster

Public Types

typedef std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
 
typedef ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
 
- 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 addRecHitFraction (const reco::PFRecHitFraction &frac)
 add a given fraction of the rechit More...
 
void calculatePositionREP ()
 computes posrep_ once and for all More...
 
double charge () const
 dummy charge More...
 
double depth () const
 cluster depth More...
 
double energy () const
 cluster energy More...
 
PFLayer::Layer layer () const
 cluster layer, see PFLayer.h in this directory More...
 
PFClusteroperator= (const PFCluster &)
 
 PFCluster ()
 
 PFCluster (PFLayer::Layer layer, double energy, double x, double y, double z)
 constructor More...
 
const REPPointpositionREP () const
 cluster position: rho, eta, phi More...
 
template<typename pruner >
void pruneUsing (pruner prune)
 
double pt () const
 transverse momentum, massless approximation More...
 
const std::vector< reco::PFRecHitFraction > & recHitFractions () const
 vector of rechit fractions More...
 
void reset ()
 resets clusters parameters More...
 
void resetHitsAndFractions ()
 reset only hits and fractions More...
 
void setDepth (double depth)
 
void setLayer (PFLayer::Layer layer)
 set layer More...
 
void setTime (float time, float timeError=0)
 
void setTimeError (float timeError)
 
double theta () const
 angle More...
 
float time () const
 
float timeError () const
 
math::XYZPoint const & vertex () const
 dummy vertex access More...
 
double vx () const
 
double vy () const
 
double vz () const
 
- 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)
 constructor from values More...
 
 CaloCluster (double energy, const math::XYZPoint &position, const CaloID &caloID)
 
 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...
 

Static Public Member Functions

static double getDepthCorrection (double energy, bool isBelowPS=false, bool isHadron=false)
 

Private Attributes

double depth_
 
PFLayer::Layer layer_
 transient layer More...
 
REPPoint posrep_
 cluster position: rho, eta, phi (transient) More...
 
std::vector< reco::PFRecHitFractionrechits_
 vector of rechit fractions (transient) More...
 
float time_
 Michalis: add timing and depth information. More...
 
float timeError_
 

Static Private Attributes

static const constexpr double depthCorA_ = 0.89
 depth corrections More...
 
static const constexpr double depthCorAp_ = 0.89
 
static const constexpr double depthCorB_ = 7.3
 
static const constexpr double depthCorBp_ = 4.0
 
static const math::XYZPoint dummyVtx_
 

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

Particle flow cluster, see clustering algorithm in PFClusterAlgo.

A particle flow cluster is defined by its energy and position, which are calculated from a vector of PFRecHitFraction. This calculation is performed in PFClusterAlgo.

Author
Colin Bernet
Date
July 2006

Definition at line 42 of file PFCluster.h.

Member Typedef Documentation

◆ EEtoPSAssociation

Definition at line 44 of file PFCluster.h.

◆ REPPoint

typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<double> > reco::PFCluster::REPPoint

Definition at line 48 of file PFCluster.h.

Constructor & Destructor Documentation

◆ PFCluster() [1/2]

reco::PFCluster::PFCluster ( )
inline

Definition at line 50 of file PFCluster.h.

◆ PFCluster() [2/2]

PFCluster::PFCluster ( PFLayer::Layer  layer,
double  energy,
double  x,
double  y,
double  z 
)

constructor

Definition at line 10 of file PFCluster.cc.

12  posrep_(position_.Rho(), position_.Eta(), position_.Phi()),
13  time_(-99.),
14  depth_(0.),
15  layer_(layer) {}

Member Function Documentation

◆ addRecHitFraction()

void PFCluster::addRecHitFraction ( const reco::PFRecHitFraction frac)

◆ calculatePositionREP()

void reco::PFCluster::calculatePositionREP ( )
inline

◆ charge()

double reco::PFCluster::charge ( ) const
inline

dummy charge

some classes to make this fit into a template footprint for RecoPFClusterRefCandidate so we can make jets and MET out of PFClusters.

Definition at line 107 of file PFCluster.h.

107 { return 0; }

◆ depth()

double reco::PFCluster::depth ( ) const
inline

cluster depth

Definition at line 82 of file PFCluster.h.

82 { return depth_; }

References depth_.

Referenced by PFMultiDepthClusterizer::link(), and setDepth().

◆ energy()

double reco::PFCluster::energy ( ) const
inline

◆ getDepthCorrection()

double PFCluster::getDepthCorrection ( double  energy,
bool  isBelowPS = false,
bool  isHadron = false 
)
static

Definition at line 39 of file PFCluster.cc.

39  {
40  double corrA = depthCorA_;
41  double corrB = depthCorB_;
42  if (isBelowPS) {
43  corrA = depthCorAp_;
44  corrB = depthCorBp_;
45  }
46  return isHadron ? corrA : corrA * (corrB + log(energy));
47 }

References depthCorA_, depthCorAp_, depthCorB_, depthCorBp_, energy(), and dqm-mbProfile::log.

Referenced by l1tpf::propagateToCalo(), and LowPtGsfElectronSeedProducer::propagateTrackToCalo().

◆ layer()

PFLayer::Layer PFCluster::layer ( ) const

◆ operator=()

PFCluster & PFCluster::operator= ( const PFCluster other)

Definition at line 63 of file PFCluster.cc.

63  {
64  CaloCluster::operator=(other);
65  rechits_ = other.rechits_;
66  energy_ = other.energy_;
67  position_ = other.position_;
68  posrep_ = other.posrep_;
69 
70  return *this;
71 }

References reco::CaloCluster::energy_, trackingPlots::other, reco::CaloCluster::position_, posrep_, and rechits_.

Referenced by reco::PFSuperCluster::operator=().

◆ positionREP()

const REPPoint& reco::PFCluster::positionREP ( ) const
inline

◆ pruneUsing()

template<typename pruner >
void reco::PFCluster::pruneUsing ( pruner  prune)
inline

Definition at line 123 of file PFCluster.h.

123  {
124  // remove_if+erase algo applied to both vectors...
125  auto iter = std::find_if_not(rechits_.begin(), rechits_.end(), prune);
126  if (iter == rechits_.end())
127  return;
128  auto first = iter - rechits_.begin();
129  for (auto i = first; ++i < int(rechits_.size());) {
130  if (prune(rechits_[i])) {
133  ++first;
134  }
135  }
136  rechits_.erase(rechits_.begin() + first, rechits_.end());
138  }

References dqmdumpme::first, reco::CaloCluster::hitsAndFractions_, mps_fire::i, createfilelist::int, eostools::move(), and rechits_.

◆ pt()

double reco::PFCluster::pt ( ) const
inline

◆ recHitFractions()

const std::vector<reco::PFRecHitFraction>& reco::PFCluster::recHitFractions ( ) const
inline

◆ reset()

void PFCluster::reset ( void  )

resets clusters parameters

Definition at line 17 of file PFCluster.cc.

17  {
18  energy_ = 0;
19  position_ *= 0;
20  posrep_ *= 0;
21  time_ = -99.;
23  rechits_.clear();
24 
26 }

References reco::CaloCluster::energy_, layer_, PFLayer::NONE, reco::CaloCluster::position_, posrep_, rechits_, reco::CaloCluster::reset(), and time_.

Referenced by Basic2DClusterForEachSeed::buildClusters(), and reco::PFSuperCluster::reset().

◆ resetHitsAndFractions()

void PFCluster::resetHitsAndFractions ( )

reset only hits and fractions

Definition at line 28 of file PFCluster.cc.

28  {
29  rechits_.clear();
30  hitsAndFractions_.clear();
31 }

References reco::CaloCluster::hitsAndFractions_, and rechits_.

◆ setDepth()

void reco::PFCluster::setDepth ( double  depth)
inline

◆ setLayer()

void PFCluster::setLayer ( PFLayer::Layer  layer)

◆ setTime()

void reco::PFCluster::setTime ( float  time,
float  timeError = 0 
)
inline

◆ setTimeError()

void reco::PFCluster::setTimeError ( float  timeError)
inline

◆ theta()

double reco::PFCluster::theta ( ) const
inline

angle

Definition at line 113 of file PFCluster.h.

113 { return position_.theta(); }

References reco::CaloCluster::position_.

Referenced by Tau.Tau::zImpact().

◆ time()

float reco::PFCluster::time ( ) const
inline
Returns
cluster time

Definition at line 77 of file PFCluster.h.

77 { return time_; }

References time_.

Referenced by PFlow2DClusterizerWithTime::dist2Time(), and setTime().

◆ timeError()

float reco::PFCluster::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 79 of file PFCluster.h.

79 { return timeError_; }

References timeError_.

Referenced by setTime(), and setTimeError().

◆ vertex()

math::XYZPoint const& reco::PFCluster::vertex ( ) const
inline

dummy vertex access

Definition at line 116 of file PFCluster.h.

116 { return dummyVtx_; }

References dummyVtx_.

Referenced by Tau.Tau::dxy(), vx(), vy(), and vz().

◆ vx()

double reco::PFCluster::vx ( ) const
inline

Definition at line 117 of file PFCluster.h.

117 { return vertex().x(); }

References vertex().

◆ vy()

double reco::PFCluster::vy ( ) const
inline

Definition at line 118 of file PFCluster.h.

118 { return vertex().y(); }

References vertex().

◆ vz()

double reco::PFCluster::vz ( ) const
inline

Definition at line 119 of file PFCluster.h.

119 { return vertex().z(); }

References vertex().

Member Data Documentation

◆ depth_

double reco::PFCluster::depth_
private

Definition at line 150 of file PFCluster.h.

Referenced by depth(), and setDepth().

◆ depthCorA_

const constexpr double reco::PFCluster::depthCorA_ = 0.89
staticconstexprprivate

depth corrections

Definition at line 156 of file PFCluster.h.

Referenced by getDepthCorrection().

◆ depthCorAp_

const constexpr double reco::PFCluster::depthCorAp_ = 0.89
staticconstexprprivate

Definition at line 158 of file PFCluster.h.

Referenced by getDepthCorrection().

◆ depthCorB_

const constexpr double reco::PFCluster::depthCorB_ = 7.3
staticconstexprprivate

Definition at line 157 of file PFCluster.h.

Referenced by getDepthCorrection().

◆ depthCorBp_

const constexpr double reco::PFCluster::depthCorBp_ = 4.0
staticconstexprprivate

Definition at line 159 of file PFCluster.h.

Referenced by getDepthCorrection().

◆ dummyVtx_

const math::XYZPoint PFCluster::dummyVtx_
staticprivate

Definition at line 161 of file PFCluster.h.

Referenced by vertex().

◆ layer_

PFLayer::Layer reco::PFCluster::layer_
private

transient layer

Definition at line 153 of file PFCluster.h.

Referenced by layer(), reset(), and setLayer().

◆ posrep_

REPPoint reco::PFCluster::posrep_
private

cluster position: rho, eta, phi (transient)

Definition at line 146 of file PFCluster.h.

Referenced by calculatePositionREP(), operator=(), positionREP(), and reset().

◆ rechits_

std::vector<reco::PFRecHitFraction> reco::PFCluster::rechits_
private

vector of rechit fractions (transient)

Definition at line 143 of file PFCluster.h.

Referenced by addRecHitFraction(), operator=(), pruneUsing(), recHitFractions(), reset(), and resetHitsAndFractions().

◆ time_

float reco::PFCluster::time_
private

Michalis: add timing and depth information.

Definition at line 149 of file PFCluster.h.

Referenced by reset(), setTime(), and time().

◆ timeError_

float reco::PFCluster::timeError_
private

Definition at line 149 of file PFCluster.h.

Referenced by setTime(), setTimeError(), and timeError().

reco::CaloCluster::y
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:175
mps_fire.i
i
Definition: mps_fire.py:428
reco::CaloCluster::CaloCluster
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:57
reco::PFCluster::layer
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:56
PFLayer::toCaloID
static reco::CaloID toCaloID(Layer layer)
Definition: PFLayer.cc:11
reco::PFCluster::time
float time() const
Definition: PFCluster.h:77
reco::CaloCluster::z
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:178
reco::PFCluster::timeError
float timeError() const
Definition: PFCluster.h:79
dqmdumpme.first
first
Definition: dqmdumpme.py:55
reco::CaloCluster::hitsAndFractions_
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:234
reco::PFCluster::layer_
PFLayer::Layer layer_
transient layer
Definition: PFCluster.h:153
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
reco::CaloCluster::position_
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:228
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:74
reco::CaloCluster::caloID_
CaloID caloID_
bitmask for detector information
Definition: CaloCluster.h:231
DivergingColor.frac
float frac
Definition: DivergingColor.py:175
reco::PFCluster::depthCorAp_
static const constexpr double depthCorAp_
Definition: PFCluster.h:158
reco::PFCluster::depth
double depth() const
cluster depth
Definition: PFCluster.h:82
reco::CaloCluster::reset
void reset()
resets the CaloCluster (position, energy, hitsAndFractions)
Definition: CaloCluster.cc:9
trackingPlots.other
other
Definition: trackingPlots.py:1467
PFLayer::NONE
Definition: PFLayer.h:34
reco::PFCluster::depth_
double depth_
Definition: PFCluster.h:150
reco::PFCluster::rechits_
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:143
reco::PFCluster::depthCorB_
static const constexpr double depthCorB_
Definition: PFCluster.h:157
reco::PFCluster::depthCorA_
static const constexpr double depthCorA_
depth corrections
Definition: PFCluster.h:156
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::PFCluster::dummyVtx_
static const math::XYZPoint dummyVtx_
Definition: PFCluster.h:161
reco::CaloCluster::addHitAndFraction
void addHitAndFraction(DetId id, float fraction)
Definition: CaloCluster.h:203
createfilelist.int
int
Definition: createfilelist.py:10
reco::CaloCluster::particleFlow
Definition: CaloCluster.h:39
reco::PFCluster::depthCorBp_
static const constexpr double depthCorBp_
Definition: PFCluster.h:159
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::PFCluster::time_
float time_
Michalis: add timing and depth information.
Definition: PFCluster.h:149
reco::PFCluster::vertex
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:116
reco::CaloCluster::energy_
double energy_
cluster energy
Definition: CaloCluster.h:223
reco::CaloCluster::caloID
const CaloID & caloID() const
Definition: CaloCluster.h:201
reco::PFCluster::posrep_
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:146
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
reco::CaloCluster::x
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:172
PFLayer::fromCaloID
static Layer fromCaloID(const reco::CaloID &id)
Definition: PFLayer.cc:38
reco::PFCluster::timeError_
float timeError_
Definition: PFCluster.h:149