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 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
TFitConstraintEp::getInfoString
TString getInfoString() override
Definition: TFitConstraintEp.cc:151
TFitConstraintEp::print
void print() override
Definition: TFitConstraintEp.cc:168
TFitConstraintEp::setConstraint
void setConstraint(Double_t constraint)
Definition: TFitConstraintEp.h:42
TFitConstraintEp::_component
TFitConstraintEp::component _component
Definition: TFitConstraintEp.h:57
ecalTrigSettings_cff.particles
particles
Definition: ecalTrigSettings_cff.py:11
TFitConstraintEp::pX
Definition: TFitConstraintEp.h:11
TFitConstraintEp::~TFitConstraintEp
~TFitConstraintEp() override
Definition: TFitConstraintEp.cc:70
TFitConstraintEp::_particles
std::vector< TAbsFitParticle * > _particles
Definition: TFitConstraintEp.h:55
TAbsFitConstraint
Definition: TAbsFitConstraint.h:10
TFitConstraintEp::pY
Definition: TFitConstraintEp.h:11
p2
double p2[4]
Definition: TauolaWrapper.h:90
TFitConstraintEp::E
Definition: TFitConstraintEp.h:11
TAbsFitParticle
Definition: TAbsFitParticle.h:9
TFitConstraintEp::getInitValue
Double_t getInitValue() override
Definition: TFitConstraintEp.cc:125
TFitConstraintEp::_constraint
Double_t _constraint
Definition: TFitConstraintEp.h:56
TFitConstraintEp::getDerivative
TMatrixD * getDerivative(TAbsFitParticle *particle) override
Definition: TFitConstraintEp.cc:115
p4
double p4[4]
Definition: TauolaWrapper.h:92
p1
double p1[4]
Definition: TauolaWrapper.h:89
TFitConstraintEp
Definition: TFitConstraintEp.h:9
TAbsFitConstraint.h
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
TFitConstraintEp::addParticles
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)
Definition: TFitConstraintEp.cc:78
TFitConstraintEp::pZ
Definition: TFitConstraintEp.h:11
HLT_2018_cff.constraint
constraint
Definition: HLT_2018_cff.py:50466
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
p3
double p3[4]
Definition: TauolaWrapper.h:91
TAbsFitParticle.h
TFitConstraintEp::addParticle
void addParticle(TAbsFitParticle *particle)
Definition: TFitConstraintEp.cc:72
TFitConstraintEp::getCurrentValue
Double_t getCurrentValue() override
Definition: TFitConstraintEp.cc:138
TFitConstraintEp::TFitConstraintEp
TFitConstraintEp()
Definition: TFitConstraintEp.cc:22
TFitConstraintEp::component
component
Definition: TFitConstraintEp.h:11