46 _exampleDecay->addDgtr( 225)->addDgtr( 221, -211);
47 _exampleDecay->addDgtr( 333)->addDgtr(-321, 321);
49 return *_exampleDecay;
52 return getExampleDecay();
56 if(0==_exampleDecayD){
61 _exampleDecayD->addDgtr( 225)->addDgtr( 221, -211);
62 _exampleDecayD->addDgtr( 333)->addDgtr(-321, 321);
64 _exampleDecayD->getVal().setL(2);
66 return *_exampleDecayD;
69 return getExampleDecay();
76 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
77 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
78 return *_exampleDecay;
81 return getExampleDecay();
87 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
88 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
89 _exampleDecay->getVal().setL(1);
90 return *_exampleDecay;
93 return getExampleDecay();
99 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
100 _exampleDecay->addDgtr(225)->addDgtr(211, -211);
101 _exampleDecay->getVal().setL(2);
102 return *_exampleDecay;
105 return getExampleDecay();
112 _exampleDecay->addDgtr(-211, 215)->addDgtr(211, 113)->addDgtr(-211, 211);
113 return *_exampleDecay;
116 return getExampleDecay();
120 _exampleDecay->addDgtr(-211, 100215)->addDgtr(211, 225)->addDgtr(-211, 211);
121 return *_exampleDecay;
124 return getExampleDecay();
130 if(0==_exampleDecay){
135 _exampleDecay->addDgtr( 225)->addDgtr( 221, -211);
136 _exampleDecay->addDgtr( 9010221)->addDgtr(-321, 321);
138 return *_exampleDecay;
141 return getExampleDecay();
147 _exampleDecay->addDgtr(-211, 10215)->addDgtr(211, 225)->addDgtr(211, -211);
148 return *_exampleDecay;
151 return getExampleDecay();
155 _exampleDecay->addDgtr(-211, 10215)->addDgtr(211, 9000221)->addDgtr(211, -211);
156 return *_exampleDecay;
159 return getExampleDecay();
164 _exampleDecay->addDgtr(-211, 10215)->addDgtr(211, 113)->addDgtr(211, -211);
165 return *_exampleDecay;
168 return getExampleDecay();
176 _exampleDecay->addDgtr(-211, 20213)->addDgtr(211, 225)->addDgtr(211, -211);
177 return *_exampleDecay;
180 return getExampleDecay();
187 if(fsPS.size() < 4) fsPS.reserve(4);
188 if(theDecay(pat).nDgtr() != 2){
189 cout <<
"ERROR in SF_DtoVT_VtoP0P1_TtoP2P3_S::parseTree" 190 <<
" expected exactly 2 daughers of D, have " 191 << theDecay(pat).nDgtr();
195 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
202 cout <<
"ERROR in SF_DtoVT_VtoP0P1_TtoP2P3_BASE::parseTree" 203 <<
" Didn't find V or T " << V.
get() <<
", " << T.get() << endl;
207 cout <<
"ERROR in SF_DtoVT_VtoP0P1_TtoP2P3_BASE::parseTree" 208 <<
" V should have 2 daughters, but it says it has " 213 fsPS[0] = V->getDgtrTreePtr(0);
214 fsPS[1] = V->getDgtrTreePtr(1);
218 cout <<
"ERROR in SF_DtoVT_VtoP0P1_TtoP2P3_BASE::parseTree" 219 <<
" T should have 2 daughters, but it says it has " 224 fsPS[2] = T->getDgtrTreePtr(0);
225 fsPS[3] = T->getDgtrTreePtr(1);
234 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
238 TLorentzVector pV = p(0, evt) + p(1, evt);
239 TLorentzVector qV = p(0, evt) - p(1, evt);
240 TLorentzVector pT = p(2, evt) + p(3, evt);
241 TLorentzVector qT = p(2, evt) - p(3, evt);
242 TLorentzVector pD = pV + pT;
243 TLorentzVector qD = pV - pT;
245 double MV = mRes(V, evt);
246 double MT = mRes(T, evt);
251 if (_useZemachTensors) {
253 return (tT.
Contract(tV)).Dot(tD) / units;
256 double returnVal = (tT.
Contract(tV)).Dot(pV) / units;
259 cout <<
" SF_DtoVT_VtoP0P1_TtoP2P3_P::getVal " 260 <<
" returning " << returnVal
268 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
269 os <<
"spin factor SF_DtoVT_VtoP0P1_TtoP2P3_P" 270 <<
"\n\t T1(V)_{\\mu} T2(T)^{\\mu\\nu} pV_{\\nu}" 271 <<
"\n\t implemented as: (tT.Contract(tV)).Dot(pV) / GeV^4" 272 <<
"\n\t with T1(V) = ZTspin1 tV(qV, pV, MV), T2(T)= ZTspin2 tT(qT, pT, MT);" 273 <<
"\n\t and pV = p(0) + p(1), qV = p(0) - p(1), pT = p(2) + p(3), qT = p(2) - p(3)" 274 <<
"\n\t parsed tree " << theDecay().oneLiner()
275 <<
"\n like this:" << endl;
276 this->printParsing(os);
282 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
284 TLorentzVector pV = p(0, evt) + p(1, evt);
285 TLorentzVector qV = p(0, evt) - p(1, evt);
286 TLorentzVector pT = p(2, evt) + p(3, evt);
287 TLorentzVector qT = p(2, evt) - p(3, evt);
289 TLorentzVector pD = pT + pV;
290 TLorentzVector qD = pT - qV;
292 double MV = mRes(V, evt);
293 double MT = mRes(T, evt);
297 TLorentzVector vecT(tT.
Contract(pV));
301 if (_useZemachTensors) {
307 double returnVal =
LeviCivita(tV, vecT, qD, pD) /units;
311 cout <<
" SF_DtoVT_VtoP0P1_TtoP2P3_D::getVal " 312 <<
" returning " << returnVal
314 double checkVal =
LeviCivita(p(0, evt), p(1, evt), p(2, evt), p(3, evt))*MV*MT/units;
315 cout <<
"cross check: " << checkVal
316 <<
" ratio " << checkVal/returnVal << endl;
323 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
324 os <<
"spin factor SF_DtoVT_VtoP0P1_TtoP2P3_D" 325 <<
"\n\t ZTspin1 tV(qV, pV, MV);" 326 <<
"\n\t ZTspin2 tT(qT, pT, MT);" 327 <<
"\n\t TLorentzVector vecT(tT.Contract(pV));" 328 <<
"\n\t const double units = GeV*GeV * GeV*GeV * GeV*GeV;" 329 <<
"\n\t double returnVal = LeviCivita(tV, vecT, qD, pD) /units;" 330 <<
"\n\t with pV = p(0) + p(1), qV = p(0) - p(1), pT = p(2) + p(3), qT = p(2) - p(3)" 331 <<
"\n\t and pD = pT + pV, qD = pT - qV;" 332 <<
"\n\t parsed tree " << theDecay().oneLiner()
333 <<
"\n like this:" << endl;
334 this->printParsing(os);
343 if(fsPS.size() < 4) fsPS.reserve(4);
344 if(theDecay(pat).nDgtr() != 2){
345 cout <<
"ERROR in SF_DtoT1T2_T1toP0P1_T2toP2P3_BASE::parseTree" 346 <<
" expected exactly 2 daughers of D, have " 347 << theDecay(pat).nDgtr();
351 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
355 cout <<
"ERROR in SF_DtoT1T2_T1toP0P1_T2toP2P3_BASE::parseTree" 356 <<
" expected exactly 2 Tensors, have " 357 << theDecay(pat).nDgtr();
358 cout <<
"\n so daughter " << i <<
" is not a tensor." << endl;
363 if(0==T[0] || 0==T[1]){
364 cout <<
"ERROR in SF_DtoT1T2_T1toP0P1_T2toP2P3_BASE::parseTree" 365 <<
" Didn't find T or S " << T[0].
get() <<
", " << T[1].get() << endl;
368 if(T[0]->nDgtr() != 2){
369 cout <<
"ERROR in SF_DtoT1T2_T1toP0P1_T2toP2P3_BASE::parseTree" 370 <<
" T[0] should have 2 daughters, but it says it has " 371 << T[0]->
nDgtr() <<
"." 375 fsPS[0] = T[0]->getDgtrTreePtr(0);
376 fsPS[1] = T[0]->getDgtrTreePtr(1);
379 if(T[1]->nDgtr() != 2){
380 cout <<
"ERROR in SF_DtoT1T2_T1toP0P1_T2toP2P3_S::parseTree" 381 <<
" T[1] should have 2 daughters, but it says it has " 382 << T[1]->nDgtr() <<
"." 386 fsPS[2] = T[1]->getDgtrTreePtr(0);
387 fsPS[3] = T[1]->getDgtrTreePtr(1);
396 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
398 TLorentzVector pT1 = p(0, evt) + p(1, evt);
399 TLorentzVector qT1 = p(0, evt) - p(1, evt);
400 TLorentzVector pT2 = p(2, evt) + p(3, evt);
401 TLorentzVector qT2 = p(2, evt) - p(3, evt);
403 double MT1 = mRes(T[0], evt);
404 double MT2 = mRes(T[1], evt);
411 double returnVal = tT1.
Contract_2(tT2) / units;
414 cout <<
" SF_DtoT1T2_T1toP0P1_T2toP2P3_S::getVal " 415 <<
" returning " << returnVal
424 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
425 os <<
"spin factor SF_DtoT1T2_T1toP0P1_T2toP2P3_S" 426 <<
"\n\t ZTspin2 tT1(qT1, pT1, MT1);" 427 <<
"\n\t ZTspin2 tT2(qT2, pT2, MT2);" 428 <<
"\n\t return: tT1.Contract_2(tT2) / GeV^8" 429 <<
"\n\t with pT1 = p(0) + p(1), qT = p(0) - p(1), pT2 = p(2) + p(3), qT2 = p(2)-p(3)" 430 <<
"\n\t parsed tree " << theDecay().oneLiner()
431 <<
"\n like this:" << endl;
432 this->printParsing(os);
437 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
439 TLorentzVector pT1 = p(0, evt) + p(1, evt);
440 TLorentzVector qT1 = p(0, evt) - p(1, evt);
441 TLorentzVector pT2 = p(2, evt) + p(3, evt);
442 TLorentzVector qT2 = p(2, evt) - p(3, evt);
443 TLorentzVector pD = pT1 + pT2;
444 TLorentzVector qD = pT1 - pT2;
447 double MT1 = mRes(T[0], evt);
448 double MT2 = mRes(T[1], evt);
455 if (_useZemachTensors) {
463 cout <<
" SF_DtoT1T2_T1toP0P1_T2toP2P3_P::getVal " 464 <<
" returning " << returnVal
473 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
474 os <<
"spin factor SF_DtoT1T2_T1toP0P1_T2toP2P3_P" 475 <<
"\n\t ZTspin2 tT1(qT1, pT1, MT1);" 476 <<
"\n\t ZTspin2 tT2(qT2, pT2, MT2);" 477 <<
"\n\t pD = pT1 + pT2 " 478 <<
"\n\t qD = pT1 - pT2 " 479 <<
"\n\t return: LeviCivita(pD, qD, tT1.Contract_1(tT2))/ GeV^4" 480 <<
"\n\t with pT1 = p(0) + p(1), qT = p(0) - p(1), pT2 = p(2) + p(3), qT2 = p(2)-p(3)" 481 <<
"\n\t parsed tree " << theDecay().oneLiner()
482 <<
"\n like this:" << endl;
483 this->printParsing(os);
488 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
490 TLorentzVector pT1 = p(0, evt) + p(1, evt);
491 TLorentzVector qT1 = p(0, evt) - p(1, evt);
492 TLorentzVector pT2 = p(2, evt) + p(3, evt);
493 TLorentzVector qT2 = p(2, evt) - p(3, evt);
494 TLorentzVector qD = pT1 - pT2;
495 TLorentzVector pD = pT1 + pT2;
497 double MT1 = mRes(T[0], evt);
498 double MT2 = mRes(T[1], evt);
503 TLorentzVector X1(tT1.
Contract(qD));
504 TLorentzVector X2(tT2.
Contract(qD));
508 if (_useZemachTensors) {
511 val -= 1./3. * tD.Dot(tD) * tT1.
Contract_2(tT2);
512 val += 1./3. * tD.Dot(tD) / (pD.Dot(pD)) * (tT1.
Contract(pD)).Dot(tT2.
Contract(pD));
516 double returnVal = X1.Dot(X2) / units;
519 cout <<
" SF_DtoT1T2_T1toP0P1_T2toP2P3_D::getVal " 520 <<
" returning " << returnVal
529 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
530 os <<
"spin factor SF_DtoT1T2_T1toP0P1_T2toP2P3_D" 531 <<
"\n\t ZTspin2 tT1(qT1, pT1, MT1);" 532 <<
"\n\t ZTspin2 tT2(qT2, pT2, MT2);" 533 <<
"\n\t qD = pT1 - pT2" 534 <<
"\n\t return: (tT1.Contract(qD))* (tT2.Contract(qD))/ GeV^4" 535 <<
"\n\t with pT1 = p(0) + p(1), qT = p(0) - p(1), pT2 = p(2) + p(3), qT2 = p(2)-p(3)" 536 <<
"\n\t parsed tree " << theDecay().oneLiner()
537 <<
"\n like this:" << endl;
538 this->printParsing(os);
546 if(fsPS.size() < 4) fsPS.reserve(4);
547 if(theDecay(pat).nDgtr() != 2){
548 cout <<
"ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree" 549 <<
" expected exactly 2 daughers of D, have " 550 << theDecay(pat).nDgtr();
553 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
558 if(0==T || 0==fsPS[0]){
559 cout <<
"ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree" 560 <<
" Didn't find T or P0 " << T.
get() <<
", " << fsPS[0].get() << endl;
565 cout <<
"ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree" 566 <<
" T should have 2 daughters, but it says it has " 571 for(
int i=0; i< T->nDgtr(); i++){
576 if(0==V || 0==fsPS[1]){
577 cout <<
"ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree" 578 <<
" Didn't find V2 or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
583 cout <<
"ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree" 584 <<
" V should have 2 daughters, but it says it has " 589 fsPS[2] = V->getDgtrTreePtr(0);
590 fsPS[3] = V->getDgtrTreePtr(1);
599 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
601 TLorentzVector pV = p(2, evt) + p(3, evt);
602 TLorentzVector qV = p(2, evt) - p(3, evt);
603 TLorentzVector pT = pV + p(1, evt);
604 TLorentzVector qT = pV - p(1, evt);
605 TLorentzVector pD = pT + p(0, evt);
606 TLorentzVector qD = pT - p(0, evt);
608 double MT = mRes(T, evt);
609 double MV = mRes(V, evt);
614 TLorentzVector DT(t2T.
Contract(qD));
618 if (_useZemachTensors) {
626 return P2T.
Sandwich(tD,tD,tmp,t1T)/ units + 1./3. * tD.Dot(tD) / (pT.Dot(pT)) * P2T.
Sandwich(pD,pD,tmp,t1T)/ units;
629 double returnVal =
LeviCivita(pD, qD, DT, tV) / units;
632 cout <<
" SF_DtoTP0_TtoVP1_VtoP2P3::getVal " 633 <<
" returning " << returnVal
641 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
642 os <<
"spin factor SF_DtoTP0_TtoVP1_VtoP2P3" 643 <<
"\n\t ZTspin2 tT1(qT, pT, MT);" 644 <<
"\n\t ZTspin1 tT2(qV, pV, MV);" 645 <<
"\n\t pV = p(2) + p(3); qV = p(2) - p(3);" 646 <<
"\n\t pT = pV + p(1); qT = pV - p(1);" 647 <<
"\n\t pD = pT + p(0); qD = pT - p(0);" 648 <<
"\n\t return: DT(tT.Contract(qD))/GeV^6" 649 <<
"\n\t parsed tree " << theDecay().oneLiner()
650 <<
"\n like this:" << endl;
651 this->printParsing(os);
656 if(fsPS.size() < 4) fsPS.reserve(4);
657 if(theDecay(pat).nDgtr() != 2){
658 cout <<
"ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree" 659 <<
" expected exactly 2 daughers of D, have " 660 << theDecay(pat).nDgtr();
663 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
668 if(0==T1 || 0==fsPS[0]){
669 cout <<
"ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree" 670 <<
" Didn't find T or P0 " << T1.
get() <<
", " << fsPS[0].get() << endl;
674 if(T1->nDgtr() != 2){
675 cout <<
"ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree" 676 <<
" T should have 2 daughters, but it says it has " 677 << T1->
nDgtr() <<
"." 681 for(
int i=0; i< T1->nDgtr(); i++){
686 if(0==T2 || 0==fsPS[1]){
687 cout <<
"ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree" 688 <<
" Didn't find T2 or P1 " << T2.
get() <<
", " << fsPS[1].get() << endl;
692 if(T2->nDgtr() != 2){
693 cout <<
"ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree" 694 <<
" V should have 2 daughters, but it says it has " 695 << T2->
nDgtr() <<
"." 699 fsPS[2] = T2->getDgtrTreePtr(0);
700 fsPS[3] = T2->getDgtrTreePtr(1);
709 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
711 TLorentzVector pT2 = p(2, evt) + p(3, evt);
712 TLorentzVector qT2 = p(2, evt) - p(3, evt);
713 TLorentzVector pT1 = pT2 + p(1, evt);
714 TLorentzVector qT1 = pT2 - p(1, evt);
715 TLorentzVector pD = pT1 + p(0, evt);
716 TLorentzVector qD = pT1 - p(0, evt);
718 double MT1 = mRes(T1 ,evt);
719 double MT2 = mRes(T2, evt);
724 TLorentzVector DT(tT1.
Contract(qT1));
728 if (_useZemachTensors) {
733 TLorentzVector tmp1 =
LeviCivita(LT1,pT1,LT2);
734 TLorentzVector tmp2 =
LeviCivita(LT1,pT1,pT2);
735 tmp2 *= LT2.Dot(LT2)*1./(3.*pT2.Dot(pT2));
742 double returnVal =
LeviCivita(pD, DT, tT2) / units;
745 cout <<
" SF_DtoT1P0_T1toT2P1_T2toP2P3::getVal " 746 <<
" returning " << returnVal
754 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
755 os <<
"spin factor SF_DtoT1P0_T1toT2P1_T2toP2P3" 756 <<
"\n\t ZTspin2 tT1(qT, pT, MT);" 757 <<
"\n\t ZTspin1 tT2(qV, pV, MV);" 758 <<
"\n\t TLorentzVector DT(tT1.Contract(qT1));" 759 <<
"\n\t pV = p(2, evt) + p(3); qV = p(2) - p(3);" 760 <<
"\n\t pT = pV + p(1); qT = pV - p(1);" 761 <<
"\n\t pD = pT + p(0); qD = pT - p(0);" 762 <<
"\n\t return: LeviCivita(pD, DT, tT2)/GeV^6" 763 <<
"\n\t parsed tree " << theDecay().oneLiner()
764 <<
"\n like this:" << endl;
765 this->printParsing(os);
773 if(fsPS.size() < 4) fsPS.reserve(4);
774 if(theDecay(pat).nDgtr() != 2){
775 cout <<
"ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree" 776 <<
" expected exactly 2 daughers of D, have " 777 << theDecay(pat).nDgtr();
781 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
788 cout <<
"ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree" 789 <<
" Didn't find T or S " << T.
get() <<
", " << S.get() << endl;
793 cout <<
"ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree" 794 <<
" T should have 2 daughters, but it says it has " 799 fsPS[0] = T->getDgtrTreePtr(0);
800 fsPS[1] = T->getDgtrTreePtr(1);
804 cout <<
"ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree" 805 <<
" S should have 2 daughters, but it says it has " 810 fsPS[2] = S->getDgtrTreePtr(0);
811 fsPS[3] = S->getDgtrTreePtr(1);
823 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
825 TLorentzVector pT = p(0, evt) + p(1, evt);
826 TLorentzVector qT = p(0, evt) - p(1, evt);
827 TLorentzVector pS = p(2, evt) + p(3, evt);
828 TLorentzVector qD = pT - pS;
829 TLorentzVector pD = pT + pS;
831 double MT = mRes(T, evt);
837 if (_useZemachTensors) {
847 cout << P2T.Sandwich(qD,qD,qT,qT)/units << endl;
849 cout << tT.
Contract(qD).Dot(qD)/units << endl;
850 cout << (qD.Dot(t1T)*qD.Dot(t1T) + 1./3. * t1T.Dot(t1T) * P1T.
Sandwich(qD,qD))/units << endl;
857 double returnVal = (tT.
Contract(qD)).Dot(qD) / units;
862 cout <<
" SF_DtoTS_TtoP0P1_StoP2P3::getVal " 863 <<
" returning " << returnVal
872 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
873 os <<
"spin factor SF_DtoTS_TtoP0P1_StoP2P3" 874 <<
"\n\t ZTspin2 tT(qT, pT, MT);" 875 <<
"\n\t return: (tT.Contract(qD)).Dot(qD) / GeV^4" 876 <<
"\n\t with pT = p(0) + p(1), qT = p(0) - p(1), pS = p(2) + p(3), qD = pT - qV;" 877 <<
"\n\t parsed tree " << theDecay().oneLiner()
878 <<
"\n like this:" << endl;
879 this->printParsing(os);
889 if(fsPS.size() < 4) fsPS.reserve(4);
890 if(theDecay(pat).nDgtr() != 2){
891 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree" 892 <<
" expected exactly 2 daughers of D, have " 893 << theDecay(pat).nDgtr();
896 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
901 if(0==PT || 0==fsPS[0]){
902 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree" 903 <<
" Didn't find T or P0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
907 if(PT->nDgtr() != 2){
908 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree" 909 <<
" T should have 2 daughters, but it says it has " 910 << PT->
nDgtr() <<
"." 914 for(
int i=0; i< PT->nDgtr(); i++){
919 if(0==V || 0==fsPS[1]){
920 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree" 921 <<
" Didn't find V2 or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
926 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree" 927 <<
" V should have 2 daughters, but it says it has " 932 fsPS[2] = V->getDgtrTreePtr(0);
933 fsPS[3] = V->getDgtrTreePtr(1);
942 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
944 TLorentzVector pV = p(2, evt) + p(3, evt);
945 TLorentzVector qV = p(2, evt) - p(3, evt);
946 TLorentzVector pT = pV + p(1, evt);
947 TLorentzVector qT = pV - p(1, evt);
948 TLorentzVector pD = pT + p(0, evt);
949 TLorentzVector qD = pT - p(0, evt);
951 double MT = mRes(PT, evt);
952 double MV = mRes(V, evt);
960 if (_useZemachTensors) {
964 return PT.
Sandwich(LD,LD,LT,tV)/units + 1./3. * LD.Dot(LD) / (pD.Dot(pD)) * PT.
Sandwich(pD,pD,LT,tV)/units;
968 double returnVal = (tT.
Contract(qT)).Dot(tV) / units;
971 cout <<
" SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::getVal " 972 <<
" returning " << returnVal
975 cout <<
" compare to: " 976 << ProT.
Sandwich(qD, qD, qT, tV) / units
984 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
985 os <<
"spin factor SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3" 986 <<
"\n\t ProT(pT, MT)" 987 <<
"\n\t ZTspin1 tT2(qV, pV, MV);" 988 <<
"\n\t pV = p(2) + p(3); qV = p(2) - p(3);" 989 <<
"\n\t pT = pV + p(1); qT = pV - p(1);" 990 <<
"\n\t pD = pT + p(0); qD = pT - p(0);" 991 <<
"\n\t return: ProT.Sandwich(qD, qD, qT, tV) / GeV^4" 992 <<
"\n\t parsed tree " << theDecay().oneLiner()
993 <<
"\n like this:" << endl;
994 this->printParsing(os);
999 if(fsPS.size() < 4) fsPS.reserve(4);
1000 if(theDecay(pat).nDgtr() != 2){
1001 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3_BASE::parseTree" 1002 <<
" expected exactly 2 daughers of D, have " 1003 << theDecay(pat).nDgtr();
1006 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1011 if(0==PT || 0==fsPS[0]){
1012 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3_BASE::parseTree" 1013 <<
" Didn't find T or P0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
1017 if(PT->nDgtr() != 2){
1018 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3_BASE::parseTree" 1019 <<
" T should have 2 daughters, but it says it has " 1020 << PT->
nDgtr() <<
"." 1024 for(
int i=0; i< PT->nDgtr(); i++){
1029 if(0==S || 0==fsPS[1]){
1030 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3_BASE::parseTree" 1031 <<
" Didn't find S or P1 " << S.
get() <<
", " << fsPS[1].get() << endl;
1035 if(S->nDgtr() != 2){
1036 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3_BASE::parseTree" 1037 <<
" V should have 2 daughters, but it says it has " 1038 << S->
nDgtr() <<
"." 1042 fsPS[2] = S->getDgtrTreePtr(0);
1043 fsPS[3] = S->getDgtrTreePtr(1);
1052 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1054 TLorentzVector pS = p(2, evt) + p(3, evt);
1055 TLorentzVector qS = p(2, evt) - p(3, evt);
1056 TLorentzVector pT = pS + p(1, evt);
1057 TLorentzVector qT = pS - p(1, evt);
1058 TLorentzVector pD = pT + p(0, evt);
1059 TLorentzVector qD = pT - p(0, evt);
1061 double MT = mRes(PT, evt);
1068 if(_useZemachTensors){
1073 double returnVal = (tT.
Contract(qD)).Dot(qD) / units;
1076 cout <<
" SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3::getVal " 1077 <<
" returning " << returnVal
1085 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1086 os <<
"spin factor SF_DtoPseudoTP0_PseudoTtoSP1_StoP2P3" 1087 <<
"\n\t ProT(pT, MT)" 1088 <<
"\n\t ZTspin1 tT2(qV, pV, MV);" 1089 <<
"\n\t pS = p(2) + p(3); qS = p(2) - p(3);" 1090 <<
"\n\t pT = pV + p(1); qT = pV - p(1);" 1091 <<
"\n\t pD = pT + p(0); qD = pT - p(0);" 1092 <<
"\n\t (tT.Contract(qD)).Dot(qD) / GeV^4" 1093 <<
"\n\t parsed tree " << theDecay().oneLiner()
1094 <<
"\n like this:" << endl;
1095 this->printParsing(os);
1101 if(fsPS.size() < 4) fsPS.reserve(4);
1102 if(theDecay(pat).nDgtr() != 2){
1103 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree" 1104 <<
" expected exactly 2 daughers of D, have " 1105 << theDecay(pat).nDgtr();
1108 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1113 if(0==PT || 0==fsPS[0]){
1114 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree" 1115 <<
" Didn't find T or P0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
1119 if(PT->nDgtr() != 2){
1120 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree" 1121 <<
" T should have 2 daughters, but it says it has " 1122 << PT->
nDgtr() <<
"." 1126 for(
int i=0; i< PT->nDgtr(); i++){
1131 if(0==T || 0==fsPS[1]){
1132 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree" 1133 <<
" Didn't find T or P1 " << T.
get() <<
", " << fsPS[1].get() << endl;
1137 if(T->nDgtr() != 2){
1138 cout <<
"ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree" 1139 <<
" V should have 2 daughters, but it says it has " 1140 << T->
nDgtr() <<
"." 1144 fsPS[2] = T->getDgtrTreePtr(0);
1145 fsPS[3] = T->getDgtrTreePtr(1);
1154 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1158 TLorentzVector pT = p(2, evt) + p(3, evt);
1159 TLorentzVector qT = p(2, evt) - p(3, evt);
1160 TLorentzVector pPT = pT + p(1, evt);
1161 TLorentzVector qPT = pT - p(1, evt);
1162 TLorentzVector pD = pPT + p(0, evt);
1163 TLorentzVector qD = pPT - p(0, evt);
1165 double MPT = mRes(PT, evt);
1166 double MT = mRes(T , evt);
1169 ZTspin2 tPT(qD*invGeV, pPT*invGeV, MPT*invGeV);
1170 ZTspin2 tT(qT*invGeV, pT*invGeV, MT*invGeV);
1174 if (_useZemachTensors) {
1178 return (PT1.
Sandwich(qD,qD,LT,LT) + 1./3. * LT.Dot(LT)/(pT.Dot(pT)) * PT1.
Sandwich(qD,qD,pT,pT))/units;
1181 double returnVal = tPT.
Contract_2(tT) / units;
1184 cout <<
" SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::getVal " 1185 <<
" returning " << returnVal
1186 <<
" = " << tPT.
Contract_2(tT) <<
" / " << units
1187 <<
"\n MPT = " << MPT <<
", MT = " << MT
1195 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1196 os <<
"spin factor SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3" 1197 <<
"\n\t ZTspin2 tPT(qD, pPT, MPT);" 1198 <<
"\n\t ZTspin2 tT(qT, pT, MT);" 1199 <<
"\n\t pT = p(2) + p(3); qT = p(2) - p(3);" 1200 <<
"\n\t pPT = pT + p(1); qPT = pT - p(1);" 1201 <<
"\n\t pD = pPT + p(0); qD = pPT - p(0);" 1202 <<
"\n\t tPT.Contract_2(tT)/ GeV^8" 1203 <<
"\n\t parsed tree " << theDecay().oneLiner()
1204 <<
"\n like this:" << endl;
1205 this->printParsing(os);
1215 if(fsPS.size() < 4) fsPS.reserve(4);
1216 if(theDecay(pat).nDgtr() != 2){
1217 cout <<
"ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree" 1218 <<
" expected exactly 2 daughers of D, have " 1219 << theDecay(pat).nDgtr();
1222 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1227 if(0==A || 0==fsPS[0]){
1228 cout <<
"ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree" 1229 <<
" Didn't find T or P0 " << A.
get() <<
", " << fsPS[0].get() << endl;
1233 if(A->nDgtr() != 2){
1234 cout <<
"ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree" 1235 <<
" T should have 2 daughters, but it says it has " 1236 << A->
nDgtr() <<
"." 1240 for(
int i=0; i< A->nDgtr(); i++){
1245 if(0==T || 0==fsPS[1]){
1246 cout <<
"ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree" 1247 <<
" Didn't find T or P1 " << T.
get() <<
", " << fsPS[1].get() << endl;
1251 if(T->nDgtr() != 2){
1252 cout <<
"ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree" 1253 <<
" A should have 2 daughters, but it says it has " 1254 << T->
nDgtr() <<
"." 1258 fsPS[2] = T->getDgtrTreePtr(0);
1259 fsPS[3] = T->getDgtrTreePtr(1);
1268 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1270 TLorentzVector pT = p(2, evt) + p(3, evt);
1271 TLorentzVector qT = p(2, evt) - p(3, evt);
1272 TLorentzVector pA = pT + p(1, evt);
1273 TLorentzVector qA = pT - p(1, evt);
1274 TLorentzVector pD = pA + p(0, evt);
1275 TLorentzVector qD = pA - p(0, evt);
1277 double MA = mRes(A, evt);
1278 double MT = mRes(T, evt);
1286 if (_useZemachTensors) {
1290 return PT.Sandwich(qT,qT,LD,tA)/units;
1293 double returnVal = (tT.
Contract(tA)).Dot(qD) / units;
1296 cout <<
" SF_DtoAP0_AtoTP1_TtoP2P3::getVal " 1297 <<
" returning " << returnVal
1305 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1306 os <<
"spin factor SF_DtoAP0_AtoTP1_TtoP2P3" 1307 <<
"\n\t ZTspin1 tA(qA, pA, MA);" 1308 <<
"\n\t ZTspin2 tT(qT, pT, MT);" 1309 <<
"\n\t pT = p(2) + p(3); qT = p(2) - p(3);" 1310 <<
"\n\t pA = pT + p(1); qA = pT - p(1);" 1311 <<
"\n\t pD = pA + p(0); qD = pA - p(0);" 1312 <<
"\n\t (tT.Contract(tA)).Dot(qD) / GeV^4" 1313 <<
"\n\t parsed tree " << theDecay().oneLiner()
1314 <<
"\n like this:" << endl;
1315 this->printParsing(os);
double Contract_2(const SymmLorentzMatrix &M)
virtual bool parseTree(const DalitzEventPattern &pat)
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual double getVal(IDalitzEvent &evt)
std::string SVPAT() const
TLorentzVector Dot(const TLorentzVector &rhs) const
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
double Sandwich(const TLorentzVector &lhs, const TLorentzVector &rhs) const
virtual bool parseTree(const DalitzEventPattern &pat)
const ValueType & getVal() const
virtual const DecayTree & exampleDecay()
bool isFinalState() const
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
virtual double getVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual bool parseTree(const DalitzEventPattern &pat)
virtual double getVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual double getVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual double getVal(IDalitzEvent &evt)
virtual bool parseTree(const DalitzEventPattern &pat)
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
LorentzMatrix Contract_1(const SymmLorentzMatrix &M)
virtual const DalitzEventPattern & eventPattern() const =0
virtual bool parseTree(const DalitzEventPattern &pat)
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual void printYourself(std::ostream &os=std::cout) const
virtual double getVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
double LeviCivita(const TLorentzVector &p0, const TLorentzVector &p1, const TLorentzVector &p2, const TLorentzVector &p3)
virtual double getVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
double Sandwich(const TLorentzVector &lm, const TLorentzVector &ln, const TLorentzVector &ra, const TLorentzVector &rb)
static DecayTree * _exampleDecay
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual double getVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
DDTree< DecayTreeItem > DecayTree
virtual double getVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
virtual double getVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual double getVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
static DecayTree * _exampleDecayD
virtual void printYourself(std::ostream &os=std::cout) const
virtual double getVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
TLorentzVector Contract(const TLorentzVector &vec)