Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ConstrainedTreeBuilder_H
0002 #define ConstrainedTreeBuilder_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicTree.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/VirtualKinematicParticleFactory.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicVertexFactory.h"
0007 
0008 /**
0009  * Class constructing te final output tree  for the constrained vertex fitter. 
0010  * To be used by corresponding fitter only. Tree builders are scheduled for 
0011  * generalization: They should be inherited from the single generic class
0012  * in the next version of the library.
0013  */
0014 
0015 class ConstrainedTreeBuilder {
0016 public:
0017   ConstrainedTreeBuilder();
0018 
0019   ~ConstrainedTreeBuilder();
0020 
0021   /**
0022  * Method constructing tree out of set of refitted states, vertex, and
0023  * full covariance matrix.
0024  */
0025 
0026   RefCountedKinematicTree buildTree(const std::vector<RefCountedKinematicParticle>& initialParticles,
0027                                     const std::vector<KinematicState>& finalStates,
0028                                     const RefCountedKinematicVertex vtx,
0029                                     const AlgebraicMatrix& fCov) const;
0030 
0031 private:
0032   RefCountedKinematicTree buildTree(const RefCountedKinematicParticle virtualParticle,
0033                                     const RefCountedKinematicVertex vtx,
0034                                     const std::vector<RefCountedKinematicParticle>& particles) const;
0035 
0036   /**
0037    * Metod to reconstructing the full covariance matrix of the resulting particle.                        
0038    */
0039   AlgebraicMatrix covarianceMatrix(const std::vector<RefCountedKinematicParticle>& rPart,
0040                                    const AlgebraicVector7& newPar,
0041                                    const AlgebraicMatrix& fitCov) const;
0042 
0043   VirtualKinematicParticleFactory* pFactory;
0044   KinematicVertexFactory* vFactory;
0045 };
0046 #endif