113 #include "StHbtMaker/Infrastructure/StHbtPair.hh"
115 double StHbtPair::mMaxDuInner = .8;
116 double StHbtPair::mMaxDzInner = 3.;
117 double StHbtPair::mMaxDuOuter = 1.4;
118 double StHbtPair::mMaxDzOuter = 3.2;
121 StHbtPair::StHbtPair(){
124 setDefaultHalfFieldMergingPar();
128 : mTrack1(a), mTrack2(b)
130 setDefaultHalfFieldMergingPar();
133 void StHbtPair::setDefaultHalfFieldMergingPar(){
139 void StHbtPair::setDefaultFullFieldMergingPar(){
145 void StHbtPair::setMergingPar(
double aMaxDuInner,
double aMaxDzInner,
146 double aMaxDuOuter,
double aMaxDzOuter){
147 mMaxDuInner = aMaxDuInner;
148 mMaxDzInner = aMaxDzInner;
149 mMaxDuOuter = aMaxDuOuter;
150 mMaxDzOuter = aMaxDzOuter;
153 StHbtPair::~StHbtPair() {}
160 double StHbtPair::mInv()
const
162 double InvariantMass = abs(mTrack1->FourMomentum() + mTrack2->FourMomentum());
163 return (InvariantMass);
166 double StHbtPair::kT()
const
170 (mTrack1->FourMomentum() + mTrack2->FourMomentum()).perp();
176 double StHbtPair::rap()
const
179 double tmp = 0.5 * log (
180 (mTrack1->FourMomentum().e() + mTrack2->FourMomentum().e() + mTrack1->FourMomentum().z() + mTrack2->FourMomentum().z()) /
181 (mTrack1->FourMomentum().e() + mTrack2->FourMomentum().e() - mTrack1->FourMomentum().z() - mTrack2->FourMomentum().z())
186 double StHbtPair::emissionAngle()
const {
187 double pxTotal = this->fourMomentumSum().x();
188 double pyTotal = this->fourMomentumSum().y();
189 double angle = atan2(pyTotal,pxTotal)*180.0/3.1415926536;
190 if (angle<0.0) angle+=360.0;
208 void StHbtPair::qYKPCMS(
double& qP,
double& qT,
double& q0)
const
217 if ( rand()/(
double)RAND_MAX > 0.50 )
223 qT = l.vect().perp() ;
228 void StHbtPair::qYKPLCMS(
double& qP,
double& qT,
double& q0)
const
236 double beta = (l1.z()+l2.z()) / (l1.e()+l2.e()) ;
237 double beta2 = beta*beta ;
241 double dummyPz = ::sqrt( (beta2) / (1-beta2) ) ;
243 if (beta>0.0) { dummyPz = -dummyPz; } ;
247 double dummyMass = 1.0 ;
250 l.setE(l.vect().massHypothesis(dummyMass) );
256 if ( rand()/(
double)RAND_MAX >0.50)
257 { l = l1boosted-l2boosted ; }
259 { l = l2boosted-l1boosted ;} ;
262 qT = l.vect().perp() ;
267 void StHbtPair::qYKPPF(
double& qP,
double& qT,
double& q0)
const
282 if ( rand()/(
double)RAND_MAX > 0.50)
283 { l = l1boosted-l2boosted ; }
285 { l = l2boosted-l1boosted ;} ;
288 qT = l.vect().perp();
292 double StHbtPair::qOutCMS()
const
297 double dx = tmp1.x() - tmp2.x();
298 double xt = tmp1.x() + tmp2.x();
300 double dy = tmp1.y() - tmp2.y();
301 double yt = tmp1.y() + tmp2.y();
303 double k1 = (::sqrt(xt*xt+yt*yt));
304 double k2 = (dx*xt+dy*yt);
309 double StHbtPair::qSideCMS()
const
314 double x1 = tmp1.x();
double y1 = tmp1.y();
315 double x2 = tmp2.x();
double y2 = tmp2.y();
317 double xt = x1+x2;
double yt = y1+y2;
318 double k1 = ::sqrt(xt*xt+yt*yt);
320 double tmp = 2.0*(x2*y1-x1*y2)/k1;
325 double StHbtPair::qLongCMS()
const
330 double dz = tmp1.z() - tmp2.z();
331 double zz = tmp1.z() + tmp2.z();
333 double dt = tmp1.t() - tmp2.t();
334 double tt = tmp1.t() + tmp2.t();
337 double gamma = 1.0/::sqrt(1.0 - beta*beta);
339 double temp = gamma*(dz - beta*dt);
344 double StHbtPair::qOutPf()
const
349 double dt = tmp1.t() - tmp2.t();
350 double tt = tmp1.t() + tmp2.t();
352 double xt = tmp1.x() + tmp2.x();
353 double yt = tmp1.y() + tmp2.y();
355 double k1 = ::sqrt(xt*xt + yt*yt);
357 double gOut = 1.0/::sqrt(1.0 - bOut*bOut);
359 double temp = gOut*(this->qOutCMS() - bOut*dt);
364 double StHbtPair::qSidePf()
const
366 return(this->qSideCMS());
371 double StHbtPair::qLongPf()
const
373 return(this->qLongCMS());
377 double StHbtPair::qOutBf(
double beta)
const
379 return(this->qOutCMS());
384 double StHbtPair::qSideBf(
double beta)
const
386 return(this->qSideCMS());
390 double StHbtPair::qLongBf(
double beta)
const
395 double dz = tmp1.z() - tmp2.z();
396 double dt = tmp1.t() + tmp2.t();
398 double gamma = 1.0/::sqrt(1.0 - beta*beta);
400 double temp = gamma*(dz - beta*dt);
404 double StHbtPair::quality()
const {
405 unsigned long mapMask0 = 0xFFFFFF00;
406 unsigned long mapMask1 = 0x1FFFFF;
407 unsigned long padRow1To24Track1 = mTrack1->TopologyMap(0) & mapMask0;
408 unsigned long padRow25To45Track1 = mTrack1->TopologyMap(1) & mapMask1;
409 unsigned long padRow1To24Track2 = mTrack2->TopologyMap(0) & mapMask0;
410 unsigned long padRow25To45Track2 = mTrack2->TopologyMap(1) & mapMask1;
412 unsigned long bothPads1To24 = padRow1To24Track1 & padRow1To24Track2;
413 unsigned long bothPads25To45 = padRow25To45Track1 & padRow25To45Track2;
415 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
416 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
420 double normQual = 0.0;
421 int MaxQuality = mTrack1->NumberOfHits() + mTrack2->NumberOfHits();
422 for (ibits=8;ibits<=31;ibits++) {
424 bitI |= 1UL<<(ibits);
425 if ( onePad1To24 & bitI ) {
430 if ( bothPads1To24 & bitI ) Quality--;
433 for (ibits=0;ibits<=20;ibits++) {
435 bitI |= 1UL<<(ibits);
436 if ( onePad25To45 & bitI ) {
441 if ( bothPads25To45 & bitI ) Quality--;
444 normQual = (double)Quality/( (
double) MaxQuality );
449 double StHbtPair::quality2()
const {
450 unsigned long mapMask0 = 0xFFFFFF00;
451 unsigned long mapMask1 = 0x1FFFFF;
452 unsigned long padRow1To24Track1 = mTrack1->TopologyMap(0) & mapMask0;
453 unsigned long padRow25To45Track1 = mTrack1->TopologyMap(1) & mapMask1;
454 unsigned long padRow1To24Track2 = mTrack2->TopologyMap(0) & mapMask0;
455 unsigned long padRow25To45Track2 = mTrack2->TopologyMap(1) & mapMask1;
462 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
463 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
467 double normQual = 0.0;
468 int MaxQuality = mTrack1->NumberOfHits() + mTrack2->NumberOfHits();
469 for (ibits=8;ibits<=31;ibits++) {
471 bitI |= 1UL<<(ibits);
472 if ( onePad1To24 & bitI ) {
480 for (ibits=0;ibits<=20;ibits++) {
482 bitI |= 1UL<<(ibits);
483 if ( onePad25To45 & bitI ) {
491 normQual = (double)Quality/( (
double) MaxQuality );
497 double StHbtPair::NominalTpcExitSeparation()
const {
498 StHbtThreeVector diff = mTrack1->NominalTpcExitPoint() - mTrack2->NominalTpcExitPoint();
502 double StHbtPair::NominalTpcEntranceSeparation()
const {
503 StHbtThreeVector diff = mTrack1->NominalTpcEntrancePoint() - mTrack2->NominalTpcEntrancePoint();
507 double StHbtPair::NominalTpcAverageSeparation()
const {
511 if (mTrack1->mNominalPosSample && mTrack2->mNominalPosSample){
512 while (fabs(mTrack1->mNominalPosSample[ipt].x())<9999. &&
513 fabs(mTrack1->mNominalPosSample[ipt].y())<9999. &&
514 fabs(mTrack1->mNominalPosSample[ipt].z())<9999. &&
515 fabs(mTrack2->mNominalPosSample[ipt].x())<9999. &&
516 fabs(mTrack2->mNominalPosSample[ipt].y())<9999. &&
517 fabs(mTrack2->mNominalPosSample[ipt].z())<9999. &&
521 diff = mTrack1->mNominalPosSample[ipt] - mTrack2->mNominalPosSample[ipt];
523 AveSep += diff.mag();
525 AveSep = AveSep/(ipt+1.);
530 double StHbtPair::OpeningAngle()
const {
531 return 57.296* mTrack1->FourMomentum().vect().angle( mTrack2->FourMomentum().vect() );
541 double StHbtPair::KStarFlipped()
const {
549 double tMass = abs(tSum);
551 double tGamma = tSum.e()/tMass;
553 (tGammaBeta*tGammaBeta))*tGammaBeta;
555 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
557 return tK.vect().mag();
573 double StHbtPair::CVKFlipped()
const{
580 double tMass = abs(tSum);
582 double tGamma = tSum.e()/tMass;
584 (tGammaBeta*tGammaBeta))*tGammaBeta;
586 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
588 return (tK.vect())*tGammaBeta/tGamma;
591 double StHbtPair::pInv()
const{
594 double tP = (tP1.px()+tP2.px())*(tP1.px()+tP2.px())+
595 (tP1.py()+tP2.py())*(tP1.py()+tP2.py())+
596 (tP1.pz()+tP2.pz())*(tP1.pz()+tP2.pz())-
597 (tP1.e() -tP2.e() )*(tP1.e() -tP2.e() );
598 return ::sqrt(fabs(tP));
601 double StHbtPair::qInvFlippedXY()
const{
603 tP1.setX(-1.*tP1.x());
604 tP1.setY(-1.*tP1.y());
606 return ( -1.* tDiff.m());
609 void StHbtPair::calcNonIdPar()
const{
610 mNonIdParNotCalculated=0;
611 double px1 = mTrack1->FourMomentum().vect().x();
612 double py1 = mTrack1->FourMomentum().vect().y();
613 double pz1 = mTrack1->FourMomentum().vect().z();
614 double pE1 = mTrack1->FourMomentum().e();
615 double Particle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1);
616 double px2 = mTrack2->FourMomentum().vect().x();
617 double py2 = mTrack2->FourMomentum().vect().y();
618 double pz2 = mTrack2->FourMomentum().vect().z();
619 double pE2 = mTrack2->FourMomentum().e();
620 double Particle2Mass = ::sqrt(pE2*pE2 - px2*px2 - py2*py2 - pz2*pz2);
627 double Ptrans = Px*Px + Py*Py;
628 double Mtrans = PE*PE - Pz*Pz;
629 double Pinv = ::sqrt(Mtrans - Ptrans);
630 Mtrans = ::sqrt(Mtrans);
631 Ptrans = ::sqrt(Ptrans);
633 double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
634 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
636 double Q = (Particle1Mass*Particle1Mass - Particle2Mass*Particle2Mass)/Pinv;
637 Q = sqrt ( Q*Q - QinvL);
643 double gamma = PE/Mtrans;
645 double pz1L = gamma * (pz1 - beta * pE1);
646 double pE1L = gamma * (pE1 - beta * pz1);
652 double px1R = (px1*Px + py1*Py)/Ptrans;
653 double py1R = (-px1*Py + py1*Px)/Ptrans;
659 beta = Ptrans/Mtrans;
662 double px1C = gamma * (px1R - beta * pE1L);
667 mCVK = (mDKOut*Ptrans + mDKLong*Pz)/kStarCalc/::sqrt(Ptrans*Ptrans+Pz*Pz);
671 void StHbtPair::calcNonIdParGlobal()
const{
672 mNonIdParNotCalculatedGlobal=0;
673 double px1 = mTrack1->Track()->PGlobal().x();
674 double py1 = mTrack1->Track()->PGlobal().y();
675 double pz1 = mTrack1->Track()->PGlobal().z();
676 double Particle1Mass = mTrack1->FourMomentum().m2();
677 double pE1 = ::sqrt(Particle1Mass + px1*px1 + py1*py1 + pz1*pz1);
678 Particle1Mass = ::sqrt(Particle1Mass);
680 double px2 = mTrack2->Track()->PGlobal().x();
681 double py2 = mTrack2->Track()->PGlobal().y();
682 double pz2 = mTrack2->Track()->PGlobal().z();
683 double Particle2Mass = mTrack2->FourMomentum().m2();
684 double pE2 = ::sqrt(Particle2Mass + px2*px2 + py2*py2 + pz2*pz2);
685 Particle2Mass = ::sqrt(Particle2Mass);
692 double Ptrans = Px*Px + Py*Py;
693 double Mtrans = PE*PE - Pz*Pz;
694 double Pinv = ::sqrt(Mtrans - Ptrans);
695 Mtrans = ::sqrt(Mtrans);
696 Ptrans = ::sqrt(Ptrans);
698 double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
699 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
701 double Q = (Particle1Mass*Particle1Mass - Particle2Mass*Particle2Mass)/Pinv;
702 Q = sqrt ( Q*Q - QinvL);
704 kStarCalcGlobal = Q/2;
708 double gamma = PE/Mtrans;
710 double pz1L = gamma * (pz1 - beta * pE1);
711 double pE1L = gamma * (pE1 - beta * pz1);
714 mDKLongGlobal = pz1L;
717 double px1R = (px1*Px + py1*Py)/Ptrans;
718 double py1R = (-px1*Py + py1*Px)/Ptrans;
721 mDKSideGlobal = py1R;
724 beta = Ptrans/Mtrans;
727 double px1C = gamma * (px1R - beta * pE1L);
732 mCVKGlobal = (mDKOutGlobal*Ptrans + mDKLongGlobal*Pz)/
733 kStarCalcGlobal/::sqrt(Ptrans*Ptrans+Pz*Pz);
738 double StHbtPair::dcaInsideTpc()
const{
740 double tMinDist=NominalTpcEntranceSeparation();
741 double tExit = NominalTpcExitSeparation();
742 tMinDist = (tExit>tMinDist) ? tMinDist : tExit;
757 double dd = ::sqrt(dx*dx + dy*dy);
758 double r1 = 1/tHelix1.curvature();
759 double r2 = 1/tHelix2.curvature();
760 double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd);
764 if (fabs(cosAlpha) < 1) {
765 double sinAlpha = sin(acos(cosAlpha));
766 x = tHelix1.
xcenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd;
767 y = tHelix1.
ycenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd;
769 if( r > rMin && r < rMax &&
770 fabs(atan2(y,x)-mTrack1->NominalTpcEntrancePoint().phi())< 0.5
773 tInsideDist=tHelix2.
distance(tHelix1.at(s));
774 if(tInsideDist<tMinDist) tMinDist = tInsideDist;
777 x = tHelix1.
xcenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd;
778 y = tHelix1.
ycenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd;
780 if( r > rMin && r < rMax &&
781 fabs(atan2(y,x)-mTrack1->NominalTpcEntrancePoint().phi())< 0.5
784 tInsideDist=tHelix2.
distance(tHelix1.at(s));
785 if(tInsideDist<tMinDist) tMinDist = tInsideDist;
792 void StHbtPair::calcMergingPar()
const{
793 mMergingParNotCalculated=0;
797 mFracOfMergedRow = 0.;
800 double tDistMax = 200.;
801 for(
int ti=0 ; ti<45 ; ti++){
802 if(mTrack1->mSect[ti]==mTrack2->mSect[ti] && mTrack1->mSect[ti]!=-1){
803 tDu = fabs(mTrack1->mU[ti]-mTrack2->mU[ti]);
804 tDz = fabs(mTrack1->mZ[ti]-mTrack2->mZ[ti]);
807 mFracOfMergedRow += (tDu<mMaxDuInner && tDz<mMaxDzInner);
808 tDist = ::sqrt(tDu*tDu/mMaxDuInner/mMaxDuInner+
809 tDz*tDz/mMaxDzInner/mMaxDzInner);
813 mFracOfMergedRow += (tDu<mMaxDuOuter && tDz<mMaxDzOuter);
814 tDist = ::sqrt(tDu*tDu/mMaxDuOuter/mMaxDuOuter+
815 tDz*tDz/mMaxDzOuter/mMaxDzOuter);
819 mClosestRowAtDCA = ti+1;
822 mWeightedAvSep += tDist;
826 mWeightedAvSep /= tN;
827 mFracOfMergedRow /= tN;
830 mClosestRowAtDCA = -1;
831 mFracOfMergedRow = -1.;
832 mWeightedAvSep = -1.;
837 double StHbtPair::TpcExitSeparationTrackV0Pos()
const {
838 StHbtThreeVector diff = mTrack1->NominalTpcExitPoint() - mTrack2->TpcV0PosExitPoint();
842 double StHbtPair::TpcEntranceSeparationTrackV0Pos()
const {
843 StHbtThreeVector diff = mTrack1->NominalTpcEntrancePoint() - mTrack2->TpcV0PosEntrancePoint();
847 double StHbtPair::TpcAverageSeparationTrackV0Pos()
const {
851 if (mTrack1->mNominalPosSample && mTrack2->mNominalPosSample){
852 while (fabs(mTrack1->mNominalPosSample[ipt].x())<9999. &&
853 fabs(mTrack1->mNominalPosSample[ipt].y())<9999. &&
854 fabs(mTrack1->mNominalPosSample[ipt].z())<9999. &&
855 fabs(mTrack2->mNominalPosSample[ipt].x())<9999. &&
856 fabs(mTrack2->mNominalPosSample[ipt].y())<9999. &&
857 fabs(mTrack2->mNominalPosSample[ipt].z())<9999. &&
860 diff = mTrack1->mNominalPosSample[ipt] - mTrack2->mNominalPosSample[ipt];
862 AveSep += diff.mag();
864 AveSep = AveSep/(ipt+1.);
869 double StHbtPair::TpcExitSeparationTrackV0Neg()
const {
870 StHbtThreeVector diff = mTrack1->NominalTpcExitPoint() - mTrack2->TpcV0NegExitPoint();
874 double StHbtPair::TpcEntranceSeparationTrackV0Neg()
const {
875 StHbtThreeVector diff = mTrack1->NominalTpcEntrancePoint() - mTrack2->TpcV0NegEntrancePoint();
879 double StHbtPair::TpcAverageSeparationTrackV0Neg()
const {
883 if (mTrack1->mNominalPosSample && mTrack2->mTpcV0NegPosSample){
884 while (fabs(mTrack1->mNominalPosSample[ipt].x())<9999. &&
885 fabs(mTrack1->mNominalPosSample[ipt].y())<9999. &&
886 fabs(mTrack1->mNominalPosSample[ipt].z())<9999. &&
887 fabs(mTrack2->mTpcV0NegPosSample[ipt].x())<9999. &&
888 fabs(mTrack2->mTpcV0NegPosSample[ipt].y())<9999. &&
889 fabs(mTrack2->mTpcV0NegPosSample[ipt].z())<9999. &&
892 diff = mTrack1->mNominalPosSample[ipt] - mTrack2->mTpcV0NegPosSample[ipt];
894 AveSep += diff.mag();
896 AveSep = AveSep/(ipt+1.);
902 double StHbtPair::TpcExitSeparationV0PosV0Pos()
const {
903 StHbtThreeVector diff = mTrack1->TpcV0PosExitPoint() - mTrack2->TpcV0PosExitPoint();
907 double StHbtPair::TpcEntranceSeparationV0PosV0Pos()
const {
908 StHbtThreeVector diff = mTrack1->TpcV0PosEntrancePoint() - mTrack2->TpcV0PosEntrancePoint();
911 double StHbtPair::TpcAverageSeparationV0PosV0Pos()
const {
915 if (mTrack1->mNominalPosSample && (mTrack2->mNominalPosSample)){
916 while ((fabs(mTrack1->mNominalPosSample[ipt].x())<9999.) &&
917 (fabs(mTrack1->mNominalPosSample[ipt].y())<9999.) &&
918 (fabs(mTrack1->mNominalPosSample[ipt].z())<9999.) &&
919 (fabs(mTrack2->mNominalPosSample[ipt].x())<9999.) &&
920 (fabs(mTrack2->mNominalPosSample[ipt].y())<9999.) &&
921 (fabs(mTrack2->mNominalPosSample[ipt].z())<9999.) &&
924 diff = mTrack1->mNominalPosSample[ipt] - mTrack2->mNominalPosSample[ipt];
926 AveSep += diff.mag();
928 AveSep = AveSep/(ipt+1);
934 double StHbtPair::TpcExitSeparationV0PosV0Neg()
const {
935 StHbtThreeVector diff = mTrack1->TpcV0PosExitPoint() - mTrack2->TpcV0NegExitPoint();
939 double StHbtPair::TpcEntranceSeparationV0PosV0Neg()
const {
940 StHbtThreeVector diff = mTrack1->TpcV0PosEntrancePoint() - mTrack2->TpcV0NegEntrancePoint();
943 double StHbtPair::TpcAverageSeparationV0PosV0Neg()
const {
947 if (mTrack1->mNominalPosSample && mTrack2->mTpcV0NegPosSample){
948 while (fabs(mTrack1->mNominalPosSample[ipt].x())<9999. &&
949 fabs(mTrack1->mNominalPosSample[ipt].y())<9999. &&
950 fabs(mTrack1->mNominalPosSample[ipt].z())<9999. &&
951 fabs(mTrack2->mTpcV0NegPosSample[ipt].x())<9999. &&
952 fabs(mTrack2->mTpcV0NegPosSample[ipt].y())<9999. &&
953 fabs(mTrack2->mTpcV0NegPosSample[ipt].z())<9999. &&
956 diff = mTrack1->mNominalPosSample[ipt] - mTrack2->mTpcV0NegPosSample[ipt];
958 AveSep += diff.mag();
960 AveSep = AveSep/(ipt+1.);
966 double StHbtPair::TpcExitSeparationV0NegV0Pos()
const {
967 StHbtThreeVector diff = mTrack1->TpcV0NegExitPoint() - mTrack2->TpcV0PosExitPoint();
971 double StHbtPair::TpcEntranceSeparationV0NegV0Pos()
const {
972 StHbtThreeVector diff = mTrack1->TpcV0NegEntrancePoint() - mTrack2->TpcV0PosEntrancePoint();
975 double StHbtPair::TpcAverageSeparationV0NegV0Pos()
const {
979 if ( mTrack1->mTpcV0NegPosSample && mTrack2->mNominalPosSample){
980 while (fabs(mTrack1->mTpcV0NegPosSample[ipt].x())<9999. &&
981 fabs(mTrack1->mTpcV0NegPosSample[ipt].y())<9999. &&
982 fabs(mTrack1->mTpcV0NegPosSample[ipt].z())<9999. &&
983 fabs(mTrack2->mNominalPosSample[ipt].x())<9999. &&
984 fabs(mTrack2->mNominalPosSample[ipt].y())<9999. &&
985 fabs(mTrack2->mNominalPosSample[ipt].z())<9999. &&
988 diff = mTrack1->mTpcV0NegPosSample[ipt] - mTrack2->mNominalPosSample[ipt];
990 AveSep += diff.mag();
992 AveSep = AveSep/(ipt+1);
997 double StHbtPair::TpcExitSeparationV0NegV0Neg()
const {
998 StHbtThreeVector diff = mTrack1->TpcV0NegExitPoint() - mTrack2->TpcV0NegExitPoint();
1002 double StHbtPair::TpcEntranceSeparationV0NegV0Neg()
const {
1003 StHbtThreeVector diff = mTrack1->TpcV0NegEntrancePoint() - mTrack2->TpcV0NegEntrancePoint();
1004 return (diff.mag());
1006 double StHbtPair::TpcAverageSeparationV0NegV0Neg()
const {
1008 double AveSep = 0.0;
1010 if (mTrack1->mTpcV0NegPosSample && mTrack2->mTpcV0NegPosSample){
1011 while (fabs(mTrack1->mTpcV0NegPosSample[ipt].x())<9999. &&
1012 fabs(mTrack1->mTpcV0NegPosSample[ipt].y())<9999. &&
1013 fabs(mTrack1->mTpcV0NegPosSample[ipt].z())<9999. &&
1014 fabs(mTrack2->mTpcV0NegPosSample[ipt].x())<9999. &&
1015 fabs(mTrack2->mTpcV0NegPosSample[ipt].y())<9999. &&
1016 fabs(mTrack2->mTpcV0NegPosSample[ipt].z())<9999. &&
1019 diff = mTrack1->mTpcV0NegPosSample[ipt] - mTrack2->mTpcV0NegPosSample[ipt];
1021 AveSep += diff.mag();
1023 AveSep = AveSep/(ipt+1);
1029 void StHbtPair::CalcMergingParFctn(
short* tmpMergingParNotCalculatedFctn,
1030 float* tmpZ1,
float* tmpU1,
1031 float* tmpZ2,
float* tmpU2,
1032 int *tmpSect1,
int *tmpSect2,
1033 double* tmpFracOfMergedRow,
1034 double* tmpClosestRowAtDCA
1036 tmpMergingParNotCalculatedFctn=0;
1039 *tmpFracOfMergedRow = 0.;
1040 *tmpClosestRowAtDCA = 0.;
1042 double tDistMax = 100000000.;
1043 for(
int ti=0 ; ti<45 ; ti++){
1044 if(tmpSect1[ti]==tmpSect2[ti] && tmpSect1[ti]!=-1){
1045 tDu = fabs(tmpU1[ti]-tmpU2[ti]);
1046 tDz = fabs(tmpZ1[ti]-tmpZ2[ti]);
1049 *tmpFracOfMergedRow += (tDu<mMaxDuInner && tDz<mMaxDzInner);
1050 tDist = ::sqrt(tDu*tDu/mMaxDuInner/mMaxDuInner+
1051 tDz*tDz/mMaxDzInner/mMaxDzInner);
1054 *tmpFracOfMergedRow += (tDu<mMaxDuOuter && tDz<mMaxDzOuter);
1055 tDist = ::sqrt(tDu*tDu/mMaxDuOuter/mMaxDuOuter+
1056 tDz*tDz/mMaxDzOuter/mMaxDzOuter);
1059 mClosestRowAtDCA = ti+1;
1067 *tmpFracOfMergedRow /= tN;
1070 *tmpClosestRowAtDCA = -1;
1071 *tmpFracOfMergedRow = -1.;
double distance(const StThreeVector< double > &p, bool scanPeriods=true) const
minimal distance between point and helix
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
double ycenter() const
x-center of circle in xy-plane
double xcenter() const
aziumth in xy-plane measured from ring center