Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TransientTrackKinematicParticle_H
0002 #define TransientTrackKinematicParticle_H
0003 
0004 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicParticle.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicStatePropagator.h"
0007 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleKinematicLinearizedTrackStateFactory.h"
0008 
0009 /**
0010  * Class representing KinematicParticle
0011  * created fromTransientTrack. Uses specific
0012  * KinematicState builders and propagators.
0013  * Extends KinematicParticle class 
0014  * implementing its abstract methods and
0015  * adding several new ones.
0016  */
0017 class TransientTrackKinematicParticle : public KinematicParticle {
0018 public:
0019   /**
0020  * Constructor using KinematicState, Previous state of particle
0021  * last constraint used and original TransientTrack, if any.
0022  * All the pointers can be set to 0 if there's no such information
0023  * available. Constructor should be use by specific factory only.
0024  * Propagator for TransientTrack KinematicState is used.
0025  */
0026   TransientTrackKinematicParticle(const KinematicState& kineState,
0027                                   float& chiSquared,
0028                                   float& degreesOfFr,
0029                                   KinematicConstraint* lastConstraint,
0030                                   ReferenceCountingPointer<KinematicParticle> previousParticle,
0031                                   KinematicStatePropagator* pr,
0032                                   const reco::TransientTrack* initialTrack = nullptr);
0033 
0034   ~TransientTrackKinematicParticle() override;
0035 
0036   /**
0037  * Comparison by contents operator
0038  * Returns TRUE if initial TransientTracks
0039  * match(if they exist). If not, 
0040  * compares the initial KinematicStates
0041  * Retunes true if they match.
0042  */
0043   bool operator==(const KinematicParticle& other) const override;
0044 
0045   bool operator==(const ReferenceCountingPointer<KinematicParticle>& other) const override;
0046 
0047   bool operator!=(const KinematicParticle& other) const override;
0048 
0049   /**
0050  * Access to KinematicState of particle
0051  * at given point
0052  */
0053   KinematicState stateAtPoint(const GlobalPoint& point) const override;
0054 
0055   /**
0056  * Access to initial TransientTrack (if any)
0057  */
0058   const reco::TransientTrack* initialTransientTrack() const;
0059 
0060   /**
0061  * Method producing new particle with refitted parameters.
0062  * Current state is then shifted to previous state.
0063  * RCP<TransientTrackKinematicParticle> is  returned.
0064  */
0065   ReferenceCountingPointer<KinematicParticle> refittedParticle(const KinematicState& state,
0066                                                                float chi2,
0067                                                                float ndf,
0068                                                                KinematicConstraint* cons = nullptr) const override;
0069 
0070   /**
0071  * Method returning LinearizedTrackState of the particle needed for
0072  * Kalman flter vertex fit. This implementation uses the ParticleLinearizedTrackStateFactory class.
0073  */
0074   RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint& point) const override;
0075 
0076 private:
0077   //initial TransientTrack (if any)
0078   const reco::TransientTrack* inTrack;
0079 
0080   //propagator for kinematic states
0081   KinematicStatePropagator* propagator;
0082 
0083   //LinearizedTrackStateFactory  specific for this
0084   //type of particle
0085   ParticleKinematicLinearizedTrackStateFactory linFactory;
0086 };
0087 #endif