CMS 3D CMS Logo

TransientTrackKinematicParticle Class Reference

Class representing KinematicParticle created fromTransientTrack. More...

#include <RecoVertex/KinematicFitPrimitives/interface/TransientTrackKinematicParticle.h>

Inheritance diagram for TransientTrackKinematicParticle:

KinematicParticle ReferenceCounted

List of all members.

Public Member Functions

const reco::TransientTrackinitialTransientTrack () 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 &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.
virtual ~TransientTrackKinematicParticle ()

Private Attributes

const reco::TransientTrackinTrack
ParticleKinematicLinearizedTrackStateFactory linFactory
KinematicStatePropagatorpropagator


Detailed Description

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 18 of file TransientTrackKinematicParticle.h.


Constructor & Destructor Documentation

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


Member Function Documentation

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]

Implements KinematicParticle.

Definition at line 60 of file TransientTrackKinematicParticle.cc.

00061 {
00062  if (*this == other){
00063   return false;
00064  }else{return true;} 
00065 }

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.

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

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 }


Member Data Documentation

const reco::TransientTrack* TransientTrackKinematicParticle::inTrack [private]

Definition at line 77 of file TransientTrackKinematicParticle.h.

Referenced by initialTransientTrack().

ParticleKinematicLinearizedTrackStateFactory TransientTrackKinematicParticle::linFactory [private]

Definition at line 84 of file TransientTrackKinematicParticle.h.

Referenced by particleLinearizedTrackState().

KinematicStatePropagator* TransientTrackKinematicParticle::propagator [private]

Definition at line 80 of file TransientTrackKinematicParticle.h.

Referenced by refittedParticle(), stateAtPoint(), and ~TransientTrackKinematicParticle().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:24 2009 for CMSSW by  doxygen 1.5.4