Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef BackToBackKinematicConstraint_H
0002 #define BackToBackKinematicConstraint_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h"
0005 
0006 /**
0007  * Class implementing the back-to-back geometry
0008  * constraints for 2 KinematicParticles. Current version
0009  * does not implement an actual back-to-back. 
0010  * Current class forces 2 tracks to have the opposite direction,
0011  * bud does not force them to emerge from the single point.
0012  *Coorect version to be implemented later.
0013  *
0014  * This is just
0015  * an illustrative piece of code, showing possible approach to 
0016  * constraint application on multiple tracks.
0017  * 
0018  * Kirill Prokofiev, July 2004
0019  */
0020 
0021 class BackToBackKinematicConstraint : public KinematicConstraint {
0022 public:
0023   BackToBackKinematicConstraint() {}
0024 
0025   ~BackToBackKinematicConstraint() override {}
0026 
0027   /**
0028  * Derivatives and value calculated at given expansion point
0029  * Vector should always be of size 14 (2 particles)
0030  */
0031   std::pair<AlgebraicVector, AlgebraicVector> value(const AlgebraicVector& exPoint) const override;
0032 
0033   std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const AlgebraicVector& exPoint) const override;
0034 
0035   /**
0036  * Derivatives and values calculated at expansion point, taken
0037  * at current state of input particles. Number of input particles
0038  * should be always equal to 2
0039  */
0040   std::pair<AlgebraicVector, AlgebraicVector> value(const std::vector<RefCountedKinematicParticle>& par) const override;
0041 
0042   std::pair<AlgebraicMatrix, AlgebraicVector> derivative(
0043       const std::vector<RefCountedKinematicParticle>& par) const override;
0044 
0045   AlgebraicVector deviations(int nStates) const override;
0046 
0047   int numberOfEquations() const override;
0048 
0049   KinematicConstraint* clone() const override;
0050 
0051 private:
0052 };
0053 #endif