CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
TPtoRecoTrack Class Reference

#include <TPtoRecoTrack.h>

Public Member Functions

bool allmatched () const
 
bool allmatchedA () const
 
bool allmatchedB () const
 
math::XYZPoint BeamSpot () const
 
float GetSharedA () const
 
float GetSharedB () const
 
bool hasPCA () const
 
bool hasRV () const
 
bool hasRVA () const
 
bool hasRVB () const
 
bool hasTPMother () const
 
bool matched () const
 
bool matchedA () const
 
bool matchedAnotB () const
 
bool matchedB () const
 
bool matchedBnotA () const
 
int numTPMothers () const
 
int numTPSourceTracks () const
 
double rA_d0 () const
 
double rA_d02 () const
 
double rA_dsz () const
 
double rA_dxy () const
 
double rA_dz () const
 
double rA_dz2 () const
 
double rB_d0 () const
 
double rB_d02 () const
 
double rB_dsz () const
 
double rB_dxy () const
 
double rB_dz () const
 
double rB_dz2 () const
 
reco::Track RTA () const
 
reco::Track RTB () const
 
reco::Vertex RVA () const
 
reco::Vertex RVB () const
 
double s_d0 () const
 
double s_dsz () const
 
double s_dxy () const
 
double s_dz () const
 
double s_eta () const
 
double s_lambda () const
 
GlobalVector s_p () const
 
GlobalPoint s_pca () const
 
double s_phi () const
 
double s_qoverp () const
 
double s_theta () const
 
GlobalPoint s_v () const
 
void SetBeamSpot (const math::XYZPoint &bs)
 
void SetRecoTrack_AlgoA (reco::TrackBaseRef track)
 
void SetRecoTrack_AlgoB (reco::TrackBaseRef track)
 
void SetRecoVertex_AlgoA (reco::VertexRef vertex)
 
void SetRecoVertex_AlgoB (reco::VertexRef vertex)
 
void SetShared_AlgoA (const float &mA)
 
void SetShared_AlgoB (const float &mB)
 
void SetTrackingParticle (TrackingParticleRef tp)
 
void SetTrackingParticleMomentumPCA (const GlobalVector &p)
 
void SetTrackingParticlePCA (const GlobalPoint &v)
 
TrackingParticle TP () const
 
TrackingParticle TPMother (unsigned short i) const
 
TrackingParticle TPMother () const
 
 TPtoRecoTrack ()
 
 ~TPtoRecoTrack ()
 

Protected Attributes

math::XYZPoint beamSpot_
 
reco::TrackBaseRef recoTrack_AlgoA_
 
reco::TrackBaseRef recoTrack_AlgoB_
 
reco::VertexRef recoVertex_AlgoA_
 
reco::VertexRef recoVertex_AlgoB_
 
float sharedA_
 
float sharedB_
 
GlobalVector simMomPCA_
 
GlobalPoint simPCA_
 
TrackingParticleRef trackingParticle_
 

Detailed Description

Definition at line 21 of file TPtoRecoTrack.h.

Constructor & Destructor Documentation

TPtoRecoTrack::TPtoRecoTrack ( )

Definition at line 5 of file TPtoRecoTrack.cc.

References SetBeamSpot(), SetTrackingParticleMomentumPCA(), and SetTrackingParticlePCA().

6 {
7  SetBeamSpot(math::XYZPoint(-9999.0, -9999.0, -9999.0));
8  SetTrackingParticlePCA(GlobalPoint(-9999.0, -9999.0, -9999.0));
9  SetTrackingParticleMomentumPCA(GlobalVector(-9999.0, -9999.0, -9999.0));
10 }
void SetTrackingParticleMomentumPCA(const GlobalVector &p)
Definition: TPtoRecoTrack.h:81
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
void SetTrackingParticlePCA(const GlobalPoint &v)
Definition: TPtoRecoTrack.h:82
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void SetBeamSpot(const math::XYZPoint &bs)
Definition: TPtoRecoTrack.h:39
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TPtoRecoTrack::~TPtoRecoTrack ( )

Definition at line 13 of file TPtoRecoTrack.cc.

14 {
15 }

Member Function Documentation

bool TPtoRecoTrack::allmatched ( ) const
inline

Definition at line 60 of file TPtoRecoTrack.h.

References hasRV(), and matched().

60 {return matched() && hasRV();}
bool matched() const
Definition: TPtoRecoTrack.h:49
bool hasRV() const
Definition: TPtoRecoTrack.h:56
bool TPtoRecoTrack::allmatchedA ( ) const
inline

Definition at line 58 of file TPtoRecoTrack.h.

References hasRVA(), and matchedA().

58 {return matchedA() && hasRVA();}
bool hasRVA() const
Definition: TPtoRecoTrack.h:54
bool matchedA() const
Definition: TPtoRecoTrack.h:50
bool TPtoRecoTrack::allmatchedB ( ) const
inline

Definition at line 59 of file TPtoRecoTrack.h.

References hasRVA(), and matchedB().

59 {return matchedB() && hasRVA();}
bool hasRVA() const
Definition: TPtoRecoTrack.h:54
bool matchedB() const
Definition: TPtoRecoTrack.h:51
math::XYZPoint TPtoRecoTrack::BeamSpot ( ) const
inline

Definition at line 47 of file TPtoRecoTrack.h.

References beamSpot_.

Referenced by rA_dsz(), rA_dxy(), rA_dz(), rB_dsz(), rB_dxy(), rB_dz(), and s_v().

47 {return beamSpot_;}
math::XYZPoint beamSpot_
float TPtoRecoTrack::GetSharedA ( ) const
inline

Definition at line 61 of file TPtoRecoTrack.h.

References sharedA_.

61 {return sharedA_;}
float TPtoRecoTrack::GetSharedB ( ) const
inline

Definition at line 62 of file TPtoRecoTrack.h.

References sharedB_.

62 {return sharedB_;}
bool TPtoRecoTrack::hasPCA ( ) const
inline

Definition at line 57 of file TPtoRecoTrack.h.

References PV3DBase< T, PVType, FrameType >::mag(), and s_pca().

57 {return s_pca().mag()<9999.0;}
GlobalPoint s_pca() const
Definition: TPtoRecoTrack.h:85
T mag() const
Definition: PV3DBase.h:67
bool TPtoRecoTrack::hasRV ( ) const
inline

Definition at line 56 of file TPtoRecoTrack.h.

References hasRVA(), and hasRVB().

Referenced by allmatched().

56 {return hasRVA() && hasRVB();}
bool hasRVA() const
Definition: TPtoRecoTrack.h:54
bool hasRVB() const
Definition: TPtoRecoTrack.h:55
bool TPtoRecoTrack::hasRVA ( ) const
inline

Definition at line 54 of file TPtoRecoTrack.h.

References edm::Ref< C, T, F >::isNonnull(), and recoVertex_AlgoA_.

Referenced by allmatchedA(), allmatchedB(), and hasRV().

54 {return recoVertex_AlgoA_.isNonnull() && fabs(recoVertex_AlgoA_->position().Mag2())>0.0;} // position is ROOT::MATH::Cartesian3D<double>
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
reco::VertexRef recoVertex_AlgoA_
bool TPtoRecoTrack::hasRVB ( ) const
inline

Definition at line 55 of file TPtoRecoTrack.h.

References edm::Ref< C, T, F >::isNonnull(), and recoVertex_AlgoB_.

Referenced by hasRV().

55 {return recoVertex_AlgoB_.isNonnull() && fabs(recoVertex_AlgoB_->position().Mag2())>0.0;} // position is ROOT::MATH::Cartesian3D<double>
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
reco::VertexRef recoVertex_AlgoB_
bool TPtoRecoTrack::hasTPMother ( ) const
inline

Definition at line 104 of file TPtoRecoTrack.h.

References numTPMothers().

104 {return numTPMothers()>0;}
int numTPMothers() const
bool TPtoRecoTrack::matched ( ) const
inline

Definition at line 49 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

Referenced by allmatched().

49 {return matchedA() && matchedB();}
bool matchedB() const
Definition: TPtoRecoTrack.h:51
bool matchedA() const
Definition: TPtoRecoTrack.h:50
bool TPtoRecoTrack::matchedA ( ) const
inline

Definition at line 50 of file TPtoRecoTrack.h.

References edm::RefToBase< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), recoTrack_AlgoA_, and trackingParticle_.

Referenced by allmatchedA(), matched(), matchedAnotB(), and matchedBnotA().

bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:340
TrackingParticleRef trackingParticle_
reco::TrackBaseRef recoTrack_AlgoA_
bool TPtoRecoTrack::matchedAnotB ( ) const
inline

Definition at line 52 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

52 {return matchedA() && !matchedB();}
bool matchedB() const
Definition: TPtoRecoTrack.h:51
bool matchedA() const
Definition: TPtoRecoTrack.h:50
bool TPtoRecoTrack::matchedB ( ) const
inline

Definition at line 51 of file TPtoRecoTrack.h.

References edm::RefToBase< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), recoTrack_AlgoB_, and trackingParticle_.

Referenced by allmatchedB(), matched(), matchedAnotB(), and matchedBnotA().

bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:340
reco::TrackBaseRef recoTrack_AlgoB_
TrackingParticleRef trackingParticle_
bool TPtoRecoTrack::matchedBnotA ( ) const
inline

Definition at line 53 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

53 {return matchedB() && !matchedA();}
bool matchedB() const
Definition: TPtoRecoTrack.h:51
bool matchedA() const
Definition: TPtoRecoTrack.h:50
int TPtoRecoTrack::numTPMothers ( ) const

Definition at line 55 of file TPtoRecoTrack.cc.

References KineDebug3::count(), TrackingParticle::parentVertex(), and TP().

Referenced by hasTPMother(), numTPSourceTracks(), and TPMother().

56 {
57  int count = 0;
58  for(TrackingParticleRefVector::iterator si = TP().parentVertex()->sourceTracks_begin();
59  si != TP().parentVertex()->sourceTracks_end(); ++si)
60  {
61  for(TrackingParticleRefVector::iterator di = TP().parentVertex()->daughterTracks_begin();
62  di != TP().parentVertex()->daughterTracks_end(); ++di)
63  {
64  if(si != di) count++;
65  break;
66  }
67  if(count>0) break;
68  }
69  return count;
70 }
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:44
const TrackingVertexRef & parentVertex() const
int TPtoRecoTrack::numTPSourceTracks ( ) const
inline

Definition at line 102 of file TPtoRecoTrack.h.

References numTPMothers(), TrackingParticle::parentVertex(), and TP().

102 {return TP().parentVertex()->nSourceTracks();}
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:44
const TrackingVertexRef & parentVertex() const
double TPtoRecoTrack::rA_d0 ( ) const
inline

Definition at line 69 of file TPtoRecoTrack.h.

References rA_dxy().

69 {return -1.0 * rA_dxy();}
double rA_dxy() const
Definition: TPtoRecoTrack.h:65
double TPtoRecoTrack::rA_d02 ( ) const
inline

Definition at line 75 of file TPtoRecoTrack.h.

References reco::TrackBase::dxy(), position, RTA(), and RVA().

75 {return -1.0 * RTA().dxy( RVA().position() );}
reco::Track RTA() const
Definition: TPtoRecoTrack.h:42
reco::Vertex RVA() const
Definition: TPtoRecoTrack.h:45
static int position[264][3]
Definition: ReadPGInfo.cc:509
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:630
double TPtoRecoTrack::rA_dsz ( ) const
inline

Definition at line 67 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dsz(), and RTA().

67 {return RTA().dsz( BeamSpot() );}
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
Definition: TrackBase.h:642
reco::Track RTA() const
Definition: TPtoRecoTrack.h:42
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double TPtoRecoTrack::rA_dxy ( ) const
inline

Definition at line 65 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dxy(), and RTA().

Referenced by rA_d0().

65 {return RTA().dxy( BeamSpot() );}
reco::Track RTA() const
Definition: TPtoRecoTrack.h:42
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:630
double TPtoRecoTrack::rA_dz ( ) const
inline

Definition at line 71 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dz(), and RTA().

71 {return RTA().dz( BeamSpot() );}
reco::Track RTA() const
Definition: TPtoRecoTrack.h:42
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:648
double TPtoRecoTrack::rA_dz2 ( ) const
inline

Definition at line 76 of file TPtoRecoTrack.h.

References reco::TrackBase::dz(), position, RTA(), and RVA().

76 {return RTA().dz( RVA().position() );}
reco::Track RTA() const
Definition: TPtoRecoTrack.h:42
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:648
reco::Vertex RVA() const
Definition: TPtoRecoTrack.h:45
static int position[264][3]
Definition: ReadPGInfo.cc:509
double TPtoRecoTrack::rB_d0 ( ) const
inline

Definition at line 70 of file TPtoRecoTrack.h.

References rB_dxy().

70 {return -1.0 * rB_dxy();}
double rB_dxy() const
Definition: TPtoRecoTrack.h:66
double TPtoRecoTrack::rB_d02 ( ) const
inline

Definition at line 77 of file TPtoRecoTrack.h.

References reco::TrackBase::dxy(), position, RTB(), and RVB().

77 {return -1.0 * RTB().dxy( RVB().position() );}
reco::Vertex RVB() const
Definition: TPtoRecoTrack.h:46
reco::Track RTB() const
Definition: TPtoRecoTrack.h:43
static int position[264][3]
Definition: ReadPGInfo.cc:509
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:630
double TPtoRecoTrack::rB_dsz ( ) const
inline

Definition at line 68 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dsz(), and RTB().

68 {return RTB().dsz( BeamSpot() );}
reco::Track RTB() const
Definition: TPtoRecoTrack.h:43
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
Definition: TrackBase.h:642
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double TPtoRecoTrack::rB_dxy ( ) const
inline

Definition at line 66 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dxy(), and RTB().

Referenced by rB_d0().

66 {return RTB().dxy( BeamSpot() );}
reco::Track RTB() const
Definition: TPtoRecoTrack.h:43
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:630
double TPtoRecoTrack::rB_dz ( ) const
inline

Definition at line 72 of file TPtoRecoTrack.h.

References BeamSpot(), reco::TrackBase::dz(), and RTB().

72 {return RTB().dz( BeamSpot() );}
reco::Track RTB() const
Definition: TPtoRecoTrack.h:43
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:648
double TPtoRecoTrack::rB_dz2 ( ) const
inline

Definition at line 78 of file TPtoRecoTrack.h.

References reco::TrackBase::dz(), position, RTB(), and RVB().

78 {return RTB().dz( RVB().position());}
reco::Vertex RVB() const
Definition: TPtoRecoTrack.h:46
reco::Track RTB() const
Definition: TPtoRecoTrack.h:43
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:648
static int position[264][3]
Definition: ReadPGInfo.cc:509
reco::Track TPtoRecoTrack::RTA ( ) const
inline

Definition at line 42 of file TPtoRecoTrack.h.

References edm::RefToBase< T >::isNonnull(), and recoTrack_AlgoA_.

Referenced by rA_d02(), rA_dsz(), rA_dxy(), rA_dz(), and rA_dz2().

bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:340
reco::TrackBaseRef recoTrack_AlgoA_
reco::Track TPtoRecoTrack::RTB ( ) const
inline

Definition at line 43 of file TPtoRecoTrack.h.

References edm::RefToBase< T >::isNonnull(), and recoTrack_AlgoB_.

Referenced by rB_d02(), rB_dsz(), rB_dxy(), rB_dz(), and rB_dz2().

bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:340
reco::TrackBaseRef recoTrack_AlgoB_
reco::Vertex TPtoRecoTrack::RVA ( ) const
inline

Definition at line 45 of file TPtoRecoTrack.h.

References edm::Ref< C, T, F >::isNonnull(), and recoVertex_AlgoA_.

Referenced by rA_d02(), and rA_dz2().

bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
reco::VertexRef recoVertex_AlgoA_
reco::Vertex TPtoRecoTrack::RVB ( ) const
inline

Definition at line 46 of file TPtoRecoTrack.h.

References edm::Ref< C, T, F >::isNonnull(), and recoVertex_AlgoB_.

Referenced by rB_d02(), and rB_dz2().

bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
reco::VertexRef recoVertex_AlgoB_
double TPtoRecoTrack::s_d0 ( ) const
inline

Definition at line 96 of file TPtoRecoTrack.h.

References s_dxy().

96 {return -1.0*s_dxy();}
double s_dxy() const
Definition: TPtoRecoTrack.h:94
double TPtoRecoTrack::s_dsz ( ) const
inline

Definition at line 95 of file TPtoRecoTrack.h.

References PV3DBase< T, PVType, FrameType >::mag(), PV3DBase< T, PVType, FrameType >::perp(), s_p(), s_v(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

95 {return s_v().z()*s_p().perp()/ s_p().mag() - ((s_v().x()*s_p().x() + s_v().y()*s_p().y()) / s_p().perp()) * s_p().z()/s_p().mag();}
GlobalPoint s_v() const
Definition: TPtoRecoTrack.h:86
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62
double TPtoRecoTrack::s_dxy ( ) const
inline

Definition at line 94 of file TPtoRecoTrack.h.

References PV3DBase< T, PVType, FrameType >::perp(), s_p(), s_v(), x, and y.

Referenced by s_d0().

94 {return ( - s_v().x() * s_p().y() + s_v().y() * s_p().x() ) / s_p().perp();}
GlobalPoint s_v() const
Definition: TPtoRecoTrack.h:86
T perp() const
Definition: PV3DBase.h:72
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
double TPtoRecoTrack::s_dz ( ) const
inline

Definition at line 97 of file TPtoRecoTrack.h.

References mps_fire::i, PV3DBase< T, PVType, FrameType >::perp(), s_p(), s_v(), TPMother(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

97 {return s_v().z() - ( s_v().x() * s_p().x() + s_v().y() * s_p().y() )/s_p().perp() * s_p().z()/s_p().perp();}
GlobalPoint s_v() const
Definition: TPtoRecoTrack.h:86
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62
double TPtoRecoTrack::s_eta ( ) const
inline

Definition at line 92 of file TPtoRecoTrack.h.

References cmsBatch::log, s_p(), funct::tan(), and theta().

92 {return -1.0*log( tan (0.5*s_p().theta()) );}
Geom::Theta< T > theta() const
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double TPtoRecoTrack::s_lambda ( ) const
inline

Definition at line 90 of file TPtoRecoTrack.h.

References M_PI, s_p(), and PV3DBase< T, PVType, FrameType >::theta().

90 {return M_PI/2-s_p().theta();}
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
#define M_PI
GlobalVector TPtoRecoTrack::s_p ( ) const
inline

Definition at line 84 of file TPtoRecoTrack.h.

References simMomPCA_.

Referenced by s_dsz(), s_dxy(), s_dz(), s_eta(), s_lambda(), s_phi(), s_qoverp(), and s_theta().

84 {return simMomPCA_;}
GlobalVector simMomPCA_
GlobalPoint TPtoRecoTrack::s_pca ( ) const
inline

Definition at line 85 of file TPtoRecoTrack.h.

References simPCA_.

Referenced by hasPCA(), and s_v().

85 {return simPCA_;}
GlobalPoint simPCA_
double TPtoRecoTrack::s_phi ( ) const
inline

Definition at line 91 of file TPtoRecoTrack.h.

References PV3DBase< T, PVType, FrameType >::phi(), and s_p().

91 {return s_p().phi();}
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
double TPtoRecoTrack::s_qoverp ( ) const
inline

Definition at line 88 of file TPtoRecoTrack.h.

References TrackingParticle::charge(), PV3DBase< T, PVType, FrameType >::mag(), s_p(), and TP().

88 {return TP().charge() / s_p().mag();}
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:44
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
float charge() const
Electric charge. Note this is taken from the first SimTrack only.
T mag() const
Definition: PV3DBase.h:67
double TPtoRecoTrack::s_theta ( ) const
inline

Definition at line 89 of file TPtoRecoTrack.h.

References s_p(), and PV3DBase< T, PVType, FrameType >::theta().

89 {return s_p().theta();}
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
GlobalVector s_p() const
Definition: TPtoRecoTrack.h:84
GlobalPoint TPtoRecoTrack::s_v ( ) const
inline

Definition at line 86 of file TPtoRecoTrack.h.

References BeamSpot(), s_pca(), x, y, and z.

Referenced by s_dsz(), s_dxy(), and s_dz().

86 {return GlobalPoint(s_pca().x()-BeamSpot().x(), s_pca().y()-BeamSpot().y(), s_pca().z()-BeamSpot().z() );}
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalPoint s_pca() const
Definition: TPtoRecoTrack.h:85
math::XYZPoint BeamSpot() const
Definition: TPtoRecoTrack.h:47
void TPtoRecoTrack::SetBeamSpot ( const math::XYZPoint bs)
inline

Definition at line 39 of file TPtoRecoTrack.h.

References beamSpot_.

Referenced by TrackAlgoCompareUtil::produce(), and TPtoRecoTrack().

39 {beamSpot_ = bs;}
math::XYZPoint beamSpot_
void TPtoRecoTrack::SetRecoTrack_AlgoA ( reco::TrackBaseRef  track)
inline
void TPtoRecoTrack::SetRecoTrack_AlgoB ( reco::TrackBaseRef  track)
inline
void TPtoRecoTrack::SetRecoVertex_AlgoA ( reco::VertexRef  vertex)
inline

Definition at line 36 of file TPtoRecoTrack.h.

References recoVertex_AlgoA_.

Referenced by TrackAlgoCompareUtil::produce().

36 {recoVertex_AlgoA_ = vertex;}
reco::VertexRef recoVertex_AlgoA_
void TPtoRecoTrack::SetRecoVertex_AlgoB ( reco::VertexRef  vertex)
inline

Definition at line 37 of file TPtoRecoTrack.h.

References recoVertex_AlgoB_.

Referenced by TrackAlgoCompareUtil::produce().

37 {recoVertex_AlgoB_ = vertex;}
reco::VertexRef recoVertex_AlgoB_
void TPtoRecoTrack::SetShared_AlgoA ( const float &  mA)
inline

Definition at line 33 of file TPtoRecoTrack.h.

References sharedA_.

Referenced by TrackAlgoCompareUtil::produce().

33 {sharedA_= mA;}
void TPtoRecoTrack::SetShared_AlgoB ( const float &  mB)
inline

Definition at line 34 of file TPtoRecoTrack.h.

References sharedB_.

Referenced by TrackAlgoCompareUtil::produce().

34 {sharedB_= mB;}
void TPtoRecoTrack::SetTrackingParticle ( TrackingParticleRef  tp)
inline

Definition at line 28 of file TPtoRecoTrack.h.

References trackingParticle_.

Referenced by TrackAlgoCompareUtil::produce().

28 {trackingParticle_ = tp;}
TrackingParticleRef trackingParticle_
void TPtoRecoTrack::SetTrackingParticleMomentumPCA ( const GlobalVector p)
inline
void TPtoRecoTrack::SetTrackingParticlePCA ( const GlobalPoint v)
inline
TrackingParticle TPtoRecoTrack::TP ( ) const
inline

Definition at line 44 of file TPtoRecoTrack.h.

References edm::Ref< C, T, F >::isNonnull(), and trackingParticle_.

Referenced by numTPMothers(), numTPSourceTracks(), s_qoverp(), and TPMother().

bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
TrackingParticleRef trackingParticle_
Monte Carlo truth information used for tracking validation.
TrackingParticle TPtoRecoTrack::TPMother ( unsigned short  i) const

Definition at line 18 of file TPtoRecoTrack.cc.

References mps_fire::i, TrackingParticle::parentVertex(), mps_fire::result, and TP().

19 {
20  std::vector<TrackingParticle> result;
21 
22  if( TP().parentVertex().isNonnull())
23  {
24  if(TP().parentVertex()->nSourceTracks() > 0)
25  {
26  for(TrackingParticleRefVector::iterator si = TP().parentVertex()->sourceTracks_begin();
27  si != TP().parentVertex()->sourceTracks_end(); ++si)
28  {
29  for(TrackingParticleRefVector::iterator di = TP().parentVertex()->daughterTracks_begin();
30  di != TP().parentVertex()->daughterTracks_end(); ++di)
31  {
32  if(si != di)
33  {
34  result.push_back(**si);
35  break;
36  }
37  }
38  if(!result.empty()) break;
39  }
40  }
41  else
42  {
43  return TrackingParticle();
44  }
45  }
46  else
47  {
48  return TrackingParticle();
49  }
50 
51  return i < result.size() ? result[i] : TrackingParticle();
52 }
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:44
const TrackingVertexRef & parentVertex() const
Monte Carlo truth information used for tracking validation.
TrackingParticle TPtoRecoTrack::TPMother ( ) const
inline

Definition at line 101 of file TPtoRecoTrack.h.

References numTPMothers(), and TPMother().

Referenced by s_dz(), and TPMother().

101 {return numTPMothers()==1 ? TPMother(0) : TrackingParticle();}
TrackingParticle TPMother() const
int numTPMothers() const
Monte Carlo truth information used for tracking validation.

Member Data Documentation

math::XYZPoint TPtoRecoTrack::beamSpot_
protected

Definition at line 118 of file TPtoRecoTrack.h.

Referenced by BeamSpot(), and SetBeamSpot().

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoA_
protected

Definition at line 108 of file TPtoRecoTrack.h.

Referenced by matchedA(), RTA(), and SetRecoTrack_AlgoA().

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoB_
protected

Definition at line 111 of file TPtoRecoTrack.h.

Referenced by matchedB(), RTB(), and SetRecoTrack_AlgoB().

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoA_
protected

Definition at line 109 of file TPtoRecoTrack.h.

Referenced by hasRVA(), RVA(), and SetRecoVertex_AlgoA().

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoB_
protected

Definition at line 112 of file TPtoRecoTrack.h.

Referenced by hasRVB(), RVB(), and SetRecoVertex_AlgoB().

float TPtoRecoTrack::sharedA_
protected

Definition at line 119 of file TPtoRecoTrack.h.

Referenced by GetSharedA(), and SetShared_AlgoA().

float TPtoRecoTrack::sharedB_
protected

Definition at line 120 of file TPtoRecoTrack.h.

Referenced by GetSharedB(), and SetShared_AlgoB().

GlobalVector TPtoRecoTrack::simMomPCA_
protected

Definition at line 116 of file TPtoRecoTrack.h.

Referenced by s_p(), and SetTrackingParticleMomentumPCA().

GlobalPoint TPtoRecoTrack::simPCA_
protected

Definition at line 117 of file TPtoRecoTrack.h.

Referenced by s_pca(), and SetTrackingParticlePCA().

TrackingParticleRef TPtoRecoTrack::trackingParticle_
protected

Definition at line 114 of file TPtoRecoTrack.h.

Referenced by matchedA(), matchedB(), SetTrackingParticle(), and TP().