CMS 3D CMS Logo

TFitConstraintM.h

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

Generated on Tue Jun 9 17:41:15 2009 for CMSSW by  doxygen 1.5.4