Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:16

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