Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:12

0001 #ifndef KinematicParticleFactoryFromTransientTrack_h
0002 #define KinematicParticleFactoryFromTransientTrack_h
0003 
0004 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicParticle.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h"
0007 #include "RecoVertex/KinematicFitPrimitives/interface/TrackKinematicStatePropagator.h"
0008 #include "RecoVertex/KinematicFitPrimitives/interface/TransientTrackKinematicStateBuilder.h"
0009 #include "RecoVertex/KinematicFitPrimitives/interface/TransientTrackKinematicParticle.h"
0010 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h"
0011 
0012 /**
0013  *.Factory for KinematicParticle RefCountedPointers
0014  */
0015 
0016 class KinematicParticleFactoryFromTransientTrack {
0017 public:
0018   /**
0019  * Default constructoru sing a TrackKinematicStatePropagator  
0020  */
0021   KinematicParticleFactoryFromTransientTrack();
0022 
0023   /**
0024  * Factory constructor taking a KinematicStatePropagator
0025  */
0026   KinematicParticleFactoryFromTransientTrack(KinematicStatePropagator* pr);
0027 
0028   /**
0029  * Default destructor
0030  */
0031   ~KinematicParticleFactoryFromTransientTrack() { delete propagator; }
0032 
0033   /**
0034  * Particle constructed out of corresponding TransientTrack,
0035  * mass guess and sigma, chi2 and ndf. KinematicState 
0036  * is created at the point where TransientTrack is defined.
0037  */
0038   RefCountedKinematicParticle particle(const reco::TransientTrack& initialTrack,
0039                                        const ParticleMass& massGuess,
0040                                        float chiSquared,
0041                                        float degreesOfFr,
0042                                        float& m_sigma) const;
0043 
0044   /**
0045  * Particle constructed out of corresponding TransientTrack,
0046  * mass guess and sigma, chi2 and ndf. KinematicState 
0047  * is created from the given FreeTrajectoryState
0048  */
0049   RefCountedKinematicParticle particle(const reco::TransientTrack& initialTrack,
0050                                        const ParticleMass& massGuess,
0051                                        float chiSquared,
0052                                        float degreesOfFr,
0053                                        float& m_sigma,
0054                                        const FreeTrajectoryState& freestate) const;
0055 
0056   /**
0057  * Particle is constructed out of corresponding TransientTrack,
0058  * mass_guess and sigma, chi2 and ndf. KinematicState is 
0059  * then propagated to the given point
0060  */
0061 
0062   RefCountedKinematicParticle particle(const reco::TransientTrack& initialTrack,
0063                                        const ParticleMass& massGuess,
0064                                        float chiSquared,
0065                                        float degreesOfFr,
0066                                        const GlobalPoint& expPoint,
0067                                        float m_sigma) const;
0068 
0069   /**
0070  * Particle is consructed directly from its KinematicState,
0071  * chi2 and related information. If no previous provided,
0072  * initial and currnt kinemtic states of the particle will match,
0073  * othereise, initial state will be taken from previous particle.
0074  */
0075   RefCountedKinematicParticle particle(const KinematicState& kineState,
0076                                        float& chiSquared,
0077                                        float& ndf,
0078                                        ReferenceCountingPointer<KinematicParticle> previousParticle,
0079                                        KinematicConstraint* lastConstraint = nullptr) const;
0080 
0081 private:
0082   KinematicStatePropagator* propagator;
0083   TransientTrackKinematicStateBuilder builder;
0084 };
0085 
0086 #endif