90 #ifndef ST_HBT_PAIR_HH
91 #define ST_HBT_PAIR_HH
95 #include "StHbtMaker/Infrastructure/StHbtParticle.hh"
96 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
122 double emissionAngle()
const;
125 double qSidePf()
const;
126 double qOutPf()
const;
127 double qLongPf()
const;
131 double qSideCMS()
const;
132 double qOutCMS()
const;
133 double qLongCMS()
const;
135 double dKSide()
const;
136 double dKOut()
const;
137 double dKLong()
const;
142 double qSideBf(
double beta=0.0)
const;
143 double qOutBf(
double beta=0.0)
const;
144 double qLongBf(
double beta=0.0)
const;
148 void qYKPCMS(
double& qP,
double& qT,
double& q0)
const ;
150 void qYKPLCMS(
double& qP,
double& qT,
double& q0)
const ;
152 void qYKPPF(
double& qP,
double& qT,
double& q0)
const ;
155 double quality()
const;
162 double NominalTpcExitSeparation()
const;
163 double NominalTpcEntranceSeparation()
const;
164 double NominalTpcAverageSeparation()
const;
166 double TpcExitSeparationTrackV0Pos()
const;
167 double TpcEntranceSeparationTrackV0Pos()
const;
168 double TpcAverageSeparationTrackV0Pos()
const;
170 double TpcExitSeparationTrackV0Neg()
const;
171 double TpcEntranceSeparationTrackV0Neg()
const;
172 double TpcAverageSeparationTrackV0Neg()
const;
174 double TpcExitSeparationV0PosV0Pos()
const;
175 double TpcEntranceSeparationV0PosV0Pos()
const;
176 double TpcAverageSeparationV0PosV0Pos()
const;
178 double TpcExitSeparationV0PosV0Neg()
const;
179 double TpcEntranceSeparationV0PosV0Neg()
const;
180 double TpcAverageSeparationV0PosV0Neg()
const;
182 double TpcExitSeparationV0NegV0Pos()
const;
183 double TpcEntranceSeparationV0NegV0Pos()
const;
184 double TpcAverageSeparationV0NegV0Pos()
const;
186 double TpcExitSeparationV0NegV0Neg()
const;
187 double TpcEntranceSeparationV0NegV0Neg()
const;
188 double TpcAverageSeparationV0NegV0Neg()
const;
191 double KStar()
const;
192 double KStarFlipped()
const;
194 double CVKFlipped()
const;
195 double qInvFlippedXY()
const;
197 double OpeningAngle()
const;
200 double KStarSide()
const;
201 double KStarOut()
const;
202 double KStarLong()
const;
204 float PionPairProbability()
const;
205 float ElectronPairProbability()
const;
206 float KaonPairProbability()
const;
207 float ProtonPairProbability()
const;
208 float KaonPionPairProbability()
const;
210 double dcaInsideTpc()
const;
211 double quality2()
const;
213 double KStarGlobal()
const;
214 double CVKGlobal()
const;
215 double KStarSideGlobal()
const;
216 double KStarOutGlobal()
const;
217 double KStarLongGlobal()
const;
219 void setMergingPar(
double aMaxDuInner,
double aMaxDzInner,
220 double aMaxDuOuter,
double aMaxDzOuter);
221 void setDefaultHalfFieldMergingPar();
222 void setDefaultFullFieldMergingPar();
223 double getFracOfMergedRow()
const;
224 double getClosestRowAtDCA()
const;
225 double getWeightedAvSep()
const;
227 double getFracOfMergedRowTrkV0Pos()
const;
228 double getClosestRowAtDCATrkV0Pos()
const;
230 double getFracOfMergedRowTrkV0Neg()
const;
231 double getClosestRowAtDCATrkV0Neg()
const;
233 double getFracOfMergedRowV0PosV0Neg()
const;
234 double getFracOfMergedRowV0NegV0Pos()
const;
235 double getFracOfMergedRowV0PosV0Pos()
const;
236 double getFracOfMergedRowV0NegV0Neg()
const;
242 mutable short mNonIdParNotCalculated;
243 mutable double mDKSide;
244 mutable double mDKOut;
245 mutable double mDKLong;
247 mutable double kStarCalc;
248 void calcNonIdPar()
const;
250 mutable short mNonIdParNotCalculatedGlobal;
251 mutable double mDKSideGlobal;
252 mutable double mDKOutGlobal;
253 mutable double mDKLongGlobal;
254 mutable double kStarCalcGlobal;
255 mutable double mCVKGlobal;
256 void calcNonIdParGlobal()
const;
258 mutable short mMergingParNotCalculated;
259 mutable double mWeightedAvSep;
260 mutable double mFracOfMergedRow;
261 mutable double mClosestRowAtDCA;
263 mutable short mMergingParNotCalculatedTrkV0Pos;
264 mutable double mFracOfMergedRowTrkV0Pos;
265 mutable double mClosestRowAtDCATrkV0Pos;
267 mutable short mMergingParNotCalculatedTrkV0Neg;
268 mutable double mFracOfMergedRowTrkV0Neg;
269 mutable double mClosestRowAtDCATrkV0Neg;
271 mutable short mMergingParNotCalculatedV0PosV0Neg;
272 mutable double mFracOfMergedRowV0PosV0Neg;
273 mutable double mClosestRowAtDCAV0PosV0Neg;
275 mutable short mMergingParNotCalculatedV0NegV0Pos;
276 mutable double mFracOfMergedRowV0NegV0Pos;
277 mutable double mClosestRowAtDCAV0NegV0Pos;
279 mutable short mMergingParNotCalculatedV0PosV0Pos;
280 mutable double mFracOfMergedRowV0PosV0Pos;
281 mutable double mClosestRowAtDCAV0PosV0Pos;
283 mutable short mMergingParNotCalculatedV0NegV0Neg;
284 mutable double mFracOfMergedRowV0NegV0Neg;
285 mutable double mClosestRowAtDCAV0NegV0Neg;
287 static double mMaxDuInner;
288 static double mMaxDzInner;
289 static double mMaxDuOuter;
290 static double mMaxDzOuter;
291 void calcMergingPar()
const;
293 void CalcMergingParFctn(
short* tmpMergingParNotCalculatedFctn,
294 float* tmpZ1,
float* tmpU1,
295 float* tmpZ2,
float* tmpU2,
296 int *tmpSect1,
int *tmpSect2,
297 double* tmpFracOfMergedRow,
298 double* tmpClosestRowAtDCA
301 void resetParCalculated();
304 inline void StHbtPair::resetParCalculated(){
305 mNonIdParNotCalculated=1;
306 mNonIdParNotCalculatedGlobal=1;
307 mMergingParNotCalculated=1;
308 mMergingParNotCalculatedTrkV0Pos=1;
309 mMergingParNotCalculatedTrkV0Neg=1;
310 mMergingParNotCalculatedV0PosV0Pos=1;
311 mMergingParNotCalculatedV0NegV0Pos=1;
312 mMergingParNotCalculatedV0PosV0Neg=1;
313 mMergingParNotCalculatedV0NegV0Neg=1;
316 inline void StHbtPair::SetTrack1(
const StHbtParticle* trkPtr){
318 resetParCalculated();
320 inline void StHbtPair::SetTrack2(
const StHbtParticle* trkPtr){
322 resetParCalculated();
325 inline StHbtParticle* StHbtPair::track1()
const {
return mTrack1;}
326 inline StHbtParticle* StHbtPair::track2()
const {
return mTrack2;}
328 inline double StHbtPair::dKSide()
const{
329 if(mNonIdParNotCalculated) calcNonIdPar();
332 inline double StHbtPair::dKOut()
const{
333 if(mNonIdParNotCalculated) calcNonIdPar();
336 inline double StHbtPair::dKLong()
const{
337 if(mNonIdParNotCalculated) calcNonIdPar();
340 inline double StHbtPair::KStar()
const{
341 if(mNonIdParNotCalculated) calcNonIdPar();
344 inline double StHbtPair::qInv()
const {
346 return ( -1.* tDiff.m());
350 inline double StHbtPair::KStarSide()
const{
351 if(mNonIdParNotCalculated) calcNonIdPar();
354 inline double StHbtPair::KStarOut()
const{
355 if(mNonIdParNotCalculated) calcNonIdPar();
358 inline double StHbtPair::KStarLong()
const{
359 if(mNonIdParNotCalculated) calcNonIdPar();
362 inline double StHbtPair::CVK()
const{
363 if(mNonIdParNotCalculated) calcNonIdPar();
367 inline double StHbtPair::KStarGlobal()
const{
368 if(mNonIdParNotCalculatedGlobal) calcNonIdParGlobal();
369 return kStarCalcGlobal;
371 inline double StHbtPair::KStarSideGlobal()
const{
372 if(mNonIdParNotCalculatedGlobal) calcNonIdParGlobal();
373 return mDKSideGlobal;
375 inline double StHbtPair::KStarOutGlobal()
const{
376 if(mNonIdParNotCalculatedGlobal) calcNonIdParGlobal();
379 inline double StHbtPair::KStarLongGlobal()
const{
380 if(mNonIdParNotCalculatedGlobal) calcNonIdParGlobal();
381 return mDKLongGlobal;
383 inline double StHbtPair::CVKGlobal()
const{
384 if(mNonIdParNotCalculatedGlobal) calcNonIdParGlobal();
389 inline float StHbtPair::PionPairProbability()
const{
390 return (mTrack1->Track()->PidProbPion()) *
391 (mTrack2->Track()->PidProbPion());
393 inline float StHbtPair::ElectronPairProbability()
const{
394 return (mTrack1->Track()->PidProbElectron()) *
395 (mTrack2->Track()->PidProbElectron());
397 inline float StHbtPair::KaonPairProbability()
const{
398 return (mTrack1->Track()->PidProbKaon()) *
399 (mTrack2->Track()->PidProbKaon());
401 inline float StHbtPair::ProtonPairProbability()
const{
402 return (mTrack1->Track()->PidProbProton()) *
403 (mTrack2->Track()->PidProbProton());
405 inline float StHbtPair::KaonPionPairProbability()
const{
406 return (mTrack1->Track()->PidProbKaon()) *
407 (mTrack2->Track()->PidProbPion());
410 inline double StHbtPair::getFracOfMergedRow()
const{
411 if(mMergingParNotCalculated) calcMergingPar();
412 return mFracOfMergedRow;
414 inline double StHbtPair::getClosestRowAtDCA()
const {
415 if(mMergingParNotCalculated) calcMergingPar();
416 return mClosestRowAtDCA;
418 inline double StHbtPair::getWeightedAvSep()
const {
419 if(mMergingParNotCalculated) calcMergingPar();
420 return mWeightedAvSep;
424 inline double StHbtPair::getFracOfMergedRowTrkV0Pos()
const{
425 if(mMergingParNotCalculatedTrkV0Pos)
426 CalcMergingParFctn(&mMergingParNotCalculatedTrkV0Pos,
427 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
428 &(mTrack2->mZ[0]),&(mTrack2->mU[0]),
429 &(mTrack1->mSect[0]),&(mTrack2->mSect[0]),
430 &(mFracOfMergedRowTrkV0Pos),&(mClosestRowAtDCATrkV0Pos)
432 return mFracOfMergedRowTrkV0Pos;
434 inline double StHbtPair::getClosestRowAtDCATrkV0Pos()
const{
435 if(mMergingParNotCalculatedTrkV0Pos)
436 CalcMergingParFctn(&mMergingParNotCalculatedTrkV0Pos,
437 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
438 &(mTrack2->mZ[0]),&(mTrack2->mU[0]),
439 &(mTrack1->mSect[0]),&(mTrack2->mSect[0]),
440 &mFracOfMergedRowTrkV0Pos,&mClosestRowAtDCATrkV0Pos
442 return mClosestRowAtDCATrkV0Pos;
444 inline double StHbtPair::getFracOfMergedRowTrkV0Neg()
const{
445 if(mMergingParNotCalculatedTrkV0Neg)
446 CalcMergingParFctn(&mMergingParNotCalculatedTrkV0Neg,
447 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
448 &(mTrack2->mV0NegZ[0]),&(mTrack2->mV0NegU[0]),
449 &(mTrack1->mSect[0]),&(mTrack2->mV0NegSect[0]),
450 &(mFracOfMergedRowTrkV0Neg),&(mClosestRowAtDCATrkV0Neg)
452 return mFracOfMergedRowTrkV0Neg;
454 inline double StHbtPair::getClosestRowAtDCATrkV0Neg()
const{
455 if(mMergingParNotCalculatedTrkV0Neg)
456 CalcMergingParFctn(&mMergingParNotCalculatedTrkV0Neg,
457 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
458 &(mTrack2->mV0NegZ[0]),&(mTrack2->mV0NegU[0]),
459 &(mTrack1->mSect[0]),&(mTrack2->mV0NegSect[0]),
460 &mFracOfMergedRowTrkV0Neg,&mClosestRowAtDCATrkV0Neg
462 return mClosestRowAtDCATrkV0Neg;
464 inline double StHbtPair::getFracOfMergedRowV0PosV0Neg()
const{
465 if(mMergingParNotCalculatedV0PosV0Neg)
466 CalcMergingParFctn(&mMergingParNotCalculatedV0PosV0Neg,
467 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
468 &(mTrack2->mV0NegZ[0]),&(mTrack2->mV0NegU[0]),
469 &(mTrack1->mSect[0]),&(mTrack2->mV0NegSect[0]),
470 &(mFracOfMergedRowV0PosV0Neg),
471 &(mClosestRowAtDCAV0PosV0Neg)
473 return mFracOfMergedRowV0PosV0Neg;
475 inline double StHbtPair::getFracOfMergedRowV0NegV0Pos()
const{
476 if(mMergingParNotCalculatedV0NegV0Pos)
477 CalcMergingParFctn(&mMergingParNotCalculatedV0NegV0Pos,
478 &(mTrack1->mV0NegZ[0]),&(mTrack1->mV0NegU[0]),
479 &(mTrack2->mZ[0]),&(mTrack2->mU[0]),
480 &(mTrack1->mV0NegSect[0]),
481 &(mTrack2->mSect[0]),
482 &(mFracOfMergedRowV0NegV0Pos),
483 &(mClosestRowAtDCAV0NegV0Pos)
485 return mFracOfMergedRowV0NegV0Pos;
487 inline double StHbtPair::getFracOfMergedRowV0PosV0Pos()
const{
488 if(mMergingParNotCalculatedV0PosV0Pos)
489 CalcMergingParFctn(&mMergingParNotCalculatedV0PosV0Pos,
490 &(mTrack1->mZ[0]),&(mTrack1->mU[0]),
491 &(mTrack2->mZ[0]),&(mTrack2->mU[0]),
492 &(mTrack1->mSect[0]),
493 &(mTrack2->mSect[0]),
494 &(mFracOfMergedRowV0PosV0Pos),
495 &(mClosestRowAtDCAV0PosV0Pos)
497 return mFracOfMergedRowV0PosV0Pos;
499 inline double StHbtPair::getFracOfMergedRowV0NegV0Neg()
const{
500 if(mMergingParNotCalculatedV0NegV0Neg)
501 CalcMergingParFctn(&mMergingParNotCalculatedV0NegV0Neg,
502 &(mTrack1->mV0NegZ[0]),&(mTrack1->mV0NegU[0]),
503 &(mTrack2->mV0NegZ[0]),&(mTrack2->mV0NegU[0]),
504 &(mTrack1->mV0NegSect[0]),
505 &(mTrack2->mV0NegSect[0]),
506 &(mFracOfMergedRowV0NegV0Neg),
507 &(mClosestRowAtDCAV0NegV0Neg)
509 return mFracOfMergedRowV0NegV0Neg;