]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTPIDPurityFctns.cxx
Updated version (Zubayer)
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPIDPurityFctns.cxx
index a4b48226aa6e17dc8f2bcf8ded7e27f2c9ba5f63..6cf6b00f6c0fe2520d151fc3c332b53cafec3963 100644 (file)
@@ -1,4 +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 "AliHBTPIDPurityFctns.h"
+#include "AliLog.h"
+
 //_______________________________________________________________________________
 /////////////////////////////////////////////////////////////////////////////////
 //
@@ -63,23 +82,24 @@ AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator=
 }
 /******************************************************************/
 
-void AliHBTMonPIDPurityVsPtFctn::Write()
+Int_t AliHBTMonPIDPurityVsPtFctn::Write(const char*,Int_t, Int_t)
 {
 //Writes a fucntion results
  AliHBTMonitorFunction::Write();
  fGood->Write();
  fAll->Write();
+ return 0;
 }
 /******************************************************************/
 
 void AliHBTMonPIDPurityVsPtFctn::Init()
 {
 //Initializes fuction
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
+  AliDebug(1,"Entering");
 
   if (fResult == 0x0)
    {   
-      Warning("Init","Function has NULL result histogram!");
+      AliWarning("Function has NULL result histogram!");
       return;
    }
   
@@ -109,7 +129,7 @@ void AliHBTMonPIDPurityVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
 
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  AliDebug(1,"Done");
 }
 
 /******************************************************************/
@@ -248,23 +268,24 @@ AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
 }
 /******************************************************************/
 
-void AliHBTMonPIDContaminationVsPtFctn::Write()
+Int_t AliHBTMonPIDContaminationVsPtFctn::Write(const char*,Int_t, Int_t)
 {
  //Writes the function results
  AliHBTMonitorFunction::Write();
  fWrong->Write();
  fAll->Write();
+ return 0;
 }
 /******************************************************************/
 
 void AliHBTMonPIDContaminationVsPtFctn::Init()
 {
 //Initializes fuction
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s",GetName());
+  AliDebug(1,"Entering");
 
   if (fResult == 0x0)
    {   
-      Warning("Init","Function has NULL result histogram!");
+      AliWarning("Function has NULL result histogram!");
       return;
    }
   
@@ -293,7 +314,7 @@ void AliHBTMonPIDContaminationVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
   
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  AliDebug(1,"Done");
 }
 
 /******************************************************************/
@@ -405,7 +426,7 @@ void AliHBTQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* track
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
   fNumerator->Fill(trackpair->GetQInv());
@@ -420,7 +441,7 @@ void AliHBTQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* track
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
   fDenominator->Fill(trackpair->GetQInv());
@@ -459,7 +480,7 @@ void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessSameEventParticles(AliHBTPair*
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
   fNumerator->Fill(trackpair->GetQInv(),partpair->GetWeight());
@@ -474,7 +495,7 @@ void AliHBTWeightQInvCorrelFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair*
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
   fDenominator->Fill(trackpair->GetQInv());
@@ -517,13 +538,21 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTP
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
+
   Double_t weight = partpair->GetWeight();
-  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
-  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
+  Double_t out = trackpair->GetQOutLCMS();
+  Double_t side = trackpair->GetQSideLCMS();
+  Double_t lon = trackpair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
   fNumerator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -536,12 +565,19 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTP
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
-  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
-  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
+  Double_t out = trackpair->GetQOutLCMS();
+  Double_t side = trackpair->GetQSideLCMS();
+  Double_t lon = trackpair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
   fDenominator->Fill(out,side,lon);
 }
 /******************************************************************/
@@ -581,12 +617,19 @@ void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* t
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
-  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
-  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
+  Double_t out = trackpair->GetQOutLCMS();
+  Double_t side = trackpair->GetQSideLCMS();
+  Double_t lon = trackpair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
   fNumerator->Fill(out,side,lon);
 }
 /*************************************************************/
@@ -599,12 +642,19 @@ void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* t
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
   
-  Double_t out = TMath::Abs(trackpair->GetQOutLCMS());
-  Double_t side = TMath::Abs(trackpair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(trackpair->GetQLongLCMS());
+  Double_t out = trackpair->GetQOutLCMS();
+  Double_t side = trackpair->GetQSideLCMS();
+  Double_t lon = trackpair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
   fDenominator->Fill(out,side,lon);
 }
 /******************************************************************/
@@ -680,9 +730,17 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair
   pair  = CheckPair(pair);
   if (pair == 0x0) return;
   Double_t weight = pair->GetPIDProb();
-  Double_t out = TMath::Abs(pair->GetQOutLCMS());
-  Double_t side = TMath::Abs(pair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(pair->GetQLongLCMS());
+  Double_t out = pair->GetQOutLCMS();
+  Double_t side = pair->GetQSideLCMS();
+  Double_t lon = pair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
+
   fNumerator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -693,9 +751,17 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair
   pair  = CheckPair(pair);
   if (pair == 0x0) return;
   Double_t weight = pair->GetPIDProb();
-  Double_t out = TMath::Abs(pair->GetQOutLCMS());
-  Double_t side = TMath::Abs(pair->GetQSideLCMS());
-  Double_t lon = TMath::Abs(pair->GetQLongLCMS());
+  Double_t out = pair->GetQOutLCMS();
+  Double_t side = pair->GetQSideLCMS();
+  Double_t lon = pair->GetQLongLCMS();
+
+  if (fAbs)
+   {
+     out = TMath::Abs(out);
+     side = TMath::Abs(side);
+     lon = TMath::Abs(lon);
+   }
+  
   fDenominator->Fill(out,side,lon,weight);
 }
 /*************************************************************/
@@ -748,7 +814,7 @@ void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessSameEventParticles(AliHBT
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
   Double_t x = TMath::Abs(trackpair->GetDeltaPt());
@@ -766,7 +832,7 @@ void AliHBTTwoTrackEffFctnPtThetaPhiPerfectPID::ProcessDiffEventParticles(AliHBT
 
   trackpair  = CheckPair(trackpair);
   if (trackpair == 0x0) return;
-  partpair  = CheckPair(partpair);
+//  partpair  = CheckPair(partpair);
   if (partpair == 0x0) return;
 
   Double_t x = TMath::Abs(trackpair->GetDeltaPt());