CMS 3D CMS Logo

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< KinematicParticlerefittedParticle (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< KinematicParticlepreviousParticle () 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< KinematicParticlepState
 
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::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 hltPixelTracks_cff::chi2, KinematicState::magneticField(), and TrackCandidateProducer_cfi::propagator.

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 }
ReferenceCountingPointer< KinematicParticle > pState
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
KinematicState cState
virtual float chiSquared() const
KinematicConstraint * lConstraint
KinematicState initState
virtual KinematicConstraint * lastConstraint() const
const MagneticField * theField
const MagneticField * magneticField() const
Definition: tree.py:1

◆ ~TransientTrackKinematicParticle()

TransientTrackKinematicParticle::~TransientTrackKinematicParticle ( )
override

Definition at line 34 of file TransientTrackKinematicParticle.cc.

References TrackCandidateProducer_cfi::propagator.

34 { delete propagator; }

Member Function Documentation

◆ initialTransientTrack()

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(), and operator==().

82 { return inTrack; }

◆ operator!=()

bool TransientTrackKinematicParticle::operator!= ( const KinematicParticle other) const
overridevirtual

Implements KinematicParticle.

Definition at line 62 of file TransientTrackKinematicParticle.cc.

References trackingPlots::other.

62  {
63  if (*this == other) {
64  return false;
65  } else {
66  return true;
67  }
68 }

◆ operator==() [1/2]

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(), initialTransientTrack(), and trackingPlots::other.

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

◆ operator==() [2/2]

bool TransientTrackKinematicParticle::operator== ( const ReferenceCountingPointer< KinematicParticle > &  other) const
overridevirtual

Implements KinematicParticle.

Definition at line 55 of file TransientTrackKinematicParticle.cc.

References trackingPlots::other.

55  {
56  bool res = false;
57  if (*this == *other)
58  res = true;
59  return res;
60 }
Definition: Electron.h:6

◆ particleLinearizedTrackState()

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.

References point.

92  {
96 }
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, RefCountedKinematicParticle &prt) const
ParticleKinematicLinearizedTrackStateFactory linFactory
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ refittedParticle()

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 hltPixelTracks_cff::chi2, and TrackCandidateProducer_cfi::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)

◆ stateAtPoint()

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 point, TrackCandidateProducer_cfi::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 z() const
Definition: PV3DBase.h:61
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
KinematicState cState
KinematicParameters const & kinematicParameters() const
GlobalPoint position() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

Member Data Documentation

◆ inTrack

const reco::TransientTrack* TransientTrackKinematicParticle::inTrack
private

Definition at line 78 of file TransientTrackKinematicParticle.h.

◆ linFactory

ParticleKinematicLinearizedTrackStateFactory TransientTrackKinematicParticle::linFactory
private

Definition at line 85 of file TransientTrackKinematicParticle.h.

◆ propagator

KinematicStatePropagator* TransientTrackKinematicParticle::propagator
private

Definition at line 81 of file TransientTrackKinematicParticle.h.