CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TFitConstraintEp.h
Go to the documentation of this file.
1 #ifndef TFitConstraintEp_hh
2 #define TFitConstraintEp_hh
3 
6 #include "TMatrixD.h"
7 #include <vector>
8 
10 public:
11  enum component { pX, pY, pZ, E };
12 
14 
15  TFitConstraintEp(const TString& name,
16  const TString& title,
17  TFitConstraintEp::component thecomponent,
18  Double_t constraint = 0.);
19 
20  TFitConstraintEp(std::vector<TAbsFitParticle*>* particles,
21  TFitConstraintEp::component thecomponent,
22  Double_t constraint = 0.);
23 
24  TFitConstraintEp(const TString& name,
25  const TString& title,
26  std::vector<TAbsFitParticle*>* particles,
27  TFitConstraintEp::component thecomponent,
28  Double_t constraint = 0.);
29  ~TFitConstraintEp() override;
30 
31  void addParticle(TAbsFitParticle* particle);
33  TAbsFitParticle* p2 = nullptr,
34  TAbsFitParticle* p3 = nullptr,
35  TAbsFitParticle* p4 = nullptr,
36  TAbsFitParticle* p5 = nullptr,
37  TAbsFitParticle* p6 = nullptr,
38  TAbsFitParticle* p7 = nullptr,
39  TAbsFitParticle* p8 = nullptr,
40  TAbsFitParticle* p9 = nullptr,
41  TAbsFitParticle* p10 = nullptr);
43 
44  // returns derivative df/dP with P=(p,E) and f the constraint f=0.
45  // The matrix contains one row (df/dp, df/dE).
46  TMatrixD* getDerivative(TAbsFitParticle* particle) override;
47  Double_t getInitValue() override;
48  Double_t getCurrentValue() override;
49 
50  TString getInfoString() override;
51  void print() override;
52 
53 protected:
54 private:
55  std::vector<TAbsFitParticle*> _particles; // Vector containing constrained particles
56  Double_t _constraint; // Value of constraint
57  TFitConstraintEp::component _component; // 4vector component to be constrained
58 
59  ClassDefOverride(TFitConstraintEp, 0)
60 };
61 
62 #endif
const TString p2
Definition: fwPaths.cc:13
TMatrixD * getDerivative(TAbsFitParticle *particle) override
Double_t getInitValue() override
void addParticles(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)
Double_t getCurrentValue() override
void addParticle(TAbsFitParticle *particle)
const TString p1
Definition: fwPaths.cc:12
TString getInfoString() override
void print() override
void setConstraint(Double_t constraint)
TFitConstraintEp::component _component
~TFitConstraintEp() override
std::vector< TAbsFitParticle * > _particles