Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TwoTrackMassKinematicConstraint_H
0002 #define TwoTrackMassKinematicConstraint_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/MultiTrackKinematicConstraint.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
0006 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0007 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h"
0008 
0009 /** 
0010  * Class implementing the total mass
0011  * of 2 tracks constraint. I.e. 2 first
0012  * particles out of four passed form 
0013  * a given mass
0014  *
0015  * Warning: the tracks to constraint 
0016  * should be 1st and 2nd from the
0017  * beginning of the vector.
0018  *
0019  */
0020 
0021 class TwoTrackMassKinematicConstraint : public MultiTrackKinematicConstraint {
0022 public:
0023   TwoTrackMassKinematicConstraint(ParticleMass& ms) : mass(ms) {}
0024 
0025   /**
0026  * Returns a vector of values of constraint
0027  * equations at the point where the input
0028  * particles are defined.
0029  */
0030   AlgebraicVector value(const std::vector<KinematicState>& states, const GlobalPoint& point) const override;
0031 
0032   /**
0033  * Returns a matrix of derivatives of
0034  * constraint equations w.r.t. 
0035  * particle parameters
0036  */
0037   AlgebraicMatrix parametersDerivative(const std::vector<KinematicState>& states,
0038                                        const GlobalPoint& point) const override;
0039 
0040   /**
0041  * Returns a matrix of derivatives of
0042  * constraint equations w.r.t. 
0043  * vertex position
0044  */
0045   AlgebraicMatrix positionDerivative(const std::vector<KinematicState>& states,
0046                                      const GlobalPoint& point) const override;
0047 
0048   /**
0049  * Number of equations per track used for the fit
0050  */
0051   int numberOfEquations() const override;
0052 
0053   TwoTrackMassKinematicConstraint* clone() const override { return new TwoTrackMassKinematicConstraint(*this); }
0054 
0055 private:
0056   ParticleMass mass;
0057 };
0058 #endif