#include <RecoVertex/KinematicFitPrimitives/interface/TransientTrackKinematicParticle.h>
Public Member Functions | |
const reco::TransientTrack * | initialTransientTrack () const |
Access to initial TransientTrack (if any). | |
bool | operator!= (const KinematicParticle &other) const |
bool | operator== (const ReferenceCountingPointer< KinematicParticle > &other) const |
bool | operator== (const KinematicParticle &other) const |
Comparison by contents operator Returns TRUE if initial TransientTracks match(if they exist). | |
RefCountedLinearizedTrackState | particleLinearizedTrackState (const GlobalPoint &point) const |
Method returning LinearizedTrackState of the particle needed for Kalman flter vertex fit. | |
ReferenceCountingPointer < KinematicParticle > | refittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=0) const |
Method producing new particle with refitted parameters. | |
KinematicState | stateAtPoint (const GlobalPoint &point) const |
Access to KinematicState of particle at given point. | |
TransientTrackKinematicParticle (const KinematicState &kineState, float &chiSquared, float °reesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=0) | |
Constructor using KinematicState, Previous state of particle last constraint used and original TransientTrack, if any. | |
virtual | ~TransientTrackKinematicParticle () |
Private Attributes | |
const reco::TransientTrack * | inTrack |
ParticleKinematicLinearizedTrackStateFactory | linFactory |
KinematicStatePropagator * | propagator |
Uses specific KinematicState builders and propagators. Extends KinematicParticle class implementing its abstract methods and adding several new ones.
Definition at line 18 of file TransientTrackKinematicParticle.h.
TransientTrackKinematicParticle::TransientTrackKinematicParticle | ( | const KinematicState & | kineState, | |
float & | chiSquared, | |||
float & | degreesOfFr, | |||
KinematicConstraint * | lastConstraint, | |||
ReferenceCountingPointer< KinematicParticle > | previousParticle, | |||
KinematicStatePropagator * | pr, | |||
const reco::TransientTrack * | initialTrack = 0 | |||
) |
Constructor using KinematicState, Previous state of particle last constraint used and original TransientTrack, if any.
All the pointers can be set to 0 if there's no such information available. Constructor should be use by specific factory only. Propagator for TransientTrack KinematicState is used.
Definition at line 7 of file TransientTrackKinematicParticle.cc.
References KinematicStatePropagator::clone(), KinematicState::magneticField(), and tree.
Referenced by refittedParticle().
00011 { 00012 theField = kineState.magneticField(); 00013 if(previousParticle.get() == 0) 00014 { 00015 initState = kineState; 00016 }else{initState = previousParticle->initialState();} 00017 cState = kineState; 00018 inTrack = initialTrack; 00019 pState = previousParticle; 00020 chi2 = chiSquared; 00021 ndf = degreesOfFr; 00022 lConstraint = lastConstraint; 00023 if(pr!=0) 00024 { 00025 propagator = pr->clone(); 00026 }else{ 00027 propagator = new TrackKinematicStatePropagator(); 00028 } 00029 tree = 0; 00030 }
TransientTrackKinematicParticle::~TransientTrackKinematicParticle | ( | ) | [virtual] |
Definition at line 32 of file TransientTrackKinematicParticle.cc.
References propagator.
00033 {delete propagator;}
const TransientTrack * TransientTrackKinematicParticle::initialTransientTrack | ( | ) | const |
Access to initial TransientTrack (if any).
Definition at line 79 of file TransientTrackKinematicParticle.cc.
References inTrack.
Referenced by operator==(), KinematicParticleFactoryFromTransientTrack::particle(), and refittedParticle().
00080 {return inTrack;}
bool TransientTrackKinematicParticle::operator!= | ( | const KinematicParticle & | other | ) | const [virtual] |
bool TransientTrackKinematicParticle::operator== | ( | const ReferenceCountingPointer< KinematicParticle > & | other | ) | const [virtual] |
Implements KinematicParticle.
Definition at line 53 of file TransientTrackKinematicParticle.cc.
References res.
00054 { 00055 bool res = false; 00056 if(*this == *other) res = true; 00057 return res; 00058 }
bool TransientTrackKinematicParticle::operator== | ( | const KinematicParticle & | other | ) | const [virtual] |
Comparison by contents operator Returns TRUE if initial TransientTracks match(if they exist).
If not, compares the initial KinematicStates Retunes true if they match.
Implements KinematicParticle.
Definition at line 35 of file TransientTrackKinematicParticle.cc.
References dc, KinematicParticle::initialState(), initialTransientTrack(), and lp.
00036 { 00037 bool dc = false; 00038 00039 //first looking if this is an object of the same type 00040 const KinematicParticle * lp = &other; 00041 const TransientTrackKinematicParticle * lPart = dynamic_cast<const TransientTrackKinematicParticle * >(lp); 00042 if(lPart != 0){ 00043 00044 //then comparing particle with their initial TransientTracks 00045 if((initialTransientTrack())&&(lPart->initialTransientTrack())) 00046 { 00047 if(initialTransientTrack() == lPart->initialTransientTrack()) dc = true; 00048 }else{if(initialState() == lPart->initialState()) dc = true;} 00049 } 00050 return dc; 00051 }
TransientTrackKinematicParticle::RefCountedLinearizedTrackState TransientTrackKinematicParticle::particleLinearizedTrackState | ( | const GlobalPoint & | point | ) | const [virtual] |
Method returning LinearizedTrackState of the particle needed for Kalman flter vertex fit.
This implementation uses the ParticleLinearizedTrackStateFactory class.
Implements KinematicParticle.
Definition at line 91 of file TransientTrackKinematicParticle.cc.
References ParticleKinematicLinearizedTrackStateFactory::linearizedTrackState(), linFactory, and lp.
00092 { 00093 TransientTrackKinematicParticle * cr = const_cast<TransientTrackKinematicParticle * >(this); 00094 RefCountedKinematicParticle lp = ReferenceCountingPointer<KinematicParticle>(cr); 00095 return linFactory.linearizedTrackState(point,lp); 00096 }
ReferenceCountingPointer< KinematicParticle > TransientTrackKinematicParticle::refittedParticle | ( | const KinematicState & | state, | |
float | chi2, | |||
float | ndf, | |||
KinematicConstraint * | cons = 0 | |||
) | const [virtual] |
Method producing new particle with refitted parameters.
Current state is then shifted to previous state. RCP<TransientTrackKinematicParticle> is returned.
Implements KinematicParticle.
Definition at line 82 of file TransientTrackKinematicParticle.cc.
References initialTransientTrack(), propagator, and TransientTrackKinematicParticle().
00084 { 00085 TransientTrackKinematicParticle * ncp = const_cast<TransientTrackKinematicParticle * >(this); 00086 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(state,chi2,ndf,cons, 00087 ReferenceCountingPointer<KinematicParticle>(ncp), propagator, initialTransientTrack())); 00088 }
KinematicState TransientTrackKinematicParticle::stateAtPoint | ( | const GlobalPoint & | point | ) | const [virtual] |
Access to KinematicState of particle at given point.
Implements KinematicParticle.
Definition at line 67 of file TransientTrackKinematicParticle.cc.
References KinematicParticle::cState, KinematicState::kinematicParameters(), KinematicParameters::position(), KinematicStatePropagator::propagateToTheTransversePCA(), propagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00068 { 00069 GlobalPoint iP = cState.kinematicParameters().position(); 00070 if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z())) 00071 { 00072 return cState ; 00073 }else{return propagator->propagateToTheTransversePCA(cState,point);} 00074 }
const reco::TransientTrack* TransientTrackKinematicParticle::inTrack [private] |
Definition at line 77 of file TransientTrackKinematicParticle.h.
Referenced by initialTransientTrack().
Definition at line 84 of file TransientTrackKinematicParticle.h.
Referenced by particleLinearizedTrackState().
Definition at line 80 of file TransientTrackKinematicParticle.h.
Referenced by refittedParticle(), stateAtPoint(), and ~TransientTrackKinematicParticle().