CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VirtualKinematicParticle.cc
Go to the documentation of this file.
3 
5  (const KinematicState& kineState, float& chiSquared, float& degreesOfFr,
6  KinematicConstraint * lastConstraint,
9 {
10  theField = kineState.magneticField();
11  if(previousParticle.get() == 0)
12  {
13  initState = kineState;
14  }else{initState = previousParticle->initialState();}
15  cState = kineState;
16  pState = previousParticle;
17  chi2 = chiSquared;
18  ndf = degreesOfFr;
19  lConstraint = lastConstraint;
20  if(pr != 0)
21  {
22  propagator = pr->clone();
23  }else{
25  }
26  tree = 0;
27 }
28 
30 {delete propagator;}
31 
33 {
34  bool dc = false;
35 
36 //first looking if this is an object of the same type
37  const KinematicParticle * lp = &other;
38  const VirtualKinematicParticle * lPart = dynamic_cast<const VirtualKinematicParticle * >(lp);
39  if(lPart != 0 && initialState() == lPart->initialState()) dc = true;
40  return dc;
41 }
42 
44 {
45  bool res = false;
46  if(*this == *other) res = true;
47  return res;
48 }
49 
51 {
52  if (*this == other){
53  return false;
54  }else{return true;}
55 }
56 
58 {
60  if((iP.x() == point.x())&&(iP.y() == point.y())&&(iP.z() == point.z()))
61  {
62  return cState ;
63  }else{return propagator->propagateToTheTransversePCA(cState,point);} }
64 
66  float chi2, float ndf, KinematicConstraint * cons)const
67 {
68  VirtualKinematicParticle * ncp = const_cast<VirtualKinematicParticle * >(this);
70  return ReferenceCountingPointer<KinematicParticle>(new VirtualKinematicParticle(state,chi2,ndf,cons,current,
71  propagator));
72 }
73 
76 {
77  VirtualKinematicParticle * cr = const_cast<VirtualKinematicParticle * >(this);
79  return linFactory.linearizedTrackState(point,lp);
80 }
bool operator==(const KinematicParticle &other) const
tuple propagator
T y() const
Definition: PV3DBase.h:63
ParticleKinematicLinearizedTrackStateFactory linFactory
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &point) const =0
bool operator!=(const KinematicParticle &other) const
KinematicState cState
virtual KinematicStatePropagator * clone() const =0
RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint &point) const
T z() const
Definition: PV3DBase.h:64
RefCountedKinematicParticle refittedParticle(const KinematicState &state, float chi2, float ndf, KinematicConstraint *cons=0) const
KinematicParameters const & kinematicParameters() const
const MagneticField * magneticField() const
VirtualKinematicParticle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, KinematicConstraint *lastConstraint, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicStatePropagator *pr)
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, RefCountedKinematicParticle &prt) const
KinematicState stateAtPoint(const GlobalPoint &point) const
virtual KinematicState initialState() const
KinematicStatePropagator * propagator
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
GlobalPoint position() const