#include <AnalysisDataFormats/TrackInfo/interface/TPtoRecoTrack.h>
Definition at line 21 of file TPtoRecoTrack.h.
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 | ( | ) |
bool TPtoRecoTrack::allmatched | ( | ) | [inline] |
bool TPtoRecoTrack::allmatchedA | ( | ) | [inline] |
bool TPtoRecoTrack::allmatchedB | ( | ) | [inline] |
math::XYZPoint TPtoRecoTrack::BeamSpot | ( | ) | [inline] |
bool TPtoRecoTrack::hasPCA | ( | ) | [inline] |
Definition at line 54 of file TPtoRecoTrack.h.
References PV3DBase< T, PVType, FrameType >::mag(), and s_pca().
bool TPtoRecoTrack::hasRV | ( | ) | [inline] |
Definition at line 53 of file TPtoRecoTrack.h.
References hasRVA(), and hasRVB().
Referenced by allmatched().
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().
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().
00047 {return trackingParticle_.isNonnull() && recoTrack_AlgoA_.isNonnull();}
bool TPtoRecoTrack::matchedAnotB | ( | ) | [inline] |
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().
00048 {return trackingParticle_.isNonnull() && recoTrack_AlgoB_.isNonnull();}
bool TPtoRecoTrack::matchedBnotA | ( | ) | [inline] |
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] |
double TPtoRecoTrack::rA_d02 | ( | ) | [inline] |
double TPtoRecoTrack::rA_dsz | ( | ) | [inline] |
Definition at line 62 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dsz(), and RTA().
double TPtoRecoTrack::rA_dxy | ( | ) | [inline] |
Definition at line 60 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dxy(), and RTA().
Referenced by rA_d0().
double TPtoRecoTrack::rA_dz | ( | ) | [inline] |
Definition at line 66 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dz(), and RTA().
double TPtoRecoTrack::rA_dz2 | ( | ) | [inline] |
double TPtoRecoTrack::rB_d0 | ( | ) | [inline] |
double TPtoRecoTrack::rB_d02 | ( | ) | [inline] |
double TPtoRecoTrack::rB_dsz | ( | ) | [inline] |
Definition at line 63 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dsz(), and RTB().
double TPtoRecoTrack::rB_dxy | ( | ) | [inline] |
Definition at line 61 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dxy(), and RTB().
Referenced by rB_d0().
double TPtoRecoTrack::rB_dz | ( | ) | [inline] |
Definition at line 67 of file TPtoRecoTrack.h.
References BeamSpot(), reco::TrackBase::dz(), and RTB().
double TPtoRecoTrack::rB_dz2 | ( | ) | [inline] |
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().
00039 {return recoTrack_AlgoA_.isNonnull() ? *recoTrack_AlgoA_ : reco::Track();}
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().
00040 {return recoTrack_AlgoB_.isNonnull() ? *recoTrack_AlgoB_ : reco::Track();}
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().
00042 {return recoVertex_AlgoA_.isNonnull() ? *recoVertex_AlgoA_ : reco::Vertex();}
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().
00043 {return recoVertex_AlgoB_.isNonnull() ? *recoVertex_AlgoB_ : reco::Vertex();}
double TPtoRecoTrack::s_d0 | ( | ) | [inline] |
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] |
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.
double TPtoRecoTrack::s_lambda | ( | ) | [inline] |
Definition at line 85 of file TPtoRecoTrack.h.
References s_p(), and PV3DBase< T, PVType, FrameType >::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] |
double TPtoRecoTrack::s_phi | ( | ) | [inline] |
Definition at line 86 of file TPtoRecoTrack.h.
References PV3DBase< T, PVType, FrameType >::phi(), and s_p().
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().
double TPtoRecoTrack::s_theta | ( | ) | [inline] |
Definition at line 84 of file TPtoRecoTrack.h.
References s_p(), and PV3DBase< T, PVType, FrameType >::theta().
GlobalPoint TPtoRecoTrack::s_v | ( | ) | [inline] |
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().
00041 {return trackingParticle_.isNonnull() ? *trackingParticle_ : TrackingParticle();}
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 }
math::XYZPoint TPtoRecoTrack::beamSpot_ [protected] |
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().