StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StXiI.hh
Go to the documentation of this file.
1 
12 #ifndef StXiI_hh
13 #define StXiI_hh
14 
15 #include "StV0I.hh"
16 static const Float_t M_OMEGA_2 = ::pow(M_OMEGA_MINUS,2);
17 static const Float_t M_XI_2 = ::pow(M_XI_MINUS,2);
18 static const Float_t M_KAON_MINUS_2 = ::pow(M_KAON_MINUS,2);
19 
21 enum StXiDaughter {bachelor, v0};
22 
23 
24 class StXiI : public virtual StV0I {
25 public:
26  StXiI();
27  virtual ~StXiI() {}
28 
29 // ************************************************************************
31 // ************************************************************************
32 
34  virtual Int_t charge() const=0;
37 
39 
40  Float_t decayDistanceV0() const;
43  virtual Float_t decayLengthV0() const;
45  Float_t decayLengthXi() const;
46  virtual Float_t decayVertexXiX() const=0;
47  virtual Float_t decayVertexXiY() const=0;
48  virtual Float_t decayVertexXiZ() const=0;
49  Float_t alphaXi();
50  Float_t ptArmXi();
52  Float_t cTauOmega();
54  Float_t cTauXi();
56 
58 
59  TVector3 momBachelor();
61  virtual Float_t momBachelorX() const=0;
62  virtual Float_t momBachelorY() const=0;
63  virtual Float_t momBachelorZ() const=0;
64 
66  virtual TVector3 momXi()=0;
67  virtual Float_t momXiX()=0;
68  virtual Float_t momXiY()=0;
69  virtual Float_t momXiZ()=0;
70 
72  virtual TVector3 momXiAtPrimVertex()=0;
73  virtual Float_t momXiAtPrimVertexX()=0;
74  virtual Float_t momXiAtPrimVertexY()=0;
75  virtual Float_t momXiAtPrimVertexZ()=0;
76 
78  Float_t ptXi();
80  Float_t ptBachelor();
82  Float_t ptotXi();
84  Float_t ptotBachelor();
86 
88 
89  Float_t eOmega();
92  Float_t eXi();
94  Float_t eBachelorPion();
96  Float_t eBachelorKaon();
98  Float_t massOmega();
100  Float_t massXi();
102  Float_t rapOmega();
104  Float_t rapXi();
106 
108 
109  Float_t thetaXi();
112  Float_t thetaBachelor();
114  Float_t pseudoRapXi();
116  Float_t pseudoRapBachelor();
118 
120 
121  Float_t mtOmega();
124  Float_t mtXi();
126  Float_t mtm0Omega();
128  Float_t mtm0Xi();
130 
132 
133  Float_t eBachelorHyp(Float_t mass);
136  Float_t massHypXi(Float_t massV0, Float_t massBachelor);
137  Float_t eHypXi(Float_t mass);
138  Float_t rapHypXi(Float_t mass);
139  Float_t mtHypXi(Float_t mass);
141  Float_t mtm0HypXi(Float_t mass);
143 
145 
146  Float_t decayCosThetaBachelorXi(); // xi - bachelor
147  Float_t decayCosThetaV0Xi(); // xi - V0
148  Float_t decayCosThetaBachelorOmega(); // omega - bachelor
149  Float_t decayCosThetaV0Omega(); // omega - V0
151 
152  Float_t dCTXi(Float_t m1, Float_t m2, StXiDaughter type);
154 
156 
157  TVector3 momBachelorXi(); // xi - bachelor
158  TVector3 momV0Xi(); // xi - V0
159  TVector3 momBachelorOmega(); // omega - bachelor
160  TVector3 momV0Omega(); // omega - V0
163 
164  TVector3 momXiFrame(Float_t m1, Float_t m2, StXiDaughter type);
166 
167 // ************************************************************************
169 // ************************************************************************
170 
172  virtual Int_t V0Index() {return -1;}
174 
175 // ************************************************************************
177 // ************************************************************************
178 
180  virtual Int_t keyBachelor() const {return 0;}
183  virtual StTrackTopologyMap& topologyMapBachelor() {return (*gFakeTopoPtr);}
185  virtual Float_t dedxBachelor() const {return 0;}
187  virtual Float_t errDedxBachelor() const {return 0;}
189  virtual UShort_t numDedxBachelor() const {return 0;}
191  virtual Float_t lenDedxBachelor() const {return 0;}
193 
195 
196  virtual Float_t dcaXiDaughters() const {return 0;}
199  virtual Float_t dcaBachelorToPrimVertex() const {return -1;}
201  virtual Float_t dcaXiToPrimVertex() const {return -1;}
203 
205 
206  virtual Float_t chi2Xi() const {return 0;}
209  virtual Float_t clXi() const {return 0;}
211  virtual Float_t chi2Bachelor() const {return 0;}
213  virtual Float_t clBachelor() const {return 0;}
215  virtual Long_t detectorIdXi() {return 0;}
217  virtual Long_t detectorIdPars() {return 0;}
219  virtual void setBachelorBad() {}
221  virtual Bool_t bad() const {return (chi2Bachelor()<0 || StV0I::bad());}
223 
224 
225 protected:
226  Float_t Ptot2Bachelor();
227  Float_t Ptot2Xi();
228  Float_t Pt2Xi();
229  Float_t MomBachelorAlongXi();
230  Float_t MomV0AlongXi();
231 };
232 
233 inline StXiI::StXiI() : StV0I() {}
234 
235 inline Float_t StXiI::decayDistanceV0() const {
236  return StV0I::decayLengthV0();
237 }
238 
239 inline Float_t StXiI::decayLengthV0() const {
240  return ::sqrt(::pow(decayVertexV0X() - decayVertexXiX(),2) +
241  ::pow(decayVertexV0Y() - decayVertexXiY(),2) +
242  ::pow(decayVertexV0Z() - decayVertexXiZ(),2));
243 }
244 
245 inline Float_t StXiI::decayLengthXi() const {
246  return ::sqrt(::pow(decayVertexXiX() - mEvent->primaryVertexX(),2) +
247  ::pow(decayVertexXiY() - mEvent->primaryVertexY(),2) +
248  ::pow(decayVertexXiZ() - mEvent->primaryVertexZ(),2));
249 }
250 
251 inline TVector3 StXiI::momBachelor() {
252  return TVector3(momBachelorX(), momBachelorY(), momBachelorZ());
253 }
254 
255 inline Float_t StXiI::alphaXi() {
256  Float_t mMomBachelorAlongXi = MomBachelorAlongXi();
257  Float_t mMomV0AlongXi = MomV0AlongXi();
258  return (((Float_t) charge()) * (mMomBachelorAlongXi-mMomV0AlongXi)/
259  (mMomBachelorAlongXi+mMomV0AlongXi));
260 }
261 
262 inline Float_t StXiI::ptArmXi() {
263  Float_t ptarmsq = Ptot2V0() - ::pow(MomV0AlongXi(),2);
264  return ((ptarmsq > 0.) ? ::sqrt(ptarmsq) : 0.);
265 }
266 
267 inline Float_t StXiI::eOmega() {
268  return ::sqrt(Ptot2Xi()+M_OMEGA_2);
269 }
270 
271 inline Float_t StXiI::eXi() {
272  return ::sqrt(Ptot2Xi()+M_XI_2);
273 }
274 
275 inline Float_t StXiI::eHypXi(Float_t mass) {
276  return ::sqrt(Ptot2Xi()+::pow(mass,2));
277 }
278 
279 inline Float_t StXiI::eBachelorHyp(Float_t mass) {
280  return ::sqrt(Ptot2Bachelor()+::pow(mass,2));
281 }
282 
283 inline Float_t StXiI::eBachelorPion() {
284  return ::sqrt(Ptot2Bachelor()+M_PION_MINUS_2);
285 }
286 
287 inline Float_t StXiI::eBachelorKaon() {
288  return ::sqrt(Ptot2Bachelor()+M_KAON_MINUS_2);
289 }
290 
291 inline Float_t StXiI::massHypXi(Float_t massV0, Float_t massBachelor) {
292  Float_t msq = ::pow(eHypV0(massV0)+eBachelorHyp(massBachelor),2)-Ptot2Xi();
293  return ((msq > 0.) ? ::sqrt(msq) : 0.);
294 }
295 
296 inline Float_t StXiI::massOmega() {
297  return ::sqrt(::pow(eLambda()+eBachelorKaon(),2)-Ptot2Xi());
298 }
299 
300 inline Float_t StXiI::massXi() {
301  return ::sqrt(::pow(eLambda()+eBachelorPion(),2)-Ptot2Xi());
302 }
303 
304 inline Float_t StXiI::rapHypXi(Float_t mass) {
305  Float_t mMomXiZ = momXiZ();
306  Float_t eX = eHypXi(mass);
307  return 0.5*::log((eX+mMomXiZ)/(eX-mMomXiZ));
308 }
309 
310 inline Float_t StXiI::rapOmega() {
311  Float_t mMomXiZ = momXiZ();
312  Float_t eom = eOmega();
313  return 0.5*::log((eom+mMomXiZ)/(eom-mMomXiZ));
314 }
315 
316 inline Float_t StXiI::rapXi() {
317  Float_t mMomXiZ = momXiZ();
318  Float_t exi = eXi();
319  return 0.5*::log((exi+mMomXiZ)/(exi-mMomXiZ));
320 }
321 
322 inline Float_t StXiI::cTauOmega() {
323  return M_OMEGA_MINUS*decayLengthXi()/::sqrt(Ptot2Xi());
324 }
325 
326 inline Float_t StXiI::cTauXi() {
327  return M_XI_MINUS*decayLengthXi()/::sqrt(Ptot2Xi());
328 }
329 
330 inline Float_t StXiI::ptBachelor() {
331  return ::sqrt(Ptot2Bachelor()-::pow(momBachelorZ(),2));
332 }
333 
334 inline Float_t StXiI::ptotBachelor() {
335  return ::sqrt(Ptot2Bachelor());
336 }
337 
338 inline Float_t StXiI::ptXi() {
339  return ::sqrt(Pt2Xi());
340 }
341 
342 inline Float_t StXiI::ptotXi() {
343  return ::sqrt(Ptot2Xi());
344 }
345 
346 inline Float_t StXiI::thetaXi() {
347  return acos(momXiZ()/ptotXi());
348 }
349 
350 inline Float_t StXiI::pseudoRapXi() {
351  return (-::log(tan(thetaXi()/2.)));
352 }
353 
354 inline Float_t StXiI::thetaBachelor() {
355  return acos(momBachelorZ()/ptotBachelor());
356 }
357 
358 inline Float_t StXiI::pseudoRapBachelor() {
359  return (-::log(tan(thetaBachelor()/2.)));
360 }
361 
362 inline Float_t StXiI::mtHypXi(Float_t mass) {
363  return ::sqrt(Pt2Xi() + ::pow(mass,2));
364 }
365 
366 inline Float_t StXiI::mtOmega() {
367  return ::sqrt(Pt2Xi() + M_OMEGA_2);
368 }
369 
370 inline Float_t StXiI::mtXi() {
371  return ::sqrt(Pt2Xi() + M_XI_2);
372 }
373 
374 inline Float_t StXiI::mtm0HypXi(Float_t mass) {
375  return (mtHypXi(mass) - mass);
376 }
377 
378 inline Float_t StXiI::mtm0Omega() {
379  return (mtOmega() - M_OMEGA_MINUS);
380 }
381 
382 inline Float_t StXiI::mtm0Xi() {
383  return (mtXi() - M_XI_MINUS);
384 }
385 
386 inline Float_t StXiI::Ptot2Bachelor () {
387  return (::pow(momBachelorX(),2) +
388  ::pow(momBachelorY(),2) + ::pow(momBachelorZ(),2));
389 }
390 
391 inline Float_t StXiI::Pt2Xi() {
392  return (::pow(momXiX(),2) + ::pow(momXiY(),2));
393 }
394 
395 inline Float_t StXiI::Ptot2Xi() {
396  return (Pt2Xi() + ::pow(momXiZ(),2));
397 }
398 
399 inline Float_t StXiI::MomBachelorAlongXi() {
400  Float_t mPtot2Xi = Ptot2Xi();
401  if (mPtot2Xi)
402  return (momBachelorX()*momXiX() +
403  momBachelorY()*momXiY() +
404  momBachelorZ()*momXiZ()) / ::sqrt(mPtot2Xi);
405  return 0.;
406 }
407 
408 inline Float_t StXiI::MomV0AlongXi() {
409  Float_t mPtot2Xi = Ptot2Xi();
410  if (mPtot2Xi)
411  return (momV0X()*momXiX() +
412  momV0Y()*momXiY() +
413  momV0Z()*momXiZ()) / ::sqrt(mPtot2Xi);
414  return 0.;
415 }
416 
417 inline Float_t StXiI::decayCosThetaBachelorXi() {
418  return dCTXi(M_XI_MINUS,M_PION_MINUS,bachelor);
419 }
420 
421 inline Float_t StXiI::decayCosThetaV0Xi() {
422  return dCTXi(M_XI_MINUS,M_LAMBDA,v0);
423 }
424 
425 inline Float_t StXiI::decayCosThetaBachelorOmega() {
426  return dCTXi(M_OMEGA_MINUS,M_KAON_MINUS,bachelor);
427 }
428 
429 inline Float_t StXiI::decayCosThetaV0Omega() {
430  return dCTXi(M_OMEGA_MINUS,M_LAMBDA,v0);
431 }
432 
433 inline Float_t StXiI::dCTXi(Float_t m1, Float_t m2, StXiDaughter type) {
434  return ( (type == bachelor) ?
435  StDecayAngle::decayCosTheta(momXiX(),momXiY(),momXiZ(),m1,
436  momBachelorX(),momBachelorY(),momBachelorZ(),m2) :
437  StDecayAngle::decayCosTheta(momXiX(),momXiY(),momXiZ(),m1,
438  momV0X(),momV0Y(),momV0Z(),m2) );
439 }
440 
441 inline TVector3 StXiI::momBachelorXi() {
442  return momXiFrame(M_XI_MINUS,M_PION_MINUS,bachelor);
443 }
444 
445 inline TVector3 StXiI::momV0Xi() {
446  return momXiFrame(M_XI_MINUS,M_LAMBDA,v0);
447 }
448 
449 inline TVector3 StXiI::momBachelorOmega() {
450  return momXiFrame(M_OMEGA_MINUS,M_KAON_MINUS,bachelor);
451 }
452 
453 inline TVector3 StXiI::momV0Omega() {
454  return momXiFrame(M_OMEGA_MINUS,M_LAMBDA,v0);
455 }
456 
457 inline TVector3 StXiI::momXiFrame(Float_t m1, Float_t m2, StXiDaughter type) {
458  return ( (type == bachelor) ?
459  StDecayAngle::getShiftedDaughter(momXiX(),momXiY(),momXiZ(),m1,
460  momBachelorX(),momBachelorY(),momBachelorZ(),m2) :
461  StDecayAngle::getShiftedDaughter(momXiX(),momXiY(),momXiZ(),m1,
462  momV0X(),momV0Y(),momV0Z(),m2) );
463 }
464 
465 #endif
466 
467 
468 /***********************************************************************
469  * $Id: StXiI.hh,v 3.14 2011/05/27 18:25:32 genevb Exp $
470  * $Log: StXiI.hh,v $
471  * Revision 3.14 2011/05/27 18:25:32 genevb
472  * Propagate StTrack::key => Int_t to other codes
473  *
474  * Revision 3.13 2008/07/10 16:16:55 genevb
475  * Allow for marking of bad tracks -> bad secondary vertices
476  *
477  * Revision 3.12 2003/10/26 06:06:01 genevb
478  * Added checks for sqrt of neg. numbers
479  *
480  * Revision 3.11 2003/09/07 03:49:05 perev
481  * gcc 3.2 + WarnOff
482  *
483  * Revision 3.10 2003/09/02 17:59:04 perev
484  * gcc 3.2 updates + WarnOff
485  *
486  * Revision 3.9 2003/08/26 22:36:28 genevb
487  * Calculate Xi momenta at/near primary vertex
488  *
489  * Revision 3.8 2003/05/30 21:20:20 genevb
490  * doxygen savvy, encoding of FTPC mults, change virtual funcs
491  *
492  * Revision 3.7 2002/07/30 20:07:52 genevb
493  * Better cTau calcs
494  *
495  * Revision 3.6 2002/04/30 16:02:48 genevb
496  * Common muDst, improved MC code, better kinks, StrangeCuts now a branch
497  *
498  * Revision 3.5 2002/02/10 15:29:09 genevb
499  * Additional functions for momenta of decay daughters in CM frame
500  *
501  * Revision 3.4 2001/11/28 05:14:59 genevb
502  * Additional decay angle functions
503  *
504  * Revision 3.3 2001/11/05 23:41:07 genevb
505  * Add more dEdx, B field info, careful of changes to TTree unrolling
506  *
507  * Revision 3.2 2001/08/23 13:20:59 genevb
508  * Many bug workarounds...
509  *
510  * Revision 3.1 2001/05/04 20:15:15 genevb
511  * Common interfaces and reorganization of components, add MC event info
512  *
513  ***********************************************************************/
Float_t mtm0Xi()
mt-m0 assuming (anti)Xi
Definition: StXiI.hh:382
virtual TVector3 momXi()=0
Momentum of Xi/Omega at decay vertex.
virtual Float_t chi2Bachelor() const
Chi square of bachelor.
Definition: StXiI.hh:211
virtual Float_t dedxBachelor() const
dE/dX of bachelor
Definition: StXiI.hh:185
Float_t rapOmega()
Rapidity assuming (anti)Omega.
Definition: StXiI.hh:310
Definition: StV0I.hh:31
Float_t eBachelorKaon()
Energy of bachelor assuming kaon.
Definition: StXiI.hh:287
virtual Float_t clXi() const
Confidence level of Xi.
Definition: StXiI.hh:209
Float_t massHypXi(Float_t massV0, Float_t massBachelor)
Invariant mass assuming daughter masses.
Definition: StXiI.hh:291
virtual Int_t keyBachelor() const
Bachelor track key.
Definition: StXiI.hh:181
Float_t cTauXi()
Lifetime (ctau) assuming (anti)Xi.
Definition: StXiI.hh:326
Float_t pseudoRapBachelor()
Pseudorapidity of bachelor.
Definition: StXiI.hh:358
TVector3 momXiFrame(Float_t m1, Float_t m2, StXiDaughter type)
Definition: StXiI.hh:457
Float_t decayDistanceV0() const
3-d distance of V0 decay from primary vertex
Definition: StXiI.hh:235
Float_t mtm0HypXi(Float_t mass)
Energy, rapidity, mt, mt-m0 of Xi assuming its mass.
Definition: StXiI.hh:374
Float_t dCTXi(Float_t m1, Float_t m2, StXiDaughter type)
This helper function can be used for decayCosTheta of any hypothesis.
Definition: StXiI.hh:433
virtual void setBachelorBad()
Set the bachelor as bad.
Definition: StXiI.hh:219
Float_t eOmega()
Energy assuming Omega hypothesis.
Definition: StXiI.hh:267
virtual UShort_t numDedxBachelor() const
Number of dE/dX points for bachelor.
Definition: StXiI.hh:189
TVector3 momBachelor()
Momentum of bachelor.
Definition: StXiI.hh:251
Definition: StXiI.hh:24
Float_t ptotBachelor()
Total momentum of bachelor.
Definition: StXiI.hh:334
Float_t pseudoRapXi()
Pseudorapidity of Xi/Omega.
Definition: StXiI.hh:350
Float_t thetaXi()
Polar angle theta of Xi/Omega.
Definition: StXiI.hh:346
virtual Float_t decayLengthV0() const
3-d decay distance
Definition: StV0I.hh:298
virtual Float_t lenDedxBachelor() const
Length of dE/dX track for bachelor.
Definition: StXiI.hh:191
virtual Long_t detectorIdPars()
Detector ID for pars used in Xi finder.
Definition: StXiI.hh:217
Float_t decayLengthXi() const
3-d decay distance of Xi
Definition: StXiI.hh:245
Float_t mtXi()
Transverse mass assuming (anti)Xi.
Definition: StXiI.hh:370
Float_t ptBachelor()
Transverse momentum of bachelor.
Definition: StXiI.hh:330
Float_t cTauOmega()
Lifetime (ctau) assuming (anti)Omega.
Definition: StXiI.hh:322
virtual Float_t decayVertexXiZ() const =0
Coordinates of decay vertex.
Float_t mtm0Omega()
mt-m0 assuming (anti)Omega
Definition: StXiI.hh:378
virtual Float_t clBachelor() const
Confidence level of bachelor.
Definition: StXiI.hh:213
virtual Float_t momXiAtPrimVertexZ()=0
Momentum components of Xi/Omega at primary vertex.
Float_t ptXi()
Transverse momentum of Xi/Omega.
Definition: StXiI.hh:338
virtual Bool_t bad() const
Test whether any child is bad.
Definition: StXiI.hh:221
Float_t eXi()
Energy assuming Xi hypothesis.
Definition: StXiI.hh:271
virtual Int_t charge() const =0
Particle charge.
Float_t massOmega()
Mass assuming Omega hypothesis.
Definition: StXiI.hh:296
virtual Float_t decayLengthV0() const
3-d decay distance of V0 from Xi
Definition: StXiI.hh:239
Float_t thetaBachelor()
Polar angle theta of bachelor.
Definition: StXiI.hh:354
virtual Long_t detectorIdXi()
Detector ID for Xi vertex.
Definition: StXiI.hh:215
Float_t ptArmXi()
Armenteros-Podolanski variables.
Definition: StXiI.hh:262
virtual Float_t decayVertexV0Z() const =0
Coordinates of decay vertex.
Float_t eBachelorHyp(Float_t mass)
Energy of bachelor assuming its mass.
Definition: StXiI.hh:279
virtual Float_t dcaXiDaughters() const
DCA of xi daughters at decay vertex.
Definition: StXiI.hh:197
Float_t eLambda()
Energy assuming lambda hypothesis.
Definition: StV0I.hh:368
virtual TVector3 momXiAtPrimVertex()=0
Momentum of Xi/Omega at primary vertex.
Float_t mtOmega()
Transverse mass assuming (anti)Omega.
Definition: StXiI.hh:366
Float_t eBachelorPion()
Energy of bachelor assuming pion.
Definition: StXiI.hh:283
StXiDaughter
Enumeration of Xi daughter types.
Definition: StXiI.hh:21
Float_t primaryVertexZ() const
Primary vtx position coordinates.
virtual Float_t momV0Z() const =0
Momentum components of V0.
virtual Float_t momBachelorZ() const =0
Momentum components of bachelor.
virtual Float_t dcaXiToPrimVertex() const
DCA of xi to primary vertex.
Definition: StXiI.hh:201
Float_t rapXi()
Rapidity assuming (anti)Xi.
Definition: StXiI.hh:316
virtual Float_t momXiZ()=0
Momentum components of Xi/Omega at decay vertex.
virtual Float_t chi2Xi() const
Chi square of Xi (used only by MuDst)
Definition: StXiI.hh:207
virtual StTrackTopologyMap & topologyMapBachelor()
Bachelor track topology map.
Definition: StXiI.hh:183
virtual Float_t errDedxBachelor() const
Error on mean of dE/dX of bachelor.
Definition: StXiI.hh:187
Float_t ptotXi()
Total momentum of Xi/Omega.
Definition: StXiI.hh:342
virtual Bool_t bad() const
Test whether either daughter is bad.
Definition: StV0I.hh:275
Float_t massXi()
Mass assuming Xi hypothesis.
Definition: StXiI.hh:300
virtual Float_t dcaBachelorToPrimVertex() const
DCA of bachelor to primary vertex.
Definition: StXiI.hh:199