]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTPair.h
Bug corrected in DeltaPhi
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPair.h
index acc28e3bef83c163021c427ade7b3cb7b48ced55..48564eaa800f391d7bbad0a6da4bf701ce5e3a1c 100644 (file)
@@ -58,7 +58,9 @@ class AliHBTPair: public TObject
    virtual Double_t GetDeltaPhi();
    
    virtual Double_t GetGammaToCMSLC();
-   Double_t GetWeight();
+   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
@@ -112,6 +114,9 @@ class AliHBTPair: public TObject
    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
@@ -129,8 +134,10 @@ class AliHBTPair: public TObject
    Double_t fGammaCMSLC;//gamma of boost in CMSLC
    Bool_t   fGammaCMSLCNotCalc;//flag indicating if fGammaCMSLC is calculated for current pair
    /***************************************************/
-   void CalculateBase();
-   Bool_t fChanged;//flag indicating if object has been changed
+   Bool_t   fChanged;//flag indicating if object has been changed
+
+   void     CalculateBase();
+   Double_t AvDistance();
    
    
  private:
@@ -170,6 +177,7 @@ void AliHBTPair::Changed()
  fQInvLNotCalc      = kTRUE;
  fGammaCMSLCNotCalc = kTRUE;
  fWeightNotCalc = kTRUE;
+ fAvarageDistanceNotCalc = kTRUE;
 }
 /****************************************************************/
 inline 
@@ -275,15 +283,30 @@ Double_t AliHBTPair::GetDeltaPz()
 inline 
 Double_t AliHBTPair::GetDeltaPhi()
  {
-   //returns difference of Pz
-   return fPart1->Phi()-fPart2->Phi();
+   //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 Pz
+   //returns difference of Theta
    return fPart1->Theta()-fPart2->Theta();
  }
 /****************************************************************/