CMS 3D CMS Logo

VirtualKinematicParticle.cc
Go to the documentation of this file.
3 
5  float& chiSquared,
6  float& degreesOfFr,
7  KinematicConstraint* lastConstraint,
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 }
28 
30 
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 }
41 
43  bool res = false;
44  if (*this == *other)
45  res = true;
46  return res;
47 }
48 
50  if (*this == other) {
51  return false;
52  } else {
53  return true;
54  }
55 }
56 
59  if ((iP.x() == point.x()) && (iP.y() == point.y()) && (iP.z() == point.z())) {
60  return cState;
61  } else {
63  }
64 }
65 
67  float chi2,
68  float ndf,
69  KinematicConstraint* cons) const {
70  VirtualKinematicParticle* ncp = const_cast<VirtualKinematicParticle*>(this);
73  new VirtualKinematicParticle(state, chi2, ndf, cons, current, propagator));
74 }
75 
77  const GlobalPoint& point) const {
78  VirtualKinematicParticle* cr = const_cast<VirtualKinematicParticle*>(this);
81 }
KinematicParticle::previousParticle
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() const
Definition: KinematicParticle.cc:20
KinematicParticle::initialState
virtual KinematicState initialState() const
Definition: KinematicParticle.cc:14
FreeTrajectoryState.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
KinematicState
Definition: KinematicState.h:17
VirtualKinematicParticle::refittedParticle
RefCountedKinematicParticle refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
Definition: VirtualKinematicParticle.cc:66
tree
Definition: tree.py:1
VirtualKinematicParticle::propagator
KinematicStatePropagator * propagator
Definition: VirtualKinematicParticle.h:69
ReferenceCountingPointer< KinematicParticle >
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackKinematicStatePropagator
Definition: TrackKinematicStatePropagator.h:17
KinematicParticle::pState
ReferenceCountingPointer< KinematicParticle > pState
Definition: KinematicParticle.h:144
VirtualKinematicParticle::particleLinearizedTrackState
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const override
Definition: VirtualKinematicParticle.cc:76
KinematicConstraint
Definition: KinematicConstraint.h:21
VirtualKinematicParticle::operator!=
bool operator!=(const KinematicParticle &other) const override
Definition: VirtualKinematicParticle.cc:49
trackingPlots.other
other
Definition: trackingPlots.py:1465
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
VirtualKinematicParticle::stateAtPoint
KinematicState stateAtPoint(const GlobalPoint &point) const override
Definition: VirtualKinematicParticle.cc:57
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:38
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
VirtualKinematicParticle.h
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
KinematicStatePropagator
Definition: KinematicStatePropagator.h:15
KinematicParticle
Definition: KinematicParticle.h:21
KinematicParticle::chiSquared
virtual float chiSquared() const
Definition: KinematicParticle.cc:24
VirtualKinematicParticle::~VirtualKinematicParticle
~VirtualKinematicParticle() override
Definition: VirtualKinematicParticle.cc:29
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
VirtualKinematicParticle::operator==
bool operator==(const KinematicParticle &other) const override
Definition: VirtualKinematicParticle.cc:31
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