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.

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 }

References hltPixelTracks_cff::chi2, KinematicState::magneticField(), and TrackCandidateProducer_cfi::propagator.

◆ ~TransientTrackKinematicParticle()

TransientTrackKinematicParticle::~TransientTrackKinematicParticle ( )
override

Definition at line 34 of file TransientTrackKinematicParticle.cc.

34 { delete propagator; }

References TrackCandidateProducer_cfi::propagator.

Member Function Documentation

◆ initialTransientTrack()

const TransientTrack * TransientTrackKinematicParticle::initialTransientTrack ( ) const

Access to initial TransientTrack (if any)

Definition at line 82 of file TransientTrackKinematicParticle.cc.

82 { return inTrack; }

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

◆ operator!=()

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 }

References trackingPlots::other.

◆ 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.

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 }

References KinematicParticle::initialState(), initialTransientTrack(), and trackingPlots::other.

◆ operator==() [2/2]

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 }

References trackingPlots::other.

◆ 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.

92  {
93  TransientTrackKinematicParticle* cr = const_cast<TransientTrackKinematicParticle*>(this);
96 }

References point.

◆ 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.

85  {
86  TransientTrackKinematicParticle* ncp = const_cast<TransientTrackKinematicParticle*>(this);
89 }

References hltPixelTracks_cff::chi2, and TrackCandidateProducer_cfi::propagator.

◆ 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.

70  {
72  if ((iP.x() == point.x()) && (iP.y() == point.y()) && (iP.z() == point.z())) {
73  return cState;
74  } else {
76  }
77 }

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

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.

KinematicParticle::previousParticle
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
Definition: KinematicParticle.cc:20
KinematicParticle::initialState
virtual KinematicState initialState() const
Definition: KinematicParticle.cc:14
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
tree
Definition: tree.py:1
TransientTrackKinematicParticle::inTrack
const reco::TransientTrack * inTrack
Definition: TransientTrackKinematicParticle.h:78
ReferenceCountingPointer< KinematicParticle >
TransientTrackKinematicParticle::TransientTrackKinematicParticle
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=nullptr)
Definition: TransientTrackKinematicParticle.cc:6
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackKinematicStatePropagator
Definition: TrackKinematicStatePropagator.h:17
KinematicParticle::pState
ReferenceCountingPointer< KinematicParticle > pState
Definition: KinematicParticle.h:144
TransientTrackKinematicParticle::linFactory
ParticleKinematicLinearizedTrackStateFactory linFactory
Definition: TransientTrackKinematicParticle.h:85
trackingPlots.other
other
Definition: trackingPlots.py:1467
ParticleKinematicLinearizedTrackStateFactory::linearizedTrackState
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, RefCountedKinematicParticle &prt) const
Definition: ParticleKinematicLinearizedTrackStateFactory.cc:4
Point3DBase< float, GlobalTag >
KinematicStatePropagator::propagateToTheTransversePCA
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:39
KinematicParticle::lastConstraint
virtual KinematicConstraint * lastConstraint() const
Definition: KinematicParticle.cc:18
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
KinematicParticle::theField
const MagneticField * theField
Definition: KinematicParticle.h:134
KinematicParticle::ndf
float ndf
Definition: KinematicParticle.h:156
res
Definition: Electron.h:6
TransientTrackKinematicParticle::propagator
KinematicStatePropagator * propagator
Definition: TransientTrackKinematicParticle.h:81
KinematicParticle::cState
KinematicState cState
Definition: KinematicParticle.h:151
KinematicParticle::lConstraint
KinematicConstraint * lConstraint
Definition: KinematicParticle.h:141
KinematicParticle
Definition: KinematicParticle.h:21
KinematicParticle::chiSquared
virtual float chiSquared() const
Definition: KinematicParticle.cc:24
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
KinematicParticle::chi2
float chi2
Definition: KinematicParticle.h:154
TransientTrackKinematicParticle
Definition: TransientTrackKinematicParticle.h:17
KinematicParameters::position
GlobalPoint position() const
Definition: KinematicParameters.h:48
KinematicState::magneticField
const MagneticField * magneticField() const
Definition: KinematicState.h:86
KinematicState::kinematicParameters
KinematicParameters const & kinematicParameters() const
Definition: KinematicState.h:61
KinematicParticle::initState
KinematicState initState
Definition: KinematicParticle.h:148
point
*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
TransientTrackKinematicParticle::initialTransientTrack
const reco::TransientTrack * initialTransientTrack() const
Definition: TransientTrackKinematicParticle.cc:82