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 {
86  TransientTrackKinematicParticle* ncp = const_cast<TransientTrackKinematicParticle*>(this);
88  state, chi2, ndf, cons, ReferenceCountingPointer<KinematicParticle>(ncp), propagator, initialTransientTrack()));
89 }
90 
93  TransientTrackKinematicParticle* cr = const_cast<TransientTrackKinematicParticle*>(this);
95  return linFactory.linearizedTrackState(point, lp);
96 }
KinematicParticle::initialState
virtual KinematicState initialState() const
Definition: KinematicParticle.cc:14
FreeTrajectoryState.h
TransientTrackKinematicParticle::particleLinearizedTrackState
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const override
Definition: TransientTrackKinematicParticle.cc:92
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
KinematicState
Definition: KinematicState.h:17
tree
Definition: tree.py:1
ReferenceCountingPointer< KinematicParticle >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
TransientTrackKinematicParticle::TransientTrackKinematicParticle
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=nullptr)
Definition: TransientTrackKinematicParticle.cc:6
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TransientTrackKinematicParticle::operator==
bool operator==(const KinematicParticle &other) const override
Definition: TransientTrackKinematicParticle.cc:36
TrackKinematicStatePropagator
Definition: TrackKinematicStatePropagator.h:17
TransientTrackKinematicParticle::stateAtPoint
KinematicState stateAtPoint(const GlobalPoint &point) const override
Definition: TransientTrackKinematicParticle.cc:70
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
KinematicConstraint
Definition: KinematicConstraint.h:21
trackingPlots.other
other
Definition: trackingPlots.py:1465
Point3DBase< float, GlobalTag >
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:38
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TransientTrackKinematicParticle::~TransientTrackKinematicParticle
~TransientTrackKinematicParticle() override
Definition: TransientTrackKinematicParticle.cc:34
TransientTrackKinematicParticle::operator!=
bool operator!=(const KinematicParticle &other) const override
Definition: TransientTrackKinematicParticle.cc:62
res
Definition: Electron.h:6
TransientTrackKinematicParticle::refittedParticle
ReferenceCountingPointer< KinematicParticle > refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=nullptr) const override
Definition: TransientTrackKinematicParticle.cc:84
KinematicStatePropagator
Definition: KinematicStatePropagator.h:15
KinematicParticle
Definition: KinematicParticle.h:21
reco::TransientTrack
Definition: TransientTrack.h:19
TransientTrackKinematicParticle
Definition: TransientTrackKinematicParticle.h:17
TransientTrackKinematicParticle.h
KinematicState::magneticField
const MagneticField * magneticField() const
Definition: KinematicState.h:86
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
TransientTrackKinematicParticle::initialTransientTrack
const reco::TransientTrack * initialTransientTrack() const
Definition: TransientTrackKinematicParticle.cc:82