CMS 3D CMS Logo

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 
11 public :
12 
13  enum component {
14  pX,
15  pY,
16  pZ,
17  E
18  };
19 
21 
22  TFitConstraintEp( const TString &name, const TString &title,
23  TFitConstraintEp::component thecomponent,
24  Double_t constraint = 0.);
25 
26  TFitConstraintEp( std::vector<TAbsFitParticle*>* particles,
27  TFitConstraintEp::component thecomponent,
28  Double_t constraint = 0.);
29 
30  TFitConstraintEp( const TString &name, const TString &title,
31  std::vector<TAbsFitParticle*>* particles,
32  TFitConstraintEp::component thecomponent,
33  Double_t constraint = 0.);
34  ~TFitConstraintEp() override;
35 
36  void addParticle( TAbsFitParticle* particle );
37  void addParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, TAbsFitParticle* p4 = nullptr,
38  TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr,
39  TAbsFitParticle* p9 = nullptr, TAbsFitParticle* p10 = nullptr);
41 
42  // returns derivative df/dP with P=(p,E) and f the constraint f=0.
43  // The matrix contains one row (df/dp, df/dE).
44  TMatrixD* getDerivative( TAbsFitParticle* particle ) override;
45  Double_t getInitValue() override;
46  Double_t getCurrentValue() override;
47 
48  TString getInfoString() override;
49  void print() override;
50 
51 protected :
52 
53 
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
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)
double p4[4]
Definition: TauolaWrapper.h:92
TString getInfoString() override
double p2[4]
Definition: TauolaWrapper.h:90
void print() override
void setConstraint(Double_t constraint)
double p1[4]
Definition: TauolaWrapper.h:89
TFitConstraintEp::component _component
~TFitConstraintEp() override
std::vector< TAbsFitParticle * > _particles
double p3[4]
Definition: TauolaWrapper.h:91