Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:10

0001 #ifndef KinematicParticleFitter_H
0002 #define KinematicParticleFitter_H
0003 
0004 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicParticle.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicVertex.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h"
0007 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicTree.h"
0008 #include "RecoVertex/KinematicFit/interface/ParentParticleFitter.h"
0009 #include "RecoVertex/KinematicFit/interface/ChildUpdator.h"
0010 
0011 /**
0012  * Class making kinematic fit of the particle inside the 
0013  * KinematicTree. The daughter states of the tree get 
0014  * automathically refitted according to the changes 
0015  * done to mother state. Mechanism is split in 2 parts:
0016  * ParentParticleFitter to fit the mother particle and 
0017  * ChildUpdator to update the states of daughter particles.
0018  * Child updator is currently not implemented.
0019  * Fitter is designed to use any user provided algorithm
0020  * for state refit. 
0021  */
0022 
0023 class KinematicParticleFitter {
0024 public:
0025   /**
0026  * Default constructor using LMS with Lagrange
0027  * multipliers for particle refit.
0028  */
0029   KinematicParticleFitter();
0030 
0031   /**
0032  * Constructor allowing use of any
0033  * fitter-updator pair implemented
0034  */
0035   KinematicParticleFitter(const ParentParticleFitter& fitter, const ChildUpdator& updator);
0036 
0037   ~KinematicParticleFitter();
0038 
0039   /**
0040  * Method applying the constraint to
0041  * the _TOP_ particle inside the
0042  * Kinematic Tree. Tree containing the
0043  * refitted state is returned. The 
0044  * initial state of the particle and
0045  * constraint applyed are stored in
0046  * particle's corresponding data memebers
0047  * In case of failure, an empty vector is returned.
0048  */
0049 
0050   std::vector<RefCountedKinematicTree> fit(KinematicConstraint* cs,
0051                                            const std::vector<RefCountedKinematicTree>& trees) const;
0052 
0053   /**
0054  * Method refitting a top particle of the single tree.
0055  * for backup compatibility and constraints not allowing
0056  * multiple track refits.
0057  * In case of failure, an invalid tree is returned.
0058  */
0059   RefCountedKinematicTree fit(KinematicConstraint* cs, RefCountedKinematicTree tree) const;
0060 
0061 private:
0062   ParentParticleFitter* parentFitter;
0063   ChildUpdator* cUpdator;
0064 };
0065 
0066 #endif