CMS 3D CMS Logo

TransientTrackKinematicParticle.cc
Go to the documentation of this file.
3 
4 using namespace reco;
5 
7  (const KinematicState& kineState, float& chiSquared,
8  float& degreesOfFr, KinematicConstraint * lastConstraint,
10  KinematicStatePropagator * pr, const TransientTrack * initialTrack)
11 {
12  theField = kineState.magneticField();
13  if(previousParticle.get() == nullptr)
14  {
15  initState = kineState;
16 }else{initState = previousParticle->initialState();}
17  cState = kineState;
18  inTrack = initialTrack;
19  pState = previousParticle;
20  chi2 = chiSquared;
21  ndf = degreesOfFr;
22  lConstraint = lastConstraint;
23  if(pr!=nullptr)
24  {
25  propagator = pr->clone();
26  }else{
28  }
29  tree = nullptr;
30 }
31 
33 {delete propagator;}
34 
36 {
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 
44 //then comparing particle with their initial TransientTracks
45  if((initialTransientTrack())&&(lPart->initialTransientTrack()))
46  {
47  if(initialTransientTrack() == lPart->initialTransientTrack()) dc = true;
48  }else{if(initialState() == lPart->initialState()) dc = true;}
49  }
50  return dc;
51 }
52 
54 {
55  bool res = false;
56  if(*this == *other) res = true;
57  return res;
58 }
59 
61 {
62  if (*this == other){
63  return false;
64  }else{return true;}
65 }
66 
68 {
69  GlobalPoint iP = cState.kinematicParameters().position();
70  if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z()))
71  {
72  return cState ;
73  }else{return propagator->propagateToTheTransversePCA(cState,point);}
74 }
75 
76 //FreeTrajectoryState TransientTrackKinematicParticle::initialStateFTS() const
77 //{return initState.freeTrajectoryState();}
78 
80 {return inTrack;}
81 
83  float chi2, float ndf, KinematicConstraint * cons)const
84 {
87  ReferenceCountingPointer<KinematicParticle>(ncp), propagator, initialTransientTrack()));
88 }
89 
92 {
95  return linFactory.linearizedTrackState(point,lp);
96 }
97 
const reco::TransientTrack * initialTransientTrack() const
bool operator!=(const KinematicParticle &other) const override
bool operator==(const KinematicParticle &other) const override
T y() const
Definition: PV3DBase.h:63
virtual KinematicStatePropagator * clone() const =0
Definition: Electron.h:6
ReferenceCountingPointer< KinematicParticle > refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=0) const override
T z() const
Definition: PV3DBase.h:64
TransientTrackKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr, const reco::TransientTrack *initialTrack=0)
const MagneticField * magneticField() const
fixed size matrix
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const override
virtual KinematicState initialState() const
Definition: tree.py:1
KinematicState stateAtPoint(const GlobalPoint &point) const override
T x() const
Definition: PV3DBase.h:62
*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