#include <RecoVertex/KinematicFitPrimitives/interface/KinematicParticleFactoryFromTransientTrack.h>
Public Member Functions | |
KinematicParticleFactoryFromTransientTrack (KinematicStatePropagator *pr) | |
Factory constructor taking a KinematicStatePropagator. | |
KinematicParticleFactoryFromTransientTrack () | |
Default constructoru sing a TrackKinematicStatePropagator. | |
RefCountedKinematicParticle | 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. | |
RefCountedKinematicParticle | 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. | |
RefCountedKinematicParticle | 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. | |
~KinematicParticleFactoryFromTransientTrack () | |
Default destructor. | |
Private Attributes | |
TransientTrackKinematicStateBuilder | builder |
KinematicStatePropagator * | propagator |
Definition at line 17 of file KinematicParticleFactoryFromTransientTrack.h.
KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack | ( | ) |
Default constructoru sing a TrackKinematicStatePropagator.
Definition at line 3 of file KinematicParticleFactoryFromTransientTrack.cc.
References propagator.
00004 {propagator = new TrackKinematicStatePropagator();}
KinematicParticleFactoryFromTransientTrack::KinematicParticleFactoryFromTransientTrack | ( | KinematicStatePropagator * | pr | ) |
Factory constructor taking a KinematicStatePropagator.
Definition at line 7 of file KinematicParticleFactoryFromTransientTrack.cc.
References KinematicStatePropagator::clone(), and propagator.
00008 { 00009 if(pr != 0) 00010 { 00011 propagator = pr->clone(); 00012 }else{ 00013 propagator = new TrackKinematicStatePropagator(); 00014 } 00015 }
KinematicParticleFactoryFromTransientTrack::~KinematicParticleFactoryFromTransientTrack | ( | ) | [inline] |
Default destructor.
Definition at line 34 of file KinematicParticleFactoryFromTransientTrack.h.
References propagator.
00035 {delete propagator;}
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 49 of file KinematicParticleFactoryFromTransientTrack.cc.
References TransientTrackKinematicParticle::initialTransientTrack(), propagator, and track.
00054 { 00055 const reco::TransientTrack * track; 00056 KinematicParticle * prp = &(*previousParticle); 00057 // FIXME 00058 // if(previousParticle.isValid()){ 00059 TransientTrackKinematicParticle * pr = dynamic_cast<TransientTrackKinematicParticle * >(prp); 00060 if(pr == 0){ 00061 throw VertexException("KinematicParticleFactoryFromTransientTrack::Previous particle passed is not TransientTrack based!"); 00062 }else{track = pr->initialTransientTrack();} 00063 // }else{track = 0;} 00064 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(kineState, 00065 chiSquared, degreesOfFr, lastConstraint, previousParticle, propagator, track)); 00066 }
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 32 of file KinematicParticleFactoryFromTransientTrack.cc.
References builder, reco::TransientTrack::impactPointTSCP(), propagator, TrajectoryStateClosestToPoint::theState(), and track.
00038 { 00039 // FreeTrajectoryState st(initialTrack.impactPointTSCP().theState()); 00040 KinematicState initState = builder(initialTrack.impactPointTSCP().theState(), massGuess, m_sigma, expPoint); 00041 const reco::TransientTrack * track = &initialTrack; 00042 KinematicConstraint * lastConstraint = 0; 00043 ReferenceCountingPointer<KinematicParticle> previousParticle = 0; 00044 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(initState, 00045 chiSquared,degreesOfFr, lastConstraint, previousParticle, propagator, track)); 00046 }
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 track.
Referenced by KineExample::analyze().
00022 { 00023 // cout<<"calling the state builder"<<endl; 00024 KinematicState initState = builder(initialTrack,massGuess, m_sigma); 00025 const reco::TransientTrack * track = &initialTrack; 00026 KinematicConstraint * lastConstraint = 0; 00027 ReferenceCountingPointer<KinematicParticle> previousParticle = 0; 00028 return ReferenceCountingPointer<KinematicParticle>(new TransientTrackKinematicParticle(initState, 00029 chiSquared,degreesOfFr, lastConstraint, previousParticle, propagator, track)); 00030 }
Definition at line 74 of file KinematicParticleFactoryFromTransientTrack.h.
Referenced by particle().
Definition at line 73 of file KinematicParticleFactoryFromTransientTrack.h.
Referenced by KinematicParticleFactoryFromTransientTrack(), particle(), and ~KinematicParticleFactoryFromTransientTrack().