CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
VirtualKinematicParticle Class Reference

#include <VirtualKinematicParticle.h>

Inheritance diagram for VirtualKinematicParticle:
KinematicParticle ReferenceCounted

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 ()
 
- Public Member Functions inherited from KinematicParticle
virtual float chiSquared () const
 
virtual KinematicTreecorrespondingTree () const
 
virtual KinematicState currentState () const
 
virtual float degreesOfFreedom () const
 
virtual KinematicState initialState () const
 
 KinematicParticle ()
 
virtual KinematicConstraintlastConstraint () const
 
const MagneticFieldmagneticField () const
 
virtual bool operator< (const KinematicParticle &other) const
 
virtual
ReferenceCountingPointer
< KinematicParticle
previousParticle () const
 
reco::TransientTrack refittedTransientTrack () const
 
virtual ~KinematicParticle ()
 

Private Attributes

ParticleKinematicLinearizedTrackStateFactory linFactory
 
KinematicStatePropagatorpropagator
 

Additional Inherited Members

- Public Types inherited from KinematicParticle
typedef
ReferenceCountingPointer
< LinearizedTrackState< 6 > > 
RefCountedLinearizedTrackState
 
- Protected Member Functions inherited from KinematicParticle
virtual void setTreePointer (KinematicTree *tr) const
 
- Protected Attributes inherited from KinematicParticle
float chi2
 
KinematicState cState
 
KinematicState initState
 
KinematicConstraintlConstraint
 
float ndf
 
ReferenceCountingPointer
< KinematicParticle
pState
 
const MagneticFieldtheField
 
KinematicTreetree
 

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(), and MainPageGenerator::tree.

Referenced by refittedParticle().

9 {
10  theField = kineState.magneticField();
11  if(previousParticle.get() == 0)
12  {
13  initState = kineState;
14  }else{initState = previousParticle->initialState();}
15  cState = kineState;
17  chi2 = chiSquared;
18  ndf = degreesOfFr;
20  if(pr != 0)
21  {
22  propagator = pr->clone();
23  }else{
25  }
26  tree = 0;
27 }
KinematicTree * tree
ReferenceCountingPointer< KinematicParticle > pState
virtual float chiSquared() const
KinematicState cState
virtual KinematicStatePropagator * clone() const =0
KinematicConstraint * lConstraint
KinematicState initState
const MagneticField * magneticField() const
const MagneticField * theField
virtual KinematicConstraint * lastConstraint() const
KinematicStatePropagator * propagator
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
VirtualKinematicParticle::~VirtualKinematicParticle ( )
virtual

Definition at line 29 of file VirtualKinematicParticle.cc.

References propagator.

30 {delete propagator;}
KinematicStatePropagator * propagator

Member Function Documentation

bool VirtualKinematicParticle::operator!= ( const KinematicParticle other) const
virtual

Implements KinematicParticle.

Definition at line 50 of file VirtualKinematicParticle.cc.

51 {
52  if (*this == other){
53  return false;
54  }else{return true;}
55 }
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().

33 {
34  bool dc = false;
35 
36 //first looking if this is an object of the same type
37  const KinematicParticle * lp = &other;
38  const VirtualKinematicParticle * lPart = dynamic_cast<const VirtualKinematicParticle * >(lp);
39  if(lPart != 0 && initialState() == lPart->initialState()) dc = true;
40  return dc;
41 }
virtual KinematicState initialState() const
bool VirtualKinematicParticle::operator== ( const ReferenceCountingPointer< KinematicParticle > &  other) const
virtual

Implements KinematicParticle.

Definition at line 43 of file VirtualKinematicParticle.cc.

44 {
45  bool res = false;
46  if(*this == *other) res = true;
47  return res;
48 }
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.

76 {
77  VirtualKinematicParticle * cr = const_cast<VirtualKinematicParticle * >(this);
79  return linFactory.linearizedTrackState(point,lp);
80 }
ParticleKinematicLinearizedTrackStateFactory linFactory
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, RefCountedKinematicParticle &prt) const
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().

67 {
68  VirtualKinematicParticle * ncp = const_cast<VirtualKinematicParticle * >(this);
71  propagator));
72 }
VirtualKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
KinematicStatePropagator * 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().

58 {
60  if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z()))
61  {
62  return cState ;
63  }else{return propagator->propagateToTheTransversePCA(cState,point);} }
T y() const
Definition: PV3DBase.h:63
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
KinematicState cState
T z() const
Definition: PV3DBase.h:64
KinematicParameters const & kinematicParameters() const
KinematicStatePropagator * propagator
T x() const
Definition: PV3DBase.h:62
GlobalPoint position() const

Member Data Documentation

ParticleKinematicLinearizedTrackStateFactory VirtualKinematicParticle::linFactory
private

Definition at line 72 of file VirtualKinematicParticle.h.

Referenced by particleLinearizedTrackState().

KinematicStatePropagator* VirtualKinematicParticle::propagator
private