#include <TransientTrackKinematicParticle.h>
Class representing KinematicParticle created fromTransientTrack. Uses specific KinematicState builders and propagators. Extends KinematicParticle class implementing its abstract methods and adding several new ones.
Definition at line 17 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 ExpressReco_HICollisions_FallBack::chi2, KinematicStatePropagator::clone(), KinematicState::magneticField(), LargeD0_PixelPairStep_cff::propagator, and diffTreeTool::tree.
{ theField = kineState.magneticField(); if(previousParticle.get() == 0) { initState = kineState; }else{initState = previousParticle->initialState();} cState = kineState; inTrack = initialTrack; pState = previousParticle; chi2 = chiSquared; ndf = degreesOfFr; lConstraint = lastConstraint; if(pr!=0) { propagator = pr->clone(); }else{ propagator = new TrackKinematicStatePropagator(); } tree = 0; }
TransientTrackKinematicParticle::~TransientTrackKinematicParticle | ( | ) | [virtual] |
Definition at line 32 of file TransientTrackKinematicParticle.cc.
References LargeD0_PixelPairStep_cff::propagator.
{delete propagator;}
const TransientTrack * TransientTrackKinematicParticle::initialTransientTrack | ( | ) | const |
Access to initial TransientTrack (if any)
Definition at line 79 of file TransientTrackKinematicParticle.cc.
Referenced by KinematicVertex::operator reco::Vertex(), operator==(), and KinematicParticleFactoryFromTransientTrack::particle().
{return inTrack;}
bool TransientTrackKinematicParticle::operator!= | ( | const KinematicParticle & | other | ) | const [virtual] |
Implements KinematicParticle.
Definition at line 60 of file TransientTrackKinematicParticle.cc.
{ if (*this == other){ return false; }else{return true;} }
bool TransientTrackKinematicParticle::operator== | ( | const ReferenceCountingPointer< KinematicParticle > & | other | ) | const [virtual] |
Implements KinematicParticle.
Definition at line 53 of file TransientTrackKinematicParticle.cc.
{ bool res = false; if(*this == *other) res = true; return res; }
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 KinematicParticle::initialState(), and initialTransientTrack().
{ bool dc = false; //first looking if this is an object of the same type const KinematicParticle * lp = &other; const TransientTrackKinematicParticle * lPart = dynamic_cast<const TransientTrackKinematicParticle * >(lp); if(lPart != 0){ //then comparing particle with their initial TransientTracks if((initialTransientTrack())&&(lPart->initialTransientTrack())) { if(initialTransientTrack() == lPart->initialTransientTrack()) dc = true; }else{if(initialState() == lPart->initialState()) dc = true;} } return dc; }
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.
{ TransientTrackKinematicParticle * cr = const_cast<TransientTrackKinematicParticle * >(this); RefCountedKinematicParticle lp = ReferenceCountingPointer<KinematicParticle>(cr); return linFactory.linearizedTrackState(point,lp); }
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 LargeD0_PixelPairStep_cff::propagator.
{ TransientTrackKinematicParticle * ncp = const_cast<TransientTrackKinematicParticle * >(this); return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(state,chi2,ndf,cons, ReferenceCountingPointer<KinematicParticle>(ncp), propagator, initialTransientTrack())); }
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 LargeD0_PixelPairStep_cff::propagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ GlobalPoint iP = cState.kinematicParameters().position(); if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z())) { return cState ; }else{return propagator->propagateToTheTransversePCA(cState,point);} }
const reco::TransientTrack* TransientTrackKinematicParticle::inTrack [private] |
Definition at line 77 of file TransientTrackKinematicParticle.h.
Definition at line 84 of file TransientTrackKinematicParticle.h.
Definition at line 80 of file TransientTrackKinematicParticle.h.