CMS 3D CMS Logo

Public Member Functions | Private Attributes

VirtualKinematicParticle Class Reference

#include <VirtualKinematicParticle.h>

Inheritance diagram for VirtualKinematicParticle:
KinematicParticle ReferenceCounted

List of all members.

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 &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
virtual ~VirtualKinematicParticle ()

Private Attributes

ParticleKinematicLinearizedTrackStateFactory linFactory
KinematicStatePropagatorpropagator

Detailed Description

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.


Constructor & Destructor Documentation

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 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;}

Member Function Documentation

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.

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

KinematicState VirtualKinematicParticle::stateAtPoint ( const GlobalPoint point) const [virtual]

Member Data Documentation

Definition at line 72 of file VirtualKinematicParticle.h.

Referenced by particleLinearizedTrackState().