CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/PhysicsTools/KinFitter/interface/TFitConstraintM.h

Go to the documentation of this file.
00001 #ifndef TFitConstraintM_hh
00002 #define TFitConstraintM_hh
00003 
00004 #include "PhysicsTools/KinFitter/interface/TAbsFitConstraint.h"
00005 #include <vector>
00006 
00007 #include "TMatrixD.h"
00008 
00009 class TAbsFitParticle;
00010 
00011 class TFitConstraintM: public TAbsFitConstraint {
00012 
00013 public :
00014 
00015   TFitConstraintM();
00016   TFitConstraintM(std::vector<TAbsFitParticle*>* ParList1,
00017                   std::vector<TAbsFitParticle*>* ParList2,
00018                   Double_t Mass = 0);
00019   TFitConstraintM(const TString &name, const TString &title,
00020                   std::vector<TAbsFitParticle*>* ParList1,
00021                   std::vector<TAbsFitParticle*>* ParList2,
00022                   Double_t Mass = 0);
00023 
00024   virtual ~TFitConstraintM();
00025 
00026   void addParticle1( TAbsFitParticle* particle );
00027   void addParticle2( TAbsFitParticle* particle );
00028   void addParticles1( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, TAbsFitParticle* p4 = 0,
00029                       TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0,
00030                       TAbsFitParticle* p9 = 0, TAbsFitParticle* p10 = 0);
00031   void addParticles2( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, TAbsFitParticle* p4 = 0,
00032                       TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0,
00033                       TAbsFitParticle* p9 = 0, TAbsFitParticle* p10 = 0);
00034   void setMassConstraint(Double_t Mass) { _TheMassConstraint = Mass; }
00035 
00036   // returns derivative df/dP with P=(p,E) and f the constraint f=0 for 
00037   // one particle. The matrix contains one row (df/dp, df/dE).
00038   virtual TMatrixD* getDerivative( TAbsFitParticle* particle );
00039   virtual Double_t getInitValue();
00040   virtual Double_t getCurrentValue();
00041 
00042   Bool_t OnList(std::vector<TAbsFitParticle*>* List, TAbsFitParticle* particle);
00043   Double_t CalcMass(std::vector<TAbsFitParticle*>* List, Bool_t IniVal);
00044 
00045   virtual TString getInfoString();
00046   virtual void print(); 
00047 
00048 protected :
00049   
00050   std::vector<TAbsFitParticle*> _ParList1;   // Vector containing first list of constrained particles ( sum[ m_i ] - sum[ m_j ] == 0 )
00051   std::vector<TAbsFitParticle*> _ParList2;   // Vector containing second list of constrained particles ( sum[ m_i ] - sum[ m_j ] == 0 )
00052   Double_t _TheMassConstraint;
00053   
00054 };
00055 
00056 #endif
00057