]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTPIDPurityFctns.cxx
Remove verbosity
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPIDPurityFctns.cxx
index 066a512cab2dd291190edeedde3b3562b5e1f70d..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"
+
 //_______________________________________________________________________________
 /////////////////////////////////////////////////////////////////////////////////
 //
 //
 // file: AliHBTPIDPurityFctns.cxx AliHBTPIDPurityFctns.h
 //
-// Caution: On 2D plots on X axis in simulated values
-// That is contrary to two-particle resolutions where it is reconstructed one
+// Classes for calculating PID purity, efficiency and other things connected with PID
+// xxx
+// xxx
 //
 // added by Piotr.Skowronski@cern.ch
-// 
 //
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -19,7 +38,6 @@
 /******************************************************************/
 /******************************************************************/
 /******************************************************************/
-AliHBTQInvCorrelFctnPerfectPID f;
 
 ClassImp(AliHBTMonPIDPurityVsPtFctn)
 
@@ -34,6 +52,19 @@ AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(Int_t nbins, Double_t max
 }
 /******************************************************************/
 
+AliHBTMonPIDPurityVsPtFctn::AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn& /*in*/):
+ AliHBTMonTwoParticleFctn1D(),
+ AliHBTCorrelFunction(),
+ fGood(0x0),
+ fAll(0x0)
+{
+  //cpy constructor
+  Error("AliHBTMonPIDPurityVsPtFctn(const AliHBTMonPIDPurityVsPtFctn&",
+        "Functions can not be copied because of histogram names clashes");
+}
+
+/******************************************************************/
+
 AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn()
 {
  //dtor
@@ -41,22 +72,34 @@ AliHBTMonPIDPurityVsPtFctn::~AliHBTMonPIDPurityVsPtFctn()
   delete fAll;
 }
 /******************************************************************/
-void AliHBTMonPIDPurityVsPtFctn::Write()
+
+AliHBTMonPIDPurityVsPtFctn& AliHBTMonPIDPurityVsPtFctn::operator=
+                                   (const AliHBTMonPIDPurityVsPtFctn& /*in*/)
 {
+//assigment operator
+  Error("operator=","Functions can not be copied because of histogram names clashes");
+  return *this;
+}
+/******************************************************************/
+
+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;
    }
   
@@ -86,7 +129,7 @@ void AliHBTMonPIDPurityVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
 
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  AliDebug(1,"Done");
 }
 
 /******************************************************************/
@@ -194,6 +237,20 @@ AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn(Int_t nbins
 }
 /******************************************************************/
 
+AliHBTMonPIDContaminationVsPtFctn::AliHBTMonPIDContaminationVsPtFctn
+                                          (const AliHBTMonPIDContaminationVsPtFctn& /*in*/):
+ AliHBTMonTwoParticleFctn1D(),
+ AliHBTCorrelFunction(),
+ fWrong(0x0),
+ fAll(0x0)
+{
+  //cpy constructor
+  Error("AliHBTMonPIDContaminationVsPtFctn(const AliHBTMonPIDContaminationVsPtFctn&",
+        "Functions can not be copied because of histogram names clashes");
+}
+
+/******************************************************************/
+
 AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
 {
  //dtor
@@ -202,23 +259,33 @@ AliHBTMonPIDContaminationVsPtFctn::~AliHBTMonPIDContaminationVsPtFctn()
 }
 /******************************************************************/
 
-void AliHBTMonPIDContaminationVsPtFctn::Write()
+AliHBTMonPIDContaminationVsPtFctn& AliHBTMonPIDContaminationVsPtFctn::operator=
+                                           (const AliHBTMonPIDContaminationVsPtFctn& /*in*/)
+{
+//assigment operator
+  Error("operator=","Functions can not be copied because of histogram names clashes");
+  return *this;
+}
+/******************************************************************/
+
+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;
    }
   
@@ -247,7 +314,7 @@ void AliHBTMonPIDContaminationVsPtFctn::Init()
   fAll->SetDirectory(0x0);
   fAll->Sumw2();
   
-  if (AliVAODParticle::GetDebug()>0) Info("Init","%s Done.",GetName());
+  AliDebug(1,"Done");
 }
 
 /******************************************************************/
@@ -359,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());
@@ -374,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());
@@ -413,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());
@@ -428,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());
@@ -471,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);
 }
 /*************************************************************/
@@ -490,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);
 }
 /******************************************************************/
@@ -535,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);
 }
 /*************************************************************/
@@ -553,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);
 }
 /******************************************************************/
@@ -634,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);
 }
 /*************************************************************/
@@ -647,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);
 }
 /*************************************************************/
@@ -702,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());
@@ -720,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());