CMS 3D CMS Logo

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

A PFTrack holds several trajectory points, which basically contain the position and momentum of a track at a given position. More...

#include <PFTrajectoryPoint.h>

Public Types

enum  LayerType {
  ClosestApproach = 0, BeamPipeOrEndVertex = 1, PS1 = 2, PS2 = 3,
  ECALEntrance = 4, ECALShowerMax = 5, HCALEntrance = 6, HCALExit = 7,
  HOLayer = 8, VFcalEntrance = 9, NLayers = 10, Unknown = -1
}
 Define the different layers where the track can be propagated. More...
 
typedef ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
 

Public Member Functions

void calculatePositionREP ()
 calculate posrep_ once and for all More...
 
int detId () const
 measurement detId More...
 
bool isTrackerLayer () const
 is this point corresponding to an intersection with a tracker layer ? More...
 
bool isValid () const
 is this point valid ? More...
 
int layer () const
 trajectory point layer More...
 
const math::XYZTLorentzVectormomentum () const
 4-momenta quadrivector More...
 
bool operator== (const reco::PFTrajectoryPoint &other) const
 
 PFTrajectoryPoint ()
 default constructor. Set variables at default dummy values More...
 
 PFTrajectoryPoint (const PFTrajectoryPoint &other)
 copy More...
 
 PFTrajectoryPoint (int detId, int layer, const math::XYZPoint &posxyz, const math::XYZTLorentzVector &momentum)
 constructor from values. set detId to -1 if this point is not from a tracker layer More...
 
const math::XYZPointposition () const
 cartesian position (x, y, z) More...
 
const REPPointpositionREP () const
 trajectory position in (rho, eta, phi) base More...
 
virtual ~PFTrajectoryPoint ()
 destructor More...
 

Static Public Member Functions

static LayerType layerTypeByName (const std::string &name)
 

Static Public Attributes

static const std::array< std::string, NLayerslayerTypeNames
 

Private Attributes

int detId_
 detid if measurement is corresponding to a tracker layer More...
 
bool isTrackerLayer_
 Is the measurement corresponding to a tracker layer? or was it obtained by propagating the track to a certain position? More...
 
int layer_
 propagated layer More...
 
math::XYZTLorentzVector momentum_
 momentum quadrivector More...
 
REPPoint posrep_
 position in (rho, eta, phi) base (transient) More...
 
math::XYZPoint posxyz_
 cartesian position (x, y, z) More...
 

Friends

std::ostream & operator<< (std::ostream &out, const reco::PFTrajectoryPoint &trajPoint)
 

Detailed Description

A PFTrack holds several trajectory points, which basically contain the position and momentum of a track at a given position.

Author
Renaud Bruneliere
Date
July 2006

Definition at line 26 of file PFTrajectoryPoint.h.

Member Typedef Documentation

◆ REPPoint

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

Definition at line 31 of file PFTrajectoryPoint.h.

Member Enumeration Documentation

◆ LayerType

Define the different layers where the track can be propagated.

Enumerator
ClosestApproach 

Point of closest approach from beam axis (initial point in the case of PFSimParticle)

BeamPipeOrEndVertex 
PS1 

Preshower layer 1.

PS2 

Preshower layer 2.

ECALEntrance 

ECAL front face.

ECALShowerMax 

expected maximum of the shower in ECAL, for an e/gamma particle

HCALEntrance 

HCAL front face.

HCALExit 

HCAL exit.

HOLayer 

HO layer.

VFcalEntrance 

VFcal(HF) front face.

NLayers 
Unknown 

Definition at line 34 of file PFTrajectoryPoint.h.

34  {
36  ClosestApproach = 0,
39  PS1 = 2,
41  PS2 = 3,
43  ECALEntrance = 4,
46  ECALShowerMax = 5,
48  HCALEntrance = 6,
50  HCALExit = 7,
52  HOLayer = 8,
54  VFcalEntrance = 9,
55  // Number of valid layers
56  NLayers = 10,
57  // Unknown
58  Unknown = -1
59  };

Constructor & Destructor Documentation

◆ PFTrajectoryPoint() [1/3]

PFTrajectoryPoint::PFTrajectoryPoint ( )

default constructor. Set variables at default dummy values

Definition at line 20 of file PFTrajectoryPoint.cc.

20 : isTrackerLayer_(false), detId_(-1), layer_(-1) {}

◆ PFTrajectoryPoint() [2/3]

PFTrajectoryPoint::PFTrajectoryPoint ( int  detId,
int  layer,
const math::XYZPoint posxyz,
const math::XYZTLorentzVector momentum 
)

constructor from values. set detId to -1 if this point is not from a tracker layer

Definition at line 22 of file PFTrajectoryPoint.cc.

27  if (detId)
28  isTrackerLayer_ = true;
29  posrep_.SetCoordinates(posxyz_.Rho(), posxyz_.Eta(), posxyz_.Phi());
30 }

References detId(), isTrackerLayer_, posrep_, and posxyz_.

◆ PFTrajectoryPoint() [3/3]

PFTrajectoryPoint::PFTrajectoryPoint ( const PFTrajectoryPoint other)

copy

Definition at line 32 of file PFTrajectoryPoint.cc.

33  : isTrackerLayer_(other.isTrackerLayer_),
34  detId_(other.detId_),
35  layer_(other.layer_),
36  posxyz_(other.posxyz_),
37  posrep_(other.posrep_),
38  momentum_(other.momentum_) {}

◆ ~PFTrajectoryPoint()

PFTrajectoryPoint::~PFTrajectoryPoint ( )
virtual

destructor

Definition at line 40 of file PFTrajectoryPoint.cc.

40 {}

Member Function Documentation

◆ calculatePositionREP()

void reco::PFTrajectoryPoint::calculatePositionREP ( )
inline

calculate posrep_ once and for all

Definition at line 106 of file PFTrajectoryPoint.h.

106 { posrep_.SetCoordinates(posxyz_.Rho(), posxyz_.Eta(), posxyz_.Phi()); }

References posrep_, and posxyz_.

◆ detId()

int reco::PFTrajectoryPoint::detId ( ) const
inline

measurement detId

Definition at line 78 of file PFTrajectoryPoint.h.

78 { return detId_; }

References detId_.

Referenced by reco::operator<<(), and PFTrajectoryPoint().

◆ isTrackerLayer()

bool reco::PFTrajectoryPoint::isTrackerLayer ( ) const
inline

is this point corresponding to an intersection with a tracker layer ?

Definition at line 92 of file PFTrajectoryPoint.h.

92  {
93  if (detId_ >= 0)
94  return true;
95  else
96  return false;
97  }

References detId_.

Referenced by reco::PFTrack::addPoint().

◆ isValid()

bool reco::PFTrajectoryPoint::isValid ( void  ) const
inline

◆ layer()

int reco::PFTrajectoryPoint::layer ( ) const
inline

trajectory point layer

Definition at line 81 of file PFTrajectoryPoint.h.

81 { return layer_; }

References layer_.

Referenced by geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), and reco::operator<<().

◆ layerTypeByName()

PFTrajectoryPoint::LayerType PFTrajectoryPoint::layerTypeByName ( const std::string &  name)
static

Definition at line 42 of file PFTrajectoryPoint.cc.

42  {
43  auto it = std::find(layerTypeNames.begin(), layerTypeNames.end(), name);
44  if (it == layerTypeNames.end()) {
45  return Unknown; // better this or throw()?
46  }
47  int index = std::distance(layerTypeNames.begin(), it);
48  return LayerType(index);
49 }

References HLT_FULL_cff::distance, spr::find(), layerTypeNames, Skims_PA_cff::name, and Unknown.

Referenced by KDTreeLinkerTrackHcal::KDTreeLinkerTrackHcal(), and TrackAndHCALLinker::TrackAndHCALLinker().

◆ momentum()

const math::XYZTLorentzVector& reco::PFTrajectoryPoint::momentum ( ) const
inline

◆ operator==()

bool PFTrajectoryPoint::operator== ( const reco::PFTrajectoryPoint other) const

Definition at line 51 of file PFTrajectoryPoint.cc.

51  {
52  if (posxyz_ == other.posxyz_ && momentum_ == other.momentum_)
53  return true;
54  else
55  return false;
56 }

References momentum_, trackingPlots::other, and posxyz_.

◆ position()

const math::XYZPoint& reco::PFTrajectoryPoint::position ( ) const
inline

◆ positionREP()

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

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const reco::PFTrajectoryPoint trajPoint 
)
friend

Member Data Documentation

◆ detId_

int reco::PFTrajectoryPoint::detId_
private

detid if measurement is corresponding to a tracker layer

Definition at line 121 of file PFTrajectoryPoint.h.

Referenced by detId(), isTrackerLayer(), and isValid().

◆ isTrackerLayer_

bool reco::PFTrajectoryPoint::isTrackerLayer_
private

Is the measurement corresponding to a tracker layer? or was it obtained by propagating the track to a certain position?

Definition at line 118 of file PFTrajectoryPoint.h.

Referenced by PFTrajectoryPoint().

◆ layer_

int reco::PFTrajectoryPoint::layer_
private

propagated layer

Definition at line 124 of file PFTrajectoryPoint.h.

Referenced by isValid(), and layer().

◆ layerTypeNames

const std::array< std::string, PFTrajectoryPoint::NLayers > PFTrajectoryPoint::layerTypeNames
static
Initial value:
{{"ClosestApproach",
"BeamPipeOrEndVertex",
"PS1",
"PS2",
"ECALEntrance",
"ECALShowerMax",
"HCALEntrance",
"HCALExit",
"HOLayer",
"VFcalEntrance"}}

Definition at line 61 of file PFTrajectoryPoint.h.

Referenced by layerTypeByName().

◆ momentum_

math::XYZTLorentzVector reco::PFTrajectoryPoint::momentum_
private

momentum quadrivector

Definition at line 133 of file PFTrajectoryPoint.h.

Referenced by momentum(), and operator==().

◆ posrep_

REPPoint reco::PFTrajectoryPoint::posrep_
private

position in (rho, eta, phi) base (transient)

Definition at line 130 of file PFTrajectoryPoint.h.

Referenced by calculatePositionREP(), PFTrajectoryPoint(), and positionREP().

◆ posxyz_

math::XYZPoint reco::PFTrajectoryPoint::posxyz_
private

cartesian position (x, y, z)

Definition at line 127 of file PFTrajectoryPoint.h.

Referenced by calculatePositionREP(), operator==(), PFTrajectoryPoint(), and position().

reco::PFTrajectoryPoint::momentum
const math::XYZTLorentzVector & momentum() const
4-momenta quadrivector
Definition: PFTrajectoryPoint.h:109
reco::PFTrajectoryPoint::posxyz_
math::XYZPoint posxyz_
cartesian position (x, y, z)
Definition: PFTrajectoryPoint.h:127
reco::PFTrajectoryPoint::HCALExit
HCAL exit.
Definition: PFTrajectoryPoint.h:50
reco::PFTrajectoryPoint::HOLayer
HO layer.
Definition: PFTrajectoryPoint.h:52
reco::PFTrajectoryPoint::layer
int layer() const
trajectory point layer
Definition: PFTrajectoryPoint.h:81
reco::PFTrajectoryPoint::detId_
int detId_
detid if measurement is corresponding to a tracker layer
Definition: PFTrajectoryPoint.h:121
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
reco::PFTrajectoryPoint::isTrackerLayer_
bool isTrackerLayer_
Is the measurement corresponding to a tracker layer? or was it obtained by propagating the track to a...
Definition: PFTrajectoryPoint.h:118
reco::PFTrajectoryPoint::NLayers
Definition: PFTrajectoryPoint.h:56
reco::PFTrajectoryPoint::BeamPipeOrEndVertex
Definition: PFTrajectoryPoint.h:37
reco::PFTrajectoryPoint::ECALShowerMax
Definition: PFTrajectoryPoint.h:46
reco::PFTrajectoryPoint::momentum_
math::XYZTLorentzVector momentum_
momentum quadrivector
Definition: PFTrajectoryPoint.h:133
trackingPlots.other
other
Definition: trackingPlots.py:1464
reco::PFTrajectoryPoint::HCALEntrance
HCAL front face.
Definition: PFTrajectoryPoint.h:48
reco::PFTrajectoryPoint::PS2
Preshower layer 2.
Definition: PFTrajectoryPoint.h:41
reco::PFTrajectoryPoint::layerTypeNames
static const std::array< std::string, NLayers > layerTypeNames
Definition: PFTrajectoryPoint.h:61
reco::PFTrajectoryPoint::LayerType
LayerType
Define the different layers where the track can be propagated.
Definition: PFTrajectoryPoint.h:34
reco::PFTrajectoryPoint::posrep_
REPPoint posrep_
position in (rho, eta, phi) base (transient)
Definition: PFTrajectoryPoint.h:130
reco::PFTrajectoryPoint::PS1
Preshower layer 1.
Definition: PFTrajectoryPoint.h:39
reco::PFTrajectoryPoint::ECALEntrance
ECAL front face.
Definition: PFTrajectoryPoint.h:43
reco::PFTrajectoryPoint::VFcalEntrance
VFcal(HF) front face.
Definition: PFTrajectoryPoint.h:54
reco::PFTrajectoryPoint::detId
int detId() const
measurement detId
Definition: PFTrajectoryPoint.h:78
reco::PFTrajectoryPoint::layer_
int layer_
propagated layer
Definition: PFTrajectoryPoint.h:124
reco::PFTrajectoryPoint::Unknown
Definition: PFTrajectoryPoint.h:58
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
reco::PFTrajectoryPoint::ClosestApproach
Point of closest approach from beam axis (initial point in the case of PFSimParticle)
Definition: PFTrajectoryPoint.h:36
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746