1 ///////////////////////////////////////////////////////////////////////////
3 // AliFemtoPair: the Pair object is passed to the PairCuts for //
4 // verification, and then to the AddRealPair and AddMixedPair methods of //
5 // the Correlation Functions. It holds pair-specific variables like //
6 // relative momenta and has links to the particles and tracks that form //
9 ///////////////////////////////////////////////////////////////////////////
11 #include "AliFemtoPair.h"
13 double AliFemtoPair::fgMaxDuInner = .8;
14 double AliFemtoPair::fgMaxDzInner = 3.;
15 double AliFemtoPair::fgMaxDuOuter = 1.4;
16 double AliFemtoPair::fgMaxDzOuter = 3.2;
19 AliFemtoPair::AliFemtoPair() :
20 fTrack1(0), fTrack2(0),
22 fNonIdParNotCalculated(0),
28 fNonIdParNotCalculatedGlobal(0),
29 fMergingParNotCalculated(0),
33 fMergingParNotCalculatedTrkV0Pos(0),
34 fFracOfMergedRowTrkV0Pos(0),
35 fClosestRowAtDCATrkV0Pos(0),
36 fMergingParNotCalculatedTrkV0Neg(0),
37 fFracOfMergedRowTrkV0Neg(0),
38 fClosestRowAtDCATrkV0Neg(0),
39 fMergingParNotCalculatedV0PosV0Neg(0),
40 fFracOfMergedRowV0PosV0Neg(0),
41 fClosestRowAtDCAV0PosV0Neg(0),
42 fMergingParNotCalculatedV0NegV0Pos(0),
43 fFracOfMergedRowV0NegV0Pos(0),
44 fClosestRowAtDCAV0NegV0Pos(0),
45 fMergingParNotCalculatedV0PosV0Pos(0),
46 fFracOfMergedRowV0PosV0Pos(0),
47 fClosestRowAtDCAV0PosV0Pos(0),
48 fMergingParNotCalculatedV0NegV0Neg(0),
49 fFracOfMergedRowV0NegV0Neg(0),
50 fClosestRowAtDCAV0NegV0Neg(0)
52 // Default constructor
55 SetDefaultHalfFieldMergingPar();
58 AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b)
59 : fTrack1(a), fTrack2(b),
61 fNonIdParNotCalculated(0),
67 fNonIdParNotCalculatedGlobal(0),
68 fMergingParNotCalculated(0),
72 fMergingParNotCalculatedTrkV0Pos(0),
73 fFracOfMergedRowTrkV0Pos(0),
74 fClosestRowAtDCATrkV0Pos(0),
75 fMergingParNotCalculatedTrkV0Neg(0),
76 fFracOfMergedRowTrkV0Neg(0),
77 fClosestRowAtDCATrkV0Neg(0),
78 fMergingParNotCalculatedV0PosV0Neg(0),
79 fFracOfMergedRowV0PosV0Neg(0),
80 fClosestRowAtDCAV0PosV0Neg(0),
81 fMergingParNotCalculatedV0NegV0Pos(0),
82 fFracOfMergedRowV0NegV0Pos(0),
83 fClosestRowAtDCAV0NegV0Pos(0),
84 fMergingParNotCalculatedV0PosV0Pos(0),
85 fFracOfMergedRowV0PosV0Pos(0),
86 fClosestRowAtDCAV0PosV0Pos(0),
87 fMergingParNotCalculatedV0NegV0Neg(0),
88 fFracOfMergedRowV0NegV0Neg(0),
89 fClosestRowAtDCAV0NegV0Neg(0)
91 // Construct a pair from two particles
92 SetDefaultHalfFieldMergingPar();
95 void AliFemtoPair::SetDefaultHalfFieldMergingPar(){
101 void AliFemtoPair::SetDefaultFullFieldMergingPar(){
102 // Set default TPC merging parameters for STAR TPC
108 void AliFemtoPair::SetMergingPar(double aMaxDuInner, double aMaxDzInner,
109 double aMaxDuOuter, double aMaxDzOuter)
111 // Set TPC merging parameters for STAR TPC
112 fgMaxDuInner = aMaxDuInner;
113 fgMaxDzInner = aMaxDzInner;
114 fgMaxDuOuter = aMaxDuOuter;
115 fgMaxDzOuter = aMaxDzOuter;
118 AliFemtoPair::~AliFemtoPair() {
123 AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair):
124 fTrack1(0), fTrack2(0),
126 fNonIdParNotCalculated(0),
132 fNonIdParNotCalculatedGlobal(0),
133 fMergingParNotCalculated(0),
137 fMergingParNotCalculatedTrkV0Pos(0),
138 fFracOfMergedRowTrkV0Pos(0),
139 fClosestRowAtDCATrkV0Pos(0),
140 fMergingParNotCalculatedTrkV0Neg(0),
141 fFracOfMergedRowTrkV0Neg(0),
142 fClosestRowAtDCATrkV0Neg(0),
143 fMergingParNotCalculatedV0PosV0Neg(0),
144 fFracOfMergedRowV0PosV0Neg(0),
145 fClosestRowAtDCAV0PosV0Neg(0),
146 fMergingParNotCalculatedV0NegV0Pos(0),
147 fFracOfMergedRowV0NegV0Pos(0),
148 fClosestRowAtDCAV0NegV0Pos(0),
149 fMergingParNotCalculatedV0PosV0Pos(0),
150 fFracOfMergedRowV0PosV0Pos(0),
151 fClosestRowAtDCAV0PosV0Pos(0),
152 fMergingParNotCalculatedV0NegV0Neg(0),
153 fFracOfMergedRowV0NegV0Neg(0),
154 fClosestRowAtDCAV0NegV0Neg(0)
157 fTrack1 = aPair.fTrack1;
158 fTrack2 = aPair.fTrack2;
160 fNonIdParNotCalculated = aPair.fNonIdParNotCalculated;
161 fDKSide = aPair.fDKSide;
162 fDKOut = aPair.fDKOut;
163 fDKLong = aPair.fDKLong;
165 fKStarCalc = aPair.fKStarCalc;
167 fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal;
169 fMergingParNotCalculated = aPair.fMergingParNotCalculated;
170 fWeightedAvSep = aPair.fWeightedAvSep;
171 fFracOfMergedRow = aPair.fFracOfMergedRow;
172 fClosestRowAtDCA = aPair.fClosestRowAtDCA;
174 fMergingParNotCalculatedTrkV0Pos = aPair.fMergingParNotCalculatedTrkV0Pos;
175 fFracOfMergedRowTrkV0Pos = aPair.fFracOfMergedRowTrkV0Pos;
176 fClosestRowAtDCATrkV0Pos = aPair.fClosestRowAtDCATrkV0Pos;
178 fMergingParNotCalculatedTrkV0Neg = aPair.fMergingParNotCalculatedTrkV0Neg;
179 fFracOfMergedRowTrkV0Neg = aPair.fFracOfMergedRowTrkV0Neg;
180 fClosestRowAtDCATrkV0Neg = aPair.fClosestRowAtDCATrkV0Neg;
182 fMergingParNotCalculatedV0PosV0Neg = aPair.fMergingParNotCalculatedV0PosV0Neg;
183 fFracOfMergedRowV0PosV0Neg = aPair.fFracOfMergedRowV0PosV0Neg;
184 fClosestRowAtDCAV0PosV0Neg = aPair.fClosestRowAtDCAV0PosV0Neg;
186 fMergingParNotCalculatedV0NegV0Pos = aPair.fMergingParNotCalculatedV0NegV0Pos;
187 fFracOfMergedRowV0NegV0Pos = aPair.fFracOfMergedRowV0NegV0Pos;
188 fClosestRowAtDCAV0NegV0Pos = aPair.fClosestRowAtDCAV0NegV0Pos;
190 fMergingParNotCalculatedV0PosV0Pos = aPair.fMergingParNotCalculatedV0PosV0Pos;
191 fFracOfMergedRowV0PosV0Pos = aPair.fFracOfMergedRowV0PosV0Pos;
192 fClosestRowAtDCAV0PosV0Pos = aPair.fClosestRowAtDCAV0PosV0Pos;
194 fMergingParNotCalculatedV0NegV0Neg = aPair.fMergingParNotCalculatedV0NegV0Neg;
195 fFracOfMergedRowV0NegV0Neg = aPair.fFracOfMergedRowV0NegV0Neg;
196 fClosestRowAtDCAV0NegV0Neg = aPair.fClosestRowAtDCAV0NegV0Neg;
199 AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair)
201 // Assignment operator
205 fTrack1 = aPair.fTrack1;
206 fTrack2 = aPair.fTrack2;
208 fNonIdParNotCalculated = aPair.fNonIdParNotCalculated;
209 fDKSide = aPair.fDKSide;
210 fDKOut = aPair.fDKOut;
211 fDKLong = aPair.fDKLong;
213 fKStarCalc = aPair.fKStarCalc;
215 fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal;
217 fMergingParNotCalculated = aPair.fMergingParNotCalculated;
218 fWeightedAvSep = aPair.fWeightedAvSep;
219 fFracOfMergedRow = aPair.fFracOfMergedRow;
220 fClosestRowAtDCA = aPair.fClosestRowAtDCA;
222 fMergingParNotCalculatedTrkV0Pos = aPair.fMergingParNotCalculatedTrkV0Pos;
223 fFracOfMergedRowTrkV0Pos = aPair.fFracOfMergedRowTrkV0Pos;
224 fClosestRowAtDCATrkV0Pos = aPair.fClosestRowAtDCATrkV0Pos;
226 fMergingParNotCalculatedTrkV0Neg = aPair.fMergingParNotCalculatedTrkV0Neg;
227 fFracOfMergedRowTrkV0Neg = aPair.fFracOfMergedRowTrkV0Neg;
228 fClosestRowAtDCATrkV0Neg = aPair.fClosestRowAtDCATrkV0Neg;
230 fMergingParNotCalculatedV0PosV0Neg = aPair.fMergingParNotCalculatedV0PosV0Neg;
231 fFracOfMergedRowV0PosV0Neg = aPair.fFracOfMergedRowV0PosV0Neg;
232 fClosestRowAtDCAV0PosV0Neg = aPair.fClosestRowAtDCAV0PosV0Neg;
234 fMergingParNotCalculatedV0NegV0Pos = aPair.fMergingParNotCalculatedV0NegV0Pos;
235 fFracOfMergedRowV0NegV0Pos = aPair.fFracOfMergedRowV0NegV0Pos;
236 fClosestRowAtDCAV0NegV0Pos = aPair.fClosestRowAtDCAV0NegV0Pos;
238 fMergingParNotCalculatedV0PosV0Pos = aPair.fMergingParNotCalculatedV0PosV0Pos;
239 fFracOfMergedRowV0PosV0Pos = aPair.fFracOfMergedRowV0PosV0Pos;
240 fClosestRowAtDCAV0PosV0Pos = aPair.fClosestRowAtDCAV0PosV0Pos;
242 fMergingParNotCalculatedV0NegV0Neg = aPair.fMergingParNotCalculatedV0NegV0Neg;
243 fFracOfMergedRowV0NegV0Neg = aPair.fFracOfMergedRowV0NegV0Neg;
244 fClosestRowAtDCAV0NegV0Neg = aPair.fClosestRowAtDCAV0NegV0Neg;
249 //________________________
250 double AliFemtoPair::GetPairAngleEP() const
255 double AliFemtoPair::MInv() const
258 double tInvariantMass = abs(fTrack1->FourMomentum() + fTrack2->FourMomentum());
259 return (tInvariantMass);
262 double AliFemtoPair::KT() const
264 // transverse momentum
266 (fTrack1->FourMomentum() + fTrack2->FourMomentum()).Perp();
272 double AliFemtoPair::Rap() const
274 // longitudinal pair rapidity : Y = 0.5 ::log( E1 + E2 + pz1 + pz2 / E1 + E2 - pz1 - pz2 )
275 double tmp = 0.5 * log (
276 (fTrack1->FourMomentum().e() + fTrack2->FourMomentum().e() + fTrack1->FourMomentum().z() + fTrack2->FourMomentum().z()) /
277 (fTrack1->FourMomentum().e() + fTrack2->FourMomentum().e() - fTrack1->FourMomentum().z() - fTrack2->FourMomentum().z())
282 double AliFemtoPair::EmissionAngle() const {
284 double pxTotal = this->FourMomentumSum().x();
285 double pyTotal = this->FourMomentumSum().y();
286 double angle = atan2(pyTotal,pxTotal)*180.0/3.1415926536;
287 if (angle<0.0) angle+=360.0;
291 // get rid of ambiguously-named method fourMomentum() and replace it with
292 // fourMomentumSum() and fourMomentumDiff() - mal 13feb2000
293 AliFemtoLorentzVector AliFemtoPair::FourMomentumSum() const
296 AliFemtoLorentzVector temp = fTrack1->FourMomentum()+fTrack2->FourMomentum();
299 AliFemtoLorentzVector AliFemtoPair::FourMomentumDiff() const
301 // momentum difference
302 AliFemtoLorentzVector temp = fTrack1->FourMomentum()-fTrack2->FourMomentum();
305 //__________________________________
306 void AliFemtoPair::QYKPCMS(double& qP, double& qT, double& q0) const
308 // Yano-Koonin-Podgoretskii Parametrisation in CMS
310 // calculate momentum difference in source rest frame (= lab frame)
312 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
313 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
314 AliFemtoLorentzVector l ;
315 // random ordering of the particles
316 if ( rand()/(double)RAND_MAX > 0.50 )
320 // fill momentum differences into return variables
322 qT = l.vect().Perp() ;
325 //___________________________________
326 void AliFemtoPair::QYKPLCMS(double& qP, double& qT, double& q0) const
328 // Yano-Koonin-Podgoretskii Parametrisation in LCMS
330 // calculate momentum difference in LCMS : frame where pz1 + pz2 = 0
332 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
333 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
334 // determine beta to LCMS
335 double beta = (l1.z()+l2.z()) / (l1.e()+l2.e()) ;
336 double beta2 = beta*beta ;
337 // unfortunately STAR Class lib knows only boost(particle) not boost(beta) :(
338 // -> create particle with velocity beta and mass 1.0
339 // actually this is : dummyPz = ::sqrt( (dummyMass*dummyMass*beta2) / (1-beta2) ) ;
340 double dummyPz = ::sqrt( (beta2) / (1-beta2) ) ;
341 // boost in the correct direction
342 if (beta>0.0) { dummyPz = -dummyPz; } ;
343 // create dummy particle
344 AliFemtoLorentzVector l(0.0, 0.0, dummyPz) ;
345 double dummyMass = 1.0 ;
346 l.SetE(l.vect().MassHypothesis(dummyMass) );
347 // boost particles along the beam into a frame with velocity beta
348 AliFemtoLorentzVector l1boosted = l1.boost(l) ;
349 AliFemtoLorentzVector l2boosted = l2.boost(l) ;
350 // caculate the momentum difference with random ordering of the particle
351 if ( rand()/(double)RAND_MAX >0.50)
352 { l = l1boosted-l2boosted ; }
354 { l = l2boosted-l1boosted ;} ;
355 // fill momentum differences into return variables
357 qT = l.vect().Perp() ;
360 //___________________________________
361 // Yano-Koonin-Podgoretskii Parametrisation in pair rest frame
362 void AliFemtoPair::QYKPPF(double& qP, double& qT, double& q0) const
365 // calculate momentum difference in pair rest frame : frame where (pz1 + pz2, py1 + py2, px1 + px2) = (0,0,0)
367 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
368 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
369 // the center of gravity of the pair travels with l
370 AliFemtoLorentzVector l = l1 + l2 ;
374 AliFemtoLorentzVector l1boosted = l1.boost(l) ;
375 AliFemtoLorentzVector l2boosted = l2.boost(l) ;
376 // caculate the momentum difference with random ordering of the particle
377 if ( rand()/(double)RAND_MAX > 0.50)
378 { l = l1boosted-l2boosted ; }
380 { l = l2boosted-l1boosted ;} ;
381 // fill momentum differences into return variables
383 qT = l.vect().Perp();
387 double AliFemtoPair::QOutCMS() const
389 // relative momentum out component in lab frame
390 AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect();
391 AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect();
393 double dx = tmp1.x() - tmp2.x();
394 double xt = tmp1.x() + tmp2.x();
396 double dy = tmp1.y() - tmp2.y();
397 double yt = tmp1.y() + tmp2.y();
399 double k1 = (::sqrt(xt*xt+yt*yt));
400 double k2 = (dx*xt+dy*yt);
405 double AliFemtoPair::QSideCMS() const
407 // relative momentum side component in lab frame
408 AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect();
409 AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect();
411 double x1 = tmp1.x(); double y1 = tmp1.y();
412 double x2 = tmp2.x(); double y2 = tmp2.y();
414 double xt = x1+x2; double yt = y1+y2;
415 double k1 = ::sqrt(xt*xt+yt*yt);
417 double tmp = 2.0*(x2*y1-x1*y2)/k1;
421 //_________________________
422 double AliFemtoPair::QLongCMS() const
424 // relative momentum component in lab frame
425 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
426 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
428 double dz = tmp1.z() - tmp2.z();
429 double zz = tmp1.z() + tmp2.z();
431 double dt = tmp1.t() - tmp2.t();
432 double tt = tmp1.t() + tmp2.t();
435 double gamma = 1.0/TMath::Sqrt((1.-beta)*(1.+beta));
437 double temp = gamma*(dz - beta*dt);
441 //________________________________
442 double AliFemtoPair::QOutPf() const
444 // relative momentum out component in pair frame
445 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
446 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
448 double dt = tmp1.t() - tmp2.t();
449 double tt = tmp1.t() + tmp2.t();
451 double xt = tmp1.x() + tmp2.x();
452 double yt = tmp1.y() + tmp2.y();
454 double k1 = ::sqrt(xt*xt + yt*yt);
456 double gOut = 1.0/TMath::Sqrt((1.-bOut)*(1.+bOut));
458 double temp = gOut*(QOutCMS() - bOut*dt);
462 //___________________________________
463 double AliFemtoPair::QSidePf() const
465 // relative momentum side component in pair frame
467 return(this->QSideCMS());
470 //___________________________________
472 double AliFemtoPair::QLongPf() const
474 // relative momentum long component in pair frame
476 return(this->QLongCMS());
479 //___________________________________
480 double AliFemtoPair::QOutBf(double /* beta */) const
482 // relative momentum out component
483 return(this->QOutCMS());
486 //___________________________________
488 double AliFemtoPair::QSideBf(double /* beta */) const
490 // relative momentum side component
491 return(this->QSideCMS());
494 //___________________________________
495 double AliFemtoPair::QLongBf(double beta) const
497 // relative momentum long component
498 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
499 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
501 double dz = tmp1.z() - tmp2.z();
502 double dt = tmp1.t() + tmp2.t();
504 double gamma = 1.0/::sqrt((1.-beta)*(1.+beta));
506 double temp = gamma*(dz - beta*dt);
510 double AliFemtoPair::Quality() const {
511 // Calculate split quality of the pair
512 unsigned long mapMask0 = 0xFFFFFF00;
513 unsigned long mapMask1 = 0x1FFFFF;
514 unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0;
515 unsigned long padRow25To45Track1 = fTrack1->TopologyMap(1) & mapMask1;
516 unsigned long padRow1To24Track2 = fTrack2->TopologyMap(0) & mapMask0;
517 unsigned long padRow25To45Track2 = fTrack2->TopologyMap(1) & mapMask1;
519 unsigned long bothPads1To24 = padRow1To24Track1 & padRow1To24Track2;
520 unsigned long bothPads25To45 = padRow25To45Track1 & padRow25To45Track2;
522 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
523 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
527 double normQual = 0.0;
528 int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits();
529 for (ibits=8;ibits<=31;ibits++) {
531 bitI |= 1UL<<(ibits);
532 if ( onePad1To24 & bitI ) {
537 if ( bothPads1To24 & bitI ) tQuality--;
540 for (ibits=0;ibits<=20;ibits++) {
542 bitI |= 1UL<<(ibits);
543 if ( onePad25To45 & bitI ) {
548 if ( bothPads25To45 & bitI ) tQuality--;
551 normQual = (double)tQuality/( (double) tMaxQuality );
556 double AliFemtoPair::Quality2() const {
557 // second implementation of split quality
558 unsigned long mapMask0 = 0xFFFFFF00;
559 unsigned long mapMask1 = 0x1FFFFF;
560 unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0;
561 unsigned long padRow25To45Track1 = fTrack1->TopologyMap(1) & mapMask1;
562 unsigned long padRow1To24Track2 = fTrack2->TopologyMap(0) & mapMask0;
563 unsigned long padRow25To45Track2 = fTrack2->TopologyMap(1) & mapMask1;
566 //unsigned long bothPads1To24 = padRow1To24Track1 & padRow1To24Track2;
567 //unsigned long bothPads25To45 = padRow25To45Track1 & padRow25To45Track2;
570 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
571 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
575 double normQual = 0.0;
576 int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits();
577 for (ibits=8;ibits<=31;ibits++) {
579 bitI |= 1UL<<(ibits);
580 if ( onePad1To24 & bitI ) {
585 //if ( bothPads1To24 & bitI ) tQuality--;
588 for (ibits=0;ibits<=20;ibits++) {
590 bitI |= 1UL<<(ibits);
591 if ( onePad25To45 & bitI ) {
596 //if ( bothPads25To45 & bitI ) tQuality--;
599 normQual = (double)tQuality/( (double) tMaxQuality );
605 double AliFemtoPair::NominalTpcExitSeparation() const {
606 // separation at exit from STAR TPC
607 AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->Track()->NominalTpcExitPoint();
611 double AliFemtoPair::NominalTpcEntranceSeparation() const {
612 // separation at entrance to STAR TPC
613 AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->Track()->NominalTpcEntrancePoint();
617 // double AliFemtoPair::NominalTpcAverageSeparation() const {
618 // // average separation in STAR TPC
619 // AliFemtoThreeVector diff;
620 // double tAveSep = 0.0;
622 // if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
623 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
624 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
625 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
626 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
627 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
628 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
631 // // for (int ipt=0; ipt<11; ipt++){
632 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
634 // tAveSep += diff.Mag();
636 // tAveSep = tAveSep/(ipt+1.);
637 // return (tAveSep);}
641 double AliFemtoPair::OpeningAngle() const {
643 return 57.296* fTrack1->FourMomentum().vect().Angle( fTrack2->FourMomentum().vect() );
644 // AliFemtoThreeVector p1 = fTrack1->FourMomentum().vect();
645 // AliFemtoThreeVector p2 = fTrack2->FourMomentum().vect();
646 // return 57.296*(p1.phi()-p2.phi());
647 // //double dAngInv = 57.296*acos((p1.dot(p2))/(p1.Mag()*p2.Mag()));
648 // //return (dAngInv);
653 double AliFemtoPair::KStarFlipped() const {
654 // kstar with sign flipped
655 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
657 AliFmThreeVectorD qwe = tP1.vect();
658 qwe *= -1.; // flip it
661 AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
662 double tMass = abs(tSum);
663 AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
664 double tGamma = tSum.e()/tMass;
665 AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
666 (tGammaBeta*tGammaBeta))*tGammaBeta;
667 AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
668 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
669 //VP tP1.vect() *= -1.; // unflip it
670 return tK.vect().Mag();
673 //double AliFemtoPair::CVK() const{
674 //const AliFemtoLorentzVector& tP1 = fTrack1->FourMomentum();
675 //AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
676 //double tMass = abs(tSum);
677 //AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
678 //double tGamma = tSum.e()/tMass;
679 //AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
680 // (tGammaBeta*tGammaBeta))*tGammaBeta;
681 //AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
682 // tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
683 //return (tK.vect())*tGammaBeta/tK.vect().Magnitude()/tGammaBeta.Magnitude();
686 double AliFemtoPair::CVKFlipped() const{
687 // CVK with sign flipped
688 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
689 AliFmThreeVectorD qwe = tP1.vect();
690 qwe *= -1.; // flip it
693 AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
694 double tMass = abs(tSum);
695 AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
696 double tGamma = tSum.e()/tMass;
697 AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
698 (tGammaBeta*tGammaBeta))*tGammaBeta;
699 AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
700 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
701 //VP tP1.vect() *= -1.; // unflip it
702 return (tK.vect())*tGammaBeta/tGamma;
705 double AliFemtoPair::PInv() const{
706 // invariant total momentum
707 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
708 AliFemtoLorentzVector tP2 = fTrack2->FourMomentum();
709 double tP = (tP1.px()+tP2.px())*(tP1.px()+tP2.px())+
710 (tP1.py()+tP2.py())*(tP1.py()+tP2.py())+
711 (tP1.pz()+tP2.pz())*(tP1.pz()+tP2.pz())-
712 (tP1.e() -tP2.e() )*(tP1.e() -tP2.e() );
713 return ::sqrt(fabs(tP));
716 double AliFemtoPair::QInvFlippedXY() const{
717 // qinv with X and Y flipped
718 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
719 tP1.SetX(-1.*tP1.x());
720 tP1.SetY(-1.*tP1.y());
721 AliFemtoLorentzVector tDiff = (tP1-fTrack2->FourMomentum());
722 return ( -1.* tDiff.m());
725 void AliFemtoPair::CalcNonIdPar() const{ // fortran like function! faster?
726 // Calculate generalized relative mometum
727 // Use this instead of qXYZ() function when calculating
728 // anything for non-identical particles
729 fNonIdParNotCalculated=0;
730 double px1 = fTrack1->FourMomentum().vect().x();
731 double py1 = fTrack1->FourMomentum().vect().y();
732 double pz1 = fTrack1->FourMomentum().vect().z();
733 double pE1 = fTrack1->FourMomentum().e();
734 double tParticle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1);
735 double px2 = fTrack2->FourMomentum().vect().x();
736 double py2 = fTrack2->FourMomentum().vect().y();
737 double pz2 = fTrack2->FourMomentum().vect().z();
738 double pE2 = fTrack2->FourMomentum().e();
739 double tParticle2Mass = ::sqrt(pE2*pE2 - px2*px2 - py2*py2 - pz2*pz2);
741 double tPx = px1+px2;
742 double tPy = py1+py2;
743 double tPz = pz1+pz2;
744 double tPE = pE1+pE2;
746 double tPtrans = tPx*tPx + tPy*tPy;
747 double tMtrans = tPE*tPE - tPz*tPz;
748 double tPinv = ::sqrt(tMtrans - tPtrans);
749 tMtrans = ::sqrt(tMtrans);
750 tPtrans = ::sqrt(tPtrans);
752 double tQinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
753 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
755 double tQ = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/tPinv;
756 tQ = sqrt ( tQ*tQ - tQinvL);
761 double beta = tPz/tPE;
762 double gamma = tPE/tMtrans;
764 double pz1L = gamma * (pz1 - beta * pE1);
765 double pE1L = gamma * (pE1 - beta * pz1);
767 // fill histogram for beam projection ( z - axis )
770 // ad 2) rotation px -> tPt
771 double px1R = (px1*tPx + py1*tPy)/tPtrans;
772 double py1R = (-px1*tPy + py1*tPx)/tPtrans;
774 //fill histograms for side projection ( y - axis )
777 // ad 3) go from LCMS to CMS
778 beta = tPtrans/tMtrans;
779 gamma = tMtrans/tPinv;
781 double px1C = gamma * (px1R - beta * pE1L);
783 // fill histogram for out projection ( x - axis )
786 fCVK = (fDKOut*tPtrans + fDKLong*tPz)/fKStarCalc/::sqrt(tPtrans*tPtrans+tPz*tPz);
790 /*void AliFemtoPair::calcNonIdParGlobal() const{ // fortran like function! faster?
791 fNonIdParNotCalculatedGlobal=0;
792 double px1 = fTrack1->Track()->PGlobal().x();
793 double py1 = fTrack1->Track()->PGlobal().y();
794 double pz1 = fTrack1->Track()->PGlobal().z();
795 double tParticle1Mass = fTrack1->FourMomentum().m2();
796 double pE1 = ::sqrt(tParticle1Mass + px1*px1 + py1*py1 + pz1*pz1);
797 tParticle1Mass = ::sqrt(tParticle1Mass);
799 double px2 = fTrack2->Track()->PGlobal().x();
800 double py2 = fTrack2->Track()->PGlobal().y();
801 double pz2 = fTrack2->Track()->PGlobal().z();
802 double tParticle2Mass = fTrack2->FourMomentum().m2();
803 double pE2 = ::sqrt(tParticle2Mass + px2*px2 + py2*py2 + pz2*pz2);
804 tParticle2Mass = ::sqrt(tParticle2Mass);
811 double Ptrans = Px*Px + Py*Py;
812 double Mtrans = PE*PE - Pz*Pz;
813 double Pinv = ::sqrt(Mtrans - Ptrans);
814 Mtrans = ::sqrt(Mtrans);
815 Ptrans = ::sqrt(Ptrans);
817 double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
818 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
820 double Q = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/Pinv;
821 Q = sqrt ( Q*Q - QinvL);
823 kStarCalcGlobal = Q/2;
827 double gamma = PE/Mtrans;
829 double pz1L = gamma * (pz1 - beta * pE1);
830 double pE1L = gamma * (pE1 - beta * pz1);
832 // fill histogram for beam projection ( z - axis )
833 fDKLongGlobal = pz1L;
835 // ad 2) rotation px -> Pt
836 double px1R = (px1*Px + py1*Py)/Ptrans;
837 double py1R = (-px1*Py + py1*Px)/Ptrans;
839 //fill histograms for side projection ( y - axis )
840 fDKSideGlobal = py1R;
842 // ad 3) go from LCMS to CMS
843 beta = Ptrans/Mtrans;
846 double px1C = gamma * (px1R - beta * pE1L);
848 // fill histogram for out projection ( x - axis )
851 fCVKGlobal = (fDKOutGlobal*Ptrans + fDKLongGlobal*Pz)/
852 kStarCalcGlobal/::sqrt(Ptrans*Ptrans+Pz*Pz);
857 // double AliFemtoPair::DcaInsideTpc() const{
858 // // dcs inside the STAR TPC
859 // double tMinDist=NominalTpcEntranceSeparation();
860 // double tExit = NominalTpcExitSeparation();
861 // tMinDist = (tExit>tMinDist) ? tMinDist : tExit;
862 // double tInsideDist;
863 // //tMinDist = 999.;
865 // double rMin = 60.;
866 // double rMax = 190.;
867 // const AliFmPhysicalHelixD& tHelix1 = fTrack1->Helix();
868 // const AliFmPhysicalHelixD& tHelix2 = fTrack2->Helix();
869 // // --- One is a line and other one a helix
870 // //if (tHelix1.mSingularity != tHelix2.mSingularity) return -999.;
871 // // --- 2 lines : don't care right now
872 // //if (tHelix1.mSingularity) return -999.;
874 // double dx = tHelix2.XCenter() - tHelix1.XCenter();
875 // double dy = tHelix2.YCenter() - tHelix1.YCenter();
876 // double dd = ::sqrt(dx*dx + dy*dy);
877 // double r1 = 1/tHelix1.Curvature();
878 // double r2 = 1/tHelix2.Curvature();
879 // double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd);
883 // if (fabs(cosAlpha) < 1) { // two solutions
884 // double sinAlpha = sin(acos(cosAlpha));
885 // x = tHelix1.XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd;
886 // y = tHelix1.YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd;
887 // r = ::sqrt(x*x+y*y);
888 // if( r > rMin && r < rMax &&
889 // fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
890 // ){ // first solution inside
891 // s = tHelix1.PathLength(x, y);
892 // tInsideDist=tHelix2.Distance(tHelix1.At(s));
893 // if(tInsideDist<tMinDist) tMinDist = tInsideDist;
896 // x = tHelix1.XCenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd;
897 // y = tHelix1.YCenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd;
898 // r = ::sqrt(x*x+y*y);
899 // if( r > rMin && r < rMax &&
900 // fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
901 // ) { // second solution inside
902 // s = tHelix1.PathLength(x, y);
903 // tInsideDist=tHelix2.Distance(tHelix1.At(s));
904 // if(tInsideDist<tMinDist) tMinDist = tInsideDist;
911 // void AliFemtoPair::CalcMergingPar() const{
912 // // Calculate merging factor for the pair in STAR TPC
913 // fMergingParNotCalculated=0;
917 // fFracOfMergedRow = 0.;
918 // fWeightedAvSep =0.;
920 // double tDistMax = 200.;
921 // for(int ti=0 ; ti<45 ; ti++){
922 // if(fTrack1->fSect[ti]==fTrack2->fSect[ti] && fTrack1->fSect[ti]!=-1){
923 // tDu = fabs(fTrack1->fU[ti]-fTrack2->fU[ti]);
924 // tDz = fabs(fTrack1->fZ[ti]-fTrack2->fZ[ti]);
927 // fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
928 // tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
929 // tDz*tDz/fgMaxDzInner/fgMaxDzInner);
930 // //fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
933 // fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
934 // tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
935 // tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
936 // //fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
938 // if(tDist<tDistMax){
939 // fClosestRowAtDCA = ti+1;
942 // fWeightedAvSep += tDist;
946 // fWeightedAvSep /= tN;
947 // fFracOfMergedRow /= tN;
950 // fClosestRowAtDCA = -1;
951 // fFracOfMergedRow = -1.;
952 // fWeightedAvSep = -1.;
955 // double AliFemtoPair::TpcExitSeparationTrackV0Pos() const {
956 // //________________V0 daughters exit/entrance/average separation calc.
957 // //_______1st part is a track 2nd is a V0 considering Pos daughter
959 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint();
960 // return (diff.Mag());
963 // double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const {
964 // //________________V0 daughters exit/entrance/average separation calc.
965 // //_______1st part is a track 2nd is a V0 considering Pos daughter
966 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
967 // return (diff.Mag());
970 // double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const {
971 // //________________V0 daughters exit/entrance/average separation calc.
972 // //_______1st part is a track 2nd is a V0 considering Pos daughter
973 // AliFemtoThreeVector diff;
974 // double tAveSep = 0.0;
976 // if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
977 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
978 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
979 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
980 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
981 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
982 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
985 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
987 // tAveSep += diff.Mag();
989 // tAveSep = tAveSep/(ipt+1.);
990 // return (tAveSep);}
993 // double AliFemtoPair::TpcExitSeparationTrackV0Neg() const {
994 // //_______1st part is a track 2nd is a V0 considering Neg daughter
995 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint();
996 // return (diff.Mag());
999 // double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const {
1000 // //_______1st part is a track 2nd is a V0 considering Neg daughter
1001 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
1002 // return (diff.Mag());
1005 // double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const {
1006 // //_______1st part is a track 2nd is a V0 considering Neg daughter
1007 // AliFemtoThreeVector diff;
1008 // double tAveSep = 0.0;
1010 // if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
1011 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
1012 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
1013 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
1014 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1015 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1016 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1019 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1021 // tAveSep += diff.Mag();
1023 // tAveSep = tAveSep/(ipt+1.);
1024 // return (tAveSep);}
1028 // double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const {
1029 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1030 // AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint();
1031 // return (diff.Mag());
1034 // double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const {
1035 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1036 // AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
1037 // return (diff.Mag());
1039 // double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const {
1040 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1041 // AliFemtoThreeVector diff;
1042 // double tAveSep = 0.0;
1044 // if (fTrack1->fNominalPosSample && (fTrack2->fNominalPosSample)){
1045 // while ((fabs(fTrack1->fNominalPosSample[ipt].x())<9999.) &&
1046 // (fabs(fTrack1->fNominalPosSample[ipt].y())<9999.) &&
1047 // (fabs(fTrack1->fNominalPosSample[ipt].z())<9999.) &&
1048 // (fabs(fTrack2->fNominalPosSample[ipt].x())<9999.) &&
1049 // (fabs(fTrack2->fNominalPosSample[ipt].y())<9999.) &&
1050 // (fabs(fTrack2->fNominalPosSample[ipt].z())<9999.) &&
1053 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
1055 // tAveSep += diff.Mag();
1057 // tAveSep = tAveSep/(ipt+1);
1058 // return (tAveSep);}
1062 // double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const {
1063 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1064 // AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint();
1065 // return (diff.Mag());
1068 // double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const {
1069 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1070 // AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
1071 // return (diff.Mag());
1073 // double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const {
1074 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1075 // AliFemtoThreeVector diff;
1076 // double tAveSep = 0.0;
1078 // if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
1079 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
1080 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
1081 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
1082 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1083 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1084 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1087 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1089 // tAveSep += diff.Mag();
1091 // tAveSep = tAveSep/(ipt+1.);
1092 // return (tAveSep);}
1095 // double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const {
1096 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1097 // // this is to check the upper case
1098 // AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint();
1099 // return (diff.Mag());
1102 // double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const {
1103 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1104 // // this is to check the upper case
1105 // AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
1106 // return (diff.Mag());
1108 // double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const {
1109 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1110 // // this is to check the upper case
1111 // AliFemtoThreeVector diff;
1112 // double tAveSep = 0.0;
1114 // if ( fTrack1->fTpcV0NegPosSample && fTrack2->fNominalPosSample){
1115 // while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
1116 // fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
1117 // fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
1118 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
1119 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
1120 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
1123 // diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
1125 // tAveSep += diff.Mag();
1127 // tAveSep = tAveSep/(ipt+1);
1128 // return (tAveSep);}
1131 // double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const {
1132 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1133 // AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint();
1134 // return (diff.Mag());
1137 // double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const {
1138 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1139 // AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
1140 // return (diff.Mag());
1142 // double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const {
1143 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1144 // AliFemtoThreeVector diff;
1145 // double tAveSep = 0.0;
1147 // if (fTrack1->fTpcV0NegPosSample && fTrack2->fTpcV0NegPosSample){
1148 // while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
1149 // fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
1150 // fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
1151 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1152 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1153 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1156 // diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1158 // tAveSep += diff.Mag();
1160 // tAveSep = tAveSep/(ipt+1);
1161 // return (tAveSep);}
1165 // void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn,
1166 // float* tmpZ1,float* tmpU1,
1167 // float* tmpZ2,float* tmpU2,
1168 // int *tmpSect1,int *tmpSect2,
1169 // double* tmpFracOfMergedRow,
1170 // double* tmpClosestRowAtDCA
1172 // // calculate heper variables for merging
1173 // tmpMergingParNotCalculatedFctn=0;
1176 // *tmpFracOfMergedRow = 0.;
1177 // *tmpClosestRowAtDCA = 0.;
1179 // double tDistMax = 100000000.;
1180 // for(int ti=0 ; ti<45 ; ti++){
1181 // if(tmpSect1[ti]==tmpSect2[ti] && tmpSect1[ti]!=-1){
1182 // tDu = fabs(tmpU1[ti]-tmpU2[ti]);
1183 // tDz = fabs(tmpZ1[ti]-tmpZ2[ti]);
1186 // *tmpFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
1187 // tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
1188 // tDz*tDz/fgMaxDzInner/fgMaxDzInner);
1191 // *tmpFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
1192 // tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
1193 // tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
1195 // if(tDist<tDistMax){
1196 // fClosestRowAtDCA = ti+1;
1197 // tDistMax = tDist;
1199 // //fWeightedAvSep += tDist; // now, wrong but not used
1203 // //fWeightedAvSep /= tN;
1204 // *tmpFracOfMergedRow /= tN;
1207 // *tmpClosestRowAtDCA = -1;
1208 // *tmpFracOfMergedRow = -1.;
1209 // //fWeightedAvSep = -1.;