CMS 3D CMS Logo

Public Member Functions | Private Attributes

TransientTrackKinematicParticle Class Reference

#include <TransientTrackKinematicParticle.h>

Inheritance diagram for TransientTrackKinematicParticle:
KinematicParticle ReferenceCounted

List of all members.

Public Member Functions

const reco::TransientTrackinitialTransientTrack () const
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
ReferenceCountingPointer
< KinematicParticle
refittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=0) const
KinematicState stateAtPoint (const GlobalPoint &point) const
 TransientTrackKinematicParticle (const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=0)
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 17 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(), 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]

Member Function Documentation

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.

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.

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

Member Data Documentation

Definition at line 77 of file TransientTrackKinematicParticle.h.

Definition at line 84 of file TransientTrackKinematicParticle.h.

Definition at line 80 of file TransientTrackKinematicParticle.h.