74 #include "StStrangeTagsMaker.h"
76 #include "StV0Vertex.h"
77 #include "StXiVertex.h"
78 #include "StEventTypes.h"
81 #include "PhysicalConstants.h"
82 #include "phys_constants.h"
93 StStrangeTagsMaker::~StStrangeTagsMaker()
98 Int_t StStrangeTagsMaker::Init()
102 mMasspi2 = pion_plus_mass_c2 * pion_plus_mass_c2;
103 mMasspr2 = proton_mass_c2 * proton_mass_c2;
104 mMassla2 = lambda_mass_c2 * lambda_mass_c2;
105 mMasska2 = M_KAON_MINUS * M_KAON_MINUS;
107 return StMaker::Init();
112 mTagTable =
new StrangeTag_st;
113 mEvent = (
StEvent *) GetInputDS(
"StEvent");
114 if (!mEvent)
return kStOK;
117 St_StrangeTag *StrangeTag =
new St_StrangeTag(
"StrangeTag",1);
119 StrangeTag->AddAt(mTagTable,0);
120 delete mTagTable; mTagTable=0;
125 StrangeTag_st* StStrangeTagsMaker::tag()
130 void StStrangeTagsMaker::fillTag()
132 StSPtrVecV0Vertex& v0Vertices = mEvent->v0Vertices();
133 size_t v0tot = v0Vertices.size();
134 StSPtrVecXiVertex& xiVertices = mEvent->xiVertices();
135 size_t castot = xiVertices.size();
149 Int_t nbelowXibar = 0;
151 Int_t naboveXibar = 0;
155 Int_t nbelowOmbar = 0;
157 Int_t naboveOmbar = 0;
170 Float_t maxPtXibar=0.0;
172 Float_t maxPtOmbar=0.0;
173 Float_t maxPtKinkPos=0.0;
174 Float_t maxPtKinkNeg=0.0;
178 for (i=0; i<v0tot; i++) {
180 const StThreeVectorF& nMom = vertex->momentumOfDaughter(negative);
181 const StThreeVectorF& pMom = vertex->momentumOfDaughter(positive);
183 Float_t pN2 = nMom.mag2();
184 Float_t pP2 = pMom.mag2();
185 Float_t pV2 = vMom.mag2();
186 Float_t eNpi = ::sqrt(pN2 + mMasspi2);
187 Float_t eNpr = ::sqrt(pN2 + mMasspr2);
188 Float_t ePpi = ::sqrt(pP2 + mMasspi2);
189 Float_t ePpr = ::sqrt(pP2 + mMasspr2);
190 Float_t eK0 = eNpi + ePpi;
191 Float_t eLa = eNpi + ePpr;
192 Float_t eLb = eNpr + ePpi;
193 Float_t maK0 = ::sqrt(eK0*eK0 - pV2);
194 Float_t maLa = ::sqrt(eLa*eLa - pV2);
195 Float_t maLb = ::sqrt(eLb*eLb - pV2);
198 Float_t ptV0 = TMath::Sqrt((vMom.x()*vMom.x())+(vMom.y()*vMom.y()));
201 perc = (maK0/kaon_0_short_mass_c2) - 1.;
202 if (TMath::Abs(perc) < (2.0*mRange))
205 if(ptV0>maxPtK0) maxPtK0=ptV0;
207 else if (TMath::Abs(perc + (2.0*m2Range)) < (2.0*mRange)) nbelowK0++;
208 else if (TMath::Abs(perc - (2.0*m2Range)) < (2.0*mRange)) naboveK0++;
210 perc = (maLa/lambda_mass_c2) - 1.;
211 if (TMath::Abs(perc) < (0.5*mRange))
214 if(ptV0>maxPtLa) maxPtLa=ptV0;
216 else if (TMath::Abs(perc + (0.5*m2Range)) < (0.5*mRange)) nbelowLa++;
217 else if (TMath::Abs(perc - (0.5*m2Range)) < (0.5*mRange)) naboveLa++;
219 perc = (maLb/antilambda_mass_c2) - 1.;
220 if (TMath::Abs(perc) < (0.5*mRange))
223 if(ptV0>maxPtLb) maxPtLb=ptV0;
225 else if (TMath::Abs(perc + (0.5*m2Range)) < (0.5*mRange)) nbelowLb++;
226 else if (TMath::Abs(perc - (0.5*m2Range)) < (0.5*mRange)) naboveLb++;
232 for (i=0; i<castot; i++) {
235 double pcharge = vertex->chargeOfBachelor();
238 Float_t pB2 = bMom.mag2();
239 Float_t pL2 = lMom.mag2();
240 Float_t pC2 = cMom.mag2();
241 Float_t epi = ::sqrt(pB2 + mMasspi2);
242 Float_t eka = ::sqrt(pB2 + mMasska2);
243 Float_t ela = ::sqrt(pL2 + mMassla2);
244 Float_t eXi = ela + epi;
245 Float_t maXi = ::sqrt(eXi*eXi - pC2);
246 Float_t eOm = ela + eka;
247 Float_t maOm = ::sqrt(eOm*eOm - pC2);
249 Float_t ptCas = TMath::Sqrt((cMom.x()*cMom.x())+(cMom.y()*cMom.y()));
250 perc = (maXi/xi_minus_mass_c2) - 1.;
254 if (TMath::Abs(perc) < mRange)
257 if(ptCas>maxPtXi) maxPtXi=ptCas;
259 else if (TMath::Abs(perc + m2Range) < mRange) nbelowXi++;
260 else if (TMath::Abs(perc - m2Range) < mRange) naboveXi++;
264 if (TMath::Abs(perc) < mRange)
267 if(ptCas>maxPtXibar) maxPtXibar=ptCas;
269 else if (TMath::Abs(perc + m2Range) < mRange) nbelowXibar++;
270 else if (TMath::Abs(perc - m2Range) < mRange) naboveXibar++;
274 perc = (maOm/M_OMEGA_MINUS) - 1.;
277 if (TMath::Abs(perc) < mRange)
280 if(ptCas>maxPtOm) maxPtOm=ptCas;
282 else if (TMath::Abs(perc + m2Range) < mRange) nbelowOm++;
283 else if (TMath::Abs(perc - m2Range) < mRange) naboveOm++;
287 if (TMath::Abs(perc) < mRange)
290 if(ptCas>maxPtOmbar) maxPtOmbar=ptCas;
292 else if (TMath::Abs(perc + m2Range) < mRange) nbelowOmbar++;
293 else if (TMath::Abs(perc - m2Range) < mRange) naboveOmbar++;
300 StSPtrVecKinkVertex& kinkVertices = mEvent->kinkVertices();
301 for(StSPtrVecKinkVertexIterator i=kinkVertices.begin();i != kinkVertices.end();i++){
302 StTrack* parentTrack=(*i)->parent();
303 Int_t charge = parentTrack->geometry()->charge();
304 Float_t ptKink = parentTrack->geometry()->momentum().perp();
307 if(ptKink > maxPtKinkPos) maxPtKinkPos = ptKink;
309 else if (charge < 0){
311 if(ptKink > maxPtKinkNeg) maxPtKinkNeg = ptKink;
315 mTagTable->NV0 = v0tot;
316 mTagTable->NbelowK0 = nbelowK0;
317 mTagTable->NK0 = nK0;
318 mTagTable->NaboveK0 = naboveK0;
319 mTagTable->NbelowLa = nbelowLa;
320 mTagTable->NLa = nLa;
321 mTagTable->NaboveLa = naboveLa;
322 mTagTable->NbelowLb = nbelowLb;
323 mTagTable->NLb = nLb;
324 mTagTable->NaboveLb = naboveLb;
325 mTagTable->NbelowXi = nbelowXi;
326 mTagTable->NXi = nXi;
327 mTagTable->NaboveXi = naboveXi;
328 mTagTable->NbelowXibar = nbelowXibar;
329 mTagTable->NXibar = nXibar;
330 mTagTable->NaboveXibar = naboveXibar;
331 mTagTable->NbelowOm = nbelowOm;
332 mTagTable->NOm = nOm;
333 mTagTable->NaboveOm = naboveOm;
334 mTagTable->NbelowOmbar = nbelowOmbar;
335 mTagTable->NOmbar = nOmbar;
336 mTagTable->NaboveOmbar = naboveOmbar;
338 mTagTable->MaxPtK0 = maxPtK0;
339 mTagTable->MaxPtLa = maxPtLa;
340 mTagTable->MaxPtLb = maxPtLb;
341 mTagTable->MaxPtXi = maxPtXi;
342 mTagTable->MaxPtXibar = maxPtXibar;
343 mTagTable->MaxPtOm = maxPtOm;
344 mTagTable->MaxPtOmbar = maxPtOmbar;
346 mTagTable->range = mRange;
348 mTagTable->NKinkPos = nKinkPos;
349 mTagTable->NKinkNeg = nKinkNeg;
350 mTagTable->MaxPtKinkPos = maxPtKinkPos;
351 mTagTable->MaxPtKinkNeg = maxPtKinkNeg;
355 void StStrangeTagsMaker::printTag(ostream& os)
357 os <<
"--- Strangeness Tag Table ---" << endl;
359 os <<
"(empty)" << endl;
361 os <<
"Range used: +/-" << mTagTable->range <<
" * M" << endl;
362 os <<
"No. V0's: " << mTagTable->NV0 << endl;
363 os <<
"No. K0's: " << mTagTable->NK0 << endl;
364 os <<
"No. La's: " << mTagTable->NLa << endl;
365 os <<
"No. Lb's: " << mTagTable->NLb << endl;
366 os <<
"No. Xi's: " << mTagTable->NXi << endl;
367 os <<
"No. Xibar's: " << mTagTable->NXi << endl;
368 os <<
"No. Om's: " << mTagTable->NOm << endl;
369 os <<
"No. Ombar's: " << mTagTable->NOmbar << endl;
370 os <<
"Backgrounds: (same bin size)" << endl;
371 os <<
"No. below K0's: " << mTagTable->NbelowK0 << endl;
372 os <<
"No. above K0's: " << mTagTable->NaboveK0 << endl;
373 os <<
"No. below La's: " << mTagTable->NbelowLa << endl;
374 os <<
"No. above La's: " << mTagTable->NaboveLa << endl;
375 os <<
"No. below Lb's: " << mTagTable->NbelowLb << endl;
376 os <<
"No. above Lb's: " << mTagTable->NaboveLb << endl;
377 os <<
"No. below Xi's: " << mTagTable->NbelowXi << endl;
378 os <<
"No. above Xi's: " << mTagTable->NaboveXi << endl;
379 os <<
"No. below Xibar's: " << mTagTable->NbelowXibar << endl;
380 os <<
"No. above Xibar's: " << mTagTable->NaboveXibar << endl;
381 os <<
"No. below Om's: " << mTagTable->NbelowOm << endl;
382 os <<
"No. above Om's: " << mTagTable->NaboveOm << endl;
383 os <<
"No. below Ombar's: " << mTagTable->NbelowOmbar << endl;
384 os <<
"No. above Ombar's: " << mTagTable->NaboveOmbar << endl;
385 os <<
"Rare probe tags: (same ranges)" << endl;
386 os <<
"max Pt K0: " << mTagTable->MaxPtK0 << endl;
387 os <<
"max Pt La: " << mTagTable->MaxPtLa << endl;
388 os <<
"max Pt Lb: " << mTagTable->MaxPtLb << endl;
389 os <<
"max Pt Xi: " << mTagTable->MaxPtXi << endl;
390 os <<
"max Pt Xibar: " << mTagTable->MaxPtXibar << endl;
391 os <<
"max Pt Om: " << mTagTable->MaxPtOm << endl;
392 os <<
"max Pt Ombar: " << mTagTable->MaxPtOmbar << endl;
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.