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=0) 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=0)
 
 ~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 ( 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 vertices_cff::chi2, KinematicStatePropagator::clone(), KinematicState::magneticField(), and PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi::propagator.

11 {
12  theField = kineState.magneticField();
13  if(previousParticle.get() == nullptr)
14  {
15  initState = kineState;
16 }else{initState = previousParticle->initialState();}
17  cState = kineState;
18  inTrack = initialTrack;
20  chi2 = chiSquared;
21  ndf = degreesOfFr;
23  if(pr!=nullptr)
24  {
25  propagator = pr->clone();
26  }else{
28  }
29  tree = nullptr;
30 }
ReferenceCountingPointer< KinematicParticle > pState
virtual float chiSquared() const
virtual KinematicStatePropagator * clone() const =0
KinematicState cState
KinematicConstraint * lConstraint
KinematicState initState
const MagneticField * magneticField() const
const MagneticField * theField
virtual KinematicConstraint * lastConstraint() const
Definition: tree.py:1
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
TransientTrackKinematicParticle::~TransientTrackKinematicParticle ( )
override

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
overridevirtual

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
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 35 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 
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
overridevirtual

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 }
Definition: Electron.h:4
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 91 of file TransientTrackKinematicParticle.cc.

ReferenceCountingPointer< KinematicParticle > TransientTrackKinematicParticle::refittedParticle ( const KinematicState state,
float  chi2,
float  ndf,
KinematicConstraint cons = 0 
) 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 82 of file TransientTrackKinematicParticle.cc.

References PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi::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
overridevirtual

Access to KinematicState of particle at given point

Implements KinematicParticle.

Definition at line 67 of file TransientTrackKinematicParticle.cc.

References PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi::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 }
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
T y() const
Definition: PV3DBase.h:63
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.