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
TransientTrackKinematicParticle Class Reference

#include <TransientTrackKinematicParticle.h>

Inheritance diagram for TransientTrackKinematicParticle:
KinematicParticle ReferenceCounted

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

const reco::TransientTrackinTrack
 
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 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(), HLT_25ns14e33_v1_cff::propagator, and MainPageGenerator::tree.

11 {
12  theField = kineState.magneticField();
13  if(previousParticle.get() == 0)
14  {
15  initState = kineState;
16 }else{initState = previousParticle->initialState();}
17  cState = kineState;
18  inTrack = initialTrack;
20  chi2 = chiSquared;
21  ndf = degreesOfFr;
23  if(pr!=0)
24  {
25  propagator = pr->clone();
26  }else{
28  }
29  tree = 0;
30 }
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
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
TransientTrackKinematicParticle::~TransientTrackKinematicParticle ( )
virtual

Definition at line 32 of file TransientTrackKinematicParticle.cc.

References HLT_25ns14e33_v1_cff::propagator.

33 {delete propagator;}

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

80 {return inTrack;}
bool TransientTrackKinematicParticle::operator!= ( const KinematicParticle other) const
virtual

Implements KinematicParticle.

Definition at line 60 of file TransientTrackKinematicParticle.cc.

61 {
62  if (*this == other){
63  return false;
64  }else{return true;}
65 }
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().

36 {
37  bool dc = false;
38 
39 //first looking if this is an object of the same type
40  const KinematicParticle * lp = &other;
41  const TransientTrackKinematicParticle * lPart = dynamic_cast<const TransientTrackKinematicParticle * >(lp);
42  if(lPart != 0){
43 
44 //then comparing particle with their initial TransientTracks
46  {
47  if(initialTransientTrack() == lPart->initialTransientTrack()) dc = true;
48  }else{if(initialState() == lPart->initialState()) dc = true;}
49  }
50  return dc;
51 }
const reco::TransientTrack * initialTransientTrack() const
virtual KinematicState initialState() const
bool TransientTrackKinematicParticle::operator== ( const ReferenceCountingPointer< KinematicParticle > &  other) const
virtual

Implements KinematicParticle.

Definition at line 53 of file TransientTrackKinematicParticle.cc.

54 {
55  bool res = false;
56  if(*this == *other) res = true;
57  return res;
58 }
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 HLT_25ns14e33_v1_cff::propagator.

84 {
88 }
const reco::TransientTrack * initialTransientTrack() const
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=0)
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 HLT_25ns14e33_v1_cff::propagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

68 {
70  if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z()))
71  {
72  return cState ;
73  }else{return propagator->propagateToTheTransversePCA(cState,point);}
74 }
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
T x() const
Definition: PV3DBase.h:62
GlobalPoint position() const

Member Data Documentation

const reco::TransientTrack* TransientTrackKinematicParticle::inTrack
private

Definition at line 77 of file TransientTrackKinematicParticle.h.

ParticleKinematicLinearizedTrackStateFactory TransientTrackKinematicParticle::linFactory
private

Definition at line 84 of file TransientTrackKinematicParticle.h.

KinematicStatePropagator* TransientTrackKinematicParticle::propagator
private

Definition at line 80 of file TransientTrackKinematicParticle.h.