CMS 3D CMS Logo

VirtualKinematicParticleFactory.cc
Go to the documentation of this file.
2 
3 
6 
8 {
9  if(pr!=nullptr)
10  {
11  propagator = pr->clone();
12  }else{
14  }
15 }
16 
18  float& chiSquared, float& degreesOfFr, ReferenceCountingPointer<KinematicParticle> previousParticle,
19  KinematicConstraint * lastConstraint)const
20 {
21  if(previousParticle.get() != nullptr)
22  {
23  KinematicParticle * prp = &(*previousParticle);
24  VirtualKinematicParticle * pr = dynamic_cast<VirtualKinematicParticle * >(prp);
25  if(pr == nullptr){ throw VertexException("KinematicParticleFactoryFromTransientTrack::Previous particle passed is not TransientTrack based!");}
26  }
27  return ReferenceCountingPointer<KinematicParticle>(new VirtualKinematicParticle(kineState, chiSquared, degreesOfFr,
28  lastConstraint, previousParticle, propagator));
29 }
RefCountedKinematicParticle particle(const KinematicState &kineState, float &chiSquared, float &degreesOfFr, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicConstraint *lastConstraint=0) const
Common base class.
virtual KinematicStatePropagator * clone() const =0