CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
KinematicConstraints.h
Go to the documentation of this file.
1#ifndef VertexFit_Kinematic_Constraints_H
2#define VertexFit_Kinematic_Constraints_H
3
4// #include <iostream>
5#include <vector>
6
7#include "CLHEP/Vector/ThreeVector.h"
8#include "CLHEP/Vector/LorentzVector.h"
9#include "CLHEP/Matrix/Vector.h"
10#include "CLHEP/Matrix/Matrix.h"
11//#include "CLHEP/Matrix/DiagMatrix.h"
13using CLHEP::Hep3Vector;
14using CLHEP::HepLorentzVector;
15using CLHEP::HepVector;
16using CLHEP::HepMatrix;
17//using CLHEP::HepDiagMatrix;
18
19
21
22 public:
26 int Type() const {return m_type;}
27 void ResonanceConstraints(const double mres, std::vector<int> tlis, HepSymMatrix Vre);
28 void TotalEnergyConstraints(const double etot, std::vector<int> tlis);
29 void TotalMomentumConstraints(const double ptot, std::vector<int> tlis);
30 void ThreeMomentumConstraints(const Hep3Vector p3, std::vector<int> tlis);
31// void FourMomentumConstraints(const HepLorentzVector p4, std::vector<int> tlis , HepSymMatrix Vme);
32 void FourMomentumConstraints(const HepLorentzVector p4, std::vector<int> tlis, HepSymMatrix Vme );
33 void EqualMassConstraints(std::vector<int> tlis1, std::vector<int> tlis2, HepSymMatrix Vne);
34//Add a Constranint function for the Position constraints
35// void PositionConstraints(const double phipre,const double lambdapre, std::vector<int> tlis_V, HepSymMatrix Vpe);
36
37// void UpdateConstraints(std::vector<WTrackParameter> wlis);
38// void UpdateConstraints(std::vector<WTrackParameter> wlis);
39 std::vector<HepMatrix> Ec() {return m_Ec;}
40 std::vector<HepMatrix> Dc() {return m_Dc;}
41 std::vector<HepVector> dc() {return m_dc;}
42 std::vector<HepVector> lambda() {return m_lambda;}
43 std::vector<HepSymMatrix> Vm() {return m_Vm;}
44 std::vector<HepSymMatrix> VD() {return m_VD;}
45 std::vector<int> Ltrk() {return m_ltrk;}
46 int nc() {return m_nc;}
47 void setType(const int type) {m_type = type;}
48 void setLambda(HepVector lambda) {m_lambda[0]=lambda;}
49 void setVD(HepSymMatrix vd) {m_VD[0] = vd;}
51 public:
52 // type
53 int typeRes() const {return Resonance;}
54 int typeEtot() const {return TotalEnergy;}
55 int typePtot() const {return TotalMomentum;}
56 int typeP3() const {return ThreeMomentum;}
57 int typeP4() const {return FourMomentum;}
58 int typeEqMass() const {return EqualMass;}
59 int typePoint() const {return Position;}
60 // get
61 double mres() const {return m_mres;}
62 double etot() const {return m_etot;}
63 double ptot() const {return m_ptot;}
64 HepPoint3D point() const {return m_point;}
65 Hep3Vector p3() const {return m_p3;}
66 HepLorentzVector p4() const {return m_p4;}
67 double phipre() const {return m_phipre;}
68 double lambdapre() const {return m_lambdapre;}
69 HepSymMatrix Vre() const {return m_Vre;}
70 HepSymMatrix Vme() const {return m_Vme;}
71 HepSymMatrix Vne() const {return m_Vne;}
72 HepSymMatrix Vpe() const {return m_Vpe;}
73 HepSymMatrix Vmeasure() const {return m_Vmeasure;}
74 std::vector<int> numEqual() {return m_nequal;}
75 // set
76 void setMres(const double mres) {m_mres = mres;}
77 void setEtot(const double etot) {m_etot = etot;}
78 void setPtot(const double ptot) {m_ptot = ptot;}
79 void setP3(const Hep3Vector p3) {m_p3 = p3;}
80 void setP4(const HepLorentzVector p4) {m_p4 = p4;}
81 void setP4(const double etot) {m_p4 = HepLorentzVector(0., 0., 0., etot);}
82 void setPoint(const HepPoint3D x) {m_point = x;}
83 void setPhipre(const double phipre){m_phipre = phipre;}
84 void setLambdapre(const double lambdapre){m_lambdapre = lambdapre;}
85 void setVre(const HepSymMatrix Vre) {m_Vre = Vre;}
86 void setVme(const HepSymMatrix Vme) {m_Vme = Vme;}
87 void setVne(const HepSymMatrix Vne) {m_Vne = Vne;}
88 void setVpe(const HepSymMatrix Vpe) {m_Vpe = Vpe;}
89 void setVmeasure(const HepSymMatrix Vmeasure) {m_Vmeasure = Vmeasure;}
90 void setNumEqual(std::vector<int> nequal) {m_nequal = nequal;}
91 private:
92 int m_type;
93 std::vector<HepMatrix> m_Dc;
94 std::vector<HepMatrix> m_Ec;
95 std::vector<HepVector> m_dc;
96 std::vector<HepSymMatrix> m_Vm;
97 std::vector<HepVector> m_lambda;
98 std::vector<HepSymMatrix> m_VD;
99 std::vector<int> m_ltrk;
100 int m_nc;
101 double m_mres;
102 double m_etot;
103 double m_ptot;
104 Hep3Vector m_p3;
105 HepLorentzVector m_p4;
106 double m_phipre;
107 double m_lambdapre;
108 HepPoint3D m_point;
109 HepSymMatrix m_Vmeasure;
110 HepSymMatrix m_Vre;
111 HepSymMatrix m_Vme; //FourMomentum measurment error
112 HepSymMatrix m_Vne; //EqualMass measurment error
113 HepSymMatrix m_Vpe; //Position measurment error
114 std::vector<int> m_nequal;
115
116 static const int Resonance;
117 static const int TotalEnergy;
118 static const int TotalMomentum;
119 static const int ThreeMomentum;
120 static const int FourMomentum;
121 static const int EqualMass;
122 static const int Position;
123
124};
126 m_type = kc.m_type;
127 m_Ec = kc.m_Ec;
128 m_Dc = kc.m_Dc;
129 m_dc = kc.m_dc;
130 m_Vm = kc.m_Vm;
131 m_lambda = kc.m_lambda;
132 m_VD = kc.m_VD;
133 m_ltrk = kc.m_ltrk;
134 m_nc = kc.m_nc;
135 m_mres = kc.m_mres;
136 m_etot = kc.m_etot;
137 m_ptot = kc.m_ptot;
138 m_p3 = kc.m_p3;
139 m_p4 = kc.m_p4;
140 m_phipre = kc.m_phipre;
141 m_lambdapre = kc.m_lambdapre;
142 m_nequal = kc.m_nequal;
143 m_Vre = kc.m_Vre;
144 m_Vme = kc.m_Vme;
145 m_Vne = kc.m_Vne;
146 m_Vpe = kc.m_Vpe;
147 m_Vmeasure = kc.m_Vmeasure;
148
149}
150
152 m_type = kc.m_type;
153 m_Ec = kc.m_Ec;
154 m_Dc = kc.m_Dc;
155 m_dc = kc.m_dc;
156 m_Vm = kc.m_Vm;
157 m_lambda = kc.m_lambda;
158 m_VD = kc.m_VD;
159 m_ltrk = kc.m_ltrk;
160 m_nc = kc.m_nc;
161 m_mres = kc.m_mres;
162 m_etot = kc.m_etot;
163 m_ptot = kc.m_ptot;
164 m_p3 = kc.m_p3;
165 m_p4 = kc.m_p4;
166 m_phipre = kc.m_phipre;
167 m_lambdapre = kc.m_lambdapre;
168 m_nequal = kc.m_nequal;
169 m_Vre = kc.m_Vre;
170 m_Vme = kc.m_Vme;
171 m_Vne = kc.m_Vne;
172 m_Vpe = kc.m_Vpe;
173 m_Vmeasure = kc.m_Vmeasure;
174 return (*this);
175}
176#endif
177
Double_t x[10]
std::vector< HepMatrix > Ec()
std::vector< HepSymMatrix > VD()
HepSymMatrix Vme() const
HepSymMatrix Vpe() const
void setVD(HepSymMatrix vd)
void setP4(const double etot)
void setP4(const HepLorentzVector p4)
void setLambda(HepVector lambda)
std::vector< HepSymMatrix > Vm()
KinematicConstraints & operator=(const KinematicConstraints &)
void FourMomentumConstraints(const HepLorentzVector p4, std::vector< int > tlis, HepSymMatrix Vme)
std::vector< int > Ltrk()
void ResonanceConstraints(const double mres, std::vector< int > tlis, HepSymMatrix Vre)
void setNumEqual(std::vector< int > nequal)
void setMres(const double mres)
HepSymMatrix Vre() const
HepSymMatrix Vmeasure() const
void ThreeMomentumConstraints(const Hep3Vector p3, std::vector< int > tlis)
Hep3Vector p3() const
void TotalEnergyConstraints(const double etot, std::vector< int > tlis)
void setVne(const HepSymMatrix Vne)
void setType(const int type)
HepPoint3D point() const
void setVme(const HepSymMatrix Vme)
HepSymMatrix Vne() const
std::vector< HepVector > lambda()
void setEtot(const double etot)
std::vector< int > numEqual()
std::vector< HepVector > dc()
HepLorentzVector p4() const
std::vector< HepMatrix > Dc()
void setLambdapre(const double lambdapre)
void setVpe(const HepSymMatrix Vpe)
void setVre(const HepSymMatrix Vre)
void setPtot(const double ptot)
void TotalMomentumConstraints(const double ptot, std::vector< int > tlis)
void setVmeasure(const HepSymMatrix Vmeasure)
void setPhipre(const double phipre)
void setPoint(const HepPoint3D x)
void EqualMassConstraints(std::vector< int > tlis1, std::vector< int > tlis2, HepSymMatrix Vne)
void setP3(const Hep3Vector p3)