39 #include "TLorentzRotation.h"
46 #include "spinUtils.hpp"
47 #include "reportingUtilsRoot.hpp"
48 #include "conversionUtils.hpp"
49 #include "../particleDataTable.h"
50 #include "../particle.h"
58 main(
int argc,
char** argv)
63 particleProperties::setDebug(
true);
64 particleDataTable::setDebug(
true);
65 particle::setDebug(
true);
70 pdt.
readFile(
"./particleDataTable.txt");
74 printInfo <<
"particle data table:" << endl
80 const string partName =
"pi+";
82 printInfo <<
"particle properties for '" << partName <<
"':" << endl
84 pdt.addEntry(partProp);
85 printInfo <<
"antiparticle properties for '" << partName <<
"':" << endl
92 mom = TVector3(1, 2, 3);
93 const particle p1(
"pi+",
true, 0, 0, 0, mom);
94 mom = TVector3(2, 3, 4);
95 const particle p2(
"pi-",
true, 1, -1, 0, mom);
99 printInfo <<
"created particles: " << endl
107 for (
int i = -2;
i < 3; ++
i) {
115 const string n = particle::chargeFromName(c.str(),
q);
116 printInfo << c.str() <<
": charge = " << q <<
", bare name = " << n << endl;
118 cout <<
"name = " <<
p.name() << endl
136 printDebug <<
"testing equality operator for decay modes" << endl;
138 printInfo <<
"particle properties: " << partProp << endl;
140 for (
unsigned int j =
i; j < partProp.
nmbDecays(); ++j) {
141 cout <<
" {decay mode[" <<
i <<
"]: " << partProp.
decayModes()[
i]
142 <<
" vs. decay mode[" << j <<
"]: " << partProp.
decayModes()[j]
149 printInfo <<
"testing spin-exotic tag" << endl;
150 for (particleDataTable::iterator
i = pdt.begin();
i != pdt.end(); ++
i) {
152 const bool jpc = jpcIsExotic(prop.
J(), prop.
P(), prop.
C());
153 const bool igjp = igjpIsExotic(prop.
isospin(), prop.
G(), prop.
J(), prop.
P());
154 cout << prop.
name() <<
": " << yesNo(jpc) <<
" vs. " << yesNo(igjp)
155 << ((jpc != igjp) ?
" <<<" :
"") << endl;
157 for (
int J = 0; J < 4; ++J)
158 for (
int P = -1; P <= 1; P += 2)
159 for (
int C = -1; C <= 1; C += 2) {
160 const bool jpc = jpcIsExotic(2 * J, P, C);
161 const bool igjp1 = igjpIsExotic(0, C, 2 * J, P);
162 const bool igjp2 = igjpIsExotic(2, -C, 2 * J, P);
163 cout << J << sign(P) << sign(C) <<
": " << yesNo(jpc) <<
" vs. " << yesNo(igjp1)
164 <<
", " << yesNo(igjp2) << endl;
173 cout <<
"before = " << n <<
" " << p << endl;
179 cout <<
"L1 -> " << n <<
" " << p << endl;
183 cout <<
"L2 -> " << p << endl;
187 cout <<
"L3 -> " << p << endl;
194 cout <<
"L -> " << p << endl;
197 printWarn <<
"code disabled, because compilation of PWA2000 is disabled" << endl;
201 TLorentzVector
p(0.5, 0.75, 1, 2);
202 TVector3
n = TVector3(0, 0, 1).Cross(p.Vect());
204 R1.RotateZ(-n.Phi());
205 R1.RotateY(piHalf - n.Theta());
209 cout <<
"R1 -> " << n <<
" " << p << endl;
212 R2.RotateY(-signum(p.X()) * p.Theta());
214 cout <<
"R2 -> " << p << endl;
216 TLorentzRotation L3(-p.BoostVector());
217 cout <<
"L3 -> " << L3 * p << endl;
220 TLorentzRotation L(R1);
221 L.Boost(-p.BoostVector());
222 p = TLorentzVector(0.5, 0.75, 1, 2);
224 cout <<
"L -> " << p << endl;