CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends
reco::PFCluster Class Reference

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

#include <PFCluster.h>

Inheritance diagram for reco::PFCluster:
reco::CaloCluster

Public Types

typedef
ROOT::Math::PositionVector3D
< ROOT::Math::CylindricalEta3D
< Double32_t > > 
REPPoint
 
- Public Types inherited from reco::CaloCluster
enum  AlgoId {
  island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3,
  multi5x5 = 4, particleFlow = 5, undefined = 1000
}
 
typedef AlgoId AlgoID
 
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...
 
int color () const
 
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...
 
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 setColor (int color)
 set cluster color (for the PFRootEventManager display) More...
 
void setLayer (PFLayer::Layer layer)
 set layer More...
 
double theta () const
 angle More...
 
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, 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 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 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)
 
static void setDepthCorParameters (int mode, double a, double b, double ap, double bp)
 

Static Public Attributes

static unsigned instanceCounter_ = 0
 counter More...
 

Private Attributes

int color_
 color (transient) More...
 
REPPoint posrep_
 cluster position: rho, eta, phi (transient) More...
 
std::vector
< reco::PFRecHitFraction
rechits_
 vector of rechit fractions (transient) More...
 

Static Private Attributes

static double depthCorA_ = 0.89
 
static double depthCorAp_ = 0.89
 
static double depthCorB_ = 7.3
 
static double depthCorBp_ = 4.0
 
static int depthCorMode_ = 0
 

Friends

class ::PFClusterAlgo
 
std::ostream & operator<< (std::ostream &out, const PFCluster &cluster)
 

Additional Inherited Members

- Protected Attributes inherited from reco::CaloCluster
AlgoID algoID_
 
CaloID caloID_
 bitmask for detector information More...
 
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

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

Definition at line 46 of file PFCluster.h.

Constructor & Destructor Documentation

reco::PFCluster::PFCluster ( )
inline

Definition at line 48 of file PFCluster.h.

CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:43
int color_
color (transient)
Definition: PFCluster.h:167
PFCluster::PFCluster ( PFLayer::Layer  layer,
double  energy,
double  x,
double  y,
double  z 
)

constructor

Definition at line 16 of file PFCluster.cc.

17  :
19  math::XYZPoint(x,y,z),
22  posrep_( position_.Rho(), position_.Eta(), position_.Phi() ),
23  color_(2)
24 { }
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:81
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:157
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:151
double energy() const
cluster energy
Definition: PFCluster.h:73
static reco::CaloID toCaloID(Layer layer)
Definition: PFLayer.cc:11
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
CaloCluster()
default constructor. Sets energy and position to zero
Definition: CaloCluster.h:43
int color_
color (transient)
Definition: PFCluster.h:167
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:154

Member Function Documentation

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

add a given fraction of the rechit

Definition at line 40 of file PFCluster.cc.

References reco::CaloCluster::addHitAndFraction(), reco::PFRecHitFraction::fraction(), reco::PFRecHitFraction::recHitRef(), and rechits_.

Referenced by PFClusterAlgo::buildPFClusters().

40  {
41 
42  rechits_.push_back( frac );
43 
44  addHitAndFraction( frac.recHitRef()->detId(),
45  frac.fraction() );
46 }
void addHitAndFraction(DetId id, float fraction)
Definition: CaloCluster.h:182
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:144
double fraction() const
const PFRecHitRef & recHitRef() const
copy
void reco::PFCluster::calculatePositionREP ( )
inline

computes posrep_ once and for all

Definition at line 79 of file PFCluster.h.

References reco::CaloCluster::position_, and posrep_.

Referenced by PFEnergyCalibration::energyEm(), PFElecTkProducer::isSharingEcalEnergyWithEgSC(), and ConvBremPFTrackFinder::runConvBremFinder().

79  {
80  posrep_.SetCoordinates( position_.Rho(),
81  position_.Eta(),
82  position_.Phi() );
83  }
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
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 120 of file PFCluster.h.

120 { return 0;}
int reco::PFCluster::color ( ) const
inline
Returns
color

Definition at line 93 of file PFCluster.h.

References color_.

Referenced by setColor().

93 {return color_;}
int color_
color (transient)
Definition: PFCluster.h:167
double reco::PFCluster::energy ( ) const
inline
double PFCluster::getDepthCorrection ( double  energy,
bool  isBelowPS = false,
bool  isHadron = false 
)
static

Definition at line 49 of file PFCluster.cc.

References depthCorA_, depthCorAp_, depthCorB_, depthCorBp_, and create_public_lumi_plots::log.

51 {
52  double corrA = depthCorA_;
53  double corrB = depthCorB_;
54  if (isBelowPS) {
55  corrA = depthCorAp_;
56  corrB = depthCorBp_;
57  }
58  double depth = 0;
59  switch(isHadron) {
60  case 0: // e/gamma
61  depth = corrA*(corrB + log(energy));
62  break;
63  case 1: // hadrons
64  depth = corrA;
65  break;
66  default:
67  assert(0);
68  // edm::LogError("PFCluster") << "unknown function for depth correction!"
69  // << std::endl;
70  }
71  return depth;
72 }
static double depthCorAp_
Definition: PFCluster.h:160
static double depthCorB_
Definition: PFCluster.h:157
static double depthCorBp_
Definition: PFCluster.h:163
double energy() const
cluster energy
Definition: PFCluster.h:73
static double depthCorA_
Definition: PFCluster.h:154
PFLayer::Layer PFCluster::layer ( ) const
PFCluster & PFCluster::operator= ( const PFCluster other)

Definition at line 88 of file PFCluster.cc.

References color_, reco::CaloCluster::energy_, operator=(), reco::CaloCluster::position_, posrep_, and rechits_.

88  {
89 
90  CaloCluster::operator=(other);
91  rechits_ = other.rechits_;
92  energy_ = other.energy_;
93  position_ = other.position_;
94  posrep_ = other.posrep_;
95  color_ = other.color_;
96 
97  return *this;
98 }
nocap nocap const skelname & operator=(const skelname &)
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
double energy_
cluster energy
Definition: CaloCluster.h:204
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:144
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
int color_
color (transient)
Definition: PFCluster.h:167
const REPPoint& reco::PFCluster::positionREP ( ) const
inline

cluster position: rho, eta, phi

Definition at line 76 of file PFCluster.h.

References posrep_.

Referenced by PFEnergyCalibration::energyEm(), CalibratableTest::extractCandidate(), KDTreeLinkerPSEcal::searchLinks(), PFBlockAlgo::testECALAndHCAL(), PFBlockAlgo::testHCALAndHO(), and LinkByRecHit::testTrackAndClusterByRecHit().

76 {return posrep_;}
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
double reco::PFCluster::pt ( ) const
inline

transverse momentum, massless approximation

Definition at line 123 of file PFCluster.h.

References energy(), reco::CaloCluster::position_, and funct::sin().

123  {
124  return (energy() * sin(position_.theta()));
125  }
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double energy() const
cluster energy
Definition: PFCluster.h:73
const std::vector< reco::PFRecHitFraction >& reco::PFCluster::recHitFractions ( ) const
inline

vector of rechit fractions

Definition at line 63 of file PFCluster.h.

References rechits_.

Referenced by LinkByRecHit::testECALAndPSByRecHit(), and LinkByRecHit::testTrackAndClusterByRecHit().

64  { return rechits_; }
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:144
void PFCluster::reset ( void  )

resets clusters parameters

Definition at line 27 of file PFCluster.cc.

References reco::CaloCluster::energy_, reco::CaloCluster::position_, posrep_, rechits_, and reco::CaloCluster::reset().

Referenced by BeautifulSoup.BeautifulStoneSoup::__init__().

27  {
28 
29  energy_ = 0;
30  position_ *= 0;
31  posrep_ *= 0;
32 
33  rechits_.clear();
34 
36 
37 }
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
double energy_
cluster energy
Definition: CaloCluster.h:204
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:144
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
void reset()
resets the CaloCluster (position, energy, hitsAndFractions)
Definition: CaloCluster.cc:11
void reco::PFCluster::setColor ( int  color)
inline

set cluster color (for the PFRootEventManager display)

Definition at line 90 of file PFCluster.h.

References color(), and color_.

90 {color_ = color;}
int color() const
Definition: PFCluster.h:93
int color_
color (transient)
Definition: PFCluster.h:167
static void reco::PFCluster::setDepthCorParameters ( int  mode,
double  a,
double  b,
double  ap,
double  bp 
)
inlinestatic

Definition at line 104 of file PFCluster.h.

References a, b, depthCorA_, depthCorAp_, depthCorB_, depthCorBp_, depthCorMode_, and alignBH_cfg::mode.

Referenced by PFClusterProducer::PFClusterProducer(), and PFRootEventManager::readOptions().

106  {
108  depthCorA_ = a;
109  depthCorB_ = b;
110  depthCorAp_ = ap;
111  depthCorBp_ = bp;
112  }
static double depthCorAp_
Definition: PFCluster.h:160
static double depthCorB_
Definition: PFCluster.h:157
static double depthCorBp_
Definition: PFCluster.h:163
static int depthCorMode_
Definition: PFCluster.h:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static double depthCorA_
Definition: PFCluster.h:154
void PFCluster::setLayer ( PFLayer::Layer  layer)

set layer

Definition at line 74 of file PFCluster.cc.

References reco::CaloCluster::caloID_, and PFLayer::toCaloID().

Referenced by PFClusterAlgo::calculateClusterPosition().

74  {
75  // cout<<"calling PFCluster::setLayer "<<layer<<endl;
77  // cout<<"done "<<caloID_<<endl;
78 }
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:81
CaloID caloID_
bitmask for detector information
Definition: CaloCluster.h:210
static reco::CaloID toCaloID(Layer layer)
Definition: PFLayer.cc:11
double reco::PFCluster::theta ( ) const
inline

angle

Definition at line 128 of file PFCluster.h.

References reco::CaloCluster::position_.

128  {
129  return position_.theta();
130  }
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
math::XYZPoint const& reco::PFCluster::vertex ( ) const
inline

dummy vertex access

Definition at line 133 of file PFCluster.h.

Referenced by vx(), vy(), and vz().

133  {
134  static math::XYZPoint dummyVtx(0,0,0);
135  return dummyVtx;
136  }
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
double reco::PFCluster::vx ( ) const
inline

Definition at line 137 of file PFCluster.h.

References vertex().

137 { return vertex().x(); }
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:133
double reco::PFCluster::vy ( ) const
inline

Definition at line 138 of file PFCluster.h.

References vertex().

138 { return vertex().y(); }
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:133
double reco::PFCluster::vz ( ) const
inline

Definition at line 139 of file PFCluster.h.

References vertex().

139 { return vertex().z(); }
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:133

Friends And Related Function Documentation

friend class ::PFClusterAlgo
friend

Definition at line 169 of file PFCluster.h.

std::ostream& operator<< ( std::ostream &  out,
const PFCluster cluster 
)
friend

Member Data Documentation

int reco::PFCluster::color_
private

color (transient)

Definition at line 167 of file PFCluster.h.

Referenced by color(), operator=(), and setColor().

double PFCluster::depthCorA_ = 0.89
staticprivate
double PFCluster::depthCorAp_ = 0.89
staticprivate
double PFCluster::depthCorB_ = 7.3
staticprivate
double PFCluster::depthCorBp_ = 4.0
staticprivate
int PFCluster::depthCorMode_ = 0
staticprivate

Definition at line 151 of file PFCluster.h.

Referenced by PFClusterAlgo::calculateClusterPosition(), and setDepthCorParameters().

unsigned PFCluster::instanceCounter_ = 0
static

counter

Definition at line 101 of file PFCluster.h.

REPPoint reco::PFCluster::posrep_
private

cluster position: rho, eta, phi (transient)

Definition at line 147 of file PFCluster.h.

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

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

vector of rechit fractions (transient)

Definition at line 144 of file PFCluster.h.

Referenced by addRecHitFraction(), PFClusterAlgo::calculateClusterPosition(), operator=(), recHitFractions(), and reset().