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