CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 override
 
bool operator== (const KinematicParticle &other) const override
 
bool operator== (const ReferenceCountingPointer< KinematicParticle > &other) const override
 
RefCountedLinearizedTrackState particleLinearizedTrackState (const GlobalPoint &point) const override
 
ReferenceCountingPointer
< KinematicParticle
refittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
 
KinematicState stateAtPoint (const GlobalPoint &point) const override
 
 TransientTrackKinematicParticle (const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=nullptr)
 
 ~TransientTrackKinematicParticle () override
 
- 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
 
 ~KinematicParticle () override
 

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 = nullptr 
)

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 6 of file TransientTrackKinematicParticle.cc.

References HLT_FULL_cff::chi2, KinematicStatePropagator::clone(), KinematicState::magneticField(), HLT_FULL_cff::propagator, and MainPageGenerator::tree.

13  {
14  theField = kineState.magneticField();
15  if (previousParticle.get() == nullptr) {
16  initState = kineState;
17  } else {
18  initState = previousParticle->initialState();
19  }
20  cState = kineState;
21  inTrack = initialTrack;
23  chi2 = chiSquared;
24  ndf = degreesOfFr;
26  if (pr != nullptr) {
27  propagator = pr->clone();
28  } else {
30  }
31  tree = nullptr;
32 }
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 ( )
override

Definition at line 34 of file TransientTrackKinematicParticle.cc.

References HLT_FULL_cff::propagator.

34 { delete propagator; }

Member Function Documentation

const TransientTrack * TransientTrackKinematicParticle::initialTransientTrack ( ) const

Access to initial TransientTrack (if any)

Definition at line 82 of file TransientTrackKinematicParticle.cc.

Referenced by KinematicVertex::operator reco::Vertex(), operator==(), and KinematicParticleFactoryFromTransientTrack::particle().

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

Implements KinematicParticle.

Definition at line 62 of file TransientTrackKinematicParticle.cc.

62  {
63  if (*this == other) {
64  return false;
65  } else {
66  return true;
67  }
68 }
bool TransientTrackKinematicParticle::operator== ( const KinematicParticle other) const
overridevirtual

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 36 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 != nullptr) {
43  //then comparing particle with their initial TransientTracks
44  if ((initialTransientTrack()) && (lPart->initialTransientTrack())) {
46  dc = true;
47  } else {
48  if (initialState() == lPart->initialState())
49  dc = true;
50  }
51  }
52  return dc;
53 }
const reco::TransientTrack * initialTransientTrack() const
virtual KinematicState initialState() const
bool TransientTrackKinematicParticle::operator== ( const ReferenceCountingPointer< KinematicParticle > &  other) const
overridevirtual

Implements KinematicParticle.

Definition at line 55 of file TransientTrackKinematicParticle.cc.

55  {
56  bool res = false;
57  if (*this == *other)
58  res = true;
59  return res;
60 }
TransientTrackKinematicParticle::RefCountedLinearizedTrackState TransientTrackKinematicParticle::particleLinearizedTrackState ( const GlobalPoint point) const
overridevirtual

Method returning LinearizedTrackState of the particle needed for Kalman flter vertex fit. This implementation uses the ParticleLinearizedTrackStateFactory class.

Implements KinematicParticle.

Definition at line 92 of file TransientTrackKinematicParticle.cc.

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

Method producing new particle with refitted parameters. Current state is then shifted to previous state. RCP<TransientTrackKinematicParticle> is returned.

Implements KinematicParticle.

Definition at line 84 of file TransientTrackKinematicParticle.cc.

References HLT_FULL_cff::propagator.

85  {
89 }
const reco::TransientTrack * initialTransientTrack() const
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=nullptr)
KinematicState TransientTrackKinematicParticle::stateAtPoint ( const GlobalPoint point) const
overridevirtual

Access to KinematicState of particle at given point

Implements KinematicParticle.

Definition at line 70 of file TransientTrackKinematicParticle.cc.

References HLT_FULL_cff::propagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

70  {
72  if ((iP.x() == point.x()) && (iP.y() == point.y()) && (iP.z() == point.z())) {
73  return cState;
74  } else {
76  }
77 }
T y() const
Definition: PV3DBase.h:60
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
KinematicState cState
T z() const
Definition: PV3DBase.h:61
KinematicParameters const & kinematicParameters() const
T x() const
Definition: PV3DBase.h:59
GlobalPoint position() const

Member Data Documentation

const reco::TransientTrack* TransientTrackKinematicParticle::inTrack
private

Definition at line 78 of file TransientTrackKinematicParticle.h.

ParticleKinematicLinearizedTrackStateFactory TransientTrackKinematicParticle::linFactory
private

Definition at line 85 of file TransientTrackKinematicParticle.h.

KinematicStatePropagator* TransientTrackKinematicParticle::propagator
private

Definition at line 81 of file TransientTrackKinematicParticle.h.