CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

bool TPtoRecoTrack::allmatchedA ( ) const
inline

Definition at line 58 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::allmatchedB ( ) const
inline

Definition at line 59 of file TPtoRecoTrack.h.

math::XYZPoint TPtoRecoTrack::BeamSpot ( ) const
inline

Definition at line 47 of file TPtoRecoTrack.h.

float TPtoRecoTrack::GetSharedA ( ) const
inline

Definition at line 61 of file TPtoRecoTrack.h.

float TPtoRecoTrack::GetSharedB ( ) const
inline

Definition at line 62 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::hasPCA ( ) const
inline

Definition at line 57 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::hasRV ( ) const
inline

Definition at line 56 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::hasRVA ( ) const
inline

Definition at line 54 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::hasRVB ( ) const
inline

Definition at line 55 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::hasTPMother ( ) const
inline

Definition at line 104 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::matched ( ) const
inline

Definition at line 49 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::matchedA ( ) const
inline

Definition at line 50 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::matchedAnotB ( ) const
inline

Definition at line 52 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::matchedB ( ) const
inline

Definition at line 51 of file TPtoRecoTrack.h.

bool TPtoRecoTrack::matchedBnotA ( ) const
inline

Definition at line 53 of file TPtoRecoTrack.h.

int TPtoRecoTrack::numTPMothers ( ) const

Definition at line 55 of file TPtoRecoTrack.cc.

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

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.

double TPtoRecoTrack::rA_d0 ( ) const
inline

Definition at line 69 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rA_d02 ( ) const
inline

Definition at line 75 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rA_dsz ( ) const
inline

Definition at line 67 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rA_dxy ( ) const
inline

Definition at line 65 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rA_dz ( ) const
inline

Definition at line 71 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rA_dz2 ( ) const
inline

Definition at line 76 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_d0 ( ) const
inline

Definition at line 70 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_d02 ( ) const
inline

Definition at line 77 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_dsz ( ) const
inline

Definition at line 68 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_dxy ( ) const
inline

Definition at line 66 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_dz ( ) const
inline

Definition at line 72 of file TPtoRecoTrack.h.

double TPtoRecoTrack::rB_dz2 ( ) const
inline

Definition at line 78 of file TPtoRecoTrack.h.

reco::Track TPtoRecoTrack::RTA ( ) const
inline

Definition at line 42 of file TPtoRecoTrack.h.

reco::Track TPtoRecoTrack::RTB ( ) const
inline

Definition at line 43 of file TPtoRecoTrack.h.

reco::Vertex TPtoRecoTrack::RVA ( ) const
inline

Definition at line 45 of file TPtoRecoTrack.h.

reco::Vertex TPtoRecoTrack::RVB ( ) const
inline

Definition at line 46 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_d0 ( ) const
inline

Definition at line 96 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_dsz ( ) const
inline

Definition at line 95 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_dxy ( ) const
inline

Definition at line 94 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_dz ( ) const
inline

Definition at line 97 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_eta ( ) const
inline

Definition at line 92 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_lambda ( ) const
inline

Definition at line 90 of file TPtoRecoTrack.h.

GlobalVector TPtoRecoTrack::s_p ( ) const
inline

Definition at line 84 of file TPtoRecoTrack.h.

GlobalPoint TPtoRecoTrack::s_pca ( ) const
inline

Definition at line 85 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_phi ( ) const
inline

Definition at line 91 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_qoverp ( ) const
inline

Definition at line 88 of file TPtoRecoTrack.h.

double TPtoRecoTrack::s_theta ( ) const
inline

Definition at line 89 of file TPtoRecoTrack.h.

GlobalPoint TPtoRecoTrack::s_v ( ) const
inline

Definition at line 86 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetBeamSpot ( const math::XYZPoint bs)
inline

Definition at line 39 of file TPtoRecoTrack.h.

Referenced by TPtoRecoTrack().

void TPtoRecoTrack::SetRecoTrack_AlgoA ( reco::TrackBaseRef  track)
inline

Definition at line 30 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetRecoTrack_AlgoB ( reco::TrackBaseRef  track)
inline

Definition at line 31 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetRecoVertex_AlgoA ( reco::VertexRef  vertex)
inline

Definition at line 36 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetRecoVertex_AlgoB ( reco::VertexRef  vertex)
inline

Definition at line 37 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetShared_AlgoA ( const float &  mA)
inline

Definition at line 33 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetShared_AlgoB ( const float &  mB)
inline

Definition at line 34 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetTrackingParticle ( TrackingParticleRef  tp)
inline

Definition at line 28 of file TPtoRecoTrack.h.

void TPtoRecoTrack::SetTrackingParticleMomentumPCA ( const GlobalVector p)
inline

Definition at line 81 of file TPtoRecoTrack.h.

Referenced by TPtoRecoTrack().

void TPtoRecoTrack::SetTrackingParticlePCA ( const GlobalPoint v)
inline

Definition at line 82 of file TPtoRecoTrack.h.

Referenced by TPtoRecoTrack().

TrackingParticle TPtoRecoTrack::TP ( ) const
inline

Definition at line 44 of file TPtoRecoTrack.h.

Referenced by numTPMothers(), and TPMother().

TrackingParticle TPtoRecoTrack::TPMother ( unsigned short  i) const

Definition at line 18 of file TPtoRecoTrack.cc.

References 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.size()) 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 }
int i
Definition: DBlmapReader.cc:9
TrackingParticle TP() const
Definition: TPtoRecoTrack.h:44
tuple result
Definition: mps_fire.py:84
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.

Member Data Documentation

math::XYZPoint TPtoRecoTrack::beamSpot_
protected

Definition at line 118 of file TPtoRecoTrack.h.

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoA_
protected

Definition at line 108 of file TPtoRecoTrack.h.

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoB_
protected

Definition at line 111 of file TPtoRecoTrack.h.

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoA_
protected

Definition at line 109 of file TPtoRecoTrack.h.

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoB_
protected

Definition at line 112 of file TPtoRecoTrack.h.

float TPtoRecoTrack::sharedA_
protected

Definition at line 119 of file TPtoRecoTrack.h.

float TPtoRecoTrack::sharedB_
protected

Definition at line 120 of file TPtoRecoTrack.h.

GlobalVector TPtoRecoTrack::simMomPCA_
protected

Definition at line 116 of file TPtoRecoTrack.h.

GlobalPoint TPtoRecoTrack::simPCA_
protected

Definition at line 117 of file TPtoRecoTrack.h.

TrackingParticleRef TPtoRecoTrack::trackingParticle_
protected

Definition at line 114 of file TPtoRecoTrack.h.