]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTFunction.cxx
New treatment of the cluster coordinate (Christoph)
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.cxx
index 04be138f56b37deaf3b7d4ab3d1ab808c1740796..6a07f04f94cad07f8c08e63bc4a9b1d4c3285fa0 100644 (file)
@@ -1,6 +1,23 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
 #include "AliHBTFunction.h"
+#include "AliLog.h"
 
-/* $Id: */
 
 //--------------------------------------------------------------------
 //AliHBTFunction
@@ -41,8 +58,9 @@
 ClassImp( AliHBTFunction )
 
 AliHBTFunction::AliHBTFunction():
- fPairCut(new AliHBTEmptyPairCut()), //dummy cut  
- fWriteNumAndDen(kFALSE)
+ fPairCut(new AliAODPairEmptyCut()), //dummy cut  
+ fWriteNumAndDen(kFALSE),
+ fAbs(kFALSE)
 {
 //Default constructor
 }
@@ -50,8 +68,9 @@ AliHBTFunction::AliHBTFunction():
 
 AliHBTFunction::AliHBTFunction(const char* name,const char* title):
  TNamed(name,title),
- fPairCut(new AliHBTEmptyPairCut()), //dummy cut  
- fWriteNumAndDen(kFALSE)
+ fPairCut(new AliAODPairEmptyCut()), //dummy cut  
+ fWriteNumAndDen(kFALSE),
+ fAbs(kFALSE)
 {
 //Constructor  
 }
@@ -59,8 +78,9 @@ AliHBTFunction::AliHBTFunction(const char* name,const char* title):
 
 AliHBTFunction::AliHBTFunction(const AliHBTFunction & source):
  TNamed(source),
- fPairCut((AliHBTPairCut*)source.fPairCut->Clone()),
- fWriteNumAndDen(source.fWriteNumAndDen)
+ fPairCut((AliAODPairCut*)source.fPairCut->Clone()),
+ fWriteNumAndDen(source.fWriteNumAndDen),
+ fAbs(source.fAbs)
 {
 // Copy constructor needed by the coding conventions
 }
@@ -69,10 +89,7 @@ AliHBTFunction::AliHBTFunction(const AliHBTFunction & source):
 AliHBTFunction::~AliHBTFunction()
 {
 //destructor  
-  if (AliHBTParticle::GetDebug() > 1)
-   {
-     Info("~AliHBTFunction","Deleting %s",GetName());
-   }
+  AliDebug(1,"Deleting");
   delete fPairCut;
 }
 /******************************************************************/
@@ -80,31 +97,34 @@ AliHBTFunction & AliHBTFunction::operator= (const AliHBTFunction & source)
 {
  // Assignment needed by the coding conventions
   delete fPairCut;
-  fPairCut = (AliHBTPairCut*)source.fPairCut->Clone();
+  fPairCut = (AliAODPairCut*)source.fPairCut->Clone();
+  fAbs = source.fAbs;
   return * this;
 }
 
-void AliHBTFunction::WriteFunction()
+Int_t AliHBTFunction::WriteFunction()
 {
 //writes result of the function to file
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","%s",GetName());
+  Int_t retval =0;
+   AliDebug(1,"Entering");
    if (fWriteNumAndDen)
     { 
-     if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den");
+     AliDebug(1,"Writing Num & Den");
      if (GetNumerator()) GetNumerator()->Write();
      if (GetDenominator()) GetDenominator()->Write();
-     if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Num & Den Done");
+     AliDebug(1,"Writing Num & Den Done");
     } 
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Getting Result");
+   AliDebug(1,"Getting Result");
    TH1* res = GetResult();
-   if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Getting Result Done");
+   AliDebug(1,"Getting Result Done");
    
    if (res) 
     { 
-      if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Result");
-      res->Write();
-      if (AliHBTParticle::GetDebug()) Info("AliHBTFunction","Writing Result Done");
+      AliDebug(1,"Writing Result");
+      retval = res->Write();
+      AliDebug(1,"Writing Result Done");
     }
+   return retval;
 }
 /******************************************************************/
 
@@ -112,11 +132,11 @@ 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());
+   AliDebug(1,Form("Norm. Factor is %f for %s",normfactor,GetName()));
    
    if (normfactor == 0.0)
     {
-      Error("GetRatio","Scaling Factor is 0. Null poiner returned");
+      AliError("Scaling Factor is 0. Null poiner returned");
       return 0x0;
     }
    TString str = fName + " ratio";
@@ -131,7 +151,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
@@ -143,11 +163,11 @@ void AliHBTFunction::SetPairCut(AliHBTPairCut* cut)
 
  if(!cut) 
    {
-     Error("AliHBTFunction::SetPairCut","argument is NULL");
+     AliError("argument is NULL");
      return;
    }
  delete fPairCut;
- fPairCut = (AliHBTPairCut*)cut->Clone();
+ fPairCut = (AliAODPairCut*)cut->Clone();
  
 }
 
@@ -206,14 +226,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());
+  AliDebug(1,"Entering");
   if ( !(GetNumerator()&&GetDenominator()) ) BuildHistos();
   GetNumerator()->Reset();
   GetDenominator()->Reset();
 
   GetNumerator()->SetDirectory(0x0);
   GetDenominator()->SetDirectory(0x0);
-  if (AliHBTParticle::GetDebug()>1) Info("InitFunction","Done");
+  AliDebug(1,"Done");
 }
 /******************************************************************/
 /******************************************************************/
@@ -361,30 +381,30 @@ 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()");
+  AliDebug(1,"Entered");
   if(!num) 
    {
-     Error("Scale","No numerator");
+     AliError("No numerator");
      return 0.0;
    }
   if(!den) 
    {
-     Error("Scale","No denominator");
+     AliError("No denominator");
      return 0.0;
    }
   
   if(fNBinsToScale < 1) 
    {
-    Error("Scale","Number of bins for scaling is smaller thnan 1");
+    AliError("Number of bins for scaling is smaller than 1");
     return 0.0;
    }
   UInt_t nbins = num->GetNbinsX();
   if (fNBinsToScale > nbins) 
    {
-    Error("Scale","Number of bins for scaling is bigger thnan number of bins in histograms");
+    AliError("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");
+  AliDebug(1,"No errors detected");
 
   Double_t densum = 0.0;
   Double_t numsum = 0.0;
@@ -395,18 +415,17 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
    {
     if ( num->GetBinContent(i) > 0.0 )
      {
-       densum += fDenominator->GetBinContent(i);
-       numsum += fNumerator->GetBinContent(i);
+       densum += den->GetBinContent(i);
+       numsum += num->GetBinContent(i);
      }
    }
   
-  if(AliHBTParticle::GetDebug() > 0)
-    Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d",numsum,densum,fNBinsToScale);
+  AliDebug(1,Form("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);
+  AliDebug(1,Form("returning %f",ret));
   return ret;
 } 
 
@@ -422,7 +441,7 @@ Double_t AliHBTFunction1D::Scale(TH1D* num,TH1D* den)
 // Base Calss for 2-dimensinal Functions             //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -545,38 +564,38 @@ 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()");
+  AliDebug(1,"Entered");
   if(!fNumerator) 
    {
-     Error("Scale","No numerator");
+     AliError("No numerator");
      return 0.0;
    }
   if(!fDenominator) 
    {
-     Error("Scale","No denominator");
+     AliError("No denominator");
      return 0.0;
    }
   
   if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) ) 
    {
-    Error("Scale","Number of bins for scaling is smaller thnan 1");
+    AliError("Number of bins for scaling is smaller thnan 1");
     return 0.0;
    }
   UInt_t nbinsX = fNumerator->GetNbinsX();
   if (fNBinsToScaleX > nbinsX) 
    {
-    Error("Scale","Number of X bins for scaling is bigger thnan number of bins in histograms");
+    AliError("Number of X bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
    
   UInt_t nbinsY = fNumerator->GetNbinsX();
   if (fNBinsToScaleY > nbinsY) 
    {
-    Error("Scale","Number of Y bins for scaling is bigger thnan number of bins in histograms");
+    AliError("Number of Y bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
 
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","No errors detected");
+  AliDebug(1,"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 +613,13 @@ Double_t AliHBTFunction2D::Scale()
        }
      }
   
-  if(AliHBTParticle::GetDebug() > 0) 
-    Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d",numsum,densum,fNBinsToScaleX,fNBinsToScaleY);
+  AliDebug(1,Form("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);
+  AliDebug(1,Form("returning %f",ret));
   return ret;
 } 
 
@@ -616,7 +635,7 @@ Double_t AliHBTFunction2D::Scale()
 // Base Calss for 3-dimensinal Functions             //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -729,6 +748,21 @@ void AliHBTFunction3D::BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
                       Int_t nzbins, Float_t zmax, Float_t zmin)
 {
   //Builds numerator and denominator histograms (3d-case)
+  
+   AliDebug(1,"Entered");
+   
+   if (fNumerator )
+    {
+      delete fNumerator;
+      fNumerator = 0x0;
+    }
+
+   if (fDenominator )
+    {
+      delete fDenominator;
+      fDenominator = 0x0;
+    }
+   
    TString numstr = fName + " Numerator";  //title and name of the 
                                            //numerator histogram
    TString denstr = fName + " Denominator";//title and name of the 
@@ -751,45 +785,45 @@ 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()");
+  AliDebug(1,"Entered");
   if(!fNumerator) 
    {
-     Error("Scale","No numerator");
+     AliError("No numerator");
      return 0.0;
    }
   if(!fDenominator) 
    {
-     Error("Scale","No denominator");
+     AliError("No denominator");
      return 0.0;
    }
   
   if( (fNBinsToScaleX < 1) || (fNBinsToScaleY < 1) || (fNBinsToScaleZ < 1)) 
    {
-    Error("Scale","Number of bins for scaling is smaller thnan 1");
+    AliError("Number of bins for scaling is smaller thnan 1");
     return 0.0;
    }
   UInt_t nbinsX = fNumerator->GetNbinsX();
   if (fNBinsToScaleX > nbinsX) 
    {
-    Error("Scale","Number of X bins for scaling is bigger thnan number of bins in histograms");
+    AliError("Number of X bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
    
   UInt_t nbinsY = fNumerator->GetNbinsX();
   if (fNBinsToScaleY > nbinsY) 
    {
-    Error("Scale","Number of Y bins for scaling is bigger thnan number of bins in histograms");
+    AliError("Number of Y bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
 
   UInt_t nbinsZ = fNumerator->GetNbinsZ();
   if (fNBinsToScaleZ > nbinsZ) 
    {
-    Error("Scale","Number of Z bins for scaling is bigger thnan number of bins in histograms");
+    AliError("Number of Z bins for scaling is bigger thnan number of bins in histograms");
     return 0.0;
    }
 
-  if (AliHBTParticle::GetDebug()>0) Info("Scale","No errors detected");
+  AliDebug(1,"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 +844,13 @@ Double_t AliHBTFunction3D::Scale()
          }
        }
   
-  if(AliHBTParticle::GetDebug() > 0) 
-    Info("Scale","numsum=%f densum=%f fNBinsToScaleX=%d fNBinsToScaleY=%d fNBinsToScaleZ=%d",
-          numsum,densum,fNBinsToScaleX,fNBinsToScaleY,fNBinsToScaleZ);
+  AliDebug(1,Form("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);
+  AliDebug(1,Form("returning %f",ret));
   return ret;
 } 
 /******************************************************************/
@@ -849,7 +882,7 @@ void AliHBTFunction3D::SetNumberOfBinsToScale(UInt_t xn, UInt_t yn,UInt_t zn)
 // one pair to fill function                         //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -905,7 +938,7 @@ void AliHBTOnePairFctn1D::ProcessDiffEventParticles(AliHBTPair* pair)
 // one pair to fill function                         //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -973,7 +1006,7 @@ void AliHBTOnePairFctn2D::ProcessDiffEventParticles(AliHBTPair* pair)
 // one pair to fill function                         //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 ClassImp( AliHBTOnePairFctn3D)
@@ -1047,7 +1080,7 @@ void AliHBTOnePairFctn3D::ProcessDiffEventParticles(AliHBTPair* pair)
 // to fill function                                  //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 ClassImp(AliHBTTwoPairFctn1D)
@@ -1078,11 +1111,8 @@ AliHBTTwoPairFctn1D::AliHBTTwoPairFctn1D(const Char_t *name, const Char_t *title
 void AliHBTTwoPairFctn1D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
   // 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
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 0x0) return;
     
   Double_t x = GetValue(trackpair,partpair);
   fNumerator->Fill(x);
@@ -1092,12 +1122,9 @@ void AliHBTTwoPairFctn1D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
 void AliHBTTwoPairFctn1D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
   // Fills the denumerator usin mixed pairs
-  partpair  = CheckPair(partpair);
-  if( partpair == 0x0) return;
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 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);
 }
@@ -1115,7 +1142,7 @@ void AliHBTTwoPairFctn1D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHB
 // to fill function                                  //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -1150,12 +1177,9 @@ AliHBTTwoPairFctn2D::AliHBTTwoPairFctn2D(const Char_t *name, const Char_t *title
 void AliHBTTwoPairFctn2D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //processes pair of particles coming from a same events (real pair)
-  partpair  = CheckPair(partpair);  //check cuts
-  if (partpair == 0x0) return;
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 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);
@@ -1165,12 +1189,9 @@ void AliHBTTwoPairFctn2D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
 void AliHBTTwoPairFctn2D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
 //processes pair of particles coming from a different events (mixed pair)
-  partpair  = CheckPair(partpair);
-  if (partpair == 0x0) return;
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 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);
@@ -1190,7 +1211,7 @@ void AliHBTTwoPairFctn2D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHB
 // to fill function                                  //
 //                                                   //
 // Piotr.Skowronski@cern.ch                          //
-// http://alisoft.cern.ch/people/skowron/analyzer    //
+// http://aliweb.cern.ch/people/skowron/analyzer    //
 //                                                   //
 ///////////////////////////////////////////////////////
 
@@ -1227,12 +1248,9 @@ AliHBTTwoPairFctn3D::AliHBTTwoPairFctn3D(const Char_t *name, const Char_t *title
 void AliHBTTwoPairFctn3D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
   // Fills th numerator using pairs from the same event
-  partpair  = CheckPair(partpair);
-  if( partpair == 0x0) return;
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 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);
@@ -1243,12 +1261,9 @@ void AliHBTTwoPairFctn3D::ProcessSameEventParticles(AliHBTPair* trackpair, AliHB
 void AliHBTTwoPairFctn3D::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
   // Fills the denumerator using mixed pairs
-  partpair  = CheckPair(partpair);
-  if( partpair == 0x0) return;
+  trackpair  = CheckPair(trackpair);
+  if( trackpair == 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);