78 if(fsPS.size() < 4) fsPS.reserve(4);
79 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
82 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
84 if(0==A || 0==fsPS[0]){
85 cout <<
"ERROR in SF_BtoAV0_AtoVP1_VtoP2P3::parseTree" 86 <<
" Didn't find A or V0 " << A.
get() <<
", " << fsPS[0].get() << endl;
90 for(
int i=0; i< A->nDgtr(); i++){
93 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
95 if(0==V || 0==fsPS[1]){
96 cout <<
"ERROR in SF_BtoAV0_AtoVP1_VtoP2P3::parseTree" 97 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
102 cout <<
"ERROR in SF_BtoAV0_AtoVP1_VtoP2P3::parseTree" 103 <<
" V should have 2 daughters, but it says it has " 108 fsPS[2] = V->getDgtrTreePtr(0);
109 fsPS[3] = V->getDgtrTreePtr(1);
114 cout <<
"parsed Tree: V:\n" 119 for(
int i=0; i<4; i++){
120 cout <<
"fsPS[" << i <<
"]\n" 130 if(0==_exampleDecay){
133 _exampleDecay->addDgtr(443, 10323)->addDgtr(211, 313)->addDgtr(321,-211);
135 return *_exampleDecay;
139 return getExampleDecay();
143 if(0==_exampleDecayDwave){
148 k1.
addDgtr(211, 313)->addDgtr(321,-211);
149 _exampleDecayDwave->addDgtr(443);
150 _exampleDecayDwave->addDgtr(&k1);
152 return *_exampleDecayDwave;
156 return getExampleDecay();
160 if(0==_exampleDecayDwaveP){
162 _exampleDecayDwaveP =
new DecayTree(521);
165 k1.
addDgtr(211, 313)->addDgtr(321,-211);
166 _exampleDecayDwaveP->addDgtr(443);
167 _exampleDecayDwaveP->addDgtr(&k1);
168 _exampleDecayDwaveP->getVal().setL(1);
171 return *_exampleDecayDwaveP;
175 return getExampleDecay();
179 if(0==_exampleDecayDwaveD){
181 _exampleDecayDwaveD =
new DecayTree(521);
184 k1.
addDgtr(211, 313)->addDgtr(321,-211);
185 _exampleDecayDwaveD->addDgtr(443);
186 _exampleDecayDwaveD->addDgtr(&k1);
187 _exampleDecayDwaveD->getVal().setL(2);
190 return *_exampleDecayDwaveD;
194 return getExampleDecay();
198 if(0==_exampleDecayP){
201 _exampleDecayP->addDgtr(443, 10323)->addDgtr(211, 313)->addDgtr(321,-211);
202 _exampleDecayP->getVal().setL(1);
204 return *_exampleDecayP;
208 return getExampleDecay();
212 if(0==_exampleDecayD){
215 _exampleDecayD->addDgtr(443, 10323)->addDgtr(211, 313)->addDgtr(321,-211);
216 _exampleDecayD->getVal().setL(2);
218 return *_exampleDecayD;
222 return getExampleDecay();
229 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
231 double MA = mRes(A, evt);
232 double MV = mRes(V, evt);
233 double MV0 = mRes(fsPS[0], evt);
237 TLorentzVector pV= p(2, evt)+p(3, evt);
238 TLorentzVector qV= p(2, evt)-p(3, evt);
239 TLorentzVector pA= pV+p(1, evt);
259 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
260 os <<
"spin factor SF_BtoAV0_AtoVP1_VtoP2P3" 261 <<
"\n\t P.Sandwich(e_c,Z)" 263 <<
"\n\t parsed tree " << theDecay().oneLiner()
264 <<
"\n like this:" << endl;
265 this->printParsing(os);
270 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
272 double MA = mRes(A, evt);
273 double MV = mRes(V, evt);
274 double MV0 = mRes(fsPS[0], evt);
276 TLorentzVector pV= p(2, evt)+p(3, evt);
277 TLorentzVector qV= p(2, evt)-p(3, evt);
278 TLorentzVector pA= pV+p(1, evt);
279 TLorentzVector qA= pV-p(1, evt);
291 TLorentzVector tmp = ZA * (ZA.Dot(ZV)) + 1./3. * ZA.Dot(ZA) * PA.
Dot(ZV);
293 complex<double> sfm(tmp.Dot(e.
Re()),tmp.Dot(e.
Im()));
301 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
302 os <<
"spin factor SF_BtoAV0Dwave_AtoVP1_VtoP2P3" 303 <<
"\n\t e_c.Dot(ZA) * ZV.Dot(qA)" 305 <<
"\n\t parsed tree " << theDecay().oneLiner()
306 <<
"\n like this:" << endl;
307 this->printParsing(os);
312 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
314 double MA = mRes(A, evt);
315 double MV = mRes(V, evt);
316 double MV0 = mRes(fsPS[0], evt);
319 TLorentzVector pV= p(2, evt)+p(3, evt);
320 TLorentzVector qV= p(2, evt)-p(3, evt);
321 TLorentzVector pA= pV+p(1, evt);
322 TLorentzVector qA= pV-p(1, evt);
323 TLorentzVector pB= pA+p(0, evt);
324 TLorentzVector qB= pA-p(0, evt);
334 TLorentzVector tmp = LA * (LA.Dot(LV)) + 1./3. * LA.Dot(LA) * PA.Dot(LV);
341 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
342 os <<
"spin factor SF_BtoAV0Dwave_AtoVP1_VtoP2P3_P" 343 <<
"\n\t parsed tree " << theDecay().oneLiner()
344 <<
"\n like this:" << endl;
345 this->printParsing(os);
349 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
351 double MA = mRes(A, evt);
352 double MV = mRes(V, evt);
353 double MV0 = mRes(fsPS[0], evt);
355 TLorentzVector pV= p(2, evt)+p(3, evt);
356 TLorentzVector qV= p(2, evt)-p(3, evt);
357 TLorentzVector pA= pV+p(1, evt);
358 TLorentzVector qA= pV-p(1, evt);
359 TLorentzVector pB= pA+p(0, evt);
360 TLorentzVector qB= pA-p(0, evt);
371 TLorentzVector tmp = LA * (LA.Dot(LV)) + 1./3. * LA.Dot(LA) * PA.Dot(LV);
372 TLorentzVector tmp2 = LB * (LB.Dot(tmp)) + 1./3. * LB.Dot(LB) * PB.Dot(tmp);
374 complex<double> sfm(tmp2.Dot(e.Re()),tmp2.Dot(e.Im()));
379 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
380 os <<
"spin factor SF_BtoAV0Dwave_AtoVP1_VtoP2P3_D" 381 <<
"\n\t parsed tree " << theDecay().oneLiner()
382 <<
"\n like this:" << endl;
383 this->printParsing(os);
391 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
393 double MA = mRes(A,evt);
394 double MV = mRes(V,evt);
395 double MV0 = mRes(fsPS[0],evt);
398 TLorentzVector pV= p(2,evt)+p(3,evt);
399 TLorentzVector qV= p(2,evt)-p(3,evt);
400 TLorentzVector pA= pV+p(1,evt);
402 TLorentzVector pB= pA+p(0,evt);
403 TLorentzVector qB= pA-p(0,evt);
412 TLorentzVector tmp=PA.
Dot(ZV);
413 if(tmp==TLorentzVector(0,0,0,0))
return 0.;
425 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
426 os <<
"spin factor SF_BtoAV0_AtoVP1_VtoP2P3_P" 427 <<
"\n\t LeviCivita(e_c,PA.Dot(ZV),pB,qB)" 429 <<
"\n\t parsed tree " << theDecay().oneLiner()
430 <<
"\n like this:" << endl;
431 this->printParsing(os);
438 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
440 double MA = mRes(A,evt);
441 double MV = mRes(V,evt);
442 double MV0 = mRes(fsPS[0],evt);
446 TLorentzVector pV= p(2,evt)+p(3,evt);
447 TLorentzVector qV= p(2,evt)-p(3,evt);
448 TLorentzVector pA= pV+p(1,evt);
450 TLorentzVector pB= pA+p(0,evt);
451 TLorentzVector qB= pA-p(0,evt);
461 TLorentzVector tmp= PA.
Dot(ZV);
462 complex<double> sfm(DB.Sandwich(e.Re(),tmp,qB,qB),DB.Sandwich(e.Im(),tmp,qB,qB));
472 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
473 os <<
"spin factor SF_BtoAV0_AtoVP1_VtoP2P3_D" 474 <<
"\n\t e_c.Dot(pA) * ZA.Dot(ZV)" 476 <<
"\n\t parsed tree " << theDecay().oneLiner()
477 <<
"\n like this:" << endl;
478 this->printParsing(os);
487 if(0==_exampleDecay){
490 _exampleDecay->addDgtr(443, 10323)->addDgtr(211, 10311)->addDgtr(321,-211);
492 return *_exampleDecay;
496 return getExampleDecay();
500 if(0==_exampleDecayP){
503 _exampleDecayP->addDgtr(443, 10323)->addDgtr(211, 10311)->addDgtr(321,-211);
504 _exampleDecayP->getVal().setL(1);
505 cout << _exampleDecayP << endl;
507 return *_exampleDecayP;
511 return getExampleDecay();
515 if(0==_exampleDecayD){
518 _exampleDecayD->addDgtr(443, 10323)->addDgtr(211, 10311)->addDgtr(321,-211);
519 _exampleDecayD->getVal().setL(2);
521 return *_exampleDecayD;
525 return getExampleDecay();
529 bool debugThis=
false;
531 if(fsPS.size() < 4) fsPS.reserve(4);
532 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
535 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
537 if(0==A || 0==fsPS[0]){
538 cout <<
"ERROR in SF_BtoAV0_AtoSP1_StoP2P3::parseTree" 539 <<
" Didn't find A or V0 " << A.
get() <<
", " << fsPS[0].get() << endl;
543 for(
int i=0; i< A->nDgtr(); i++){
546 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
548 if(0==S || 0==fsPS[1]){
549 cout <<
"ERROR in SF_BtoAV0_AtoSP1_StoP2P3::parseTree" 550 <<
" Didn't find S or P1 " << S.
get() <<
", " << fsPS[1].get() << endl;
555 cout <<
"ERROR in SF_BtoAV0_AtoSP1_StoP2P3::parseTree" 556 <<
" S should have 2 daughters, but it says it has " 561 fsPS[2] = S->getDgtrTreePtr(0);
562 fsPS[3] = S->getDgtrTreePtr(1);
567 cout <<
"parsed Tree: A:\n" 572 for(
int i=0; i<4; i++){
573 cout <<
"fsPS[" << i <<
"]\n" 585 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
587 double MA = mRes(A,evt);
588 double MV0 = mRes(fsPS[0],evt);
593 TLorentzVector pA= p(2,evt)+p(3,evt)+p(1,evt);
594 TLorentzVector qA= p(2,evt)+p(3,evt)-p(1,evt);
600 complex<double> sfm(ZA.Dot(e.
Re()),ZA.Dot(e.
Im()));
607 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
608 os <<
"spin factor SF_BtoAV0_AtoSP1_StoP2P3" 609 <<
"\n\t ZA.Dot(e_c)" 611 <<
"\n\t parsed tree " << theDecay().oneLiner()
612 <<
"\n like this:" << endl;
613 this->printParsing(os);
618 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
620 double MA = mRes(A,evt);
621 double MV0 = mRes(fsPS[0],evt);
623 TLorentzVector pA= p(2,evt)+p(3,evt)+p(1,evt);
624 TLorentzVector qA= p(2,evt)+p(3,evt)-p(1,evt);
627 TLorentzVector pB= pA+p(0,evt);
628 TLorentzVector qB= pA-p(0,evt);
639 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
640 os <<
"spin factor SF_BtoAV0_AtoSP1_StoP2P3_P" 641 <<
"\n\t parsed tree " << theDecay().oneLiner()
642 <<
"\n like this:" << endl;
643 this->printParsing(os);
647 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
649 double MA = mRes(A,evt);
650 double MV0 = mRes(fsPS[0],evt);
652 TLorentzVector pA= p(2,evt)+p(3,evt)+p(1,evt);
653 TLorentzVector qA= p(2,evt)+p(3,evt)-p(1,evt);
656 TLorentzVector pB= pA+p(0,evt);
657 TLorentzVector qB= pA-p(0,evt);
660 TLorentzVector tmp= PB.
Dot(LA);
665 complex<double> sfm( LB.Dot(LA) * LB.Dot(e.
Re()) +1./3. * LB.Dot(LB) * tmp.Dot(e.
Re()), LB.Dot(LA) * LB.Dot(e.
Im()) +1./3. * LB.Dot(LB) * tmp.Dot(e.
Im()) );
670 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
671 os <<
"spin factor SF_BtoAV0_AtoSP1_StoP2P3_P" 672 <<
"\n\t parsed tree " << theDecay().oneLiner()
673 <<
"\n like this:" << endl;
674 this->printParsing(os);
682 bool debugThis=
false;
684 if(fsPS.size() < 4) fsPS.reserve(4);
685 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
690 if(0==V1 || 0==fsPS[0]){
691 cout <<
"ERROR in SF_BtoV1V0_V1toV2P1_V2toP2P3::parseTree" 692 <<
" Didn't find V1 or V0 " << V1.
get() <<
", " << fsPS[0].get() << endl;
696 for(
int i=0; i< V1->nDgtr(); i++){
699 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
701 if(0==V2 || 0==fsPS[1]){
702 cout <<
"ERROR in SF_BtoV1V0_V1toV2P1_V2toP2P3::parseTree" 703 <<
" Didn't find V2 or P1 " << V2.
get() <<
", " << fsPS[1].get() << endl;
707 if(V2->nDgtr() != 2){
708 cout <<
"ERROR in SF_BtoV1V0_V1toV2P1_V2toP2P3::parseTree" 709 <<
" V2 should have 2 daughters, but it says it has " 710 << V2->
nDgtr() <<
"." 714 fsPS[2] = V2->getDgtrTreePtr(0);
715 fsPS[3] = V2->getDgtrTreePtr(1);
720 cout <<
"parsed Tree: V1:\n" 725 for(
int i=0; i<4; i++){
726 cout <<
"fsPS[" << i <<
"]\n" 736 if(0==_exampleDecay){
739 _exampleDecay->addDgtr(443, 100323)->addDgtr(211, 313)->addDgtr(321,-211);
741 return *_exampleDecay;
745 return getExampleDecay();
749 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
751 double MV1 = mRes(V1,evt);
752 double MV2 = mRes(V2,evt);
753 double MV0 = mRes(fsPS[0],evt);
755 TLorentzVector pV2= p(2,evt)+p(3,evt);
756 TLorentzVector qV2= p(2,evt)-p(3,evt);
757 TLorentzVector pV1= pV2+p(1,evt);
758 TLorentzVector qV1= pV2-p(1,evt);
759 TLorentzVector pB= pV1+p(0,evt);
760 TLorentzVector qB= pV1-p(0,evt);
769 TLorentzVector tmp= PV1.
Dot(ZV2);
770 if(tmp==TLorentzVector(0,0,0,0))
return 0.;
778 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
779 os <<
"spin factor SF_BtoV1V0_V1toV2P1_V2toP2P3" 780 <<
"\n\t PV1.Contract(e_c),ZV2,qB,pB)" 782 <<
"\n\t parsed tree " << theDecay().oneLiner()
783 <<
"\n like this:" << endl;
784 this->printParsing(os);
788 if(0==_exampleDecayP){
791 _exampleDecayP->addDgtr(443, 100323)->addDgtr(211, 313)->addDgtr(321,-211);
792 _exampleDecayP->getVal().setL(1);
794 return *_exampleDecayP;
798 return getExampleDecay();
802 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
804 double MV1 = mRes(V1,evt);
805 double MV2 = mRes(V2,evt);
806 double MV0 = mRes(fsPS[0],evt);
808 TLorentzVector pV2= p(2,evt)+p(3,evt);
809 TLorentzVector qV2= p(2,evt)-p(3,evt);
810 TLorentzVector pV1= pV2+p(1,evt);
811 TLorentzVector qV1= pV2-p(1,evt);
812 TLorentzVector pB= pV1+p(0,evt);
813 TLorentzVector qB= pV1-p(0,evt);
830 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
831 os <<
"spin factor SF_BtoV1V0_V1toV2P1_V2toP2P3_P" 832 <<
"\n\t parsed tree " << theDecay().oneLiner()
833 <<
"\n like this:" << endl;
834 this->printParsing(os);
838 if(0==_exampleDecayD){
841 _exampleDecayD->addDgtr(443, 100323)->addDgtr(211, 313)->addDgtr(321,-211);
842 _exampleDecayD->getVal().setL(2);
844 return *_exampleDecayD;
848 return getExampleDecay();
852 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
854 double MV1 = mRes(V1,evt);
855 double MV2 = mRes(V2,evt);
856 double MV0 = mRes(fsPS[0],evt);
858 TLorentzVector pV2= p(2,evt)+p(3,evt);
859 TLorentzVector qV2= p(2,evt)-p(3,evt);
860 TLorentzVector pV1= pV2+p(1,evt);
861 TLorentzVector qV1= pV2-p(1,evt);
862 TLorentzVector pB= pV1+p(0,evt);
863 TLorentzVector qB= pV1-p(0,evt);
876 complex<double> sfm(ZB.Dot(e.
Re())*ZB.Dot(tmp)+ 1./3.*ZB.Dot(ZB) * (PB.Dot(tmp)).Dot(e.
Re()), ZB.Dot(e.
Im())*ZB.Dot(tmp)+ 1./3.*ZB.Dot(ZB) * (PB.Dot(tmp)).Dot(e.
Im()));
881 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
882 os <<
"spin factor SF_BtoV1V0_V1toV2P1_V2toP2P3_D" 883 <<
"\n\t parsed tree " << theDecay().oneLiner()
884 <<
"\n like this:" << endl;
885 this->printParsing(os);
894 bool debugThis=
false;
896 if(fsPS.size() < 4) fsPS.reserve(4);
897 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
900 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
902 if(0==PT || 0==fsPS[0]){
903 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3::parseTree" 904 <<
" Didn't find PT or V0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
908 for(
int i=0; i< PT->nDgtr(); i++){
911 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
913 if(0==V || 0==fsPS[1]){
914 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3::parseTree" 915 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
920 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3::parseTree" 921 <<
" V should have 2 daughters, but it says it has " 926 fsPS[2] = V->getDgtrTreePtr(0);
927 fsPS[3] = V->getDgtrTreePtr(1);
932 cout <<
"parsed Tree: V:\n" 937 for(
int i=0; i<4; i++){
938 cout <<
"fsPS[" << i <<
"]\n" 948 if(0==_exampleDecayP){
951 _exampleDecayP->addDgtr(443, 9000325)->addDgtr(211, 313)->addDgtr(321,-211);
953 return *_exampleDecayP;
957 return getExampleDecay();
961 if(0==_exampleDecayD){
964 _exampleDecayD->addDgtr(443, 9000325)->addDgtr(211, 313)->addDgtr(321,-211);
965 _exampleDecayD->getVal().setL(2);
967 return *_exampleDecayD;
971 return getExampleDecay();
979 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
981 double MT = mRes(PT,evt);
982 double MV = mRes(V,evt);
983 double MV0 = mRes(fsPS[0],evt);
986 TLorentzVector pV= p(2,evt)+p(3,evt);
987 TLorentzVector qV= p(2,evt)-p(3,evt);
988 TLorentzVector pT= pV+p(1,evt);
989 TLorentzVector qT= pV-p(1,evt);
990 TLorentzVector qB= pT-p(0,evt);
991 TLorentzVector pB= pT+p(0,evt);
1008 TLorentzVector tmp = PT.
Dot(ZV);
1009 if(tmp==TLorentzVector(0,0,0,0))
return 0.;
1017 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1018 os <<
"spin factor SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_P" 1019 <<
"\n\t e_c.Dot(ZT.Contract(ZV))" 1021 <<
"\n\t parsed tree " << theDecay().oneLiner()
1022 <<
"\n like this:" << endl;
1023 this->printParsing(os);
1030 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1032 double MT = mRes(PT,evt);
1033 double MV = mRes(V,evt);
1034 double MV0 = mRes(fsPS[0],evt);
1037 TLorentzVector pV= p(2,evt)+p(3,evt);
1038 TLorentzVector qV= p(2,evt)-p(3,evt);
1039 TLorentzVector pT= pV+p(1,evt);
1040 TLorentzVector qT= pV-p(1,evt);
1041 TLorentzVector pB= pT+p(0,evt);
1042 TLorentzVector qB= pT-p(0,evt);
1050 TLorentzVector tmp = ZT.
Contract(ZV);
1051 if(tmp==TLorentzVector(0,0,0,0))
return 0.;
1062 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1063 os <<
"spin factor SF_BtoPseudoTV0_PseudoTtoVP1_VtoP2P3_D" 1064 <<
"\n\t LeviCivita(e_c,ZT.Contract(ZV),pB,qB)" 1066 <<
"\n\t parsed tree " << theDecay().oneLiner()
1067 <<
"\n like this:" << endl;
1068 this->printParsing(os);
1076 bool debugThis=
false;
1078 if(fsPS.size() < 4) fsPS.reserve(4);
1079 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1082 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
1084 if(0==PT || 0==fsPS[0]){
1085 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3::parseTree" 1086 <<
" Didn't find PT or V0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
1090 for(
int i=0; i< PT->nDgtr(); i++){
1093 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1095 if(0==S || 0==fsPS[1]){
1096 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3::parseTree" 1097 <<
" Didn't find S or P1 " << S.
get() <<
", " << fsPS[1].get() << endl;
1101 if(S->nDgtr() != 2){
1102 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3::parseTree" 1103 <<
" S should have 2 daughters, but it says it has " 1104 << S->
nDgtr() <<
"." 1108 fsPS[2] = S->getDgtrTreePtr(0);
1109 fsPS[3] = S->getDgtrTreePtr(1);
1114 cout <<
"parsed Tree: S:\n" 1119 for(
int i=0; i<4; i++){
1120 cout <<
"fsPS[" << i <<
"]\n" 1130 if(0==_exampleDecayP){
1133 _exampleDecayP->addDgtr(443, 10325)->addDgtr(321, 9010221)->addDgtr(211,-211);
1135 return *_exampleDecayP;
1139 return getExampleDecay();
1145 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1147 double MT = mRes(PT,evt);
1148 double MV0 = mRes(fsPS[0],evt);
1151 TLorentzVector pT= p(2,evt)+p(3,evt)+p(1,evt);
1152 TLorentzVector qT= p(2,evt)+p(3,evt)-p(1,evt);
1153 TLorentzVector qB= pT-p(0,evt);
1154 TLorentzVector pB= pT+p(0,evt);
1166 complex<double> sfm(DT.
Sandwich(e.Re(),ZB,qT,qT),DT.
Sandwich(e.Im(),ZB,qT,qT));
1172 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1173 os <<
"spin factor SF_BtoPseudoTV0_PseudoTtoSP1_StoP2P3_P" 1174 <<
"\n\t e_c.Dot(ZT.Contract(qB))" 1176 <<
"\n\t parsed tree " << theDecay().oneLiner()
1177 <<
"\n like this:" << endl;
1178 this->printParsing(os);
1186 bool debugThis=
false;
1188 if(fsPS.size() < 4) fsPS.reserve(4);
1189 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1192 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
1194 if(0==PT || 0==fsPS[0]){
1195 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3::parseTree" 1196 <<
" Didn't find PT or V0 " << PT.
get() <<
", " << fsPS[0].get() << endl;
1200 for(
int i=0; i< PT->nDgtr(); i++){
1203 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1205 if(0==T || 0==fsPS[1]){
1206 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3::parseTree" 1207 <<
" Didn't find T or P1 " << T.
get() <<
", " << fsPS[1].get() << endl;
1211 if(T->nDgtr() != 2){
1212 cout <<
"ERROR in SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3::parseTree" 1213 <<
" T should have 2 daughters, but it says it has " 1214 << T->
nDgtr() <<
"." 1218 fsPS[2] = T->getDgtrTreePtr(0);
1219 fsPS[3] = T->getDgtrTreePtr(1);
1224 cout <<
"parsed Tree: T:\n" 1229 for(
int i=0; i<4; i++){
1230 cout <<
"fsPS[" << i <<
"]\n" 1240 if(0==_exampleDecayP){
1243 _exampleDecayP->addDgtr(443, 10325)->addDgtr(321, 225)->addDgtr(211,-211);
1245 return *_exampleDecayP;
1249 return getExampleDecay();
1255 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1257 double MPT = mRes(PT,evt);
1258 double MT = mRes(T,evt);
1259 double MV0 = mRes(fsPS[0],evt);
1261 TLorentzVector pT= p(2,evt)+p(3,evt);
1262 TLorentzVector qT= p(2,evt)-p(3,evt);
1263 TLorentzVector pPT= pT+p(1,evt);
1264 TLorentzVector qPT= pT-p(1,evt);
1265 TLorentzVector pB= pPT+p(0,evt);
1266 TLorentzVector qB= pPT-p(0,evt);
1284 complex<double> sf(D_PT.
Sandwich(e.Re(),Z_B,Z_1T,Z_1T)+1./3.*Z_1T.Mag2()/MT/MT * D_PT.
Sandwich(e.Re(),Z_B,pT,pT), D_PT.
Sandwich(e.Im(),Z_B,Z_1T,Z_1T)+1./3.*Z_1T.Mag2()/MT/MT * D_PT.
Sandwich(e.Im(),Z_B,pT,pT) );
1290 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1291 os <<
"spin factor SF_BtoPseudoTV0_PseudoTtoTP1_TtoP2P3_P" 1292 <<
"\n\t e_c.Dot(ZT.Contract(qB))" 1294 <<
"\n\t parsed tree " << theDecay().oneLiner()
1295 <<
"\n like this:" << endl;
1296 this->printParsing(os);
1306 bool debugThis=
false;
1308 if(fsPS.size() < 4) fsPS.reserve(4);
1309 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1312 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
1314 if(0==T || 0==fsPS[0]){
1315 cout <<
"ERROR in SF_BtoTV0_TtoVP1_VtoP2P3::parseTree" 1316 <<
" Didn't find T or V0 " << T.
get() <<
", " << fsPS[0].get() << endl;
1320 for(
int i=0; i< T->nDgtr(); i++){
1323 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1325 if(0==V || 0==fsPS[1]){
1326 cout <<
"ERROR in SF_BtoTV0_TtoVP1_VtoP2P3::parseTree" 1327 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
1331 if(V->nDgtr() != 2){
1332 cout <<
"ERROR in SF_SF_BtoTV0_TtoVP1_VtoP2P3::parseTree" 1333 <<
" V should have 2 daughters, but it says it has " 1334 << V->
nDgtr() <<
"." 1338 fsPS[2] = V->getDgtrTreePtr(0);
1339 fsPS[3] = V->getDgtrTreePtr(1);
1344 cout <<
"parsed Tree: V:\n" 1349 for(
int i=0; i<4; i++){
1350 cout <<
"fsPS[" << i <<
"]\n" 1360 if(0==_exampleDecayP){
1363 _exampleDecayP->addDgtr(443, 325)->addDgtr(211, 313)->addDgtr(321,-211);
1365 return *_exampleDecayP;
1369 return getExampleDecay();
1375 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1377 double MT = mRes(T,evt);
1378 double MV = mRes(V,evt);
1379 double MV0 = mRes(fsPS[0],evt);
1382 TLorentzVector pV= p(2,evt)+p(3,evt);
1383 TLorentzVector qV= p(2,evt)-p(3,evt);
1384 TLorentzVector pT= pV+p(1,evt);
1385 TLorentzVector qT= pV-p(1,evt);
1386 TLorentzVector pB= pT+p(0,evt);
1387 TLorentzVector qB= pT-p(0,evt);
1398 complex<double> sfm;
1400 TLorentzVector tmp0 = PT.
Dot(ZV);
1401 if(tmp0==TLorentzVector(0,0,0,0))
return 0.;
1403 TLorentzVector tmp1 = PT.
Dot(ZB);
1404 TLorentzVector tmp2_Re = Z_1T * Z_1T.Dot(e.
Re()) + 1./3. * Z_1T.Mag2() * PT.
Dot(e.
Re());
1405 TLorentzVector tmp2_Im = Z_1T * Z_1T.Dot(e.
Im()) + 1./3. * Z_1T.Mag2() * PT.
Dot(e.
Im());
1407 TLorentzVector tmp3_Re = PT.
Dot(e.
Re());
1408 TLorentzVector tmp3_Im = PT.
Dot(e.
Im());
1409 TLorentzVector tmp4 = Z_1T * Z_1T.Dot(ZB) + 1./3. * Z_1T.Mag2() * PT.
Dot(ZB);
1412 if(getPolarisation()==0)sfm=complex<double>(
LeviCivita(pT,tmp0,tmp1,tmp2_Re)+
LeviCivita(pT,tmp0,tmp4,tmp3_Re),0.);
1413 else sfm=complex<double>(
LeviCivita(pT,tmp0,tmp1,tmp2_Re)+
LeviCivita(pT,tmp0,tmp4,tmp3_Re),
LeviCivita(pT,tmp0,tmp1,tmp2_Im)+
LeviCivita(pT,tmp0,tmp4,tmp3_Im));
1430 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1431 os <<
"spin factor SF_BtoTV0_TtoVP1_VtoP2P3_P" 1432 <<
"\n\t LeviCivita(ZT.Contract(e_c),ZV,pB,qB)" 1434 <<
"\n\t parsed tree " << theDecay().oneLiner()
1435 <<
"\n like this:" << endl;
1436 this->printParsing(os);
1443 if(0==_exampleDecay){
1446 _exampleDecay->addDgtr(321, 100443)->addDgtr(443, 9981)->addDgtr(211,-211);
1448 return *_exampleDecay;
1452 return getExampleDecay();
1456 bool debugThis=
false;
1458 if(fsPS.size() < 4) fsPS.reserve(4);
1459 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1462 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1464 if(0==V || 0==fsPS[1]){
1465 cout <<
"ERROR in SF_BtoVP1_VtoV0S_StoP2P3::parseTree" 1466 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
1470 for(
int i=0; i< V->nDgtr(); i++){
1473 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
1475 if(0==S || 0==fsPS[0]){
1476 cout <<
"ERROR in SF_BtoVP1_VtoV0S_StoP2P3::parseTree" 1477 <<
" Didn't find S or V0 " << S.
get() <<
", " << fsPS[0].get() << endl;
1481 if(S->nDgtr() != 2){
1482 cout <<
"ERROR in SF_BtoVP1_VtoV0S_StoP2P3::parseTree" 1483 <<
" S should have 2 daughters, but it says it has " 1484 << S->
nDgtr() <<
"." 1488 fsPS[2] = S->getDgtrTreePtr(0);
1489 fsPS[3] = S->getDgtrTreePtr(1);
1494 cout <<
"parsed Tree: V:\n" 1499 for(
int i=0; i<4; i++){
1500 cout <<
"fsPS[" << i <<
"]\n" 1512 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1514 double MV = mRes(V,evt);
1515 double MV0 = mRes(fsPS[0],evt);
1517 TLorentzVector pV= p(0,evt)+p(2,evt)+p(3,evt);
1518 TLorentzVector qV= p(2,evt)+p(3,evt)-p(0,evt);
1519 TLorentzVector qB= p(1,evt)-pV;
1523 complex<double> sfm;
1524 double scale = (p(2,evt)+p(3,evt)).M2() - 4.*mRes(fsPS[3],evt)*mRes(fsPS[3],evt);
1528 complex<double> tmp(qB.Dot(e.
Re())*scale,qB.Dot(e.
Im())*scale);
1535 complex<double> tmp(Z.Dot(e.
Re()),Z.Dot(e.
Im()));
1544 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1545 os <<
"spin factor SF_BtoVP1_VtoV0S_StoP2P3" 1546 <<
"\n\t Z.Dot(e_c)" 1548 <<
"\n\t parsed tree " << theDecay().oneLiner()
1549 <<
"\n like this:" << endl;
1550 this->printParsing(os);
1561 if(0==_exampleDecay){
1564 _exampleDecay->addDgtr(321, 100443)->addDgtr(443, 113)->addDgtr(211,-211);
1566 return *_exampleDecay;
1570 return getExampleDecay();
1574 bool debugThis=
false;
1576 if(fsPS.size() < 4) fsPS.reserve(4);
1577 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1580 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1582 if(0==V1 || 0==fsPS[1]){
1583 cout <<
"ERROR in SF_BtoV1P1_V1toV2V0_V2toP2P3::parseTree" 1584 <<
" Didn't find V1 or P1 " << V1.
get() <<
", " << fsPS[1].get() << endl;
1588 for(
int i=0; i< V1->nDgtr(); i++){
1593 if(0==V2 || 0==fsPS[0]){
1594 cout <<
"ERROR in SF_BtoV1P1_V1toV2V0_V2toP2P3::parseTree" 1595 <<
" Didn't find V2 or V0 " << V2.
get() <<
", " << fsPS[0].get() << endl;
1599 if(V2->nDgtr() != 2){
1600 cout <<
"ERROR in SF_BtoV1P1_V1toV2V0_V2toP2P3::parseTree" 1601 <<
" V2 should have 2 daughters, but it says it has " 1602 << V2->
nDgtr() <<
"." 1606 fsPS[2] = V2->getDgtrTreePtr(0);
1607 fsPS[3] = V2->getDgtrTreePtr(1);
1612 cout <<
"parsed Tree: V1:\n" 1617 for(
int i=0; i<4; i++){
1618 cout <<
"fsPS[" << i <<
"]\n" 1630 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1632 double MV1 = mRes(V1,evt);
1633 double MV2 = mRes(V2,evt);
1634 double MV0 = mRes(fsPS[0],evt);
1637 TLorentzVector pV2= p(2,evt)+p(3,evt);
1638 TLorentzVector qV2= p(2,evt)-p(3,evt);
1639 TLorentzVector pV1= p(0,evt)+pV2;
1640 TLorentzVector qV1= pV2-p(0,evt);
1641 TLorentzVector qB= pV1-p(1,evt);
1642 TLorentzVector pB= pV1+p(1,evt);
1652 complex<double> sf(Z2.Dot(e.
Re()),Z2.Dot(e.
Im()));
1655 else if(getLS_S()==1){
1657 TLorentzVector tmp= PV1.
Dot(ZB);
1658 complex<double> sf(tmp.Dot(Z2)*Z1.Dot(e.
Re())-tmp.Dot(e.
Re())*Z1.Dot(Z2),tmp.Dot(Z2)*Z1.Dot(e.
Im())-tmp.Dot(e.
Im())*Z1.Dot(Z2));
1664 TLorentzVector tmp= PV1.
Dot(ZB);
1673 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1674 os <<
"spin factor SF_BtoV1P1_V1toV2V0_V2toP2P3" 1675 <<
"\n\t parsed tree " << theDecay().oneLiner()
1676 <<
"\n like this:" << endl;
1677 this->printParsing(os);
1686 if(0==_exampleDecay){
1689 _exampleDecay->addDgtr(321, 9983)->addDgtr(443, 113)->addDgtr(211,-211);
1691 return *_exampleDecay;
1695 return getExampleDecay();
1699 bool debugThis=
false;
1701 if(fsPS.size() < 4) fsPS.reserve(4);
1702 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1705 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1707 if(0==A || 0==fsPS[1]){
1708 cout <<
"ERROR in SF_BtoAP1_AtoVV0_VtoP2P3::parseTree" 1709 <<
" Didn't find A or P1 " << A.
get() <<
", " << fsPS[1].get() << endl;
1713 for(
int i=0; i< A->nDgtr(); i++){
1718 if(0==V || 0==fsPS[0]){
1719 cout <<
"ERROR in SF_BtoAP1_AtoVV0_VtoP2P3::parseTree" 1720 <<
" Didn't find V or V0 " << V.
get() <<
", " << fsPS[0].get() << endl;
1724 if(V->nDgtr() != 2){
1725 cout <<
"ERROR in SF_BtoAP1_AtoVV0_VtoP2P3::parseTree" 1726 <<
" V should have 2 daughters, but it says it has " 1727 << V->
nDgtr() <<
"." 1731 fsPS[2] = V->getDgtrTreePtr(0);
1732 fsPS[3] = V->getDgtrTreePtr(1);
1737 cout <<
"parsed Tree: A:\n" 1742 for(
int i=0; i<4; i++){
1743 cout <<
"fsPS[" << i <<
"]\n" 1755 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1757 double MA = mRes(A,evt);
1758 double MV = mRes(V,evt);
1759 double MV0 = mRes(fsPS[0],evt);
1762 TLorentzVector pV= p(2,evt)+p(3,evt);
1763 TLorentzVector qV= p(2,evt)-p(3,evt);
1764 TLorentzVector pA= p(0,evt)+pV;
1766 TLorentzVector qB= pA-p(1,evt);
1767 TLorentzVector pB= pA+p(1,evt);
1771 complex<double> sfm;
1772 double scale = (p(2,evt)+p(3,evt)).M2() - 4.*mRes(fsPS[3],evt)*mRes(fsPS[3],evt);
1776 complex<double> tmp(qB.Dot(e.
Re())*scale,qB.Dot(e.
Im())*scale);
1788 if(getPolarisation()==0)sfm=complex<double>(
LeviCivita(e.
Re(),PA.
Dot(ZB),ZV,pB),0.);
1799 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1800 os <<
"spin factor SF_BtoAP1_AtoVV0_VtoP2P3" 1801 <<
"\n\t parsed tree " << theDecay().oneLiner()
1802 <<
"\n like this:" << endl;
1803 this->printParsing(os);
1811 bool debugThis=
false;
1813 if(fsPS.size() < 4) fsPS.reserve(4);
1814 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1820 cout <<
"ERROR in SF_BtoV1V2_V1toP1V0_V2toP2P3::parseTree" 1821 <<
" Didn't find V1 or V2 " << V1.
get() <<
", " << V2.get() << endl;
1825 if(V1->nDgtr() != 2){
1826 cout <<
"ERROR in SF_BtoV1V2_V1toP1V0_V2toP2P3::parseTree" 1827 <<
" V1 should have 2 daughters, but it says it has " 1828 << V1->
nDgtr() <<
"." 1832 if(V2->nDgtr() != 2){
1833 cout <<
"ERROR in SF_BtoV1V2_V1toP1V0_V2toP2P3::parseTree" 1834 <<
" V2 should have 2 daughters, but it says it has " 1835 << V2->nDgtr() <<
"." 1840 for(
int i=0; i< V1->nDgtr(); i++){
1843 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1846 if(0==fsPS[0] || 0==fsPS[1]){
1847 cout <<
"ERROR in SF_BtoV1V2_V1toP1V0_V2toP2P3::parseTree" 1848 <<
" Didn't find V0 or P1 " << fsPS[0].
get() <<
", " << fsPS[1].get() << endl;
1852 fsPS[3] = V2->getDgtrTreePtr(1);
1856 cout <<
"parsed Tree: V1:\n" 1861 for(
int i=0; i<4; i++){
1862 cout <<
"fsPS[" << i <<
"]\n" 1872 if(0==_exampleDecay){
1879 _exampleDecay->addDgtr(&Z);
1880 _exampleDecay->addDgtr(&Ks);
1882 return *_exampleDecay;
1886 return getExampleDecay();
1892 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
1894 double MV1 = mRes(V1, evt);
1895 double MV2 = mRes(V2, evt);
1896 double MV0 = mRes(fsPS[0], evt);
1899 TLorentzVector pV2= p(2, evt)+p(3, evt);
1900 TLorentzVector qV2= p(2, evt)-p(3, evt);
1901 TLorentzVector pV1= p(1, evt)+p(0, evt);
1902 TLorentzVector qV1= p(1, evt)-p(0, evt);
1912 TLorentzVector tmp= PV1.
Dot(ZV2);
1917 complex<double> sfm;
1918 if(getPolarisation()==0)sfm=complex<double>(
LeviCivita(tmp,ZV1,pV1,PV1.
Dot(e.
Re())),0.);
1925 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
1926 os <<
"spin factor SF_BtoV1V2_V1toP1V0_V2toP2P3" 1927 <<
"\n\t parsed tree " << theDecay().oneLiner()
1928 <<
"\n like this:" << endl;
1929 this->printParsing(os);
1937 bool debugThis=
false;
1939 if(fsPS.size() < 4) fsPS.reserve(4);
1940 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
1946 cout <<
"ERROR in SF_BtoAV_AtoP1V0_VtoP2P3::parseTree" 1947 <<
" Didn't find A or V " << A.
get() <<
", " << V.get() << endl;
1951 if(V->nDgtr() != 2){
1952 cout <<
"ERROR in SF_BtoAV_AtoP1V0_VtoP2P3::parseTree" 1953 <<
" V should have 2 daughters, but it says it has " 1954 << V->
nDgtr() <<
"." 1958 if(A->nDgtr() != 2){
1959 cout <<
"ERROR in SF_BtoAV_AtoP1V0_VtoP2P3::parseTree" 1960 <<
" A should have 2 daughters, but it says it has " 1961 << A->nDgtr() <<
"." 1966 for(
int i=0; i< A->nDgtr(); i++){
1969 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
1972 if(0==fsPS[0] || 0==fsPS[1]){
1973 cout <<
"ERROR in SF_BtoAV_AtoP1V0_VtoP2P3::parseTree" 1974 <<
" Didn't find V0 or P1 " << fsPS[0].
get() <<
", " << fsPS[1].get() << endl;
1978 fsPS[3] = V->getDgtrTreePtr(1);
1982 cout <<
"parsed Tree: V:\n" 1987 for(
int i=0; i<4; i++){
1988 cout <<
"fsPS[" << i <<
"]\n" 1999 if(0==_exampleDecay){
2006 _exampleDecay->addDgtr(&Ks);
2007 _exampleDecay->addDgtr(&Z);
2009 return *_exampleDecay;
2013 return getExampleDecay();
2019 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2021 double MA = mRes(A, evt);
2022 double MV = mRes(V, evt);
2023 double MV0 = mRes(fsPS[0], evt);
2026 TLorentzVector pV= p(2, evt)+p(3, evt);
2027 TLorentzVector qV= p(2, evt)-p(3, evt);
2028 TLorentzVector pA= p(0, evt)+p(1, evt);
2043 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2044 os <<
"spin factor SF_BtoAV_AtoP1V0_VtoP2P3" 2045 <<
"\n\t parsed tree " << theDecay().oneLiner()
2046 <<
"\n like this:" << endl;
2047 this->printParsing(os);
2051 if(0==_exampleDecayP){
2058 _exampleDecayP->addDgtr(&Ks);
2059 _exampleDecayP->addDgtr(&Z);
2060 _exampleDecayP->getVal().setL(1);
2063 return *_exampleDecayP;
2067 return getExampleDecay();
2071 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2073 double MA = mRes(A, evt);
2074 double MV = mRes(V, evt);
2075 double MV0 = mRes(fsPS[0], evt);
2077 TLorentzVector pV= p(2, evt)+p(3, evt);
2078 TLorentzVector qV= p(2, evt)-p(3, evt);
2079 TLorentzVector pA= p(0, evt)+p(1, evt);
2080 TLorentzVector pB= pA+pV;
2081 TLorentzVector qB= pA-pV;
2095 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2096 os <<
"spin factor SF_BtoAV_AtoP1V0_VtoP2P3_P" 2097 <<
"\n\t parsed tree " << theDecay().oneLiner()
2098 <<
"\n like this:" << endl;
2099 this->printParsing(os);
2103 if(0==_exampleDecayD){
2110 _exampleDecayD->addDgtr(&Ks);
2111 _exampleDecayD->addDgtr(&Z);
2112 _exampleDecayD->getVal().setL(2);
2115 return *_exampleDecayD;
2119 return getExampleDecay();
2123 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2125 double MA = mRes(A, evt);
2126 double MV = mRes(V, evt);
2127 double MV0 = mRes(fsPS[0], evt);
2129 TLorentzVector pV= p(2, evt)+p(3, evt);
2130 TLorentzVector qV= p(2, evt)-p(3, evt);
2131 TLorentzVector pA= p(0, evt)+p(1, evt);
2132 TLorentzVector pB= pA+pV;
2133 TLorentzVector qB= pA-pV;
2143 complex<double> sfm(LB.Dot(PA.
Dot(e.
Re())) * LB.Dot(LV) + 1./3. * LB.Dot(LB) * PB.Dot(e.
Re())*LV,
2144 LB.Dot(PA.
Dot(e.
Im())) * LB.Dot(LV) + 1./3. * LB.Dot(LB) * PB.Dot(e.
Im())*LV);
2149 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2150 os <<
"spin factor SF_BtoAV_AtoP1V0_VtoP2P3_D" 2151 <<
"\n\t parsed tree " << theDecay().oneLiner()
2152 <<
"\n like this:" << endl;
2153 this->printParsing(os);
2160 bool debugThis=
false;
2162 if(fsPS.size() < 4) fsPS.reserve(4);
2163 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2169 cout <<
"ERROR in SF_BtoAS_AtoP1V0_StoP2P3::parseTree" 2170 <<
" Didn't find A or S " << A.
get() <<
", " << S.get() << endl;
2174 if(A->nDgtr() != 2){
2175 cout <<
"ERROR in SF_BtoAS_AtoP1V0_StoP2P3::parseTree" 2176 <<
" A should have 2 daughters, but it says it has " 2177 << A->
nDgtr() <<
"." 2181 if(S->nDgtr() != 2){
2182 cout <<
"ERROR in SF_BtoAS_AtoP1V0_StoP2P3::parseTree" 2183 <<
" S should have 2 daughters, but it says it has " 2184 << S->nDgtr() <<
"." 2189 for(
int i=0; i< A->nDgtr(); i++){
2192 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2195 if(0==fsPS[0] || 0==fsPS[1]){
2196 cout <<
"ERROR in SF_BtoAS_AtoP1V0_StoP2P3::parseTree" 2197 <<
" Didn't find V0 or P1 " << fsPS[0].
get() <<
", " << fsPS[1].get() << endl;
2201 fsPS[3] = S->getDgtrTreePtr(1);
2205 cout <<
"parsed Tree: A:\n" 2210 for(
int i=0; i<4; i++){
2211 cout <<
"fsPS[" << i <<
"]\n" 2222 if(0==_exampleDecay){
2229 _exampleDecay->addDgtr(&K);
2230 _exampleDecay->addDgtr(&Z);
2232 return *_exampleDecay;
2236 return getExampleDecay();
2242 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2244 double MA = mRes(A, evt);
2245 double MV0 = mRes(fsPS[0], evt);
2247 TLorentzVector pA= p(0, evt)+p(1, evt);
2248 TLorentzVector qA= p(1, evt)-p(0, evt);
2254 complex<double> sfm(Z.Dot(e.
Re()),Z.Dot(e.
Im()));
2261 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2262 os <<
"spin factor SF_BtoAS_AtoP1V0_StoP2P3" 2263 <<
"\n\t parsed tree " << theDecay().oneLiner()
2264 <<
"\n like this:" << endl;
2265 this->printParsing(os);
2272 bool debugThis=
false;
2274 if(fsPS.size() < 4) fsPS.reserve(4);
2275 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2281 cout <<
"ERROR in SF_BtoPS_PtoP1V0_StoP2P3::parseTree" 2282 <<
" Didn't find P or S " << P.
get() <<
", " << S.get() << endl;
2286 if(P->nDgtr() != 2){
2287 cout <<
"ERROR in SF_BtoPS_PtoP1V0_StoP2P3::parseTree" 2288 <<
" P should have 2 daughters, but it says it has " 2289 << P->
nDgtr() <<
"." 2293 if(S->nDgtr() != 2){
2294 cout <<
"ERROR in SF_BtoPS_PtoP1V0_StoP2P3::parseTree" 2295 <<
" S should have 2 daughters, but it says it has " 2296 << S->nDgtr() <<
"." 2301 for(
int i=0; i< P->nDgtr(); i++){
2304 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2307 if(0==fsPS[0] || 0==fsPS[1]){
2308 cout <<
"ERROR in SF_BtoPS_PtoP1V0_StoP2P3::parseTree" 2309 <<
" Didn't find V0 or P1 " << fsPS[0].
get() <<
", " << fsPS[1].get() << endl;
2313 fsPS[3] = S->getDgtrTreePtr(1);
2317 cout <<
"parsed Tree: P:\n" 2322 for(
int i=0; i<4; i++){
2323 cout <<
"fsPS[" << i <<
"]\n" 2334 if(0==_exampleDecay){
2341 _exampleDecay->addDgtr(&P);
2342 _exampleDecay->addDgtr(&S);
2344 return *_exampleDecay;
2348 return getExampleDecay();
2354 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2356 double M = mRes(P, evt);
2357 double MV0 = mRes(fsPS[0], evt);
2359 TLorentzVector pP= p(0, evt)+p(1, evt);
2360 TLorentzVector qP= p(1, evt)-p(0, evt);
2366 complex<double> sfm(Z.Dot(e.
Re()),Z.Dot(e.
Im()));
2373 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2374 os <<
"spin factor SF_BtoPS_PtoP1V0_StoP2P3" 2375 <<
"\n\t parsed tree " << theDecay().oneLiner()
2376 <<
"\n like this:" << endl;
2377 this->printParsing(os);
2384 bool debugThis=
false;
2386 if(fsPS.size() < 4) fsPS.reserve(4);
2387 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2393 cout <<
"ERROR in SF_BtoPV_PtoP1V0_VtoP2P3::parseTree" 2394 <<
" Didn't find P or S " << P.
get() <<
", " << V.get() << endl;
2398 if(P->nDgtr() != 2){
2399 cout <<
"ERROR in SF_BtoPV_PtoP1V0_VtoP2P3::parseTree" 2400 <<
" P should have 2 daughters, but it says it has " 2401 << P->
nDgtr() <<
"." 2405 if(V->nDgtr() != 2){
2406 cout <<
"ERROR in SF_BtoPV_PtoP1V0_VtoP2P3::parseTree" 2407 <<
" V should have 2 daughters, but it says it has " 2408 << V->nDgtr() <<
"." 2413 for(
int i=0; i< P->nDgtr(); i++){
2416 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2419 if(0==fsPS[0] || 0==fsPS[1]){
2420 cout <<
"ERROR in SF_BtoPV_PtoP1V0_VtoP2P3::parseTree" 2421 <<
" Didn't find V0 or P1 " << fsPS[0].
get() <<
", " << fsPS[1].get() << endl;
2425 fsPS[3] = V->getDgtrTreePtr(1);
2429 cout <<
"parsed Tree: P:\n" 2434 for(
int i=0; i<4; i++){
2435 cout <<
"fsPS[" << i <<
"]\n" 2446 if(0==_exampleDecay){
2453 _exampleDecay->addDgtr(&P);
2454 _exampleDecay->addDgtr(&V);
2456 return *_exampleDecay;
2460 return getExampleDecay();
2466 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2468 double MP = mRes(P, evt);
2469 double MV = mRes(V, evt);
2470 double MV0 = mRes(fsPS[0], evt);
2472 TLorentzVector pP= p(1, evt)+p(0, evt);
2473 TLorentzVector qP= p(1, evt)-p(0, evt);
2474 TLorentzVector pV= p(2, evt)+p(3, evt);
2475 TLorentzVector qV= p(2, evt)-p(3, evt);
2476 TLorentzVector pB= pP+pV;
2477 TLorentzVector qB= pP-pV;
2486 double tmp= ZB.Dot(ZV);
2487 complex<double> sf(ZP.Dot(e.
Re()),ZP.Dot(e.
Im()));
2496 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2497 os <<
"spin factor SF_BtoPV_PtoP1V0_VtoP2P3" 2498 <<
"\n\t parsed tree " << theDecay().oneLiner()
2499 <<
"\n like this:" << endl;
2500 this->printParsing(os);
2508 bool debugThis=
false;
2510 if(fsPS.size() < 4) fsPS.reserve(4);
2511 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2514 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;;
2516 if(0==P || 0==fsPS[0]){
2517 cout <<
"ERROR in SF_BtoPV0_PtoS_StoP2P3::parseTree" 2518 <<
" Didn't find P or V0 " << P.
get() <<
", " << fsPS[0].get() << endl;
2523 if(P->nDgtr() != 2){
2524 cout <<
"ERROR in SF_BtoPV0_PtoS_StoP2P3::parseTree" 2525 <<
" P should have 2 daughters, but it says it has " 2526 << P->
nDgtr() <<
"." 2531 for(
int i=0; i< P->nDgtr(); i++){
2534 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2537 if(S->nDgtr() != 2){
2538 cout <<
"ERROR in SF_BtoPV0_PtoS_StoP2P3::parseTree" 2539 <<
" S should have 2 daughters, but it says it has " 2540 << S->
nDgtr() <<
"." 2545 fsPS[2] = S->getDgtrTreePtr(0);
2546 fsPS[3] = S->getDgtrTreePtr(1);
2550 cout <<
"parsed Tree: P:\n" 2555 for(
int i=0; i<4; i++){
2556 cout <<
"fsPS[" << i <<
"]\n" 2567 if(0==_exampleDecay){
2570 _exampleDecay->addDgtr(443, 9991)->addDgtr(321,9981)->addDgtr(211,-211);
2572 return *_exampleDecay;
2576 return getExampleDecay();
2582 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2584 double MV0 = mRes(fsPS[0], evt);
2586 TLorentzVector pP= p(1, evt)+p(2, evt)+p(3,evt);
2587 TLorentzVector pB=pP+p(0,evt);
2588 TLorentzVector qB=pP-p(0,evt);
2597 complex<double> sfm(ZB.Dot(e.
Re()),ZB.Dot(e.
Im()));
2603 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2604 os <<
"spin factor SF_BtoPV0_PtoS_StoP2P3" 2605 <<
"\n\t parsed tree " << theDecay().oneLiner()
2606 <<
"\n like this:" << endl;
2607 this->printParsing(os);
2616 bool debugThis=
false;
2618 if(fsPS.size() < 4) fsPS.reserve(4);
2619 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2622 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2624 if(0==V || 0==fsPS[1]){
2625 cout <<
"ERROR in SF_BtoVP1_VtoAP2_AtoV0P3::parseTree" 2626 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
2630 for(
int i=0; i< V->nDgtr(); i++){
2633 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[2] = dgtr;
2635 if(0==A || 0==fsPS[2]){
2636 cout <<
"ERROR in SF_BtoVP1_VtoAP2_AtoV0P3::parseTree" 2637 <<
" Didn't find A or P2 " << A.
get() <<
", " << fsPS[2].get() << endl;
2641 if(A->nDgtr() != 2){
2642 cout <<
"ERROR in SF_BtoVP1_VtoAP2_AtoV0P3::parseTree" 2643 <<
" A should have 2 daughters, but it says it has " 2644 << A->
nDgtr() <<
"." 2649 for(
int i=0; i< A->nDgtr(); i++){
2652 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[3] = dgtr;
2656 cout <<
"parsed Tree: V:\n" 2661 for(
int i=0; i<4; i++){
2662 cout <<
"fsPS[" << i <<
"]\n" 2672 if(0==_exampleDecay){
2675 _exampleDecay->addDgtr(321, 9999992)->addDgtr(211, 9999993)->addDgtr(443,-211);
2677 return *_exampleDecay;
2681 return getExampleDecay();
2687 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2689 double MA = mRes(A, evt);
2690 double MV = mRes(V, evt);
2691 double MV0 = mRes(fsPS[0], evt);
2694 TLorentzVector pA= p(0,evt)+p(3, evt);
2696 TLorentzVector pV= pA+p(2, evt);
2698 TLorentzVector pB= pV+p(1, evt);
2699 TLorentzVector qB= pV-p(1, evt);
2715 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2716 os <<
"spin factor SF_BtoVP1_VtoAP2_AtoV0P3" 2717 <<
"\n\t parsed tree " << theDecay().oneLiner()
2718 <<
"\n like this:" << endl;
2719 this->printParsing(os);
2727 bool debugThis=
false;
2729 if(fsPS.size() < 4) fsPS.reserve(4);
2730 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2733 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2735 if(0==V || 0==fsPS[1]){
2736 cout <<
"ERROR in SF_BtoVP1_VtoSV0_StoP2P3::parseTree" 2737 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
2741 for(
int i=0; i< V->nDgtr(); i++){
2744 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;
2746 if(0==S || 0==fsPS[0]){
2747 cout <<
"ERROR in SF_BtoVP1_VtoSV0_StoP2P3::parseTree" 2748 <<
" Didn't find S or V0 " << S.
get() <<
", " << fsPS[0].get() << endl;
2752 if(S->nDgtr() != 2){
2753 cout <<
"ERROR in SF_BtoVP1_VtoSV0_StoP2P3::parseTree" 2754 <<
" S should have 2 daughters, but it says it has " 2755 << S->
nDgtr() <<
"." 2760 fsPS[2] = S->getDgtrTreePtr(0);
2761 fsPS[3] = S->getDgtrTreePtr(1);
2764 cout <<
"parsed Tree: V:\n" 2769 for(
int i=0; i<4; i++){
2770 cout <<
"fsPS[" << i <<
"]\n" 2780 if(0==_exampleDecay){
2783 _exampleDecay->addDgtr(321, 9999992)->addDgtr(443, 9010221)->addDgtr(211,-211);
2785 return *_exampleDecay;
2789 return getExampleDecay();
2795 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2797 double MV = mRes(V, evt);
2798 double MV0 = mRes(fsPS[0], evt);
2802 TLorentzVector pV= p(0,evt)+p(2,evt)+p(3, evt);
2804 TLorentzVector pB= pV+p(1, evt);
2805 TLorentzVector qB= pV-p(1, evt);
2813 complex<double> sfm(PV.Sandwich(e.
Re(),ZB),PV.Sandwich(e.
Im(),ZB));
2820 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2821 os <<
"spin factor SF_BtoVP1_VtoSV0_StoP2P3" 2822 <<
"\n\t parsed tree " << theDecay().oneLiner()
2823 <<
"\n like this:" << endl;
2824 this->printParsing(os);
2833 bool debugThis=
false;
2835 if(fsPS.size() < 4) fsPS.reserve(4);
2836 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2839 else if(dgtr->
getVal().
SVPAT() ==
"V") fsPS[0] = dgtr;;
2841 if(0==P || 0==fsPS[0]){
2842 cout <<
"ERROR in SF_BtoPV0_PtoP1V1_V1toP2P3::parseTree" 2843 <<
" Didn't find P or V0 " << P.
get() <<
", " << fsPS[0].get() << endl;
2848 if(P->nDgtr() != 2){
2849 cout <<
"ERROR in SF_BtoPV0_PtoP1V1_V1toP2P3::parseTree" 2850 <<
" P should have 2 daughters, but it says it has " 2851 << P->
nDgtr() <<
"." 2856 for(
int i=0; i< P->nDgtr(); i++){
2859 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;
2862 if(V->nDgtr() != 2){
2863 cout <<
"ERROR in SF_BtoPV0_PtoP1V1_V1toP2P3::parseTree" 2864 <<
" V should have 2 daughters, but it says it has " 2865 << V->
nDgtr() <<
"." 2870 fsPS[2] = V->getDgtrTreePtr(0);
2871 fsPS[3] = V->getDgtrTreePtr(1);
2875 cout <<
"parsed Tree: P:\n" 2880 for(
int i=0; i<4; i++){
2881 cout <<
"fsPS[" << i <<
"]\n" 2892 if(0==_exampleDecay){
2895 _exampleDecay->addDgtr(443, 100321)->addDgtr(321,213)->addDgtr(211,-211);
2897 return *_exampleDecay;
2901 return getExampleDecay();
2905 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
2907 double MV0 = mRes(fsPS[0], evt);
2909 TLorentzVector pP= p(1, evt)+p(2, evt)+p(3,evt);
2910 TLorentzVector qP= p(1, evt)-p(2, evt)-p(3,evt);
2913 TLorentzVector pB=pP+p(0,evt);
2914 TLorentzVector qB=pP-p(0,evt);
2917 TLorentzVector pV= p(2, evt)+p(3,evt);
2918 TLorentzVector qV= p(2, evt)-p(3,evt);
2924 double tmp = ZP.Dot(ZV);
2926 complex<double> sfm(ZB.Dot(e.Re()),ZB.Dot(e.Im()));
2930 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
2931 os <<
"spin factor SF_BtoPV0_PtoP1V1_V1toP2P3" 2932 <<
"\n\t parsed tree " << theDecay().oneLiner()
2933 <<
"\n like this:" << endl;
2934 this->printParsing(os);
2940 bool debugThis=
false;
2942 if(fsPS.size() < 4) fsPS.reserve(4);
2943 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
2946 else if(dgtr->
getVal().
SVPAT() ==
"P") fsPS[1] = dgtr;;
2948 if(0==S || 0==fsPS[1]){
2949 cout <<
"ERROR in SF_BtoSP1_StoVV0_VtoP2P3::parseTree" 2950 <<
" Didn't find S or P1 " << S.
get() <<
", " << fsPS[1].get() << endl;
2954 if(S->nDgtr() != 2){
2955 cout <<
"ERROR in SF_BtoSP1_StoVV0_VtoP2P3::parseTree" 2956 <<
" S should have 2 daughters, but it says it has " 2957 << S->
nDgtr() <<
"." 2962 for(
int i=0; i< S->nDgtr(); i++){
2968 if(V->nDgtr() != 2){
2969 cout <<
"ERROR in SF_BtoSP1_StoVV0_VtoP2P3::parseTree" 2970 <<
" V should have 2 daughters, but it says it has " 2971 << V->
nDgtr() <<
"." 2976 fsPS[2] = V->getDgtrTreePtr(0);
2977 fsPS[3] = V->getDgtrTreePtr(1);
2981 cout <<
"parsed Tree: S:\n" 2986 for(
int i=0; i<4; i++){
2987 cout <<
"fsPS[" << i <<
"]\n" 2997 if(0==_exampleDecay){
3000 _exampleDecay->addDgtr(321, 9010221)->addDgtr(443,213)->addDgtr(211,-211);
3002 return *_exampleDecay;
3006 return getExampleDecay();
3010 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
3012 double MV0 = mRes(fsPS[0], evt);
3013 TLorentzVector pV= p(2, evt)+p(3,evt);
3014 TLorentzVector qV= p(2, evt)-p(3,evt);
3020 complex<double> sfm(LV.Dot(e.Re()),LV.Dot(e.Im()));
3024 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
3025 os <<
"spin factor SF_BtoSP1_StoVV0_VtoP2P3" 3026 <<
"\n\t parsed tree " << theDecay().oneLiner()
3027 <<
"\n like this:" << endl;
3028 this->printParsing(os);
3034 bool debugThis=
false;
3036 if(fsPS.size() < 4) fsPS.reserve(4);
3037 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
3042 if(0==P || 0==fsPS[1]){
3043 cout <<
"ERROR in SF_BtoPP1_PtoVV0_VtoP2P3::parseTree" 3044 <<
" Didn't find P or P1 " << P.
get() <<
", " << fsPS[1].get() << endl;
3048 if(P->nDgtr() != 2){
3049 cout <<
"ERROR in SF_BtoPP1_PtoVV0_VtoP2P3::parseTree" 3050 <<
" P should have 2 daughters, but it says it has " 3051 << P->
nDgtr() <<
"." 3056 for(
int i=0; i< P->nDgtr(); i++){
3062 if(V->nDgtr() != 2){
3063 cout <<
"ERROR in SF_BtoPP1_PtoVV0_VtoP2P3::parseTree" 3064 <<
" V should have 2 daughters, but it says it has " 3065 << V->
nDgtr() <<
"." 3070 fsPS[2] = V->getDgtrTreePtr(0);
3071 fsPS[3] = V->getDgtrTreePtr(1);
3075 cout <<
"parsed Tree: P:\n" 3080 for(
int i=0; i<4; i++){
3081 cout <<
"fsPS[" << i <<
"]\n" 3091 if(0==_exampleDecay){
3094 _exampleDecay->addDgtr(321, 331)->addDgtr(443,213)->addDgtr(211,-211);
3096 return *_exampleDecay;
3100 return getExampleDecay();
3104 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
3106 double MV0 = mRes(fsPS[0], evt);
3107 TLorentzVector pV= p(2, evt)+p(3,evt);
3108 TLorentzVector qV= p(2, evt)-p(3,evt);
3111 TLorentzVector pP= pV+p(0,evt);
3112 TLorentzVector qP= pV-p(0, evt);
3122 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
3123 os <<
"spin factor SF_BtoPP1_PtoVV0_VtoP2P3" 3124 <<
"\n\t parsed tree " << theDecay().oneLiner()
3125 <<
"\n like this:" << endl;
3131 bool debugThis=
false;
3133 if(fsPS.size() < 4) fsPS.reserve(4);
3134 for(
int i=0; i< theDecay(pat).nDgtr(); i++){
3139 if(0== V || 0==fsPS[1]){
3140 cout <<
"ERROR in SF_BtoVP1_VtoTV0_TtoP2P3::parseTree" 3141 <<
" Didn't find V or P1 " << V.
get() <<
", " << fsPS[1].get() << endl;
3145 if(V->nDgtr() != 2){
3146 cout <<
"ERROR in SF_BtoVP1_VtoTV0_TtoP2P3::parseTree" 3147 <<
" V should have 2 daughters, but it says it has " 3148 << V->
nDgtr() <<
"." 3153 for(
int i=0; i< V->nDgtr(); i++){
3159 if(T->nDgtr() != 2){
3160 cout <<
"ERROR in SF_BtoVP1_VtoTV0_TtoP2P3::parseTree" 3161 <<
" T should have 2 daughters, but it says it has " 3162 << T->
nDgtr() <<
"." 3167 fsPS[2] = T->getDgtrTreePtr(0);
3168 fsPS[3] = T->getDgtrTreePtr(1);
3172 cout <<
"parsed Tree: V:\n" 3177 for(
int i=0; i<4; i++){
3178 cout <<
"fsPS[" << i <<
"]\n" 3188 if(0==_exampleDecay){
3191 _exampleDecay->addDgtr(321, 100443)->addDgtr(443,225)->addDgtr(211,-211);
3193 return *_exampleDecay;
3197 return getExampleDecay();
3201 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.
eventPattern());
3203 double MV0 = mRes(fsPS[0], evt);
3204 TLorentzVector pT= p(2, evt)+p(3,evt);
3205 TLorentzVector qT= p(2, evt)-p(3,evt);
3206 TLorentzVector pV= pT+p(0,evt);
3207 TLorentzVector qV= pT-p(0,evt);
3208 TLorentzVector pB= pV+p(1,evt);
3209 TLorentzVector qB= pV-p(1,evt);
3219 TLorentzVector tmp = PV.Dot(LB);
3221 complex<double> sfm( LT.Dot(tmp) * LT.Dot(e.Re()) + 1./3. * LT.Dot(LT) * (PT.Dot(tmp)).Dot(e.Re()), LT.Dot(tmp) * LT.Dot(e.Im()) + 1./3. * LT.Dot(LT) * (PT.Dot(tmp)).Dot(e.Im()));
3225 if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) )
return;
3226 os <<
"spin factor SF_BtoVP1_VtoTV0_TtoP2P3" 3227 <<
"\n\t parsed tree " << theDecay().oneLiner()
3228 <<
"\n like this:" << endl;
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecayD
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual bool parseTree(const DalitzEventPattern &pat)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
static DecayTree * _exampleDecayP
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
virtual bool parseTree(const DalitzEventPattern &pat)
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
virtual bool parseTree(const DalitzEventPattern &pat)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
std::string SVPAT() const
TLorentzVector Dot(const TLorentzVector &rhs) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
double Sandwich(const TLorentzVector &lhs, const TLorentzVector &rhs) const
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecayD
virtual bool parseTree(const DalitzEventPattern &pat)
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
static DecayTree * _exampleDecayD
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
const TLorentzVector & Re() const
static const DecayTree & getExampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual const DecayTree & exampleDecay()
const ValueType & getVal() const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
static DecayTree * _exampleDecayDwaveP
virtual const DecayTree & exampleDecay()
static DecayTree * _exampleDecay
static DecayTree * _exampleDecay
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual const DecayTree & exampleDecay()
bool isFinalState() const
static const DecayTree & getExampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
static DecayTree * _exampleDecay
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecayP
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual const DecayTree & exampleDecay()
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual const DalitzEventPattern & eventPattern() const =0
virtual bool parseTree(const DalitzEventPattern &pat)
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual bool parseTree(const DalitzEventPattern &pat)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
static DecayTree * _exampleDecayDwave
virtual void printYourself(std::ostream &os=std::cout) const
static DecayTree * _exampleDecayP
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual void printYourself(std::ostream &os=std::cout) const
static DecayTree * _exampleDecayD
static DecayTree * _exampleDecayDwaveD
static DecayTree * _exampleDecayP
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual void printYourself(std::ostream &os=std::cout) const
virtual bool parseTree(const DalitzEventPattern &pat)
const TLorentzVector & Im() const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecayP
double LeviCivita(const TLorentzVector &p0, const TLorentzVector &p1, const TLorentzVector &p2, const TLorentzVector &p3)
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecay
double Sandwich(const TLorentzVector &lm, const TLorentzVector &ln, const TLorentzVector &ra, const TLorentzVector &rb)
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecayP
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
static DecayTree * _exampleDecay
virtual bool parseTree(const DalitzEventPattern &pat)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual bool parseTree(const DalitzEventPattern &pat)
DDTree< DecayTreeItem > DecayTree
virtual const DecayTree & exampleDecay()
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static const DecayTree & getExampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecayP
virtual bool parseTree(const DalitzEventPattern &pat)
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecayP
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
static DecayTree * _exampleDecay
virtual void printYourself(std::ostream &os=std::cout) const
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
static const DecayTree & getExampleDecay()
virtual const DecayTree & exampleDecay()
virtual bool parseTree(const DalitzEventPattern &pat)
static DecayTree * _exampleDecayD
virtual std::complex< double > getNewVal(IDalitzEvent &evt)
virtual void printYourself(std::ostream &os=std::cout) const
virtual void printYourself(std::ostream &os=std::cout) const
virtual const DecayTree & exampleDecay()
virtual const DecayTree & exampleDecay()
TLorentzVector Contract(const TLorentzVector &vec)
static DecayTree * _exampleDecay