#include <VirtualKinematicParticle.h>
Public Member Functions | |
bool | operator!= (const KinematicParticle &other) const |
bool | operator== (const KinematicParticle &other) const |
bool | operator== (const ReferenceCountingPointer< KinematicParticle > &other) const |
RefCountedLinearizedTrackState | particleLinearizedTrackState (const GlobalPoint &point) const |
RefCountedKinematicParticle | refittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=0) const |
KinematicState | stateAtPoint (const GlobalPoint &point) const |
VirtualKinematicParticle (const KinematicState &kineState, float &chiSquared, float °reesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr) | |
virtual | ~VirtualKinematicParticle () |
Private Attributes | |
ParticleKinematicLinearizedTrackStateFactory | linFactory |
KinematicStatePropagator * | propagator |
Class representing KinematicParticle created as a result of kinematic fit. uses the same state propagator as a TransientTrackKinematicParticle
Definition at line 14 of file VirtualKinematicParticle.h.
VirtualKinematicParticle::VirtualKinematicParticle | ( | const KinematicState & | kineState, |
float & | chiSquared, | ||
float & | degreesOfFr, | ||
KinematicConstraint * | lastConstraint, | ||
ReferenceCountingPointer< KinematicParticle > | previousParticle, | ||
KinematicStatePropagator * | pr | ||
) |
Constructor using KinematicState, Previous state of particle and last constraint used . 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 TransientTrackKinematicState is used.
Definition at line 5 of file VirtualKinematicParticle.cc.
References ExpressReco_HICollisions_FallBack::chi2, KinematicStatePropagator::clone(), KinematicState::magneticField(), LargeD0_PixelPairStep_cff::propagator, and diffTreeTool::tree.
Referenced by refittedParticle().
{ theField = kineState.magneticField(); if(previousParticle.get() == 0) { initState = kineState; }else{initState = previousParticle->initialState();} cState = kineState; pState = previousParticle; chi2 = chiSquared; ndf = degreesOfFr; lConstraint = lastConstraint; if(pr != 0) { propagator = pr->clone(); }else{ propagator = new TrackKinematicStatePropagator(); } tree = 0; }
VirtualKinematicParticle::~VirtualKinematicParticle | ( | ) | [virtual] |
Definition at line 29 of file VirtualKinematicParticle.cc.
References propagator.
{delete propagator;}
bool VirtualKinematicParticle::operator!= | ( | const KinematicParticle & | other | ) | const [virtual] |
Implements KinematicParticle.
Definition at line 50 of file VirtualKinematicParticle.cc.
{ if (*this == other){ return false; }else{return true;} }
bool VirtualKinematicParticle::operator== | ( | const ReferenceCountingPointer< KinematicParticle > & | other | ) | const [virtual] |
Implements KinematicParticle.
Definition at line 43 of file VirtualKinematicParticle.cc.
{ bool res = false; if(*this == *other) res = true; return res; }
bool VirtualKinematicParticle::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 32 of file VirtualKinematicParticle.cc.
References KinematicParticle::initialState().
{ bool dc = false; //first looking if this is an object of the same type const KinematicParticle * lp = &other; const VirtualKinematicParticle * lPart = dynamic_cast<const VirtualKinematicParticle * >(lp); if(lPart != 0 && initialState() == lPart->initialState()) dc = true; return dc; }
VirtualKinematicParticle::RefCountedLinearizedTrackState VirtualKinematicParticle::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 75 of file VirtualKinematicParticle.cc.
References ParticleKinematicLinearizedTrackStateFactory::linearizedTrackState(), and linFactory.
{ VirtualKinematicParticle * cr = const_cast<VirtualKinematicParticle * >(this); RefCountedKinematicParticle lp = ReferenceCountingPointer<KinematicParticle>(cr); return linFactory.linearizedTrackState(point,lp); }
RefCountedKinematicParticle VirtualKinematicParticle::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<VirtualKinematicParticle> is returned.
Implements KinematicParticle.
Definition at line 65 of file VirtualKinematicParticle.cc.
References cond::rpcobimon::current, propagator, and VirtualKinematicParticle().
{ VirtualKinematicParticle * ncp = const_cast<VirtualKinematicParticle * >(this); ReferenceCountingPointer<KinematicParticle> current = ReferenceCountingPointer<KinematicParticle>(ncp); return ReferenceCountingPointer<KinematicParticle>(new VirtualKinematicParticle(state,chi2,ndf,cons,current, propagator)); }
KinematicState VirtualKinematicParticle::stateAtPoint | ( | const GlobalPoint & | point | ) | const [virtual] |
Access to KinematicState of particle at given point
Implements KinematicParticle.
Definition at line 57 of file VirtualKinematicParticle.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().
{ 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);} }
Definition at line 72 of file VirtualKinematicParticle.h.
Referenced by particleLinearizedTrackState().
Definition at line 68 of file VirtualKinematicParticle.h.
Referenced by refittedParticle(), stateAtPoint(), and ~VirtualKinematicParticle().