CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
KinematicParticle Class Referenceabstract

#include <KinematicParticle.h>

Inheritance diagram for KinematicParticle:
ReferenceCounted TransientTrackKinematicParticle VirtualKinematicParticle

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< 6 > > RefCountedLinearizedTrackState
 

Public Member Functions

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 =0
 
virtual bool operator< (const KinematicParticle &other) const
 
virtual bool operator== (const KinematicParticle &other) const =0
 
virtual bool operator== (const ReferenceCountingPointer< KinematicParticle > &other) const =0
 
virtual RefCountedLinearizedTrackState particleLinearizedTrackState (const GlobalPoint &point) const =0
 
virtual ReferenceCountingPointer< KinematicParticlepreviousParticle () const
 
virtual ReferenceCountingPointer< KinematicParticlerefittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const =0
 
reco::TransientTrack refittedTransientTrack () const
 
virtual KinematicState stateAtPoint (const GlobalPoint &point) const =0
 
 ~KinematicParticle () override
 

Protected Member Functions

virtual void setTreePointer (KinematicTree *tr) const
 

Protected Attributes

float chi2
 
KinematicState cState
 
KinematicState initState
 
KinematicConstraintlConstraint
 
float ndf
 
ReferenceCountingPointer< KinematicParticlepState
 
const MagneticFieldtheField
 
KinematicTreetree
 

Friends

class KinematicParticleVertexFitter
 
class KinematicTree
 

Detailed Description

Definition at line 21 of file KinematicParticle.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 23 of file KinematicParticle.h.

Constructor & Destructor Documentation

◆ KinematicParticle()

KinematicParticle::KinematicParticle ( )
inline

Default constructor: does not create a valid particle. Method is needed for debugging purposes only.

Definition at line 33 of file KinematicParticle.h.

33 {}

◆ ~KinematicParticle()

KinematicParticle::~KinematicParticle ( )
override

Definition at line 5 of file KinematicParticle.cc.

5 { delete lConstraint; }

References lConstraint.

Member Function Documentation

◆ chiSquared()

float KinematicParticle::chiSquared ( ) const
virtual

Access metods for chi2 and number of degrees of freedom

Definition at line 24 of file KinematicParticle.cc.

24 { return chi2; }

References chi2.

Referenced by VirtualKinematicParticle::VirtualKinematicParticle().

◆ correspondingTree()

KinematicTree * KinematicParticle::correspondingTree ( ) const
virtual

Returns the pointer to the kinematic tree (if any) current particle belongs to 0 pointer returned in case not any tree is built yet

Definition at line 22 of file KinematicParticle.cc.

22 { return tree; }

References tree.

◆ currentState()

KinematicState KinematicParticle::currentState ( ) const
virtual

Access to the last calculated kinematic state

Definition at line 16 of file KinematicParticle.cc.

16 { return cState; }

References cState.

Referenced by refittedTransientTrack().

◆ degreesOfFreedom()

float KinematicParticle::degreesOfFreedom ( ) const
virtual

Definition at line 26 of file KinematicParticle.cc.

26 { return ndf; }

References ndf.

◆ initialState()

KinematicState KinematicParticle::initialState ( ) const
virtual

Access to the kinematic state with which particle was first created

Definition at line 14 of file KinematicParticle.cc.

14 { return initState; }

References initState.

Referenced by VirtualKinematicParticle::operator==(), and TransientTrackKinematicParticle::operator==().

◆ lastConstraint()

KinematicConstraint * KinematicParticle::lastConstraint ( ) const
virtual

Returns last constraint aplied to this particle.

Definition at line 18 of file KinematicParticle.cc.

18 { return lConstraint; }

References lConstraint.

Referenced by VirtualKinematicParticle::VirtualKinematicParticle().

◆ magneticField()

const MagneticField* KinematicParticle::magneticField ( ) const
inline

Definition at line 122 of file KinematicParticle.h.

122 { return theField; }

References theField.

◆ operator!=()

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

◆ operator<()

bool KinematicParticle::operator< ( const KinematicParticle other) const
virtual

Comparison by adress operator Has NO physical meaning To be used inside graph only

Definition at line 7 of file KinematicParticle.cc.

7  {
8  bool res = false;
9  if (this < &other)
10  res = true;
11  return res;
12 }

References trackingPlots::other.

◆ operator==() [1/2]

virtual bool KinematicParticle::operator== ( const KinematicParticle other) const
pure virtual

Comparison by contents operators Returns TRUE if initial PhysicsObjects match(if they exist). If not, compares the initial KinematicStates Retunes true if they match. Should be implemented by user

Implemented in TransientTrackKinematicParticle, and VirtualKinematicParticle.

◆ operator==() [2/2]

virtual bool KinematicParticle::operator== ( const ReferenceCountingPointer< KinematicParticle > &  other) const
pure virtual

◆ particleLinearizedTrackState()

virtual RefCountedLinearizedTrackState KinematicParticle::particleLinearizedTrackState ( const GlobalPoint point) const
pure virtual

Method returning LinearizedTrackState of the particle needed for Kalman flter vertex fit. Should be implemented by user. For track(helix)-like objects one can use the ParticleLinearizedTrackStateFactory class.

Implemented in TransientTrackKinematicParticle, and VirtualKinematicParticle.

◆ previousParticle()

ReferenceCountingPointer< KinematicParticle > KinematicParticle::previousParticle ( ) const
virtual

Returns the state of Kinematic Particle before last constraint was aplied

Definition at line 20 of file KinematicParticle.cc.

20 { return pState; }

References pState.

Referenced by VirtualKinematicParticle::VirtualKinematicParticle().

◆ refittedParticle()

virtual ReferenceCountingPointer<KinematicParticle> KinematicParticle::refittedParticle ( const KinematicState state,
float  chi2,
float  ndf,
KinematicConstraint cons = nullptr 
) const
pure virtual

Method producing new particle out of the current one and RefittedState obtained from kinematic fitting. To be used by Fitter classes only. Method should be implemented by used for every specific type of KinematicParticle

Implemented in TransientTrackKinematicParticle, and VirtualKinematicParticle.

◆ refittedTransientTrack()

reco::TransientTrack KinematicParticle::refittedTransientTrack ( ) const

Definition at line 30 of file KinematicParticle.cc.

30  {
32  return factory.build(currentState().freeTrajectoryState());
33 }

References TransientTrackFromFTSFactory::build(), and currentState().

Referenced by KinematicVertex::operator reco::Vertex().

◆ setTreePointer()

void KinematicParticle::setTreePointer ( KinematicTree tr) const
protectedvirtual

Definition at line 28 of file KinematicParticle.cc.

28 { tree = tr; }

◆ stateAtPoint()

virtual KinematicState KinematicParticle::stateAtPoint ( const GlobalPoint point) const
pure virtual

Access to KinematicState of particle at given point. The current state of particle does not change after this operation.

Implemented in TransientTrackKinematicParticle, and VirtualKinematicParticle.

Friends And Related Function Documentation

◆ KinematicParticleVertexFitter

friend class KinematicParticleVertexFitter
friend

Definition at line 25 of file KinematicParticle.h.

◆ KinematicTree

friend class KinematicTree
friend

Definition at line 26 of file KinematicParticle.h.

Member Data Documentation

◆ chi2

float KinematicParticle::chi2
protected

◆ cState

KinematicState KinematicParticle::cState
mutableprotected

◆ initState

KinematicState KinematicParticle::initState
protected

◆ lConstraint

KinematicConstraint* KinematicParticle::lConstraint
mutableprotected

◆ ndf

float KinematicParticle::ndf
protected

◆ pState

ReferenceCountingPointer<KinematicParticle> KinematicParticle::pState
mutableprotected

◆ theField

const MagneticField* KinematicParticle::theField
protected

Data members which should be initialized by user in derived classes

Definition at line 134 of file KinematicParticle.h.

Referenced by magneticField(), and VirtualKinematicParticle::VirtualKinematicParticle().

◆ tree

KinematicTree* KinematicParticle::tree
mutableprotected
tree
Definition: tree.py:1
KinematicParticle::currentState
virtual KinematicState currentState() const
Definition: KinematicParticle.cc:16
KinematicParticle::pState
ReferenceCountingPointer< KinematicParticle > pState
Definition: KinematicParticle.h:144
trackingPlots.other
other
Definition: trackingPlots.py:1460
TransientTrackFromFTSFactory::build
reco::TransientTrack build(const FreeTrajectoryState &fts) const
Definition: TransientTrackFromFTSFactory.cc:7
KinematicParticle::theField
const MagneticField * theField
Definition: KinematicParticle.h:134
KinematicParticle::ndf
float ndf
Definition: KinematicParticle.h:156
res
Definition: Electron.h:6
KinematicParticle::cState
KinematicState cState
Definition: KinematicParticle.h:151
KinematicParticle::lConstraint
KinematicConstraint * lConstraint
Definition: KinematicParticle.h:141
KinematicParticle::chi2
float chi2
Definition: KinematicParticle.h:154
TransientTrackFromFTSFactory
Definition: TransientTrackFromFTSFactory.h:10
KinematicParticle::initState
KinematicState initState
Definition: KinematicParticle.h:148
KinematicParticle::tree
KinematicTree * tree
Definition: KinematicParticle.h:138