299 {
300
301
302
303 MsgStream log(
msgSvc(), name());
304 log << MSG::INFO << "in execute()" << endreq;
305
306 setFilterPassed(false);
307
308 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
309 int runNo=eventHeader->runNumber();
310 int event=eventHeader->eventNumber();
311 log << MSG::DEBUG <<"runNo, evtnum = "
313 << event <<endreq;
314
316
317
319 log << MSG::INFO << "get event tag OK" << endreq;
320 log << MSG::DEBUG <<"ncharg, nneu, tottks = "
321 << evtRecEvent->totalCharged() << " , "
322 << evtRecEvent->totalNeutral() << " , "
323 << evtRecEvent->totalTracks() <<endreq;
324
325
326
328
329
330
331
332 if(evtRecEvent->totalNeutral()>100) {
333 return StatusCode::SUCCESS;
334 }
335
336 Vint iGood, ipip, ipim;
337 iGood.clear();
338 ipip.clear();
339 ipim.clear();
341 ppip.clear();
342 ppim.clear();
343
344 Hep3Vector xorigin(0,0,0);
345
346
348 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
352
353
354 xorigin.setX(dbv[0]);
355 xorigin.setY(dbv[1]);
356 xorigin.setZ(dbv[2]);
357 }
358
359 int nCharge = 0;
360 for(int i = 0; i < evtRecEvent->totalCharged(); i++){
362 if(!(*itTrk)->isMdcTrackValid()) continue;
363 if (!(*itTrk)->isMdcKalTrackValid()) continue;
365
366 double pch =mdcTrk->
p();
367 double x0 =mdcTrk->
x();
368 double y0 =mdcTrk->
y();
369 double z0 =mdcTrk->
z();
370 double phi0=mdcTrk->
helix(1);
371 double xv=xorigin.x();
372 double yv=xorigin.y();
373 double Rxy=fabs((x0-xv)*
cos(phi0)+(y0-yv)*
sin(phi0));
374
375 double m_vx0 = x0;
376 double m_vy0 = y0;
377 double m_vz0 = z0-xorigin.z();
378 double m_vr0 = Rxy;
379 double m_Vctc=z0/sqrt(Rxy*Rxy+z0*z0);
381
382
383
384 if(fabs(m_vz0) >= m_vz0cut) continue;
385 if(m_vr0 >= m_vr0cut) continue;
386
387 iGood.push_back((*itTrk)->trackId());
388 nCharge += mdcTrk->
charge();
389 }
390
391
392
393
394 int nGood = iGood.size();
395
396 log << MSG::DEBUG << "ngood, totcharge = " << nGood << " , " << nCharge << endreq;
397 if((nGood != 4)||(nCharge!=0)){
398 return StatusCode::SUCCESS;
399 }
400
402
404 iGam.clear();
405 for(int i = evtRecEvent->totalCharged(); i< evtRecEvent->totalTracks(); i++) {
407 if(!(*itTrk)->isEmcShowerValid()) continue;
409 Hep3Vector emcpos(emcTrk->
x(), emcTrk->
y(), emcTrk->
z());
410
411 double dthe = 200.;
412 double dphi = 200.;
413 double dang = 200.;
414 log << MSG::DEBUG << "liuf neu= " <<i <<endreq;
415 for(int j = 0; j < evtRecEvent->totalCharged(); j++) {
417 if(!(*jtTrk)->isExtTrackValid()) continue;
421 log << MSG::DEBUG << "liuf charge= " <<j <<endreq;
422
423 double angd = extpos.angle(emcpos);
424 double thed = extpos.theta() - emcpos.theta();
425 double phid = extpos.deltaPhi(emcpos);
426 thed = fmod(thed+CLHEP::twopi+CLHEP::twopi+
pi, CLHEP::twopi) - CLHEP::pi;
427 phid = fmod(phid+CLHEP::twopi+CLHEP::twopi+
pi, CLHEP::twopi) - CLHEP::pi;
428
429
430
431 if(angd < dang) {
432 dang = angd;
433 dthe = thed;
434 dphi = phid;
435 }
436 }
437 if(dang>=200) continue;
438 double eraw = emcTrk->
energy();
439 dthe = dthe * 180 / (CLHEP::pi);
440 dphi = dphi * 180 / (CLHEP::pi);
441 dang = dang * 180 / (CLHEP::pi);
442
443 double m_dthe = dthe;
444 double m_dphi = dphi;
445 double m_dang = dang;
446 double m_eraw = eraw;
447
448
449 log << MSG::DEBUG << "eraw dang= " << eraw << " , " <<dang <<"," <<i <<endreq;
450 if(eraw < m_energyThreshold) continue;
451 if(dang < m_gammaAngCut) continue;
452
453
454
455
456 iGam.push_back((*itTrk)->trackId());
457 }
458
459
460
461
462 int nGam = iGam.size();
463
464 log << MSG::DEBUG << "num Good Photon " << nGam << " , " <<evtRecEvent->totalNeutral()<<endreq;
465 if(nGam<2){
466 return StatusCode::SUCCESS;
467 }
468
470
471
472
473
474
475
476
477
479 pGam.clear();
480 for(int i = 0; i < nGam; i++) {
483 double eraw = emcTrk->
energy();
484 double phi = emcTrk->
phi();
485 double the = emcTrk->
theta();
486 HepLorentzVector
ptrk;
491
492
493
494 pGam.push_back(
ptrk);
495 }
496
497
498 for(int i = 0; i < nGood; i++) {
500 if (!(*itTrk)->isMdcTrackValid()) continue;
502 if (!(*itTrk)->isMdcKalTrackValid()) continue;
505 if(mdcKalTrk->
charge() >0 ) {
506 ipip.push_back(iGood[i]);
507 HepLorentzVector
ptrk;
508 ptrk.setPx(mdcKalTrk->
px());
509 ptrk.setPy(mdcKalTrk->
py());
510 ptrk.setPz(mdcKalTrk->
pz());
513 ppip.push_back(
ptrk);
514 } else {
515 ipim.push_back(iGood[i]);
516 HepLorentzVector
ptrk;
517 ptrk.setPx(mdcKalTrk->
px());
518 ptrk.setPy(mdcKalTrk->
py());
519 ptrk.setPz(mdcKalTrk->
pz());
522 ppim.push_back(
ptrk);
523 }
524 }
525
526
527 int npip = ipip.size();
528 int npim = ipim.size();
529 if(npip!=2||npim != 2) return SUCCESS;
530
531
532
533
535
536
537
538
539
540
541
542
543 HepLorentzVector pTot0(0.011*3.6862,0,0,3.6862);
544 HepLorentzVector pTrec1,pTrec2,pTrec3,pTrec4;
545 HepLorentzVector pTrecf;
546 double m_recjpsi1,m_recjpsi2,m_recjpsi3,m_recjpsi4,m_recppf;
547 double deljp1,deljp2,deljp3,deljp4;
548 pTrec1 = pTot0 - ppip[0] - ppim[0];
549 pTrec2 = pTot0 - ppip[0] - ppim[1];
550 pTrec3 = pTot0 - ppip[1] - ppim[0];
551 pTrec4 = pTot0 - ppip[1] - ppim[1];
552 m_recjpsi1 = pTrec1.m();
553 m_recjpsi2 = pTrec2.m();
554 m_recjpsi3 = pTrec3.m();
555 m_recjpsi4 = pTrec4.m();
556 deljp1=fabs(m_recjpsi1-3.097);
557 deljp2=fabs(m_recjpsi2-3.097);
558 deljp3=fabs(m_recjpsi3-3.097);
559 deljp4=fabs(m_recjpsi4-3.097);
560
561 int itmp,itmp1,itmp2;
562 HepLorentzVector ptmp,ptmp1,ptmp2;
563
564 pTrecf =pTrec1;
565 m_recppf=pTrec1.m();
566
567 if(deljp2<deljp1&&deljp2<deljp3&&deljp2<deljp4)
568 { itmp= ipim[1];
569 ipim[1]=ipim[0];
570 ipim[0]=itmp;
571
572 ptmp =ppim[1];
573 ppim[1]=ppim[0];
574 ppim[0]=ptmp;
575
576 pTrecf =pTrec2;
577 m_recppf=pTrec2.m();
578 }
579
580 if(deljp3<deljp1&&deljp3<deljp2&&deljp3<deljp4)
581 { itmp= ipip[1];
582 ipip[1]=ipip[0];
583 ipip[0]=itmp;
584
585 ptmp =ppip[1];
586 ppip[1]=ppip[0];
587 ppip[0]=ptmp;
588
589 pTrecf =pTrec3;
590 m_recppf=pTrec3.m();
591 }
592
593 if(deljp4<deljp1&&deljp4<deljp2&&deljp4<deljp3)
594 { itmp1= ipip[1];
595 ipip[1]=ipip[0];
596 ipip[0]=itmp1;
597 itmp2= ipim[1];
598 ipim[1]=ipim[0];
599 ipim[0]=itmp2;
600
601 ptmp1 =ppip[1];
602 ppip[1]=ppip[0];
603 ppip[0]=ptmp1;
604 ptmp2 =ppim[1];
605 ppim[1]=ppim[0];
606 ppim[0]=ptmp2;
607
608 pTrecf =pTrec4;
609 m_recppf=pTrec4.m();
610 }
611
612 if(fabs(m_recppf-3.097)>0.2) return SUCCESS;
613
614 log << MSG::DEBUG << "ngood track ID after jpsi = " << ipip[0] << " , "
615 << ipim[0]<< " , " << ipip[1] << " , " << ipim[1] << endreq;
617
618 HepLorentzVector ppi2_no1 = ppip[0] + ppim[0];
619 HepLorentzVector ppi2_no2 = ppip[1] + ppim[1];
620 HepLorentzVector ppi2_no3 = ppip[0] + ppim[1];
621 HepLorentzVector ppi2_no4 = ppip[1] + ppim[0];
622 HepLorentzVector p4pi_no = ppi2_no1+ ppi2_no2;
623
624 double emcTg1=0.0;
625 double emcTg2=0.0;
626 double emcTg3=0.0;
627 double emcTg4=0.0;
628 double laypi1=-1.0;
629 double laypi2=-1.0;
630 double laypi3=-1.0;
631 double laypi4=-1.0;
632
638
639 double phi01=mdcTrkp1->
helix(1);
640 double m_p1vx = mdcTrkp1->
x();
641 double m_p1vy = mdcTrkp1->
y();
642 double m_p1vz = mdcTrkp1->
z()-xorigin.z();
643 double m_p1vr = fabs((mdcTrkp1->
x()-xorigin.x())*
cos(phi01)+(mdcTrkp1->
y()-xorigin.y())*
sin(phi01));
644 double m_p1vct=
cos(mdcTrkp1->
theta());
645 double m_p1ptot=mdcKalTrkp1->
p();
646 double m_p1pxy=sqrt(mdcKalTrkp1->
px()*mdcKalTrkp1->
px()+mdcKalTrkp1->
py()*mdcKalTrkp1->
py());
647
648 if((*itTrkp1)->isEmcShowerValid()){
649 emcTg1=emcTrkp1->
energy();
650 }
651 if((*itTrkp1)->isMucTrackValid()){
653 }
654 double m_laypip1=laypi1;
655
661
662 double phi02=mdcTrkm1->
helix(1);
663 double m_m1vx = mdcTrkm1->
x();
664 double m_m1vy = mdcTrkm1->
y();
665 double m_m1vz = mdcTrkm1->
z()-xorigin.z();
666 double m_m1vr = fabs((mdcTrkm1->
x()-xorigin.x())*
cos(phi02)+(mdcTrkm1->
y()-xorigin.y())*
sin(phi02));
667 double m_m1vct=
cos(mdcTrkm1->
theta());
668 double m_m1ptot=mdcKalTrkm1->
p();
669 double m_m1pxy=sqrt(mdcKalTrkm1->
px()*mdcKalTrkm1->
px()+mdcKalTrkm1->
py()*mdcKalTrkm1->
py());
670
671 if((*itTrkm1)->isEmcShowerValid()){
672 emcTg2= emcTrkm1->
energy();
673 }
674 if((*itTrkm1)->isMucTrackValid()){
676 }
677 double m_laypim1=laypi2;
678
684
685 double phi03=mdcTrkp2->
helix(1);
686 double m_p2vx = mdcTrkp2->
x();
687 double m_p2vy = mdcTrkp2->
y();
688 double m_p2vz = mdcTrkp2->
z()-xorigin.z();
689 double m_p2vr = fabs((mdcTrkp2->
x()-xorigin.x())*
cos(phi03)+(mdcTrkp2->
y()-xorigin.y())*
sin(phi03));
690 double m_p2vct=
cos(mdcTrkp2->
theta());
691 double m_p2ptot=mdcKalTrkp2->
p();
692 double m_p2pxy=sqrt(mdcKalTrkp2->
px()*mdcKalTrkp2->
px()+mdcKalTrkp2->
py()*mdcKalTrkp2->
py());
693
694 if((*itTrkp2)->isEmcShowerValid()){
695 emcTg3= emcTrkp2->
energy();
696 }
697 if((*itTrkp2)->isMucTrackValid()){
699 }
700 double m_laypip2=laypi3;
701
707
708 double phi04=mdcTrkm2->
helix(1);
709 double m_m2vx = mdcTrkm2->
x();
710 double m_m2vy = mdcTrkm2->
y();
711 double m_m2vz = mdcTrkm2->
z()-xorigin.z();
712 double m_m2vr = fabs((mdcTrkm2->
x()-xorigin.x())*
cos(phi04)+(mdcTrkm2->
y()-xorigin.y())*
sin(phi04));
713 double m_m2vct=
cos(mdcTrkm2->
theta());
714 double m_m2ptot=mdcKalTrkm2->
p();
715 double m_m2pxy=sqrt(mdcKalTrkm2->
px()*mdcKalTrkm2->
px()+mdcKalTrkm2->
py()*mdcKalTrkm2->
py());
716
717 if((*itTrkm2)->isEmcShowerValid()){
718 emcTg4= emcTrkm2->
energy();
719 }
720 if((*itTrkm2)->isMucTrackValid()){
722 }
723 double m_laypim2=laypi4;
724
725 double m_emcTp1 =emcTg1;
726 double m_emcTm1 =emcTg2;
727 double m_emcTp2 =emcTg3;
728 double m_emcTm2 =emcTg4;
729
730 if(fabs(m_p1vz) >= m_vz1cut) return SUCCESS;
731 if(m_p1vr >= m_vr1cut) return SUCCESS;
732 if(fabs(m_p1vct)>=m_cthcut) return SUCCESS;
733
734 if(fabs(m_m1vz) >= m_vz1cut) return SUCCESS;
735 if(m_m1vr >= m_vr1cut) return SUCCESS;
736 if(fabs(m_m1vct)>=m_cthcut) return SUCCESS;
738
739 HepLorentzVector p4muonp = ppip[1];
740 HepLorentzVector p4muonm = ppim[1];
741 HepLorentzVector p4uu = pTrecf;
742
743
744 Hep3Vector p3jpsiUnit = (p4uu.vect()).unit();
745 double jBeta = p4uu.beta();
746
747
748
749
750
751
752
753
754 HepLorentzVector pTot;
755 double minpi0=999.0;
756 for(int i = 0; i < nGam - 1; i++){
757 for(int j = i+1; j < nGam; j++) {
758 HepLorentzVector p2g = pGam[i] + pGam[j];
759 pTot = ppip[0] + ppim[0] + ppip[1] + ppim[1];
760 pTot += p2g;
761 if(fabs(p2g.m()-0.135)<minpi0){
762 minpi0 = fabs(p2g.m()-0.135);
763
764 double m_m2gg = p2g.m();
765
766 HepLorentzVector prho0_no = ppi2_no2;
767 HepLorentzVector prhop_no = ppip[1] + p2g;
768 HepLorentzVector prhom_no = ppim[1] + p2g;
769 HepLorentzVector prho0pi0 = ppi2_no2 + p2g;
770 HepLorentzVector frho1pi0 = ppi2_no1 + p2g;
771 HepLorentzVector frho2pi0 = ppi2_no3 + p2g;
772 HepLorentzVector frho3pi0 = ppi2_no4 + p2g;
773 HepLorentzVector prho0g1 = ppi2_no2 + pGam[i];
774 HepLorentzVector prho0g2 = ppi2_no2 + pGam[j];
775 HepLorentzVector frho1g1 = ppi2_no1 + pGam[i];
776 HepLorentzVector frho1g2 = ppi2_no1 + pGam[j];
777 HepLorentzVector frho2g1 = ppi2_no3 + pGam[i];
778 HepLorentzVector frho2g2 = ppi2_no3 + pGam[j];
779 HepLorentzVector frho3g1 = ppi2_no4 + pGam[i];
780 HepLorentzVector frho3g2 = ppi2_no4 + pGam[j];
781 HepLorentzVector p5pi_no = p4pi_no + p2g;
782
783
784 double m_prho0_no = prho0_no.m();
785 double m_prhop_no = prhop_no.m();
786 double m_prhom_no = prhom_no.m();
787 double m_prho0pi0 = prho0pi0.m();
788 double m_frho1pi0 = frho1pi0.m();
789 double m_frho2pi0 = frho2pi0.m();
790 double m_frho3pi0 = frho3pi0.m();
791 double m_prho0g1 = prho0g1.m();
792 double m_prho0g2 = prho0g2.m();
793 double m_frho1g1 = frho1g1.m();
794 double m_frho1g2 = frho1g2.m();
795 double m_frho2g1 = frho2g1.m();
796 double m_frho2g2 = frho2g2.m();
797 double m_frho3g1 = frho3g1.m();
798 double m_frho3g2 = frho3g2.m();
799 double m_p4pi_no = p4pi_no.m();
800 double m_p5pi_no = p5pi_no.m();
801 double m_mdcpx1=ppip[0].px();
802 double m_mdcpy1=ppip[0].py();
803 double m_mdcpz1=ppip[0].pz();
804 double m_mdcpe1=ppip[0].e();
805 double m_mdcpx2=ppim[0].px();
806 double m_mdcpy2=ppim[0].py();
807 double m_mdcpz2=ppim[0].pz();
808 double m_mdcpe2=ppim[0].e();
809 double m_mdcpx3=ppip[1].px();
810 double m_mdcpy3=ppip[1].py();
811 double m_mdcpz3=ppip[1].pz();
812 double m_mdcpe3=ppip[1].e();
813 double m_mdcpx4=ppim[1].px();
814 double m_mdcpy4=ppim[1].py();
815 double m_mdcpz4=ppim[1].pz();
816 double m_mdcpe4=ppim[1].e();
817 double m_mdcpxg1=pGam[i].px();
818 double m_mdcpyg1=pGam[i].py();
819 double m_mdcpzg1=pGam[i].pz();
820 double m_mdcpeg1=pGam[i].e();
821 double m_mdcpxg2=pGam[j].px();
822 double m_mdcpyg2=pGam[j].py();
823 double m_mdcpzg2=pGam[j].pz();
824 double m_mdcpeg2=pGam[j].e();
825 double m_etot = pTot.e();
826 double m_mrecjp1=m_recjpsi1;
827 double m_mrecjp2=m_recjpsi2;
828 double m_mrecjp3=m_recjpsi3;
829 double m_mrecjp4=m_recjpsi4;
830
831
832 }
833 }
834 }
836
837
838
839
840
841
843 HepSymMatrix Evx(3, 0);
844 double bx = 1E+6;
845 double by = 1E+6;
846 double bz = 1E+6;
847 Evx[0][0] = bx*bx;
848 Evx[1][1] = by*by;
849 Evx[2][2] = bz*bz;
850
854
857
858
859
860
861 RecMdcKalTrack *pipTrk1 = (*(evtRecTrkCol->begin()+ipip[0]))->mdcKalTrack();
862 RecMdcKalTrack *pimTrk1 = (*(evtRecTrkCol->begin()+ipim[0]))->mdcKalTrack();
863 RecMdcKalTrack *pipTrk2 = (*(evtRecTrkCol->begin()+ipip[1]))->mdcKalTrack();
864 RecMdcKalTrack *pimTrk2 = (*(evtRecTrkCol->begin()+ipim[1]))->mdcKalTrack();
865
871
875 if(!vtxfit->
Fit(0))
return SUCCESS;
877
879
882
884
885
886
887
888 int igbf1 = -1;
889 int igbf2 = -1;
890 HepLorentzVector pTgam1(0,0,0,0);
891 HepLorentzVector pTgam2(0,0,0,0);
892
893 if(m_test4C==1) {
894
895 HepLorentzVector
ecms(0.011*3.6862,0,0,3.6862);
896
897
898
899
903 double chisq = 9999.;
904 int ig11 = -1;
905 int ig21 = -1;
906 double chikk=9999.;
907 for(int i = 0; i < nGam-1; i++) {
908 RecEmcShower *g1Trk = (*(evtRecTrkCol->begin()+iGam[i]))->emcShower();
909 for(int j = i+1; j < nGam; j++) {
910 RecEmcShower *g2Trk = (*(evtRecTrkCol->begin()+iGam[j]))->emcShower();
920 bool oksq = kmfit->
Fit();
921 if(oksq&&kmfit->
chisq()<chikk) {
922 chikk = kmfit->
chisq();
923 }
924 }
925 }
927
928
929
930
931
932 chisq = 9999.;
933 int ig1 = -1;
934 int ig2 = -1;
935 for(int i = 0; i < nGam-1; i++) {
936 RecEmcShower *g1Trk = (*(evtRecTrkCol->begin()+iGam[i]))->emcShower();
937 for(int j = i+1; j < nGam; j++) {
938 RecEmcShower *g2Trk = (*(evtRecTrkCol->begin()+iGam[j]))->emcShower();
948 bool oksq = kmfit->
Fit();
949 if(oksq) {
950 double chi2 = kmfit->
chisq();
951 if(chi2 < chisq) {
952 chisq = chi2;
953 ig1 = iGam[i];
954 ig2 = iGam[j];
955 igbf1 = iGam[i];
956 igbf2 = iGam[j];
957 pTgam1=pGam[i];
958 pTgam2=pGam[j];
959 }
960 }
961 }
962 }
963
964
965 if(chisq > 200) return SUCCESS;
967
968
970 jGood.clear();
971 jGood.push_back(ipip[0]);
972 jGood.push_back(ipim[0]);
973 jGood.push_back(ipip[1]);
974 jGood.push_back(ipim[1]);
975
976
977
979 jGgam.clear();
980 jGgam.push_back(igbf1);
981 jGgam.push_back(igbf2);
982
983 double chi1_pp=9999.0;
984
985 RecEmcShower *g1Trk = (*(evtRecTrkCol->begin()+ig1))->emcShower();
986 RecEmcShower *g2Trk = (*(evtRecTrkCol->begin()+ig2))->emcShower();
995 bool oksq = kmfit->
Fit();
996 if(oksq) {
997 chi1_pp = kmfit->
chisq();
998 HepLorentzVector ppi0 = kmfit->
pfit(4) + kmfit->
pfit(5);
999 HepLorentzVector prho0= kmfit->
pfit(2) + kmfit->
pfit(3);
1000 HepLorentzVector prhop= kmfit->
pfit(2) + ppi0;
1001 HepLorentzVector prhom= kmfit->
pfit(3) + ppi0;
1002 HepLorentzVector pjjj = prho0 + ppi0;
1003
1004 HepLorentzVector p2pi1=kmfit->
pfit(0) + kmfit->
pfit(1);
1005 HepLorentzVector f2pi1g1= p2pi1 + kmfit->
pfit(4);
1006 HepLorentzVector f2pi1g2= p2pi1 + kmfit->
pfit(5);
1007 HepLorentzVector f2pi1pi0=p2pi1 + ppi0;
1008
1009 HepLorentzVector t2pi2g1= prho0 + kmfit->
pfit(4);
1010 HepLorentzVector t2pi2g2= prho0 + kmfit->
pfit(5);
1011
1012 HepLorentzVector p2pi3=kmfit->
pfit(0) + kmfit->
pfit(3);
1013 HepLorentzVector f2pi3g1= p2pi3 + kmfit->
pfit(4);
1014 HepLorentzVector f2pi3g2= p2pi3 + kmfit->
pfit(5);
1015 HepLorentzVector f2pi3pi0=p2pi3 + ppi0;
1016
1017 HepLorentzVector p2pi4=kmfit->
pfit(1) + kmfit->
pfit(2);
1018 HepLorentzVector f2pi4g1= p2pi4 + kmfit->
pfit(4);
1019 HepLorentzVector f2pi4g2= p2pi4 + kmfit->
pfit(5);
1020 HepLorentzVector f2pi4pi0=p2pi4 + ppi0;
1021
1022 HepLorentzVector p4pi= p2pi1 + prho0;
1023 HepLorentzVector p4pig1= p4pi + kmfit->
pfit(4);
1024 HepLorentzVector p4pig2= p4pi + kmfit->
pfit(5);
1025 HepLorentzVector ppptot= p4pi + ppi0;
1026
1027
1028 HepLorentzVector be4cpi0= pTgam1 + pTgam2;
1029 HepLorentzVector be4c_ppi1 = ppip[0] + ppim[0];
1030 HepLorentzVector be4c_ppi2 = ppip[1] + ppim[1];
1031 HepLorentzVector be4cjp= be4cpi0 + be4c_ppi2;
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1427
1428 }
1429 }
1430
1431
1432
1433
1434
1435
1436
1437 setFilterPassed(true);
1438
1439 (*(evtRecTrkCol->begin()+ipip[0]))->setPartId(2);
1440 (*(evtRecTrkCol->begin()+ipim[0]))->setPartId(2);
1441 (*(evtRecTrkCol->begin()+ipip[1]))->setPartId(2);
1442 (*(evtRecTrkCol->begin()+ipim[1]))->setPartId(2);
1443
1444
1445 return StatusCode::SUCCESS;
1446}
double sin(const BesAngle a)
double cos(const BesAngle a)
EvtRecTrackCol::iterator EvtRecTrackIterator
std::vector< HepLorentzVector > Vp4
const Hep3Vector emcPosition() const
const int emcVolumeNumber() const
static void setPidType(PidType pidType)
const double theta() const
const HepVector helix() const
......
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
static KinematicFit * instance()
void setDynamicerror(const bool dynamicerror=1)
void AddFourMomentum(int number, HepLorentzVector p4)
HepLorentzVector pfit(int n) const
const HepVector & getZHelix() const
const HepSymMatrix & getZError() const
HepSymMatrix & getZErrorK()
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
WTrackParameter wtrk(int n) const
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
static VertexFit * instance()
void setEvx(const HepSymMatrix &eVx)
void setVx(const HepPoint3D &vx)
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecTrackCol