CMS 3D CMS Logo

Public Member Functions | Private Attributes

KinematicParticleFactoryFromTransientTrack Class Reference

#include <KinematicParticleFactoryFromTransientTrack.h>

List of all members.

Public Member Functions

 KinematicParticleFactoryFromTransientTrack ()
 KinematicParticleFactoryFromTransientTrack (KinematicStatePropagator *pr)
RefCountedKinematicParticle particle (const KinematicState &kineState, float &chiSquared, float &ndf, ReferenceCountingPointer< KinematicParticle > previousParticle, KinematicConstraint *lastConstraint=0) const
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma, const FreeTrajectoryState &freestate) const
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
RefCountedKinematicParticle particle (const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, const GlobalPoint &expPoint, float m_sigma) const
 ~KinematicParticleFactoryFromTransientTrack ()

Private Attributes

TransientTrackKinematicStateBuilder builder
KinematicStatePropagatorpropagator

Detailed Description

.Factory for KinematicParticle RefCountedPointers

Definition at line 17 of file KinematicParticleFactoryFromTransientTrack.h.


Constructor & Destructor Documentation

KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack ( )

Default constructoru sing a TrackKinematicStatePropagator

Definition at line 3 of file KinematicParticleFactoryFromTransientTrack.cc.

References propagator.

KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack ( KinematicStatePropagator pr)

Factory constructor taking a KinematicStatePropagator

Definition at line 7 of file KinematicParticleFactoryFromTransientTrack.cc.

References KinematicStatePropagator::clone(), and propagator.

{
 if(pr != 0)
 {
  propagator = pr->clone();
 }else{
  propagator = new TrackKinematicStatePropagator();
 }
}
KinematicParticleFactoryFromTransientTrack::~KinematicParticleFactoryFromTransientTrack ( ) [inline]

Default destructor

Definition at line 34 of file KinematicParticleFactoryFromTransientTrack.h.

References propagator.

  {delete propagator;}

Member Function Documentation

RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
float &  m_sigma 
) const

Particle constructed out of corresponding TransientTrack, mass guess and sigma, chi2 and ndf. KinematicState is created at the point where TransientTrack is defined.

Definition at line 17 of file KinematicParticleFactoryFromTransientTrack.cc.

References builder, propagator, and ExpressReco_HICollisions_FallBack::track.

Referenced by KineExample::analyze(), and ConversionVertexFinder::run().

{
// cout<<"calling the state builder"<<endl;
 KinematicState initState = builder(initialTrack,massGuess, m_sigma);
 const reco::TransientTrack * track = &initialTrack;
 KinematicConstraint * lastConstraint = 0;
 ReferenceCountingPointer<KinematicParticle> previousParticle = 0;
 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(initState,
                      chiSquared,degreesOfFr, lastConstraint, previousParticle, propagator, track));
}
RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const KinematicState kineState,
float &  chiSquared,
float &  ndf,
ReferenceCountingPointer< KinematicParticle previousParticle,
KinematicConstraint lastConstraint = 0 
) const

Particle is consructed directly from its KinematicState, chi2 and related information. If no previous provided, initial and currnt kinemtic states of the particle will match, othereise, initial state will be taken from previous particle.

Definition at line 65 of file KinematicParticleFactoryFromTransientTrack.cc.

References TransientTrackKinematicParticle::initialTransientTrack(), propagator, prp, and ExpressReco_HICollisions_FallBack::track.

{
 const reco::TransientTrack * track;
 KinematicParticle * prp = &(*previousParticle);
// FIXME
//  if(previousParticle.isValid()){
   TransientTrackKinematicParticle * pr = dynamic_cast<TransientTrackKinematicParticle * >(prp);
   if(pr == 0){
    throw VertexException("KinematicParticleFactoryFromTransientTrack::Previous particle passed is not TransientTrack based!");
   }else{track  = pr->initialTransientTrack();}
//  }else{track = 0;}
 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(kineState,
                                chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track));
}
RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
const GlobalPoint expPoint,
float  m_sigma 
) const

Particle is constructed out of corresponding TransientTrack, mass_guess and sigma, chi2 and ndf. KinematicState is then propagated to the given point

Definition at line 48 of file KinematicParticleFactoryFromTransientTrack.cc.

References builder, reco::TransientTrack::impactPointTSCP(), propagator, TrajectoryStateClosestToPoint::theState(), and ExpressReco_HICollisions_FallBack::track.

{
//  FreeTrajectoryState st(initialTrack.impactPointTSCP().theState());
 KinematicState initState = builder(initialTrack.impactPointTSCP().theState(), massGuess, m_sigma, expPoint); 
 const reco::TransientTrack * track = &initialTrack;
 KinematicConstraint * lastConstraint = 0;
 ReferenceCountingPointer<KinematicParticle> previousParticle = 0;
 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(initState,
                                chiSquared,degreesOfFr, lastConstraint, previousParticle, propagator, track));
}
RefCountedKinematicParticle KinematicParticleFactoryFromTransientTrack::particle ( const reco::TransientTrack initialTrack,
const ParticleMass massGuess,
float  chiSquared,
float  degreesOfFr,
float &  m_sigma,
const FreeTrajectoryState freestate 
) const

Particle constructed out of corresponding TransientTrack, mass guess and sigma, chi2 and ndf. KinematicState is created from the given FreeTrajectoryState

Definition at line 32 of file KinematicParticleFactoryFromTransientTrack.cc.

References builder, propagator, and ExpressReco_HICollisions_FallBack::track.

{
// cout<<"calling the state builder"<<endl;
 KinematicState initState = builder(freestate,massGuess, m_sigma);
 const reco::TransientTrack * track = &initialTrack;
 KinematicConstraint * lastConstraint = 0;
 ReferenceCountingPointer<KinematicParticle> previousParticle = 0;
 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(initState,
                      chiSquared,degreesOfFr, lastConstraint, previousParticle, propagator, track));
}

Member Data Documentation

Definition at line 86 of file KinematicParticleFactoryFromTransientTrack.h.

Referenced by particle().