CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFCluster.h
Go to the documentation of this file.
1 #ifndef DataFormats_ParticleFlowReco_PFCluster_h
2 #define DataFormats_ParticleFlowReco_PFCluster_h
3 
5 
6 #include "Math/GenVector/PositionVector3D.h"
8 #include "Rtypes.h"
9 
12 
13 #include <iostream>
14 #include <vector>
15 
16 
17 
18 class PFClusterAlgo;
19 
20 namespace reco {
21 
42  class PFCluster : public CaloCluster {
43  public:
44 
45 
46  typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<Double32_t> > REPPoint;
47 
49 
52  double x, double y, double z );
53 
54 
55 
57  void reset();
58 
61 
63  const std::vector< reco::PFRecHitFraction >& recHitFractions() const
64  { return rechits_; }
65 
68 
70  PFLayer::Layer layer() const;
71 
73  double energy() const {return energy_;}
74 
76  const REPPoint& positionREP() const {return posrep_;}
77 
80  posrep_.SetCoordinates( position_.Rho(),
81  position_.Eta(),
82  position_.Phi() );
83  }
84 
86  static double getDepthCorrection(double energy, bool isBelowPS = false,
87  bool isHadron = false);
88 
90  void setColor(int color) {color_ = color;}
91 
93  int color() const {return color_;}
94 
95 
96  PFCluster& operator=(const PFCluster&);
97 
98  friend std::ostream& operator<<(std::ostream& out,
99  const PFCluster& cluster);
101  static unsigned instanceCounter_;
102 
104  static void setDepthCorParameters(int mode,
105  double a, double b,
106  double ap, double bp ) {
108  depthCorA_ = a;
109  depthCorB_ = b;
110  depthCorAp_ = ap;
111  depthCorBp_ = bp;
112  }
113 
114 
118 
120  double charge() const { return 0;}
121 
123  double pt() const {
124  return (energy() * sin(position_.theta()));
125  }
126 
128  double theta() const {
129  return position_.theta();
130  }
131 
133  math::XYZPoint const & vertex() const {
134  static math::XYZPoint dummyVtx(0,0,0);
135  return dummyVtx;
136  }
137  double vx() const { return vertex().x(); }
138  double vy() const { return vertex().y(); }
139  double vz() const { return vertex().z(); }
140 
141  private:
142 
144  std::vector< reco::PFRecHitFraction > rechits_;
145 
148 
149 
151  static int depthCorMode_;
152 
154  static double depthCorA_;
155 
157  static double depthCorB_ ;
158 
160  static double depthCorAp_;
161 
163  static double depthCorBp_;
164 
165 
167  int color_;
168 
169  friend class ::PFClusterAlgo;
170  };
171 }
172 
173 #endif
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:81
void setLayer(PFLayer::Layer layer)
set layer
Definition: PFCluster.cc:74
math::XYZPoint position_
cluster centroid position
Definition: CaloCluster.h:207
double energy_
cluster energy
Definition: CaloCluster.h:204
void setColor(int color)
set cluster color (for the PFRootEventManager display)
Definition: PFCluster.h:90
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
static void setDepthCorParameters(int mode, double a, double b, double ap, double bp)
Definition: PFCluster.h:104
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:144
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFCluster.h:46
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Fraction of a PFRecHit (rechits can be shared between several PFCluster&#39;s)
double pt() const
transverse momentum, massless approximation
Definition: PFCluster.h:123
PFCluster & operator=(const PFCluster &)
Definition: PFCluster.cc:88
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:157
double vx() const
Definition: PFCluster.h:137
Algorithm for particle flow clustering.
Definition: PFClusterAlgo.h:31
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:79
static double depthCorAp_
Definition: PFCluster.h:160
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:76
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:151
double vy() const
Definition: PFCluster.h:138
static double depthCorB_
Definition: PFCluster.h:157
void reset()
resets clusters parameters
Definition: PFCluster.cc:27
static double depthCorBp_
Definition: PFCluster.h:163
double energy() const
cluster energy
Definition: PFCluster.h:73
tuple out
Definition: dbtoconf.py:99
Layer
layer definition
Definition: PFLayer.h:31
static int depthCorMode_
Definition: PFCluster.h:151
static double getDepthCorrection(double energy, bool isBelowPS=false, bool isHadron=false)
Definition: PFCluster.cc:49
REPPoint posrep_
cluster position: rho, eta, phi (transient)
Definition: PFCluster.h:147
double vz() const
Definition: PFCluster.h:139
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
double b
Definition: hdecay.h:120
double theta() const
angle
Definition: PFCluster.h:128
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
Definition: PFCluster.cc:40
int color() const
Definition: PFCluster.h:93
double a
Definition: hdecay.h:121
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:133
int color_
color (transient)
Definition: PFCluster.h:167
friend std::ostream & operator<<(std::ostream &out, const PFCluster &cluster)
double charge() const
dummy charge
Definition: PFCluster.h:120
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
Definition: PFCluster.h:63
static double depthCorA_
Definition: PFCluster.h:154
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:154
static unsigned instanceCounter_
counter
Definition: PFCluster.h:101