BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
KinematicConstraints Class Reference

#include <KinematicConstraints.h>

Public Member Functions

 KinematicConstraints ()
 
 ~KinematicConstraints ()
 
 KinematicConstraints (const KinematicConstraints &)
 
int Type () const
 
void ResonanceConstraints (const double mres, std::vector< int > tlis, HepSymMatrix Vre)
 
void TotalEnergyConstraints (const double etot, std::vector< int > tlis)
 
void TotalMomentumConstraints (const double ptot, std::vector< int > tlis)
 
void ThreeMomentumConstraints (const Hep3Vector p3, std::vector< int > tlis)
 
void FourMomentumConstraints (const HepLorentzVector p4, std::vector< int > tlis, HepSymMatrix Vme)
 
void EqualMassConstraints (std::vector< int > tlis1, std::vector< int > tlis2, HepSymMatrix Vne)
 
std::vector< HepMatrix > Ec ()
 
std::vector< HepMatrix > Dc ()
 
std::vector< HepVector > dc ()
 
std::vector< HepVector > lambda ()
 
std::vector< HepSymMatrix > Vm ()
 
std::vector< HepSymMatrix > VD ()
 
std::vector< int > Ltrk ()
 
int nc ()
 
void setType (const int type)
 
void setLambda (HepVector lambda)
 
void setVD (HepSymMatrix vd)
 
KinematicConstraintsoperator= (const KinematicConstraints &)
 
int typeRes () const
 
int typeEtot () const
 
int typePtot () const
 
int typeP3 () const
 
int typeP4 () const
 
int typeEqMass () const
 
int typePoint () const
 
double mres () const
 
double etot () const
 
double ptot () const
 
HepPoint3D point () const
 
Hep3Vector p3 () const
 
HepLorentzVector p4 () const
 
double phipre () const
 
double lambdapre () const
 
HepSymMatrix Vre () const
 
HepSymMatrix Vme () const
 
HepSymMatrix Vne () const
 
HepSymMatrix Vpe () const
 
HepSymMatrix Vmeasure () const
 
std::vector< int > numEqual ()
 
void setMres (const double mres)
 
void setEtot (const double etot)
 
void setPtot (const double ptot)
 
void setP3 (const Hep3Vector p3)
 
void setP4 (const HepLorentzVector p4)
 
void setP4 (const double etot)
 
void setPoint (const HepPoint3D x)
 
void setPhipre (const double phipre)
 
void setLambdapre (const double lambdapre)
 
void setVre (const HepSymMatrix Vre)
 
void setVme (const HepSymMatrix Vme)
 
void setVne (const HepSymMatrix Vne)
 
void setVpe (const HepSymMatrix Vpe)
 
void setVmeasure (const HepSymMatrix Vmeasure)
 
void setNumEqual (std::vector< int > nequal)
 

Detailed Description

Definition at line 20 of file KinematicConstraints.h.

Constructor & Destructor Documentation

◆ KinematicConstraints() [1/2]

KinematicConstraints::KinematicConstraints ( )

Definition at line 12 of file KinematicConstraints.cxx.

12 {
13 m_Ec.clear();
14 m_Dc.clear();
15 m_dc.clear();
16 m_Vm.clear();
17 m_lambda.clear();
18 m_ltrk.clear();
19 m_nequal.clear();
20 m_nc=0;
21 m_mres = -1;
22 m_etot = -1;
23 m_ptot = -1;
24 m_p3 = Hep3Vector(0, 0, 0);
25 m_p4 = HepLorentzVector(0, 0, 0, 0);
26 m_phipre = 0;
27 m_lambdapre = 0;
28 m_Vre = HepSymMatrix(1,0);
29 m_Vme = HepSymMatrix(4,0);
30 m_Vne = HepSymMatrix(1,0);
31 m_Vpe = HepSymMatrix(2,0);
32}

◆ ~KinematicConstraints()

KinematicConstraints::~KinematicConstraints ( )
inline

Definition at line 24 of file KinematicConstraints.h.

24{;}

◆ KinematicConstraints() [2/2]

KinematicConstraints::KinematicConstraints ( const KinematicConstraints & kc)
inline

Definition at line 125 of file KinematicConstraints.h.

125 {
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}

Member Function Documentation

◆ Dc()

std::vector< HepMatrix > KinematicConstraints::Dc ( )
inline

Definition at line 40 of file KinematicConstraints.h.

40{return m_Dc;}

◆ dc()

std::vector< HepVector > KinematicConstraints::dc ( )
inline

Definition at line 41 of file KinematicConstraints.h.

41{return m_dc;}

◆ Ec()

std::vector< HepMatrix > KinematicConstraints::Ec ( )
inline

Definition at line 39 of file KinematicConstraints.h.

39{return m_Ec;}

◆ EqualMassConstraints()

void KinematicConstraints::EqualMassConstraints ( std::vector< int > tlis1,
std::vector< int > tlis2,
HepSymMatrix Vne )

Definition at line 85 of file KinematicConstraints.cxx.

86{
87 m_ltrk.clear();
88 for(unsigned int i = 0; i < tlis1.size(); i++)
89 m_ltrk.push_back(tlis1[i]);
90 for(unsigned int i = 0; i < tlis2.size(); i++)
91 m_ltrk.push_back(tlis2[i]);
92 m_nc = 1;
94 setVne(Vne);
95 m_Vm.push_back(Vne);
96 m_nequal.clear();
97 m_nequal.push_back(tlis1.size());
98 m_nequal.push_back(tlis2.size());
100
101}
void setVne(const HepSymMatrix Vne)
void setType(const int type)
HepSymMatrix Vne() const
void setVmeasure(const HepSymMatrix Vmeasure)

Referenced by KalmanKinematicFit::AddEqualMass(), and KinematicFit::AddEqualMass().

◆ etot()

double KinematicConstraints::etot ( ) const
inline

Definition at line 62 of file KinematicConstraints.h.

62{return m_etot;}

Referenced by setEtot(), setP4(), and TotalEnergyConstraints().

◆ FourMomentumConstraints()

void KinematicConstraints::FourMomentumConstraints ( const HepLorentzVector p4,
std::vector< int > tlis,
HepSymMatrix Vme )

Definition at line 74 of file KinematicConstraints.cxx.

75{
76 m_ltrk = tlis;
77 m_nc = 4;
78 setType(typeP4());
79 setP4(p4);
80 setVme(Vme);
81 m_Vm.push_back(Vme);
83}
HepSymMatrix Vme() const
void setP4(const HepLorentzVector p4)
void setVme(const HepSymMatrix Vme)
HepLorentzVector p4() const

Referenced by KalmanKinematicFit::AddFourMomentum(), KalmanKinematicFit::AddFourMomentum(), KinematicFit::AddFourMomentum(), and KinematicFit::AddFourMomentum().

◆ lambda()

std::vector< HepVector > KinematicConstraints::lambda ( )
inline

Definition at line 42 of file KinematicConstraints.h.

42{return m_lambda;}

Referenced by setLambda().

◆ lambdapre()

double KinematicConstraints::lambdapre ( ) const
inline

Definition at line 68 of file KinematicConstraints.h.

68{return m_lambdapre;}

Referenced by setLambdapre().

◆ Ltrk()

std::vector< int > KinematicConstraints::Ltrk ( )
inline

Definition at line 45 of file KinematicConstraints.h.

45{return m_ltrk;}

Referenced by KalmanKinematicFit::BuildVirtualParticle(), and KinematicFit::BuildVirtualParticle().

◆ mres()

double KinematicConstraints::mres ( ) const
inline

Definition at line 61 of file KinematicConstraints.h.

61{return m_mres;}

Referenced by ResonanceConstraints(), and setMres().

◆ nc()

int KinematicConstraints::nc ( )
inline

Definition at line 46 of file KinematicConstraints.h.

46{return m_nc;}

Referenced by KalmanKinematicFit::Fit(), and KalmanKinematicFit::Fit().

◆ numEqual()

std::vector< int > KinematicConstraints::numEqual ( )
inline

Definition at line 74 of file KinematicConstraints.h.

74{return m_nequal;}

◆ operator=()

KinematicConstraints & KinematicConstraints::operator= ( const KinematicConstraints & kc)
inline

Definition at line 151 of file KinematicConstraints.h.

151 {
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}

◆ p3()

Hep3Vector KinematicConstraints::p3 ( ) const
inline

Definition at line 65 of file KinematicConstraints.h.

65{return m_p3;}

Referenced by setP3(), and ThreeMomentumConstraints().

◆ p4()

HepLorentzVector KinematicConstraints::p4 ( ) const
inline

Definition at line 66 of file KinematicConstraints.h.

66{return m_p4;}

Referenced by FourMomentumConstraints(), and setP4().

◆ phipre()

double KinematicConstraints::phipre ( ) const
inline

Definition at line 67 of file KinematicConstraints.h.

67{return m_phipre;}

Referenced by setPhipre().

◆ point()

HepPoint3D KinematicConstraints::point ( ) const
inline

Definition at line 64 of file KinematicConstraints.h.

64{return m_point;}

◆ ptot()

double KinematicConstraints::ptot ( ) const
inline

Definition at line 63 of file KinematicConstraints.h.

63{return m_ptot;}

Referenced by setPtot(), and TotalMomentumConstraints().

◆ ResonanceConstraints()

void KinematicConstraints::ResonanceConstraints ( const double mres,
std::vector< int > tlis,
HepSymMatrix Vre )

Definition at line 34 of file KinematicConstraints.cxx.

35{
36 m_ltrk = tlis;
37 m_nc = 1;
40 setVre(Vre);
42}
void setMres(const double mres)
HepSymMatrix Vre() const
void setVre(const HepSymMatrix Vre)

Referenced by KalmanKinematicFit::AddResonance(), and KinematicFit::AddResonance().

◆ setEtot()

void KinematicConstraints::setEtot ( const double etot)
inline

Definition at line 77 of file KinematicConstraints.h.

77{m_etot = etot;}

Referenced by TotalEnergyConstraints().

◆ setLambda()

void KinematicConstraints::setLambda ( HepVector lambda)
inline

Definition at line 48 of file KinematicConstraints.h.

48{m_lambda[0]=lambda;}
std::vector< HepVector > lambda()

◆ setLambdapre()

void KinematicConstraints::setLambdapre ( const double lambdapre)
inline

Definition at line 84 of file KinematicConstraints.h.

84{m_lambdapre = lambdapre;}

◆ setMres()

void KinematicConstraints::setMres ( const double mres)
inline

Definition at line 76 of file KinematicConstraints.h.

76{m_mres = mres;}

Referenced by ResonanceConstraints().

◆ setNumEqual()

void KinematicConstraints::setNumEqual ( std::vector< int > nequal)
inline

Definition at line 90 of file KinematicConstraints.h.

90{m_nequal = nequal;}

◆ setP3()

void KinematicConstraints::setP3 ( const Hep3Vector p3)
inline

Definition at line 79 of file KinematicConstraints.h.

79{m_p3 = p3;}

Referenced by ThreeMomentumConstraints().

◆ setP4() [1/2]

void KinematicConstraints::setP4 ( const double etot)
inline

Definition at line 81 of file KinematicConstraints.h.

81{m_p4 = HepLorentzVector(0., 0., 0., etot);}

◆ setP4() [2/2]

void KinematicConstraints::setP4 ( const HepLorentzVector p4)
inline

Definition at line 80 of file KinematicConstraints.h.

80{m_p4 = p4;}

Referenced by FourMomentumConstraints().

◆ setPhipre()

void KinematicConstraints::setPhipre ( const double phipre)
inline

Definition at line 83 of file KinematicConstraints.h.

83{m_phipre = phipre;}

◆ setPoint()

void KinematicConstraints::setPoint ( const HepPoint3D x)
inline

Definition at line 82 of file KinematicConstraints.h.

82{m_point = x;}
Double_t x[10]

◆ setPtot()

void KinematicConstraints::setPtot ( const double ptot)
inline

Definition at line 78 of file KinematicConstraints.h.

78{m_ptot = ptot;}

Referenced by TotalMomentumConstraints().

◆ setType()

void KinematicConstraints::setType ( const int type)
inline

◆ setVD()

void KinematicConstraints::setVD ( HepSymMatrix vd)
inline

Definition at line 49 of file KinematicConstraints.h.

49{m_VD[0] = vd;}

◆ setVme()

void KinematicConstraints::setVme ( const HepSymMatrix Vme)
inline

Definition at line 86 of file KinematicConstraints.h.

86{m_Vme = Vme;}

Referenced by FourMomentumConstraints().

◆ setVmeasure()

void KinematicConstraints::setVmeasure ( const HepSymMatrix Vmeasure)
inline

◆ setVne()

void KinematicConstraints::setVne ( const HepSymMatrix Vne)
inline

Definition at line 87 of file KinematicConstraints.h.

87{m_Vne = Vne;}

Referenced by EqualMassConstraints().

◆ setVpe()

void KinematicConstraints::setVpe ( const HepSymMatrix Vpe)
inline

Definition at line 88 of file KinematicConstraints.h.

88{m_Vpe = Vpe;}
HepSymMatrix Vpe() const

◆ setVre()

void KinematicConstraints::setVre ( const HepSymMatrix Vre)
inline

Definition at line 85 of file KinematicConstraints.h.

85{m_Vre = Vre;}

Referenced by ResonanceConstraints().

◆ ThreeMomentumConstraints()

void KinematicConstraints::ThreeMomentumConstraints ( const Hep3Vector p3,
std::vector< int > tlis )

Definition at line 64 of file KinematicConstraints.cxx.

65{
66 m_ltrk = tlis;
67 m_nc = 3;
68 setType(typeP3());
69 setP3(p3);
70 HepSymMatrix tmp(3,0);
71 setVmeasure(tmp);
72}
void setP3(const Hep3Vector p3)

Referenced by KalmanKinematicFit::AddThreeMomentum(), and KinematicFit::AddThreeMomentum().

◆ TotalEnergyConstraints()

void KinematicConstraints::TotalEnergyConstraints ( const double etot,
std::vector< int > tlis )

Definition at line 44 of file KinematicConstraints.cxx.

45{
46 m_ltrk = tlis;
47 m_nc = 1;
50 HepSymMatrix tmp(1,0);
51 setVmeasure(tmp);
52}
void setEtot(const double etot)

Referenced by KalmanKinematicFit::AddTotalEnergy(), and KinematicFit::AddTotalEnergy().

◆ TotalMomentumConstraints()

void KinematicConstraints::TotalMomentumConstraints ( const double ptot,
std::vector< int > tlis )

Definition at line 54 of file KinematicConstraints.cxx.

55{
56 m_ltrk = tlis;
57 m_nc = 1;
60 HepSymMatrix tmp(1,0);
61 setVmeasure(tmp);
62}
void setPtot(const double ptot)

Referenced by KalmanKinematicFit::AddTotalMomentum(), and KinematicFit::AddTotalMomentum().

◆ Type()

int KinematicConstraints::Type ( ) const
inline

Definition at line 26 of file KinematicConstraints.h.

26{return m_type;}

◆ typeEqMass()

int KinematicConstraints::typeEqMass ( ) const
inline

Definition at line 58 of file KinematicConstraints.h.

58{return EqualMass;}

Referenced by EqualMassConstraints().

◆ typeEtot()

int KinematicConstraints::typeEtot ( ) const
inline

Definition at line 54 of file KinematicConstraints.h.

54{return TotalEnergy;}

Referenced by TotalEnergyConstraints().

◆ typeP3()

int KinematicConstraints::typeP3 ( ) const
inline

Definition at line 56 of file KinematicConstraints.h.

56{return ThreeMomentum;}

Referenced by ThreeMomentumConstraints().

◆ typeP4()

int KinematicConstraints::typeP4 ( ) const
inline

Definition at line 57 of file KinematicConstraints.h.

57{return FourMomentum;}

Referenced by FourMomentumConstraints().

◆ typePoint()

int KinematicConstraints::typePoint ( ) const
inline

Definition at line 59 of file KinematicConstraints.h.

59{return Position;}

◆ typePtot()

int KinematicConstraints::typePtot ( ) const
inline

Definition at line 55 of file KinematicConstraints.h.

55{return TotalMomentum;}

Referenced by TotalMomentumConstraints().

◆ typeRes()

int KinematicConstraints::typeRes ( ) const
inline

Definition at line 53 of file KinematicConstraints.h.

53{return Resonance;}

Referenced by ResonanceConstraints().

◆ VD()

std::vector< HepSymMatrix > KinematicConstraints::VD ( )
inline

Definition at line 44 of file KinematicConstraints.h.

44{return m_VD;}

◆ Vm()

std::vector< HepSymMatrix > KinematicConstraints::Vm ( )
inline

Definition at line 43 of file KinematicConstraints.h.

43{return m_Vm;}

◆ Vme()

HepSymMatrix KinematicConstraints::Vme ( ) const
inline

Definition at line 70 of file KinematicConstraints.h.

70{return m_Vme;}

Referenced by FourMomentumConstraints(), and setVme().

◆ Vmeasure()

HepSymMatrix KinematicConstraints::Vmeasure ( ) const
inline

Definition at line 73 of file KinematicConstraints.h.

73{return m_Vmeasure;}

Referenced by KalmanKinematicFit::Fit(), KalmanKinematicFit::Fit(), and setVmeasure().

◆ Vne()

HepSymMatrix KinematicConstraints::Vne ( ) const
inline

Definition at line 71 of file KinematicConstraints.h.

71{return m_Vne;}

Referenced by EqualMassConstraints(), and setVne().

◆ Vpe()

HepSymMatrix KinematicConstraints::Vpe ( ) const
inline

Definition at line 72 of file KinematicConstraints.h.

72{return m_Vpe;}

Referenced by setVpe().

◆ Vre()

HepSymMatrix KinematicConstraints::Vre ( ) const
inline

Definition at line 69 of file KinematicConstraints.h.

69{return m_Vre;}

Referenced by ResonanceConstraints(), and setVre().


The documentation for this class was generated from the following files: