]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTWeightTheorFctn.cxx
Coding violations...
[u/mrichter/AliRoot.git] / HBTAN / AliHBTWeightTheorFctn.cxx
index 4e2f8ed1cfe9a6e7313b4af4427339a85e3ea4cd..69338190bb625cac46128bb2e1fc4f601899f8b7 100644 (file)
@@ -36,7 +36,8 @@ AliHBTWeightTheorQInvFctn::AliHBTWeightTheorQInvFctn(Int_t nbins, Double_t maxXv
  fWriteNumAndDen = kTRUE;//change default behaviour
  Rename("wqinvtheorcf","Q_{inv} Weight Theoretical Correlation Function");
 }
-/****************************************************************/
+/**************************************************************/
+
 void  AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 {
   //Processes Particles and tracks Same different event
@@ -45,12 +46,14 @@ void  AliHBTWeightTheorQInvFctn::ProcessSameEventParticles(AliHBTPair* partpair)
   Double_t weight = partpair->GetWeight();
   if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQInv(),weight);
 } 
-
 /**************************************************************/
+
 TH1* AliHBTWeightTheorQInvFctn::GetResult() 
 {
-  //returns ratio of numerator and denominator
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /*************************************************************/
@@ -68,6 +71,7 @@ AliHBTWeightTheorQOutFctn::AliHBTWeightTheorQOutFctn(Int_t nbins, Double_t maxXv
  Rename("wqouttheorcf","Q_{out} Weight Theoretical Correlation Function");
 }
 /****************************************************************/
+
 void  AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 {
   //Processes Particles and tracks Same different even
@@ -80,8 +84,10 @@ void  AliHBTWeightTheorQOutFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 /**************************************************************/
 TH1* AliHBTWeightTheorQOutFctn::GetResult() 
 {
-  //returns ratio of numerator and denominator
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
 
 /*************************************************************/
@@ -99,6 +105,7 @@ AliHBTWeightTheorQSideFctn::AliHBTWeightTheorQSideFctn(Int_t nbins, Double_t max
  Rename("wqsidetheorcf","Q_{side} Weight Theoretical Correlation Function");
 }
 /****************************************************************/
+
 void  AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 {
   //Processes Particles and tracks Same different even
@@ -107,12 +114,14 @@ void  AliHBTWeightTheorQSideFctn::ProcessSameEventParticles(AliHBTPair* partpair
   Double_t weight = partpair->GetWeight();
   if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQSideCMSLC(),weight);
 } 
-
 /**************************************************************/
+
 TH1* AliHBTWeightTheorQSideFctn::GetResult() 
 {
-  //returns ratio of numerator and denominator
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
 
 /*************************************************************/
@@ -130,6 +139,7 @@ AliHBTWeightTheorQLongFctn::AliHBTWeightTheorQLongFctn(Int_t nbins, Double_t max
  Rename("wqlongtheorcf","Q_{long} Weight Theoretical Correlation Function");
 }
 /****************************************************************/
+
 void  AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 {
   //Processes Particles and tracks Same different even
@@ -138,12 +148,14 @@ void  AliHBTWeightTheorQLongFctn::ProcessSameEventParticles(AliHBTPair* partpair
   Double_t weight = partpair->GetWeight();
   if(TMath::Abs(weight)<=10.) fNumerator->Fill(partpair->GetQLongCMSLC(),weight);
 } 
-
 /**************************************************************/
+
 TH1* AliHBTWeightTheorQLongFctn::GetResult() 
 {
-  //returns ratio of numerator and denominator
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
 
 /*************************************************************/
@@ -157,9 +169,11 @@ AliHBTWeightTheorOSLFctn::AliHBTWeightTheorOSLFctn(Int_t nXbins, Double_t maxXva
                                                    Int_t nZbins, Double_t maxZval, Double_t minZval):
  AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
 {
+  //ctor
   fWriteNumAndDen = kTRUE;//change default behaviour
   Rename("wqosltheorcf","Q_{out}-Q_{side}-Q_{long} Weight Theoretical Correlation Fctn");
 }
+
 /*************************************************************/
 
 void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
@@ -177,6 +191,8 @@ void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair)
 
 TH1* AliHBTWeightTheorOSLFctn::GetResult()
 {
-  //returns ratio of numerator and denominator
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }