Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MultipleKinematicConstraint_H
0002 #define MultipleKinematicConstraint_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicParticle.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicVertex.h"
0007 
0008 /**
0009  * Class implementing constraint multiplication
0010  * for single or multiple track refit. Multiple track
0011  * refit does not include vertexing constraint: only refit 
0012  * of tarjectory parameters is usually done.
0013  */
0014 
0015 class MultipleKinematicConstraint : public KinematicConstraint {
0016 public:
0017   MultipleKinematicConstraint() { em = true; }
0018 
0019   /**
0020  * Vector of values and  matrix of derivatives
0021  * calculated at given 7xNumberOfStates linearization point
0022  */
0023   std::pair<AlgebraicVector, AlgebraicVector> value(const AlgebraicVector &exPoint) const override;
0024 
0025   std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const AlgebraicVector &exPoint) const override;
0026 
0027   /**
0028  * Vector of values and matrix of derivatives, 
0029  * calu=culated at linearization point of current
0030  * particle states
0031  */
0032   std::pair<AlgebraicVector, AlgebraicVector> value(const std::vector<RefCountedKinematicParticle> &par) const override;
0033 
0034   std::pair<AlgebraicMatrix, AlgebraicVector> derivative(
0035       const std::vector<RefCountedKinematicParticle> &par) const override;
0036 
0037   int numberOfEquations() const override;
0038 
0039   /**
0040  * Method adding new constraint to the list of
0041  * existing ones.
0042  */
0043   void addConstraint(KinematicConstraint *newConst) const;
0044 
0045   AlgebraicVector deviations(int nStates) const override;
0046 
0047   bool isEmpty() const { return em; }
0048 
0049   MultipleKinematicConstraint *clone() const override { return new MultipleKinematicConstraint(*this); }
0050 
0051 private:
0052   mutable std::vector<KinematicConstraint *> cts;
0053 
0054   mutable bool em;
0055 };
0056 #endif