13 #define MAXPRECISION(val) setprecision(numeric_limits<double>::digits10 + 1) << val
31 cout <<
"in particle(" <<
this <<
")::particle()" << endl;
39 cout <<
"in particle(" <<
this <<
")::particle(const particle& part("
40 << &p <<
")=" << p.
Name() <<
")" << endl;
70 cout <<
"in particle(" <<
this <<
")::particle(const particleData& data("
71 << &data <<
")=" << data.
Name() <<
", int c)" << endl;
78 cout <<
"in particle((" <<
this <<
")=" <<
Name() <<
")::~particle()" << endl;
88 cout <<
"in particle(" <<
this <<
")::operator=(const particle& particle("
89 << &p <<
")=" << p.
Name() <<
")" << endl;
192 cout <<
"found particle " << part->
Name() << part->
Charge() <<
"[" << part->
Index()
193 <<
"]" << endl <<
"returning fourVec:" << ret << endl;
197 cout <<
"I'm a " <<
Name() <<
Charge() <<
"[" <<
Index() <<
"]" << endl
198 <<
"not a " << part->
Name() << part->
Charge() <<
"[" << part->
Index() <<
"]" << endl
199 <<
"checking my children..." << endl;
210 for (
int lam = -
J(); lam <=
J(); lam += 2)
241 <<
" into helicity frame:" << endl <<
"momentum: ";
276 cout <<
"found stable particle " <<
Name() <<
Charge() <<
"[" <<
Index() <<
"]" << endl;
289 return ~(child->get3P());
296 const double m1sq = child1.get4P().lenSq();
298 const double lam =
lambda(Msq, m1sq, m2sq);
299 return sqrt(fabs(lam / (4 * Msq)));
316 const double m1sq = child1.get4P().lenSq();
320 const double lam =
lambda(Msq, m1sq, m2sq);
321 return sqrt(fabs(lam / (4 * Msq)));
334 s << space <<
i->sprint(space);
335 s << space <<
_decay->
L() << space <<
_decay->
S() << space <<
"}";
344 const double m0 =
Mass();
345 const double Gamma0 =
Width();
346 const double q = this->
q();
347 const double q0 = this->
q0();
348 const double m = ~(
get4P());
350 const double GammaV = Gamma0 * (m0 / m) * (q / q0) * (pow (
F (l, q), 2) / pow (
F (l, q0), 2));
351 const complex<double>
i = complex < double >(0, 1);
352 const complex<double> ret = (m0 * Gamma0) / (m0 * m0 - m * m - i * m0 * GammaV);
361 complex<double>
a, bw;
368 cout <<
"calculate decay amplitude for " <<
Name() <<
Charge() <<
"[" <<
Index() <<
"] "
375 cout <<
Name() <<
" decay amp = " << a << endl;
388 cout <<
"momentum: ";
392 cout <<
"mass dependance: ";
408 cout <<
"momentum: ";
443 cout <<
"in decay(" <<
this <<
")::decay(const decay& d)" << endl;
451 cout <<
"in decay(" <<
this <<
")::~decay()" << endl;
482 list<particle>::const_iterator child =
_children.begin();
486 if (child->J() != 0) {
492 if (numNonZero > 1) {
493 cerr <<
"final state spin is undetermined in decay: " << endl;
506 cout <<
"in decay(" <<
this <<
")::operator=(const decay& d)" << endl;
526 cout <<
"looking for " << part->
Name() << endl;
527 list<particle>::iterator child =
_children.begin();
531 cout <<
"checking against " << child->Name() << endl;
532 p = child->get4P(part, debug);
535 cout <<
"found it! " << child->Name() <<
" == " << part->
Name() << endl;
553 cout <<
"Found stable particle " <<
i->Name() << endl;
557 cout <<
"Found unstable particle " <<
i->Name() << endl
558 <<
"Calling fill for " <<
i->Name() << endl;
559 v =
i->Decay()->fill(e, debug);
562 cout <<
"Setting p of " <<
i->Name() <<
" to:"<< endl;
577 list<particle>::iterator child =
_children.begin();
580 cout <<
"boosting child (" << child->Name() <<
") into correct frame" << endl
581 <<
"p before: " << endl;
582 child->get4P().print();
586 cout <<
"p after: " << endl;
587 child->get4P().print();
596 p += child->setupFrames(debug);
603 cout <<
"decay mass: " <<
_mass << endl
604 <<
"decay analyzer: " << child->Name() << child->Charge() <<
"[" << child->Index() <<
"]"
605 << endl <<
"decay angles: theta: " << child->get3P().theta() <<
" "
606 <<
"phi: " << child->get3P().phi() << endl;
620 list<particle>::iterator child =
_children.begin();
624 const int s1 = child1.
J();
625 const int s2 = child2.
J();
626 const list<int> helicities1 = child1.
helicities();
627 const list<int> helicities2 = child2.
helicities();
633 cout <<
"My children are: " << child1.
Name() <<
" and " << child2.
Name() << endl;
635 cout <<
"My childrens spins are: " << s1 <<
" and " << s2 << endl;
637 cout <<
"child1's helicity list is " << helicities1.size() <<
" elements long" << endl;
639 cout <<
"child1's helicities are: ";
640 list<int>::const_iterator
i = helicities1.begin();
641 while (i != helicities1.end()) {
647 cout <<
"child2's helicity list is " << helicities2.size() <<
" elements long" << endl;
649 cout <<
"child2's helicities are: ";
650 i = helicities2.begin();
651 while (i != helicities2.end()) {
659 complex<double>
amp = 0;
660 list<int>::const_iterator lambda1 = helicities1.begin();
661 while (lambda1 != helicities1.end()) {
662 list<int>::const_iterator lambda2 = helicities2.begin();
663 while (lambda2 != helicities2.end()) {
666 cout <<
"lambda1: " << *lambda1 <<
" lambda2: " << *lambda2 << endl;
667 cout <<
"exp(-" << b <<
"|" << t <<
"|)" << endl;
669 complex<double>
a = complex<double>(exp(-(b / 2.0) * fabs(t)), 0.0);
672 cout <<
"a = " << a << endl;
674 cout <<
"calculating amp for " << child1.
Name() << endl;
676 a *= child1.
decayAmp(*lambda1, debug);
679 cout <<
"a *= child1.decayAmp = " << a << endl;
681 cout <<
"calculating amp for " << child2.
Name() << endl;
683 a *= child2.
decayAmp(*lambda2, debug);
686 cout <<
"a *= child2.decayAmp = " << a << endl;
688 cout <<
"PLUS" << endl;
693 cout <<
"amp += a = " << amp << endl;
712 list<particle>::iterator child =
_children.begin();
716 const int s1 = child1.
J();
717 const int s2 = child2.
J();
718 const list<int> helicities1 = child1.
helicities();
719 const list<int> helicities2 = child2.
helicities();
725 cout <<
"My children are: " << child1.
Name() <<
" and " << child2.
Name() << endl;
727 cout <<
"My childrens spins are: " << s1 <<
" and " << s2 << endl;
729 cout <<
"child1's helicity list is " << helicities1.size() <<
" elements long" << endl;
731 cout <<
"child1's helicities are: ";
732 list<int>::const_iterator
i = helicities1.begin();
733 while (i != helicities1.end()) {
739 cout <<
"child2's helicity list is " << helicities2.size() <<
" elements long" << endl;
741 cout <<
"child2's helicities are: ";
742 i = helicities2.begin();
743 while (i != helicities2.end()) {
751 complex<double>
amp = 0;
752 list<int>::const_iterator lambda1 = helicities1.begin();
753 while (lambda1 != helicities1.end()) {
754 list<int>::const_iterator lambda2 = helicities2.begin();
755 while (lambda2 != helicities2.end()) {
756 const int lambda = *lambda1 - *lambda2;
757 if (abs(lambda) <= j) {
760 cout <<
"lambda1: " << *lambda1 <<
" lambda2: " << *lambda2 << endl;
771 theta = normal.
theta();
773 const double tildeFactor =
tilde(
_l);
774 const complex<double> df =
conj(
D(phi, theta, 0, j, m, lambda));
775 const double CGcoefficient1 =
clebsch(
_l,
_s, j, 0, lambda, lambda);
776 const double CGcoefficient2 =
clebsch(s1, s2,
_s, *lambda1, -*lambda2, lambda);
777 double barrierFactor = 1;
778 double lambdaFactor = 1;
780 barrierFactor =
F(
_l, ~(analyzer.
get3P()));
788 if (child->is(
"pi0"))
790 else if (child->is(
"pi")) {
791 switch (child->Charge()) {
799 cerr <<
"bad child for omega: "
800 << child->Name() << endl;
803 cerr <<
"bad child for omega: "
804 << child->Name() << endl;
810 cout <<
"calculate sqrt(lambda)" << endl;
812 cout <<
"P_pi+: " << piPlus.
get3P() << endl;
814 cout <<
"P_pi-: " << piMinus.
get3P() << endl;
816 cout <<
"| P_pi+ X P_pi- |: " << (piPlus.
get3P() / piMinus.
get3P()).len() << endl;
818 cout <<
"M(pi^+ pi^- pi^0): " <<
_mass << endl;
820 cout <<
"M(pi^-): " << piMinus.
get4P().
lenSq() << endl;
822 cout <<
"numerator: " << (piPlus.
get3P() / piMinus.
get3P()).len() << endl;
824 cout <<
"denominator: "
825 << sqrt(3.0 / 4.0) * (pow(
_mass / 3.0, 2.0) - piMinus.
get4P().
lenSq()) << endl;
827 lambdaFactor = (piPlus.
get3P() / piMinus.
get3P()).len()
828 / (sqrt(3.0 / 4.0) * (pow(
_mass / 3.0, 2.0) - piMinus.
get4P().
lenSq()));
834 cout <<
"tilde(" <<
_l <<
"){=" <<
MAXPRECISION(tildeFactor) <<
"}"
835 <<
"D[" << j <<
", " << m <<
", " << lambda <<
"]"
836 <<
"(" << phi <<
", " << theta <<
", 0){=" <<
MAXPRECISION(df) <<
"}"
837 <<
"( " <<
_l <<
" 0 " <<
_s <<
" " << lambda
838 <<
" | " << j <<
" " << lambda <<
" ){=" <<
MAXPRECISION(CGcoefficient1) <<
"}"
839 <<
"( " << s1 <<
" " << *lambda1 <<
" " << s2 <<
" " << -*lambda2
840 <<
" | " <<
_s <<
" " << lambda <<
" ){=" <<
MAXPRECISION(CGcoefficient2) <<
"}"
842 <<
"}sqrt(lambda)" <<
"{=" <<
MAXPRECISION(lambdaFactor) <<
"}"
843 <<
"Delta(" <<
_mass <<
")"
846 complex<double>
a = tildeFactor * df * CGcoefficient1 * CGcoefficient2
847 * barrierFactor * lambdaFactor;
852 cout <<
"calculating amp for " << child1.
Name() << endl;
854 a *= child1.
decayAmp(*lambda1, debug);
857 cout <<
"a *= child1.decayAmp = " << a << endl;
859 cout <<
"calculating amp for " << child2.
Name() << endl;
861 a *= child2.
decayAmp(*lambda2, debug);
864 cout <<
"a *= child2.decayAmp = " << a << endl;
866 cout <<
"PLUS" << endl;
871 cout <<
"amp += a = " << amp << endl;
887 cout <<
"children : {" << endl;
891 cout <<
"L: " <<
_l <<
" S: " <<
_s << endl;
903 cout <<
"children in decay frame : {" << endl;
907 cout <<
"L: " <<
_l <<
" S: " <<
_s << endl;