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 
6 
7 #include "Math/GenVector/PositionVector3D.h"
9 #include "Rtypes.h"
10 
13 
14 #include <iostream>
15 #include <vector>
16 
17 
18 
19 class PFClusterAlgo;
20 
21 namespace reco {
22 
43  class PFCluster : public CaloCluster {
44  public:
45 
46  typedef std::vector<std::pair<CaloClusterPtr::key_type,edm::Ptr<PFCluster> > > EEtoPSAssociation;
47  typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<Double32_t> > REPPoint;
48 
50 
53  double x, double y, double z );
54 
56  void reset();
57 
60 
62  const std::vector< reco::PFRecHitFraction >& recHitFractions() const
63  { return rechits_; }
64 
67 
69  PFLayer::Layer layer() const;
70 
72  double energy() const {return energy_;}
73 
75  const REPPoint& positionREP() const {return posrep_;}
76 
79  posrep_.SetCoordinates( position_.Rho(),
80  position_.Eta(),
81  position_.Phi() );
82  }
83 
85  static double getDepthCorrection(double energy, bool isBelowPS = false,
86  bool isHadron = false);
87 
89  void setColor(int color) {color_ = color;}
90 
92  int color() const {return color_;}
93 
94 
95  PFCluster& operator=(const PFCluster&);
96 
97  friend std::ostream& operator<<(std::ostream& out,
98  const PFCluster& cluster);
99 
101  static void setDepthCorParameters(int mode,
102  double a, double b,
103  double ap, double bp ) {
105  depthCorA_ = a;
106  depthCorB_ = b;
107  depthCorAp_ = ap;
108  depthCorBp_ = bp;
109  }
110 
111 
115 
117  double charge() const { return 0;}
118 
120  double pt() const {
121  return (energy() * sin(position_.theta()));
122  }
123 
125  double theta() const {
126  return position_.theta();
127  }
128 
130  math::XYZPoint const & vertex() const {
131  return dummyVtx_;
132  }
133  double vx() const { return vertex().x(); }
134  double vy() const { return vertex().y(); }
135  double vz() const { return vertex().z(); }
136 
137  private:
138 
140  std::vector< reco::PFRecHitFraction > rechits_;
141 
144 
145 
147  static int depthCorMode_;
148 
150  static double depthCorA_;
151 
153  static double depthCorB_ ;
154 
156  static double depthCorAp_;
157 
159  static double depthCorBp_;
160 
161  static const math::XYZPoint dummyVtx_;
162 
164  int color_;
165 
166  friend class ::PFClusterAlgo;
167  };
168 }
169 
170 #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:209
double energy_
cluster energy
Definition: CaloCluster.h:205
void setColor(int color)
set cluster color (for the PFRootEventManager display)
Definition: PFCluster.h:89
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:43
static void setDepthCorParameters(int mode, double a, double b, double ap, double bp)
Definition: PFCluster.h:101
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
Definition: PFCluster.h:140
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFCluster.h:47
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:120
PFCluster & operator=(const PFCluster &)
Definition: PFCluster.cc:88
double z() const
z coordinate of cluster centroid
Definition: CaloCluster.h:158
double vx() const
Definition: PFCluster.h:133
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:78
static double depthCorAp_
Definition: PFCluster.h:156
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:75
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:46
static const math::XYZPoint dummyVtx_
Definition: PFCluster.h:161
double x() const
x coordinate of cluster centroid
Definition: CaloCluster.h:152
double vy() const
Definition: PFCluster.h:134
static double depthCorB_
Definition: PFCluster.h:153
void reset()
resets clusters parameters
Definition: PFCluster.cc:27
static double depthCorBp_
Definition: PFCluster.h:159
double energy() const
cluster energy
Definition: PFCluster.h:72
tuple out
Definition: dbtoconf.py:99
Layer
layer definition
Definition: PFLayer.h:31
static int depthCorMode_
Definition: PFCluster.h:147
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:143
double vz() const
Definition: PFCluster.h:135
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double b
Definition: hdecay.h:120
double theta() const
angle
Definition: PFCluster.h:125
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
Definition: PFCluster.cc:40
int color() const
Definition: PFCluster.h:92
double a
Definition: hdecay.h:121
math::XYZPoint const & vertex() const
dummy vertex access
Definition: PFCluster.h:130
int color_
color (transient)
Definition: PFCluster.h:164
friend std::ostream & operator<<(std::ostream &out, const PFCluster &cluster)
double charge() const
dummy charge
Definition: PFCluster.h:117
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
Definition: PFCluster.h:62
static double depthCorA_
Definition: PFCluster.h:150
double y() const
y coordinate of cluster centroid
Definition: CaloCluster.h:155