52 #include "StXiVertex.h"
53 #include "StV0Vertex.h"
55 #include "StTrackGeometry.h"
57 static const char rcsid[] =
"$Id: StXiVertex.cxx,v 2.11 2009/11/23 16:34:08 fisyak Exp $";
65 mDcaBachelorToPrimaryVertex = 0;
67 mDcaParentToPrimaryVertex = 0;
71 StXiVertex::~StXiVertex() { }
74 StXiVertex::type()
const {
return kXiVtxId; }
77 StXiVertex::numberOfDaughters()
const {
return mDaughter ? 1 : 0;}
80 StXiVertex::daughter(
unsigned int i)
82 return i == 0 ? (
StTrack*)mDaughter : 0;
86 StXiVertex::daughter(
unsigned int i)
const
88 return i == 0 ? (
const StTrack*)mDaughter : 0;
95 if (filter(mDaughter)) vec.push_back(mDaughter);
100 StXiVertex::dcaV0ToPrimaryVertex()
const
103 return mV0Vertex->dcaParentToPrimaryVertex();
109 StXiVertex::momentumOfV0()
const
112 const StThreeVectorF& nMom = mV0Vertex->momentumOfDaughter(negative);
113 const StThreeVectorF& pMom = mV0Vertex->momentumOfDaughter(positive);
114 return (nMom + pMom);
121 StXiVertex::dcaBachelorToPrimaryVertex ()
const
123 return mDcaBachelorToPrimaryVertex;
127 StXiVertex::momentumOfBachelor()
const {
return mMomentumOfBachelor; }
130 StXiVertex::momentum()
const
132 return mMomentumOfBachelor + momentumOfV0();
136 StXiVertex::dcaDaughters()
const {
return mDcaDaughters; }
139 StXiVertex::dcaParentToPrimaryVertex()
const {
return TMath::Abs(mDcaParentToPrimaryVertex); }
142 StXiVertex::signedDcaParentToPrimaryVertex()
const {
return mDcaParentToPrimaryVertex; }
145 StXiVertex::v0Vertex() {
return mV0Vertex; }
148 StXiVertex::bachelor() {
return mDaughter; }
151 StXiVertex::setDcaBachelorToPrimaryVertex(
float val)
153 mDcaBachelorToPrimaryVertex = val;
157 StXiVertex::chargeOfBachelor()
160 return b ? b->geometry()->charge() : 0;
166 mMomentumOfBachelor = v;
170 StXiVertex::setDcaDaughters(
float val) { mDcaDaughters = val; }
173 StXiVertex::setDcaParentToPrimaryVertex(
float val) { mDcaParentToPrimaryVertex = val; }
182 StXiVertex::addDaughter(
StTrack*
track) { mDaughter = track; }
188 if (track == mDaughter) mDaughter = 0;
191 void StXiVertex::Streamer(TBuffer &R__b)
195 if (R__b.IsReading()) {
197 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
199 Class()->ReadBuffer(R__b,
this, R__v, R__s, R__c);
203 StVertex::Streamer(R__b);
205 R__b >> mDcaBachelorToPrimaryVertex;
206 mMomentumOfBachelor.Streamer(R__b);
207 R__b >> mDcaDaughters;
208 R__b >> mDcaParentToPrimaryVertex;
211 R__b.CheckByteCount(R__s, R__c, Class());
215 Class()->WriteBuffer(R__b,
this);