CMS 3D CMS Logo

TPtoRecoTrack Class Reference

#include <AnalysisDataFormats/TrackInfo/interface/TPtoRecoTrack.h>

List of all members.

Public Member Functions

bool allmatched ()
bool allmatchedA ()
bool allmatchedB ()
math::XYZPoint BeamSpot ()
bool hasPCA ()
bool hasRV ()
bool hasRVA ()
bool hasRVB ()
bool hasTPMother ()
bool matched ()
bool matchedA ()
bool matchedAnotB ()
bool matchedB ()
bool matchedBnotA ()
int numTPMothers ()
int numTPSourceTracks ()
double rA_d0 ()
double rA_d02 ()
double rA_dsz ()
double rA_dxy ()
double rA_dz ()
double rA_dz2 ()
double rB_d0 ()
double rB_d02 ()
double rB_dsz ()
double rB_dxy ()
double rB_dz ()
double rB_dz2 ()
reco::Track RTA ()
reco::Track RTB ()
reco::Vertex RVA ()
reco::Vertex RVB ()
double s_d0 ()
double s_dsz ()
double s_dxy ()
double s_dz ()
double s_eta ()
double s_lambda ()
GlobalVector s_p ()
GlobalPoint s_pca ()
double s_phi ()
double s_qoverp ()
double s_theta ()
GlobalPoint s_v ()
void SetBeamSpot (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 SetTrackingParticle (TrackingParticleRef tp)
void SetTrackingParticleMomentumPCA (const GlobalVector &p)
void SetTrackingParticlePCA (const GlobalPoint &v)
TrackingParticle TP ()
TrackingParticle TPMother ()
TrackingParticle TPMother (unsigned short i)
 TPtoRecoTrack ()
 ~TPtoRecoTrack ()

Protected Attributes

math::XYZPoint beamSpot_
reco::TrackBaseRef recoTrack_AlgoA_
reco::TrackBaseRef recoTrack_AlgoB_
reco::VertexRef recoVertex_AlgoA_
reco::VertexRef recoVertex_AlgoB_
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().

00006 {
00007     SetBeamSpot(math::XYZPoint(-9999.0, -9999.0, -9999.0)); 
00008     SetTrackingParticlePCA(GlobalPoint(-9999.0, -9999.0, -9999.0));
00009     SetTrackingParticleMomentumPCA(GlobalVector(-9999.0, -9999.0, -9999.0));
00010 }

TPtoRecoTrack::~TPtoRecoTrack (  ) 

Definition at line 13 of file TPtoRecoTrack.cc.

00014 {
00015 }


Member Function Documentation

bool TPtoRecoTrack::allmatched (  )  [inline]

Definition at line 57 of file TPtoRecoTrack.h.

References hasRV(), and matched().

00057 {return matched() && hasRV();} 

bool TPtoRecoTrack::allmatchedA (  )  [inline]

Definition at line 55 of file TPtoRecoTrack.h.

References hasRVA(), and matchedA().

00055 {return matchedA() && hasRVA();} 

bool TPtoRecoTrack::allmatchedB (  )  [inline]

Definition at line 56 of file TPtoRecoTrack.h.

References hasRVA(), and matchedB().

00056 {return matchedB() && hasRVA();} 

math::XYZPoint TPtoRecoTrack::BeamSpot (  )  [inline]

Definition at line 44 of file TPtoRecoTrack.h.

References beamSpot_.

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

00044 {return beamSpot_;}

bool TPtoRecoTrack::hasPCA (  )  [inline]

Definition at line 54 of file TPtoRecoTrack.h.

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

00054 {return s_pca().mag()<9999.0;}

bool TPtoRecoTrack::hasRV (  )  [inline]

Definition at line 53 of file TPtoRecoTrack.h.

References hasRVA(), and hasRVB().

Referenced by allmatched().

00053 {return hasRVA() && hasRVB();}

bool TPtoRecoTrack::hasRVA (  )  [inline]

Definition at line 51 of file TPtoRecoTrack.h.

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

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

00051 {return recoVertex_AlgoA_.isNonnull() && fabs(recoVertex_AlgoA_->position().Mag2())>0.0;}   // position is ROOT::MATH::Cartesian3D<double> 

bool TPtoRecoTrack::hasRVB (  )  [inline]

Definition at line 52 of file TPtoRecoTrack.h.

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

Referenced by hasRV().

00052 {return recoVertex_AlgoB_.isNonnull() && fabs(recoVertex_AlgoB_->position().Mag2())>0.0;}   // position is ROOT::MATH::Cartesian3D<double>

bool TPtoRecoTrack::hasTPMother (  )  [inline]

Definition at line 99 of file TPtoRecoTrack.h.

References numTPMothers().

00099 {return numTPMothers()>0;}

bool TPtoRecoTrack::matched (  )  [inline]

Definition at line 46 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

Referenced by allmatched().

00046 {return matchedA() && matchedB();}

bool TPtoRecoTrack::matchedA (  )  [inline]

Definition at line 47 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 TPtoRecoTrack::matchedAnotB (  )  [inline]

Definition at line 49 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

00049 {return matchedA() && !matchedB();}

bool TPtoRecoTrack::matchedB (  )  [inline]

Definition at line 48 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 TPtoRecoTrack::matchedBnotA (  )  [inline]

Definition at line 50 of file TPtoRecoTrack.h.

References matchedA(), and matchedB().

00050 {return matchedB() && !matchedA();}

int TPtoRecoTrack::numTPMothers (  ) 

Definition at line 55 of file TPtoRecoTrack.cc.

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

Referenced by hasTPMother(), and TPMother().

00056 {
00057     int count = 0;
00058     for(TrackingParticleRefVector::iterator si = TP().parentVertex()->sourceTracks_begin();
00059         si != TP().parentVertex()->sourceTracks_end(); si++)
00060     {
00061         for(TrackingParticleRefVector::iterator di = TP().parentVertex()->daughterTracks_begin();
00062             di != TP().parentVertex()->daughterTracks_end(); di++)
00063         {
00064             if(si != di) count++;
00065             break;
00066         }
00067         if(count>0) break;
00068     }
00069     return count;
00070 }

int TPtoRecoTrack::numTPSourceTracks (  )  [inline]

Definition at line 97 of file TPtoRecoTrack.h.

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

00097 {return TP().parentVertex()->nSourceTracks();}

double TPtoRecoTrack::rA_d0 (  )  [inline]

Definition at line 64 of file TPtoRecoTrack.h.

References rA_dxy().

00064 {return -1.0 * rA_dxy();}

double TPtoRecoTrack::rA_d02 (  )  [inline]

Definition at line 70 of file TPtoRecoTrack.h.

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

00070 {return -1.0 * RTA().dxy( RVA().position() );}

double TPtoRecoTrack::rA_dsz (  )  [inline]

Definition at line 62 of file TPtoRecoTrack.h.

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

00062 {return RTA().dsz( BeamSpot() );}

double TPtoRecoTrack::rA_dxy (  )  [inline]

Definition at line 60 of file TPtoRecoTrack.h.

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

Referenced by rA_d0().

00060 {return RTA().dxy( BeamSpot() );}

double TPtoRecoTrack::rA_dz (  )  [inline]

Definition at line 66 of file TPtoRecoTrack.h.

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

00066 {return RTA().dz( BeamSpot() );}

double TPtoRecoTrack::rA_dz2 (  )  [inline]

Definition at line 71 of file TPtoRecoTrack.h.

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

00071 {return RTA().dz( RVA().position() );}

double TPtoRecoTrack::rB_d0 (  )  [inline]

Definition at line 65 of file TPtoRecoTrack.h.

References rB_dxy().

00065 {return -1.0 * rB_dxy();}

double TPtoRecoTrack::rB_d02 (  )  [inline]

Definition at line 72 of file TPtoRecoTrack.h.

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

00072 {return -1.0 * RTB().dxy( RVB().position() );}

double TPtoRecoTrack::rB_dsz (  )  [inline]

Definition at line 63 of file TPtoRecoTrack.h.

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

00063 {return RTB().dsz( BeamSpot() );}

double TPtoRecoTrack::rB_dxy (  )  [inline]

Definition at line 61 of file TPtoRecoTrack.h.

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

Referenced by rB_d0().

00061 {return RTB().dxy( BeamSpot() );}

double TPtoRecoTrack::rB_dz (  )  [inline]

Definition at line 67 of file TPtoRecoTrack.h.

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

00067 {return RTB().dz( BeamSpot() );}

double TPtoRecoTrack::rB_dz2 (  )  [inline]

Definition at line 73 of file TPtoRecoTrack.h.

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

00073 {return RTB().dz( RVB().position());}

reco::Track TPtoRecoTrack::RTA (  )  [inline]

Definition at line 39 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().

reco::Track TPtoRecoTrack::RTB (  )  [inline]

Definition at line 40 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().

reco::Vertex TPtoRecoTrack::RVA (  )  [inline]

Definition at line 42 of file TPtoRecoTrack.h.

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

Referenced by rA_d02(), and rA_dz2().

reco::Vertex TPtoRecoTrack::RVB (  )  [inline]

Definition at line 43 of file TPtoRecoTrack.h.

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

Referenced by rB_d02(), and rB_dz2().

double TPtoRecoTrack::s_d0 (  )  [inline]

Definition at line 91 of file TPtoRecoTrack.h.

References s_dxy().

00091 {return -1.0*s_dxy();}

double TPtoRecoTrack::s_dsz (  )  [inline]

Definition at line 90 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().

00090 {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();}

double TPtoRecoTrack::s_dxy (  )  [inline]

Definition at line 89 of file TPtoRecoTrack.h.

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

Referenced by s_d0().

00089 {return ( - s_v().x() * s_p().y() + s_v().y() * s_p().x() ) / s_p().perp();}

double TPtoRecoTrack::s_dz (  )  [inline]

Definition at line 92 of file TPtoRecoTrack.h.

References 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().

00092 {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();}  

double TPtoRecoTrack::s_eta (  )  [inline]

Definition at line 87 of file TPtoRecoTrack.h.

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

00087 {return -0.5*log( tan (0.5*s_p().theta()) );}

double TPtoRecoTrack::s_lambda (  )  [inline]

Definition at line 85 of file TPtoRecoTrack.h.

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

00085 {return M_PI/2-s_p().theta();}

GlobalVector TPtoRecoTrack::s_p (  )  [inline]

Definition at line 79 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().

00079 {return simMomPCA_;}

GlobalPoint TPtoRecoTrack::s_pca (  )  [inline]

Definition at line 80 of file TPtoRecoTrack.h.

References simPCA_.

Referenced by hasPCA(), and s_v().

00080 {return simPCA_;}

double TPtoRecoTrack::s_phi (  )  [inline]

Definition at line 86 of file TPtoRecoTrack.h.

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

00086 {return s_p().phi();}

double TPtoRecoTrack::s_qoverp (  )  [inline]

Definition at line 83 of file TPtoRecoTrack.h.

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

00083 {return TP().charge() / s_p().mag();}

double TPtoRecoTrack::s_theta (  )  [inline]

Definition at line 84 of file TPtoRecoTrack.h.

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

00084 {return s_p().theta();}

GlobalPoint TPtoRecoTrack::s_v (  )  [inline]

Definition at line 81 of file TPtoRecoTrack.h.

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

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

00081 {return GlobalPoint(s_pca().x()-BeamSpot().x(), s_pca().y()-BeamSpot().y(), s_pca().z()-BeamSpot().z() );}

void TPtoRecoTrack::SetBeamSpot ( math::XYZPoint  bs  )  [inline]

Definition at line 36 of file TPtoRecoTrack.h.

References beamSpot_.

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

00036 {beamSpot_ = bs;}

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

Definition at line 30 of file TPtoRecoTrack.h.

References recoTrack_AlgoA_.

Referenced by TrackAlgoCompareUtil::produce().

00030 {recoTrack_AlgoA_ = track;}

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

Definition at line 31 of file TPtoRecoTrack.h.

References recoTrack_AlgoB_.

Referenced by TrackAlgoCompareUtil::produce().

00031 {recoTrack_AlgoB_ = track;}

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

Definition at line 33 of file TPtoRecoTrack.h.

References recoVertex_AlgoA_.

Referenced by TrackAlgoCompareUtil::produce().

00033 {recoVertex_AlgoA_ = vertex;}

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

Definition at line 34 of file TPtoRecoTrack.h.

References recoVertex_AlgoB_.

Referenced by TrackAlgoCompareUtil::produce().

00034 {recoVertex_AlgoB_ = vertex;}

void TPtoRecoTrack::SetTrackingParticle ( TrackingParticleRef  tp  )  [inline]

Definition at line 28 of file TPtoRecoTrack.h.

References trackingParticle_.

Referenced by TrackAlgoCompareUtil::produce().

00028 {trackingParticle_ = tp;}

void TPtoRecoTrack::SetTrackingParticleMomentumPCA ( const GlobalVector p  )  [inline]

Definition at line 76 of file TPtoRecoTrack.h.

References simMomPCA_.

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

00076 {simMomPCA_ = p;} 

void TPtoRecoTrack::SetTrackingParticlePCA ( const GlobalPoint v  )  [inline]

Definition at line 77 of file TPtoRecoTrack.h.

References simPCA_.

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

00077 {simPCA_ = v;} 

TrackingParticle TPtoRecoTrack::TP (  )  [inline]

Definition at line 41 of file TPtoRecoTrack.h.

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

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

TrackingParticle TPtoRecoTrack::TPMother (  )  [inline]

Definition at line 96 of file TPtoRecoTrack.h.

References numTPMothers().

00096 {return numTPMothers()==1 ? TPMother(0) : TrackingParticle();}

TrackingParticle TPtoRecoTrack::TPMother ( unsigned short  i  ) 

Definition at line 18 of file TPtoRecoTrack.cc.

References TrackingParticle::parentVertex(), HLT_VtxMuL3::result, and TP().

00019 {
00020     std::vector<TrackingParticle>  result;
00021 
00022     if( TP().parentVertex().isNonnull())
00023     {
00024         if(TP().parentVertex()->nSourceTracks() > 0)
00025         {
00026         for(TrackingParticleRefVector::iterator si = TP().parentVertex()->sourceTracks_begin();
00027             si != TP().parentVertex()->sourceTracks_end(); si++)
00028             {
00029             for(TrackingParticleRefVector::iterator di = TP().parentVertex()->daughterTracks_begin();
00030                 di != TP().parentVertex()->daughterTracks_end(); di++)
00031                 {
00032                     if(si != di)
00033                     {
00034                         result.push_back(**si);
00035                         break;
00036                     }
00037                 }
00038                 if(result.size()) break;
00039             }
00040         }
00041         else
00042         {
00043             return TrackingParticle();
00044         }
00045     }
00046     else
00047     {
00048         return TrackingParticle();
00049     }
00050 
00051     return i < result.size() ? result[i] : TrackingParticle();
00052 }


Member Data Documentation

math::XYZPoint TPtoRecoTrack::beamSpot_ [protected]

Definition at line 113 of file TPtoRecoTrack.h.

Referenced by BeamSpot(), and SetBeamSpot().

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoA_ [protected]

Definition at line 103 of file TPtoRecoTrack.h.

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

reco::TrackBaseRef TPtoRecoTrack::recoTrack_AlgoB_ [protected]

Definition at line 106 of file TPtoRecoTrack.h.

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

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoA_ [protected]

Definition at line 104 of file TPtoRecoTrack.h.

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

reco::VertexRef TPtoRecoTrack::recoVertex_AlgoB_ [protected]

Definition at line 107 of file TPtoRecoTrack.h.

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

GlobalVector TPtoRecoTrack::simMomPCA_ [protected]

Definition at line 111 of file TPtoRecoTrack.h.

Referenced by s_p(), and SetTrackingParticleMomentumPCA().

GlobalPoint TPtoRecoTrack::simPCA_ [protected]

Definition at line 112 of file TPtoRecoTrack.h.

Referenced by s_pca(), and SetTrackingParticlePCA().

TrackingParticleRef TPtoRecoTrack::trackingParticle_ [protected]

Definition at line 109 of file TPtoRecoTrack.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:33:56 2009 for CMSSW by  doxygen 1.5.4