CMS 3D CMS Logo

TFitConstraintM.h
Go to the documentation of this file.
1 #ifndef TFitConstraintM_hh
2 #define TFitConstraintM_hh
3 
5 #include <vector>
6 
7 #include "TMatrixD.h"
8 
9 class TAbsFitParticle;
10 
12 public:
14  TFitConstraintM(std::vector<TAbsFitParticle*>* ParList1, std::vector<TAbsFitParticle*>* ParList2, Double_t Mass = 0);
15  TFitConstraintM(const TString& name,
16  const TString& title,
17  std::vector<TAbsFitParticle*>* ParList1,
18  std::vector<TAbsFitParticle*>* ParList2,
19  Double_t Mass = 0);
20 
21  ~TFitConstraintM() override;
22 
23  void addParticle1(TAbsFitParticle* particle);
24  void addParticle2(TAbsFitParticle* particle);
26  TAbsFitParticle* p2 = nullptr,
27  TAbsFitParticle* p3 = nullptr,
28  TAbsFitParticle* p4 = nullptr,
29  TAbsFitParticle* p5 = nullptr,
30  TAbsFitParticle* p6 = nullptr,
31  TAbsFitParticle* p7 = nullptr,
32  TAbsFitParticle* p8 = nullptr,
33  TAbsFitParticle* p9 = nullptr,
34  TAbsFitParticle* p10 = nullptr);
36  TAbsFitParticle* p2 = nullptr,
37  TAbsFitParticle* p3 = nullptr,
38  TAbsFitParticle* p4 = nullptr,
39  TAbsFitParticle* p5 = nullptr,
40  TAbsFitParticle* p6 = nullptr,
41  TAbsFitParticle* p7 = nullptr,
42  TAbsFitParticle* p8 = nullptr,
43  TAbsFitParticle* p9 = nullptr,
44  TAbsFitParticle* p10 = nullptr);
46 
47  // returns derivative df/dP with P=(p,E) and f the constraint f=0 for
48  // one particle. The matrix contains one row (df/dp, df/dE).
49  TMatrixD* getDerivative(TAbsFitParticle* particle) override;
50  Double_t getInitValue() override;
51  Double_t getCurrentValue() override;
52 
53  Bool_t OnList(std::vector<TAbsFitParticle*>* List, TAbsFitParticle* particle);
54  Double_t CalcMass(std::vector<TAbsFitParticle*>* List, Bool_t IniVal);
55 
56  TString getInfoString() override;
57  void print() override;
58 
59 protected:
60  std::vector<TAbsFitParticle*>
61  _ParList1; // Vector containing first list of constrained particles ( sum[ m_i ] - sum[ m_j ] == 0 )
62  std::vector<TAbsFitParticle*>
63  _ParList2; // Vector containing second list of constrained particles ( sum[ m_i ] - sum[ m_j ] == 0 )
65 
66 private:
67  ClassDefOverride(TFitConstraintM, 0)
68 };
69 
70 #endif
void print() override
Double_t CalcMass(std::vector< TAbsFitParticle *> *List, Bool_t IniVal)
Double_t getCurrentValue() override
void setMassConstraint(Double_t Mass)
Double_t _TheMassConstraint
TMatrixD * getDerivative(TAbsFitParticle *particle) override
~TFitConstraintM() override
TString getInfoString() override
void addParticles2(TAbsFitParticle *p1, TAbsFitParticle *p2=nullptr, TAbsFitParticle *p3=nullptr, TAbsFitParticle *p4=nullptr, TAbsFitParticle *p5=nullptr, TAbsFitParticle *p6=nullptr, TAbsFitParticle *p7=nullptr, TAbsFitParticle *p8=nullptr, TAbsFitParticle *p9=nullptr, TAbsFitParticle *p10=nullptr)
void addParticles1(TAbsFitParticle *p1, TAbsFitParticle *p2=nullptr, TAbsFitParticle *p3=nullptr, TAbsFitParticle *p4=nullptr, TAbsFitParticle *p5=nullptr, TAbsFitParticle *p6=nullptr, TAbsFitParticle *p7=nullptr, TAbsFitParticle *p8=nullptr, TAbsFitParticle *p9=nullptr, TAbsFitParticle *p10=nullptr)
std::vector< TAbsFitParticle * > _ParList1
void addParticle1(TAbsFitParticle *particle)
Double_t getInitValue() override
std::vector< TAbsFitParticle * > _ParList2
Bool_t OnList(std::vector< TAbsFitParticle *> *List, TAbsFitParticle *particle)
void addParticle2(TAbsFitParticle *particle)