CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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);
80  return linFactory.linearizedTrackState(point, lp);
81 }
bool operator==(const KinematicParticle &other) const override
KinematicState stateAtPoint(const GlobalPoint &point) const override
KinematicTree * tree
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const override
ReferenceCountingPointer< KinematicParticle > pState
T y() const
Definition: PV3DBase.h:60
virtual float chiSquared() const
ParticleKinematicLinearizedTrackStateFactory linFactory
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
KinematicState cState
virtual KinematicStatePropagator * clone() const =0
T z() const
Definition: PV3DBase.h:61
KinematicConstraint * lConstraint
KinematicState initState
KinematicParameters const & kinematicParameters() const
const MagneticField * magneticField() const
bool operator!=(const KinematicParticle &other) const override
VirtualKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, RefCountedKinematicParticle &prt) const
const MagneticField * theField
virtual KinematicConstraint * lastConstraint() const
virtual KinematicState initialState() const
KinematicStatePropagator * propagator
RefCountedKinematicParticle refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
T x() const
Definition: PV3DBase.h:59
virtual ReferenceCountingPointer< KinematicParticle > previousParticle() 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
GlobalPoint position() const