13 #include "phys_constants.h"
15 #include "StStrangeEvMuDst.hh"
16 #include "StDecayAngle.hh"
18 #ifndef StTrackTopologyMap_hh
19 #include "StEvent/StTrackTopologyMap.h"
24 static const Float_t M_LAMBDA_2 = ::pow(M_LAMBDA,2);
25 static const Float_t M_KAON_0_SHORT_2 = ::pow(M_KAON_0_SHORT,2);
26 static const Float_t M_PROTON_2 = ::pow(M_PROTON,2);
27 static const Float_t M_ANTIPROTON_2 = ::pow(M_ANTIPROTON,2);
28 static const Float_t M_PION_PLUS_2 = ::pow(M_PION_PLUS,2);
29 static const Float_t M_PION_MINUS_2 = ::pow(M_PION_MINUS,2);
52 virtual Float_t decayVertexV0X()
const=0;
53 virtual Float_t decayVertexV0Y()
const=0;
67 virtual Float_t momPosX()
const=0;
68 virtual Float_t momPosY()
const=0;
69 virtual Float_t
momPosZ()
const=0;
72 virtual Float_t momNegX()
const=0;
73 virtual Float_t momNegY()
const=0;
74 virtual Float_t
momNegZ()
const=0;
77 virtual Float_t momV0X()
const=0;
78 virtual Float_t momV0Y()
const=0;
79 virtual Float_t
momV0Z()
const=0;
154 Float_t massHypV0(Float_t massPos, Float_t massNeg);
155 Float_t eHypV0(Float_t mass);
156 Float_t rapHypV0(Float_t mass);
157 Float_t mtHypV0(Float_t mass);
164 Float_t decayCosThetaK0Short();
165 Float_t decayCosThetaLambda();
166 Float_t decayCosThetaAntiLambda();
167 Float_t polCosThetaLambda();
168 Float_t polCosThetaAntiLambda();
169 Float_t decayCosThetaPosLambda();
170 Float_t decayCosThetaNegLambda();
171 Float_t decayCosThetaPosAntiLambda();
172 Float_t decayCosThetaNegAntiLambda();
175 Float_t
dCTV0(Float_t m1, Float_t m2, StChargeSign charge);
180 TVector3 momPosK0Short();
181 TVector3 momNegK0Short();
182 TVector3 momPosLambda();
183 TVector3 momNegLambda();
184 TVector3 momPosAntiLambda();
185 TVector3 momNegAntiLambda();
189 TVector3
momV0Frame(Float_t m1, Float_t m2, StChargeSign charge);
197 virtual Int_t
decayMode()
const {
return -1;}
200 virtual Int_t geantIdParent()
const {
return -1;}
201 virtual Int_t geantIdPositive()
const {
return -1;}
202 virtual Int_t geantIdNegative()
const {
return -1;}
203 virtual Int_t positiveSimTpcHits()
const {
return -1;}
204 virtual Int_t positiveCommonTpcHits()
const {
return -1;}
205 virtual Int_t negativeSimTpcHits()
const {
return -1;}
206 virtual Int_t negativeCommonTpcHits()
const {
return -1;}
214 virtual Int_t
keyPos()
const {
return 0;}
254 virtual Float_t
chi2V0()
const {
return 0;}
257 virtual Float_t
clV0()
const {
return 0;}
261 virtual Float_t
clPos()
const {
return 0;}
265 virtual Float_t
clNeg()
const {
return 0;}
284 Float_t MomPosAlongV0();
285 Float_t MomNegAlongV0();
300 return ::sqrt(::pow(decayVertexV0X() - mEvent->primaryVertexX(),2) +
301 ::pow(decayVertexV0Y() - mEvent->primaryVertexY(),2) +
307 return TVector3(momPosX(), momPosY(),
momPosZ());
311 return TVector3(momNegX(), momNegY(),
momNegZ());
315 return TVector3(momV0X(), momV0Y(),
momV0Z());
318 inline Float_t StV0I::Ptot2Pos() {
319 return (::pow(momPosX(),2) + ::pow(momPosY(),2) + ::pow(
momPosZ(),2));
322 inline Float_t StV0I::Ptot2Neg() {
323 return (::pow(momNegX(),2) + ::pow(momNegY(),2) + ::pow(
momNegZ(),2));
326 inline Float_t StV0I::Pt2V0() {
327 return (::pow(momV0X(),2) + ::pow(momV0Y(),2));
330 inline Float_t StV0I::Ptot2V0() {
331 return (Pt2V0() + ::pow(
momV0Z(),2));
334 inline Float_t StV0I::MomPosAlongV0() {
335 Float_t mPtot2V0 = Ptot2V0();
337 return (momPosX()*momV0X() +
343 inline Float_t StV0I::MomNegAlongV0() {
344 Float_t mPtot2V0 = Ptot2V0();
346 return (momNegX()*momV0X() +
352 inline Float_t StV0I::alphaV0() {
353 Float_t mMomPosAlongV0 = MomPosAlongV0();
354 Float_t mMomNegAlongV0 = MomNegAlongV0();
355 return (mMomPosAlongV0-mMomNegAlongV0)/
356 (mMomPosAlongV0+mMomNegAlongV0);
360 Float_t ptarmsq = Ptot2Pos() - ::pow(MomPosAlongV0(),2);
361 return ((ptarmsq > 0.) ? ::sqrt(ptarmsq) : 0.);
364 inline Float_t StV0I::eHypV0(Float_t mass) {
365 return ::sqrt(Ptot2V0()+::pow(mass,2));
369 return ::sqrt(Ptot2V0()+M_LAMBDA_2);
373 return ::sqrt(Ptot2V0()+M_KAON_0_SHORT_2);
377 return ::sqrt(Ptot2Pos()+::pow(mass,2));
381 return ::sqrt(Ptot2Neg()+::pow(mass,2));
385 return ::sqrt(Ptot2Pos()+M_PROTON_2);
389 return ::sqrt(Ptot2Neg()+M_ANTIPROTON_2);
393 return ::sqrt(Ptot2Pos()+M_PION_PLUS_2);
397 return ::sqrt(Ptot2Neg()+M_PION_MINUS_2);
400 inline Float_t StV0I::massHypV0(Float_t massPos, Float_t massNeg) {
401 Float_t msq = ::pow(
ePosHyp(massPos)+
eNegHyp(massNeg),2)-Ptot2V0();
402 return ((msq > 0.) ? ::sqrt(msq) : 0.);
417 inline Float_t StV0I::rapHypV0(Float_t mass) {
418 Float_t ehyp = eHypV0(mass);
419 Float_t mMomV0Z =
momV0Z();
420 return 0.5*::log((ehyp+mMomV0Z)/(ehyp-mMomV0Z));
425 Float_t mMomV0Z =
momV0Z();
426 return 0.5*::log((ela+mMomV0Z)/(ela-mMomV0Z));
431 Float_t mMomV0Z =
momV0Z();
432 return 0.5*::log((ek0+mMomV0Z)/(ek0-mMomV0Z));
444 return ::sqrt(Ptot2Pos()-::pow(
momPosZ(),2));
448 return ::sqrt(Ptot2Pos());
452 return ::sqrt(Ptot2Neg()-::pow(
momNegZ(),2));
456 return ::sqrt(Ptot2Neg());
460 return ::sqrt(Pt2V0());
464 return ::sqrt(Ptot2V0());
472 return (-::log(tan(
thetaV0()/2.)));
480 return (-::log(tan(
thetaPos()/2.)));
488 return (-::log(tan(
thetaNeg()/2.)));
491 inline Float_t StV0I::mtHypV0(Float_t mass) {
492 return ::sqrt(Pt2V0()+::pow(mass,2));
496 return ::sqrt(Pt2V0()+M_LAMBDA_2);
500 return ::sqrt(Pt2V0()+M_KAON_0_SHORT_2);
504 return (mtHypV0(mass)-mass);
515 inline Float_t StV0I::decayCosThetaK0Short() {
516 return dCTV0(M_KAON_0_SHORT,M_PION_PLUS,positive);
519 inline Float_t StV0I::decayCosThetaLambda() {
520 return decayCosThetaPosLambda();
523 inline Float_t StV0I::decayCosThetaAntiLambda() {
524 return decayCosThetaNegAntiLambda();
527 inline Float_t StV0I::polCosThetaLambda() {
528 return StDecayAngle::polarityCosTheta(
529 momV0X(),momV0Y(),
momV0Z(),M_LAMBDA,
530 momPosX(),momPosY(),
momPosZ(),M_PROTON);
533 inline Float_t StV0I::polCosThetaAntiLambda() {
534 return StDecayAngle::polarityCosTheta(
535 momV0X(),momV0Y(),
momV0Z(),M_LAMBDA,
536 momNegX(),momNegY(),
momNegZ(),M_PROTON);
539 inline Float_t StV0I::decayCosThetaPosLambda() {
540 return dCTV0(M_LAMBDA,M_PROTON,positive);
543 inline Float_t StV0I::decayCosThetaNegLambda() {
544 return dCTV0(M_LAMBDA,M_PION_MINUS,negative);
547 inline Float_t StV0I::decayCosThetaNegAntiLambda() {
548 return dCTV0(M_ANTILAMBDA,M_ANTIPROTON,negative);
551 inline Float_t StV0I::decayCosThetaPosAntiLambda() {
552 return dCTV0(M_ANTILAMBDA,M_PION_PLUS,positive);
555 inline Float_t
StV0I::dCTV0(Float_t m1, Float_t m2, StChargeSign charge) {
556 return ( (charge == positive) ?
557 StDecayAngle::decayCosTheta(momV0X() ,momV0Y() ,
momV0Z() ,m1,
558 momPosX(),momPosY(),
momPosZ(),m2) :
559 StDecayAngle::decayCosTheta(momV0X() ,momV0Y() ,
momV0Z() ,m1,
560 momNegX(),momNegY(),
momNegZ(),m2) );
563 inline TVector3 StV0I::momPosK0Short() {
564 return momV0Frame(M_KAON_0_SHORT,M_PION_PLUS,positive);
567 inline TVector3 StV0I::momNegK0Short() {
568 return momV0Frame(M_KAON_0_SHORT,M_PION_MINUS,negative);
571 inline TVector3 StV0I::momPosLambda() {
572 return momV0Frame(M_LAMBDA,M_PROTON,positive);
575 inline TVector3 StV0I::momNegLambda() {
576 return momV0Frame(M_LAMBDA,M_PION_MINUS,negative);
579 inline TVector3 StV0I::momPosAntiLambda() {
580 return momV0Frame(M_ANTILAMBDA,M_PION_PLUS,positive);
583 inline TVector3 StV0I::momNegAntiLambda() {
584 return momV0Frame(M_ANTILAMBDA,M_ANTIPROTON,negative);
588 return ( (charge == positive) ?
589 StDecayAngle::getShiftedDaughter(momV0X() ,momV0Y() ,
momV0Z() ,m1,
590 momPosX(),momPosY(),
momPosZ(),m2) :
591 StDecayAngle::getShiftedDaughter(momV0X() ,momV0Y() ,
momV0Z() ,m1,
592 momNegX(),momNegY(),
momNegZ(),m2) );
595 inline void StV0I::Clear() {
virtual Float_t dedxPos() const
dE/dX of pos. daughter
Float_t dCTV0(Float_t m1, Float_t m2, StChargeSign charge)
This helper function can be used for decayCosTheta of any hypothesis.
virtual Float_t clNeg() const
Confidence level of neg. daughter.
virtual void setPosBad()
Set the pos. daughter as bad.
Float_t ptotV0()
Total momentum.
TVector3 momPos()
Momentum of pos. daughter.
Float_t ePosProton()
Energy of pos. daughter assuming proton.
virtual Float_t momNegZ() const =0
Momentum components of neg. daughter.
virtual Float_t errDedxPos() const
Error on mean of dE/dX of pos. daughter.
Float_t massAntiLambda()
Mass assuming antilambda hypothesis.
virtual Float_t lenDedxNeg() const
Length of dE/dX track of neg. daughter.
Float_t ptV0()
Transverse momentum.
Float_t ptotPos()
Total momentum of pos. daughter.
Float_t pseudoRapV0()
Pseudorapidity.
virtual Float_t dedxNeg() const
dE/dX of neg. daughter
Float_t massLambda()
Mass assuming lambda hypothesis.
virtual Float_t chi2V0() const
Chi square of V0.
Float_t eNegHyp(Float_t mass)
Energy of neg. daughter.
TVector3 momV0()
Momentum of V0.
virtual Float_t dcaPosToPrimVertex() const
DCA of pos v0 daughter to pri vertex.
virtual Float_t momPosZ() const =0
Momentum components of pos. daughter.
virtual Int_t decayMode() const
Float_t mtLambda()
Transverse mass assuming lambda.
virtual Float_t dcaNegToPrimVertex() const
DCA of neg v0 daughter to pri vertex.
Float_t rapK0Short()
Rapidity assuming k-short.
virtual Int_t keyPos() const
Pos. daughter track key.
Float_t eNegPion()
Energy of neg. daughter assuming pion.
virtual Float_t decayLengthV0() const
3-d decay distance
Float_t eNegProton()
Energy of neg. daughter assuming antiproton.
Float_t ptArmV0()
Armenteros-Podolanski variables.
virtual Float_t clPos() const
Confidence level of pos. daughter.
Float_t eK0Short()
Energy assuming k-short hypothesis.
Float_t thetaPos()
Polar angle theta of pos. daughter.
Float_t thetaV0()
Polar angle theta.
virtual StTrackTopologyMap & topologyMapNeg()
Neg. daughter track topology map.
Float_t cTauLambda()
Lifetime (ctau) assuming (anti)lambda.
virtual Float_t dcaV0Daughters() const
DCA of v0 daughters at decay vertex.
virtual void setNegBad()
Set the neg. daughter as bad.
Float_t cTauK0Short()
Lifetime (ctau) assuming k-short.
Float_t pseudoRapPos()
Pseudorapidity of pos. daughter.
virtual Float_t lenDedxPos() const
Length of dE/dX track of pos. daughter.
virtual Float_t clV0() const
Confidence level of V0.
Float_t thetaNeg()
Polar angle theta of neg. daughter.
Float_t ptPos()
Transverse momentum of pos. daughter.
Float_t mtK0Short()
Transverse mass assuming k-short.
Float_t ptotNeg()
Total momentum of neg. daughter.
Float_t mtm0K0Short()
mt-m0 assuming k-short
virtual Float_t decayVertexV0Z() const =0
Coordinates of decay vertex.
Float_t mtm0HypV0(Float_t mass)
Energy, rapidity, mt, mt-m0 of V0 assuming its mass.
TVector3 momNeg()
Momentum of neg. daughter.
StStrangeEvMuDst * event()
Pointer to event information.
Float_t ptNeg()
Transverse momentum of neg. daughter.
virtual StTrackTopologyMap & topologyMapPos()
Pos. daughter track topology map.
virtual Float_t chi2Pos() const
Chi square of pos. daughter.
Float_t rapLambda()
Rapidity assuming (anti)lambda.
Float_t eLambda()
Energy assuming lambda hypothesis.
virtual Long_t detectorIdPars()
Detector ID for pars used in V0 finder.
virtual void SetEvent(StStrangeEvMuDst *)
Set pointer to event information.
virtual Int_t keyNeg() const
Neg. daughter track key.
virtual UShort_t numDedxNeg() const
Number of dE/dX points for neg. daughter.
Float_t primaryVertexZ() const
Primary vtx position coordinates.
virtual Float_t momV0Z() const =0
Momentum components of V0.
Float_t massK0Short()
Mass assuming k-short hypothesis.
virtual UShort_t numDedxPos() const
Number of dE/dX points for pos. daughter.
virtual Float_t errDedxNeg() const
Error on mean of dE/dX of neg. daughter.
Float_t ePosPion()
Energy of pos. daughter assuming pion.
Float_t ePosHyp(Float_t mass)
Energy of pos. daughter assuming its mass.
TVector3 momV0Frame(Float_t m1, Float_t m2, StChargeSign charge)
virtual Long_t detectorIdV0()
Detector ID for V0 Vertex.
virtual Float_t chi2Neg() const
Chi square of neg. daughter.
Float_t pseudoRapNeg()
Pseudorapidity of neg. daughter.
virtual Float_t dcaV0ToPrimVertex() const
DCA of v0 to primary vertex.
Float_t mtm0Lambda()
mt-m0 assuming lambda
virtual Bool_t bad() const
Test whether either daughter is bad.