File indexing completed on 2024-04-06 12:23:35
0001 #ifndef TFitConstraintM_hh
0002 #define TFitConstraintM_hh
0003
0004 #include "PhysicsTools/KinFitter/interface/TAbsFitConstraint.h"
0005 #include <vector>
0006
0007 #include "TMatrixD.h"
0008
0009 class TAbsFitParticle;
0010
0011 class TFitConstraintM : public TAbsFitConstraint {
0012 public:
0013 TFitConstraintM();
0014 TFitConstraintM(std::vector<TAbsFitParticle*>* ParList1, std::vector<TAbsFitParticle*>* ParList2, Double_t Mass = 0);
0015 TFitConstraintM(const TString& name,
0016 const TString& title,
0017 std::vector<TAbsFitParticle*>* ParList1,
0018 std::vector<TAbsFitParticle*>* ParList2,
0019 Double_t Mass = 0);
0020
0021 ~TFitConstraintM() override;
0022
0023 void addParticle1(TAbsFitParticle* particle);
0024 void addParticle2(TAbsFitParticle* particle);
0025 void addParticles1(TAbsFitParticle* p1,
0026 TAbsFitParticle* p2 = nullptr,
0027 TAbsFitParticle* p3 = nullptr,
0028 TAbsFitParticle* p4 = nullptr,
0029 TAbsFitParticle* p5 = nullptr,
0030 TAbsFitParticle* p6 = nullptr,
0031 TAbsFitParticle* p7 = nullptr,
0032 TAbsFitParticle* p8 = nullptr,
0033 TAbsFitParticle* p9 = nullptr,
0034 TAbsFitParticle* p10 = nullptr);
0035 void addParticles2(TAbsFitParticle* p1,
0036 TAbsFitParticle* p2 = nullptr,
0037 TAbsFitParticle* p3 = nullptr,
0038 TAbsFitParticle* p4 = nullptr,
0039 TAbsFitParticle* p5 = nullptr,
0040 TAbsFitParticle* p6 = nullptr,
0041 TAbsFitParticle* p7 = nullptr,
0042 TAbsFitParticle* p8 = nullptr,
0043 TAbsFitParticle* p9 = nullptr,
0044 TAbsFitParticle* p10 = nullptr);
0045 void setMassConstraint(Double_t Mass) { _TheMassConstraint = Mass; }
0046
0047
0048
0049 TMatrixD* getDerivative(TAbsFitParticle* particle) override;
0050 Double_t getInitValue() override;
0051 Double_t getCurrentValue() override;
0052
0053 Bool_t OnList(std::vector<TAbsFitParticle*>* List, TAbsFitParticle* particle);
0054 Double_t CalcMass(std::vector<TAbsFitParticle*>* List, Bool_t IniVal);
0055
0056 TString getInfoString() override;
0057 void print() override;
0058
0059 protected:
0060 std::vector<TAbsFitParticle*>
0061 _ParList1;
0062 std::vector<TAbsFitParticle*>
0063 _ParList2;
0064 Double_t _TheMassConstraint;
0065
0066 private:
0067 ClassDefOverride(TFitConstraintM, 0)
0068 };
0069
0070 #endif