CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoVertex/KinematicFitPrimitives/interface/KinematicParticle.h

Go to the documentation of this file.
00001 #ifndef KinematicParticle_H
00002 #define KinematicParticle_H
00003 
00004 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h"
00005 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
00006 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
00007 
00008 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00009 
00018 class KinematicConstraint;
00019 class KinematicTree;
00020 
00021 class KinematicParticle : public ReferenceCounted 
00022 {
00023 public:
00024 
00025   typedef ReferenceCountingPointer<LinearizedTrackState<6> > RefCountedLinearizedTrackState;
00026 
00027  friend class KinematicParticleVertexFitter;
00028  friend class KinematicTree;
00029 
00035  KinematicParticle(){}
00036  
00037  virtual ~KinematicParticle(){}
00038                                                            
00047  virtual bool operator==(const KinematicParticle& other)const = 0;
00048 
00049  virtual bool operator==(const ReferenceCountingPointer<KinematicParticle>& other) const = 0;
00050 
00051  virtual bool operator!=(const KinematicParticle& other) const = 0;
00052   
00058  virtual bool operator<(const KinematicParticle& other)const;
00059   
00064  virtual KinematicState initialState()const;
00065  
00069  virtual KinematicState currentState()const;
00070  
00076  virtual KinematicState stateAtPoint(const GlobalPoint& point)const = 0;
00077  
00084  virtual ReferenceCountingPointer<KinematicParticle> refittedParticle(const KinematicState& state,
00085                                float chi2, float ndf, KinematicConstraint * cons = 0) const = 0;
00086                                
00092  virtual RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint& point)const = 0;                               
00093   
00098  virtual KinematicConstraint * lastConstraint() const;
00099  
00104  virtual ReferenceCountingPointer<KinematicParticle> previousParticle() const;
00105   
00112  virtual KinematicTree * correspondingTree() const;
00113   
00118  virtual float chiSquared() const;
00119   
00120  virtual float degreesOfFreedom() const;
00121    
00122   const MagneticField* magneticField() const {return theField;}
00123 
00124   reco::TransientTrack refittedTransientTrack() const;
00125 
00126 protected: 
00127 
00128  virtual void setTreePointer(KinematicTree * tr) const;
00129   
00135   const MagneticField* theField;
00136 
00137 //pointer to the tree current
00138 //particle  belongs to
00139  mutable  KinematicTree * tree;
00140  
00141 //last constraint applied 
00142  mutable KinematicConstraint * lConstraint;
00143 
00144 //previous particle
00145  mutable ReferenceCountingPointer<KinematicParticle> pState;
00146  
00147 //initial kinematic state of
00148 //current particle
00149  KinematicState initState; 
00150  
00151 //particle state at point  
00152  mutable KinematicState cState;
00153   
00154 //chi2 and number of degrees of freedom
00155  float chi2;
00156   
00157  float ndf;  
00158 };
00159 #endif