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 | Private Member Functions | Private Attributes | Static Private Attributes | Friends
reco::PFRecHit Class Reference

Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClusterAlgo. More...

#include <PFRecHit.h>

Public Types

enum  { NONE =0 }
 
typedef
ROOT::Math::PositionVector3D
< ROOT::Math::CylindricalEta3D
< Double32_t > > 
REPPoint
 
typedef std::vector< REPPointREPPointVector
 

Public Member Functions

void add4Neighbour (unsigned index)
 
void add8Neighbour (unsigned index)
 
void calculatePositionREP ()
 calculates rho eta phi position once and for all More...
 
void clearNeighbours ()
 
unsigned detId () const
 rechit detId More...
 
double energy () const
 rechit energy More...
 
double energyUp () const
 For HF hits: rechit energy (and neighbour's) in the other HF layer. More...
 
const math::XYZVectorgetAxisXYZ () const
 rechit cell axis x, y, z More...
 
const REPPointVectorgetCornersREP () const
 rechit corners More...
 
const std::vector
< math::XYZPoint > & 
getCornersXYZ () const
 rechit corners More...
 
bool isNeighbour4 (unsigned id) const
 
bool isNeighbour8 (unsigned id) const
 
PFLayer::Layer layer () const
 rechit layer More...
 
const std::vector< unsigned > & neighbours4 () const
 
const std::vector< unsigned > & neighbours8 () const
 
const std::vector< unsigned > & neighboursIds4 () const
 
const std::vector< unsigned > & neighboursIds8 () const
 
bool operator< (const PFRecHit &rhs) const
 comparison < operator More...
 
bool operator<= (const PFRecHit &rhs) const
 comparison <= operator More...
 
bool operator> (const PFRecHit &rhs) const
 comparison > operator More...
 
bool operator>= (const PFRecHit &rhs) const
 comparison >= operator More...
 
 PFRecHit ()
 default constructor. Sets energy and position to zero More...
 
 PFRecHit (unsigned detId, PFLayer::Layer layer, double energy, const math::XYZPoint &posxyz, const math::XYZVector &axisxyz, const std::vector< math::XYZPoint > &cornersxyz)
 constructor from values More...
 
 PFRecHit (unsigned detId, PFLayer::Layer layer, double energy, double posx, double posy, double posz, double axisx, double axisy, double axisz)
 
 PFRecHit (const PFRecHit &other)
 copy More...
 
const math::XYZPointposition () const
 is seed ? More...
 
const REPPointpositionREP () const
 rechit cell centre rho, eta, phi. call calculatePositionREP before ! More...
 
double pt2 () const
 rechit momentum transverse to the beam, squared. More...
 
double rescale () const
 rescaling factor (obsolete) More...
 
void setEnergy (double energy)
 
void setEnergyUp (double eUp)
 
void setNECorner (double posx, double posy, double posz)
 
void setNWCorner (double posx, double posy, double posz)
 search for pointers to neighbours, using neighbours' DetId. More...
 
void setRescale (double factor)
 
void setSECorner (double posx, double posy, double posz)
 
void setSWCorner (double posx, double posy, double posz)
 
void size (double &deta, double &dphi) const
 
double time () const
 timing for cleaned hits More...
 
virtual ~PFRecHit ()
 destructor More...
 

Private Member Functions

void setCorner (unsigned i, double posx, double posy, double posz)
 set position of one of the corners More...
 

Private Attributes

math::XYZVector axisxyz_
 rechit cell axisxyz More...
 
REPPointVector cornersrep_
 
std::vector< math::XYZPointcornersxyz_
 rechit cell corners More...
 
unsigned detId_
 C cell detid - should be detid or index in collection ? More...
 
double energy_
 rechit energy More...
 
double energyUp_
 For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM) More...
 
PFLayer::Layer layer_
 rechit layer More...
 
std::vector< unsigned > neighbours4_
 indices to existing neighbours (1 common side) More...
 
std::vector< unsigned > neighbours8_
 indices to existing neighbours (1 common side or diagonal) More...
 
std::vector< unsigned > neighboursIds4_
 detids of existing neighbours (1 common side) More...
 
std::vector< unsigned > neighboursIds8_
 detids of existing neighbours (1 common side or diagonal) More...
 
math::XYZPoint position_
 is this a seed ? (-1:unknown, 0:no, 1 yes) (transient) More...
 
REPPoint posrep_
 rechit cell centre: rho, eta, phi (transient) More...
 
double rescale_
 Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) More...
 

Static Private Attributes

static const unsigned nCorners_ = 4
 number of corners More...
 
static const unsigned nNeighbours_ = 8
 number of neighbours More...
 

Friends

std::ostream & operator<< (std::ostream &out, const reco::PFRecHit &hit)
 

Detailed Description

Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClusterAlgo.

Author
Colin Bernet
Date
July 2006

Definition at line 31 of file PFRecHit.h.

Member Typedef Documentation

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

Definition at line 39 of file PFRecHit.h.

Definition at line 41 of file PFRecHit.h.

Member Enumeration Documentation

anonymous enum
Enumerator
NONE 

Definition at line 35 of file PFRecHit.h.

35  {
36  NONE=0
37  };

Constructor & Destructor Documentation

PFRecHit::PFRecHit ( )

default constructor. Sets energy and position to zero

Definition at line 9 of file PFRecHit.cc.

References cornersrep_, cornersxyz_, reco::tau::disc::Eta(), i, nCorners_, colinearityKinematic::Phi, and position_.

9  :
10  detId_(0),
12  energy_(0.),
13  rescale_(1.),
14  energyUp_(0.),
15  // seedState_(-1),
16  position_(math::XYZPoint(0.,0.,0.)),
17  posrep_(REPPoint(0.,0.,0.)) {
18 
19  cornersxyz_.reserve( nCorners_ );
20  for(unsigned i=0; i<nCorners_; i++) {
21  cornersxyz_.push_back( position_ );
22  }
23 
24  cornersrep_.reserve( nCorners_ );
25  for ( unsigned i=0; i<nCorners_; ++i ) {
26  cornersrep_.push_back(
27  REPPoint(cornersxyz_[i].Rho(),
28  cornersxyz_[i].Eta(),
29  cornersxyz_[i].Phi() ) );
30  }
31 
32 }
int i
Definition: DBlmapReader.cc:9
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFRecHit.h:39
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
unsigned detId_
C cell detid - should be detid or index in collection ?
Definition: PFRecHit.h:204
PFLayer::Layer layer_
rechit layer
Definition: PFRecHit.h:207
double energy_
rechit energy
Definition: PFRecHit.h:210
REPPointVector cornersrep_
Definition: PFRecHit.h:232
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static const unsigned nCorners_
number of corners
Definition: PFRecHit.h:250
PFRecHit::PFRecHit ( unsigned  detId,
PFLayer::Layer  layer,
double  energy,
const math::XYZPoint posxyz,
const math::XYZVector axisxyz,
const std::vector< math::XYZPoint > &  cornersxyz 
)

constructor from values

Definition at line 35 of file PFRecHit.cc.

References cornersrep_, cornersxyz_, reco::tau::disc::Eta(), i, nCorners_, and colinearityKinematic::Phi.

40  :
41  detId_(detId),
42  layer_(layer),
43  energy_(energy),
44  rescale_(1.),
45  energyUp_(0.),
46  // seedState_(-1),
48  posrep_( position.Rho(), position.Eta(), position.Phi() ),
49  axisxyz_(axisxyz),
50  cornersxyz_(cornersxyz)
51 {
52  cornersrep_.reserve( nCorners_ );
53  for ( unsigned i=0; i<nCorners_; ++i ) {
54  cornersrep_.push_back(
55  REPPoint(cornersxyz_[i].Rho(),
56  cornersxyz_[i].Eta(),
57  cornersxyz_[i].Phi() ) );
58  }
59 }
int i
Definition: DBlmapReader.cc:9
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFRecHit.h:39
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
unsigned detId_
C cell detid - should be detid or index in collection ?
Definition: PFRecHit.h:204
unsigned detId() const
rechit detId
Definition: PFRecHit.h:105
PFLayer::Layer layer_
rechit layer
Definition: PFRecHit.h:207
double energy_
rechit energy
Definition: PFRecHit.h:210
PFLayer::Layer layer() const
rechit layer
Definition: PFRecHit.h:108
math::XYZVector axisxyz_
rechit cell axisxyz
Definition: PFRecHit.h:228
REPPointVector cornersrep_
Definition: PFRecHit.h:232
const math::XYZPoint & position() const
is seed ?
Definition: PFRecHit.h:141
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
double energy() const
rechit energy
Definition: PFRecHit.h:111
static const unsigned nCorners_
number of corners
Definition: PFRecHit.h:250
PFRecHit::PFRecHit ( unsigned  detId,
PFLayer::Layer  layer,
double  energy,
double  posx,
double  posy,
double  posz,
double  axisx,
double  axisy,
double  axisz 
)

Definition at line 61 of file PFRecHit.cc.

References cornersrep_, cornersxyz_, reco::tau::disc::Eta(), i, nCorners_, colinearityKinematic::Phi, and position_.

65  :
66 
67  detId_(detId),
68  layer_(layer),
69  energy_(energy),
70  rescale_(1.),
71  energyUp_(0.),
72  // seedState_(-1),
73  position_(posx, posy, posz),
74  posrep_( position_.Rho(),
75  position_.Eta(),
76  position_.Phi() ),
77  axisxyz_(axisx, axisy, axisz) {
78 
79 
80  cornersxyz_.reserve( nCorners_ );
81  for(unsigned i=0; i<nCorners_; i++) {
82  cornersxyz_.push_back( position_ );
83  }
84 
85  cornersrep_.reserve( nCorners_ );
86  for ( unsigned i=0; i<nCorners_; ++i ) {
87  cornersrep_.push_back(
88  REPPoint(cornersxyz_[i].Rho(),
89  cornersxyz_[i].Eta(),
90  cornersxyz_[i].Phi() ) );
91  }
92 
93 }
int i
Definition: DBlmapReader.cc:9
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFRecHit.h:39
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
unsigned detId_
C cell detid - should be detid or index in collection ?
Definition: PFRecHit.h:204
unsigned detId() const
rechit detId
Definition: PFRecHit.h:105
PFLayer::Layer layer_
rechit layer
Definition: PFRecHit.h:207
double energy_
rechit energy
Definition: PFRecHit.h:210
PFLayer::Layer layer() const
rechit layer
Definition: PFRecHit.h:108
math::XYZVector axisxyz_
rechit cell axisxyz
Definition: PFRecHit.h:228
REPPointVector cornersrep_
Definition: PFRecHit.h:232
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
double energy() const
rechit energy
Definition: PFRecHit.h:111
static const unsigned nCorners_
number of corners
Definition: PFRecHit.h:250
PFRecHit::PFRecHit ( const PFRecHit other)

copy

Definition at line 96 of file PFRecHit.cc.

96  :
97  detId_(other.detId_),
98  layer_(other.layer_),
99  energy_(other.energy_),
100  rescale_(other.rescale_),
101  energyUp_(other.energyUp_),
102  // seedState_(other.seedState_),
103  position_(other.position_),
104  posrep_(other.posrep_),
105  axisxyz_(other.axisxyz_),
106  cornersxyz_(other.cornersxyz_),
107  cornersrep_(other.cornersrep_),
108  // neighbours_(other.neighbours_),
109  neighbours4_(other.neighbours4_),
110  neighbours8_(other.neighbours8_),
113 {}
std::vector< unsigned > neighbours4_
indices to existing neighbours (1 common side)
Definition: PFRecHit.h:235
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
unsigned detId_
C cell detid - should be detid or index in collection ?
Definition: PFRecHit.h:204
PFLayer::Layer layer_
rechit layer
Definition: PFRecHit.h:207
double energy_
rechit energy
Definition: PFRecHit.h:210
math::XYZVector axisxyz_
rechit cell axisxyz
Definition: PFRecHit.h:228
std::vector< unsigned > neighboursIds4_
detids of existing neighbours (1 common side)
Definition: PFRecHit.h:241
std::vector< unsigned > neighbours8_
indices to existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:238
REPPointVector cornersrep_
Definition: PFRecHit.h:232
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
std::vector< unsigned > neighboursIds8_
detids of existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:244
PFRecHit::~PFRecHit ( )
virtual

destructor

Definition at line 116 of file PFRecHit.cc.

117 {}

Member Function Documentation

void PFRecHit::add4Neighbour ( unsigned  index)
void PFRecHit::add8Neighbour ( unsigned  index)
void PFRecHit::calculatePositionREP ( )

calculates rho eta phi position once and for all

Definition at line 130 of file PFRecHit.cc.

References cornersrep_, cornersxyz_, reco::tau::disc::Eta(), i, nCorners_, colinearityKinematic::Phi, position_, and posrep_.

130  {
131  posrep_.SetCoordinates( position_.Rho(), position_.Eta(), position_.Phi() );
132  for ( unsigned i=0; i<nCorners_; ++i ) {
133  cornersrep_[i].SetCoordinates(cornersxyz_[i].Rho(),cornersxyz_[i].Eta(),cornersxyz_[i].Phi() );
134  }
135 }
int i
Definition: DBlmapReader.cc:9
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
REPPointVector cornersrep_
Definition: PFRecHit.h:232
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
static const unsigned nCorners_
number of corners
Definition: PFRecHit.h:250
void reco::PFRecHit::clearNeighbours ( )
inline

Definition at line 82 of file PFRecHit.h.

References neighbours4_, and neighbours8_.

Referenced by PFRootEventManager::setRecHitNeigbours().

82  {
83  neighbours4_.clear();
84  neighbours8_.clear();
85  neighbours4_.reserve(4);
86  neighbours8_.reserve(8);
87  }
std::vector< unsigned > neighbours4_
indices to existing neighbours (1 common side)
Definition: PFRecHit.h:235
std::vector< unsigned > neighbours8_
indices to existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:238
unsigned reco::PFRecHit::detId ( ) const
inline
double reco::PFRecHit::energy ( ) const
inline
double reco::PFRecHit::energyUp ( ) const
inline

For HF hits: rechit energy (and neighbour's) in the other HF layer.

Definition at line 120 of file PFRecHit.h.

References energyUp_.

Referenced by PFClusterAlgo::findSeeds().

120 { return energyUp_; }
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
const math::XYZVector& reco::PFRecHit::getAxisXYZ ( ) const
inline

rechit cell axis x, y, z

Definition at line 147 of file PFRecHit.h.

References axisxyz_.

Referenced by PFClusterAlgo::calculateClusterPosition().

147 { return axisxyz_; }
math::XYZVector axisxyz_
rechit cell axisxyz
Definition: PFRecHit.h:228
const REPPointVector& reco::PFRecHit::getCornersREP ( ) const
inline

rechit corners

Definition at line 154 of file PFRecHit.h.

References cornersrep_.

Referenced by LinkByRecHit::testTrackAndClusterByRecHit().

155  { return cornersrep_; }
REPPointVector cornersrep_
Definition: PFRecHit.h:232
const std::vector< math::XYZPoint >& reco::PFRecHit::getCornersXYZ ( ) const
inline

rechit corners

Definition at line 150 of file PFRecHit.h.

References cornersxyz_.

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

151  { return cornersxyz_; }
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
bool PFRecHit::isNeighbour4 ( unsigned  id) const

is rechit 'id' a direct neighbour of this ? id is the rechit index ! not the detId

Definition at line 248 of file PFRecHit.cc.

References i, and neighbours4_.

Referenced by PFClusterAlgo::calculateClusterPosition().

248  {
249 
250  for(unsigned i=0; i<neighbours4_.size(); i++ )
251  if( id == neighbours4_[i] ) return true;
252 
253  return false;
254 }
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned > neighbours4_
indices to existing neighbours (1 common side)
Definition: PFRecHit.h:235
bool PFRecHit::isNeighbour8 ( unsigned  id) const

is rechit 'id' a neighbour of this ? id is the rechit index ! not the detId

Definition at line 257 of file PFRecHit.cc.

References i, and neighbours8_.

Referenced by PFClusterAlgo::calculateClusterPosition().

257  {
258 
259  for(unsigned i=0; i<neighbours8_.size(); i++ )
260  if( id == neighbours8_[i] ) return true;
261 
262  return false;
263 }
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned > neighbours8_
indices to existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:238
PFLayer::Layer reco::PFRecHit::layer ( ) const
inline
const std::vector< unsigned >& reco::PFRecHit::neighbours4 ( ) const
inline

Definition at line 157 of file PFRecHit.h.

References neighbours4_.

Referenced by PFClusterAlgo::buildTopoCluster(), PFClusterAlgo::cleanRBXAndHPD(), and PFClusterAlgo::findSeeds().

158  {return neighbours4_;}
std::vector< unsigned > neighbours4_
indices to existing neighbours (1 common side)
Definition: PFRecHit.h:235
const std::vector< unsigned >& reco::PFRecHit::neighbours8 ( ) const
inline

Definition at line 160 of file PFRecHit.h.

References neighbours8_.

Referenced by PFClusterAlgo::buildTopoCluster(), and PFClusterAlgo::findSeeds().

161  {return neighbours8_;}
std::vector< unsigned > neighbours8_
indices to existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:238
const std::vector< unsigned >& reco::PFRecHit::neighboursIds4 ( ) const
inline

Definition at line 163 of file PFRecHit.h.

References neighboursIds4_.

Referenced by PFRootEventManager::setRecHitNeigbours().

164  {return neighboursIds4_;}
std::vector< unsigned > neighboursIds4_
detids of existing neighbours (1 common side)
Definition: PFRecHit.h:241
const std::vector< unsigned >& reco::PFRecHit::neighboursIds8 ( ) const
inline

Definition at line 166 of file PFRecHit.h.

References neighboursIds8_.

Referenced by PFRootEventManager::setRecHitNeigbours().

167  {return neighboursIds8_;}
std::vector< unsigned > neighboursIds8_
detids of existing neighbours (1 common side or diagonal)
Definition: PFRecHit.h:244
bool reco::PFRecHit::operator< ( const PFRecHit rhs) const
inline

comparison < operator

Definition at line 196 of file PFRecHit.h.

References energy_.

196 { return (energy_< rhs.energy_); }
double energy_
rechit energy
Definition: PFRecHit.h:210
bool reco::PFRecHit::operator<= ( const PFRecHit rhs) const
inline

comparison <= operator

Definition at line 193 of file PFRecHit.h.

References energy_.

193 { return (energy_<=rhs.energy_); }
double energy_
rechit energy
Definition: PFRecHit.h:210
bool reco::PFRecHit::operator> ( const PFRecHit rhs) const
inline

comparison > operator

Definition at line 190 of file PFRecHit.h.

References energy_.

190 { return (energy_> rhs.energy_); }
double energy_
rechit energy
Definition: PFRecHit.h:210
bool reco::PFRecHit::operator>= ( const PFRecHit rhs) const
inline

comparison >= operator

Definition at line 187 of file PFRecHit.h.

References energy_.

187 { return (energy_>=rhs.energy_); }
double energy_
rechit energy
Definition: PFRecHit.h:210
const math::XYZPoint& reco::PFRecHit::position ( ) const
inline

is seed ?

Returns
seed state (-1:unknown, 0:no, 1 yes)set seed status rechit cell centre x, y, z

Definition at line 141 of file PFRecHit.h.

References position_.

Referenced by PFClusterAlgo::buildPFClusters(), KDTreeLinkerPSEcal::buildTree(), PFClusterAlgo::calculateClusterPosition(), PFAlgo::checkCleaning(), PFClusterAlgo::cleanRBXAndHPD(), DisplayManager::createGRecHit(), PFClusterAlgo::findSeeds(), DisplayManager::lookForMaxRecHit(), PFRootEventManager::printRecHit(), LinkByRecHit::testECALAndPSByRecHit(), and LinkByRecHit::testTrackAndClusterByRecHit().

141 { return position_; }
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
const PFRecHit::REPPoint & PFRecHit::positionREP ( ) const

rechit cell centre rho, eta, phi. call calculatePositionREP before !

Definition at line 121 of file PFRecHit.cc.

References posrep_.

Referenced by PFClusterAlgo::buildTopoCluster(), PFClusterAlgo::findSeeds(), and LinkByRecHit::testTrackAndClusterByRecHit().

121  {
122  // if( posrep_ == REPPoint() ) {
123  // posrep_.SetCoordinates( position_.Rho(), position_.Eta(), position_.Phi() );
124  // }
125  return posrep_;
126 }
REPPoint posrep_
rechit cell centre: rho, eta, phi (transient)
Definition: PFRecHit.h:225
double reco::PFRecHit::pt2 ( ) const
inline

rechit momentum transverse to the beam, squared.

Definition at line 123 of file PFRecHit.h.

References energy_, and position_.

Referenced by PFClusterAlgo::buildTopoCluster(), and PFClusterAlgo::findSeeds().

123  { return energy_ * energy_ *
124  ( position_.X()*position_.X() +
125  position_.Y()*position_.Y() ) /
126  ( position_.X()*position_.X() +
127  position_.Y()*position_.Y() +
128  position_.Z()*position_.Z()) ; }
double energy_
rechit energy
Definition: PFRecHit.h:210
math::XYZPoint position_
is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)
Definition: PFRecHit.h:222
double reco::PFRecHit::rescale ( ) const
inline

rescaling factor (obsolete)

Definition at line 114 of file PFRecHit.h.

References rescale_.

114 { return rescale_; }
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
void PFRecHit::setCorner ( unsigned  i,
double  posx,
double  posy,
double  posz 
)
private

set position of one of the corners

Definition at line 236 of file PFRecHit.cc.

References cornersrep_, cornersxyz_, reco::tau::disc::Eta(), i, nCorners_, and colinearityKinematic::Phi.

Referenced by setNECorner(), setNWCorner(), setSECorner(), and setSWCorner().

236  {
237  assert( cornersxyz_.size() == nCorners_);
238  assert( cornersrep_.size() == nCorners_);
239  assert( i<cornersxyz_.size() );
240 
241  cornersxyz_[i] = math::XYZPoint( posx, posy, posz);
242  cornersrep_[i] = REPPoint(cornersxyz_[i].Rho(),
243  cornersxyz_[i].Eta(),
244  cornersxyz_[i].Phi() );
245 }
int i
Definition: DBlmapReader.cc:9
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFRecHit.h:39
std::vector< math::XYZPoint > cornersxyz_
rechit cell corners
Definition: PFRecHit.h:231
REPPointVector cornersrep_
Definition: PFRecHit.h:232
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static const unsigned nCorners_
number of corners
Definition: PFRecHit.h:250
void reco::PFRecHit::setEnergy ( double  energy)
inline

NICHOLAS JIN Zeros the energy

Definition at line 70 of file PFRecHit.h.

References energy(), and energy_.

70 { energy_ = energy; }
double energy_
rechit energy
Definition: PFRecHit.h:210
double energy() const
rechit energy
Definition: PFRecHit.h:111
void reco::PFRecHit::setEnergyUp ( double  eUp)
inline

Definition at line 79 of file PFRecHit.h.

References energyUp_.

Referenced by PFHCALDualTimeRecHitProducer::createRecHits(), and PFRecHitProducerHCAL::createRecHits().

79 { energyUp_ = eUp; }
double energyUp_
For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)
Definition: PFRecHit.h:216
void PFRecHit::setNECorner ( double  posx,
double  posy,
double  posz 
)

Definition at line 231 of file PFRecHit.cc.

References setCorner().

Referenced by PFRecHitProducerECAL::createEcalRecHit(), PFHCALDualTimeRecHitProducer::createHcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), PFRecHitProducerHO::createHORecHit(), and PFRecHitProducerPS::createRecHits().

231  {
232  setCorner(3, posx, posy, posz);
233 }
void setCorner(unsigned i, double posx, double posy, double posz)
set position of one of the corners
Definition: PFRecHit.cc:236
void PFRecHit::setNWCorner ( double  posx,
double  posy,
double  posz 
)

search for pointers to neighbours, using neighbours' DetId.

pointers to neighbours are not persistent, in contrary to the DetId's of the neighbours. This function searches a map of rechits for the DetId's stored in neighboursIds4_ and neighboursIds8_. The corresponding pointers are stored in neighbours4_ and neighbours8_.

Definition at line 216 of file PFRecHit.cc.

References setCorner().

Referenced by PFRecHitProducerECAL::createEcalRecHit(), PFHCALDualTimeRecHitProducer::createHcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), PFRecHitProducerHO::createHORecHit(), and PFRecHitProducerPS::createRecHits().

216  {
217  setCorner(0, posx, posy, posz);
218 }
void setCorner(unsigned i, double posx, double posy, double posz)
set position of one of the corners
Definition: PFRecHit.cc:236
void reco::PFRecHit::setRescale ( double  factor)
inline

Definition at line 80 of file PFRecHit.h.

References rescale_.

Referenced by PFHCALDualTimeRecHitProducer::createRecHits(), PFRecHitProducerHCAL::createRecHits(), PFRecHitProducerHO::createRecHits(), and PFRecHitProducerECAL::createRecHits().

80 { rescale_ = factor; }
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213
void PFRecHit::setSECorner ( double  posx,
double  posy,
double  posz 
)

Definition at line 226 of file PFRecHit.cc.

References setCorner().

Referenced by PFRecHitProducerECAL::createEcalRecHit(), PFHCALDualTimeRecHitProducer::createHcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), PFRecHitProducerHO::createHORecHit(), and PFRecHitProducerPS::createRecHits().

226  {
227  setCorner(2, posx, posy, posz);
228 }
void setCorner(unsigned i, double posx, double posy, double posz)
set position of one of the corners
Definition: PFRecHit.cc:236
void PFRecHit::setSWCorner ( double  posx,
double  posy,
double  posz 
)

Definition at line 221 of file PFRecHit.cc.

References setCorner().

Referenced by PFRecHitProducerECAL::createEcalRecHit(), PFHCALDualTimeRecHitProducer::createHcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), PFRecHitProducerHO::createHORecHit(), and PFRecHitProducerPS::createRecHits().

221  {
222  setCorner(1, posx, posy, posz);
223 }
void setCorner(unsigned i, double posx, double posy, double posz)
set position of one of the corners
Definition: PFRecHit.cc:236
void PFRecHit::size ( double &  deta,
double &  dphi 
) const

Definition at line 266 of file PFRecHit.cc.

References cornersrep_, eta(), and phi.

Referenced by DisplayManager::lookForMaxRecHit().

266  {
267 
268  double minphi=9999;
269  double maxphi=-9999;
270  double mineta=9999;
271  double maxeta=-9999;
272  for ( unsigned ic=0; ic<cornersrep_.size(); ++ic ) {
273  double eta = cornersrep_[ic].Eta();
274  double phi = cornersrep_[ic].Phi();
275 
276  if(phi>maxphi) maxphi=phi;
277  if(phi<minphi) minphi=phi;
278  if(eta>maxeta) maxeta=eta;
279  if(eta<mineta) mineta=eta;
280  }
281 
282  deta = maxeta - mineta;
283  dphi = maxphi - minphi;
284 }
T eta() const
REPPointVector cornersrep_
Definition: PFRecHit.h:232
Definition: DDAxes.h:10
double reco::PFRecHit::time ( ) const
inline

timing for cleaned hits

Definition at line 117 of file PFRecHit.h.

References rescale_.

Referenced by PFAlgo::checkCleaning().

117 { return rescale_; }
double rescale_
Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled) ...
Definition: PFRecHit.h:213

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const reco::PFRecHit hit 
)
friend

Member Data Documentation

math::XYZVector reco::PFRecHit::axisxyz_
private

rechit cell axisxyz

Definition at line 228 of file PFRecHit.h.

Referenced by getAxisXYZ().

REPPointVector reco::PFRecHit::cornersrep_
private

Definition at line 232 of file PFRecHit.h.

Referenced by calculatePositionREP(), getCornersREP(), PFRecHit(), setCorner(), and size().

std::vector< math::XYZPoint > reco::PFRecHit::cornersxyz_
private

rechit cell corners

Definition at line 231 of file PFRecHit.h.

Referenced by calculatePositionREP(), getCornersXYZ(), PFRecHit(), and setCorner().

unsigned reco::PFRecHit::detId_
private

C cell detid - should be detid or index in collection ?

Definition at line 204 of file PFRecHit.h.

Referenced by detId().

double reco::PFRecHit::energy_
private

rechit energy

Definition at line 210 of file PFRecHit.h.

Referenced by energy(), operator<(), operator<=(), operator>(), operator>=(), pt2(), and setEnergy().

double reco::PFRecHit::energyUp_
private

For HF hits : hit energy in the other layer (EM for HAD, and HAD for EM)

Definition at line 216 of file PFRecHit.h.

Referenced by energyUp(), and setEnergyUp().

PFLayer::Layer reco::PFRecHit::layer_
private

rechit layer

Definition at line 207 of file PFRecHit.h.

Referenced by layer().

const unsigned PFRecHit::nCorners_ = 4
staticprivate

number of corners

Definition at line 250 of file PFRecHit.h.

Referenced by calculatePositionREP(), PFRecHit(), and setCorner().

std::vector< unsigned > reco::PFRecHit::neighbours4_
private

indices to existing neighbours (1 common side)

Definition at line 235 of file PFRecHit.h.

Referenced by add4Neighbour(), clearNeighbours(), isNeighbour4(), and neighbours4().

std::vector< unsigned > reco::PFRecHit::neighbours8_
private

indices to existing neighbours (1 common side or diagonal)

Definition at line 238 of file PFRecHit.h.

Referenced by add4Neighbour(), add8Neighbour(), clearNeighbours(), isNeighbour8(), and neighbours8().

std::vector< unsigned > reco::PFRecHit::neighboursIds4_
private

detids of existing neighbours (1 common side)

Definition at line 241 of file PFRecHit.h.

Referenced by neighboursIds4().

std::vector< unsigned > reco::PFRecHit::neighboursIds8_
private

detids of existing neighbours (1 common side or diagonal)

Definition at line 244 of file PFRecHit.h.

Referenced by neighboursIds8().

const unsigned PFRecHit::nNeighbours_ = 8
staticprivate

number of neighbours

Definition at line 247 of file PFRecHit.h.

math::XYZPoint reco::PFRecHit::position_
private

is this a seed ? (-1:unknown, 0:no, 1 yes) (transient)

rechit cell centre: x, y, z

Definition at line 222 of file PFRecHit.h.

Referenced by calculatePositionREP(), PFRecHit(), position(), and pt2().

REPPoint reco::PFRecHit::posrep_
private

rechit cell centre: rho, eta, phi (transient)

Definition at line 225 of file PFRecHit.h.

Referenced by calculatePositionREP(), and positionREP().

double reco::PFRecHit::rescale_
private

Internal rescaling factor of the energy (1. = default, 0 = killed channels, x = rescaled)

Definition at line 213 of file PFRecHit.h.

Referenced by rescale(), setRescale(), and time().