Another portion of classes moved from HBTAN to ANALYSIS. HBTAN made working with...
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Jun 2004 08:09:39 +0000 (08:09 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Jun 2004 08:09:39 +0000 (08:09 +0000)
53 files changed:
ANALYSIS/ANALYSISLinkDef.h
ANALYSIS/AliAOD.h
ANALYSIS/AliAODPair.cxx [new file with mode: 0644]
ANALYSIS/AliAODPair.h [new file with mode: 0644]
ANALYSIS/AliAODPairCut.cxx [new file with mode: 0644]
ANALYSIS/AliAODPairCut.h [new file with mode: 0644]
ANALYSIS/AliAODParticle.cxx
ANALYSIS/AliAODParticle.h
ANALYSIS/AliAODParticleCut.cxx
ANALYSIS/AliAODParticleCut.h
ANALYSIS/AliEventBuffer.cxx [new file with mode: 0644]
ANALYSIS/AliEventBuffer.h [new file with mode: 0644]
ANALYSIS/AliReaderESD.cxx
ANALYSIS/AliTrackPoints.cxx
ANALYSIS/AliTrackPoints.h
ANALYSIS/AliVAODParticle.h
ANALYSIS/libANALYSIS.pkg
HBTAN/AliHBTAnalysis.cxx
HBTAN/AliHBTAnalysis.h
HBTAN/AliHBTCorrFitFctn.cxx
HBTAN/AliHBTCorrectQInvCorrelFctn.cxx
HBTAN/AliHBTCorrectQInvCorrelFctn.h
HBTAN/AliHBTCorrelFctn.cxx
HBTAN/AliHBTCorrelFctn.h
HBTAN/AliHBTCrab.cxx
HBTAN/AliHBTFunction.cxx
HBTAN/AliHBTFunction.h
HBTAN/AliHBTLLWeights.cxx
HBTAN/AliHBTMonDistributionFctns.cxx
HBTAN/AliHBTMonDistributionFctns.h
HBTAN/AliHBTMonResolutionFctns.h
HBTAN/AliHBTMonitorFunction.cxx
HBTAN/AliHBTMonitorFunction.h
HBTAN/AliHBTPIDPurityFctns.cxx
HBTAN/AliHBTPIDPurityFctns.h
HBTAN/AliHBTPair.cxx
HBTAN/AliHBTPair.h
HBTAN/AliHBTPairCut.cxx
HBTAN/AliHBTPairCut.h
HBTAN/AliHBTQDistributionFctns.h
HBTAN/AliHBTQResolutionFctns.cxx
HBTAN/AliHBTQResolutionFctns.h
HBTAN/AliHBTTrackPoints.cxx
HBTAN/AliHBTTrackPoints.h
HBTAN/AliHBTWeightFctn.cxx
HBTAN/AliHBTWeightFctn.h
HBTAN/AliHBTWeightTheorFctn.cxx
HBTAN/AliHBTWeightTheorFctn.h
HBTAN/AliHBTWeightsPID.cxx
HBTAN/AliHBTWriteInternFormat.C
HBTAN/HBTAnalysisLinkDef.h
HBTAN/hbtanalysis.C
HBTAN/libHBTAN.pkg

index 347b7f2..ea3704b 100644 (file)
 #pragma link C++ class AliAnalysis+;
 
 #pragma link C++ class AliAOD+;
+#pragma link C++ class AliEventBuffer+;
 #pragma link C++ class AliVAODParticle+;
 #pragma link C++ class AliAODParticle+;
+#pragma link C++ class AliAODPair+;
 
 #pragma link C++ class AliAODRun+;
 
 #pragma link C++ class AliAODAndCut+;
 #pragma link C++ class AliAODOrCut+;
 
+
+#pragma link C++ class AliAODPairCut-;
+#pragma link C++ class AliAODEmptyPairCut-;
+#pragma link C++ class AliAODBasePairCut+;
+
+#pragma link C++ class AliAODQInvCut+;
+#pragma link C++ class AliAODKtCut+;
+#pragma link C++ class AliAODKStarCut+;
+#pragma link C++ class AliAODQSideLCMSCut+;
+#pragma link C++ class AliAODQOutLCMSCut+;
+#pragma link C++ class AliAODQLongLCMSCut+;
+#pragma link C++ class AliAODDeltaPhiCut+;
+#pragma link C++ class AliAODDeltaThetaCut+;
+#pragma link C++ class AliAODAvSeparationCut+;
+#pragma link C++ class AliAODSeparationCut+;
+#pragma link C++ class AliAODITSSeparationCut+;
+#pragma link C++ class AliAODCluterOverlapCut+;
+#pragma link C++ class AliAODOutSideSameSignCut+;
+#pragma link C++ class AliAODOutSideDiffSignCut+;
+#pragma link C++ class AliAODLogicalOperPairCut-;
+#pragma link C++ class AliAODOrPairCut+;
+#pragma link C++ class AliAODAndPairCut+;
+    
+
+
 #endif
index bd66e88..6783735 100644 (file)
@@ -19,9 +19,10 @@ class TParticle;
 
 class AliAOD: public TObject {
 public:
-  AliAOD(){}
+  AliAOD(){SetOwner(kTRUE);}
   virtual ~AliAOD() { Reset(); }
 
+  virtual void             SetOwner(Bool_t owner){fParticles.SetOwner(owner);}
   virtual TObjArray*       GetParticles() {return &fParticles;};
   virtual Int_t            GetNumberOfParticles() const  {return fParticles.GetEntriesFast();}
   virtual AliVAODParticle*  GetParticle(Int_t index) const {return (AliVAODParticle*) fParticles[index];}
diff --git a/ANALYSIS/AliAODPair.cxx b/ANALYSIS/AliAODPair.cxx
new file mode 100644 (file)
index 0000000..31de69b
--- /dev/null
@@ -0,0 +1,438 @@
+#include "AliAODPair.h"
+//_________________________________________________________________________
+///////////////////////////////////////////////////////////////////////////
+//
+// class AliAODPair
+//
+// class implements pair of particles and taking care of caluclation (almost)
+// all of pair properties (Qinv, InvMass,...)
+// 
+// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
+//
+////////////////////////////////////////////////////////////////////////////
+
+#include "AliVAODParticle.h"
+#include "AliTrackPoints.h"
+
+ClassImp(AliAODPair)
+
+/************************************************************************/
+AliAODPair::AliAODPair(Bool_t rev):
+ fPart1(0x0),
+ fPart2(0x0),
+ fSwappedPair(0x0),
+ fQSideLCMS(0.0),
+ fQSideLCMSNotCalc(kTRUE),
+ fQOutLCMS(0.0),
+ fQOutLCMSNotCalc(kTRUE),
+ fQLongLCMS(0.0),
+ fQLongLCMSNotCalc(kTRUE),
+ fQInv(0.0),
+ fQInvNotCalc(kTRUE),
+ fInvMass(0.0),
+ fInvMassNotCalc(kTRUE),
+ fKt(0.0),
+ fKtNotCalc(kTRUE),
+ fKStar(0.0),
+ fKStarNotCalc(kTRUE),
+ fPInv(0.0),
+ fQSide(0.0),
+ fOut(0.0),
+ fQLong(0.0),
+ fMt(0.0),
+ fMtNotCalc(kTRUE),
+ fInvMassSqr(0.0),
+ fMassSqrNotCalc(kTRUE),
+ fQInvL(0.0),
+ fQInvLNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
+ fPxSum(0.0),
+ fPySum(0.0),
+ fPzSum(0.0),
+ fESum(0.0),
+ fSumsNotCalc(kTRUE),
+ fPxDiff(0.0),
+ fPyDiff(0.0),
+ fPzDiff(0.0),
+ fEDiff(0.0),
+ fDiffsNotCalc(kTRUE),
+ fGammaLCMS(0.0),
+ fGammaLCMSNotCalc(kTRUE),
+ fChanged(kTRUE)
+ {
+//value of rev defines if it is Swapped
+//if you pass kTRUE swpaped pair will NOT be created
+//though you wont be able to get the swaped pair from this pair
+
+  if(!rev) fSwappedPair = new AliAODPair(kTRUE); //if false create swaped pair
+  
+ }
+/************************************************************************/
+
+AliAODPair::AliAODPair(AliVAODParticle* part1, AliVAODParticle* part2, Bool_t rev):
+ fPart1(part1),
+ fPart2(part2),
+ fSwappedPair(0x0),
+ fQSideLCMS(0.0),
+ fQSideLCMSNotCalc(kTRUE),
+ fQOutLCMS(0.0),
+ fQOutLCMSNotCalc(kTRUE),
+ fQLongLCMS(0.0),
+ fQLongLCMSNotCalc(kTRUE),
+ fQInv(0.0),
+ fQInvNotCalc(kTRUE),
+ fInvMass(0.0),
+ fInvMassNotCalc(kTRUE),
+ fKt(0.0),
+ fKtNotCalc(kTRUE),
+ fKStar(0.0),
+ fKStarNotCalc(kTRUE),
+ fPInv(0.0),
+ fQSide(0.0),
+ fOut(0.0),
+ fQLong(0.0),
+ fMt(0.0),
+ fMtNotCalc(kTRUE),
+ fInvMassSqr(0.0),
+ fMassSqrNotCalc(kTRUE),
+ fQInvL(0.0),
+ fQInvLNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
+ fPxSum(0.0),
+ fPySum(0.0),
+ fPzSum(0.0),
+ fESum(0.0),
+ fSumsNotCalc(kTRUE),
+ fPxDiff(0.0),
+ fPyDiff(0.0),
+ fPzDiff(0.0),
+ fEDiff(0.0),
+ fDiffsNotCalc(kTRUE),
+ fGammaLCMS(0.0),
+ fGammaLCMSNotCalc(kTRUE),
+ fChanged(kTRUE)
+ {
+//value of rev defines if it is Swapped
+//if you pass kTRUE swpaped pair will NOT be created
+//though you wont be able to get the swaped pair from this pair
+
+  if(!rev) fSwappedPair = new AliAODPair(part2,part1,kTRUE); //if false create swaped pair
+  
+ }
+/************************************************************************/
+AliAODPair::AliAODPair(const AliAODPair& in):
+ TObject(in),
+ fPart1(0x0),
+ fPart2(0x0),
+ fSwappedPair(0x0),
+ fQSideLCMS(0.0),
+ fQSideLCMSNotCalc(kTRUE),
+ fQOutLCMS(0.0),
+ fQOutLCMSNotCalc(kTRUE),
+ fQLongLCMS(0.0),
+ fQLongLCMSNotCalc(kTRUE),
+ fQInv(0.0),
+ fQInvNotCalc(kTRUE),
+ fInvMass(0.0),
+ fInvMassNotCalc(kTRUE),
+ fKt(0.0),
+ fKtNotCalc(kTRUE),
+ fKStar(0.0),
+ fKStarNotCalc(kTRUE),
+ fPInv(0.0),
+ fQSide(0.0),
+ fOut(0.0),
+ fQLong(0.0),
+ fMt(0.0),
+ fMtNotCalc(kTRUE),
+ fInvMassSqr(0.0),
+ fMassSqrNotCalc(kTRUE),
+ fQInvL(0.0),
+ fQInvLNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
+ fPxSum(0.0),
+ fPySum(0.0),
+ fPzSum(0.0),
+ fESum(0.0),
+ fSumsNotCalc(kTRUE),
+ fPxDiff(0.0),
+ fPyDiff(0.0),
+ fPzDiff(0.0),
+ fEDiff(0.0),
+ fDiffsNotCalc(kTRUE),
+ fGammaLCMS(0.0),
+ fGammaLCMSNotCalc(kTRUE),
+ fChanged(kTRUE)
+{
+ //cpy constructor
+ in.Copy(*this);
+}
+/************************************************************************/
+
+AliAODPair& AliAODPair::operator=(const AliAODPair& in)
+{
+ //Assigment operator
+ in.Copy(*this);
+ return *this;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetInvMass()
+{
+//Returns qinv value for a pair
+  if(fInvMassNotCalc)
+   {
+     CalculateInvMassSqr(); //method is inline so we not waste th time for jumping into method 
+     
+     if(fInvMassSqr<0)  fInvMass = TMath::Sqrt(-fInvMassSqr);
+     else fInvMass = TMath::Sqrt(fInvMassSqr); 
+     
+     fInvMassNotCalc = kFALSE;
+   }
+  return fInvMass;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetQSideLCMS()
+{
+//return Q Side in Central Of Mass System in Longitudialy Comoving Frame
+  if (fQSideLCMSNotCalc)
+   {
+    fQSideLCMS = (fPart1->Px()*fPart2->Py()-fPart2->Px()*fPart1->Py())/GetKt();
+    fQSideLCMSNotCalc = kFALSE;
+   }
+  return fQSideLCMS;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetQOutLCMS()
+{
+ //caculates Qout in Center Of Mass Longitudionally Co-Moving
+ if(fQOutLCMSNotCalc)
+  {
+   CalculateSums();
+   CalculateDiffs();
+
+   if (fPart1->Mass() != fPart2->Mass())
+    {
+/*    
+      //STAR algorithm
+      Double_t beta  = fPzSum/fESum;
+      Double_t gamma = GetGammaToLCMS();
+      Double_t el = gamma * (fPart1->E() - beta * fPart1->Pz());
+      Double_t x  = ( fPart1->Px()*fPxSum + fPart1->Py()*fPySum) / ( 2.0*GetKt() );
+      beta  = 2.0*GetKt()/GetMt();
+      gamma = GetMt()/GetQInv();
+      fQOutLCMS = gamma * (x - beta * el);
+*/
+
+      //beta=fPzSum/fESum;    // Longit. V == beta
+      Double_t beta=fPzSum/fESum;
+      Double_t gamma = GetGammaToLCMS();
+      
+      Double_t cosphi=fPxSum/(2.0*GetKt());  // cos(phi)
+      Double_t sinphi=fPySum/(2.0*GetKt()); // sin(phi)
+      
+//      ROTATE(part1Px,part1Py,SPHI,CPHI,part1Px,part1Py);//ROT8
+//      ROTATE(part2Px,part2Py,SPHI,CPHI,part2Px,part2Py);//ROT8
+      Double_t tmp;
+      tmp = fPart1->Px()*cosphi + fPart1->Py()*sinphi;
+      Double_t part1Py = fPart1->Py()*cosphi - fPart1->Px()*sinphi;
+      Double_t part1Px = tmp;
+
+      tmp = fPart2->Px()*cosphi + fPart2->Py()*sinphi;
+      Double_t part2Py = fPart2->Py()*cosphi - fPart2->Px()*sinphi;
+      Double_t part2Px = tmp;
+      
+      
+//      LTR(part1Pz,E1,beta,GetGammaToLCMS(),part1Pz,E1a);
+//      LTR(part2Pz,E2,beta,GetGammaToLCMS(),part2Pz,E2a);
+      Double_t part1Pz=gamma*(fPart1->Pz()-beta*fPart1->E());
+      Double_t part2Pz=gamma*(fPart2->Pz()-beta*fPart2->E());
+
+      Double_t part1P2=part1Px*part1Px+part1Py*part1Py+part1Pz*part1Pz;
+      Double_t part2P2=part2Px*part2Px+part2Py*part2Py+part2Pz*part2Pz;
+      Double_t part1E=TMath::Sqrt(fPart1->Mass()*fPart1->Mass()+part1P2);
+      Double_t part2E=TMath::Sqrt(fPart2->Mass()*fPart2->Mass()+part2P2);
+      Double_t sumE=part1E+part2E;
+      Double_t sumPx=part1Px+part2Px;
+      Double_t sumPy=part1Py+part2Py;
+      Double_t sumPZ=part1Pz+part2Pz;
+      Double_t sumP2=sumPx*sumPx+sumPy*sumPy+sumPZ*sumPZ;
+
+      Double_t relmass=TMath::Sqrt(sumE*sumE-sumP2);
+      Double_t hf = (fPart1->Mass()*fPart1->Mass() - fPart2->Mass()*fPart2->Mass())/(relmass*relmass);
+      fQOutLCMS=(part1Px-part2Px);//== id
+      fQOutLCMS=fQOutLCMS-sumPx*hf; //sumPx == fPxSum ale po rotacji i transf
+    }
+   else
+    {
+      Double_t k2 = fPxSum*fPxDiff+fPySum*fPyDiff;
+      fQOutLCMS = 0.5*k2/GetKt();
+   // if (non-id)  fQOutLCMS=fQOutLCMS - sumPx*HF;
+    }
+
+    
+   fQOutLCMSNotCalc = kFALSE;
+  }
+ return fQOutLCMS;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetQLongLCMS()
+{
+ //return Q Long in Central Of Mass System in Longitudialy Comoving Frame
+ if (fQLongLCMSNotCalc)
+  {
+    CalculateSums();
+    CalculateDiffs();
+    Double_t beta = fPzSum/fESum;
+    fQLongLCMS = GetGammaToLCMS() * ( fPzDiff - beta*fEDiff );
+    fQLongLCMSNotCalc = kFALSE;
+  }
+ return fQLongLCMS; 
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetKt()
+{
+ //calculates the evarage momentum of the pair
+  if(fKtNotCalc)
+   { 
+     CalculateSums();
+     fKt =  0.5*TMath::Hypot(fPxSum,fPySum);
+     fKtNotCalc = kFALSE;
+   }
+  return fKt;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetKStar()
+{
+  //calculates invariant velocity difference
+  if (fKStarNotCalc)
+   { 
+    CalculateSums();
+
+    Double_t ptrans = fPxSum*fPxSum + fPySum*fPySum;
+    Double_t mtrans = fESum*fESum - fPzSum*fPzSum;
+    if (ptrans > mtrans)
+     {
+       Error("GetKStar","Tranverse momentum bigger than transverse mass. Not normal for on-shell particles");
+       Error("GetKStar","Particle1:");
+       fPart1->Print();
+       Error("GetKStar","Particle2:");
+       fPart2->Print();
+       Error("GetKStar","");
+       
+       fKStar = 10e5;
+       fKStarNotCalc = kFALSE;
+       return fKStar;
+     }
+    Double_t pinv =   TMath::Sqrt(mtrans - ptrans);
+
+    Double_t q = (fPart1->Mass()*fPart1->Mass() - fPart2->Mass()*fPart2->Mass())/pinv;
+    
+    CalculateQInvL();
+    
+    q = q*q - fQInvL;
+    if ( q < 0)
+     {
+       Info("GetKStar","Sqrt of negative number q = %f",q);
+       Error("GetKStar","Particle1:");
+       fPart1->Print();
+       Error("GetKStar","Particle2:");
+       fPart2->Print();
+       fKStar = 10e5;
+       fKStarNotCalc = kFALSE;
+       return fKStar;
+     }
+     
+    q = TMath::Sqrt(q);
+    fKStar = q/2.;
+    fKStarNotCalc = kFALSE;
+   }
+  return fKStar;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetQInv()
+{
+//returns Qinv 
+//warning for non-id particles you want to use 2*KStar
+  if(fQInvNotCalc)
+   {
+    CalculateQInvL();
+    fQInv = TMath::Sqrt(TMath::Abs(fQInvL));
+    fQInvNotCalc = kFALSE;
+   }
+  return fQInv;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetGammaToLCMS()
+{
+  //calculates gamma factor of the boost to LCMS
+  if(fGammaLCMSNotCalc)
+   {
+     CalculateSums();
+     Double_t beta = fPzSum/fESum;
+     fGammaLCMS = 1.0/TMath::Sqrt(1.0 - beta*beta);
+     fGammaLCMSNotCalc = kFALSE;
+   }
+  return fGammaLCMS;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetMt()
+{
+  //Calculates transverse mass of the pair
+  if (fMtNotCalc)
+   {
+     CalculateSums();
+     fMt = TMath::Sqrt(fESum*fESum - fPzSum*fPzSum);
+     fMtNotCalc = kFALSE;
+   }
+   return fMt;
+}
+/************************************************************************/
+
+Double_t AliAODPair::GetAvarageDistance()
+{
+//returns and buffers avarage distance between two tracks calculated 
+// out of track points (see AliAODTrackPoints class)
+
+  if (fAvarageDistanceNotCalc)
+   {
+     fAvarageDistance = AvDistance();
+     fAvarageDistanceNotCalc = kFALSE;
+   }
+  return fAvarageDistance;
+}
+/************************************************************************/
+
+Double_t AliAODPair::AvDistance()
+{
+  //returns avarage distance between two tracks in range 
+  //as defined in Track-Points of AliVAODParticle
+  //returns negative value if error uccured f.g. tracks do not have track-points
+  AliTrackPoints* tpts1 = fPart1->GetTPCTrackPoints();
+  if ( tpts1 == 0x0)
+   {//it could be simulated pair
+//     Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+
+  AliTrackPoints* tpts2 = fPart2->GetTPCTrackPoints();
+  if ( tpts2 == 0x0)
+   {
+//     Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+
+  return tpts1->AvarageDistance(*tpts2);
+}
diff --git a/ANALYSIS/AliAODPair.h b/ANALYSIS/AliAODPair.h
new file mode 100644 (file)
index 0000000..c70c020
--- /dev/null
@@ -0,0 +1,310 @@
+#ifndef AliAODPair_H
+#define AliAODPair_H
+//_________________________________________________________________________
+///////////////////////////////////////////////////////////////////////////
+//
+// class AliAODPair
+//
+// class implements pair of particles and taking care of caluclation (almost)
+// all of pair properties (Qinv, InvMass,...)
+// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
+//
+////////////////////////////////////////////////////////////////////////////
+
+#include <TObject.h>
+#include "AliVAODParticle.h"
+
+
+class AliAODPair: public TObject
+{
+ public:
+   AliAODPair(Bool_t rev = kFALSE); //contructor
+   AliAODPair(AliVAODParticle* part1, AliVAODParticle* part2, Bool_t rev = kFALSE); //contructor
+   AliAODPair(const AliAODPair& in);
+   
+   virtual ~AliAODPair(){}
+   
+   AliAODPair& operator=(const AliAODPair& in);
+   
+   void SetParticles(AliVAODParticle* p1,AliVAODParticle* p2); //sets particles in the pair
+   AliAODPair* GetSwappedPair() {return fSwappedPair;} //returns pair with swapped particles
+   
+   AliVAODParticle* Particle1() const {return fPart1;} //returns pointer to first particle
+   AliVAODParticle* Particle2() const {return fPart2;} //returns pointer to decond particle
+   
+   virtual void     Changed();
+   //Center Mass System - Longitudinally Comoving
+   
+   virtual Double_t GetInvMass(); //returns invariant mass of the pair
+   virtual Double_t GetMt();
+   virtual Double_t GetQInv(); //returns Q invariant
+   virtual Double_t GetQSideLCMS(); //returns Q Side CMS longitudionally co-moving
+   virtual Double_t GetQOutLCMS(); //returns Q out CMS longitudionally co-moving
+   virtual Double_t GetQLongLCMS(); //returns Q Long CMS longitudionally co-moving
+   
+   
+   virtual Double_t GetKt();  //returns K transverse
+   virtual Double_t GetKStar();
+   
+   virtual Double_t GetAvarageDistance();//returns avarage distnace between two tracks
+   
+   virtual Double_t GetDeltaP(); //return difference of momenta
+   virtual Double_t GetDeltaPt();
+   virtual Double_t GetDeltaPx();
+   virtual Double_t GetDeltaPy();
+   virtual Double_t GetDeltaPz();
+   
+   virtual Double_t GetDeltaTheta();
+   virtual Double_t GetDeltaPhi();
+   
+   virtual Double_t GetGammaToLCMS();
+   virtual Double_t GetPIDProb() const {return fPart1->GetPidProb()*fPart2->GetPidProb();}
+   
+ protected:
+   AliVAODParticle* fPart1;  //pointer to first particle
+   AliVAODParticle* fPart2;  //pointer to second particle
+  
+   AliAODPair* fSwappedPair; //pointer to swapped pair
+   
+/************************************************************/
+/************CMS (LC) Q's   *********************************/
+/************************************************************/
+   //Center Mass System - Longitudinally Comoving
+   
+   Double_t fQSideLCMS;  //value of Q side CMS longitudially co-moving
+   Bool_t   fQSideLCMSNotCalc; //flag indicating if fQSideLCMS is already calculated for this pair
+   
+   Double_t fQOutLCMS; //value of Q out CMS longitudially co-moving
+   Bool_t   fQOutLCMSNotCalc;//flag indicating if fQOutLCMS is already calculated for this pair
+   
+   Double_t fQLongLCMS; //value of Q long CMS longitudially co-moving
+   Bool_t   fQLongLCMSNotCalc;//flag indicating if fQLongLCMS is already calculated for this pair
+/************************************************************/
+/************************************************************/
+   Double_t fQInv;  //half of differnece of 4-momenta
+   Bool_t   fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
+   
+   Double_t fInvMass;  //invariant mass
+   Bool_t   fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
+   
+   Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
+   Bool_t   fKtNotCalc;//flag indicating if fKt is already calculated for this pair
+   
+   Double_t fKStar; // KStar
+   Bool_t   fKStarNotCalc;// flag indicating if fKStar is calculated
+   
+   Double_t fPInv;  //invariant momentum
+   
+   Double_t fQSide; //Q Side
+   Double_t fOut;//Q Out
+   Double_t fQLong;//Q Long
+
+   Double_t fMt;//Transverse coordinate of Inv. Mass
+   Bool_t   fMtNotCalc;//flag indicating if Mt is calculated for current pair
+      
+   Double_t fInvMassSqr;//squre of invariant mass
+   Bool_t   fMassSqrNotCalc; //flag indicating if fInvMassSqr for this pair
+   void     CalculateInvMassSqr();
+   
+   Double_t fQInvL; //Qinv in longitudional direction
+   Bool_t   fQInvLNotCalc;//flag indicating if fQInvL is calculated for current pair
+   void     CalculateQInvL();
+
+   Double_t fAvarageDistance;//value of the avarage distance calculated out of track points
+   Bool_t   fAvarageDistanceNotCalc;//flag indicating if the avarage distance is calculated
+   
+   Double_t fPxSum;// Sum of Px momenta
+   Double_t fPySum;// Sum of Py momenta
+   Double_t fPzSum;// Sum of Pz momenta
+   Double_t fESum;// Sum of energies
+   Bool_t   fSumsNotCalc;//flag indicating if fPxSum,fPxSum,fPxSum and fESum is calculated for current pair
+   void     CalculateSums();
+   
+   Double_t fPxDiff;// Difference of Px momenta
+   Double_t fPyDiff;// Difference of Px momenta
+   Double_t fPzDiff;// Difference of Px momenta
+   Double_t fEDiff;// Difference of Px momenta
+   Bool_t   fDiffsNotCalc;//flag indicating if fPxDiff,fPxDiff,fPxDiff and fEDiff is calculated for current pair
+   void     CalculateDiffs();
+   
+   Double_t fGammaLCMS;//gamma of boost in LCMS
+   Bool_t   fGammaLCMSNotCalc;//flag indicating if fGammaLCMS is calculated for current pair
+   /***************************************************/
+   Bool_t   fChanged;//flag indicating if object has been changed
+
+   void     CalculateBase();
+   Double_t AvDistance();
+   
+   
+ private:
+  ClassDef(AliAODPair,1)
+};
+/****************************************************************/
+inline
+void AliAODPair::SetParticles(AliVAODParticle* p1,AliVAODParticle* p2)
+{
+ //sets the particle to the pair
+ fPart1 = p1;
+ fPart2 = p2;
+ if (fSwappedPair) //if we have Swapped (so we are not)
+   fSwappedPair->SetParticles(p2,p1); //set particles for him too
+ Changed();
+ //and do nothing until will be asked for
+} 
+/****************************************************************/
+
+inline
+void AliAODPair::Changed()
+{
+ // Resel all calculations (flags)
+ fChanged           = kTRUE;
+ fSumsNotCalc       = kTRUE;
+ fDiffsNotCalc      = kTRUE;
+ fMassSqrNotCalc    = kTRUE;
+ fInvMassNotCalc    = kTRUE;
+ fQInvNotCalc       = kTRUE;
+ fMtNotCalc         = kTRUE;
+ fQSideLCMSNotCalc = kTRUE;
+ fQOutLCMSNotCalc  = kTRUE;
+ fQLongLCMSNotCalc = kTRUE;
+ fKtNotCalc         = kTRUE;
+ fKStarNotCalc      = kTRUE;
+ fQInvLNotCalc      = kTRUE;
+ fGammaLCMSNotCalc = kTRUE;
+ fAvarageDistanceNotCalc = kTRUE;
+}
+/****************************************************************/
+inline 
+void AliAODPair::CalculateInvMassSqr()
+ {
+  //calculates square of qinv
+  if (fMassSqrNotCalc)
+   {
+     CalculateSums();
+     Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
+     fInvMassSqr=fESum*fESum-fPart12s;
+
+     fMassSqrNotCalc = kFALSE;
+   }
+ }
+/****************************************************************/
+inline 
+void AliAODPair::CalculateQInvL()
+ {
+ //Calculates square root of Qinv
+  if (fQInvLNotCalc)
+  {
+   CalculateDiffs();
+   fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
+   fQInvLNotCalc = kFALSE;
+  }
+ }
+/****************************************************************/ 
+inline 
+void AliAODPair::CalculateSums()
+ {
+   //calculates momenta and energy sums
+   if(fSumsNotCalc)
+    {
+     fPxSum = fPart1->Px()+fPart2->Px();
+     fPySum = fPart1->Py()+fPart2->Py();
+     fPzSum = fPart1->Pz()+fPart2->Pz();
+     fESum  = fPart1->E() + fPart2->E();
+     fSumsNotCalc = kFALSE;
+    }
+ }
+/****************************************************************/
+inline 
+void AliAODPair::CalculateDiffs()
+ {
+   //calculates momenta and energy differences 
+   if(fDiffsNotCalc)
+    {
+     fPxDiff = fPart1->Px()-fPart2->Px();
+     fPyDiff = fPart1->Py()-fPart2->Py();
+     fPzDiff = fPart1->Pz()-fPart2->Pz();
+     fEDiff  = fPart1->E() - fPart2->E();
+     fDiffsNotCalc = kFALSE;
+    }
+ }
+
+/****************************************************************/
+inline 
+Double_t AliAODPair::GetDeltaP() //return difference of momenta
+{
+ //returns difference of momenta (length of vector)
+ CalculateDiffs();
+ return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
+}
+/****************************************************************/
+
+inline 
+Double_t AliAODPair::GetDeltaPt()
+ {
+   //returns difference of Pz
+   return fPart1->Pt()-fPart2->Pt();
+ }
+/****************************************************************/
+
+inline 
+Double_t AliAODPair::GetDeltaPx()
+ {
+   //returns difference of Pz
+   CalculateDiffs();
+   return fPxDiff;
+ }
+/****************************************************************/
+inline 
+Double_t AliAODPair::GetDeltaPy()
+ {
+   //returns difference of Py
+   CalculateDiffs();
+   return fPyDiff;
+ }
+
+/****************************************************************/
+inline 
+Double_t AliAODPair::GetDeltaPz()
+ {
+   //returns difference of Pz
+   CalculateDiffs();
+   return fPzDiff;
+ }
+/****************************************************************/
+
+inline 
+Double_t AliAODPair::GetDeltaPhi()
+ {
+   //returns difference of Phi
+   Double_t phi1 = fPart1->Phi();
+   Double_t phi2 = fPart2->Phi();
+   Double_t diff = phi1-phi2;
+   if (TMath::Abs(diff) > TMath::Pi())
+    {
+      if (phi1 > TMath::Pi())
+       {
+         phi1-=TMath::TwoPi();
+       }
+      else
+       {
+         phi2-=TMath::TwoPi();
+       }
+      diff = phi1-phi2; 
+    }
+   return diff;
+ }
+/****************************************************************/
+
+inline 
+Double_t AliAODPair::GetDeltaTheta()
+ {
+   //returns difference of Theta
+   return fPart1->Theta()-fPart2->Theta();
+ }
+/****************************************************************/
+
+
+#endif
diff --git a/ANALYSIS/AliAODPairCut.cxx b/ANALYSIS/AliAODPairCut.cxx
new file mode 100644 (file)
index 0000000..3f7f2b0
--- /dev/null
@@ -0,0 +1,613 @@
+/* $Id$ */
+//____________________________________
+/////////////////////////////////////////////////////////////////////////
+//
+// Class AliAODPairCut:
+//
+// implements cut on the pair of particles
+// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
+// Author: Piotr.Skowronski@cern.ch
+//-------------------------------------------------------------------
+
+#include "AliAODPairCut.h"
+#include "AliAODPair.h"
+#include "AliAODParticleCut.h"
+#include "AliTrackPoints.h"
+#include "AliClusterMap.h"
+
+ClassImp(AliAODPairCut)
+const Int_t AliAODPairCut::fgkMaxCuts = 50;
+/**********************************************************/
+
+AliAODPairCut::AliAODPairCut():
+  fNCuts(0)
+{
+  //constructor
+  fFirstPartCut = new AliAODEmptyParticleCut(); //empty cuts
+  fSecondPartCut= new AliAODEmptyParticleCut(); //empty cuts
+    
+  fCuts = new AliAODBasePairCut*[fgkMaxCuts];
+  for (Int_t i = 0;i<fNCuts;i++)
+   {
+     fCuts[i] = 0x0;
+   }
+}
+/**********************************************************/
+
+AliAODPairCut::AliAODPairCut(const AliAODPairCut& in):
+ TNamed(in)
+{
+  //copy constructor
+  fCuts = new AliAODBasePairCut*[fgkMaxCuts];
+  fNCuts = in.fNCuts;
+
+  fFirstPartCut = (AliAODParticleCut*)in.fFirstPartCut->Clone();
+  fSecondPartCut = (AliAODParticleCut*)in.fSecondPartCut->Clone();
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      fCuts[i] = (AliAODBasePairCut*)in.fCuts[i]->Clone();//create new object (clone) and rember pointer to it
+    }
+}
+/**********************************************************/
+
+AliAODPairCut&  AliAODPairCut::operator=(const AliAODPairCut& in)
+{
+  //assignment operator
+  fCuts = new AliAODBasePairCut*[fgkMaxCuts];
+  fNCuts = in.fNCuts;
+
+  fFirstPartCut = (AliAODParticleCut*)in.fFirstPartCut->Clone();
+  fSecondPartCut = (AliAODParticleCut*)in.fSecondPartCut->Clone();
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      fCuts[i] = (AliAODBasePairCut*)in.fCuts[i]->Clone();//create new object (clone) and rember pointer to it
+    }
+  return * this;
+}
+/**********************************************************/
+
+AliAODPairCut::~AliAODPairCut()
+{
+  //destructor
+  if (fFirstPartCut != fSecondPartCut)
+    {
+      delete fSecondPartCut;
+    }
+  delete fFirstPartCut;
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      delete fCuts[i];
+    }
+  delete []fCuts;
+} 
+/**********************************************************/
+
+/**********************************************************/
+
+void AliAODPairCut::AddBasePairCut(AliAODBasePairCut* basecut)
+{
+  //adds the base pair cut (cut on one value)
+  
+  if (!basecut) return;
+  if( fNCuts == (fgkMaxCuts-1) )
+    {
+      Warning("AddBasePairCut","Not enough place for another cut");
+      return;
+    }
+  fCuts[fNCuts++]=basecut;
+}
+/**********************************************************/
+
+Bool_t AliAODPairCut::Pass(AliAODPair* pair) const
+{
+  //methods which checks if given pair meets all criteria of the cut
+  //if it meets returns FALSE
+  //if NOT   returns    TRUE
+  if(!pair) 
+    {
+      Warning("Pass","No Pasaran! We never accept NULL pointers");
+      return kTRUE;
+    }
+  
+  //check particle's cuts
+  if( ( fFirstPartCut->Pass( pair->Particle1()) ) || 
+      ( fSecondPartCut->Pass(pair->Particle2()) )   )
+    {  
+      return kTRUE;
+    }
+  return PassPairProp(pair);
+}
+/**********************************************************/
+
+Bool_t AliAODPairCut::PassPairProp(AliAODPair* pair) const
+{
+  //methods which checks if given pair meets all criteria of the cut
+  //if it meets returns FALSE
+  //if NOT   returns    TRUE
+  //examine all base pair cuts
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      if ( (fCuts[i]->Pass(pair)) ) return kTRUE; //if one of the cuts reject, then reject
+    }
+  return kFALSE;
+}
+/**********************************************************/
+
+void AliAODPairCut::Print()
+{
+ //Prints the cut
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      fCuts[i]->Dump();
+    }
+}
+/**********************************************************/
+
+void AliAODPairCut::SetFirstPartCut(AliAODParticleCut* cut)
+{
+  // set cut for the first particle
+  if(!cut) 
+    {
+      Error("SetFirstPartCut","argument is NULL");
+      return;
+    }
+  delete fFirstPartCut;
+  fFirstPartCut = (AliAODParticleCut*)cut->Clone();
+  
+}
+/**********************************************************/
+
+void AliAODPairCut::SetSecondPartCut(AliAODParticleCut* cut)
+{
+  // set cut for the second particle
+  if(!cut) 
+    {
+      Error("SetSecondPartCut","argument is NULL");
+      return;
+    }
+  delete fSecondPartCut;
+  fSecondPartCut = (AliAODParticleCut*)cut->Clone();
+}
+/**********************************************************/
+
+void AliAODPairCut::SetPartCut(AliAODParticleCut* cut)
+{
+  //sets the the same cut on both particles
+  if(!cut) 
+    {
+      Error("SetFirstPartCut","argument is NULL");
+      return;
+    }
+  if (fFirstPartCut == fSecondPartCut) fSecondPartCut = 0x0;
+  
+  delete fFirstPartCut;
+  fFirstPartCut = (AliAODParticleCut*)cut->Clone();
+  
+  delete fSecondPartCut; //even if null should not be harmful
+  fSecondPartCut = fFirstPartCut;
+}
+/**********************************************************/
+
+void AliAODPairCut::SetQInvRange(Double_t min, Double_t max)
+{
+  // set range of accepted invariant masses
+  AliAODQInvCut* cut= (AliAODQInvCut*)FindCut(kHbtPairCutPropQInv);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODQInvCut(min,max);
+}
+/**********************************************************/
+void AliAODPairCut::SetQOutCMSLRange(Double_t min, Double_t max)
+{
+  // set range of accepted QOut in CMS
+  AliAODQOutLCMSCut* cut= (AliAODQOutLCMSCut*)FindCut(kHbtPairCutPropQOutLCMS);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODQOutLCMSCut(min,max);
+}
+
+/**********************************************************/
+void AliAODPairCut::SetQSideCMSLRange(Double_t min, Double_t max)
+{
+  // set range of accepted QSide in CMS
+  AliAODQSideLCMSCut* cut= (AliAODQSideLCMSCut*)FindCut(kHbtPairCutPropQSideLCMS);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODQSideLCMSCut(min,max);
+}
+
+/**********************************************************/
+void AliAODPairCut::SetQLongCMSLRange(Double_t min, Double_t max)
+{
+  // set range of accepted QLong in CMS
+  AliAODQLongLCMSCut* cut= (AliAODQLongLCMSCut*)FindCut(kHbtPairCutPropQLongLCMS);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODQLongLCMSCut(min,max);
+}
+
+/**********************************************************/
+
+void AliAODPairCut::SetKtRange(Double_t min, Double_t max)
+{
+  // set range of accepted Kt (?)
+  AliAODKtCut* cut= (AliAODKtCut*)FindCut(kHbtPairCutPropKt);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODKtCut(min,max);
+}
+/**********************************************************/
+
+void AliAODPairCut::SetKStarRange(Double_t min, Double_t max)
+{
+  // set range of accepted KStar (?)
+  AliAODKStarCut* cut= (AliAODKStarCut*)FindCut(kHbtPairCutPropKStar);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODKStarCut(min,max);
+}
+/**********************************************************/
+
+void AliAODPairCut::SetAvSeparationRange(Double_t min, Double_t max)
+{
+  //sets avarage separation cut ->Anti-Merging cut
+  AliAODBasePairCut* cut= FindCut(kHbtPairCutPropAvSepar);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODAvSeparationCut(min,max);
+}
+/**********************************************************/
+
+void AliAODPairCut::SetITSSeparation(Int_t layer, Double_t drphi, Double_t dz)
+{
+  //Anti-Merging Cut for first pixel layer
+  AliAODITSSeparationCut* cut= dynamic_cast<AliAODITSSeparationCut*>(FindCut(kHbtPairCutPropPixelSepar));
+  if(cut) 
+   {
+     if (layer == cut->GetLayer())
+      {
+        cut->SetRange(drphi,dz);//In this cut fMin is drphi, and fMax dz
+        return;
+      }
+   }
+  fCuts[fNCuts++] = new AliAODITSSeparationCut(layer,drphi,dz);
+//  Info("SetITSSeparation","Added %d at address %#x",fNCuts-1,fCuts[fNCuts-1]);
+}
+/**********************************************************/
+
+void AliAODPairCut::SetClusterOverlapRange(Double_t min,Double_t max)
+{
+  //sets cluster overlap factor cut ->Anti-Splitting cut
+  //cluster overlap factor ranges between 
+  // -0.5 (in all padrows both tracks have cluters) 
+  // and 1 (in all padrows one track has cluter and second has not)
+  // When Overlap Factor is 1 this pair of tracks in highly probable to be
+  // splitted track: one particle that is recontructed twise
+  // STAR uses range from -0.5 to 0.6 
+  
+  AliAODBasePairCut* cut= FindCut(kHbtPairCutPropClOverlap);
+  if(cut) cut->SetRange(min,max);
+  else fCuts[fNCuts++] = new AliAODCluterOverlapCut(min,max);
+}
+/**********************************************************/
+
+AliAODBasePairCut* AliAODPairCut::FindCut(AliAODPairCutProperty property)
+{
+  // Find the cut corresponding to "property"
+  for (Int_t i = 0;i<fNCuts;i++)
+    {
+      if (fCuts[i]->GetProperty() == property) 
+       return fCuts[i]; //we found the cut we were searching for
+    }
+  
+  return 0x0; //we did not found this cut
+  
+}
+/**********************************************************/
+
+void AliAODPairCut::Streamer(TBuffer &b)
+{
+  // Stream all objects in the array to or from the I/O buffer.
+  
+  UInt_t R__s, R__c;
+  if (b.IsReading()) 
+    {
+      Version_t v = b.ReadVersion(&R__s, &R__c);
+      if (v > -1)
+       {
+          delete fFirstPartCut;
+          delete fSecondPartCut;
+          fFirstPartCut = 0x0;
+          fSecondPartCut = 0x0;
+          TObject::Streamer(b);
+          b >> fFirstPartCut;
+          b >> fSecondPartCut;
+          b >> fNCuts;
+          for (Int_t i = 0;i<fNCuts;i++)
+           {
+             b >> fCuts[i];
+           }
+        }
+      b.CheckByteCount(R__s, R__c,AliAODPairCut::IsA());
+    } 
+  else 
+    {
+      R__c = b.WriteVersion(AliAODPairCut::IsA(), kTRUE);
+      TObject::Streamer(b);
+      
+//      printf("Streamer Cut 1 %#x Cut 2 %#x\n",fFirstPartCut,fSecondPartCut);
+//      this->Dump();
+//      fFirstPartCut->Dump();
+      
+      b << fFirstPartCut;
+      b << fSecondPartCut;
+      b << fNCuts;
+      for (Int_t i = 0;i<fNCuts;i++)
+        {
+          b << fCuts[i];
+        }
+      b.SetByteCount(R__c, kTRUE);
+    }
+}
+/******************************************************************/
+
+ClassImp(AliAODEmptyPairCut)
+  
+void AliAODEmptyPairCut::Streamer(TBuffer &b)
+{
+//streamer for empty pair cut
+  AliAODPairCut::Streamer(b);
+}
+/******************************************************************/
+
+ClassImp(AliAODBasePairCut)
+ClassImp(AliAODQInvCut)
+ClassImp(AliAODKtCut)
+ClassImp(AliAODQSideLCMSCut)
+ClassImp(AliAODQOutLCMSCut)
+ClassImp(AliAODQLongLCMSCut)
+
+/******************************************************************/
+ClassImp(AliAODAvSeparationCut)
+    
+Double_t AliAODAvSeparationCut::GetValue(AliAODPair* pair) const 
+{
+  //chacks if avarage distance of two tracks is in given range
+  AliTrackPoints* tpts1 = pair->Particle1()->GetTPCTrackPoints();
+  if ( tpts1 == 0x0)
+   {//it could be simulated pair
+//     Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+
+  AliTrackPoints* tpts2 = pair->Particle2()->GetTPCTrackPoints();
+  if ( tpts2 == 0x0)
+   {
+//     Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+   
+  return tpts1->AvarageDistance(*tpts2);
+}
+/******************************************************************/
+ClassImp(AliAODSeparationCut)
+    
+Double_t AliAODSeparationCut::GetValue(AliAODPair* pair) const 
+{
+  //chacks if avarage distance of two tracks is in given range
+  AliTrackPoints* tpts1 = pair->Particle1()->GetTPCTrackPoints();
+  if ( tpts1 == 0x0)
+   {//it could be simulated pair
+//     Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+
+  AliTrackPoints* tpts2 = pair->Particle2()->GetTPCTrackPoints();
+  if ( tpts2 == 0x0)
+   {
+//     Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
+     return -1.0;
+   }
+  Float_t x1=0,y1=0,z1=0; 
+  Float_t x2=0,y2=0,z2=0;
+  
+  tpts1->PositionAt(fPoint,x1,y1,z1);
+  tpts2->PositionAt(fPoint,x2,y2,z2);
+  Double_t dx1 = x1 - x2;
+  Double_t dy1 = y1 - y2;
+  Double_t dz1 = z1 - z2;
+  Double_t d = TMath::Sqrt(dx1*dx1 + dy1*dy1 + dz1*dz1);
+  return d;
+}
+/******************************************************************/
+
+ClassImp(AliAODITSSeparationCut)
+
+Bool_t AliAODITSSeparationCut::Pass(AliAODPair* pair) const
+{
+ //Checks if two tracks do not cross first pixels too close to each other
+ //If two tracks use the same cluster in pixels they are given
+ //the same position what skews theta angles (both are the same)
+ //These guys create artificial correlation in non-id analyses
+ //which is positive for identical polar angles (Qlong=0) 
+ //and negative for a little bit different theta angle (Qlong=epsilon)
+ //Such tracks "attracks" each other.
+  AliTrackPoints* tpts1 = pair->Particle1()->GetITSTrackPoints();
+  if ( tpts1 == 0x0)
+   {//it could be simulated pair
+     Warning("Pass","Track 1 does not have ITS Track Points. Pair NOT Passed.");
+     return kTRUE;//reject 
+   }
+
+  AliTrackPoints* tpts2 = pair->Particle2()->GetITSTrackPoints();
+  if ( tpts2 == 0x0)
+   {
+     Warning("Pass","Track 2 does not have ITS Track Points. Pair NOT Passed.");
+     return kTRUE;//reject 
+   }
+  Float_t  x1=0.0,y1=0.0,z1=0.0,x2=0.0,y2=0.0,z2=0.0;
+  tpts1->PositionAt(fLayer,x1,y1,z1);
+  tpts2->PositionAt(fLayer,x2,y2,z2);
+  
+//  Info("Pass","rphi %f z %f",fMin,fMax);
+//  Info("Pass","P1: %f %f %f", x1,y1,z1);
+//  Info("Pass","P2: %f %f %f", x2,y2,z2);
+  
+  Double_t dz = TMath::Abs(z1-z2);
+  
+  //fMax encodes treshold valaue of distance in Z
+  if (dz > fMax) return kFALSE;//pair accepted
+  
+  Double_t drphi = TMath::Hypot(x1-x2,y1-y2);
+  
+  //fMin encodes treshold valaue of distance in r-phi
+  if (drphi > fMin) return kFALSE;
+  
+  return kTRUE;//they are too close, rejected
+}
+/******************************************************************/
+
+ClassImp(AliAODCluterOverlapCut)
+
+Double_t  AliAODCluterOverlapCut::GetValue(AliAODPair* pair) const
+{
+  //Returns Cluter Overlap Factor
+  //It ranges between -0.5 (in all padrows both tracks have cluters) 
+  // and 1 (in all padrows one track has cluter and second has not)
+  // When Overlap Factor is 1 this pair of tracks in highly probable to be
+  // splitted track: one particle that is recontructed twise
+
+  AliClusterMap* cm1 = pair->Particle1()->GetClusterMap();
+  if ( cm1 == 0x0)
+   {
+     Warning("GetValue","Track 1 does not have Cluster Map. Returning -0.5.");
+     return -.5;
+   }
+
+  AliClusterMap* cm2 = pair->Particle2()->GetClusterMap();
+  if ( cm2 == 0x0)
+   {
+     Warning("GetValue","Track 2 does not have Cluster Map. Returning -0.5.");
+     return -.5;
+   }
+  return cm1->GetOverlapFactor(*cm2);
+}
+/******************************************************************/
+ClassImp(AliAODOutSideSameSignCut)
+
+Bool_t AliAODOutSideSameSignCut::Pass(AliAODPair *p) const
+{
+  //returns kTRUE if pair DO NOT meet cut criteria
+  
+  if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 ) 
+   {
+     return kFALSE;//accpeted
+   }
+
+  return kTRUE ;//rejected
+}
+/******************************************************************/
+ClassImp(AliAODOutSideDiffSignCut)
+
+Bool_t AliAODOutSideDiffSignCut::Pass(AliAODPair *p) const
+{
+  //returns kTRUE if pair DO NOT meet cut criteria
+  
+  if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 ) 
+   {
+     return kTRUE;//rejected
+   }
+  
+  return kFALSE;//accepted
+}
+/******************************************************************/
+ClassImp( AliAODLogicalOperPairCut )
+
+AliAODLogicalOperPairCut::AliAODLogicalOperPairCut():
+ AliAODBasePairCut(-10e10,10e10,kHbtPairCutPropNone),
+ fFirst(new AliAODDummyBasePairCut),
+ fSecond(new AliAODDummyBasePairCut)
+{
+ //ctor
+}
+/******************************************************************/
+
+AliAODLogicalOperPairCut::AliAODLogicalOperPairCut(AliAODBasePairCut* first, AliAODBasePairCut* second):
+ AliAODBasePairCut(-10e10,10e10,kHbtPairCutPropNone),
+ fFirst((first)?(AliAODBasePairCut*)first->Clone():0x0),
+ fSecond((second)?(AliAODBasePairCut*)second->Clone():0x0)
+{
+  //ctor
+  //note that base cuts are copied, not just pointers assigned
+  if ( (fFirst && fSecond) == kFALSE) 
+   {
+     Fatal("AliAODLogicalOperPairCut","One of parameters is NULL!");
+   }
+}
+/******************************************************************/
+
+AliAODLogicalOperPairCut::~AliAODLogicalOperPairCut()
+{
+  //destructor
+  delete fFirst;
+  delete fSecond;
+}
+/******************************************************************/
+
+Bool_t AliAODLogicalOperPairCut::AliAODDummyBasePairCut::Pass(AliAODPair* /*pair*/)  const
+{
+  //checks if particles passes properties defined by this cut
+  Warning("Pass","You are using dummy base cut! Probobly some logical cut is not set up properly");
+  return kFALSE;//accept
+}
+/******************************************************************/
+
+void AliAODLogicalOperPairCut::Streamer(TBuffer &b)
+{
+  // Stream all objects in the array to or from the I/O buffer.
+  UInt_t R__s, R__c;
+  if (b.IsReading()) 
+   {
+     delete fFirst;
+     delete fSecond;
+     fFirst  = 0x0;
+     fSecond = 0x0;
+
+     b.ReadVersion(&R__s, &R__c);
+     TObject::Streamer(b);
+     b >> fFirst;
+     b >> fSecond;
+     b.CheckByteCount(R__s, R__c,AliAODLogicalOperPairCut::IsA());
+   } 
+  else 
+   {
+     R__c = b.WriteVersion(AliAODLogicalOperPairCut::IsA(), kTRUE);
+     TObject::Streamer(b);
+     b << fFirst;
+     b << fSecond;
+     b.SetByteCount(R__c, kTRUE);
+  }
+}
+
+/******************************************************************/
+ClassImp(AliAODOrPairCut)
+
+Bool_t AliAODOrPairCut::Pass(AliAODPair * p) const
+{
+  //returns true when rejected 
+  //AND operation is a little bit misleading but is correct
+  //User wants to build logical cuts with natural (positive) logic
+  //while ALIAN use inernally reverse (returns true when rejected)
+  if (fFirst->Pass(p) && fSecond->Pass(p) ) return kTRUE;//rejected (both rejected, returned kTRUE)
+  return kFALSE;//accepted, at least one accepted (returned kFALSE)
+}
+/******************************************************************/
+
+ClassImp(AliAODAndPairCut)
+
+Bool_t AliAODAndPairCut::Pass(AliAODPair * p)  const
+{
+  //returns true when rejected 
+  //OR operation is a little bit misleading but is correct
+  //User wants to build logical cuts with natural (positive) logic
+  //while ALIAN use inernally reverse (returns true when rejected)
+  if (fFirst->Pass(p) || fSecond->Pass(p)) return kTRUE;//rejected (any of two rejected(returned kTRUE) )
+  return kFALSE;//accepted (both accepted (returned kFALSE))
+}
+/******************************************************************/
diff --git a/ANALYSIS/AliAODPairCut.h b/ANALYSIS/AliAODPairCut.h
new file mode 100644 (file)
index 0000000..6503270
--- /dev/null
@@ -0,0 +1,387 @@
+#ifndef AliAODPairCUT_H
+#define AliAODPairCUT_H
+
+/* $Id$ */
+
+//Piotr Skowronski@cern.ch
+//Class implements cut on the pair of particles
+//
+//more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
+#include "AliAODPair.h"
+
+class AliAODParticleCut;
+class AliAODBasePairCut;
+
+enum AliAODPairCutProperty
+{
+  kHbtPairCutPropQInv, //Q invariant
+  kHbtPairCutPropKt,
+  kHbtPairCutPropKStar,
+  kHbtPairCutPropQSideLCMS,
+  kHbtPairCutPropQOutLCMS,
+  kHbtPairCutPropQLongLCMS,
+  kHbtPairCutPropDeltaPhi,
+  kHbtPairCutPropDeltaTheta,
+  kHbtPairCutPropDeltaP,
+  kHbtPairCutPropDeltaPt,
+  kHbtPairCutPropAvSepar,
+  kHbtPairCutPropSepar,
+  kHbtPairCutPropClOverlap,
+  kHbtPairCutPropPixelSepar,
+  kHbtPairCutPropNone
+};
+/******************************************************************/
+
+class AliAODPairCut: public TNamed
+{
+ public:
+  AliAODPairCut();
+  AliAODPairCut(const AliAODPairCut& in);
+  AliAODPairCut& operator = (const AliAODPairCut& in);
+  
+  virtual ~AliAODPairCut();
+  virtual Bool_t Pass(AliAODPair* pair) const;
+  virtual Bool_t PassPairProp(AliAODPair* pair) const;
+     
+  virtual Bool_t IsEmpty() const {return kFALSE;}
+  void SetFirstPartCut(AliAODParticleCut* cut);  //sets the cut on the first particle
+  void SetSecondPartCut(AliAODParticleCut* cut); //sets the cut on the second particle
+  
+  void SetPartCut(AliAODParticleCut* cut);//sets the the same cut on both particles
+  
+  virtual void AddBasePairCut(AliAODBasePairCut* cut);
+  
+  virtual void Print();
+  
+  void SetQInvRange(Double_t min, Double_t max);
+  void SetKtRange(Double_t min, Double_t max);
+  void SetKStarRange(Double_t min, Double_t max);
+  void SetQOutCMSLRange(Double_t min, Double_t max);
+  void SetQSideCMSLRange(Double_t min, Double_t max);
+  void SetQLongCMSLRange(Double_t min, Double_t max);
+  void SetAvSeparationRange(Double_t min,Double_t max = 10e5);//Anti-Merging Cut
+  void SetITSSeparation(Int_t layer, Double_t drphi=0.01,Double_t dz = 0.08);//Anti-Merging Cut for first pixel layer
+  void SetClusterOverlapRange(Double_t min,Double_t max);//Anti-Splitting Max range -0.5 1.0
+      
+  AliAODParticleCut* GetFirstPartCut() const {return fFirstPartCut;}
+  AliAODParticleCut* GetSecondPartCut() const {return fSecondPartCut;}
+  
+ protected:
+  AliAODParticleCut*      fFirstPartCut;//cut on first particle in pair
+  AliAODParticleCut*      fSecondPartCut;//cut on second particle in pair
+  
+  AliAODBasePairCut** fCuts; //! array of poiters to base cuts
+  Int_t fNCuts;//Number of cuts in fCuts array
+  
+  
+  AliAODBasePairCut* FindCut(AliAODPairCutProperty cut);
+ private:
+  static const Int_t fgkMaxCuts; // Max number of cuts
+  ClassDef(AliAODPairCut,2)
+};
+/******************************************************************/
+/******************************************************************/
+/******************************************************************/
+
+class AliAODEmptyPairCut:  public AliAODPairCut
+{
+  //Empty - it passes possitively all particles - it means returns always False
+  //Class describing cut on pairs of particles
+ public:
+  AliAODEmptyPairCut(){};
+  AliAODEmptyPairCut(const AliAODEmptyPairCut& in):AliAODPairCut(in){};
+  virtual ~AliAODEmptyPairCut(){};
+  
+  Bool_t Pass(AliAODPair*) const {return kFALSE;} //accpept everything
+  Bool_t IsEmpty() const {return kTRUE;}
+  
+  ClassDef(AliAODEmptyPairCut,1)
+};
+
+
+
+/******************************************************************/
+/******************************************************************/
+/******************************************************************/
+
+class AliAODBasePairCut: public TObject
+{
+  //This class defines the range of some property - pure virtual
+  //Property is coded by AliAODCutTypes type
+   
+ public:
+     
+  AliAODBasePairCut(Double_t min = 0.0, Double_t max = 0.0, AliAODPairCutProperty prop= kHbtPairCutPropNone):
+    fMin(min),fMax(max),fProperty(prop){}
+  
+  virtual   ~AliAODBasePairCut(){}
+     
+  virtual Bool_t    Pass(AliAODPair* pair) const;
+  
+  void      SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
+  
+  void      SetMinimum(Double_t min){fMin = min;}
+  void      SetMaximum(Double_t max){fMax = max;}
+  
+  Double_t  GetMinimum() const {return fMin;}
+  Double_t  GetMaximum() const {return fMax;}
+  
+  AliAODPairCutProperty GetProperty() const {return fProperty;}
+  
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const = 0;
+  
+  Double_t fMin; // Lower boundary of the range
+  Double_t fMax; // Upper boundary of the range
+  
+  AliAODPairCutProperty fProperty; // The property itself
+  
+  ClassDef(AliAODBasePairCut,1)
+ };
+/******************************************************************/
+
+inline Bool_t AliAODBasePairCut::Pass(AliAODPair* pair) const
+{
+  //checks if pair proprty is in range
+  //null pointer check is made by AliAODPairCut, so here is unnecesary
+  
+  Double_t value = GetValue(pair);
+  if ( (value > fMin) && (value <fMax ) ) return kFALSE; //accepted
+  else return kTRUE; //rejected
+}
+/******************************************************************/
+/******************************************************************/
+/******************************************************************/
+
+class AliAODQInvCut: public AliAODBasePairCut
+{
+ public:
+  AliAODQInvCut(Double_t min = 0.0, Double_t max = 0.0):AliAODBasePairCut(min,max,kHbtPairCutPropQInv){}
+  virtual ~AliAODQInvCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const {return pair->GetQInv();}
+  
+  ClassDef(AliAODQInvCut,1)
+ };
+/******************************************************************/
+
+class AliAODKtCut: public AliAODBasePairCut {
+ public:
+  AliAODKtCut(Double_t min = 0.0, Double_t max = 0.0):AliAODBasePairCut(min,max,kHbtPairCutPropKt){}
+  virtual ~AliAODKtCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const {return pair->GetKt();}
+
+  ClassDef(AliAODKtCut,1)
+ };
+/******************************************************************/
+
+class AliAODKStarCut: public AliAODBasePairCut
+{
+ public:
+  AliAODKStarCut(Double_t min = 0.0, Double_t max = 0.0):AliAODBasePairCut(min,max,kHbtPairCutPropKStar){}
+  virtual ~AliAODKStarCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const {return pair->GetKStar();}
+
+  ClassDef(AliAODKStarCut,1)
+};
+/******************************************************************/
+
+class AliAODQSideLCMSCut: public AliAODBasePairCut
+{
+ public:
+  AliAODQSideLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropQSideLCMS){}
+  virtual ~AliAODQSideLCMSCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const 
+    {return pair->GetQSideLCMS();}
+
+  ClassDef(AliAODQSideLCMSCut,1)
+};
+/******************************************************************/
+
+
+class AliAODQOutLCMSCut: public AliAODBasePairCut
+{
+ public:
+  AliAODQOutLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropQOutLCMS){}
+  virtual ~AliAODQOutLCMSCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const 
+    {return pair->GetQOutLCMS();}
+  
+  ClassDef(AliAODQOutLCMSCut,1)
+};
+/******************************************************************/
+
+class AliAODQLongLCMSCut: public AliAODBasePairCut
+{
+ public:
+  AliAODQLongLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropQLongLCMS){}
+  virtual ~AliAODQLongLCMSCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const 
+    {return pair->GetQLongLCMS();}
+
+  ClassDef(AliAODQLongLCMSCut,1)
+};
+/******************************************************************/
+
+class AliAODDeltaPhiCut: public AliAODBasePairCut
+{
+ public:
+  AliAODDeltaPhiCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropDeltaPhi){}
+  virtual ~AliAODDeltaPhiCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const 
+    {return TMath::Abs(pair->GetDeltaPhi());}
+
+  ClassDef(AliAODDeltaPhiCut,1)
+};
+/******************************************************************/
+
+class AliAODDeltaThetaCut: public AliAODBasePairCut
+{
+ public:
+  AliAODDeltaThetaCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropDeltaTheta){}
+  virtual ~AliAODDeltaThetaCut(){}
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const 
+    {return TMath::Abs(pair->GetDeltaTheta());}
+
+  ClassDef(AliAODDeltaThetaCut,1)
+};
+/******************************************************************/
+
+class AliAODCluterOverlapCut: public AliAODBasePairCut
+{
+ public:
+  AliAODCluterOverlapCut(Double_t min = 0.0, Double_t max = 1e5):
+    AliAODBasePairCut(min,max,kHbtPairCutPropClOverlap){}
+  virtual ~AliAODCluterOverlapCut(){}
+
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const;
+  ClassDef(AliAODCluterOverlapCut,1)
+};
+/******************************************************************/
+  
+class AliAODAvSeparationCut: public AliAODBasePairCut
+{
+ public:
+  AliAODAvSeparationCut(Double_t min = 0.0, Double_t max = 1e5):
+    AliAODBasePairCut(min,max,kHbtPairCutPropAvSepar){}
+  virtual ~AliAODAvSeparationCut(){}
+  
+ protected:
+  virtual Double_t  GetValue(AliAODPair* pair) const;
+  ClassDef(AliAODAvSeparationCut,1)
+};
+/******************************************************************/
+  
+class AliAODSeparationCut: public AliAODBasePairCut
+{
+ public:
+  AliAODSeparationCut(Double_t min = 0.0, Double_t max = 1e5, Int_t point = 0):
+    AliAODBasePairCut(min,max,kHbtPairCutPropSepar),fPoint(point){}
+  virtual ~AliAODSeparationCut(){}
+  
+ protected:
+  Int_t fPoint;//index of the point that distance should be measured
+  virtual Double_t  GetValue(AliAODPair* pair) const;
+  ClassDef(AliAODSeparationCut,1)
+};
+/******************************************************************/
+  
+class AliAODITSSeparationCut: public AliAODBasePairCut
+{
+//Anti merging cut for the first layer of pixels
+ public:
+  AliAODITSSeparationCut(Int_t layer = 0, Double_t deltarphi = 0.01, Double_t deltaz = 0.08):
+    AliAODBasePairCut(deltarphi,deltaz,kHbtPairCutPropPixelSepar),fLayer(layer){}
+  virtual ~AliAODITSSeparationCut(){}
+  Bool_t   Pass(AliAODPair* pair) const;
+  Int_t    GetLayer() const {return fLayer;}
+ protected:
+  Int_t fLayer;//index of the layer that distance should be measured 0: 1st pixels
+  virtual Double_t  GetValue(AliAODPair* /*pair*/) const {return 0.0;}//not used
+  ClassDef(AliAODITSSeparationCut,1)
+};
+/******************************************************************/
+
+class AliAODOutSideSameSignCut: public AliAODBasePairCut
+{
+ public:
+  AliAODOutSideSameSignCut(){}
+  virtual ~AliAODOutSideSameSignCut(){}
+  virtual Bool_t Pass(AliAODPair *p) const;
+ protected:
+  virtual Double_t  GetValue(AliAODPair* /*pair*/) const {return 0.0;}
+  ClassDef(AliAODOutSideSameSignCut,1)
+};
+/******************************************************************/
+
+class AliAODOutSideDiffSignCut: public AliAODBasePairCut
+{
+ public:
+  AliAODOutSideDiffSignCut(){}
+  virtual ~AliAODOutSideDiffSignCut(){}
+  virtual Bool_t Pass(AliAODPair *p) const;
+ protected:
+  virtual Double_t  GetValue(AliAODPair* /*pair*/) const {return 0.0;}
+  ClassDef(AliAODOutSideDiffSignCut,1)
+};
+/******************************************************************/
+
+class AliAODLogicalOperPairCut:  public AliAODBasePairCut
+ {
+   public:
+     AliAODLogicalOperPairCut();
+     AliAODLogicalOperPairCut(AliAODBasePairCut* first, AliAODBasePairCut* second);
+     virtual   ~AliAODLogicalOperPairCut();
+   protected:
+     Double_t  GetValue(AliAODPair * /*pair*/) const {MayNotUse("GetValue");return 0.0;}
+
+     AliAODBasePairCut* fFirst;   //second cut
+     AliAODBasePairCut* fSecond;  //first cut
+   private:
+    class  AliAODDummyBasePairCut: public AliAODBasePairCut
+     {
+       Double_t  GetValue(AliAODPair* /*pair*/) const {return 0.0;}
+       Bool_t    Pass(AliAODPair* /*pair*/) const;
+     };
+
+    ClassDef(AliAODLogicalOperPairCut,1)
+ };
+/******************************************************************/
+
+class AliAODOrPairCut: public AliAODLogicalOperPairCut
+{
+   public:
+     AliAODOrPairCut(){}
+     AliAODOrPairCut(AliAODBasePairCut* first, AliAODBasePairCut* second):AliAODLogicalOperPairCut(first,second){}
+     virtual   ~AliAODOrPairCut(){}
+     Bool_t    Pass(AliAODPair *p) const;
+     ClassDef(AliAODOrPairCut,1)
+};
+/******************************************************************/
+
+class AliAODAndPairCut: public AliAODLogicalOperPairCut
+{
+   public:
+     AliAODAndPairCut(){}
+     AliAODAndPairCut(AliAODBasePairCut* first, AliAODBasePairCut* second):AliAODLogicalOperPairCut(first,second){}
+     virtual   ~AliAODAndPairCut(){}
+     Bool_t    Pass(AliAODPair *p) const;
+     ClassDef(AliAODAndPairCut,1)
+};
+
+#endif
index 74c30d8..a8a4469 100644 (file)
@@ -24,7 +24,7 @@ ClassImp(AliAODParticle)
 AliAODParticle::AliAODParticle():  
  fPdgIdx(0), fIdxInEvent(0),fNPids(0),fPids(0x0),fPidProb(0x0),
  fCalcMass(0),fPx(0), fPy(0),fPz(0),fE(0), fVx(0), fVy(0),fVz(0),fVt(0),
- fTrackPoints(0x0),fClusterMap(0x0)
+ fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
 {//empty particle
 }
 //______________________________________________________________________________
@@ -36,7 +36,7 @@ AliAODParticle::AliAODParticle(Int_t pdg, Int_t idx,
   fCalcMass(0), 
   fPx(px), fPy(py),fPz(pz),fE(etot), 
   fVx(vx), fVy(vy),fVz(vz),fVt(time),
-  fTrackPoints(0x0),fClusterMap(0x0)
+  fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
 {
 //mormal constructor
   SetPdgCode(pdg);
@@ -57,7 +57,7 @@ AliAODParticle::AliAODParticle(Int_t pdg, Float_t prob, Int_t idx,
   fCalcMass(0), 
   fPx(px), fPy(py),fPz(pz),fE(etot), 
   fVx(vx), fVy(vy),fVz(vz),fVt(time),
-  fTrackPoints(0x0),fClusterMap(0x0)
+  fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
 {
 //mormal constructor
   SetPdgCode(pdg,prob);
@@ -70,6 +70,7 @@ AliAODParticle::AliAODParticle(Int_t pdg, Float_t prob, Int_t idx,
   }
 }
 //______________________________________________________________________________
+
 AliAODParticle::AliAODParticle(const AliAODParticle& in):
    AliVAODParticle(in),
    fPdgIdx(in.fPdgIdx), fIdxInEvent(in.fIdxInEvent),
@@ -77,7 +78,7 @@ AliAODParticle::AliAODParticle(const AliAODParticle& in):
    fCalcMass(in.GetCalcMass()),
    fPx(in.Px()),fPy(in.Py()),fPz(in.Pz()),fE(in.Energy()), 
    fVx(in.Vx()),fVy(in.Vy()),fVz(in.Vz()),fVt(in.T()),
-   fTrackPoints(0x0), fClusterMap(0x0)
+   fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
 {
  //Copy constructor
  for(Int_t i = 0; i<fNPids; i++)
@@ -86,20 +87,50 @@ AliAODParticle::AliAODParticle(const AliAODParticle& in):
     fPidProb[i] = in.fPidProb[i];
   }
  
- if (in.fTrackPoints)
-   fTrackPoints = (AliTrackPoints*)in.fTrackPoints->Clone();
+ if (in.fTPCTrackPoints)
+   fTPCTrackPoints = (AliTrackPoints*)in.fTPCTrackPoints->Clone();
+ if (in.fITSTrackPoints)
+   fITSTrackPoints = (AliTrackPoints*)in.fITSTrackPoints->Clone();
  if (in.fClusterMap)
    fClusterMap = (AliClusterMap*)in.fClusterMap->Clone();
 }
+//______________________________________________________________________________
 
+AliAODParticle::AliAODParticle(const AliVAODParticle& in):
+   AliVAODParticle(in),
+   fPdgIdx(0), fIdxInEvent(in.GetUID()),
+   fNPids(0),fPids(0x0),fPidProb(0x0),
+   fCalcMass(-1.0),
+   fPx(in.Px()),fPy(in.Py()),fPz(in.Pz()),fE(in.E()), 
+   fVx(in.Vx()),fVy(in.Vy()),fVz(in.Vz()),fVt(in.T()),
+   fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
+{
+ //Copy constructor
+ for(Int_t i = 0; i<in.GetNumberOfPids(); i++)
+  {
+    SetPIDprobability(in.GetNthPid(i),in.GetNthPidProb(i));
+  }
+ SetPdgCode(in.GetPdgCode(),in.GetPidProb());
+ AliTrackPoints* tpts = in.GetTPCTrackPoints();
+ if (tpts)  SetTPCTrackPoints((AliTrackPoints*)tpts->Clone());
+ tpts = in.GetITSTrackPoints();  
+ if (tpts) SetITSTrackPoints((AliTrackPoints*)tpts->Clone());
+   
+ AliClusterMap* clmap = in.GetClusterMap();
+ if (clmap) SetClusterMap((AliClusterMap*)clmap->Clone());
+}
 //______________________________________________________________________________
+
 AliAODParticle::AliAODParticle(const TParticle &p,Int_t idx):
    fPdgIdx(0), fIdxInEvent(idx),
    fNPids(0),fPids(0x0),fPidProb(0x0),
    fCalcMass(p.GetCalcMass()),
    fPx(p.Px()),fPy(p.Py()),fPz(p.Pz()),fE(p.Energy()), 
    fVx(p.Vx()),fVy(p.Vy()),fVz(p.Vz()),fVt(p.T()),
-   fTrackPoints(0x0),fClusterMap(0x0)
+   fTPCTrackPoints(0x0),fITSTrackPoints(0x0),fClusterMap(0x0)
 {
  //all copied in the initialization
  SetPdgCode(p.GetPdgCode());
@@ -111,7 +142,8 @@ AliAODParticle::~AliAODParticle()
 //dtor  
   delete [] fPids;
   delete [] fPidProb;
-  delete fTrackPoints;
+  delete fTPCTrackPoints;
+  delete fITSTrackPoints;
   delete fClusterMap;
 }
 //______________________________________________________________________________
@@ -143,8 +175,11 @@ AliAODParticle& AliAODParticle::operator=(const AliAODParticle& in)
   fVz = in.Vz();
   fVt = in.T();
   
-  delete fTrackPoints;
-  fTrackPoints = (in.fTrackPoints)?(AliTrackPoints*)fTrackPoints->Clone():0x0;
+  delete fTPCTrackPoints;
+  fTPCTrackPoints = (in.fTPCTrackPoints)?(AliTrackPoints*)fTPCTrackPoints->Clone():0x0;
+
+  delete fITSTrackPoints;
+  fITSTrackPoints = (in.fITSTrackPoints)?(AliTrackPoints*)fITSTrackPoints->Clone():0x0;
   
   delete fClusterMap;
   fClusterMap =  (in.fClusterMap)?(AliClusterMap*)in.fClusterMap->Clone():0x0;
@@ -226,7 +261,7 @@ void AliAODParticle::SetPIDprobability(Int_t pdg, Float_t prob)
   fPdgIdx = GetPidSlot(currentpid);
   if (fPdgIdx == -1) fPdgIdx = 0;
   
-  if (totprob > (1.0+0.000001))//place for numerical error
+  if (totprob > (1.0+0.000001))//space for numerical error
    {
      Warning("SetId","Total probability is greater than unity (%f)!!!",totprob);
      Print();
index d9b81e9..e45972e 100644 (file)
@@ -32,6 +32,7 @@ public:
                                 // ****** constructors and destructor
   AliAODParticle();
   AliAODParticle(const AliAODParticle& in); 
+  AliAODParticle(const AliVAODParticle& in); 
  
   AliAODParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
                  Double_t vx, Double_t vy, Double_t vz, Double_t time);
@@ -51,11 +52,12 @@ public:
   void           SetPIDprobability(Int_t pdg, Float_t prob = 1.0);
   Float_t        GetPIDprobability(Int_t pdg) const;
   Double_t       GetProbability(Int_t pdg) const {return GetPIDprobability(pdg);}
+  
   Int_t          GetMostProbable() const { return (fPids)?fPids[0]:0;}
   
   Int_t          GetPdgCode      () const { return (fPids)?fPids[fPdgIdx]:0;}
 
-  Float_t        GetPidProb      () const { return (fPidProb)?fPidProb[fPdgIdx]:0;}
+  Double_t        GetPidProb      () const { return (fPidProb)?fPidProb[fPdgIdx]:0;}
   
   Int_t          GetUID          () const { return fIdxInEvent;}
   Int_t          GetNumberOfPids () const { return fNPids;}
@@ -118,15 +120,17 @@ public:
                              {SetProductionVertex(v.X(),v.Y(),v.Z(),v.T());}
   void           SetCalcMass(Double_t mass) {fCalcMass = mass;}
   
-  void           SetUID(Int_t id){fIdxInEvent = id;}
+  void            SetUID(Int_t id){fIdxInEvent = id;}
   
-  const Char_t*  GetName() const; 
-  void           Print() const;
+  const Char_t*   GetName() const; 
+  void            Print() const;
   
-  void           SetTrackPoints(AliTrackPoints* tpts){fTrackPoints = tpts;}
-  AliTrackPoints* GetTrackPoints() const {return fTrackPoints;}
-  void           SetClusterMap(AliClusterMap* cm){fClusterMap = cm;}
-  AliClusterMap* GetClusterMap() const {return fClusterMap;}
+  void            SetTPCTrackPoints(AliTrackPoints* tpts){fTPCTrackPoints = tpts;}
+  AliTrackPoints* GetTPCTrackPoints() const {return fTPCTrackPoints;}
+  void            SetITSTrackPoints(AliTrackPoints* tpts){fITSTrackPoints = tpts;}
+  AliTrackPoints* GetITSTrackPoints() const {return fITSTrackPoints;}
+  void            SetClusterMap(AliClusterMap* cm){fClusterMap = cm;}
+  AliClusterMap*  GetClusterMap() const {return fClusterMap;}
   
   
 protected:
@@ -152,7 +156,8 @@ private:
   Double_t       fVz;                   // z of production vertex
   Double_t       fVt;                   // t of production vertex
 
-  AliTrackPoints* fTrackPoints;      // track positions along trajectory - used by anti-merging cut
+  AliTrackPoints* fTPCTrackPoints;      // track positions along trajectory - used by anti-merging cut
+  AliTrackPoints* fITSTrackPoints;      // track positions along trajectory - used by anti-merging cut
   AliClusterMap*  fClusterMap;       // bit map of cluters occupation; 1 if has cluter on given layer/padrow/...
     
   ClassDef(AliAODParticle,3)  // TParticle vertex particle information
index ea9cb5f..4900589 100644 (file)
@@ -17,7 +17,7 @@
 //                                                                        //
 //                                                                        //
 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html   //
-// resonsible: Piotr Skowronski@cern.ch                                   //
+// responsible: Piotr Skowronski@cern.ch                                   //
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////
 
index a65e699..8011d05 100644 (file)
@@ -18,7 +18,7 @@
 //                                                                        //
 //                                                                        //
 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html   //
-// resonsible: Piotr Skowronski@cern.ch                                   //
+// responsible: Piotr Skowronski@cern.ch                                   //
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////
 
diff --git a/ANALYSIS/AliEventBuffer.cxx b/ANALYSIS/AliEventBuffer.cxx
new file mode 100644 (file)
index 0000000..2cd074e
--- /dev/null
@@ -0,0 +1,54 @@
+#include "AliEventBuffer.h"
+
+ClassImp(AliEventBuffer)
+
+//______________________________________________________
+////////////////////////////////////////////////////////
+//
+// class AliEventBuffer
+//
+// FIFO type event buffer
+//
+// Piotr.Skowronski@cern.ch
+//
+////////////////////////////////////////////////////////
+
+AliEventBuffer::AliEventBuffer():
+ fSize(-1),fEvents(),fIter(&fEvents)
+{
+  //ctor
+}
+/***********************************************************/
+
+AliEventBuffer::AliEventBuffer(Int_t size):
+ fSize(size),fEvents(),fIter(&fEvents)
+{
+  //ctor
+}
+/***********************************************************/
+
+AliEventBuffer::~AliEventBuffer()
+{
+  //dtor -- TList::IsOwner(1) does not work - Valgrind says that there is mem leak
+  //take care owerseves
+  if (fEvents.IsOwner())
+   { 
+     AliAOD* e=0x0;
+     while (( e=RemoveLast() )) delete e;
+   }
+}
+/***********************************************************/
+
+AliAOD* AliEventBuffer::Push(AliAOD* event)
+{
+  //adds a new event, and returns old of do not fit in size
+  if (fSize == 0) return event;
+  
+  AliAOD* ret = 0x0;
+  
+  if (fSize == fEvents.GetSize()) 
+    ret = dynamic_cast<AliAOD*>(fEvents.Remove(fEvents.Last()));
+  if (event) fEvents.AddFirst(event);
+  return ret;
+}
+
diff --git a/ANALYSIS/AliEventBuffer.h b/ANALYSIS/AliEventBuffer.h
new file mode 100644 (file)
index 0000000..4933423
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef AliEventBuffer_H
+#define AliEventBuffer_H
+//______________________________________________________
+////////////////////////////////////////////////////////
+//
+// class AliEventBuffer
+//
+// FIFO type event buffer
+//
+// Piotr.Skowronski@cern.ch
+//
+////////////////////////////////////////////////////////
+
+#include <TObject.h>
+#include <TList.h>
+#include "AliAOD.h"
+
+class AliEventBuffer: public TObject
+{
+  public:
+    AliEventBuffer();
+    AliEventBuffer(Int_t size);
+    virtual ~AliEventBuffer();
+    
+    AliAOD* Push(AliAOD* event);//adds a new event, and returns old of do not fit in size
+    AliAOD* RemoveLast(){return dynamic_cast<AliAOD*>(fEvents.Remove(fEvents.Last()));}
+    void    ResetIter(){fIter.Reset();}
+    AliAOD* Next(){return dynamic_cast<AliAOD*>( fIter.Next() );}
+    void    SetSize(Int_t size){fSize = size;}
+    Int_t   GetSize() const {return fSize;}
+    void    SetOwner(Bool_t flag) {fEvents.SetOwner(flag);}
+  protected:
+  private:
+    Int_t   fSize;//size of buffer; if 0 infinite size
+    TList   fEvents;//list with arrays
+    TIter   fIter;//iterator
+    ClassDef(AliEventBuffer,1)
+};
+
+
+#endif
index cc02a73..d1844f4 100644 (file)
@@ -475,7 +475,7 @@ Int_t AliReaderESD::ReadESD(AliESD* esd)
         //Single Particle cuts on cluster map and track points rather do not have sense
         if (tpts)
          {
-           track->SetTrackPoints(tpts); 
+           track->SetTPCTrackPoints(tpts);
          }
 
         if (cmap) 
index 3878afd..4249d50 100644 (file)
@@ -1,3 +1,4 @@
+#include "AliTrackPoints.h"
 //_________________________________
 ////////////////////////////////////////////////////////////
 //                                                        //
 #include <TMath.h>
 
 #include "AliESDtrack.h"
-#include "AliTrackPoints.h"
 #include "AliTPCtrack.h"
 #include "AliTrackReference.h"
+#include "AliITStrackV2.h"
 
 ClassImp(AliTrackPoints)
 
 Int_t AliTrackPoints::fgDebug = 0;
+
 AliTrackPoints::AliTrackPoints():
  fN(0),
  fX(0x0),
@@ -34,6 +36,31 @@ AliTrackPoints::AliTrackPoints():
 }
 /***************************************************************/
 
+AliTrackPoints::AliTrackPoints(AliTrackPoints::ETypes type, AliESDtrack* track):
+ fN(0),
+ fX(0x0),
+ fY(0x0),
+ fZ(0x0)
+{
+  //constructor
+  switch (type)
+   {
+     case kITS:
+       //Used only in non-id analysis
+       fN = 6;
+       fX = new Float_t[fN];
+       fY = new Float_t[fN];
+       fZ = new Float_t[fN];
+       MakeITSPoints(track);
+       break;
+
+     default:
+       Info("AliTrackPoints","Not recognized type");
+   }
+   
+}
+/***************************************************************/
+
 AliTrackPoints::AliTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr, Float_t r0):
  fN(n),
  fX(new Float_t[fN]),
@@ -131,6 +158,16 @@ AliTrackPoints::AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr, Float_t
   Double_t c=track->GetC();
   MakePoints(dr,r0,x,par,c,alpha);
 }  
+/***************************************************************/
+
+AliTrackPoints::~AliTrackPoints()
+{
+  //destructor
+  delete [] fX;
+  delete [] fY;
+  delete [] fZ;
+}
+/***************************************************************/
 
 void AliTrackPoints::MakePoints( Float_t dr, Float_t r0, Double_t x, Double_t* par, Double_t c, Double_t alpha)
 {
@@ -235,15 +272,26 @@ void AliTrackPoints::MakePoints( Float_t dr, Float_t r0, Double_t x, Double_t* p
 }
 /***************************************************************/
 
-AliTrackPoints::~AliTrackPoints()
+void AliTrackPoints::MakeITSPoints(AliESDtrack* track)
 {
-  //destructor
-  delete [] fX;
-  delete [] fY;
-  delete [] fZ;
+//Calculates points in ITS
+// z=R*Pz/Pt
+ AliITStrackV2 itstrack(*track,kTRUE);
+ Double_t x,y,z;
+ static const Double_t r[6] = {4.0, 7.0, 14.9, 23.8, 39.1, 43.6};
+ for (Int_t i = 0; i < 6; i++)
+  {
+    itstrack.GetGlobalXYZat(r[i],x,y,z);
+    fX[i] = x;
+    fY[i] = y;
+    fZ[i] = z;
+//    Info("MakeITSPoints","X %f Y %f Z %f R asked %f R obtained %f",
+//             fX[i],fY[i],fZ[i],r[i],TMath::Hypot(fX[i],fY[i]));
+  }   
 }
-/***************************************************************/
 
+/***************************************************************/
 void AliTrackPoints::PositionAt(Int_t n, Float_t &x,Float_t &y,Float_t &z)
 {
   //returns position at point n
@@ -263,6 +311,18 @@ void AliTrackPoints::PositionAt(Int_t n, Float_t &x,Float_t &y,Float_t &z)
 }
 /***************************************************************/
 
+void AliTrackPoints::Move(Float_t x, Float_t y, Float_t z)
+{
+//Moves all points about vector
+ for (Int_t i = 0; i<fN; i++)
+   {
+     fX[i]+=x;
+     fY[i]+=y;
+     fZ[i]+=z;
+   }   
+}
+/***************************************************************/
+
 Double_t AliTrackPoints::AvarageDistance(const AliTrackPoints& tr)
 {
   //returns the aritmethic avarage distance between two tracks
@@ -332,9 +392,8 @@ Double_t AliTrackPoints::AvarageDistance(const AliTrackPoints& tr)
 
 
 
-void AliTrackPoints::TestESD(Int_t entr,const char* fname )
+void AliTrackPoints::Testesd(Int_t entr,const char* fname )
 {
-//Tests creation of track points for ESD tracks
   delete gAlice;
   gAlice = 0x0;
   AliRunLoader* rl = AliRunLoader::Open();
@@ -459,9 +518,8 @@ void AliTrackPoints::TestESD(Int_t entr,const char* fname )
 /***************************************************************/
 /***************************************************************/
 
-void AliTrackPoints::TestTPC(Int_t entr)
+void AliTrackPoints::Testtpc(Int_t entr)
 {
-//Tests creation of track points for TPC tracks
   delete gAlice;
   gAlice = 0x0;
   AliRunLoader* rl = AliRunLoader::Open();
@@ -587,3 +645,4 @@ void AliTrackPoints::TestTPC(Int_t entr)
   
   delete rl;
 }
+
index 74bf907..ad1ac72 100644 (file)
@@ -21,22 +21,30 @@ class AliESDtrack;
 class AliTrackPoints: public TObject
 {
   public:
+    enum ETypes{kITS = 1};
+
     AliTrackPoints();
-    AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr=30, Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
+    AliTrackPoints(AliTrackPoints::ETypes type, AliESDtrack* track);
     AliTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr=30,Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
-    AliTrackPoints(const AliTrackPoints& in);
+    AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr=30, Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
+//    AliTrackPoints(const AliTrackPoints& in);
     
     virtual ~AliTrackPoints();
     AliTrackPoints& operator=(const AliTrackPoints& in);
     
     Double_t AvarageDistance(const AliTrackPoints& tr);
     void PositionAt(Int_t n, Float_t &x, Float_t &y, Float_t &z);
+    void Move(Float_t x, Float_t y, Float_t z);
+
     Int_t GetDebug() const {return fgDebug;}
     void  SetDebug(Int_t deblevel){fgDebug = deblevel;} 
-    static void TestTPC(Int_t entr);
-    static void TestESD(Int_t entr,const char* fname = "AliESDs.root");
+    static void Testtpc(Int_t entr);
+    static void Testesd(Int_t entr,const char* fname = "AliESDs.root");
+
   protected:
     void MakePoints( Float_t dr, Float_t r0, Double_t x, Double_t* par, Double_t c, Double_t alpha);
+    void MakeITSPoints(AliESDtrack* track);
+    
   private:
     Int_t    fN;//number of points
     Float_t* fX;//[fN]positions at x
index 0bd5233..a79c297 100644 (file)
@@ -38,34 +38,47 @@ public:
   virtual Double_t         Theta() const {return FourMomentum().Theta();};
   virtual Double_t         Eta() const {return FourMomentum().Eta();};
   virtual Double_t         Y() const {return FourMomentum().Rapidity();};
+  
+  virtual void             SetMomentum(Double_t/*px*/,Double_t/*py*/,Double_t/*pz*/,Double_t/*E*/) = 0;
+  virtual void             SetProductionVertex(Double_t /*vx*/, Double_t /*vy*/, Double_t /*vz*/, Double_t /*t*/) = 0;
 
   // PID
   virtual Double_t         Charge() const = 0;
   virtual Double_t         GetProbability(Int_t pdg) const = 0;
+  virtual Double_t         GetPidProb() const = 0;
   virtual Int_t            GetMostProbable() const = 0;
   
   virtual Int_t            GetPdgCode() const = 0;//We need to assume some PID (f.e. energy calculation) 
                                                   //sotimes one track can apear in analysis twise (e.g. ones as pion ones as kaon)
+  virtual Int_t            GetNumberOfPids() const = 0; //returns number of non zero PID probabilities
+  virtual Int_t            GetNthPid         (Int_t idx) const = 0;//These two methods are made to be able to
+  virtual Float_t          GetNthPidProb     (Int_t idx) const = 0;//copy pid information i.e. in copy ctors
   
   // vertices
   virtual TVector3         ProductionVertex() const = 0;
   virtual Double_t         Vx() const {return ProductionVertex().X();};
   virtual Double_t         Vy() const {return ProductionVertex().Y();};
   virtual Double_t         Vz() const {return ProductionVertex().Z();};
+  virtual Double_t         T()  const {return 0.0;};
+
   virtual AliVAODParticle*  Mother() const {return NULL;};
   virtual Bool_t           HasDecayVertex() const {return kFALSE;};
   virtual TVector3         DecayVertex() const {return TVector3();};
   virtual Int_t            NumberOfDaughters() const {return 0;};
-  virtual AliVAODParticle*  Daughter(Int_t /*index*/) const {return NULL;};
-
+  virtual AliVAODParticle* Daughter(Int_t /*index*/) const {return NULL;};
 
+  virtual Int_t            GetUID() const { return 0;}//returns unique ID of this track 
+                                                      //(may happen than the same track is selected
+                                                      //twise, f.g. as a pion and as a kaon than both have the same UID)
+                                                      
   // type information
   virtual Bool_t           IsSimulated() {return kFALSE;};
   virtual Bool_t           IsTrack() {return kFALSE;};
   virtual Bool_t           IsCluster() {return kFALSE;};
 
   //HBT specific 
-  virtual AliTrackPoints*  GetTrackPoints() const {return 0x0;}
+  virtual AliTrackPoints*  GetTPCTrackPoints() const {return 0x0;}
+  virtual AliTrackPoints*  GetITSTrackPoints() const {return 0x0;}
   virtual AliClusterMap*   GetClusterMap() const {return 0x0;}
   virtual void             Print() const = 0;
 
index 44caad5..d678394 100644 (file)
@@ -1,13 +1,23 @@
-SRCS= AliAOD.cxx \
+SRCS= AliAOD.cxx AliEventBuffer.cxx \
       AliVAODParticle.cxx AliAODParticle.cxx \
+      AliAODPair.cxx        AliAODPairCut.cxx \
       AliAODParticleCut.cxx AliAODRun.cxx \
       AliRunAnalysis.cxx AliAnalysis.cxx AliEventCut.cxx \
       AliReader.cxx AliReaderESD.cxx\
       AliTrackPoints.cxx AliClusterMap.cxx \
       AliD0toKpi.cxx  AliD0toKpiAnalysis.cxx AliFlowAnalysis.cxx \
 
-HDRS= $(SRCS:.cxx=.h)
+HDRS= $(SRCS:.cxx=.h) 
 
 DHDR:=ANALYSISLinkDef.h
 
+EXPORT:=AliAOD.h AliEventBuffer.h\
+      AliVAODParticle.h     AliAODParticle.h \
+      AliAODPair.h          AliAODPairCut.h  \
+      AliAODParticleCut.h   AliAODRun.h      \
+      AliRunAnalysis.h      AliAnalysis.h      AliEventCut.h \
+      AliReader.h           AliReaderESD.h   \
+      AliTrackPoints.h      AliClusterMap.h  \
+      AliFlowAnalysis.h  
+
 EINCLUDE:= TPC CONTAINERS ITS
index 3c114ba..08bdefa 100644 (file)
@@ -6,7 +6,7 @@
 //
 // Central Object Of HBTAnalyser: 
 // This class performs main looping within HBT Analysis
-// User must plug a reader of Type AliHBTReader
+// User must plug a reader of Type AliReader
 // User plugs in coorelation and monitor functions
 // as well as monitor functions
 //
 ////////////////////////////////////////////////////////////////////////////
 //_________________________________________________________
 
-#include "AliHBTEvent.h"
-#include "AliHBTReader.h"
+
+#include "AliAOD.h"
+#include "AliAODParticle.h"
+#include "AliAODPairCut.h"
+
+#include "AliEventBuffer.h"
+
+#include "AliReader.h"
 #include "AliHBTPair.h"
 #include "AliHBTFunction.h"
 #include "AliHBTMonitorFunction.h"
-#include "AliHBTEventBuffer.h"
-#include "AliHBTPairCut.h"
  
 #include <TSystem.h>
 
@@ -49,7 +53,7 @@ AliHBTAnalysis::AliHBTAnalysis():
   fParticleMonitorFunctions ( new AliHBTMonOneParticleFctn* [fgkFctnArraySize]),    
   fTrackMonitorFunctions ( new AliHBTMonOneParticleFctn* [fgkFctnArraySize]),    
   fParticleAndTrackMonitorFunctions ( new AliHBTMonTwoParticleFctn* [fgkFctnArraySize]),    
-  fPairCut(new AliHBTEmptyPairCut()),//empty cut - accepts all particles
+  fPairCut(new AliAODEmptyPairCut()),//empty cut - accepts all particles
   fBufferSize(2),
   fDisplayMixingInfo(fgkDefaultMixingInfo),
   fIsOwner(kFALSE),
@@ -64,7 +68,7 @@ AliHBTAnalysis::AliHBTAnalysis():
 /*************************************************************************************/ 
 
 AliHBTAnalysis::AliHBTAnalysis(const AliHBTAnalysis& in):
-  TObject(in),
+  AliAnalysis(in),
   fReader(0x0),
   fNTrackFunctions(0),
   fNParticleFunctions(0),
@@ -107,9 +111,9 @@ AliHBTAnalysis::~AliHBTAnalysis()
     
    if (fIsOwner)
     {
-      if (AliHBTParticle::GetDebug()>5)Info("~AliHBTAnalysis","Is Owner: Attempting to delete functions");
+      if (AliVAODParticle::GetDebug()>5)Info("~AliHBTAnalysis","Is Owner: Attempting to delete functions");
       DeleteFunctions();
-      if (AliHBTParticle::GetDebug()>5)Info("~AliHBTAnalysis","Delete functions done");
+      if (AliVAODParticle::GetDebug()>5)Info("~AliHBTAnalysis","Delete functions done");
     }
    delete [] fTrackFunctions;
    delete [] fParticleFunctions;
@@ -123,6 +127,31 @@ AliHBTAnalysis::~AliHBTAnalysis()
  }
 
 /*************************************************************************************/ 
+Int_t AliHBTAnalysis::ProcessEvent(AliAOD* aodrec, AliAOD* aodsim)
+{
+  //Processes one event
+  if (aodrec == 0x0)
+   {
+     Error("ProcessEvent","Reconstructed AOD is NULL");
+     return 1;
+   }
+
+  if (aodsim == 0x0)
+   {
+     Error("ProcessEvent","Simulated AOD is NULL");
+     return 2;
+   }
+  
+  return 0;
+}
+/*************************************************************************************/ 
+
+Int_t AliHBTAnalysis::Finish()
+{
+  WriteFunctions();
+  return 1;
+}
+/*************************************************************************************/ 
 
 void AliHBTAnalysis::DeleteFunctions()
 {
@@ -130,7 +159,7 @@ void AliHBTAnalysis::DeleteFunctions()
  UInt_t ii;
  for(ii = 0;ii<fNParticleFunctions;ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
        Info("DeleteFunctions","Deleting ParticleFunction %#x",fParticleFunctions[ii]);
        Info("DeleteFunctions","Deleting ParticleFunction %s",fParticleFunctions[ii]->Name());
@@ -141,7 +170,7 @@ void AliHBTAnalysis::DeleteFunctions()
                 
  for(ii = 0;ii<fNTrackFunctions;ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
        Info("DeleteFunctions","Deleting TrackFunction %#x",fTrackFunctions[ii]);
        Info("DeleteFunctions","Deleting TrackFunction %s",fTrackFunctions[ii]->Name());
@@ -152,7 +181,7 @@ void AliHBTAnalysis::DeleteFunctions()
  
  for(ii = 0;ii<fNParticleAndTrackFunctions;ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
        Info("DeleteFunctions","Deleting ParticleAndTrackFunction %#x",fParticleAndTrackFunctions[ii]);
        Info("DeleteFunctions","Deleting ParticleAndTrackFunction %s",fParticleAndTrackFunctions[ii]->Name());
@@ -163,7 +192,7 @@ void AliHBTAnalysis::DeleteFunctions()
  
  for(ii = 0; ii<fNParticleMonitorFunctions; ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
        Info("DeleteFunctions","Deleting ParticleMonitorFunction %#x",fParticleMonitorFunctions[ii]);
        Info("DeleteFunctions","Deleting ParticleMonitorFunction %s",fParticleMonitorFunctions[ii]->Name());
@@ -174,7 +203,7 @@ void AliHBTAnalysis::DeleteFunctions()
    
  for(ii = 0; ii<fNTrackMonitorFunctions; ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
        Info("DeleteFunctions","Deleting TrackMonitorFunction %#x",fTrackMonitorFunctions[ii]);
        Info("DeleteFunctions","Deleting TrackMonitorFunction %s",fTrackMonitorFunctions[ii]->Name());
@@ -185,7 +214,7 @@ void AliHBTAnalysis::DeleteFunctions()
    
  for(ii = 0; ii<fNParticleAndTrackMonitorFunctions; ii++)
   { 
-    if (AliHBTParticle::GetDebug()>5)
+    if (AliVAODParticle::GetDebug()>5)
      {
       Info("DeleteFunctions","Deleting ParticleAndTrackMonitorFunction %#x",fParticleAndTrackMonitorFunctions[ii]);
       Info("DeleteFunctions","Deleting ParticleAndTrackMonitorFunction %s",fParticleAndTrackMonitorFunctions[ii]->Name());
@@ -197,7 +226,7 @@ void AliHBTAnalysis::DeleteFunctions()
 }
 /*************************************************************************************/ 
 
-void AliHBTAnalysis::Init()
+Int_t AliHBTAnalysis::Init()
 {
 //Initializeation method
 //calls Init for all functions
@@ -220,7 +249,7 @@ void AliHBTAnalysis::Init()
  for(ii = 0; ii<fNParticleAndTrackMonitorFunctions; ii++)
    fParticleAndTrackMonitorFunctions[ii]->Init();
    
-
+ return 0;
 }
 /*************************************************************************************/ 
 
@@ -315,12 +344,12 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
 // - PID: when we make resolution analysis we want to take only tracks with correct PID
 // We need cut on tracks because there are data characteristic to 
   
-  AliHBTParticle * part1, * part2;
-  AliHBTParticle * track1, * track2;
+  AliVAODParticle * part1, * part2;
+  AliVAODParticle * track1, * track2;
   
-  AliHBTEvent * trackEvent, *partEvent;
-  AliHBTEvent * trackEvent1 = 0x0,*partEvent1 = 0x0;
-  AliHBTEvent * trackEvent2,*partEvent2;
+  AliAOD * trackEvent, *partEvent;
+  AliAOD * trackEvent1 = 0x0,*partEvent1 = 0x0;
+  AliAOD * trackEvent2,*partEvent2;
   
 //  Int_t N1, N2, N=0; //number of particles in current event(we prcess two events in one time)
   
@@ -331,8 +360,8 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
   AliHBTPair * tmptrackpair;//temprary pointers to pairs
   AliHBTPair * tmppartpair;
 
-  AliHBTEventBuffer partbuffer(fBufferSize);
-  AliHBTEventBuffer trackbuffer(fBufferSize);
+  AliEventBuffer partbuffer(fBufferSize);
+  AliEventBuffer trackbuffer(fBufferSize);
   
   register UInt_t ii;
   
@@ -343,8 +372,8 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
   while (fReader->Next() == kFALSE)
     {
       i++;
-      partEvent= fReader->GetParticleEvent();
-      trackEvent = fReader->GetTrackEvent();
+      partEvent= fReader->GetEventSim();
+      trackEvent = fReader->GetEventRec();
       
       if ( !partEvent || !trackEvent ) 
        {
@@ -362,10 +391,10 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
       
       if(partEvent1 == 0x0) 
        {
-         partEvent1 = new AliHBTEvent();
+         partEvent1 = new AliAOD();
          partEvent1->SetOwner(kTRUE);
 
-         trackEvent1 = new AliHBTEvent();
+         trackEvent1 = new AliAOD();
          trackEvent1->SetOwner(kTRUE);
        }
       else
@@ -403,8 +432,8 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
               //accepted by any cut
               // we have to copy because reader keeps only one event
 
-              partEvent1->AddParticle(new AliHBTParticle(*part1));
-              trackEvent1->AddParticle(new AliHBTParticle(*track1));
+              partEvent1->AddParticle(new AliAODParticle(*part1));
+              trackEvent1->AddParticle(new AliAODParticle(*track1));
             }
 
          if (firstcut) continue;
@@ -429,12 +458,12 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
 
             if( (this->*fkPass)(partpair,trackpair) ) //check pair cut 
               { //do not meets crietria of the pair cut, try with swapped pairs
-                if( (this->*fkPass)(partpair->GetSwapedPair(),trackpair->GetSwapedPair()) )
+                if( (this->*fkPass)((AliHBTPair*)partpair->GetSwappedPair(),(AliHBTPair*)trackpair->GetSwappedPair()) )
                   continue; //swaped pairs do not meet criteria of pair cut as well, take next particle
                 else 
                  { //swaped pair meets all the criteria
-                   tmppartpair = partpair->GetSwapedPair();
-                   tmptrackpair = trackpair->GetSwapedPair();
+                   tmppartpair = (AliHBTPair*)partpair->GetSwappedPair();
+                   tmptrackpair = (AliHBTPair*)trackpair->GetSwappedPair();
                  }
               }
             else
@@ -481,12 +510,12 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
 
                 if( (this->*fkPass)(partpair,trackpair) ) //check pair cut
                   { //do not meets crietria of the 
-                    if( (this->*fkPass)(partpair->GetSwapedPair(),trackpair->GetSwapedPair()) )
+                    if( (this->*fkPass)((AliHBTPair*)partpair->GetSwappedPair(),(AliHBTPair*)trackpair->GetSwappedPair()) )
                       continue;
                     else 
                      {
-                       tmppartpair = partpair->GetSwapedPair();
-                       tmptrackpair = trackpair->GetSwapedPair();
+                       tmppartpair = (AliHBTPair*)partpair->GetSwappedPair();
+                       tmptrackpair = (AliHBTPair*)trackpair->GetSwappedPair();
                      }
                   }
                 else
@@ -525,29 +554,29 @@ void AliHBTAnalysis::ProcessTracks()
 {
 //In order to minimize calling AliRun::GetEvent (we need at one time particles from different events),
 //the loops are splited
-  AliHBTParticle * track1, * track2;
-  AliHBTEvent * trackEvent;
-  AliHBTEvent * trackEvent1 = 0x0;
-  AliHBTEvent * trackEvent2;
+  AliVAODParticle * track1, * track2;
+  AliAOD * trackEvent;
+  AliAOD * trackEvent1 = 0x0;
+  AliAOD * trackEvent2;
 
   register UInt_t ii;
 
   AliHBTPair * trackpair = new AliHBTPair();
   AliHBTPair * tmptrackpair; //temporary pointer 
   
-  AliHBTEventBuffer trackbuffer(fBufferSize);
+  AliEventBuffer trackbuffer(fBufferSize);
   
   fReader->Rewind();
   Int_t i = -1;
   while (fReader->Next() == kFALSE)
     {
       i++;
-      trackEvent = fReader->GetTrackEvent();
+      trackEvent = fReader->GetEventRec();
       if (!trackEvent) continue;
       
       if(trackEvent1 == 0x0) 
        {
-         trackEvent1 = new AliHBTEvent();
+         trackEvent1 = new AliAOD();
          trackEvent1->SetOwner(kTRUE);
        }
       else
@@ -573,7 +602,7 @@ void AliHBTAnalysis::ProcessTracks()
             {
               //accepted by any cut
               // we have to copy because reader keeps only one event
-              trackEvent1->AddParticle(new AliHBTParticle(*track1));
+              trackEvent1->AddParticle(new AliAODParticle(*track1));
             }
 
          if (firstcut) continue;
@@ -591,8 +620,8 @@ void AliHBTAnalysis::ProcessTracks()
            trackpair->SetParticles(track1,track2);
            if(fPairCut->Pass(trackpair)) //check pair cut
             { //do not meets crietria of the 
-              if( fPairCut->Pass(trackpair->GetSwapedPair()) ) continue;
-              else tmptrackpair = trackpair->GetSwapedPair();
+              if( fPairCut->Pass((AliHBTPair*)trackpair->GetSwappedPair()) ) continue;
+              else tmptrackpair = (AliHBTPair*)trackpair->GetSwappedPair();
             }
            else
             {
@@ -624,11 +653,11 @@ void AliHBTAnalysis::ProcessTracks()
 
                 if( fPairCut->Pass(trackpair) ) //check pair cut
                   { //do not meets crietria of the 
-                    if( fPairCut->Pass(trackpair->GetSwapedPair()) )
+                    if( fPairCut->Pass((AliHBTPair*)trackpair->GetSwappedPair()) )
                       continue;
                     else 
                      {
-                       tmptrackpair = trackpair->GetSwapedPair();
+                       tmptrackpair = (AliHBTPair*)trackpair->GetSwappedPair();
                      }
                   }
                 else
@@ -655,17 +684,17 @@ void AliHBTAnalysis::ProcessParticles()
 {
 //In order to minimize calling AliRun::GetEvent (we need at one time particles from different events),
 //the loops are splited
-  AliHBTParticle * part1, * part2;
-  AliHBTEvent * partEvent;
-  AliHBTEvent * partEvent1 = 0x0;
-  AliHBTEvent * partEvent2;
+  AliVAODParticle * part1, * part2;
+  AliAOD * partEvent;
+  AliAOD * partEvent1 = 0x0;
+  AliAOD * partEvent2;
 
   register UInt_t ii;
 
   AliHBTPair * partpair = new AliHBTPair();
   AliHBTPair * tmppartpair; //temporary pointer 
   
-  AliHBTEventBuffer partbuffer(fBufferSize);
+  AliEventBuffer partbuffer(fBufferSize);
   partbuffer.SetOwner(kTRUE);
   
   fReader->Rewind();
@@ -673,12 +702,12 @@ void AliHBTAnalysis::ProcessParticles()
   while (fReader->Next() == kFALSE)
     {
       i++;
-      partEvent = fReader->GetParticleEvent();
+      partEvent = fReader->GetEventSim();
       if (!partEvent) continue;
       
       if(partEvent1 == 0x0) 
        {
-         partEvent1 = new AliHBTEvent();
+         partEvent1 = new AliAOD();
          partEvent1->SetOwner(kTRUE);
        }
       else
@@ -704,7 +733,7 @@ void AliHBTAnalysis::ProcessParticles()
             {
               //accepted by any cut
               // we have to copy because reader keeps only one event
-              partEvent1->AddParticle(new AliHBTParticle(*part1));
+              partEvent1->AddParticle(new AliAODParticle(*part1));
             }
 
          if (firstcut) continue;
@@ -722,8 +751,8 @@ void AliHBTAnalysis::ProcessParticles()
            partpair->SetParticles(part1,part2);
            if(fPairCut->Pass(partpair)) //check pair cut
             { //do not meets crietria of the 
-              if( fPairCut->Pass(partpair->GetSwapedPair()) ) continue;
-              else tmppartpair = partpair->GetSwapedPair();
+              if( fPairCut->Pass((AliHBTPair*)partpair->GetSwappedPair()) ) continue;
+              else tmppartpair = (AliHBTPair*)partpair->GetSwappedPair();
             }
            else
             {
@@ -755,11 +784,11 @@ void AliHBTAnalysis::ProcessParticles()
 
                 if( fPairCut->Pass(partpair) ) //check pair cut
                   { //do not meets crietria of the 
-                    if( fPairCut->Pass(partpair->GetSwapedPair()) )
+                    if( fPairCut->Pass((AliHBTPair*)partpair->GetSwappedPair()) )
                       continue;
                     else 
                      {
-                       tmppartpair = partpair->GetSwapedPair();
+                       tmppartpair = (AliHBTPair*)partpair->GetSwappedPair();
                      }
                   }
                 else
@@ -787,7 +816,7 @@ void AliHBTAnalysis::WriteFunctions()
   UInt_t ii;
   for(ii = 0;ii<fNParticleFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
         Info("WriteFunctions","Writing ParticleFunction %#x",fParticleFunctions[ii]);
         Info("WriteFunctions","Writing ParticleFunction %s",fParticleFunctions[ii]->Name());
@@ -797,7 +826,7 @@ void AliHBTAnalysis::WriteFunctions()
                  
   for(ii = 0;ii<fNTrackFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
         Info("WriteFunctions","Writing TrackFunction %#x",fTrackFunctions[ii]);
         Info("WriteFunctions","Writing TrackFunction %s",fTrackFunctions[ii]->Name());
@@ -807,7 +836,7 @@ void AliHBTAnalysis::WriteFunctions()
                  
   for(ii = 0;ii<fNParticleAndTrackFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
         Info("WriteFunctions","Writing ParticleAndTrackFunction %#x",fParticleAndTrackFunctions[ii]);
         Info("WriteFunctions","Writing ParticleAndTrackFunction %s",fParticleAndTrackFunctions[ii]->Name());
@@ -817,7 +846,7 @@ void AliHBTAnalysis::WriteFunctions()
 
   for(ii = 0;ii<fNParticleMonitorFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
         Info("WriteFunctions","Writing ParticleMonitorFunction %#x",fParticleMonitorFunctions[ii]);
         Info("WriteFunctions","Writing ParticleMonitorFunction %s",fParticleMonitorFunctions[ii]->Name());
@@ -827,7 +856,7 @@ void AliHBTAnalysis::WriteFunctions()
 
   for(ii = 0;ii<fNTrackMonitorFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
         Info("WriteFunctions","Writing TrackMonitorFunction %#x",fTrackMonitorFunctions[ii]);
         Info("WriteFunctions","Writing TrackMonitorFunction %s",fTrackMonitorFunctions[ii]->Name());
@@ -837,7 +866,7 @@ void AliHBTAnalysis::WriteFunctions()
 
   for(ii = 0;ii<fNParticleAndTrackMonitorFunctions;ii++)
    {
-     if (AliHBTParticle::GetDebug()>5)
+     if (AliVAODParticle::GetDebug()>5)
       {
        Info("WriteFunctions","Writing ParticleAndTrackMonitorFunction %#x",fParticleAndTrackMonitorFunctions[ii]);
        Info("WriteFunctions","Writing ParticleAndTrackMonitorFunction %s",fParticleAndTrackMonitorFunctions[ii]->Name());
@@ -847,7 +876,7 @@ void AliHBTAnalysis::WriteFunctions()
 }
 /*************************************************************************************/
 
-void AliHBTAnalysis::SetGlobalPairCut(AliHBTPairCut* cut)
+void AliHBTAnalysis::SetGlobalPairCut(AliAODPairCut* cut)
 {
 //Sets the global cut
   if (cut == 0x0)
@@ -855,7 +884,7 @@ void AliHBTAnalysis::SetGlobalPairCut(AliHBTPairCut* cut)
      Error("AliHBTAnalysis::SetGlobalPairCut","Pointer is NULL. Ignoring");
    }
   delete fPairCut;
-  fPairCut = (AliHBTPairCut*)cut->Clone();
+  fPairCut = (AliAODPairCut*)cut->Clone();
 }
 
 /*************************************************************************************/
@@ -949,42 +978,46 @@ Bool_t AliHBTAnalysis::RunCoherencyCheck()
  //Checks if both HBTRuns are similar
  //return true if error found
  //if they seem to be OK return false
+/* 
+
  Int_t i;  
  Info("RunCoherencyCheck","Checking HBT Runs Coherency");
 
- Info("RunCoherencyCheck","Number of events ...");
- if (fReader->GetNumberOfPartEvents() == fReader->GetNumberOfTrackEvents() ) //check whether there is the same  number of events
-  {
-    Info("RunCoherencyCheck","OK. %d found\n",fReader->GetNumberOfTrackEvents());
-  }
- else
-  { //if not the same - ERROR
-   Error("AliHBTAnalysis::RunCoherencyCheck()",
-         "Number of simulated events (%d) is not equal to number of reconstructed events(%d)",
-         fReader->GetNumberOfPartEvents(),fReader->GetNumberOfTrackEvents());
-   return kTRUE;
-  }
+//When we use non-buffering reader this is a big waste of time -> We need to read all data to check it
+//and reader is implemented safe in this case anyway
+// Info("RunCoherencyCheck","Number of events ...");
+// if (fReader->GetNumberOfPartEvents() == fReader->GetNumberOfTrackEvents() ) //check whether there is the same  number of events
+//  {
+//    Info("RunCoherencyCheck","OK. %d found\n",fReader->GetNumberOfTrackEvents());
+//  }
+// else
+//  { //if not the same - ERROR
+//   Error("RunCoherencyCheck",
+//         "Number of simulated events (%d) is not equal to number of reconstructed events(%d)",
+//         fReader->GetNumberOfPartEvents(),fReader->GetNumberOfTrackEvents());
+//   return kTRUE;
+//  }
  
  Info("RunCoherencyCheck","Checking number of Particles AND Particles Types in each event ...");
  
- AliHBTEvent *partEvent;
- AliHBTEvent *trackEvent;
+ AliAOD *partEvent;
+ AliAOD *trackEvent;
  for( i = 0; i<fReader->GetNumberOfTrackEvents();i++)
   {
-    partEvent= fReader->GetParticleEvent(i); //gets the "ith" event 
-    trackEvent = fReader->GetTrackEvent(i);
+    partEvent= fReader->GetEventSim(i); //gets the "ith" event 
+    trackEvent = fReader->GetEventRec(i);
     
     if ( (partEvent == 0x0) && (partEvent == 0x0) ) continue;
     if ( (partEvent == 0x0) || (partEvent == 0x0) )
      {
-       Error("AliHBTAnalysis::RunCoherencyCheck()",
+       Error("RunCoherencyCheck",
              "One event is NULL and the other one not. Event Number %d",i);
        return kTRUE;    
      }
     
     if ( partEvent->GetNumberOfParticles() != trackEvent->GetNumberOfParticles() )
      {
-       Error("AliHBTAnalysis::RunCoherencyCheck()",
+       Error("RunCoherencyCheck",
              "Event %d: Number of simulated particles (%d) not equal to number of reconstructed tracks (%d)",
              i,partEvent->GetNumberOfParticles() , trackEvent->GetNumberOfParticles());
        return kTRUE;
@@ -994,7 +1027,7 @@ Bool_t AliHBTAnalysis::RunCoherencyCheck()
       {
         if( partEvent->GetParticle(j)->GetPdgCode() != trackEvent->GetParticle(j)->GetPdgCode() )
          {
-           Error("AliHBTAnalysis::RunCoherencyCheck()",
+           Error("RunCoherencyCheck",
                  "Event %d: Particle %d: PID of simulated particle (%d) not the same of reconstructed track (%d)",
                  i,j, partEvent->GetParticle(j)->GetPdgCode(),trackEvent->GetParticle(j)->GetPdgCode() );
            return kTRUE;
@@ -1004,6 +1037,7 @@ Bool_t AliHBTAnalysis::RunCoherencyCheck()
   }
  Info("RunCoherencyCheck","  Done");
  Info("RunCoherencyCheck","  Everything looks OK");
+*/ 
  return kFALSE;
 }
 
@@ -1013,25 +1047,25 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
 {
 //Performs analysis for both, tracks and particles
 
-  AliHBTParticle * part1, * part2;
-  AliHBTParticle * track1, * track2;
+  AliVAODParticle * part1, * part2;
+  AliVAODParticle * track1, * track2;
 
-  AliHBTEvent * trackEvent1=0x0,*partEvent1=0x0;
-  AliHBTEvent * trackEvent2=0x0,*partEvent2=0x0;
-  AliHBTEvent * trackEvent3=0x0,*partEvent3=0x0;
+  AliAOD * trackEvent1=0x0,*partEvent1=0x0;
+  AliAOD * trackEvent2=0x0,*partEvent2=0x0;
+  AliAOD * trackEvent3=0x0,*partEvent3=0x0;
 
-  AliHBTEvent * rawtrackEvent, *rawpartEvent;//this we get from Reader
+  AliAOD * rawtrackEvent, *rawpartEvent;//this we get from Reader
   
   AliHBTPair * trackpair = new AliHBTPair();
   AliHBTPair * partpair = new AliHBTPair();
 
-  AliHBTEventBuffer partbuffer(fBufferSize);
-  AliHBTEventBuffer trackbuffer(fBufferSize);
+  AliEventBuffer partbuffer(fBufferSize);
+  AliEventBuffer trackbuffer(fBufferSize);
   
   register UInt_t ii;
 
-  trackEvent1 = new AliHBTEvent();
-  partEvent1 = new AliHBTEvent();
+  trackEvent1 = new AliAOD();
+  partEvent1 = new AliAOD();
   trackEvent1->SetOwner(kFALSE);
   partEvent1->SetOwner(kFALSE);;
   
@@ -1047,8 +1081,8 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
     {
       if (fReader->Next()) break; //end when no more events available
       
-      rawpartEvent  = fReader->GetParticleEvent();
-      rawtrackEvent = fReader->GetTrackEvent();
+      rawpartEvent  = fReader->GetEventSim();
+      rawtrackEvent = fReader->GetEventRec();
       if ( (rawpartEvent == 0x0) || (rawtrackEvent == 0x0) ) continue;//in case of any error
       
       if ( rawpartEvent->GetNumberOfParticles() != rawtrackEvent->GetNumberOfParticles() )
@@ -1064,8 +1098,8 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
       /********************************/
       if ( ( (partEvent2==0x0) || (trackEvent2==0x0)) )//in case fBufferSize == 0 and pointers are created do not eneter
        {
-         partEvent2  = new AliHBTEvent();
-         trackEvent2 = new AliHBTEvent();
+         partEvent2  = new AliAOD();
+         trackEvent2 = new AliAOD();
          partEvent2->SetOwner(kTRUE);
          trackEvent2->SetOwner(kTRUE);
        }
@@ -1196,20 +1230,20 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
 void AliHBTAnalysis::ProcessTracksNonIdentAnal()
 {
 //Process Tracks only with non identical mode
-  AliHBTParticle * track1, * track2;
+  AliVAODParticle * track1, * track2;
 
-  AliHBTEvent * trackEvent1=0x0;
-  AliHBTEvent * trackEvent2=0x0;
-  AliHBTEvent * trackEvent3=0x0;
+  AliAOD * trackEvent1=0x0;
+  AliAOD * trackEvent2=0x0;
+  AliAOD * trackEvent3=0x0;
 
-  AliHBTEvent * rawtrackEvent;
+  AliAOD * rawtrackEvent;
   
   AliHBTPair * trackpair = new AliHBTPair();
-  AliHBTEventBuffer trackbuffer(fBufferSize);
+  AliEventBuffer trackbuffer(fBufferSize);
 
   register UInt_t ii;
 
-  trackEvent1 = new AliHBTEvent();
+  trackEvent1 = new AliAOD();
   trackEvent1->SetOwner(kFALSE);
   
   fReader->Rewind();
@@ -1222,7 +1256,7 @@ void AliHBTAnalysis::ProcessTracksNonIdentAnal()
   for (Int_t i = 0;;i++)//infinite loop
     {
       if (fReader->Next()) break; //end when no more events available
-      rawtrackEvent = fReader->GetTrackEvent();
+      rawtrackEvent = fReader->GetEventRec();
       
       if (rawtrackEvent == 0x0)  continue;//in case of any error
 
@@ -1231,7 +1265,7 @@ void AliHBTAnalysis::ProcessTracksNonIdentAnal()
       /********************************/
       if ( trackEvent2==0x0 )//in case fBufferSize == 0 and pointers are created do not eneter
        {
-         trackEvent2 = new AliHBTEvent();
+         trackEvent2 = new AliAOD();
          trackEvent2->SetOwner(kTRUE);
        }
        
@@ -1320,20 +1354,20 @@ void AliHBTAnalysis::ProcessTracksNonIdentAnal()
 void AliHBTAnalysis::ProcessParticlesNonIdentAnal()
 {
 //process paricles only with non identical mode
-  AliHBTParticle * part1 = 0x0, * part2 = 0x0;
+  AliVAODParticle * part1 = 0x0, * part2 = 0x0;
 
-  AliHBTEvent * partEvent1 = 0x0;
-  AliHBTEvent * partEvent2 = 0x0;
-  AliHBTEvent * partEvent3 = 0x0;
+  AliAOD * partEvent1 = 0x0;
+  AliAOD * partEvent2 = 0x0;
+  AliAOD * partEvent3 = 0x0;
 
-  AliHBTEvent * rawpartEvent = 0x0;
+  AliAOD * rawpartEvent = 0x0;
 
   AliHBTPair * partpair = new AliHBTPair();
-  AliHBTEventBuffer partbuffer(fBufferSize);
+  AliEventBuffer partbuffer(fBufferSize);
 
   register UInt_t ii;
 
-  partEvent1 = new AliHBTEvent();
+  partEvent1 = new AliAOD();
   partEvent1->SetOwner(kFALSE);
   
   fReader->Rewind();
@@ -1346,7 +1380,7 @@ void AliHBTAnalysis::ProcessParticlesNonIdentAnal()
     {
       if (fReader->Next()) break; //end when no more events available
       
-      rawpartEvent  = fReader->GetParticleEvent();
+      rawpartEvent  = fReader->GetEventSim();
       if ( rawpartEvent == 0x0  ) continue;//in case of any error
 
       /********************************/
@@ -1354,7 +1388,7 @@ void AliHBTAnalysis::ProcessParticlesNonIdentAnal()
       /********************************/
       if (partEvent2==0x0)//in case fBufferSize == 0 and pointers are created do not eneter
        {
-         partEvent2  = new AliHBTEvent();
+         partEvent2  = new AliAOD();
          partEvent2->SetOwner(kTRUE);
        }
        
@@ -1435,13 +1469,13 @@ void AliHBTAnalysis::ProcessParticlesNonIdentAnal()
 }
 
 /*************************************************************************************/  
-void AliHBTAnalysis::FilterOut(AliHBTEvent* outpart1, AliHBTEvent* outpart2, AliHBTEvent* inpart,
-                     AliHBTEvent* outtrack1, AliHBTEvent* outtrack2, AliHBTEvent* intrack) const
+void AliHBTAnalysis::FilterOut(AliAOD* outpart1, AliAOD* outpart2, AliAOD* inpart,
+                     AliAOD* outtrack1, AliAOD* outtrack2, AliAOD* intrack) const
 {
  //Puts particles accepted as a first particle by global cut in out1
  //and as a second particle in out2
 
-  AliHBTParticle* part, *track;
+  AliVAODParticle* part, *track;
 
   outpart1->Reset();
   outpart2->Reset();
@@ -1476,25 +1510,25 @@ void AliHBTAnalysis::FilterOut(AliHBTEvent* outpart1, AliHBTEvent* outpart2, Ali
      
      if (in2)
       {
-        outpart2->AddParticle(new AliHBTParticle(*part));
-        outtrack2->AddParticle(new AliHBTParticle(*track));
+        outpart2->AddParticle(new AliAODParticle(*part));
+        outtrack2->AddParticle(new AliAODParticle(*track));
         continue;
       }
    }
 }
 /*************************************************************************************/  
 
-void AliHBTAnalysis::FilterOut(AliHBTEvent* out1, AliHBTEvent* out2, AliHBTEvent* in) const
+void AliHBTAnalysis::FilterOut(AliAOD* out1, AliAOD* out2, AliAOD* in) const
 {
  //Puts particles accepted as a first particle by global cut in out1
  //and as a second particle in out2
-  AliHBTParticle* part;
+  AliVAODParticle* part;
   
   out1->Reset();
   out2->Reset();
   
-  AliHBTParticleCut *cut1 = fPairCut->GetFirstPartCut();
-  AliHBTParticleCut *cut2 = fPairCut->GetSecondPartCut();
+  AliAODParticleCut *cut1 = fPairCut->GetFirstPartCut();
+  AliAODParticleCut *cut2 = fPairCut->GetSecondPartCut();
   
   Bool_t in1, in2;
   
index 7cfa4d2..c4ca2bb 100644 (file)
@@ -7,7 +7,7 @@
 //
 // Central Object Of HBTAnalyser: 
 // This class performs main looping within HBT Analysis
-// User must plug a reader of Type AliHBTReader
+// User must plug a reader of Type AliReader
 // User plugs in coorelation and monitor functions
 // as well as monitor functions
 //
 ////////////////////////////////////////////////////////////////////////////
 //_________________________________________________________
 
-#include <TObject.h>
-#include "AliHBTPairCut.h"
-#include "AliHBTParticleCut.h"
+#include <AliAnalysis.h>
+#include "AliAODPairCut.h"
+#include "AliAODParticleCut.h"
 
 class AliHBTCut;
-class AliHBTPair;
+//class AliHBTPair;
 
 class AliHBTRun;
-class AliHBTEvent;
-class AliHBTReader;
+class AliAOD;
+class AliReader;
 class AliHBTOnePairFctn;      
 class AliHBTTwoPairFctn;
 
@@ -38,7 +38,7 @@ class AliHBTMonTwoParticleFctn;
 
 class TList;
 
-class AliHBTAnalysis: public TObject
+class AliHBTAnalysis: public AliAnalysis
  {
    public:
      AliHBTAnalysis();
@@ -46,9 +46,13 @@ class AliHBTAnalysis: public TObject
      AliHBTAnalysis& operator=(const AliHBTAnalysis& /*right*/);
      virtual ~AliHBTAnalysis();
 
+     Int_t  Init();
+     Int_t ProcessEvent(AliAOD* aodrec, AliAOD* aodsim = 0x0);
+     Int_t Finish();
+     
      virtual void Process(Option_t* option = "TracksAndParticles");
      
-     void SetGlobalPairCut(AliHBTPairCut* cut);
+     void SetGlobalPairCut(AliAODPairCut* cut);
      
      void AddTrackFunction(AliHBTOnePairFctn* f);
      void AddParticleFunction(AliHBTOnePairFctn* f);
@@ -60,7 +64,7 @@ class AliHBTAnalysis: public TObject
 
      void AddResolutionFunction(AliHBTTwoPairFctn* f){AddParticleAndTrackFunction(f);}
      
-     void SetReader(AliHBTReader* r){fReader = r;}
+     void SetReader(AliReader* r){fReader = r;}
      
      void WriteFunctions();
      
@@ -68,7 +72,6 @@ class AliHBTAnalysis: public TObject
      void SetOwner(Bool_t owner=kTRUE){fIsOwner=owner;}
      Bool_t IsOwner() const {return fIsOwner;}
      Bool_t IsNonIdentAnalysis();
-     void   Init();
      void   ResetFunctions();
      void   SetDisplayInfo(Int_t howoften){fDisplayMixingInfo = howoften;}//defines every each line info about mixing is displayed
      
@@ -81,9 +84,9 @@ class AliHBTAnalysis: public TObject
      
      Bool_t RunCoherencyCheck();
      
-     void FilterOut(AliHBTEvent* outpart1, AliHBTEvent* outpart2, AliHBTEvent* inpart,
-                    AliHBTEvent* outtrack1, AliHBTEvent* outtrack2, AliHBTEvent* intrack)const;
-     void FilterOut(AliHBTEvent* out1, AliHBTEvent* out2, AliHBTEvent* in)const;
+     void FilterOut(AliAOD* outpart1, AliAOD* outpart2, AliAOD* inpart,
+                    AliAOD* outtrack1, AliAOD* outtrack2, AliAOD* intrack)const;
+     void FilterOut(AliAOD* out1, AliAOD* out2, AliAOD* in)const;
      void DeleteFunctions();
      
      virtual void ProcessTracks();
@@ -94,7 +97,7 @@ class AliHBTAnalysis: public TObject
      virtual void ProcessParticlesNonIdentAnal();
      virtual void ProcessTracksNonIdentAnal();
 
-     AliHBTReader* fReader;//! Pointer to reader
+     AliReader* fReader;//! Pointer to reader
      
      UInt_t fNTrackFunctions; //! Number of Tracks functions 
      UInt_t fNParticleFunctions; //! Number of particles functions
@@ -118,32 +121,32 @@ class AliHBTAnalysis: public TObject
      /* Control parameters  */
      /**********************************************/
 
-     AliHBTPairCut*          fPairCut;//! Pair cut applied for all mixed particles
+     AliAODPairCut*   fPairCut;//! Pair cut applied for all mixed particles
       
      Int_t  fBufferSize; //!defines the size of buffer for mixed events; -1==MIX All
      Int_t  fDisplayMixingInfo;//!defines every which particle mixing info is displayed
      Bool_t fIsOwner;//!defines of all functions are supposed to be deleted while by the way of analysis defaulr false
 
    private:
-     Bool_t (AliHBTAnalysis::*fkPass)(AliHBTPair* partpair, AliHBTPair* trackpair) const;//Pointer to function that performes pair cut
-     Bool_t (AliHBTAnalysis::*fkPass1)(AliHBTParticle* partpair, AliHBTParticle* trackpair) const;//Pointer to function that performes cut on first particle
-     Bool_t (AliHBTAnalysis::*fkPass2)(AliHBTParticle* partpair, AliHBTParticle* trackpair) const;//Pointer to function that performes cut on second particle
-     Bool_t (AliHBTAnalysis::*fkPassPairProp)(AliHBTPair* partpair, AliHBTPair* trackpair) const;//Pointer to function that performes pair cut
-     
-     Bool_t PassPartAndTrack (AliHBTPair* partpair, AliHBTPair* trackpair) const {return (fPairCut->Pass(partpair))?kTRUE:fPairCut->Pass(trackpair);}
-     Bool_t PassPartAndTrack1(AliHBTParticle* part, AliHBTParticle* track) const;
-     Bool_t PassPartAndTrack2(AliHBTParticle* part, AliHBTParticle* track) const;
-     Bool_t PassPairPropPartAndTrack (AliHBTPair* partpair, AliHBTPair* trackpair) const {return (fPairCut->PassPairProp(partpair))?kTRUE:fPairCut->PassPairProp(trackpair);}
-     
-     Bool_t PassPart (AliHBTPair* partpair, AliHBTPair* /*trackpair*/) const{return fPairCut->Pass(partpair);}
-     Bool_t PassPart1(AliHBTParticle* part, AliHBTParticle* /*track*/) const{return fPairCut->GetFirstPartCut()->Pass(part);}
-     Bool_t PassPart2(AliHBTParticle* part, AliHBTParticle* /*track*/) const{return fPairCut->GetSecondPartCut()->Pass(part);}
-     Bool_t PassPairPropPart (AliHBTPair* partpair, AliHBTPair* /*trackpair*/) const{return fPairCut->PassPairProp(partpair);}
-     
-     Bool_t PassTrack (AliHBTPair* /*partpair*/, AliHBTPair* trackpair) const{return fPairCut->Pass(trackpair);}
-     Bool_t PassTrack1(AliHBTParticle* /*part*/, AliHBTParticle* track) const{return fPairCut->GetFirstPartCut()->Pass(track);}
-     Bool_t PassTrack2(AliHBTParticle* /*part*/, AliHBTParticle* track) const{return fPairCut->GetSecondPartCut()->Pass(track);}
-     Bool_t PassPairPropTrack (AliHBTPair* /*partpair*/, AliHBTPair* trackpair) const{return fPairCut->PassPairProp(trackpair);}
+     Bool_t (AliHBTAnalysis::*fkPass)(AliAODPair* partpair, AliAODPair* trackpair) const;//Pointer to function that performes pair cut
+     Bool_t (AliHBTAnalysis::*fkPass1)(AliVAODParticle* partpair, AliVAODParticle* trackpair) const;//Pointer to function that performes cut on first particle
+     Bool_t (AliHBTAnalysis::*fkPass2)(AliVAODParticle* partpair, AliVAODParticle* trackpair) const;//Pointer to function that performes cut on second particle
+     Bool_t (AliHBTAnalysis::*fkPassPairProp)(AliAODPair* partpair, AliAODPair* trackpair) const;//Pointer to function that performes pair cut
+     
+     Bool_t PassPartAndTrack (AliAODPair* partpair, AliAODPair* trackpair) const {return (fPairCut->Pass((AliAODPair*)partpair))?kTRUE:fPairCut->Pass((AliAODPair*)trackpair);}
+     Bool_t PassPartAndTrack1(AliVAODParticle* part, AliVAODParticle* track) const;
+     Bool_t PassPartAndTrack2(AliVAODParticle* part, AliVAODParticle* track) const;
+     Bool_t PassPairPropPartAndTrack (AliAODPair* partpair, AliAODPair* trackpair) const {return (fPairCut->PassPairProp((AliAODPair*)partpair))?kTRUE:fPairCut->PassPairProp((AliAODPair*)trackpair);}
+     
+     Bool_t PassPart (AliAODPair* partpair, AliAODPair* /*trackpair*/) const {return fPairCut->Pass((AliAODPair*)partpair);}
+     Bool_t PassPart1(AliVAODParticle* part, AliVAODParticle* /*track*/) const {return fPairCut->GetFirstPartCut()->Pass(part);}
+     Bool_t PassPart2(AliVAODParticle* part, AliVAODParticle* /*track*/) const {return fPairCut->GetSecondPartCut()->Pass(part);}
+     Bool_t PassPairPropPart (AliAODPair* partpair, AliAODPair* /*trackpair*/) const {return fPairCut->PassPairProp((AliAODPair*)partpair);}
+     
+     Bool_t PassTrack (AliAODPair* /*partpair*/, AliAODPair* trackpair) const {return fPairCut->Pass((AliAODPair*)trackpair);}
+     Bool_t PassTrack1(AliVAODParticle* /*part*/, AliVAODParticle* track) const {return fPairCut->GetFirstPartCut()->Pass(track);}
+     Bool_t PassTrack2(AliVAODParticle* /*part*/, AliVAODParticle* track) const {return fPairCut->GetSecondPartCut()->Pass(track);}
+     Bool_t PassPairPropTrack (AliAODPair* /*partpair*/, AliAODPair* trackpair) const {return fPairCut->PassPairProp((AliAODPair*)trackpair);}
 
      static const UInt_t fgkFctnArraySize;//!
      static const UInt_t fgkDefaultMixingInfo;//!
@@ -152,17 +155,17 @@ class AliHBTAnalysis: public TObject
      ClassDef(AliHBTAnalysis,0)
  };
  
-inline Bool_t AliHBTAnalysis::PassPartAndTrack1(AliHBTParticle* part,AliHBTParticle* track) const
+inline Bool_t AliHBTAnalysis::PassPartAndTrack1(AliVAODParticle* part,AliVAODParticle* track) const
 {
 //Checks first particle from both, particle and track pairs
-  AliHBTParticleCut* pc = fPairCut->GetFirstPartCut();
+  AliAODParticleCut* pc = fPairCut->GetFirstPartCut();
   return (pc->Pass(part))?kTRUE:pc->Pass(track);
 }
 /*************************************************************************************/ 
-inline Bool_t AliHBTAnalysis::PassPartAndTrack2(AliHBTParticle* part,AliHBTParticle* track) const
+inline Bool_t AliHBTAnalysis::PassPartAndTrack2(AliVAODParticle* part,AliVAODParticle* track) const
 {
 //Checks second particle from both, particle and track pairs
-  AliHBTParticleCut* pc = fPairCut->GetSecondPartCut();
+  AliAODParticleCut* pc = fPairCut->GetSecondPartCut();
   return (pc->Pass(part))?kTRUE:pc->Pass(track);
 }
 /*************************************************************************************/ 
index 3661402..af14c6e 100644 (file)
@@ -51,10 +51,10 @@ void AliHBTCorrFitFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTP
    
    if (fill)
     {  
-      const AliHBTParticle& p1 = *(trackpair->Particle1());
-      const AliHBTParticle& p2 = *(trackpair->Particle2());
-      fNtuple->Fill(p1.Px(),p1.Py(),p1.Pz(),p1.Energy(),
-                    p2.Px(),p2.Py(),p2.Pz(),p2.Energy());
+      const AliVAODParticle& p1 = *(trackpair->Particle1());
+      const AliVAODParticle& p2 = *(trackpair->Particle2());
+      fNtuple->Fill(p1.Px(),p1.Py(),p1.Pz(),p1.E(),
+                    p2.Px(),p2.Py(),p2.Pz(),p2.E());
     }
 }
 /****************************************************************/
index 803d6b7..7cf01f4 100644 (file)
@@ -37,6 +37,9 @@
 #include <TH3.h>
 #include <TF1.h>
 #include <TRandom.h>
+#include <AliAODParticle.h>
+
+
 ClassImp(AliHBTCorrectQInvCorrelFctn)
 
 AliHBTCorrectQInvCorrelFctn::AliHBTCorrectQInvCorrelFctn(const char* name,const char* title):
@@ -197,7 +200,7 @@ void AliHBTCorrectQInvCorrelFctn::ProcessSameEventParticles(AliHBTPair* pair)
 void AliHBTCorrectQInvCorrelFctn::ProcessDiffEventParticles(AliHBTPair* pair)
 {
 //Process different events 
-  static AliHBTParticle part1, part2;
+  static AliAODParticle part1, part2;
   static AliHBTPair smearedpair(&part1,&part2);
   
   pair = CheckPair(pair);
@@ -232,7 +235,7 @@ void AliHBTCorrectQInvCorrelFctn::Smear(AliHBTPair* pair,AliHBTPair& smeared)
 }
 /******************************************************************/
 
-void AliHBTCorrectQInvCorrelFctn::Smear(AliHBTParticle* part, AliHBTParticle* smeared)
+void AliHBTCorrectQInvCorrelFctn::Smear(AliVAODParticle* part, AliVAODParticle* smeared)
 {
  //Smears momenta
   Double_t sin2theta = TMath::Sin(part->Theta());
@@ -250,7 +253,7 @@ void AliHBTCorrectQInvCorrelFctn::Smear(AliHBTParticle* part, AliHBTParticle* sm
   Double_t smearedPz = part->Pz()*(1.0+dPtDivPt) - pt*dtheta/sin2theta;
 //  fourmom.setZ(pz*(1.0+dPtDivPt) - pT*dtheta/sin2theta);
   
-  Double_t mass2 = part->GetMass()*part->GetMass();
+  Double_t mass2 = part->Mass()*part->Mass();
   Double_t e = mass2 + smearedPx*smearedPx + 
                        smearedPy*smearedPy + 
                        smearedPz*smearedPz;
index c2a6b9d..6de1bdf 100644 (file)
@@ -53,7 +53,7 @@ class AliHBTCorrectQInvCorrelFctn: public AliHBTOnePairFctn1D
     Double_t GetCoulombCorrection(AliHBTPair* /*pair*/){return 1.0;}
     Double_t GetValue(AliHBTPair * pair) const {return pair->GetQInv();}
     void Smear(AliHBTPair* pair,AliHBTPair& smeared);
-    void Smear(AliHBTParticle* part, AliHBTParticle* smeared);
+    void Smear(AliVAODParticle* part, AliVAODParticle* smeared);
     Double_t GetModelValue(Double_t qinv);
 
     //Our ideal numerator 
index bea1535..69627a2 100644 (file)
@@ -3,9 +3,9 @@
 //////////////////////////////////////////////////////////////////////////////
 //
 // class AliHBTQInvCorrelFctn
-// class AliHBTQOutCMSLCCorrelFctn
-// class AliHBTQLongCMSLCCorrelFctn
-// class AliHBTQSideCMSLCCorrelFctn
+// class AliHBTQOutLCMSCorrelFctn
+// class AliHBTQLongLCMSCorrelFctn
+// class AliHBTQSideLCMSCorrelFctn
 // class AliHBTInvMassCorrelFctn
 // class AliHBTTwoKStarCorrelFctn
 //
@@ -71,9 +71,9 @@ void AliHBTOutSideLongFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y
   //calculates values of that function
   //qout qside and qlong
   
-  x=pair->GetQOutCMSLC(); 
-  y=pair->GetQSideCMSLC(); 
-  z=pair->GetQLongCMSLC();
+  x=pair->GetQOutLCMS(); 
+  y=pair->GetQSideLCMS(); 
+  z=pair->GetQLongLCMS();
   if (fAbs)
    {
      x = TMath::Abs(x);
@@ -84,9 +84,9 @@ void AliHBTOutSideLongFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y
 
 /*************************************************************************************/ 
 
-ClassImp(AliHBTQOutCMSLCCorrelFctn)
+ClassImp(AliHBTQOutLCMSCorrelFctn)
     
-AliHBTQOutCMSLCCorrelFctn::AliHBTQOutCMSLCCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
+AliHBTQOutLCMSCorrelFctn::AliHBTQOutLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
  AliHBTOnePairFctn1D(nbins,maxXval,minXval)
 {
   //ctor
@@ -95,7 +95,7 @@ AliHBTQOutCMSLCCorrelFctn::AliHBTQOutCMSLCCorrelFctn(Int_t nbins, Double_t maxXv
 }
 /*************************************************************************************/ 
     
-TH1* AliHBTQOutCMSLCCorrelFctn::GetResult()
+TH1* AliHBTQOutLCMSCorrelFctn::GetResult()
 {
  //returns the scaled ratio
  delete fRatio;
@@ -106,9 +106,9 @@ TH1* AliHBTQOutCMSLCCorrelFctn::GetResult()
 /*************************************************************************************/ 
 /*************************************************************************************/ 
 
-ClassImp(AliHBTQLongCMSLCCorrelFctn)
+ClassImp(AliHBTQLongLCMSCorrelFctn)
     
-AliHBTQLongCMSLCCorrelFctn::AliHBTQLongCMSLCCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
+AliHBTQLongLCMSCorrelFctn::AliHBTQLongLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
  AliHBTOnePairFctn1D(nbins,maxXval,minXval)
 {
   //ctor
@@ -117,7 +117,7 @@ AliHBTQLongCMSLCCorrelFctn::AliHBTQLongCMSLCCorrelFctn(Int_t nbins, Double_t max
 }
 /*************************************************************************************/ 
     
-TH1* AliHBTQLongCMSLCCorrelFctn::GetResult()
+TH1* AliHBTQLongLCMSCorrelFctn::GetResult()
 {
  //returns the scaled ratio
  delete fRatio;
@@ -128,9 +128,9 @@ TH1* AliHBTQLongCMSLCCorrelFctn::GetResult()
 /*************************************************************************************/ 
 /*************************************************************************************/ 
 
-ClassImp(AliHBTQSideCMSLCCorrelFctn)
+ClassImp(AliHBTQSideLCMSCorrelFctn)
     
-AliHBTQSideCMSLCCorrelFctn::AliHBTQSideCMSLCCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
+AliHBTQSideLCMSCorrelFctn::AliHBTQSideLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
  AliHBTOnePairFctn1D(nbins,maxXval,minXval)
 {
  //ctor
@@ -139,7 +139,7 @@ AliHBTQSideCMSLCCorrelFctn::AliHBTQSideCMSLCCorrelFctn(Int_t nbins, Double_t max
 }
 /*************************************************************************************/ 
     
-TH1* AliHBTQSideCMSLCCorrelFctn::GetResult()
+TH1* AliHBTQSideLCMSCorrelFctn::GetResult()
 {
  //returns the scaled ratio
  delete fRatio;
index 1841f17..bef8824 100644 (file)
@@ -4,9 +4,9 @@
 //////////////////////////////////////////////////////////////////////////////
 //
 // class AliHBTQInvCorrelFctn
-// class AliHBTQOutCMSLCCorrelFctn
-// class AliHBTQLongCMSLCCorrelFctn
-// class AliHBTQSideCMSLCCorrelFctn
+// class AliHBTQOutLCMSCorrelFctn
+// class AliHBTQLongLCMSCorrelFctn
+// class AliHBTQSideLCMSCorrelFctn
 // class AliHBTInvMassCorrelFctn
 // class AliHBTTwoKStarCorrelFctn
 //
@@ -60,48 +60,48 @@ class AliHBTOutSideLongFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelFunc
 
 /*************************************************************************************/ 
 
-class AliHBTQOutCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
+class AliHBTQOutLCMSCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
-//Q OutCMSLCaraint Correlation Function
+//Q OutLCMSaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQOutCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
-   virtual ~AliHBTQOutCMSLCCorrelFctn(){};
+   AliHBTQOutLCMSCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
+   virtual ~AliHBTQOutLCMSCorrelFctn(){};
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQOutCMSLC();}
+   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQOutLCMS();}
  private:  
-    ClassDef(AliHBTQOutCMSLCCorrelFctn,2)
+    ClassDef(AliHBTQOutLCMSCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
-class AliHBTQLongCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
+class AliHBTQLongLCMSCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
-//Q LongCMSLCaraint Correlation Function
+//Q LongLCMSaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQLongCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
-   virtual ~AliHBTQLongCMSLCCorrelFctn(){};
+   AliHBTQLongLCMSCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
+   virtual ~AliHBTQLongLCMSCorrelFctn(){};
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQLongCMSLC();}
+   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQLongLCMS();}
  private:  
-    ClassDef(AliHBTQLongCMSLCCorrelFctn,2)
+    ClassDef(AliHBTQLongLCMSCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
-class AliHBTQSideCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
+class AliHBTQSideLCMSCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
-//Q SideCMSLCaraint Correlation Function
+//Q SideLCMSaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQSideCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
-   virtual ~AliHBTQSideCMSLCCorrelFctn(){}
+   AliHBTQSideLCMSCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
+   virtual ~AliHBTQSideLCMSCorrelFctn(){}
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQSideCMSLC();}
+   Double_t GetValue(AliHBTPair * pair) const {return pair->GetQSideLCMS();}
  private:  
-    ClassDef(AliHBTQSideCMSLCCorrelFctn,2)
+    ClassDef(AliHBTQSideLCMSCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
index 205181e..242b34e 100644 (file)
@@ -10,7 +10,8 @@
 /////////////////////////////////////////////////////////////////////////
  
 #include "AliHBTPair.h"
-
+#include "AliVAODParticle.h"
+#include "TDatabasePDG.h"
 #include <TMath.h>
 
 #include "volya_complex.h"
@@ -145,15 +146,15 @@ void AliHBTCrab::GetComQuantities(const AliHBTPair* pair,
  static const Double_t kCmToFm = 1.e13;
 // static const Double_t cmtoOneOverGeV = kCmToFm*fgkWcons;
  
- AliHBTParticle *part1 = pair->Particle1();
- AliHBTParticle *part2 = pair->Particle2();
+ AliVAODParticle *part1 = pair->Particle1();
+ AliVAODParticle *part2 = pair->Particle2();
 
- p1[0] = part1->Energy()*1000.0;
+ p1[0] = part1->E()*1000.0;
  p1[1] = part1->Px()*1000.0;
  p1[2] = part1->Py()*1000.0;
  p1[3] = part1->Pz()*1000.0;
  
- p2[0] = part2->Energy()*1000.0;
+ p2[0] = part2->E()*1000.0;
  p2[1] = part2->Px()*1000.0;
  p2[2] = part2->Py()*1000.0;
  p2[3] = part2->Pz()*1000.0;
@@ -227,7 +228,7 @@ void AliHBTCrab::GetComQuantities(const AliHBTPair* pair,
   else //identical
   {
   //  const double  kdotp=fMass2*fMass2-fMass1*fMass1;
-   const double  kdotp = part2->GetMass()*part2->GetMass()- part1->GetMass()*part1->GetMass();
+   const double  kdotp = part2->Mass()*part2->Mass()- part1->Mass()*part1->Mass();
    *test=1;
    *mom=-(p2[0]-p1[0])*(p2[0]-p1[0]);
    ptot2=(p1[0]+p2[0])*(p1[0]+p2[0]);
index 04be138..3b64551 100644 (file)
@@ -41,7 +41,7 @@
 ClassImp( AliHBTFunction )
 
 AliHBTFunction::AliHBTFunction():
- fPairCut(new AliHBTEmptyPairCut()), //dummy cut  
+ fPairCut(new AliAODEmptyPairCut()), //dummy cut  
  fWriteNumAndDen(kFALSE)
 {
 //Default constructor
@@ -50,7 +50,7 @@ AliHBTFunction::AliHBTFunction():
 
 AliHBTFunction::AliHBTFunction(const char* name,const char* title):
  TNamed(name,title),
- fPairCut(new AliHBTEmptyPairCut()), //dummy cut  
+ fPairCut(new AliAODEmptyPairCut()), //dummy cut  
  fWriteNumAndDen(kFALSE)
 {
 //Constructor  
@@ -59,7 +59,7 @@ AliHBTFunction::AliHBTFunction(const char* name,const char* title):
 
 AliHBTFunction::AliHBTFunction(const AliHBTFunction & source):
  TNamed(source),
- fPairCut((AliHBTPairCut*)source.fPairCut->Clone()),
+ fPairCut((AliAODPairCut*)source.fPairCut->Clone()),
  fWriteNumAndDen(source.fWriteNumAndDen)
 {
 // Copy constructor needed by the coding conventions
@@ -69,7 +69,7 @@ AliHBTFunction::AliHBTFunction(const AliHBTFunction & source):
 AliHBTFunction::~AliHBTFunction()
 {
 //destructor  
-  if (AliHBTParticle::GetDebug() > 1)
+  if (AliVAODParticle::GetDebug() > 1)
    {
      Info("~AliHBTFunction","Deleting %s",GetName());
    }
@@ -80,30 +80,30 @@ AliHBTFunction & AliHBTFunction::operator= (const AliHBTFunction & source)
 {
  // Assignment needed by the coding conventions
   delete fPairCut;
-  fPairCut = (AliHBTPairCut*)source.fPairCut->Clone();
+  fPairCut = (AliAODPairCut*)source.fPairCut->Clone();
   return * this;
 }
 
 void AliHBTFunction::WriteFunction()
 {
 //writes result of the function to file
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","%s",GetName());
+   if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","%s",GetName());
    if (fWriteNumAndDen)
     { 
-     if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den");
+     if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den");
      if (GetNumerator()) GetNumerator()->Write();
      if (GetDenominator()) GetDenominator()->Write();
-     if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den Done");
+     if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den Done");
     } 
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Getting Result");
+   if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Getting Result");
    TH1* res = GetResult();
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Getting Result Done");
+   if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Getting Result Done");
    
    if (res) 
     { 
-      if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Result");
+      if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Writing Result");
       res->Write();
-      if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Result Done");
+      if (AliVAODParticle::GetDebug()) Info("AliHBTFunction","Writing Result Done");
     }
 }
 /******************************************************************/
@@ -112,7 +112,7 @@ TH1* AliHBTFunction::GetRatio(Double_t normfactor)
  {
  //returns ratio of numerator and denominator
  //
-   if (AliHBTParticle::GetDebug()>0) Info("GetRatio","Norm. Factor is %f for %s",normfactor,GetName());
+   if (AliVAODParticle::GetDebug()>0) Info("GetRatio","Norm. Factor is %f for %s",normfactor,GetName());
    
    if (normfactor == 0.0)
     {
@@ -131,7 +131,7 @@ TH1* AliHBTFunction::GetRatio(Double_t normfactor)
    
  }
 /******************************************************************/
-void AliHBTFunction::SetPairCut(AliHBTPairCut* cut)
+void AliHBTFunction::SetPairCut(AliAODPairCut* cut)
 {
 //Sets new Pair Cut. Old one is deleted
 //Note that it is created new object instead of simple pointer set
@@ -147,7 +147,7 @@ void AliHBTFunction::SetPairCut(AliHBTPairCut* cut)
      return;
    }
  delete fPairCut;
- fPairCut = (AliHBTPairCut*)cut->Clone();
+ fPairCut = (AliAODPairCut*)cut->Clone();
  
 }
 
@@ -206,14 +206,14 @@ void AliHBTFunction::InitFunction()
 {
 //Iniotializes fctn.: Resets histograms
 //In case histograms are not created in ctor, builds with default parameters
-  if (AliHBTParticle::GetDebug()>1) Info("InitFunction","%s",GetName());
+  if (AliVAODParticle::GetDebug()>1) Info("InitFunction","%s",GetName());
   if ( !(GetNumerator()&&GetDenominator()) ) BuildHistos();
   GetNumerator()->Reset();
   GetDenominator()->Reset();
 
   GetNumerator()->SetDirectory(0x0);
   GetDenominator()->SetDirectory(0x0);
-  if (AliHBTParticle::GetDebug()>1) Info("InitFunction","Done");
+  if (AliVAODParticle::GetDebug()>1) Info("InitFunction","Done");
 }
 /******************************************************************/
 /******************************************************************/
@@ -361,7 +361,7 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
  //Calculates the factor that should be used to scale 
  //quatience of num and den to 1 at tail
  
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
   if(!num) 
    {
      Error("Scale","No numerator");
@@ -384,7 +384,7 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
     Error("Scale","Number of bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","No errors detected");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","No errors detected");
 
   Double_t densum = 0.0;
   Double_t numsum = 0.0;
@@ -400,13 +400,13 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
      }
    }
   
-  if(AliHBTParticle::GetDebug() > 0)
+  if(AliVAODParticle::GetDebug() > 0)
     Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d",numsum,densum,fNBinsToScale);
   
   if (numsum == 0) return 0.0;
   Double_t ret = densum/numsum;
 
-  if(AliHBTParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
+  if(AliVAODParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
   return ret;
 } 
 
@@ -545,7 +545,7 @@ Double_t AliHBTFunction2D::Scale()
 // Calculates the factor that should be used to scale 
 // quatience of fNumerator and fDenominator to 1 at 
 // given region
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
   if(!fNumerator) 
    {
      Error("Scale","No numerator");
@@ -576,7 +576,7 @@ Double_t AliHBTFunction2D::Scale()
     return 0.0;
    }
 
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","No errors detected");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","No errors detected");
 
   Int_t offsetX = nbinsX - fNBinsToScaleX - 1; //bin that we start loop over bins in axis X
   Int_t offsetY = nbinsY - fNBinsToScaleY - 1; //bin that we start loop over bins in axis X
@@ -594,13 +594,13 @@ Double_t AliHBTFunction2D::Scale()
        }
      }
   
-  if(AliHBTParticle::GetDebug() > 0) 
+  if(AliVAODParticle::GetDebug() > 0) 
     Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d",numsum,densum,fNBinsToScaleX,fNBinsToScaleY);
   
   if (numsum == 0) return 0.0;
   Double_t ret = densum/numsum;
 
-  if(AliHBTParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
+  if(AliVAODParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
   return ret;
 } 
 
@@ -751,7 +751,7 @@ Double_t AliHBTFunction3D::Scale()
   // Calculates the factor that should be used to scale 
   // quatience of fNumerator and fDenominator to 1 at 
   // given volume
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","Enetered Scale()");
   if(!fNumerator) 
    {
      Error("Scale","No numerator");
@@ -789,7 +789,7 @@ Double_t AliHBTFunction3D::Scale()
     return 0.0;
    }
 
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","No errors detected");
+  if (AliVAODParticle::GetDebug()>0) Info("Scale","No errors detected");
 
   Int_t offsetX = nbinsX - fNBinsToScaleX - 1; //bin that we start loop over bins in axis X
   Int_t offsetY = nbinsY - fNBinsToScaleY - 1; //bin that we start loop over bins in axis Y
@@ -810,14 +810,14 @@ Double_t AliHBTFunction3D::Scale()
          }
        }
   
-  if(AliHBTParticle::GetDebug() > 0) 
+  if(AliVAODParticle::GetDebug() > 0) 
     Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d fNBinsToScaleZ=%d",
           numsum,densum,fNBinsToScaleX,fNBinsToScaleY,fNBinsToScaleZ);
   
   if (numsum == 0) return 0.0;
   Double_t ret = densum/numsum;
 
-  if(AliHBTParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
+  if(AliVAODParticle::GetDebug() > 0) Info("Scale","returning %f",ret);
   return ret;
 } 
 /******************************************************************/
@@ -1080,9 +1080,6 @@ void AliHBTTwoPairFctn1D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
   // Fills the numerator using pairs from the same event
   partpair  = CheckPair(partpair);
   if( partpair == 0x0) return;
-  
-  if (partpair->GetSwapedPair() == 0x0)//it means that Check pair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
     
   Double_t x = GetValue(trackpair,partpair);
   fNumerator->Fill(x);
@@ -1095,9 +1092,6 @@ void AliHBTTwoPairFctn1D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHB
   partpair  = CheckPair(partpair);
   if( partpair == 0x0) return;
   
-  if (partpair->GetSwapedPair() == 0x0)//it means that Check pair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
-    
   Double_t x = GetValue(trackpair,partpair);
   fDenominator->Fill(x);
 }
@@ -1153,9 +1147,6 @@ void AliHBTTwoPairFctn2D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
   partpair  = CheckPair(partpair);  //check cuts
   if (partpair == 0x0) return;
   
-  if (partpair->GetSwapedPair() == 0x0)//it means that Check pair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
-    
   Double_t x,y;
   GetValues(trackpair,partpair,x,y);
   fNumerator->Fill(x,y);
@@ -1168,9 +1159,6 @@ void AliHBTTwoPairFctn2D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHB
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
-  if (partpair->GetSwapedPair() == 0x0)//it means that Check pair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
-    
   Double_t x,y;
   GetValues(trackpair,partpair,x,y);
   fDenominator->Fill(x,y);
@@ -1230,9 +1218,6 @@ void AliHBTTwoPairFctn3D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
   partpair  = CheckPair(partpair);
   if( partpair == 0x0) return;
   
-  if (partpair->GetSwapedPair() == 0x0)//it means that CheckPair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
-    
   Double_t x,y,z;
   GetValues(trackpair,partpair,x,y,z);
   fNumerator->Fill(x,y,z);
@@ -1246,9 +1231,6 @@ void AliHBTTwoPairFctn3D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHB
   partpair  = CheckPair(partpair);
   if( partpair == 0x0) return;
   
-  if (partpair->GetSwapedPair() == 0x0)//it means that CheckPair returned swapped pair
-    trackpair = trackpair->GetSwapedPair();//so the track pair must be swapped as well
-    
   Double_t x,y,z;
   GetValues(trackpair,partpair,x,y,z);
   fDenominator->Fill(x,y,z);
index dc64faf..5b2d920 100644 (file)
 #include <TH2D.h>
 #include <TH3D.h>
 
-#include "AliHBTPairCut.h"
+#include "AliAODPairCut.h"
 #include "AliHBTPair.h"
 
 
 class AliHBTAnalysis;
-class AliHBTParticleCut;
+class AliVAODParticleCut;
 
 class AliHBTFunction: public TNamed
 {
@@ -47,13 +47,13 @@ class AliHBTFunction: public TNamed
     void Rename(const Char_t * name); //renames the function and histograms ==title is the same that name
     void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms
     
-    void SetPairCut(AliHBTPairCut* cut);
+    void SetPairCut(AliAODPairCut* cut);
     
     virtual AliHBTPair* CheckPair(AliHBTPair* pair);
     void  SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;}
   protected:
     virtual void BuildHistos() = 0;//builds default histograms
-    AliHBTPairCut*   fPairCut;     //pair cut
+    AliAODPairCut*   fPairCut;     //pair cut
     Bool_t           fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result
     ClassDef(AliHBTFunction,3)
 };
@@ -66,7 +66,7 @@ inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
 //   It is notallowed to change the order here beacause analysis enforce the order
 
 //   {//it is BAD 
-//    pair = pair->GetSwapedPair();
+//    pair = pair->GetSwappedPair();
 //    if(pair)
 //     if(fPairCut->Pass(pair)) //so try reverse combination
 //       { 
index d87f8a8..d7a825b 100644 (file)
@@ -164,11 +164,13 @@ extern "C" void type_of_call setpdist(Double_t& r);
 /**************************************************************/
 
 #include "AliHBTPair.h"
-#include "AliHBTParticle.h"
+#include "AliVAODParticle.h"
 #include "WLedCOMMONS.h"
 #include <TRandom.h>   
 #include <TMath.h>     
 #include <TPDGCode.h>
+#include <TParticlePDG.h>
+#include <TDatabasePDG.h>
 
 
 ClassImp(AliHBTLLWeights)  
@@ -263,8 +265,8 @@ Double_t AliHBTLLWeights::GetWeight(const AliHBTPair* partpair)
   static const Double_t kcmtofm = 1.e13;
   static const Double_t kcmtoOneOverGeV = kcmtofm*fgkWcons;  
   
-  AliHBTParticle *part1 = partpair->Particle1();
-  AliHBTParticle *part2 = partpair->Particle2();
+  AliVAODParticle *part1 = partpair->Particle1();
+  AliVAODParticle *part2 = partpair->Particle2();
 
   if ( (part1 == 0x0) || (part2 == 0x0))
    {
index 2b79179..c23938e 100644 (file)
@@ -33,7 +33,7 @@ AliHBTMonPxDistributionFctn::AliHBTMonPxDistributionFctn(Int_t nbins, Double_t m
   Rename("Px","Px");
 }
 
-Double_t AliHBTMonPxDistributionFctn::GetValue(AliHBTParticle * particle) const
+Double_t AliHBTMonPxDistributionFctn::GetValue(AliVAODParticle * particle) const
 { 
  //returns value for that function
  return particle->Px();
index 5aeea91..1ad5645 100644 (file)
@@ -53,7 +53,7 @@ class AliHBTMonPxDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPxDistributionFctn(Int_t nbins = 200, Double_t maxXval = 1.4, Double_t minXval = -1.4);
    virtual ~AliHBTMonPxDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const;
+   Double_t GetValue(AliVAODParticle * particle) const;
    ClassDef(AliHBTMonPxDistributionFctn,1)
 };
 /*************************************************************************************/ 
@@ -64,7 +64,7 @@ class AliHBTMonPyDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPyDistributionFctn(Int_t nbins = 200, Double_t maxXval = 1.4, Double_t minXval = -1.4);
    virtual ~AliHBTMonPyDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Py();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Py();}
    ClassDef(AliHBTMonPyDistributionFctn,1)
 };
 /*************************************************************************************/ 
@@ -75,7 +75,7 @@ class AliHBTMonPzDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPzDistributionFctn(Int_t nbins = 200, Double_t maxXval = 1.4, Double_t minXval = -1.4);
    virtual ~AliHBTMonPzDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Pz();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Pz();}
    ClassDef(AliHBTMonPzDistributionFctn,1)
  
 };
@@ -87,7 +87,7 @@ class AliHBTMonPDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPDistributionFctn(Int_t nbins = 200, Double_t maxXval = 1.4, Double_t minXval = 0.0);
    virtual ~AliHBTMonPDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->P();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->P();}
    ClassDef(AliHBTMonPDistributionFctn,1)
  
 };
@@ -99,7 +99,7 @@ class AliHBTMonPtDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPtDistributionFctn(Int_t nbins = 200, Double_t maxXval = 1.4, Double_t minXval = 0.0);
    virtual ~AliHBTMonPtDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Pt();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Pt();}
    ClassDef(AliHBTMonPtDistributionFctn,1)
 };
 
@@ -111,7 +111,7 @@ class AliHBTMonPxDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 1.4, Double_t minYval =-1.4);
    virtual ~AliHBTMonPxDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
       x = partparticle->Pt();
       y = partparticle->Px();
@@ -127,7 +127,7 @@ class AliHBTMonPyDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 1.4, Double_t minYval =-1.4);
    virtual ~AliHBTMonPyDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Py();
@@ -142,7 +142,7 @@ class AliHBTMonPzDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 1.4, Double_t minYval =-1.4);
    virtual ~AliHBTMonPzDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Pz();
@@ -158,7 +158,7 @@ class AliHBTMonPDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 1.4, Double_t minYval =-1.4);
    virtual ~AliHBTMonPDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->P();
@@ -177,7 +177,7 @@ class AliHBTMonPhiDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonPhiDistributionFctn(Int_t nbins = 200, Double_t maxXval = 3.14, Double_t minXval = 0.0);
    virtual ~AliHBTMonPhiDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Phi();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Phi();}
    ClassDef(AliHBTMonPhiDistributionFctn,1)
 };
 
@@ -188,7 +188,7 @@ class AliHBTMonThetaDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonThetaDistributionFctn(Int_t nbins = 200, Double_t maxXval = 3.14, Double_t minXval = 0.0);
    virtual ~AliHBTMonThetaDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Theta();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Theta();}
    ClassDef(AliHBTMonThetaDistributionFctn,1)
  
 };
@@ -201,7 +201,7 @@ class AliHBTMonPhiDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 3.14, Double_t minYval =0.0);
    virtual ~AliHBTMonPhiDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Phi();
@@ -217,7 +217,7 @@ class AliHBTMonThetaDistributionVsPtFctn: public AliHBTMonOneParticleFctn2D
                              Int_t nYbins = 200, Double_t maxYval = 3.14, Double_t minYval =0.0);
    virtual ~AliHBTMonThetaDistributionVsPtFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
       x = partparticle->Pt();
       y = partparticle->Theta();
@@ -232,7 +232,7 @@ class AliHBTMonVxDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonVxDistributionFctn(Int_t nbins = 200, Double_t maxXval = 500, Double_t minXval = -500);
    virtual ~AliHBTMonVxDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle)  const{ return particle->Vx();}
+   Double_t GetValue(AliVAODParticle * particle)  const{ return particle->Vx();}
    ClassDef(AliHBTMonVxDistributionFctn,1)
 };
 /***********************************************************************/
@@ -242,7 +242,7 @@ class AliHBTMonVyDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonVyDistributionFctn(Int_t nbins = 200, Double_t maxXval = 500, Double_t minXval = -500);
    virtual ~AliHBTMonVyDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Vy();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Vy();}
    ClassDef(AliHBTMonVyDistributionFctn,1)
 };
 /***********************************************************************/
@@ -252,7 +252,7 @@ class AliHBTMonVzDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonVzDistributionFctn(Int_t nbins = 200, Double_t maxXval = 300, Double_t minXval = -300);
    virtual ~AliHBTMonVzDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * particle) const { return particle->Vz();}
+   Double_t GetValue(AliVAODParticle * particle) const { return particle->Vz();}
    ClassDef(AliHBTMonVzDistributionFctn,1)
 };
 /***********************************************************************/
@@ -262,7 +262,7 @@ class AliHBTMonRDistributionFctn: public AliHBTMonOneParticleFctn1D
    AliHBTMonRDistributionFctn(Int_t nbins = 200, Double_t maxXval = 500, Double_t minXval = -500);
    virtual ~AliHBTMonRDistributionFctn(){};
  protected:
-   Double_t GetValue(AliHBTParticle * p) const { return TMath::Sqrt(p->Vx()*p->Vx() + p->Vy()*p->Vy() + p->Vz()*p->Vz());}
+   Double_t GetValue(AliVAODParticle * p) const { return TMath::Sqrt(p->Vx()*p->Vx() + p->Vy()*p->Vy() + p->Vz()*p->Vz());}
    ClassDef(AliHBTMonRDistributionFctn,1)
 };
 
@@ -274,7 +274,7 @@ class AliHBTMonVyDistributionVsVxFctn: public AliHBTMonOneParticleFctn2D
                                    Int_t nYbins = 200, Double_t maxYval = 10.0, Double_t minYval =-10.0);
    virtual ~AliHBTMonVyDistributionVsVxFctn(){}
 
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
       x = partparticle->Vx();
       y = partparticle->Vy();
@@ -290,7 +290,7 @@ class AliHBTMonRtDistributionVsVzFctn: public AliHBTMonOneParticleFctn2D
                                    Int_t nYbins = 100, Double_t maxYval = 10.0, Double_t minYval = 0.0);
    virtual ~AliHBTMonRtDistributionVsVzFctn(){}
  
-   void GetValues(AliHBTParticle* partparticle,  Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* partparticle,  Double_t& x, Double_t& y) const
     {
       x = partparticle->Vz();
       y = TMath::Hypot(partparticle->Vx(),partparticle->Vy());
index b8fe7d5..99fd8d2 100644 (file)
@@ -53,7 +53,7 @@ class AliHBTMonPxResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPxResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPxResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle) const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle) const
      { 
         return (partparticle->Px()-trackparticle->Px()) ;
      } 
@@ -66,7 +66,7 @@ class AliHBTMonPyResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPyResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPyResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle) const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle) const
      { 
         return (partparticle->Py()-trackparticle->Py()) ;
      } 
@@ -79,7 +79,7 @@ class AliHBTMonPzResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPzResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPzResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle)  const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle)  const
      { 
         return (partparticle->Pz()-trackparticle->Pz()) ;
      } 
@@ -92,7 +92,7 @@ class AliHBTMonPResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle)  const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle)  const
      { 
         return (partparticle->P()-trackparticle->P()) ;
      } 
@@ -105,7 +105,7 @@ class AliHBTMonPtResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPtResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPtResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle)  const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle)  const
      { 
         return (partparticle->Pt()-trackparticle->Pt()) ;
      } 
@@ -120,7 +120,7 @@ class AliHBTMonPxResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPxResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPxResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Px()-trackparticle->Px();
@@ -134,7 +134,7 @@ class AliHBTMonPyResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPyResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPyResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Py()-trackparticle->Py();
@@ -148,7 +148,7 @@ class AliHBTMonPzResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPzResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPzResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Pz()-trackparticle->Pz();
@@ -162,7 +162,7 @@ class AliHBTMonPResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->P()-trackparticle->P();
@@ -178,7 +178,7 @@ class AliHBTMonPtResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPtResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPtResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Pt()-trackparticle->Pt();
@@ -195,7 +195,7 @@ class AliHBTMonPhiResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonPhiResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonPhiResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle)  const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle)  const
      { 
         return (partparticle->Phi()-trackparticle->Phi()) ;
      } 
@@ -208,7 +208,7 @@ class AliHBTMonThetaResolutionFctn: public AliHBTMonTwoParticleFctn1D
    AliHBTMonThetaResolutionFctn(Int_t nbins = 200, Double_t maxXval = 0.05, Double_t minXval = -0.05);
    virtual ~AliHBTMonThetaResolutionFctn(){}
 
-   Double_t GetValue(AliHBTParticle * trackparticle,AliHBTParticle * partparticle) const
+   Double_t GetValue(AliVAODParticle * trackparticle,AliVAODParticle * partparticle) const
      { 
         return (partparticle->Theta()-trackparticle->Theta()) ;
      } 
@@ -222,7 +222,7 @@ class AliHBTMonPhiResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPhiResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = 0.0, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPhiResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Phi()-trackparticle->Phi();
@@ -236,7 +236,7 @@ class AliHBTMonPhiResolutionVsPhiFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonPhiResolutionVsPhiFctn(Int_t nXbins = 200, Double_t maxXval = TMath::TwoPi(), Double_t minXval = 0.0,
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonPhiResolutionVsPhiFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Phi();
      y = partparticle->Phi()-trackparticle->Phi();
@@ -250,7 +250,7 @@ class AliHBTMonThetaResolutionVsPtFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonThetaResolutionVsPtFctn(Int_t nXbins = 200, Double_t maxXval = 1.4, Double_t minXval = -0.1, 
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonThetaResolutionVsPtFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      x = partparticle->Pt();
      y = partparticle->Theta()-trackparticle->Theta();
@@ -265,7 +265,7 @@ class AliHBTMonThetaResolutionVsThetaFctn: public AliHBTMonTwoParticleFctn2D
    AliHBTMonThetaResolutionVsThetaFctn(Int_t nXbins = 200, Double_t maxXval = TMath::PiOver2(), Double_t minXval = -TMath::PiOver2(),
                              Int_t nYbins = 200, Double_t maxYval = 0.05, Double_t minYval =-0.05);
    virtual ~AliHBTMonThetaResolutionVsThetaFctn(){}
-   void GetValues(AliHBTParticle* trackparticle, AliHBTParticle* partparticle, Double_t& x, Double_t& y) const
+   void GetValues(AliVAODParticle* trackparticle, AliVAODParticle* partparticle, Double_t& x, Double_t& y) const
     {
      y = partparticle->Theta()-trackparticle->Theta();
      x = partparticle->Theta();
index 18fd54c..3453b86 100644 (file)
@@ -44,21 +44,21 @@ Zbigniew.Chajecki@cern.ch
 ClassImp( AliHBTMonitorFunction )
 
 AliHBTMonitorFunction::AliHBTMonitorFunction():
- fParticleCut(new AliHBTEmptyParticleCut())
+ fParticleCut(new AliAODEmptyParticleCut())
 {
   //ctor
 }
 /******************************************************************/
 AliHBTMonitorFunction::AliHBTMonitorFunction(const char* name,const char* title):
  TNamed(name,title),
- fParticleCut(new AliHBTEmptyParticleCut())
+ fParticleCut(new AliAODEmptyParticleCut())
 {
   //ctor
 }
 /******************************************************************/
 AliHBTMonitorFunction::AliHBTMonitorFunction(const AliHBTMonitorFunction& /*in*/):
  TNamed(),
- fParticleCut(new AliHBTEmptyParticleCut())
+ fParticleCut(new AliAODEmptyParticleCut())
 {
   //cpy ctor
   // We cannot copy because it is a mess with names (histogram and functions)
@@ -91,7 +91,7 @@ void AliHBTMonitorFunction::Write()
 void AliHBTMonitorFunction::Init()
  {
    //Writes an function to disk
-   if (AliHBTParticle::GetDebug()>0) Info("Init","%s",GetName());
+   if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
    
    if (GetResult() == 0x0)
     {
@@ -100,11 +100,11 @@ void AliHBTMonitorFunction::Init()
     }
    GetResult()->Reset();
    GetResult()->SetDirectory(0x0);
-   if (AliHBTParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+   if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
  }
 /******************************************************************/
 
-void AliHBTMonitorFunction::SetParticleCut(AliHBTParticleCut* cut)
+void AliHBTMonitorFunction::SetParticleCut(AliAODParticleCut* cut)
 {
 //Sets new Particle Cut. Old one is deleted
 //Note that it is created new object instead of simple pointer set
@@ -120,7 +120,7 @@ void AliHBTMonitorFunction::SetParticleCut(AliHBTParticleCut* cut)
      return;
    }
  delete fParticleCut;
- fParticleCut = (AliHBTParticleCut*)cut->Clone();
+ fParticleCut = (AliAODParticleCut*)cut->Clone();
  
 }
 /******************************************************************/
@@ -203,7 +203,7 @@ AliHBTMonOneParticleFctn1D::~AliHBTMonOneParticleFctn1D()
 }
 /******************************************************************/
 
-void AliHBTMonOneParticleFctn1D::Process(AliHBTParticle* particle)
+void AliHBTMonOneParticleFctn1D::Process(AliVAODParticle* particle)
 {
  //Fills the result
    particle = CheckParticle(particle);
@@ -234,7 +234,7 @@ AliHBTMonOneParticleFctn2D::~AliHBTMonOneParticleFctn2D()
   //dtor
   delete fResult;
 }
-void AliHBTMonOneParticleFctn2D::Process(AliHBTParticle* particle)
+void AliHBTMonOneParticleFctn2D::Process(AliVAODParticle* particle)
 {
   //fills the function for one particle
   particle = CheckParticle(particle);
@@ -319,7 +319,7 @@ AliHBTMonTwoParticleFctn1D::~AliHBTMonTwoParticleFctn1D()
 }
 /******************************************************************/
 void AliHBTMonTwoParticleFctn1D::
-Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle)
+Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle)
 {
   //fills the function for one particle
   partparticle  = CheckParticle(partparticle);
@@ -358,7 +358,7 @@ AliHBTMonTwoParticleFctn2D::~AliHBTMonTwoParticleFctn2D()
 }
 /******************************************************************/
 void AliHBTMonTwoParticleFctn2D::
-Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle)
+Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle)
 {
   //fills the function for one particle
   partparticle  = CheckParticle(partparticle);
@@ -376,7 +376,7 @@ Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle)
 ClassImp(AliHBTMonTwoParticleFctn3D)
 
 void AliHBTMonTwoParticleFctn3D::
-Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle)
+Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle)
 {
   //fills the function for one particle
   partparticle  = CheckParticle(partparticle);
index 7fed8a4..13457ea 100644 (file)
@@ -41,12 +41,12 @@ Zbigniew.Chajecki@cern.ch
 */
 ///////////////////////////////////////////////////////////////////////
 
-#include "AliHBTParticleCut.h"
+#include "AliAODParticleCut.h"
 
 #include <TH2.h>
 #include <TH3.h>
 
-class AliHBTParticle;
+class AliVAODParticle;
 
 class AliHBTMonitorFunction: public TNamed
 //Abstract base class for HBT functions
@@ -68,19 +68,19 @@ class AliHBTMonitorFunction: public TNamed
     void Rename(const Char_t * name); 
     void Rename(const Char_t * name, const Char_t * title); 
     
-    void SetParticleCut(AliHBTParticleCut* cut);
+    void SetParticleCut(AliAODParticleCut* cut);
 
-    virtual AliHBTParticle* CheckParticle(AliHBTParticle* particle) const;
+    virtual AliVAODParticle* CheckParticle(AliVAODParticle* particle) const;
 
   protected:
-    AliHBTParticleCut*      fParticleCut;//Particle cut
+    AliAODParticleCut*      fParticleCut;//Particle cut
     
   private:  
    ClassDef(AliHBTMonitorFunction,1)
 };
 /******************************************************************/
 /******************************************************************/
-inline AliHBTParticle* AliHBTMonitorFunction::CheckParticle(AliHBTParticle* particle) const
+inline AliVAODParticle* AliHBTMonitorFunction::CheckParticle(AliVAODParticle* particle) const
 {
   //check if particle meets the cut criteria
   if(fParticleCut->Pass(particle)) //if the particle is BAD
@@ -104,7 +104,7 @@ class AliHBTMonOneParticleFctn: public AliHBTMonitorFunction
     
     AliHBTMonOneParticleFctn& operator=(const AliHBTMonOneParticleFctn& /*in*/){MayNotUse("operator=");return *this;} 
     
-    virtual void Process(AliHBTParticle* particle) = 0;
+    virtual void Process(AliVAODParticle* particle) = 0;
     
   protected:
   private:  
@@ -127,10 +127,10 @@ class AliHBTMonOneParticleFctn1D: public AliHBTMonOneParticleFctn
   AliHBTMonOneParticleFctn1D& operator=(const AliHBTMonOneParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}   
   TH1* GetResult(){return this->fResult;}
 
-  void Process(AliHBTParticle* particle);
+  void Process(AliVAODParticle* particle);
 
  protected:
-  virtual Double_t GetValue(AliHBTParticle* particle) const = 0; 
+  virtual Double_t GetValue(AliVAODParticle* particle) const = 0; 
   TH1D* fResult;//histogram to be filled
  private:
   ClassDef(AliHBTMonOneParticleFctn1D,2)
@@ -149,10 +149,10 @@ class AliHBTMonOneParticleFctn2D: public AliHBTMonOneParticleFctn
   AliHBTMonOneParticleFctn2D& operator=(const AliHBTMonOneParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}   
   TH1* GetResult(){return this->fResult;}
   
-  void Process(AliHBTParticle* particle);
+  void Process(AliVAODParticle* particle);
 
  protected:
-  virtual void GetValues(AliHBTParticle* particle, Double_t&, Double_t&) const = 0;
+  virtual void GetValues(AliVAODParticle* particle, Double_t&, Double_t&) const = 0;
 
   TH2D* fResult;//histogram to be filled
   
@@ -195,7 +195,7 @@ class AliHBTMonTwoParticleFctn: public AliHBTMonitorFunction
     AliHBTMonTwoParticleFctn& operator=(const AliHBTMonTwoParticleFctn& /*in*/){MayNotUse("operator=");return *this;} 
     
     virtual void 
-    Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle) = 0;
+    Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) = 0;
             
   protected:
   private:  
@@ -217,10 +217,10 @@ class AliHBTMonTwoParticleFctn1D: public AliHBTMonTwoParticleFctn
   AliHBTMonTwoParticleFctn1D& operator=(const AliHBTMonTwoParticleFctn1D& /*in*/){MayNotUse("operator=");return *this;}   
   TH1* GetResult(){return this->fResult;}
   
-  void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
+  void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
   
  protected:
-  virtual Double_t GetValue(AliHBTParticle* trackparticle, AliHBTParticle* partparticle) const = 0;
+  virtual Double_t GetValue(AliVAODParticle* trackparticle, AliVAODParticle* partparticle) const = 0;
 
   TH1D* fResult;//histogram to be filled
 
@@ -240,10 +240,10 @@ class AliHBTMonTwoParticleFctn2D: public AliHBTMonTwoParticleFctn
   AliHBTMonTwoParticleFctn2D& operator=(const AliHBTMonTwoParticleFctn2D& /*in*/){MayNotUse("operator=");return *this;}   
   TH1* GetResult(){return this->fResult;}
   
-  void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
+  void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
   
  protected:
-  virtual void GetValues(AliHBTParticle*,AliHBTParticle*, Double_t&, Double_t&) const = 0;
+  virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&) const = 0;
 
   TH2D* fResult;//histogram to be filled
   
@@ -266,10 +266,10 @@ class AliHBTMonTwoParticleFctn3D: public AliHBTMonTwoParticleFctn
   AliHBTMonTwoParticleFctn3D& operator=(const AliHBTMonTwoParticleFctn3D& /*in*/){MayNotUse("operator=");return *this;}   
   TH1* GetResult(){return this->fResult;}
   
-  void Process(AliHBTParticle* trackparticle, AliHBTParticle* partparticle);
+  void Process(AliVAODParticle* trackparticle, AliVAODParticle* partparticle);
 
  protected:
-  virtual void GetValues(AliHBTParticle*,AliHBTParticle*, Double_t&, Double_t&,Double_t&) const = 0;
+  virtual void GetValues(AliVAODParticle*,AliVAODParticle*, Double_t&, Double_t&,Double_t&) const = 0;
 
   TH3D* fResult; //histogram to be filled
   
index e489860..066a512 100644 (file)
@@ -52,7 +52,7 @@ void AliHBTMonPIDPurityVsPtFctn::Write()
 void AliHBTMonPIDPurityVsPtFctn::Init()
 {
 //Initializes fuction
-  if (AliHBTParticle::GetDebug()>0) Info("Init","%s",GetName());
+  if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
 
   if (fResult == 0x0)
    {   
@@ -86,7 +86,7 @@ void AliHBTMonPIDPurityVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
 
-  if (AliHBTParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
 }
 
 /******************************************************************/
@@ -163,7 +163,7 @@ TH1* AliHBTMonPIDPurityVsPtFctn::GetResult()
 }
 /******************************************************************/
 
-void AliHBTMonPIDPurityVsPtFctn::Process(AliHBTParticle * track,AliHBTParticle * part)
+void AliHBTMonPIDPurityVsPtFctn::Process(AliVAODParticle * track,AliVAODParticle * part)
 {
  //process the particle/track
  Double_t pt = part->Pt();
@@ -214,7 +214,7 @@ void AliHBTMonPIDContaminationVsPtFctn::Write()
 void AliHBTMonPIDContaminationVsPtFctn::Init()
 {
 //Initializes fuction
-  if (AliHBTParticle::GetDebug()>0) Info("Init","%s",GetName());
+  if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
 
   if (fResult == 0x0)
    {   
@@ -247,7 +247,7 @@ void AliHBTMonPIDContaminationVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
   
-  if (AliHBTParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
 }
 
 /******************************************************************/
@@ -323,7 +323,7 @@ TH1* AliHBTMonPIDContaminationVsPtFctn::GetResult()
 }
 /******************************************************************/
 
-void AliHBTMonPIDContaminationVsPtFctn::Process(AliHBTParticle * track, AliHBTParticle * part)
+void AliHBTMonPIDContaminationVsPtFctn::Process(AliVAODParticle * track, AliVAODParticle * part)
 {
  //process the particle/track
  Double_t pt = part->Pt();
@@ -354,8 +354,8 @@ AliHBTQInvCorrelFctnPerfectPID::AliHBTQInvCorrelFctnPerfectPID(Int_t nbins, Doub
 void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -369,8 +369,8 @@ void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* track
 void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -408,8 +408,8 @@ AliHBTWeightQInvCorrelFctnPerfectPID::AliHBTWeightQInvCorrelFctnPerfectPID(Int_t
 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -423,8 +423,8 @@ void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair*
 void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -466,8 +466,8 @@ AliHBTWeightQOutSQideQLongFctnPerfectPID::AliHBTWeightQOutSQideQLongFctnPerfectP
 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -475,9 +475,9 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTP
   if (partpair == 0x0) return;
 
   Double_t weight = partpair->GetWeight();
-  Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
   fNumerator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -485,17 +485,17 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTP
 void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
-  Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
   fDenominator->Fill(out,side,lon);
 }
 /******************************************************************/
@@ -530,17 +530,17 @@ AliHBTQOutSQideQLongFctnPerfectPID::AliHBTQOutSQideQLongFctnPerfectPID
 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
-  Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
   fNumerator->Fill(out,side,lon);
 }
 /*************************************************************/
@@ -548,17 +548,17 @@ void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* t
 void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
-  Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
   fDenominator->Fill(out,side,lon);
 }
 /******************************************************************/
@@ -634,9 +634,9 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair
   pair  = CheckPair(pair);
   if (pair == 0x0) return;
   Double_t weight = pair->GetPIDProb();
-  Double_t out = TMath::Abs(pair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(pair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(pair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(pair->GetQOutLCMS());
+  Double_t side = TMath::Abs(pair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(pair->GetQLongLCMS());
   fNumerator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -647,9 +647,9 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair
   pair  = CheckPair(pair);
   if (pair == 0x0) return;
   Double_t weight = pair->GetPIDProb();
-  Double_t out = TMath::Abs(pair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(pair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(pair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(pair->GetQOutLCMS());
+  Double_t side = TMath::Abs(pair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(pair->GetQLongLCMS());
   fDenominator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -697,8 +697,8 @@ AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::AliHBTTwoTrackEffFctnPtThetaPhiPerfec
 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
@@ -715,8 +715,8 @@ void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBT
 void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //Fills numerator
-  if (trackpair->Particle1()->GetPid() != partpair->Particle1()->GetPid()) return;
-  if (trackpair->Particle2()->GetPid() != partpair->Particle2()->GetPid()) return;
+  if (trackpair->Particle1()->GetPdgCode() != partpair->Particle1()->GetPdgCode()) return;
+  if (trackpair->Particle2()->GetPdgCode() != partpair->Particle2()->GetPdgCode()) return;
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
index 1ebce90..2382cd4 100644 (file)
@@ -29,8 +29,8 @@ class AliHBTMonPIDPurityVsPtFctn: public AliHBTMonTwoParticleFctn1D, public AliH
     void Rename(const Char_t * name);
     void Rename(const Char_t * name, const Char_t * title);
     TH1* GetResult();
-    Double_t GetValue(AliHBTParticle * /*track*/,AliHBTParticle * /*part*/) const { return 0.0; }
-    void Process(AliHBTParticle * track,AliHBTParticle * part);
+    Double_t GetValue(AliVAODParticle * /*track*/,AliVAODParticle * /*part*/) const { return 0.0; }
+    void Process(AliVAODParticle * track,AliVAODParticle * part);
   protected:
     TH1D* fGood;
     TH1D* fAll;
@@ -48,8 +48,8 @@ class AliHBTMonPIDContaminationVsPtFctn: public AliHBTMonTwoParticleFctn1D, publ
     void Rename(const Char_t * name);
     void Rename(const Char_t * name, const Char_t * title);
     TH1* GetResult();
-    Double_t GetValue(AliHBTParticle * /*track*/,AliHBTParticle * /*part*/) const { return 0.0; }
-    void Process(AliHBTParticle * track,AliHBTParticle * part);
+    Double_t GetValue(AliVAODParticle * /*track*/,AliVAODParticle * /*part*/) const { return 0.0; }
+    void Process(AliVAODParticle * track,AliVAODParticle * part);
   protected:
     TH1D* fWrong;  
     TH1D* fAll;
index 5f4055e..a9fc502 100644 (file)
 //
 ////////////////////////////////////////////////////////////////////////////
 
-#include "AliHBTParticle.h"
+#include "AliVAODParticle.h"
 #include "AliHBTWeights.h"
-#include "AliHBTTrackPoints.h"
 
 ClassImp(AliHBTPair)
 
 /************************************************************************/
 AliHBTPair::AliHBTPair(Bool_t rev):
- fPart1(0x0),
- fPart2(0x0),
- fSwapedPair(0x0),
- fQSideCMSLC(0.0),
- fQSideCMSLCNotCalc(kTRUE),
- fQOutCMSLC(0.0),
- fQOutCMSLCNotCalc(kTRUE),
- fQLongCMSLC(0.0),
- fQLongCMSLCNotCalc(kTRUE),
- fQInv(0.0),
- fQInvNotCalc(kTRUE),
- fInvMass(0.0),
- fInvMassNotCalc(kTRUE),
- fKt(0.0),
- fKtNotCalc(kTRUE),
- fKStar(0.0),
- fKStarNotCalc(kTRUE),
- fPInv(0.0),
- fQSide(0.0),
- fOut(0.0),
- fQLong(0.0),
- fMt(0.0),
- fMtNotCalc(kTRUE),
- fInvMassSqr(0.0),
- fMassSqrNotCalc(kTRUE),
- fQInvL(0.0),
- fQInvLNotCalc(kTRUE),
+ AliAODPair(rev),
  fWeight(0.0),
- fWeightNotCalc(kTRUE),
- fAvarageDistance(0.0),
- fAvarageDistanceNotCalc(kTRUE),
- fPxSum(0.0),
- fPySum(0.0),
- fPzSum(0.0),
- fESum(0.0),
- fSumsNotCalc(kTRUE),
- fPxDiff(0.0),
- fPyDiff(0.0),
- fPzDiff(0.0),
- fEDiff(0.0),
- fDiffsNotCalc(kTRUE),
- fGammaCMSLC(0.0),
- fGammaCMSLCNotCalc(kTRUE),
- fChanged(kTRUE)
+ fWeightNotCalc(kTRUE)
  {
-//value of rev defines if it is Swaped
-//if you pass kTRUE swpaped pair will NOT be created
-//though you wont be able to get the swaped pair from this pair
-
-  if(!rev) fSwapedPair = new AliHBTPair(kTRUE); //if false create swaped pair
+//Constructor
   
  }
 /************************************************************************/
 
-AliHBTPair::AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev):
- fPart1(part1),
- fPart2(part2),
- fSwapedPair(0x0),
- fQSideCMSLC(0.0),
- fQSideCMSLCNotCalc(kTRUE),
- fQOutCMSLC(0.0),
- fQOutCMSLCNotCalc(kTRUE),
- fQLongCMSLC(0.0),
- fQLongCMSLCNotCalc(kTRUE),
- fQInv(0.0),
- fQInvNotCalc(kTRUE),
- fInvMass(0.0),
- fInvMassNotCalc(kTRUE),
- fKt(0.0),
- fKtNotCalc(kTRUE),
- fKStar(0.0),
- fKStarNotCalc(kTRUE),
- fPInv(0.0),
- fQSide(0.0),
- fOut(0.0),
- fQLong(0.0),
- fMt(0.0),
- fMtNotCalc(kTRUE),
- fInvMassSqr(0.0),
- fMassSqrNotCalc(kTRUE),
- fQInvL(0.0),
- fQInvLNotCalc(kTRUE),
+AliHBTPair::AliHBTPair(AliVAODParticle* part1, AliVAODParticle* part2, Bool_t rev):
+ AliAODPair(part1,part2,rev),
  fWeight(0.0),
- fWeightNotCalc(kTRUE),
- fAvarageDistance(0.0),
- fAvarageDistanceNotCalc(kTRUE),
- fPxSum(0.0),
- fPySum(0.0),
- fPzSum(0.0),
- fESum(0.0),
- fSumsNotCalc(kTRUE),
- fPxDiff(0.0),
- fPyDiff(0.0),
- fPzDiff(0.0),
- fEDiff(0.0),
- fDiffsNotCalc(kTRUE),
- fGammaCMSLC(0.0),
- fGammaCMSLCNotCalc(kTRUE),
- fChanged(kTRUE)
+ fWeightNotCalc(kTRUE)
  {
-//value of rev defines if it is Swaped
-//if you pass kTRUE swpaped pair will NOT be created
-//though you wont be able to get the swaped pair from this pair
-
-  if(!rev) fSwapedPair = new AliHBTPair(part2,part1,kTRUE); //if false create swaped pair
+//constructor
   
  }
 /************************************************************************/
 AliHBTPair::AliHBTPair(const AliHBTPair& in):
- TObject(in),
- fPart1(0x0),
- fPart2(0x0),
- fSwapedPair(0x0),
- fQSideCMSLC(0.0),
- fQSideCMSLCNotCalc(kTRUE),
- fQOutCMSLC(0.0),
- fQOutCMSLCNotCalc(kTRUE),
- fQLongCMSLC(0.0),
- fQLongCMSLCNotCalc(kTRUE),
- fQInv(0.0),
- fQInvNotCalc(kTRUE),
- fInvMass(0.0),
- fInvMassNotCalc(kTRUE),
- fKt(0.0),
- fKtNotCalc(kTRUE),
- fKStar(0.0),
- fKStarNotCalc(kTRUE),
- fPInv(0.0),
- fQSide(0.0),
- fOut(0.0),
- fQLong(0.0),
- fMt(0.0),
- fMtNotCalc(kTRUE),
- fInvMassSqr(0.0),
- fMassSqrNotCalc(kTRUE),
- fQInvL(0.0),
- fQInvLNotCalc(kTRUE),
- fWeight(0.0),
- fWeightNotCalc(kTRUE),
- fAvarageDistance(0.0),
- fAvarageDistanceNotCalc(kTRUE),
- fPxSum(0.0),
- fPySum(0.0),
- fPzSum(0.0),
- fESum(0.0),
- fSumsNotCalc(kTRUE),
- fPxDiff(0.0),
- fPyDiff(0.0),
- fPzDiff(0.0),
- fEDiff(0.0),
- fDiffsNotCalc(kTRUE),
- fGammaCMSLC(0.0),
- fGammaCMSLCNotCalc(kTRUE),
- fChanged(kTRUE)
+ AliAODPair(in),
+ fWeight(in.fWeight),
+ fWeightNotCalc(in.fWeightNotCalc)
 {
  //cpy constructor
- in.Copy(*this);
 }
 /************************************************************************/
 
@@ -187,227 +53,6 @@ AliHBTPair& AliHBTPair::operator=(const AliHBTPair& in)
 }
 /************************************************************************/
 
-Double_t AliHBTPair::GetInvMass()
-{
-//Returns qinv value for a pair
-  if(fInvMassNotCalc)
-   {
-     CalculateInvMassSqr(); //method is inline so we not waste th time for jumping into method 
-     
-     if(fInvMassSqr<0)  fInvMass = TMath::Sqrt(-fInvMassSqr);
-     else fInvMass = TMath::Sqrt(fInvMassSqr); 
-     
-     fInvMassNotCalc = kFALSE;
-   }
-  return fInvMass;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetQSideCMSLC()
-{
-//return Q Side in Central Of Mass System in Longitudialy Comoving Frame
-  if (fQSideCMSLCNotCalc)
-   {
-    fQSideCMSLC = (fPart1->Px()*fPart2->Py()-fPart2->Px()*fPart1->Py())/GetKt();
-    fQSideCMSLCNotCalc = kFALSE;
-   }
-  return fQSideCMSLC;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetQOutCMSLC()
-{
- //caculates Qout in Center Of Mass Longitudionally Co-Moving
- if(fQOutCMSLCNotCalc)
-  {
-   CalculateSums();
-   CalculateDiffs();
-
-   if (fPart1->GetMass() != fPart2->GetMass())
-    {
-/*    
-      //STAR algorithm
-      Double_t beta  = fPzSum/fESum;
-      Double_t gamma = GetGammaToCMSLC();
-      Double_t el = gamma * (fPart1->Energy() - beta * fPart1->Pz());
-      Double_t x  = ( fPart1->Px()*fPxSum + fPart1->Py()*fPySum) / ( 2.0*GetKt() );
-      beta  = 2.0*GetKt()/GetMt();
-      gamma = GetMt()/GetQInv();
-      fQOutCMSLC = gamma * (x - beta * el);
-*/
-
-      //beta=fPzSum/fESum;    // Longit. V == beta
-      Double_t beta=fPzSum/fESum;
-      Double_t gamma = GetGammaToCMSLC();
-      
-      Double_t cosphi=fPxSum/(2.0*GetKt());  // cos(phi)
-      Double_t sinphi=fPySum/(2.0*GetKt()); // sin(phi)
-      
-//      ROTATE(part1Px,part1Py,SPHI,CPHI,part1Px,part1Py);//ROT8
-//      ROTATE(part2Px,part2Py,SPHI,CPHI,part2Px,part2Py);//ROT8
-      Double_t tmp;
-      tmp = fPart1->Px()*cosphi + fPart1->Py()*sinphi;
-      Double_t part1Py = fPart1->Py()*cosphi - fPart1->Px()*sinphi;
-      Double_t part1Px = tmp;
-
-      tmp = fPart2->Px()*cosphi + fPart2->Py()*sinphi;
-      Double_t part2Py = fPart2->Py()*cosphi - fPart2->Px()*sinphi;
-      Double_t part2Px = tmp;
-      
-      
-//      LTR(part1Pz,E1,beta,GetGammaToCMSLC(),part1Pz,E1a);
-//      LTR(part2Pz,E2,beta,GetGammaToCMSLC(),part2Pz,E2a);
-      Double_t part1Pz=gamma*(fPart1->Pz()-beta*fPart1->Energy());
-      Double_t part2Pz=gamma*(fPart2->Pz()-beta*fPart2->Energy());
-
-      Double_t part1P2=part1Px*part1Px+part1Py*part1Py+part1Pz*part1Pz;
-      Double_t part2P2=part2Px*part2Px+part2Py*part2Py+part2Pz*part2Pz;
-      Double_t part1E=TMath::Sqrt(fPart1->GetMass()*fPart1->GetMass()+part1P2);
-      Double_t part2E=TMath::Sqrt(fPart2->GetMass()*fPart2->GetMass()+part2P2);
-      Double_t sumE=part1E+part2E;
-      Double_t sumPx=part1Px+part2Px;
-      Double_t sumPy=part1Py+part2Py;
-      Double_t sumPZ=part1Pz+part2Pz;
-      Double_t sumP2=sumPx*sumPx+sumPy*sumPy+sumPZ*sumPZ;
-
-      Double_t relmass=TMath::Sqrt(sumE*sumE-sumP2);
-      Double_t hf = (fPart1->GetMass()*fPart1->GetMass() - fPart2->GetMass()*fPart2->GetMass())/(relmass*relmass);
-      fQOutCMSLC=(part1Px-part2Px);//== id
-      fQOutCMSLC=fQOutCMSLC-sumPx*hf; //sumPx == fPxSum ale po rotacji i transf
-    }
-   else
-    {
-      Double_t k2 = fPxSum*fPxDiff+fPySum*fPyDiff;
-      fQOutCMSLC = 0.5*k2/GetKt();
-   // if (non-id)  fQOutCMSLC=fQOutCMSLC - sumPx*HF;
-    }
-
-    
-   fQOutCMSLCNotCalc = kFALSE;
-  }
- return fQOutCMSLC;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetQLongCMSLC()
-{
- //return Q Long in Central Of Mass System in Longitudialy Comoving Frame
- if (fQLongCMSLCNotCalc)
-  {
-    CalculateSums();
-    CalculateDiffs();
-    Double_t beta = fPzSum/fESum;
-    fQLongCMSLC = GetGammaToCMSLC() * ( fPzDiff - beta*fEDiff );
-    fQLongCMSLCNotCalc = kFALSE;
-  }
- return fQLongCMSLC; 
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetKt()
-{
- //calculates the evarage momentum of the pair
-  if(fKtNotCalc)
-   { 
-     CalculateSums();
-     fKt =  0.5*TMath::Hypot(fPxSum,fPySum);
-     fKtNotCalc = kFALSE;
-   }
-  return fKt;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetKStar()
-{
-  //calculates invariant velocity difference
-  if (fKStarNotCalc)
-   { 
-    CalculateSums();
-
-    Double_t ptrans = fPxSum*fPxSum + fPySum*fPySum;
-    Double_t mtrans = fESum*fESum - fPzSum*fPzSum;
-    if (ptrans > mtrans)
-     {
-       Error("GetKStar","Tranverse momentum bigger than transverse mass. Not normal for on-shell particles");
-       Error("GetKStar","Particle1:");
-       fPart1->Print();
-       Error("GetKStar","Particle2:");
-       fPart2->Print();
-       Error("GetKStar","");
-       
-       fKStar = 10e5;
-       fKStarNotCalc = kFALSE;
-       return fKStar;
-     }
-    Double_t pinv =   TMath::Sqrt(mtrans - ptrans);
-
-    Double_t q = (fPart1->GetMass()*fPart1->GetMass() - fPart2->GetMass()*fPart2->GetMass())/pinv;
-    
-    CalculateQInvL();
-    
-    q = q*q - fQInvL;
-    if ( q < 0)
-     {
-       Info("GetKStar","Sqrt of negative number q = %f",q);
-       Error("GetKStar","Particle1:");
-       fPart1->Print();
-       Error("GetKStar","Particle2:");
-       fPart2->Print();
-       fKStar = 10e5;
-       fKStarNotCalc = kFALSE;
-       return fKStar;
-     }
-     
-    q = TMath::Sqrt(q);
-    fKStar = q/2.;
-    fKStarNotCalc = kFALSE;
-   }
-  return fKStar;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetQInv()
-{
-//returns Qinv 
-//warning for non-id particles you want to use 2*KStar
-  if(fQInvNotCalc)
-   {
-    CalculateQInvL();
-    fQInv = TMath::Sqrt(TMath::Abs(fQInvL));
-    fQInvNotCalc = kFALSE;
-   }
-  return fQInv;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetGammaToCMSLC()
-{
-  //calculates gamma factor of the boost to CMSLC
-  if(fGammaCMSLCNotCalc)
-   {
-     CalculateSums();
-     Double_t beta = fPzSum/fESum;
-     fGammaCMSLC = 1.0/TMath::Sqrt(1.0 - beta*beta);
-     fGammaCMSLCNotCalc = kFALSE;
-   }
-  return fGammaCMSLC;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::GetMt()
-{
-  //Calculates transverse mass of the pair
-  if (fMtNotCalc)
-   {
-     CalculateSums();
-     fMt = TMath::Sqrt(fESum*fESum - fPzSum*fPzSum);
-     fMtNotCalc = kFALSE;
-   }
-   return fMt;
-}
-/************************************************************************/
-
 Double_t AliHBTPair::GetWeight()
 {
   //returns and buffers weight for this pair
@@ -419,39 +64,3 @@ Double_t AliHBTPair::GetWeight()
   return fWeight; 
 }
 /************************************************************************/
-
-Double_t AliHBTPair::GetAvarageDistance()
-{
-//returns and buffers avarage distance between two tracks calculated 
-// out of track points (see AliHBTTrackPoints class)
-
-  if (fAvarageDistanceNotCalc)
-   {
-     fAvarageDistance = AvDistance();
-     fAvarageDistanceNotCalc = kFALSE;
-   }
-  return fAvarageDistance;
-}
-/************************************************************************/
-
-Double_t AliHBTPair::AvDistance()
-{
-  //returns avarage distance between two tracks in range 
-  //as defined in Track-Points of AliHBTParticle
-  //returns negative value if error uccured f.g. tracks do not have track-points
-  AliHBTTrackPoints* tpts1 = fPart1->GetTrackPoints();
-  if ( tpts1 == 0x0)
-   {//it could be simulated pair
-//     Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
-     return -1.0;
-   }
-
-  AliHBTTrackPoints* tpts2 = fPart2->GetTrackPoints();
-  if ( tpts2 == 0x0)
-   {
-//     Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
-     return -1.0;
-   }
-
-  return tpts1->AvarageDistance(*tpts2);
-}
index 48564ea..9eabdb5 100644 (file)
 //
 ////////////////////////////////////////////////////////////////////////////
 
-#include <TObject.h>
-#include "AliHBTParticle.h"
+#include <AliAODPair.h>
 
+class AliVAODParticle;
 
-class AliHBTPair: public TObject
+class AliHBTPair: public AliAODPair
 {
  public:
    AliHBTPair(Bool_t rev = kFALSE); //contructor
-   AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev = kFALSE); //contructor
+   AliHBTPair(AliVAODParticle* part1, AliVAODParticle* part2, Bool_t rev = kFALSE); //contructor
    AliHBTPair(const AliHBTPair& in);
    
    virtual ~AliHBTPair(){}
    
    AliHBTPair& operator=(const AliHBTPair& in);
-   
-   void SetParticles(AliHBTParticle* p1,AliHBTParticle* p2); //sets particles in the pair
-   AliHBTPair* GetSwapedPair() {return fSwapedPair;} //returns pair with swapped particles
-   
-   AliHBTParticle* Particle1() const {return fPart1;} //returns pointer to first particle
-   AliHBTParticle* Particle2() const {return fPart2;} //returns pointer to decond particle
-   
-   void Changed();
-   //Center Mass System - Longitudinally Comoving
-   
-   virtual Double_t GetInvMass(); //returns invariant mass of the pair
-   virtual Double_t GetMt();
-   virtual Double_t GetQInv(); //returns Q invariant
-   virtual Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
-   virtual Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
-   virtual Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
-   
-   
-   virtual Double_t GetKt();  //returns K transverse
-   virtual Double_t GetKStar();
-   
-   virtual Double_t GetAvarageDistance();//returns avarage distnace between two tracks
-   
-   virtual Double_t GetDeltaP(); //return difference of momenta
-   virtual Double_t GetDeltaPt();
-   virtual Double_t GetDeltaPx();
-   virtual Double_t GetDeltaPy();
-   virtual Double_t GetDeltaPz();
-   
-   virtual Double_t GetDeltaTheta();
-   virtual Double_t GetDeltaPhi();
-   
-   virtual Double_t GetGammaToCMSLC();
-   virtual Double_t GetWeight();
-   virtual Double_t GetPIDProb() const {return fPart1->GetPidProb()*fPart2->GetPidProb();}
-   
- protected:
-   AliHBTParticle* fPart1;  //pointer to first particle
-   AliHBTParticle* fPart2;  //pointer to second particle
-  
-   AliHBTPair* fSwapedPair; //pointer to swapped pair
-   
-/************************************************************/
-/************CMS (LC) Q's   *********************************/
-/************************************************************/
-   //Center Mass System - Longitudinally Comoving
-   
-   Double_t fQSideCMSLC;  //value of Q side CMS longitudially co-moving
-   Bool_t   fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair
-   
-   Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving
-   Bool_t   fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair
-   
-   Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving
-   Bool_t   fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair
-/************************************************************/
-/************************************************************/
-   Double_t fQInv;  //half of differnece of 4-momenta
-   Bool_t   fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
-   
-   Double_t fInvMass;  //invariant mass
-   Bool_t   fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
-   
-   Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
-   Bool_t   fKtNotCalc;//flag indicating if fKt is already calculated for this pair
-   
-   Double_t fKStar; // KStar
-   Bool_t   fKStarNotCalc;// flag indicating if fKStar is calculated
-   
-   Double_t fPInv;  //invariant momentum
-   
-   Double_t fQSide; //Q Side
-   Double_t fOut;//Q Out
-   Double_t fQLong;//Q Long
 
-   Double_t fMt;//Transverse coordinate of Inv. Mass
-   Bool_t   fMtNotCalc;//flag indicating if Mt is calculated for current pair
-      
-   Double_t fInvMassSqr;//squre of invariant mass
-   Bool_t   fMassSqrNotCalc; //flag indicating if fInvMassSqr for this pair
-   void     CalculateInvMassSqr();
+   void     Changed();
+   Double_t GetWeight();
    
-   Double_t fQInvL; //Qinv in longitudional direction
-   Bool_t   fQInvLNotCalc;//flag indicating if fQInvL is calculated for current pair
-   void     CalculateQInvL();
+ protected:
 
    Double_t fWeight;//Value of the weight
    Bool_t   fWeightNotCalc;//flag indicating if fWeight is calculated for current pair
    
-   Double_t fAvarageDistance;//value of the avarage distance calculated out of track points
-   Bool_t   fAvarageDistanceNotCalc;//flag indicating if the avarage distance is calculated
-   
-   Double_t fPxSum;// Sum of Px momenta
-   Double_t fPySum;// Sum of Py momenta
-   Double_t fPzSum;// Sum of Pz momenta
-   Double_t fESum;// Sum of energies
-   Bool_t   fSumsNotCalc;//flag indicating if fPxSum,fPxSum,fPxSum and fESum is calculated for current pair
-   void     CalculateSums();
-   
-   Double_t fPxDiff;// Difference of Px momenta
-   Double_t fPyDiff;// Difference of Px momenta
-   Double_t fPzDiff;// Difference of Px momenta
-   Double_t fEDiff;// Difference of Px momenta
-   Bool_t   fDiffsNotCalc;//flag indicating if fPxDiff,fPxDiff,fPxDiff and fEDiff is calculated for current pair
-   void     CalculateDiffs();
-   
-   Double_t fGammaCMSLC;//gamma of boost in CMSLC
-   Bool_t   fGammaCMSLCNotCalc;//flag indicating if fGammaCMSLC is calculated for current pair
-   /***************************************************/
-   Bool_t   fChanged;//flag indicating if object has been changed
-
-   void     CalculateBase();
-   Double_t AvDistance();
-   
-   
  private:
   ClassDef(AliHBTPair,1)
 };
-/****************************************************************/
-inline
-void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
-{
- //sets the particle to the pair
- fPart1 = p1;
- fPart2 = p2;
- if (fSwapedPair) //if we have Swaped (so we are not)
-   fSwapedPair->SetParticles(p2,p1); //set particles for him too
- Changed();
- //and do nothing until will be asked for
-} 
-/****************************************************************/
 
 inline
 void AliHBTPair::Changed()
 {
  // Resel all calculations (flags)
- fChanged           = kTRUE;
- fSumsNotCalc       = kTRUE;
- fDiffsNotCalc      = kTRUE;
- fMassSqrNotCalc    = kTRUE;
- fInvMassNotCalc    = kTRUE;
- fQInvNotCalc       = kTRUE;
- fMtNotCalc         = kTRUE;
- fQSideCMSLCNotCalc = kTRUE;
- fQOutCMSLCNotCalc  = kTRUE;
- fQLongCMSLCNotCalc = kTRUE;
- fKtNotCalc         = kTRUE;
- fKStarNotCalc      = kTRUE;
- fQInvLNotCalc      = kTRUE;
- fGammaCMSLCNotCalc = kTRUE;
- fWeightNotCalc = kTRUE;
- fAvarageDistanceNotCalc = kTRUE;
-}
-/****************************************************************/
-inline 
-void AliHBTPair::CalculateInvMassSqr()
- {
-  //calculates square of qinv
-  if (fMassSqrNotCalc)
-   {
-     CalculateSums();
-     Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
  
-     fInvMassSqr=fESum*fESum-fPart12s;
-
-     fMassSqrNotCalc = kFALSE;
-   }
- }
-/****************************************************************/
-inline 
-void AliHBTPair::CalculateQInvL()
- {
- //Calculates square root of Qinv
-  if (fQInvLNotCalc)
-  {
-   CalculateDiffs();
-   fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
-   fQInvLNotCalc = kFALSE;
-  }
- }
-/****************************************************************/ 
-inline 
-void AliHBTPair::CalculateSums()
- {
-   //calculates momenta and energy sums
-   if(fSumsNotCalc)
-    {
-     fPxSum = fPart1->Px()+fPart2->Px();
-     fPySum = fPart1->Py()+fPart2->Py();
-     fPzSum = fPart1->Pz()+fPart2->Pz();
-     fESum  = fPart1->Energy() + fPart2->Energy();
-     fSumsNotCalc = kFALSE;
-    }
- }
-/****************************************************************/
-inline 
-void AliHBTPair::CalculateDiffs()
- {
-   //calculates momenta and energy differences 
-   if(fDiffsNotCalc)
-    {
-     fPxDiff = fPart1->Px()-fPart2->Px();
-     fPyDiff = fPart1->Py()-fPart2->Py();
-     fPzDiff = fPart1->Pz()-fPart2->Pz();
-     fEDiff  = fPart1->Energy() - fPart2->Energy();
-     fDiffsNotCalc = kFALSE;
-    }
- }
-
-/****************************************************************/
-inline 
-Double_t AliHBTPair::GetDeltaP() //return difference of momenta
-{
- //returns difference of momenta (length of vector)
- CalculateDiffs();
- return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
+ AliAODPair::Changed();
+ fWeightNotCalc = kTRUE;
 }
-/****************************************************************/
-
-inline 
-Double_t AliHBTPair::GetDeltaPt()
- {
-   //returns difference of Pz
-   return fPart1->Pt()-fPart2->Pt();
- }
-/****************************************************************/
-
-inline 
-Double_t AliHBTPair::GetDeltaPx()
- {
-   //returns difference of Pz
-   CalculateDiffs();
-   return fPxDiff;
- }
-/****************************************************************/
-inline 
-Double_t AliHBTPair::GetDeltaPy()
- {
-   //returns difference of Py
-   CalculateDiffs();
-   return fPyDiff;
- }
-
-/****************************************************************/
-inline 
-Double_t AliHBTPair::GetDeltaPz()
- {
-   //returns difference of Pz
-   CalculateDiffs();
-   return fPzDiff;
- }
-/****************************************************************/
-
-inline 
-Double_t AliHBTPair::GetDeltaPhi()
- {
-   //returns difference of Phi
-   Double_t phi1 = fPart1->Phi();
-   Double_t phi2 = fPart2->Phi();
-   Double_t diff = phi1-phi2;
-   if (TMath::Abs(diff) > TMath::Pi())
-    {
-      if (phi1 > TMath::Pi())
-       {
-         phi1-=TMath::TwoPi();
-       }
-      else
-       {
-         phi2-=TMath::TwoPi();
-       }
-      diff = phi1-phi2; 
-    }
-   return diff;
- }
-/****************************************************************/
-
-inline 
-Double_t AliHBTPair::GetDeltaTheta()
- {
-   //returns difference of Theta
-   return fPart1->Theta()-fPart2->Theta();
- }
-/****************************************************************/
-
-
 #endif
index aa7ea4a..4b0b38f 100644 (file)
@@ -201,27 +201,27 @@ void AliHBTPairCut::SetQInvRange(Double_t min, Double_t max)
 void AliHBTPairCut::SetQOutCMSLRange(Double_t min, Double_t max)
 {
   // set range of accepted QOut in CMS
-  AliHBTQOutCMSLCCut* cut= (AliHBTQOutCMSLCCut*)FindCut(kHbtPairCutPropQOutCMSLC);
+  AliHBTQOutLCMSCut* cut= (AliHBTQOutLCMSCut*)FindCut(kHbtPairCutPropQOutLCMS);
   if(cut) cut->SetRange(min,max);
-  else fCuts[fNCuts++] = new AliHBTQOutCMSLCCut(min,max);
+  else fCuts[fNCuts++] = new AliHBTQOutLCMSCut(min,max);
 }
 
 /**********************************************************/
 void AliHBTPairCut::SetQSideCMSLRange(Double_t min, Double_t max)
 {
   // set range of accepted QSide in CMS
-  AliHBTQSideCMSLCCut* cut= (AliHBTQSideCMSLCCut*)FindCut(kHbtPairCutPropQSideCMSLC);
+  AliHBTQSideLCMSCut* cut= (AliHBTQSideLCMSCut*)FindCut(kHbtPairCutPropQSideLCMS);
   if(cut) cut->SetRange(min,max);
-  else fCuts[fNCuts++] = new AliHBTQSideCMSLCCut(min,max);
+  else fCuts[fNCuts++] = new AliHBTQSideLCMSCut(min,max);
 }
 
 /**********************************************************/
 void AliHBTPairCut::SetQLongCMSLRange(Double_t min, Double_t max)
 {
   // set range of accepted QLong in CMS
-  AliHBTQLongCMSLCCut* cut= (AliHBTQLongCMSLCCut*)FindCut(kHbtPairCutPropQLongCMSLC);
+  AliHBTQLongLCMSCut* cut= (AliHBTQLongLCMSCut*)FindCut(kHbtPairCutPropQLongLCMS);
   if(cut) cut->SetRange(min,max);
-  else fCuts[fNCuts++] = new AliHBTQLongCMSLCCut(min,max);
+  else fCuts[fNCuts++] = new AliHBTQLongLCMSCut(min,max);
 }
 
 /**********************************************************/
@@ -358,9 +358,9 @@ void AliHBTEmptyPairCut::Streamer(TBuffer &b)
 ClassImp(AliHbtBasePairCut)
 ClassImp(AliHBTQInvCut)
 ClassImp(AliHBTKtCut)
-ClassImp(AliHBTQSideCMSLCCut)
-ClassImp(AliHBTQOutCMSLCCut)
-ClassImp(AliHBTQLongCMSLCCut)
+ClassImp(AliHBTQSideLCMSCut)
+ClassImp(AliHBTQOutLCMSCut)
+ClassImp(AliHBTQLongLCMSCut)
 
 /******************************************************************/
 ClassImp(AliHBTAvSeparationCut)
@@ -495,7 +495,7 @@ Bool_t AliHBTOutSideSameSignCut::Pass(AliHBTPair *p) const
 {
   //returns kTRUE if pair DO NOT meet cut criteria
   
-  if ( p->GetQOutCMSLC()*p->GetQSideCMSLC() > 0 ) 
+  if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 ) 
    {
      return kFALSE;//accpeted
    }
@@ -509,7 +509,7 @@ Bool_t AliHBTOutSideDiffSignCut::Pass(AliHBTPair *p) const
 {
   //returns kTRUE if pair DO NOT meet cut criteria
   
-  if ( p->GetQOutCMSLC()*p->GetQSideCMSLC() > 0 ) 
+  if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 ) 
    {
      return kTRUE;//rejected
    }
index 2279bc6..a73cf27 100644 (file)
@@ -18,9 +18,9 @@ enum AliHBTPairCutProperty
   kHbtPairCutPropQInv, //Q invariant
   kHbtPairCutPropKt,
   kHbtPairCutPropKStar,
-  kHbtPairCutPropQSideCMSLC,
-  kHbtPairCutPropQOutCMSLC,
-  kHbtPairCutPropQLongCMSLC,
+  kHbtPairCutPropQSideLCMS,
+  kHbtPairCutPropQOutLCMS,
+  kHbtPairCutPropQLongLCMS,
   kHbtPairCutPropDeltaPhi,
   kHbtPairCutPropDeltaTheta,
   kHbtPairCutPropDeltaP,
@@ -190,46 +190,46 @@ class AliHBTKStarCut: public AliHbtBasePairCut
 };
 /******************************************************************/
 
-class AliHBTQSideCMSLCCut: public AliHbtBasePairCut
+class AliHBTQSideLCMSCut: public AliHbtBasePairCut
 {
  public:
-  AliHBTQSideCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
-    AliHbtBasePairCut(min,max,kHbtPairCutPropQSideCMSLC){}
-  virtual ~AliHBTQSideCMSLCCut(){}
+  AliHBTQSideLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliHbtBasePairCut(min,max,kHbtPairCutPropQSideLCMS){}
+  virtual ~AliHBTQSideLCMSCut(){}
  protected:
   virtual Double_t  GetValue(AliHBTPair* pair) const 
-    {return pair->GetQSideCMSLC();}
+    {return pair->GetQSideLCMS();}
 
-  ClassDef(AliHBTQSideCMSLCCut,1)
+  ClassDef(AliHBTQSideLCMSCut,1)
 };
 /******************************************************************/
 
 
-class AliHBTQOutCMSLCCut: public AliHbtBasePairCut
+class AliHBTQOutLCMSCut: public AliHbtBasePairCut
 {
  public:
-  AliHBTQOutCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
-    AliHbtBasePairCut(min,max,kHbtPairCutPropQOutCMSLC){}
-  virtual ~AliHBTQOutCMSLCCut(){}
+  AliHBTQOutLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliHbtBasePairCut(min,max,kHbtPairCutPropQOutLCMS){}
+  virtual ~AliHBTQOutLCMSCut(){}
  protected:
   virtual Double_t  GetValue(AliHBTPair* pair) const 
-    {return pair->GetQOutCMSLC();}
+    {return pair->GetQOutLCMS();}
   
-  ClassDef(AliHBTQOutCMSLCCut,1)
+  ClassDef(AliHBTQOutLCMSCut,1)
 };
 /******************************************************************/
 
-class AliHBTQLongCMSLCCut: public AliHbtBasePairCut
+class AliHBTQLongLCMSCut: public AliHbtBasePairCut
 {
  public:
-  AliHBTQLongCMSLCCut(Double_t min = 0.0, Double_t max = 0.0):
-    AliHbtBasePairCut(min,max,kHbtPairCutPropQLongCMSLC){}
-  virtual ~AliHBTQLongCMSLCCut(){}
+  AliHBTQLongLCMSCut(Double_t min = 0.0, Double_t max = 0.0):
+    AliHbtBasePairCut(min,max,kHbtPairCutPropQLongLCMS){}
+  virtual ~AliHBTQLongLCMSCut(){}
  protected:
   virtual Double_t  GetValue(AliHBTPair* pair) const 
-    {return pair->GetQLongCMSLC();}
+    {return pair->GetQLongLCMS();}
 
-  ClassDef(AliHBTQLongCMSLCCut,1)
+  ClassDef(AliHBTQLongLCMSCut,1)
 };
 /******************************************************************/
 
index 2721cc9..ae6a2d1 100644 (file)
@@ -3,14 +3,14 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // 
-// class AliHBTQInvDistributionVsKtFctn;    //QInvCMSLC   Distribution Vs   Kt
-// class AliHBTQOutDistributionVsKtFctn;    //QOutCMSLC   Distribution Vs   Kt
-// class AliHBTQSideDistributionVsKtFctn;   //QSideCMSLC  Distribution Vs   Kt
-// class AliHBTQLongDistributionVsKtFctn;   //QLongCMSLC  Distribution Vs   Kt
+// class AliHBTQInvDistributionVsKtFctn;    //QInvLCMS   Distribution Vs   Kt
+// class AliHBTQOutDistributionVsKtFctn;    //QOutLCMS   Distribution Vs   Kt
+// class AliHBTQSideDistributionVsKtFctn;   //QSideLCMS  Distribution Vs   Kt
+// class AliHBTQLongDistributionVsKtFctn;   //QLongLCMS  Distribution Vs   Kt
 
-// class AliHBTQOutDistributionVsQInvFctn;    //QOutCMSLC   Distribution Vs   QInv
-// class AliHBTQSideDistributionVsQInvFctn;   //QSideCMSLC  Distribution Vs   QInv
-// class AliHBTQLongDistributionVsQInvFctn;   //QLongCMSLC  Distribution Vs   QInv
+// class AliHBTQOutDistributionVsQInvFctn;    //QOutLCMS   Distribution Vs   QInv
+// class AliHBTQSideDistributionVsQInvFctn;   //QSideLCMS  Distribution Vs   QInv
+// class AliHBTQLongDistributionVsQInvFctn;   //QLongLCMS  Distribution Vs   QInv
 // class AliHBTPtDiffDistributionVsQInvFctn;
 //
 // added by Zbigniew.Chajecki@cern.ch
 //
 /////////////////////////////////////////////////////////////////////////////
 
-class AliHBTQInvDistributionVsKtFctn;    //QInvCMSLC   Distribution Vs   Kt
-class AliHBTQOutDistributionVsKtFctn;    //QOutCMSLC   Distribution Vs   Kt
-class AliHBTQSideDistributionVsKtFctn;   //QSideCMSLC  Distribution Vs   Kt
-class AliHBTQLongDistributionVsKtFctn;   //QLongCMSLC  Distribution Vs   Kt
+class AliHBTQInvDistributionVsKtFctn;    //QInvLCMS   Distribution Vs   Kt
+class AliHBTQOutDistributionVsKtFctn;    //QOutLCMS   Distribution Vs   Kt
+class AliHBTQSideDistributionVsKtFctn;   //QSideLCMS  Distribution Vs   Kt
+class AliHBTQLongDistributionVsKtFctn;   //QLongLCMS  Distribution Vs   Kt
 
-class AliHBTQOutDistributionVsQInvFctn;    //QOutCMSLC   Distribution Vs   QInv
-class AliHBTQSideDistributionVsQInvFctn;   //QSideCMSLC  Distribution Vs   QInv
-class AliHBTQLongDistributionVsQInvFctn;   //QLongCMSLC  Distribution Vs   QInv
+class AliHBTQOutDistributionVsQInvFctn;    //QOutLCMS   Distribution Vs   QInv
+class AliHBTQSideDistributionVsQInvFctn;   //QSideLCMS  Distribution Vs   QInv
+class AliHBTQLongDistributionVsQInvFctn;   //QLongLCMS  Distribution Vs   QInv
 class AliHBTPtDiffDistributionVsQInvFctn;
 
 #include "AliHBTFunction.h"
@@ -41,7 +41,7 @@ class AliHBTQOutDistributionVsKtFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQOutCMSLC();
+     y = partpair->GetQOutLCMS();
      x = partpair->GetKt();
     }
   protected:
@@ -58,7 +58,7 @@ class AliHBTQSideDistributionVsKtFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQSideCMSLC();
+     y = partpair->GetQSideLCMS();
      x = partpair->GetKt();
     }
   protected:
@@ -76,7 +76,7 @@ class AliHBTQLongDistributionVsKtFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQLongCMSLC();
+     y = partpair->GetQLongLCMS();
      x = partpair->GetKt();
     }
   protected:
@@ -112,7 +112,7 @@ class AliHBTQOutDistributionVsQInvFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQOutCMSLC();
+     y = partpair->GetQOutLCMS();
      x = partpair->GetQInv();
     }
   protected:
@@ -129,7 +129,7 @@ class AliHBTQSideDistributionVsQInvFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQSideCMSLC();
+     y = partpair->GetQSideLCMS();
      x = partpair->GetQInv();
     }
   protected:
@@ -147,7 +147,7 @@ class AliHBTQLongDistributionVsQInvFctn: public AliHBTOnePairFctn2D
    TH1* GetResult(){return this->GetNumerator();}
    void GetValues(AliHBTPair* partpair, Double_t& x, Double_t& y) const
     {
-     y = partpair->GetQLongCMSLC();
+     y = partpair->GetQLongLCMS();
      x = partpair->GetQInv();
     }
   protected:
index 205a939..ecf23e7 100644 (file)
@@ -4,7 +4,7 @@
 ////////////////////////////////////////////////////////////////////
 //                                                                //
 // General Remark:                                                //
-// CMSLC means                                                    //
+// LCMS means                                                    //
 // Center of Mass System Longitudially Co-moving                  //
 //                                                                //
 //                                                                //
@@ -77,8 +77,8 @@ void AliHBTQOutResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* par
 {
   //returns Qoutsim-Qoutrec for y
   //returns Qinv for x
-  Double_t tqout = trackpair->GetQOutCMSLC();
-  y = partpair->GetQOutCMSLC() - tqout;
+  Double_t tqout = trackpair->GetQOutLCMS();
+  y = partpair->GetQOutLCMS() - tqout;
   if (tqout < 0.0) y = -y;
   x = partpair->GetQInv();
 }
@@ -103,8 +103,8 @@ void AliHBTQSideResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* pa
 {
   //returns Qsidesim-Qsiderec for y
   //returns Qinv for x
-  y = partpair->GetQSideCMSLC() - trackpair->GetQSideCMSLC();
-  if (trackpair->GetQSideCMSLC() < 0.0) y = -y;
+  y = partpair->GetQSideLCMS() - trackpair->GetQSideLCMS();
+  if (trackpair->GetQSideLCMS() < 0.0) y = -y;
   x = partpair->GetQInv();
 }
 
@@ -128,8 +128,8 @@ void AliHBTQLongResolVsQInvFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* pa
 {
   //returns Qlongsim-Qlongrec for y
   //returns Qinv for x
-  y = partpair->GetQLongCMSLC() - trackpair->GetQLongCMSLC();
-  if (trackpair->GetQLongCMSLC() < 0.0) y = -y;
+  y = partpair->GetQLongLCMS() - trackpair->GetQLongLCMS();
+  if (trackpair->GetQLongLCMS() < 0.0) y = -y;
   x = partpair->GetQInv();
 }
 
@@ -175,8 +175,8 @@ void AliHBTQOutResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partp
 {
   //returns Qoutsim-Qoutrec for y
   //returns Kt for x
-  y = partpair->GetQOutCMSLC() - trackpair->GetQOutCMSLC();
-  if (trackpair->GetQOutCMSLC() < 0.0) y = -y;
+  y = partpair->GetQOutLCMS() - trackpair->GetQOutLCMS();
+  if (trackpair->GetQOutLCMS() < 0.0) y = -y;
   x = partpair->GetKt();
 }
 
@@ -199,8 +199,8 @@ void AliHBTQSideResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* part
 {
   //returns Qsidesim-Qsiderec for y
   //returns Kt for x
-  y = partpair->GetQSideCMSLC() - trackpair->GetQSideCMSLC();
-  if (trackpair->GetQSideCMSLC() < 0.0) y = -y;
+  y = partpair->GetQSideLCMS() - trackpair->GetQSideLCMS();
+  if (trackpair->GetQSideLCMS() < 0.0) y = -y;
   x = partpair->GetKt();
 }
 
@@ -223,8 +223,8 @@ void AliHBTQLongResolVsKtFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* part
 {
   //returns Qlongsim-Qlongrec for y
   //returns Kt for x
-  y = partpair->GetQLongCMSLC() - trackpair->GetQLongCMSLC();
-  if (trackpair->GetQLongCMSLC() < 0.0) y = -y;
+  y = partpair->GetQLongLCMS() - trackpair->GetQLongLCMS();
+  if (trackpair->GetQLongLCMS() < 0.0) y = -y;
   x = partpair->GetKt();
 }
 /******************************************************************/
@@ -246,8 +246,8 @@ AliHBTQOutResolVsQOutFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
 void AliHBTQOutResolVsQOutFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const
 {
 //returns values of the function
-  x = partpair->GetQOutCMSLC();
-  y = x - trackpair->GetQOutCMSLC();
+  x = partpair->GetQOutLCMS();
+  y = x - trackpair->GetQOutLCMS();
 }
  
 /******************************************************************/
@@ -268,8 +268,8 @@ AliHBTQSideResolVsQSideFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
 void AliHBTQSideResolVsQSideFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const
 {
 //returns values of the function
-  x = partpair->GetQSideCMSLC(); 
-  y = x - trackpair->GetQSideCMSLC();
+  x = partpair->GetQSideLCMS(); 
+  y = x - trackpair->GetQSideLCMS();
 }
 
 /******************************************************************/
@@ -290,8 +290,8 @@ AliHBTQLongResolVsQLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
 void AliHBTQLongResolVsQLongFctn::GetValues(AliHBTPair* trackpair, AliHBTPair* partpair, Double_t& x, Double_t& y) const
 {
 //returns values of the function
- x = partpair->GetQLongCMSLC(); 
- y = x - trackpair->GetQLongCMSLC();
+ x = partpair->GetQLongLCMS(); 
+ y = x - trackpair->GetQLongLCMS();
 }
 
 /******************************************************************/
index f53f214..67abd83 100644 (file)
@@ -4,7 +4,7 @@
 ////////////////////////////////////////////////////////////////////
 //                                                                //
 // General Remark:                                                //
-// CMSLC means                                                    //
+// LCMS means                                                    //
 // Center of Mass System Longitudially Co-moving                  //
 //                                                                //
 //                                                                //
 ////////////////////////////////////////////////////////////////////
 
 
-class AliHBTKtResolVsQInvFctn;  //Kt Res   Vs   QInvCMSLC 
+class AliHBTKtResolVsQInvFctn;  //Kt Res   Vs   QInvLCMS 
 
-class AliHBTQOutResolVsQInvFctn;  //QOutCMSLC  Res   Vs   QInvCMSLC 
-class AliHBTQSideResolVsQInvFctn; //QSideCMSLC Res   Vs   QInvCMSLC 
-class AliHBTQLongResolVsQInvFctn; //QLongCMSLC Res   Vs   QInvCMSLC 
-class AliHBTQInvResolVsQInvFctn;  //QInvCMSLC Res   Vs   QInvCMSLC 
+class AliHBTQOutResolVsQInvFctn;  //QOutLCMS  Res   Vs   QInvLCMS 
+class AliHBTQSideResolVsQInvFctn; //QSideLCMS Res   Vs   QInvLCMS 
+class AliHBTQLongResolVsQInvFctn; //QLongLCMS Res   Vs   QInvLCMS 
+class AliHBTQInvResolVsQInvFctn;  //QInvLCMS Res   Vs   QInvLCMS 
 
-class AliHBTPairThetaResolVsQInvFctn;//PairTheta Res   Vs   QInvCMSLC
-class AliHBTPairPhiResolVsQInvFctn;  //PairPhi   Res   Vs   QInvCMSLC
+class AliHBTPairThetaResolVsQInvFctn;//PairTheta Res   Vs   QInvLCMS
+class AliHBTPairPhiResolVsQInvFctn;  //PairPhi   Res   Vs   QInvLCMS
 
-class AliHBTQInvResolVsKtFctn;    //QInvCMSLC  Res   Vs   Kt
-class AliHBTQOutResolVsKtFctn;    //QOutCMSLC  Res   Vs   Kt
-class AliHBTQSideResolVsKtFctn;   //QSideCMSLC Res   Vs   Kt
-class AliHBTQLongResolVsKtFctn;   //QLongCMSLC Res   Vs   Kt
+class AliHBTQInvResolVsKtFctn;    //QInvLCMS  Res   Vs   Kt
+class AliHBTQOutResolVsKtFctn;    //QOutLCMS  Res   Vs   Kt
+class AliHBTQSideResolVsKtFctn;   //QSideLCMS Res   Vs   Kt
+class AliHBTQLongResolVsKtFctn;   //QLongLCMS Res   Vs   Kt
 
 class AliHBTPairThetaResolVsKtFctn;   //PairTheta Res   Vs   Kt
 class AliHBTPairPhiResolVsKtFctn;   //PairPhi Res   Vs   Kt
 
 
-class AliHBTQOutResolVsQOutFctn;  //QOutCMSLC  Res   Vs   QOut
-class AliHBTQSideResolVsQSideFctn;//QSideCMSLC Res   Vs   QSide
-class AliHBTQLongResolVsQLongFctn;//QLongCMSLC Res   Vs   QLong
+class AliHBTQOutResolVsQOutFctn;  //QOutLCMS  Res   Vs   QOut
+class AliHBTQSideResolVsQSideFctn;//QSideLCMS Res   Vs   QSide
+class AliHBTQLongResolVsQLongFctn;//QLongLCMS Res   Vs   QLong
 
 
  
index 6eae622..469db3f 100644 (file)
@@ -25,6 +25,7 @@
 ClassImp(AliHBTTrackPoints)
 
 Int_t AliHBTTrackPoints::fgDebug = 0;
+
 AliHBTTrackPoints::AliHBTTrackPoints():
  fN(0),
  fX(0x0),
index d0bf0ee..deed6e1 100644 (file)
@@ -24,10 +24,10 @@ class AliHBTTrackPoints: public TObject
     enum ETypes{kITS = 1};
 
     AliHBTTrackPoints();
-    AliHBTTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr=30, Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
-    AliHBTTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr=30,Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
     AliHBTTrackPoints(AliHBTTrackPoints::ETypes type, AliESDtrack* track);
-    AliHBTTrackPoints(const AliHBTTrackPoints& in);
+    AliHBTTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr=30,Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
+    AliHBTTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr=30, Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
+//    AliHBTTrackPoints(const AliHBTTrackPoints& in);
     
     virtual ~AliHBTTrackPoints();
     AliHBTTrackPoints& operator=(const AliHBTTrackPoints& in);
index ea10f41..7ec2dc1 100644 (file)
@@ -100,7 +100,7 @@ void AliHBTWeightQOutFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliH
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQOutCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQOutLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -112,7 +112,7 @@ void AliHBTWeightQOutFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliH
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQOutCMSLC());
+     fDenominator->Fill(trackpair->GetQOutLCMS());
   }
 }
 /**************************************************************/
@@ -154,7 +154,7 @@ void AliHBTWeightQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair, Ali
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQLongCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQLongLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -166,7 +166,7 @@ void AliHBTWeightQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, Ali
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQLongCMSLC());
+     fDenominator->Fill(trackpair->GetQLongLCMS());
   }
 }
 /**************************************************************/
@@ -209,7 +209,7 @@ void AliHBTWeightQSideFctn::ProcessSameEventParticles(AliHBTPair* trackpair, Ali
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQSideCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQSideLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -221,7 +221,7 @@ void  AliHBTWeightQSideFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, Al
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQSideCMSLC());
+     fDenominator->Fill(trackpair->GetQSideLCMS());
   }
 }
 /**************************************************************/
@@ -321,7 +321,7 @@ void AliHBTWeightQOutQSideFctn::ProcessSameEventParticles(AliHBTPair* trackpair,
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQSideCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQSideLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -333,7 +333,7 @@ void AliHBTWeightQOutQSideFctn::ProcessDiffEventParticles(AliHBTPair* trackpair,
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQSideCMSLC());
+     fDenominator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQSideLCMS());
   }
 }
 /**************************************************************/
@@ -378,7 +378,7 @@ void AliHBTWeightQOutQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair,
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQLongCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQLongLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -390,7 +390,7 @@ void AliHBTWeightQOutQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair,
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQLongCMSLC());
+     fDenominator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQLongLCMS());
   }
 }
 /**************************************************************/
@@ -435,7 +435,7 @@ void AliHBTWeightQSideQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair
          weight=partpair->GetWeight();
       }   
 //    Double_t weight=weightHBT*weightPID;
-    fNumerator->Fill(trackpair->GetQSideCMSLC(),trackpair->GetQLongCMSLC(),weight);
+    fNumerator->Fill(trackpair->GetQSideLCMS(),trackpair->GetQLongLCMS(),weight);
   }
 } 
 /****************************************************************/
@@ -447,7 +447,7 @@ void AliHBTWeightQSideQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
   {
-     fDenominator->Fill(trackpair->GetQSideCMSLC(),trackpair->GetQLongCMSLC());
+     fDenominator->Fill(trackpair->GetQSideLCMS(),trackpair->GetQLongLCMS());
   }
 }
 /**************************************************************/
@@ -492,9 +492,9 @@ void AliHBTWeightQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* track
          weight=partpair->GetWeight();//here we take weight from the particle pair
       }   
 //    Double_t weight=weightHBT*weightPID;
-    Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-    Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-    Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+    Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+    Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+    Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
     
     if (out < 0.005)
      if (side < 0.005)
@@ -519,9 +519,9 @@ void AliHBTWeightQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* track
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)  
    {
-     Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
-     Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
-     Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+     Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
+     Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
+     Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
    
      fDenominator->Fill(out,side,lon);
    }
index 984bf0a..03d4295 100644 (file)
@@ -55,7 +55,7 @@ class AliHBTWeightQOutFctn: public AliHBTTwoPairFctn1D, public AliHBTCorrelFunct
       
  protected:
   Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const
-    { return trackpair->GetQOutCMSLC()-partpair->GetQOutCMSLC();} //isn't use                                                                    
+    { return trackpair->GetQOutLCMS()-partpair->GetQOutLCMS();} //isn't use                                                                    
   ClassDef(AliHBTWeightQOutFctn,2)
  
 };
@@ -73,7 +73,7 @@ class AliHBTWeightQLongFctn: public AliHBTTwoPairFctn1D, public AliHBTCorrelFunc
   
  protected:
   Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const
-    { return trackpair->GetQLongCMSLC()-partpair->GetQLongCMSLC();} //isn't used
+    { return trackpair->GetQLongLCMS()-partpair->GetQLongLCMS();} //isn't used
 
   ClassDef(AliHBTWeightQLongFctn,2)
  
@@ -92,7 +92,7 @@ class AliHBTWeightQSideFctn: public AliHBTTwoPairFctn1D, public AliHBTCorrelFunc
       
  protected:
   Double_t GetValue(AliHBTPair* trackpair, AliHBTPair* partpair) const
-    { return trackpair->GetQLongCMSLC()-partpair->GetQLongCMSLC();} //isn't used
+    { return trackpair->GetQLongLCMS()-partpair->GetQLongLCMS();} //isn't used
 
   ClassDef(AliHBTWeightQSideFctn,2) 
 };
index b838434..517bdc4 100644 (file)
@@ -78,7 +78,7 @@ void  AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   Double_t weight = partpair->GetWeight();
-  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQOutCMSLC(),weight);
+  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQOutLCMS(),weight);
 } 
 
 /**************************************************************/
@@ -112,7 +112,7 @@ void  AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   Double_t weight = partpair->GetWeight();
-  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideCMSLC(),weight);
+  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideLCMS(),weight);
 } 
 /**************************************************************/
 
@@ -146,7 +146,7 @@ void  AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   Double_t weight = partpair->GetWeight();
-  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongCMSLC(),weight);
+  if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongLCMS(),weight);
 } 
 /**************************************************************/
 
@@ -182,9 +182,9 @@ void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
   partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   Double_t weight = partpair->GetWeight();
-  Double_t out = TMath::Abs(partpair->GetQOutCMSLC());
-  Double_t side = TMath::Abs(partpair->GetQSideCMSLC());
-  Double_t lon = TMath::Abs(partpair->GetQLongCMSLC());
+  Double_t out = TMath::Abs(partpair->GetQOutLCMS());
+  Double_t side = TMath::Abs(partpair->GetQSideLCMS());
+  Double_t lon = TMath::Abs(partpair->GetQLongLCMS());
 
 /*  
   if (out < 0.01)
index 74bf690..c3780f7 100644 (file)
@@ -50,7 +50,7 @@ class AliHBTWeightTheorQOutFctn: public AliHBTOnePairFctn1D, public AliHBTCorrel
 
   protected:
     Double_t GetValue(AliHBTPair* partpair) const
-      { return partpair->GetQOutCMSLC();}
+      { return partpair->GetQOutLCMS();}
 
     ClassDef(AliHBTWeightTheorQOutFctn,1)
 };
@@ -67,7 +67,7 @@ class AliHBTWeightTheorQSideFctn: public AliHBTOnePairFctn1D, public AliHBTCorre
     
   protected:
     Double_t GetValue(AliHBTPair* partpair) const
-      { return partpair->GetQSideCMSLC();} 
+      { return partpair->GetQSideLCMS();} 
 
     ClassDef(AliHBTWeightTheorQSideFctn,1)
 };
@@ -84,7 +84,7 @@ class AliHBTWeightTheorQLongFctn: public AliHBTOnePairFctn1D, public AliHBTCorre
   
   protected:
     Double_t GetValue(AliHBTPair* partpair) const
-      { return partpair->GetQLongCMSLC();} 
+      { return partpair->GetQLongLCMS();} 
 
     ClassDef(AliHBTWeightTheorQLongFctn,1)
 };
@@ -104,7 +104,7 @@ class AliHBTWeightTheorOSLFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelF
   
   protected:
     void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
-      { x=TMath::Abs(pair->GetQOutCMSLC()); y=TMath::Abs(pair->GetQSideCMSLC()); z=TMath::Abs(pair->GetQLongCMSLC());} 
+      { x=TMath::Abs(pair->GetQOutLCMS()); y=TMath::Abs(pair->GetQSideLCMS()); z=TMath::Abs(pair->GetQLongLCMS());} 
 
     ClassDef(AliHBTWeightTheorOSLFctn,1)
 };
index 9b439b4..d87b08c 100644 (file)
@@ -117,8 +117,8 @@ AliHBTWeightsPID* AliHBTWeightsPID::Instance()
 Double_t AliHBTWeightsPID::GetWeightPID(const AliHBTPair* trackpair)
 {
   //Calculates the weight of "trackpair"
-  AliHBTParticle *track1 = trackpair->Particle1();
-  AliHBTParticle *track2 = trackpair->Particle2();
+  AliVAODParticle *track1 = trackpair->Particle1();
+  AliVAODParticle *track2 = trackpair->Particle2();
     
   Double_t pt1=track1->Pt();
   Double_t eta1=track1->Eta();
index 0808efd..d71fed5 100644 (file)
@@ -7,7 +7,7 @@
   #include "AliHBTReaderTPC.h"
   #include "AliHBTParticleCut.h"
   #include "AliHBTEvent.h"
-  #include "AliHBTPairCut.h"
+  #include "AliAODPairCut.h"
   #include "AliHBTQResolutionFctns.h"
   #include "AliHBTTwoTrackEffFctn.h"
   #include "AliHBTCorrelFctn.h"
index 802ab17..149a45b 100644 (file)
 #pragma link C++ class AliHBTEmptyParticleCut-;
 #pragma link C++ class AliHbtBaseCut+;
 
-#pragma link C++ class AliHBTPairCut-;
-#pragma link C++ class AliHBTEmptyPairCut-;
-#pragma link C++ class AliHbtBasePairCut+;
-
-#pragma link C++ class AliHBTQInvCut+;
-#pragma link C++ class AliHBTKtCut+;
-#pragma link C++ class AliHBTKStarCut+;
-#pragma link C++ class AliHBTQSideCMSLCCut+;
-#pragma link C++ class AliHBTQOutCMSLCCut+;
-#pragma link C++ class AliHBTQLongCMSLCCut+;
-#pragma link C++ class AliHBTDeltaPhiCut+;
-#pragma link C++ class AliHBTDeltaThetaCut+;
-#pragma link C++ class AliHBTAvSeparationCut+;
-#pragma link C++ class AliHBTSeparationCut+;
-#pragma link C++ class AliHBTITSSeparationCut+;
-#pragma link C++ class AliHBTCluterOverlapCut+;
-#pragma link C++ class AliHBTOutSideSameSignCut+;
-#pragma link C++ class AliHBTOutSideDiffSignCut+;
-#pragma link C++ class AliHBTLogicalOperPairCut-;
-#pragma link C++ class AliHBTOrPairCut+;
-#pragma link C++ class AliHBTAndPairCut+;
-    
 #pragma link C++ class AliHBTMomentumCut+;
 #pragma link C++ class AliHBTPtCut+;
 #pragma link C++ class AliHBTEnergyCut+;
@@ -95,9 +73,9 @@
 #pragma link C++ class AliHBTQInvCorrelFctn+;
 #pragma link C++ class AliHBTOutSideLongFctn+;
 #pragma link C++ class AliHBTTwoKStarCorrelFctn+;
-#pragma link C++ class AliHBTQOutCMSLCCorrelFctn+;
-#pragma link C++ class AliHBTQLongCMSLCCorrelFctn+;
-#pragma link C++ class AliHBTQSideCMSLCCorrelFctn+;
+#pragma link C++ class AliHBTQOutLCMSCorrelFctn+;
+#pragma link C++ class AliHBTQLongLCMSCorrelFctn+;
+#pragma link C++ class AliHBTQSideLCMSCorrelFctn+;
 #pragma link C++ class AliHBTAvSeparCorrelFctn+;
 
 #pragma link C++ class AliHBTInvMassCorrelFctn+;
index 7d8ba23..7c5933b 100644 (file)
@@ -206,9 +206,9 @@ void hbtanalysis(Option_t* datatype, Option_t* processopt="TracksAndParticles",
   /****   Q OUT Correlation Function   ************************/
   /************************************************************/
   
-  AliHBTQOutCMSLCCorrelFctn* qoutP = new AliHBTQOutCMSLCCorrelFctn();
+  AliHBTQOutLCMSCorrelFctn* qoutP = new AliHBTQOutLCMSCorrelFctn();
   qoutP->Rename("qoutP","Particle (simulated) Q_{out} CF \\pi^{+} \\pi^{+}");
-  AliHBTQOutCMSLCCorrelFctn* qoutT = new AliHBTQOutCMSLCCorrelFctn(); 
+  AliHBTQOutLCMSCorrelFctn* qoutT = new AliHBTQOutLCMSCorrelFctn(); 
   qoutT->Rename("qoutT","Track (recontructed) Q_{out} CF \\pi^{+} \\pi^{+}");
 
   AliHBTPairCut *outPairCut = new AliHBTPairCut();
@@ -225,9 +225,9 @@ void hbtanalysis(Option_t* datatype, Option_t* processopt="TracksAndParticles",
   /****   Q SIDE Correlation Function   ***********************/
   /************************************************************/
   
-  AliHBTQSideCMSLCCorrelFctn* qsideP = new AliHBTQSideCMSLCCorrelFctn(100,qinvmax); 
+  AliHBTQSideLCMSCorrelFctn* qsideP = new AliHBTQSideLCMSCorrelFctn(100,qinvmax); 
   qsideP->Rename("qsideP","Particle (simulated) Q_{side} CF \\pi^{+} \\pi^{+}");
-  AliHBTQSideCMSLCCorrelFctn* qsideT = new AliHBTQSideCMSLCCorrelFctn(100,qinvmax); 
+  AliHBTQSideLCMSCorrelFctn* qsideT = new AliHBTQSideLCMSCorrelFctn(100,qinvmax); 
   qsideT->Rename("qsideT","Track (recontructed) Q_{side} CF \\pi^{+} \\pi^{+}");
 
   AliHBTPairCut *sidePairCut = new AliHBTPairCut();
@@ -244,9 +244,9 @@ void hbtanalysis(Option_t* datatype, Option_t* processopt="TracksAndParticles",
   /****   Q LONG Correlation Function   ***********************/
   /************************************************************/
     
-  AliHBTQLongCMSLCCorrelFctn* qlongP = new AliHBTQLongCMSLCCorrelFctn(100,qinvmax);
+  AliHBTQLongLCMSCorrelFctn* qlongP = new AliHBTQLongLCMSCorrelFctn(100,qinvmax);
   qlongP->Rename("qlongP","Particle (simulated) Q_{long} CF \\pi^{+} \\pi^{+}");
-  AliHBTQLongCMSLCCorrelFctn* qlongT = new AliHBTQLongCMSLCCorrelFctn(100,qinvmax); 
+  AliHBTQLongLCMSCorrelFctn* qlongT = new AliHBTQLongLCMSCorrelFctn(100,qinvmax); 
   qlongT->Rename("qlongT","Track (recontructed) Q_{long} CF \\pi^{+} \\pi^{+}");
 
   AliHBTPairCut *longPairCut = new AliHBTPairCut();
@@ -270,34 +270,34 @@ void hbtanalysis(Option_t* datatype, Option_t* processopt="TracksAndParticles",
 
 
 
-  AliHBTQInvResolVsKtFctn qinvVsktF(200,1.0,0.0,300,0.015,-0.015);    //QInvCMSLC  Res   Vs   Kt
+  AliHBTQInvResolVsKtFctn qinvVsktF(200,1.0,0.0,300,0.015,-0.015);    //QInvLCMS  Res   Vs   Kt
   if (threeDcuts)  qinvVsktF.SetPairCut(paircut);
   //analysis->AddResolutionFunction(&qinvVsktF);
 
-  AliHBTQOutResolVsKtFctn qoutVsktF(200,1.0,0.0,300,0.05,-0.05);    //QOutCMSLC  Res   Vs   Kt
+  AliHBTQOutResolVsKtFctn qoutVsktF(200,1.0,0.0,300,0.05,-0.05);    //QOutLCMS  Res   Vs   Kt
   if (threeDcuts)  qoutVsktF.SetPairCut(outPairCut);
   //analysis->AddResolutionFunction(&qoutVsktF);
 
-  AliHBTQSideResolVsKtFctn qsideVsktF(200,1.0,0.0,300,0.015,-0.015);   //QSideCMSLC Res   Vs   Kt
+  AliHBTQSideResolVsKtFctn qsideVsktF(200,1.0,0.0,300,0.015,-0.015);   //QSideLCMS Res   Vs   Kt
   if (threeDcuts)  qsideVsktF.SetPairCut(sidePairCut);
   //analysis->AddResolutionFunction(&qsideVsktF);
 
-  AliHBTQLongResolVsKtFctn qlongVsktF(200,1.0,0.0,300,0.015,-0.015);   //QLongCMSLC Res   Vs   Kt
+  AliHBTQLongResolVsKtFctn qlongVsktF(200,1.0,0.0,300,0.015,-0.015);   //QLongLCMS Res   Vs   Kt
   if (threeDcuts)  qlongVsktF.SetPairCut(longPairCut);
   //analysis->AddResolutionFunction(&qlongVsktF);
 
-  AliHBTQInvResolVsQInvFctn qInvVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QInvCMSLC Res   Vs   QInvCMSLC
+  AliHBTQInvResolVsQInvFctn qInvVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QInvLCMS Res   Vs   QInvLCMS
   //analysis->AddResolutionFunction(&qInvVsqinvF);
 
-  AliHBTQOutResolVsQInvFctn qoutVsqinvF(200,qinvmax,qinvmin,300,0.05,-0.05);  //QOutCMSLC  Res   Vs   QInvCMSLC
+  AliHBTQOutResolVsQInvFctn qoutVsqinvF(200,qinvmax,qinvmin,300,0.05,-0.05);  //QOutLCMS  Res   Vs   QInvLCMS
   if (threeDcuts)  qoutVsqinvF.SetPairCut(outPairCut);
   //analysis->AddResolutionFunction(&qoutVsqinvF);
 
-  AliHBTQSideResolVsQInvFctn qsideVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QSideCMSLC Res   Vs   QInvCMSLC
+  AliHBTQSideResolVsQInvFctn qsideVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QSideLCMS Res   Vs   QInvLCMS
   if (threeDcuts)  qsideVsqinvF.SetPairCut(sidePairCut);
   //analysis->AddResolutionFunction(&qsideVsqinvF);
 
-  AliHBTQLongResolVsQInvFctn qlongVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QLongCMSLC Res   Vs   QInvCMSLC
+  AliHBTQLongResolVsQInvFctn qlongVsqinvF(200,qinvmax,qinvmin,300,0.015,-0.015); //QLongLCMS Res   Vs   QInvLCMS
   if (threeDcuts)  qlongVsqinvF.SetPairCut(longPairCut);
   //analysis->AddResolutionFunction(&qlongVsqinvF);
 
@@ -322,16 +322,16 @@ void hbtanalysis(Option_t* datatype, Option_t* processopt="TracksAndParticles",
   //analysis->AddResolutionFunction(&pairPhiVsKt);
 
 
-  AliHBTQOutResolVsQOutFctn qoutVsqoutF;  //QOutCMSLC  Res   Vs   QOut
+  AliHBTQOutResolVsQOutFctn qoutVsqoutF;  //QOutLCMS  Res   Vs   QOut
   if (threeDcuts) qoutVsqoutF.SetPairCut(outPairCut);
   //analysis->AddResolutionFunction(&qoutVsqoutF);
 
-  AliHBTQSideResolVsQSideFctn qsideVsqsideF;//QSideCMSLC Res   Vs   QSide
+  AliHBTQSideResolVsQSideFctn qsideVsqsideF;//QSideLCMS Res   Vs   QSide
   if (threeDcuts) qsideVsqsideF.SetPairCut(sidePairCut);
   //analysis->AddResolutionFunction(&qsideVsqsideF);
 
   
-  AliHBTQLongResolVsQLongFctn qlongVsqlongF;//QLongCMSLC Res   Vs   QLong
+  AliHBTQLongResolVsQLongFctn qlongVsqlongF;//QLongLCMS Res   Vs   QLong
   if (threeDcuts) qlongVsqlongF.SetPairCut(longPairCut);
   //analysis->AddResolutionFunction(&qlongVsqlongF);
 
index 9bbc42e..0a9d191 100644 (file)
@@ -4,7 +4,7 @@ AliHBTReaderESD.cxx   AliHBTReaderInternal.cxx \
 AliHBTReaderTPC.cxx   \
 AliHBTReaderITSv1.cxx AliHBTReaderITSv2.cxx    \
 AliHBTParticle.cxx    AliHBTParticleCut.cxx \
-AliHBTPair.cxx        AliHBTPairCut.cxx \
+AliHBTPair.cxx       \
 AliHBTEvent.cxx       AliHBTRun.cxx \
 AliHBTFunction.cxx    AliHBTCorrelFctn.cxx  \
 AliHBTMonitorFunction.cxx       AliHBTTwoTrackEffFctn.cxx \