CMS 3D CMS Logo

TransientTrackKinematicParticle.cc
Go to the documentation of this file.
3 
4 using namespace reco;
5 
7  const KinematicState& kineState,
8  float& chiSquared,
9  float& degreesOfFr,
10  KinematicConstraint* lastConstraint,
13  const TransientTrack* initialTrack) {
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;
22  pState = previousParticle;
23  chi2 = chiSquared;
24  ndf = degreesOfFr;
25  lConstraint = lastConstraint;
26  if (pr != nullptr) {
27  propagator = pr->clone();
28  } else {
30  }
31  tree = nullptr;
32 }
33 
35 
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())) {
45  if (initialTransientTrack() == lPart->initialTransientTrack())
46  dc = true;
47  } else {
48  if (initialState() == lPart->initialState())
49  dc = true;
50  }
51  }
52  return dc;
53 }
54 
56  bool res = false;
57  if (*this == *other)
58  res = true;
59  return res;
60 }
61 
63  if (*this == other) {
64  return false;
65  } else {
66  return true;
67  }
68 }
69 
71  GlobalPoint iP = cState.kinematicParameters().position();
72  if ((iP.x() == point.x()) && (iP.y() == point.y()) && (iP.z() == point.z())) {
73  return cState;
74  } else {
75  return propagator->propagateToTheTransversePCA(cState, point);
76  }
77 }
78 
79 //FreeTrajectoryState TransientTrackKinematicParticle::initialStateFTS() const
80 //{return initState.freeTrajectoryState();}
81 
83 
85  const KinematicState& state, float chi2, float ndf, KinematicConstraint* cons) const {
88  state, chi2, ndf, cons, ReferenceCountingPointer<KinematicParticle>(ncp), propagator, initialTransientTrack()));
89 }
90 
95  return linFactory.linearizedTrackState(point, lp);
96 }
bool operator!=(const KinematicParticle &other) const override
const reco::TransientTrack * initialTransientTrack() const
T z() const
Definition: PV3DBase.h:61
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=nullptr)
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const override
Definition: Electron.h:6
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
ReferenceCountingPointer< KinematicParticle > refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
KinematicState stateAtPoint(const GlobalPoint &point) const override
virtual KinematicState initialState() const
fixed size matrix
const MagneticField * magneticField() const
Definition: tree.py:1
*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
bool operator==(const KinematicParticle &other) const override