CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
VirtualKinematicParticle Class Reference

#include <VirtualKinematicParticle.h>

Inheritance diagram for VirtualKinematicParticle:
KinematicParticle ReferenceCounted

Public Member Functions

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
 
RefCountedKinematicParticle refittedParticle (const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
 
KinematicState stateAtPoint (const GlobalPoint &point) const override
 
 VirtualKinematicParticle (const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
 
 ~VirtualKinematicParticle () 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

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 as a result of kinematic fit. uses the same state propagator as a TransientTrackKinematicParticle

Definition at line 14 of file VirtualKinematicParticle.h.

Constructor & Destructor Documentation

◆ VirtualKinematicParticle()

VirtualKinematicParticle::VirtualKinematicParticle ( const KinematicState kineState,
float &  chiSquared,
float &  degreesOfFr,
KinematicConstraint lastConstraint,
ReferenceCountingPointer< KinematicParticle previousParticle,
KinematicStatePropagator pr 
)

Constructor using KinematicState, Previous state of particle and last constraint used . 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 TransientTrackKinematicState is used.

Definition at line 4 of file VirtualKinematicParticle.cc.

9  {
10  theField = kineState.magneticField();
11  if (previousParticle.get() == nullptr) {
12  initState = kineState;
13  } else {
14  initState = previousParticle->initialState();
15  }
16  cState = kineState;
18  chi2 = chiSquared;
19  ndf = degreesOfFr;
21  if (pr != nullptr) {
22  propagator = pr->clone();
23  } else {
25  }
26  tree = nullptr;
27 }

References KinematicParticle::chi2, KinematicParticle::chiSquared(), KinematicParticle::cState, KinematicParticle::initState, KinematicParticle::lastConstraint(), KinematicParticle::lConstraint, KinematicState::magneticField(), KinematicParticle::ndf, KinematicParticle::previousParticle(), propagator, KinematicParticle::pState, and KinematicParticle::theField.

Referenced by refittedParticle().

◆ ~VirtualKinematicParticle()

VirtualKinematicParticle::~VirtualKinematicParticle ( )
override

Definition at line 29 of file VirtualKinematicParticle.cc.

29 { delete propagator; }

References propagator.

Member Function Documentation

◆ operator!=()

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

Implements KinematicParticle.

Definition at line 49 of file VirtualKinematicParticle.cc.

49  {
50  if (*this == other) {
51  return false;
52  } else {
53  return true;
54  }
55 }

References trackingPlots::other.

◆ operator==() [1/2]

bool VirtualKinematicParticle::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 31 of file VirtualKinematicParticle.cc.

31  {
32  bool dc = false;
33 
34  //first looking if this is an object of the same type
35  const KinematicParticle* lp = &other;
36  const VirtualKinematicParticle* lPart = dynamic_cast<const VirtualKinematicParticle*>(lp);
37  if (lPart != nullptr && initialState() == lPart->initialState())
38  dc = true;
39  return dc;
40 }

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

◆ operator==() [2/2]

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

Implements KinematicParticle.

Definition at line 42 of file VirtualKinematicParticle.cc.

42  {
43  bool res = false;
44  if (*this == *other)
45  res = true;
46  return res;
47 }

References trackingPlots::other.

◆ particleLinearizedTrackState()

VirtualKinematicParticle::RefCountedLinearizedTrackState VirtualKinematicParticle::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 76 of file VirtualKinematicParticle.cc.

77  {
78  VirtualKinematicParticle* cr = const_cast<VirtualKinematicParticle*>(this);
81 }

References ParticleKinematicLinearizedTrackStateFactory::linearizedTrackState(), linFactory, and point.

◆ refittedParticle()

RefCountedKinematicParticle VirtualKinematicParticle::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<VirtualKinematicParticle> is returned.

Implements KinematicParticle.

Definition at line 66 of file VirtualKinematicParticle.cc.

69  {
70  VirtualKinematicParticle* ncp = const_cast<VirtualKinematicParticle*>(this);
73  new VirtualKinematicParticle(state, chi2, ndf, cons, current, propagator));
74 }

References KinematicParticle::chi2, KinematicParticle::ndf, propagator, and VirtualKinematicParticle().

◆ stateAtPoint()

KinematicState VirtualKinematicParticle::stateAtPoint ( const GlobalPoint point) const
overridevirtual

Member Data Documentation

◆ linFactory

ParticleKinematicLinearizedTrackStateFactory VirtualKinematicParticle::linFactory
private

Definition at line 73 of file VirtualKinematicParticle.h.

Referenced by particleLinearizedTrackState().

◆ propagator

KinematicStatePropagator* VirtualKinematicParticle::propagator
private
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
VirtualKinematicParticle::propagator
KinematicStatePropagator * propagator
Definition: VirtualKinematicParticle.h:69
ReferenceCountingPointer< KinematicParticle >
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackKinematicStatePropagator
Definition: TrackKinematicStatePropagator.h:17
KinematicParticle::pState
ReferenceCountingPointer< KinematicParticle > pState
Definition: KinematicParticle.h:144
trackingPlots.other
other
Definition: trackingPlots.py:1464
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:32
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
VirtualKinematicParticle
Definition: VirtualKinematicParticle.h:14
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
Definition: KinematicParticle.h:21
KinematicParticle::chiSquared
virtual float chiSquared() const
Definition: KinematicParticle.cc:24
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
VirtualKinematicParticle::linFactory
ParticleKinematicLinearizedTrackStateFactory linFactory
Definition: VirtualKinematicParticle.h:73
KinematicParticle::chi2
float chi2
Definition: KinematicParticle.h:154
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
VirtualKinematicParticle::VirtualKinematicParticle
VirtualKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
Definition: VirtualKinematicParticle.cc:4