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),
21 fNonIdParNotCalculated(0),
27 fNonIdParNotCalculatedGlobal(0),
28 fMergingParNotCalculated(0),
32 fMergingParNotCalculatedTrkV0Pos(0),
33 fFracOfMergedRowTrkV0Pos(0),
34 fClosestRowAtDCATrkV0Pos(0),
35 fMergingParNotCalculatedTrkV0Neg(0),
36 fFracOfMergedRowTrkV0Neg(0),
37 fClosestRowAtDCATrkV0Neg(0),
38 fMergingParNotCalculatedV0PosV0Neg(0),
39 fFracOfMergedRowV0PosV0Neg(0),
40 fClosestRowAtDCAV0PosV0Neg(0),
41 fMergingParNotCalculatedV0NegV0Pos(0),
42 fFracOfMergedRowV0NegV0Pos(0),
43 fClosestRowAtDCAV0NegV0Pos(0),
44 fMergingParNotCalculatedV0PosV0Pos(0),
45 fFracOfMergedRowV0PosV0Pos(0),
46 fClosestRowAtDCAV0PosV0Pos(0),
47 fMergingParNotCalculatedV0NegV0Neg(0),
48 fFracOfMergedRowV0NegV0Neg(0),
49 fClosestRowAtDCAV0NegV0Neg(0)
51 // Default constructor
54 SetDefaultHalfFieldMergingPar();
57 AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b)
58 : fTrack1(a), fTrack2(b),
59 fNonIdParNotCalculated(0),
65 fNonIdParNotCalculatedGlobal(0),
66 fMergingParNotCalculated(0),
70 fMergingParNotCalculatedTrkV0Pos(0),
71 fFracOfMergedRowTrkV0Pos(0),
72 fClosestRowAtDCATrkV0Pos(0),
73 fMergingParNotCalculatedTrkV0Neg(0),
74 fFracOfMergedRowTrkV0Neg(0),
75 fClosestRowAtDCATrkV0Neg(0),
76 fMergingParNotCalculatedV0PosV0Neg(0),
77 fFracOfMergedRowV0PosV0Neg(0),
78 fClosestRowAtDCAV0PosV0Neg(0),
79 fMergingParNotCalculatedV0NegV0Pos(0),
80 fFracOfMergedRowV0NegV0Pos(0),
81 fClosestRowAtDCAV0NegV0Pos(0),
82 fMergingParNotCalculatedV0PosV0Pos(0),
83 fFracOfMergedRowV0PosV0Pos(0),
84 fClosestRowAtDCAV0PosV0Pos(0),
85 fMergingParNotCalculatedV0NegV0Neg(0),
86 fFracOfMergedRowV0NegV0Neg(0),
87 fClosestRowAtDCAV0NegV0Neg(0)
89 // Construct a pair from two particles
90 SetDefaultHalfFieldMergingPar();
93 void AliFemtoPair::SetDefaultHalfFieldMergingPar(){
99 void AliFemtoPair::SetDefaultFullFieldMergingPar(){
100 // Set default TPC merging parameters for STAR TPC
106 void AliFemtoPair::SetMergingPar(double aMaxDuInner, double aMaxDzInner,
107 double aMaxDuOuter, double aMaxDzOuter)
109 // Set TPC merging parameters for STAR TPC
110 fgMaxDuInner = aMaxDuInner;
111 fgMaxDzInner = aMaxDzInner;
112 fgMaxDuOuter = aMaxDuOuter;
113 fgMaxDzOuter = aMaxDzOuter;
116 AliFemtoPair::~AliFemtoPair() {
121 AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair):
122 fTrack1(0), fTrack2(0),
123 fNonIdParNotCalculated(0),
129 fNonIdParNotCalculatedGlobal(0),
130 fMergingParNotCalculated(0),
134 fMergingParNotCalculatedTrkV0Pos(0),
135 fFracOfMergedRowTrkV0Pos(0),
136 fClosestRowAtDCATrkV0Pos(0),
137 fMergingParNotCalculatedTrkV0Neg(0),
138 fFracOfMergedRowTrkV0Neg(0),
139 fClosestRowAtDCATrkV0Neg(0),
140 fMergingParNotCalculatedV0PosV0Neg(0),
141 fFracOfMergedRowV0PosV0Neg(0),
142 fClosestRowAtDCAV0PosV0Neg(0),
143 fMergingParNotCalculatedV0NegV0Pos(0),
144 fFracOfMergedRowV0NegV0Pos(0),
145 fClosestRowAtDCAV0NegV0Pos(0),
146 fMergingParNotCalculatedV0PosV0Pos(0),
147 fFracOfMergedRowV0PosV0Pos(0),
148 fClosestRowAtDCAV0PosV0Pos(0),
149 fMergingParNotCalculatedV0NegV0Neg(0),
150 fFracOfMergedRowV0NegV0Neg(0),
151 fClosestRowAtDCAV0NegV0Neg(0)
154 fTrack1 = aPair.fTrack1;
155 fTrack2 = aPair.fTrack2;
157 fNonIdParNotCalculated = aPair.fNonIdParNotCalculated;
158 fDKSide = aPair.fDKSide;
159 fDKOut = aPair.fDKOut;
160 fDKLong = aPair.fDKLong;
162 fKStarCalc = aPair.fKStarCalc;
164 fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal;
166 fMergingParNotCalculated = aPair.fMergingParNotCalculated;
167 fWeightedAvSep = aPair.fWeightedAvSep;
168 fFracOfMergedRow = aPair.fFracOfMergedRow;
169 fClosestRowAtDCA = aPair.fClosestRowAtDCA;
171 fMergingParNotCalculatedTrkV0Pos = aPair.fMergingParNotCalculatedTrkV0Pos;
172 fFracOfMergedRowTrkV0Pos = aPair.fFracOfMergedRowTrkV0Pos;
173 fClosestRowAtDCATrkV0Pos = aPair.fClosestRowAtDCATrkV0Pos;
175 fMergingParNotCalculatedTrkV0Neg = aPair.fMergingParNotCalculatedTrkV0Neg;
176 fFracOfMergedRowTrkV0Neg = aPair.fFracOfMergedRowTrkV0Neg;
177 fClosestRowAtDCATrkV0Neg = aPair.fClosestRowAtDCATrkV0Neg;
179 fMergingParNotCalculatedV0PosV0Neg = aPair.fMergingParNotCalculatedV0PosV0Neg;
180 fFracOfMergedRowV0PosV0Neg = aPair.fFracOfMergedRowV0PosV0Neg;
181 fClosestRowAtDCAV0PosV0Neg = aPair.fClosestRowAtDCAV0PosV0Neg;
183 fMergingParNotCalculatedV0NegV0Pos = aPair.fMergingParNotCalculatedV0NegV0Pos;
184 fFracOfMergedRowV0NegV0Pos = aPair.fFracOfMergedRowV0NegV0Pos;
185 fClosestRowAtDCAV0NegV0Pos = aPair.fClosestRowAtDCAV0NegV0Pos;
187 fMergingParNotCalculatedV0PosV0Pos = aPair.fMergingParNotCalculatedV0PosV0Pos;
188 fFracOfMergedRowV0PosV0Pos = aPair.fFracOfMergedRowV0PosV0Pos;
189 fClosestRowAtDCAV0PosV0Pos = aPair.fClosestRowAtDCAV0PosV0Pos;
191 fMergingParNotCalculatedV0NegV0Neg = aPair.fMergingParNotCalculatedV0NegV0Neg;
192 fFracOfMergedRowV0NegV0Neg = aPair.fFracOfMergedRowV0NegV0Neg;
193 fClosestRowAtDCAV0NegV0Neg = aPair.fClosestRowAtDCAV0NegV0Neg;
196 AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair)
198 // Assignment operator
202 fTrack1 = aPair.fTrack1;
203 fTrack2 = aPair.fTrack2;
205 fNonIdParNotCalculated = aPair.fNonIdParNotCalculated;
206 fDKSide = aPair.fDKSide;
207 fDKOut = aPair.fDKOut;
208 fDKLong = aPair.fDKLong;
210 fKStarCalc = aPair.fKStarCalc;
212 fNonIdParNotCalculatedGlobal = aPair.fNonIdParNotCalculatedGlobal;
214 fMergingParNotCalculated = aPair.fMergingParNotCalculated;
215 fWeightedAvSep = aPair.fWeightedAvSep;
216 fFracOfMergedRow = aPair.fFracOfMergedRow;
217 fClosestRowAtDCA = aPair.fClosestRowAtDCA;
219 fMergingParNotCalculatedTrkV0Pos = aPair.fMergingParNotCalculatedTrkV0Pos;
220 fFracOfMergedRowTrkV0Pos = aPair.fFracOfMergedRowTrkV0Pos;
221 fClosestRowAtDCATrkV0Pos = aPair.fClosestRowAtDCATrkV0Pos;
223 fMergingParNotCalculatedTrkV0Neg = aPair.fMergingParNotCalculatedTrkV0Neg;
224 fFracOfMergedRowTrkV0Neg = aPair.fFracOfMergedRowTrkV0Neg;
225 fClosestRowAtDCATrkV0Neg = aPair.fClosestRowAtDCATrkV0Neg;
227 fMergingParNotCalculatedV0PosV0Neg = aPair.fMergingParNotCalculatedV0PosV0Neg;
228 fFracOfMergedRowV0PosV0Neg = aPair.fFracOfMergedRowV0PosV0Neg;
229 fClosestRowAtDCAV0PosV0Neg = aPair.fClosestRowAtDCAV0PosV0Neg;
231 fMergingParNotCalculatedV0NegV0Pos = aPair.fMergingParNotCalculatedV0NegV0Pos;
232 fFracOfMergedRowV0NegV0Pos = aPair.fFracOfMergedRowV0NegV0Pos;
233 fClosestRowAtDCAV0NegV0Pos = aPair.fClosestRowAtDCAV0NegV0Pos;
235 fMergingParNotCalculatedV0PosV0Pos = aPair.fMergingParNotCalculatedV0PosV0Pos;
236 fFracOfMergedRowV0PosV0Pos = aPair.fFracOfMergedRowV0PosV0Pos;
237 fClosestRowAtDCAV0PosV0Pos = aPair.fClosestRowAtDCAV0PosV0Pos;
239 fMergingParNotCalculatedV0NegV0Neg = aPair.fMergingParNotCalculatedV0NegV0Neg;
240 fFracOfMergedRowV0NegV0Neg = aPair.fFracOfMergedRowV0NegV0Neg;
241 fClosestRowAtDCAV0NegV0Neg = aPair.fClosestRowAtDCAV0NegV0Neg;
247 double AliFemtoPair::MInv() const
250 double tInvariantMass = abs(fTrack1->FourMomentum() + fTrack2->FourMomentum());
251 return (tInvariantMass);
254 double AliFemtoPair::KT() const
256 // transverse momentum
258 (fTrack1->FourMomentum() + fTrack2->FourMomentum()).Perp();
264 double AliFemtoPair::Rap() const
266 // longitudinal pair rapidity : Y = 0.5 ::log( E1 + E2 + pz1 + pz2 / E1 + E2 - pz1 - pz2 )
267 double tmp = 0.5 * log (
268 (fTrack1->FourMomentum().e() + fTrack2->FourMomentum().e() + fTrack1->FourMomentum().z() + fTrack2->FourMomentum().z()) /
269 (fTrack1->FourMomentum().e() + fTrack2->FourMomentum().e() - fTrack1->FourMomentum().z() - fTrack2->FourMomentum().z())
274 double AliFemtoPair::EmissionAngle() const {
276 double pxTotal = this->FourMomentumSum().x();
277 double pyTotal = this->FourMomentumSum().y();
278 double angle = atan2(pyTotal,pxTotal)*180.0/3.1415926536;
279 if (angle<0.0) angle+=360.0;
283 // get rid of ambiguously-named method fourMomentum() and replace it with
284 // fourMomentumSum() and fourMomentumDiff() - mal 13feb2000
285 AliFemtoLorentzVector AliFemtoPair::FourMomentumSum() const
288 AliFemtoLorentzVector temp = fTrack1->FourMomentum()+fTrack2->FourMomentum();
291 AliFemtoLorentzVector AliFemtoPair::FourMomentumDiff() const
293 // momentum difference
294 AliFemtoLorentzVector temp = fTrack1->FourMomentum()-fTrack2->FourMomentum();
297 //__________________________________
298 void AliFemtoPair::QYKPCMS(double& qP, double& qT, double& q0) const
300 // Yano-Koonin-Podgoretskii Parametrisation in CMS
302 // calculate momentum difference in source rest frame (= lab frame)
304 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
305 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
306 AliFemtoLorentzVector l ;
307 // random ordering of the particles
308 if ( rand()/(double)RAND_MAX > 0.50 )
312 // fill momentum differences into return variables
314 qT = l.vect().Perp() ;
317 //___________________________________
318 void AliFemtoPair::QYKPLCMS(double& qP, double& qT, double& q0) const
320 // Yano-Koonin-Podgoretskii Parametrisation in LCMS
322 // calculate momentum difference in LCMS : frame where pz1 + pz2 = 0
324 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
325 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
326 // determine beta to LCMS
327 double beta = (l1.z()+l2.z()) / (l1.e()+l2.e()) ;
328 double beta2 = beta*beta ;
329 // unfortunately STAR Class lib knows only boost(particle) not boost(beta) :(
330 // -> create particle with velocity beta and mass 1.0
331 // actually this is : dummyPz = ::sqrt( (dummyMass*dummyMass*beta2) / (1-beta2) ) ;
332 double dummyPz = ::sqrt( (beta2) / (1-beta2) ) ;
333 // boost in the correct direction
334 if (beta>0.0) { dummyPz = -dummyPz; } ;
335 // create dummy particle
336 AliFemtoLorentzVector l(0.0, 0.0, dummyPz) ;
337 double dummyMass = 1.0 ;
338 l.SetE(l.vect().MassHypothesis(dummyMass) );
339 // boost particles along the beam into a frame with velocity beta
340 AliFemtoLorentzVector l1boosted = l1.boost(l) ;
341 AliFemtoLorentzVector l2boosted = l2.boost(l) ;
342 // caculate the momentum difference with random ordering of the particle
343 if ( rand()/(double)RAND_MAX >0.50)
344 { l = l1boosted-l2boosted ; }
346 { l = l2boosted-l1boosted ;} ;
347 // fill momentum differences into return variables
349 qT = l.vect().Perp() ;
352 //___________________________________
353 // Yano-Koonin-Podgoretskii Parametrisation in pair rest frame
354 void AliFemtoPair::QYKPPF(double& qP, double& qT, double& q0) const
357 // calculate momentum difference in pair rest frame : frame where (pz1 + pz2, py1 + py2, px1 + px2) = (0,0,0)
359 AliFemtoLorentzVector l1 = fTrack1->FourMomentum() ;
360 AliFemtoLorentzVector l2 = fTrack2->FourMomentum() ;
361 // the center of gravity of the pair travels with l
362 AliFemtoLorentzVector l = l1 + l2 ;
366 AliFemtoLorentzVector l1boosted = l1.boost(l) ;
367 AliFemtoLorentzVector l2boosted = l2.boost(l) ;
368 // caculate the momentum difference with random ordering of the particle
369 if ( rand()/(double)RAND_MAX > 0.50)
370 { l = l1boosted-l2boosted ; }
372 { l = l2boosted-l1boosted ;} ;
373 // fill momentum differences into return variables
375 qT = l.vect().Perp();
379 double AliFemtoPair::QOutCMS() const
381 // relative momentum out component in lab frame
382 AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect();
383 AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect();
385 double dx = tmp1.x() - tmp2.x();
386 double xt = tmp1.x() + tmp2.x();
388 double dy = tmp1.y() - tmp2.y();
389 double yt = tmp1.y() + tmp2.y();
391 double k1 = (::sqrt(xt*xt+yt*yt));
392 double k2 = (dx*xt+dy*yt);
397 double AliFemtoPair::QSideCMS() const
399 // relative momentum side component in lab frame
400 AliFemtoThreeVector tmp1 = fTrack1->FourMomentum().vect();
401 AliFemtoThreeVector tmp2 = fTrack2->FourMomentum().vect();
403 double x1 = tmp1.x(); double y1 = tmp1.y();
404 double x2 = tmp2.x(); double y2 = tmp2.y();
406 double xt = x1+x2; double yt = y1+y2;
407 double k1 = ::sqrt(xt*xt+yt*yt);
409 double tmp = 2.0*(x2*y1-x1*y2)/k1;
413 //_________________________
414 double AliFemtoPair::QLongCMS() const
416 // relative momentum component in lab frame
417 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
418 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
420 double dz = tmp1.z() - tmp2.z();
421 double zz = tmp1.z() + tmp2.z();
423 double dt = tmp1.t() - tmp2.t();
424 double tt = tmp1.t() + tmp2.t();
427 double gamma = 1.0/TMath::Sqrt((1.-beta)*(1.+beta));
429 double temp = gamma*(dz - beta*dt);
433 //________________________________
434 double AliFemtoPair::QOutPf() const
436 // relative momentum out component in pair frame
437 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
438 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
440 double dt = tmp1.t() - tmp2.t();
441 double tt = tmp1.t() + tmp2.t();
443 double xt = tmp1.x() + tmp2.x();
444 double yt = tmp1.y() + tmp2.y();
446 double k1 = ::sqrt(xt*xt + yt*yt);
448 double gOut = 1.0/TMath::Sqrt((1.-bOut)*(1.+bOut));
450 double temp = gOut*(QOutCMS() - bOut*dt);
454 //___________________________________
455 double AliFemtoPair::QSidePf() const
457 // relative momentum side component in pair frame
459 return(this->QSideCMS());
462 //___________________________________
464 double AliFemtoPair::QLongPf() const
466 // relative momentum long component in pair frame
468 return(this->QLongCMS());
471 //___________________________________
472 double AliFemtoPair::QOutBf(double /* beta */) const
474 // relative momentum out component
475 return(this->QOutCMS());
478 //___________________________________
480 double AliFemtoPair::QSideBf(double /* beta */) const
482 // relative momentum side component
483 return(this->QSideCMS());
486 //___________________________________
487 double AliFemtoPair::QLongBf(double beta) const
489 // relative momentum long component
490 AliFemtoLorentzVector tmp1 = fTrack1->FourMomentum();
491 AliFemtoLorentzVector tmp2 = fTrack2->FourMomentum();
493 double dz = tmp1.z() - tmp2.z();
494 double dt = tmp1.t() + tmp2.t();
496 double gamma = 1.0/::sqrt((1.-beta)*(1.+beta));
498 double temp = gamma*(dz - beta*dt);
502 double AliFemtoPair::Quality() const {
503 // Calculate split quality of the pair
504 unsigned long mapMask0 = 0xFFFFFF00;
505 unsigned long mapMask1 = 0x1FFFFF;
506 unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0;
507 unsigned long padRow25To45Track1 = fTrack1->TopologyMap(1) & mapMask1;
508 unsigned long padRow1To24Track2 = fTrack2->TopologyMap(0) & mapMask0;
509 unsigned long padRow25To45Track2 = fTrack2->TopologyMap(1) & mapMask1;
511 unsigned long bothPads1To24 = padRow1To24Track1 & padRow1To24Track2;
512 unsigned long bothPads25To45 = padRow25To45Track1 & padRow25To45Track2;
514 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
515 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
519 double normQual = 0.0;
520 int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits();
521 for (ibits=8;ibits<=31;ibits++) {
523 bitI |= 1UL<<(ibits);
524 if ( onePad1To24 & bitI ) {
529 if ( bothPads1To24 & bitI ) tQuality--;
532 for (ibits=0;ibits<=20;ibits++) {
534 bitI |= 1UL<<(ibits);
535 if ( onePad25To45 & bitI ) {
540 if ( bothPads25To45 & bitI ) tQuality--;
543 normQual = (double)tQuality/( (double) tMaxQuality );
548 double AliFemtoPair::Quality2() const {
549 // second implementation of split quality
550 unsigned long mapMask0 = 0xFFFFFF00;
551 unsigned long mapMask1 = 0x1FFFFF;
552 unsigned long padRow1To24Track1 = fTrack1->TopologyMap(0) & mapMask0;
553 unsigned long padRow25To45Track1 = fTrack1->TopologyMap(1) & mapMask1;
554 unsigned long padRow1To24Track2 = fTrack2->TopologyMap(0) & mapMask0;
555 unsigned long padRow25To45Track2 = fTrack2->TopologyMap(1) & mapMask1;
558 //unsigned long bothPads1To24 = padRow1To24Track1 & padRow1To24Track2;
559 //unsigned long bothPads25To45 = padRow25To45Track1 & padRow25To45Track2;
562 unsigned long onePad1To24 = padRow1To24Track1 ^ padRow1To24Track2;
563 unsigned long onePad25To45 = padRow25To45Track1 ^ padRow25To45Track2;
567 double normQual = 0.0;
568 int tMaxQuality = fTrack1->NumberOfHits() + fTrack2->NumberOfHits();
569 for (ibits=8;ibits<=31;ibits++) {
571 bitI |= 1UL<<(ibits);
572 if ( onePad1To24 & bitI ) {
577 //if ( bothPads1To24 & bitI ) tQuality--;
580 for (ibits=0;ibits<=20;ibits++) {
582 bitI |= 1UL<<(ibits);
583 if ( onePad25To45 & bitI ) {
588 //if ( bothPads25To45 & bitI ) tQuality--;
591 normQual = (double)tQuality/( (double) tMaxQuality );
597 double AliFemtoPair::NominalTpcExitSeparation() const {
598 // separation at exit from STAR TPC
599 AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->Track()->NominalTpcExitPoint();
603 double AliFemtoPair::NominalTpcEntranceSeparation() const {
604 // separation at entrance to STAR TPC
605 AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->Track()->NominalTpcEntrancePoint();
609 // double AliFemtoPair::NominalTpcAverageSeparation() const {
610 // // average separation in STAR TPC
611 // AliFemtoThreeVector diff;
612 // double tAveSep = 0.0;
614 // if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
615 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
616 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
617 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
618 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
619 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
620 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
623 // // for (int ipt=0; ipt<11; ipt++){
624 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
626 // tAveSep += diff.Mag();
628 // tAveSep = tAveSep/(ipt+1.);
629 // return (tAveSep);}
633 double AliFemtoPair::OpeningAngle() const {
635 return 57.296* fTrack1->FourMomentum().vect().Angle( fTrack2->FourMomentum().vect() );
636 // AliFemtoThreeVector p1 = fTrack1->FourMomentum().vect();
637 // AliFemtoThreeVector p2 = fTrack2->FourMomentum().vect();
638 // return 57.296*(p1.phi()-p2.phi());
639 // //double dAngInv = 57.296*acos((p1.dot(p2))/(p1.Mag()*p2.Mag()));
640 // //return (dAngInv);
645 double AliFemtoPair::KStarFlipped() const {
646 // kstar with sign flipped
647 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
649 AliFmThreeVectorD qwe = tP1.vect();
650 qwe *= -1.; // flip it
653 AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
654 double tMass = abs(tSum);
655 AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
656 double tGamma = tSum.e()/tMass;
657 AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
658 (tGammaBeta*tGammaBeta))*tGammaBeta;
659 AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
660 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
661 //VP tP1.vect() *= -1.; // unflip it
662 return tK.vect().Mag();
665 //double AliFemtoPair::CVK() const{
666 //const AliFemtoLorentzVector& tP1 = fTrack1->FourMomentum();
667 //AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
668 //double tMass = abs(tSum);
669 //AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
670 //double tGamma = tSum.e()/tMass;
671 //AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
672 // (tGammaBeta*tGammaBeta))*tGammaBeta;
673 //AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
674 // tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
675 //return (tK.vect())*tGammaBeta/tK.vect().Magnitude()/tGammaBeta.Magnitude();
678 double AliFemtoPair::CVKFlipped() const{
679 // CVK with sign flipped
680 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
681 AliFmThreeVectorD qwe = tP1.vect();
682 qwe *= -1.; // flip it
685 AliFemtoLorentzVector tSum = (tP1+fTrack2->FourMomentum());
686 double tMass = abs(tSum);
687 AliFmThreeVectorD tGammaBeta = (1./tMass)*tSum.vect();
688 double tGamma = tSum.e()/tMass;
689 AliFmThreeVectorD tLongMom = ((tP1.vect()*tGammaBeta)/
690 (tGammaBeta*tGammaBeta))*tGammaBeta;
691 AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
692 tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
693 //VP tP1.vect() *= -1.; // unflip it
694 return (tK.vect())*tGammaBeta/tGamma;
697 double AliFemtoPair::PInv() const{
698 // invariant total momentum
699 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
700 AliFemtoLorentzVector tP2 = fTrack2->FourMomentum();
701 double tP = (tP1.px()+tP2.px())*(tP1.px()+tP2.px())+
702 (tP1.py()+tP2.py())*(tP1.py()+tP2.py())+
703 (tP1.pz()+tP2.pz())*(tP1.pz()+tP2.pz())-
704 (tP1.e() -tP2.e() )*(tP1.e() -tP2.e() );
705 return ::sqrt(fabs(tP));
708 double AliFemtoPair::QInvFlippedXY() const{
709 // qinv with X and Y flipped
710 AliFemtoLorentzVector tP1 = fTrack1->FourMomentum();
711 tP1.SetX(-1.*tP1.x());
712 tP1.SetY(-1.*tP1.y());
713 AliFemtoLorentzVector tDiff = (tP1-fTrack2->FourMomentum());
714 return ( -1.* tDiff.m());
717 void AliFemtoPair::CalcNonIdPar() const{ // fortran like function! faster?
718 // Calculate generalized relative mometum
719 // Use this instead of qXYZ() function when calculating
720 // anything for non-identical particles
721 fNonIdParNotCalculated=0;
722 double px1 = fTrack1->FourMomentum().vect().x();
723 double py1 = fTrack1->FourMomentum().vect().y();
724 double pz1 = fTrack1->FourMomentum().vect().z();
725 double pE1 = fTrack1->FourMomentum().e();
726 double tParticle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1);
727 double px2 = fTrack2->FourMomentum().vect().x();
728 double py2 = fTrack2->FourMomentum().vect().y();
729 double pz2 = fTrack2->FourMomentum().vect().z();
730 double pE2 = fTrack2->FourMomentum().e();
731 double tParticle2Mass = ::sqrt(pE2*pE2 - px2*px2 - py2*py2 - pz2*pz2);
733 double tPx = px1+px2;
734 double tPy = py1+py2;
735 double tPz = pz1+pz2;
736 double tPE = pE1+pE2;
738 double tPtrans = tPx*tPx + tPy*tPy;
739 double tMtrans = tPE*tPE - tPz*tPz;
740 double tPinv = ::sqrt(tMtrans - tPtrans);
741 tMtrans = ::sqrt(tMtrans);
742 tPtrans = ::sqrt(tPtrans);
744 double tQinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
745 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
747 double tQ = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/tPinv;
748 tQ = sqrt ( tQ*tQ - tQinvL);
753 double beta = tPz/tPE;
754 double gamma = tPE/tMtrans;
756 double pz1L = gamma * (pz1 - beta * pE1);
757 double pE1L = gamma * (pE1 - beta * pz1);
759 // fill histogram for beam projection ( z - axis )
762 // ad 2) rotation px -> tPt
763 double px1R = (px1*tPx + py1*tPy)/tPtrans;
764 double py1R = (-px1*tPy + py1*tPx)/tPtrans;
766 //fill histograms for side projection ( y - axis )
769 // ad 3) go from LCMS to CMS
770 beta = tPtrans/tMtrans;
771 gamma = tMtrans/tPinv;
773 double px1C = gamma * (px1R - beta * pE1L);
775 // fill histogram for out projection ( x - axis )
778 fCVK = (fDKOut*tPtrans + fDKLong*tPz)/fKStarCalc/::sqrt(tPtrans*tPtrans+tPz*tPz);
782 /*void AliFemtoPair::calcNonIdParGlobal() const{ // fortran like function! faster?
783 fNonIdParNotCalculatedGlobal=0;
784 double px1 = fTrack1->Track()->PGlobal().x();
785 double py1 = fTrack1->Track()->PGlobal().y();
786 double pz1 = fTrack1->Track()->PGlobal().z();
787 double tParticle1Mass = fTrack1->FourMomentum().m2();
788 double pE1 = ::sqrt(tParticle1Mass + px1*px1 + py1*py1 + pz1*pz1);
789 tParticle1Mass = ::sqrt(tParticle1Mass);
791 double px2 = fTrack2->Track()->PGlobal().x();
792 double py2 = fTrack2->Track()->PGlobal().y();
793 double pz2 = fTrack2->Track()->PGlobal().z();
794 double tParticle2Mass = fTrack2->FourMomentum().m2();
795 double pE2 = ::sqrt(tParticle2Mass + px2*px2 + py2*py2 + pz2*pz2);
796 tParticle2Mass = ::sqrt(tParticle2Mass);
803 double Ptrans = Px*Px + Py*Py;
804 double Mtrans = PE*PE - Pz*Pz;
805 double Pinv = ::sqrt(Mtrans - Ptrans);
806 Mtrans = ::sqrt(Mtrans);
807 Ptrans = ::sqrt(Ptrans);
809 double QinvL = (pE1-pE2)*(pE1-pE2) - (px1-px2)*(px1-px2) -
810 (py1-py2)*(py1-py2) - (pz1-pz2)*(pz1-pz2);
812 double Q = (tParticle1Mass*tParticle1Mass - tParticle2Mass*tParticle2Mass)/Pinv;
813 Q = sqrt ( Q*Q - QinvL);
815 kStarCalcGlobal = Q/2;
819 double gamma = PE/Mtrans;
821 double pz1L = gamma * (pz1 - beta * pE1);
822 double pE1L = gamma * (pE1 - beta * pz1);
824 // fill histogram for beam projection ( z - axis )
825 fDKLongGlobal = pz1L;
827 // ad 2) rotation px -> Pt
828 double px1R = (px1*Px + py1*Py)/Ptrans;
829 double py1R = (-px1*Py + py1*Px)/Ptrans;
831 //fill histograms for side projection ( y - axis )
832 fDKSideGlobal = py1R;
834 // ad 3) go from LCMS to CMS
835 beta = Ptrans/Mtrans;
838 double px1C = gamma * (px1R - beta * pE1L);
840 // fill histogram for out projection ( x - axis )
843 fCVKGlobal = (fDKOutGlobal*Ptrans + fDKLongGlobal*Pz)/
844 kStarCalcGlobal/::sqrt(Ptrans*Ptrans+Pz*Pz);
849 // double AliFemtoPair::DcaInsideTpc() const{
850 // // dcs inside the STAR TPC
851 // double tMinDist=NominalTpcEntranceSeparation();
852 // double tExit = NominalTpcExitSeparation();
853 // tMinDist = (tExit>tMinDist) ? tMinDist : tExit;
854 // double tInsideDist;
855 // //tMinDist = 999.;
857 // double rMin = 60.;
858 // double rMax = 190.;
859 // const AliFmPhysicalHelixD& tHelix1 = fTrack1->Helix();
860 // const AliFmPhysicalHelixD& tHelix2 = fTrack2->Helix();
861 // // --- One is a line and other one a helix
862 // //if (tHelix1.mSingularity != tHelix2.mSingularity) return -999.;
863 // // --- 2 lines : don't care right now
864 // //if (tHelix1.mSingularity) return -999.;
866 // double dx = tHelix2.XCenter() - tHelix1.XCenter();
867 // double dy = tHelix2.YCenter() - tHelix1.YCenter();
868 // double dd = ::sqrt(dx*dx + dy*dy);
869 // double r1 = 1/tHelix1.Curvature();
870 // double r2 = 1/tHelix2.Curvature();
871 // double cosAlpha = (r1*r1 + dd*dd - r2*r2)/(2*r1*dd);
875 // if (fabs(cosAlpha) < 1) { // two solutions
876 // double sinAlpha = sin(acos(cosAlpha));
877 // x = tHelix1.XCenter() + r1*(cosAlpha*dx - sinAlpha*dy)/dd;
878 // y = tHelix1.YCenter() + r1*(sinAlpha*dx + cosAlpha*dy)/dd;
879 // r = ::sqrt(x*x+y*y);
880 // if( r > rMin && r < rMax &&
881 // fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
882 // ){ // first solution inside
883 // s = tHelix1.PathLength(x, y);
884 // tInsideDist=tHelix2.Distance(tHelix1.At(s));
885 // if(tInsideDist<tMinDist) tMinDist = tInsideDist;
888 // x = tHelix1.XCenter() + r1*(cosAlpha*dx + sinAlpha*dy)/dd;
889 // y = tHelix1.YCenter() + r1*(cosAlpha*dy - sinAlpha*dx)/dd;
890 // r = ::sqrt(x*x+y*y);
891 // if( r > rMin && r < rMax &&
892 // fabs(atan2(y,x)-fTrack1->Track()->NominalTpcEntrancePoint().phi())< 0.5
893 // ) { // second solution inside
894 // s = tHelix1.PathLength(x, y);
895 // tInsideDist=tHelix2.Distance(tHelix1.At(s));
896 // if(tInsideDist<tMinDist) tMinDist = tInsideDist;
903 // void AliFemtoPair::CalcMergingPar() const{
904 // // Calculate merging factor for the pair in STAR TPC
905 // fMergingParNotCalculated=0;
909 // fFracOfMergedRow = 0.;
910 // fWeightedAvSep =0.;
912 // double tDistMax = 200.;
913 // for(int ti=0 ; ti<45 ; ti++){
914 // if(fTrack1->fSect[ti]==fTrack2->fSect[ti] && fTrack1->fSect[ti]!=-1){
915 // tDu = fabs(fTrack1->fU[ti]-fTrack2->fU[ti]);
916 // tDz = fabs(fTrack1->fZ[ti]-fTrack2->fZ[ti]);
919 // fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
920 // tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
921 // tDz*tDz/fgMaxDzInner/fgMaxDzInner);
922 // //fFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
925 // fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
926 // tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
927 // tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
928 // //fFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
930 // if(tDist<tDistMax){
931 // fClosestRowAtDCA = ti+1;
934 // fWeightedAvSep += tDist;
938 // fWeightedAvSep /= tN;
939 // fFracOfMergedRow /= tN;
942 // fClosestRowAtDCA = -1;
943 // fFracOfMergedRow = -1.;
944 // fWeightedAvSep = -1.;
947 // double AliFemtoPair::TpcExitSeparationTrackV0Pos() const {
948 // //________________V0 daughters exit/entrance/average separation calc.
949 // //_______1st part is a track 2nd is a V0 considering Pos daughter
951 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint();
952 // return (diff.Mag());
955 // double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const {
956 // //________________V0 daughters exit/entrance/average separation calc.
957 // //_______1st part is a track 2nd is a V0 considering Pos daughter
958 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
959 // return (diff.Mag());
962 // double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const {
963 // //________________V0 daughters exit/entrance/average separation calc.
964 // //_______1st part is a track 2nd is a V0 considering Pos daughter
965 // AliFemtoThreeVector diff;
966 // double tAveSep = 0.0;
968 // if (fTrack1->fNominalPosSample && fTrack2->fNominalPosSample){
969 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
970 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
971 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
972 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
973 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
974 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
977 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
979 // tAveSep += diff.Mag();
981 // tAveSep = tAveSep/(ipt+1.);
982 // return (tAveSep);}
985 // double AliFemtoPair::TpcExitSeparationTrackV0Neg() const {
986 // //_______1st part is a track 2nd is a V0 considering Neg daughter
987 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint();
988 // return (diff.Mag());
991 // double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const {
992 // //_______1st part is a track 2nd is a V0 considering Neg daughter
993 // AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
994 // return (diff.Mag());
997 // double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const {
998 // //_______1st part is a track 2nd is a V0 considering Neg daughter
999 // AliFemtoThreeVector diff;
1000 // double tAveSep = 0.0;
1002 // if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
1003 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
1004 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
1005 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
1006 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1007 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1008 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1011 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1013 // tAveSep += diff.Mag();
1015 // tAveSep = tAveSep/(ipt+1.);
1016 // return (tAveSep);}
1020 // double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const {
1021 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1022 // AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint();
1023 // return (diff.Mag());
1026 // double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const {
1027 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1028 // AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
1029 // return (diff.Mag());
1031 // double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const {
1032 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
1033 // AliFemtoThreeVector diff;
1034 // double tAveSep = 0.0;
1036 // if (fTrack1->fNominalPosSample && (fTrack2->fNominalPosSample)){
1037 // while ((fabs(fTrack1->fNominalPosSample[ipt].x())<9999.) &&
1038 // (fabs(fTrack1->fNominalPosSample[ipt].y())<9999.) &&
1039 // (fabs(fTrack1->fNominalPosSample[ipt].z())<9999.) &&
1040 // (fabs(fTrack2->fNominalPosSample[ipt].x())<9999.) &&
1041 // (fabs(fTrack2->fNominalPosSample[ipt].y())<9999.) &&
1042 // (fabs(fTrack2->fNominalPosSample[ipt].z())<9999.) &&
1045 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
1047 // tAveSep += diff.Mag();
1049 // tAveSep = tAveSep/(ipt+1);
1050 // return (tAveSep);}
1054 // double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const {
1055 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1056 // AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint();
1057 // return (diff.Mag());
1060 // double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const {
1061 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1062 // AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
1063 // return (diff.Mag());
1065 // double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const {
1066 // //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
1067 // AliFemtoThreeVector diff;
1068 // double tAveSep = 0.0;
1070 // if (fTrack1->fNominalPosSample && fTrack2->fTpcV0NegPosSample){
1071 // while (fabs(fTrack1->fNominalPosSample[ipt].x())<9999. &&
1072 // fabs(fTrack1->fNominalPosSample[ipt].y())<9999. &&
1073 // fabs(fTrack1->fNominalPosSample[ipt].z())<9999. &&
1074 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1075 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1076 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1079 // diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1081 // tAveSep += diff.Mag();
1083 // tAveSep = tAveSep/(ipt+1.);
1084 // return (tAveSep);}
1087 // double AliFemtoPair::TpcExitSeparationV0NegV0Pos() const {
1088 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1089 // // this is to check the upper case
1090 // AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint();
1091 // return (diff.Mag());
1094 // double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const {
1095 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1096 // // this is to check the upper case
1097 // AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
1098 // return (diff.Mag());
1100 // double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const {
1101 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
1102 // // this is to check the upper case
1103 // AliFemtoThreeVector diff;
1104 // double tAveSep = 0.0;
1106 // if ( fTrack1->fTpcV0NegPosSample && fTrack2->fNominalPosSample){
1107 // while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
1108 // fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
1109 // fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
1110 // fabs(fTrack2->fNominalPosSample[ipt].x())<9999. &&
1111 // fabs(fTrack2->fNominalPosSample[ipt].y())<9999. &&
1112 // fabs(fTrack2->fNominalPosSample[ipt].z())<9999. &&
1115 // diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
1117 // tAveSep += diff.Mag();
1119 // tAveSep = tAveSep/(ipt+1);
1120 // return (tAveSep);}
1123 // double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const {
1124 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1125 // AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint();
1126 // return (diff.Mag());
1129 // double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const {
1130 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1131 // AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
1132 // return (diff.Mag());
1134 // double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const {
1135 // //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
1136 // AliFemtoThreeVector diff;
1137 // double tAveSep = 0.0;
1139 // if (fTrack1->fTpcV0NegPosSample && fTrack2->fTpcV0NegPosSample){
1140 // while (fabs(fTrack1->fTpcV0NegPosSample[ipt].x())<9999. &&
1141 // fabs(fTrack1->fTpcV0NegPosSample[ipt].y())<9999. &&
1142 // fabs(fTrack1->fTpcV0NegPosSample[ipt].z())<9999. &&
1143 // fabs(fTrack2->fTpcV0NegPosSample[ipt].x())<9999. &&
1144 // fabs(fTrack2->fTpcV0NegPosSample[ipt].y())<9999. &&
1145 // fabs(fTrack2->fTpcV0NegPosSample[ipt].z())<9999. &&
1148 // diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
1150 // tAveSep += diff.Mag();
1152 // tAveSep = tAveSep/(ipt+1);
1153 // return (tAveSep);}
1157 // void AliFemtoPair::CalcMergingParFctn(short* tmpMergingParNotCalculatedFctn,
1158 // float* tmpZ1,float* tmpU1,
1159 // float* tmpZ2,float* tmpU2,
1160 // int *tmpSect1,int *tmpSect2,
1161 // double* tmpFracOfMergedRow,
1162 // double* tmpClosestRowAtDCA
1164 // // calculate heper variables for merging
1165 // tmpMergingParNotCalculatedFctn=0;
1168 // *tmpFracOfMergedRow = 0.;
1169 // *tmpClosestRowAtDCA = 0.;
1171 // double tDistMax = 100000000.;
1172 // for(int ti=0 ; ti<45 ; ti++){
1173 // if(tmpSect1[ti]==tmpSect2[ti] && tmpSect1[ti]!=-1){
1174 // tDu = fabs(tmpU1[ti]-tmpU2[ti]);
1175 // tDz = fabs(tmpZ1[ti]-tmpZ2[ti]);
1178 // *tmpFracOfMergedRow += (tDu<fgMaxDuInner && tDz<fgMaxDzInner);
1179 // tDist = ::sqrt(tDu*tDu/fgMaxDuInner/fgMaxDuInner+
1180 // tDz*tDz/fgMaxDzInner/fgMaxDzInner);
1183 // *tmpFracOfMergedRow += (tDu<fgMaxDuOuter && tDz<fgMaxDzOuter);
1184 // tDist = ::sqrt(tDu*tDu/fgMaxDuOuter/fgMaxDuOuter+
1185 // tDz*tDz/fgMaxDzOuter/fgMaxDzOuter);
1187 // if(tDist<tDistMax){
1188 // fClosestRowAtDCA = ti+1;
1189 // tDistMax = tDist;
1191 // //fWeightedAvSep += tDist; // now, wrong but not used
1195 // //fWeightedAvSep /= tN;
1196 // *tmpFracOfMergedRow /= tN;
1199 // *tmpClosestRowAtDCA = -1;
1200 // *tmpFracOfMergedRow = -1.;
1201 // //fWeightedAvSep = -1.;