]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTasCorrFctn.cxx
Incedent angle correction fixed
[u/mrichter/AliRoot.git] / HBTAN / AliHBTasCorrFctn.cxx
index 13bef0beb750d548682f37cd159cf7e1531c9aa9..357f62d5cc21dc8a8f5a15e1c619cb1b4925bcfd 100644 (file)
@@ -1,7 +1,25 @@
-#include "AliHBTasCorrFctn.h"
+/**************************************************************************
+ * Copyright(c) 1998-2002, 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 <TH1.h>
 #include <TObjArray.h>
+#include <Riostream.h>
 
+#include "AliHBTasCorrFctn.h"
 
 ///////////////////////////////////////////////////////
 //                                                   //
@@ -63,7 +81,7 @@ AliHBTasCorrFctn::~AliHBTasCorrFctn()
 }
 
 /******************************************************************/
-void AliHBTasCorrFctn::Write()
+Int_t AliHBTasCorrFctn::Write(const char*,Int_t, Int_t)
 {
 //out    
      Int_t i;
@@ -83,7 +101,7 @@ void AliHBTasCorrFctn::Write()
          den->Write();
          rat.Write();
      }
-
+     return 0;
 }
 
 //-------------------------------------
@@ -117,7 +135,7 @@ void AliHBTasCorrFctn::Init()
 
 void AliHBTasCorrFctn::ProcessDiffEventParticles(AliHBTPair* pair)
 {
-     
+//fills denumerator with data from different events 
      Double_t rplane=0.;   //reaction plane angle - 2 B determined
      Double_t phi=(pair->Particle1()->Phi()+pair->Particle2()->Phi())/2.-rplane; //deltaphi bo nie mam nic innego pod reka
      phi=phi*360/(2*TMath::Pi());
@@ -139,14 +157,16 @@ void AliHBTasCorrFctn::ProcessDiffEventParticles(AliHBTPair* pair)
 /******************************************************************/
 
 
-void AliHBTasCorrFctn::SetParams(Int_t nbins, Float_t maxXval, Float_t minXval){
-     fnbins=nbins;
+void AliHBTasCorrFctn::SetParams(Int_t nbins, Float_t maxXval, Float_t minXval)
+{
+//sets parameters for histograms
+       fnbins=nbins;
      fmaxXval= maxXval;
      fminXval=minXval;
 }
 TH1* AliHBTasCorrFctn::GetResult()
 {
-       
+//does nothing, it can as well have nothing inside, its just for class to work normally
      TH1D *den = ((TH1D*)fDen->UncheckedAt(1));
      return den;
  }
@@ -164,7 +184,7 @@ AliHBTasCorrFctn(name,title,nbins,maxXval,minXval)
 
 void AliHBTQOutasCorrFctn::BuildHistos()
 {
-    
+//builds histograms
      Int_t i;
      int n=GetNumberOfIntervals();
 
@@ -176,9 +196,9 @@ void AliHBTQOutasCorrFctn::BuildHistos()
      
 
      
-     TH1D *Num;
-     TH1D *Den;
-     TH1D *Rat;
+     TH1D *num;
+     TH1D *den;
+     TH1D *rat;
      
      TString nameNum = "NumOut";
      TString nameDen = "DenOut";
@@ -194,21 +214,21 @@ void AliHBTQOutasCorrFctn::BuildHistos()
          nameRat +=TString(buff);
          
          
-         Num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
-         Den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
-         Rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
+         num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
+         den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
+         rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
          
-         Num->Sumw2();
-         Den->Sumw2();
-         Rat->Sumw2();
+         num->Sumw2();
+         den->Sumw2();
+         rat->Sumw2();
          
-         Num->Reset();
-         Den->Reset();
-         Rat->Reset();
+         num->Reset();
+         den->Reset();
+         rat->Reset();
          
-         fNum->Add(Num);
-         fDen->Add(Den);
-         fRat->Add(Rat);
+         fNum->Add(num);
+         fDen->Add(den);
+         fRat->Add(rat);
          
          nameNum = TString("NumOut");
          nameDen = TString("DenOut");
@@ -230,7 +250,7 @@ AliHBTasCorrFctn(name,title,nbins,maxXval,minXval)
 
 void AliHBTQSideasCorrFctn::BuildHistos()
 {
-    
+//builds histograms
      Int_t i;
      int n=GetNumberOfIntervals();
      int nbins=Getnbins();
@@ -241,9 +261,9 @@ void AliHBTQSideasCorrFctn::BuildHistos()
      
 
      
-     TH1D *Num;
-     TH1D *Den;
-     TH1D *Rat;
+     TH1D *num;
+     TH1D *den;
+     TH1D *rat;
      
      TString nameNum = "NumSide";
      TString nameDen = "DenSide";
@@ -259,21 +279,21 @@ void AliHBTQSideasCorrFctn::BuildHistos()
          nameRat +=TString(buff);
          
          
-         Num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
-         Den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
-         Rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
+         num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
+         den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
+         rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
          
-         Num->Sumw2();
-         Den->Sumw2();
-         Rat->Sumw2();
+         num->Sumw2();
+         den->Sumw2();
+         rat->Sumw2();
          
-         Num->Reset();
-         Den->Reset();
-         Rat->Reset();
+         num->Reset();
+         den->Reset();
+         rat->Reset();
          
-         fNum->Add(Num);
-         fDen->Add(Den);
-         fRat->Add(Rat);
+         fNum->Add(num);
+         fDen->Add(den);
+         fRat->Add(rat);
          
          nameNum = TString("NumSide");
          nameDen = TString("DenSide");
@@ -295,7 +315,7 @@ AliHBTasCorrFctn(name,title,nbins,maxXval,minXval)
 
 void AliHBTQLongasCorrFctn::BuildHistos()
 {
-    
+//builds histograms
      Int_t i;
      int n=GetNumberOfIntervals();
      int nbins=Getnbins();
@@ -306,9 +326,9 @@ void AliHBTQLongasCorrFctn::BuildHistos()
      
 
      
-     TH1D *Num;
-     TH1D *Den;
-     TH1D *Rat;
+     TH1D *num;
+     TH1D *den;
+     TH1D *rat;
      
      TString nameNum = "NumLong";
      TString nameDen = "DenLong";
@@ -324,21 +344,21 @@ void AliHBTQLongasCorrFctn::BuildHistos()
          nameRat +=TString(buff);
          
          
-         Num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
-         Den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
-         Rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
+         num = new TH1D(nameNum.Data(),nameNum.Data(),nbins,min,max);
+         den = new TH1D(nameDen.Data(),nameDen.Data(),nbins,min,max);
+         rat = new TH1D(nameRat.Data(),nameRat.Data(),nbins,min,max);
          
-         Num->Sumw2();
-         Den->Sumw2();
-         Rat->Sumw2();
+         num->Sumw2();
+         den->Sumw2();
+         rat->Sumw2();
          
-         Num->Reset();
-         Den->Reset();
-         Rat->Reset();
+         num->Reset();
+         den->Reset();
+         rat->Reset();
          
-         fNum->Add(Num);
-         fDen->Add(Den);
-         fRat->Add(Rat);
+         fNum->Add(num);
+         fDen->Add(den);
+         fRat->Add(rat);
          
          nameNum = TString("NumLong");
          nameDen = TString("DenLong");