]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTWeightFctn.cxx
Bug correction
[u/mrichter/AliRoot.git] / HBTAN / AliHBTWeightFctn.cxx
index 606918cb5b520e1fb833455e034c88df4f57c26b..f0538a9367a97d7450d1674c96a33e1b2baff2ac 100644 (file)
@@ -63,7 +63,10 @@ void  AliHBTWeightQInvFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, Ali
 TH1* AliHBTWeightQInvFctn::GetResult()
 { 
 //returns ratio of numerator and denominator                                    
- return GetRatio(Scale());                                                  
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /**************************************************************************************/
@@ -116,8 +119,10 @@ void AliHBTWeightQOutFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliH
 
 TH1* AliHBTWeightQOutFctn::GetResult() 
 { 
-//returns ratio of numerator and denominator                                    
- return GetRatio(Scale());                                                  
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /*************************************************************************************/ 
@@ -167,8 +172,10 @@ void AliHBTWeightQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, Ali
 /**************************************************************/
 TH1* AliHBTWeightQLongFctn::GetResult()
 { 
-//returns ratio of numerator and denominator                                    
- return GetRatio(Scale());                                                  
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /*************************************************************************************/ 
@@ -221,8 +228,10 @@ void  AliHBTWeightQSideFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, Al
 
 TH1* AliHBTWeightQSideFctn::GetResult() 
 { 
-//returns ratio of numerator and denominator                                    
- return GetRatio(Scale());                                                  
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /*************************************************************************************/ 
@@ -274,8 +283,10 @@ void  AliHBTWeightTwoKStarFctn::ProcessDiffEventParticles(AliHBTPair* trackpair,
 TH1* AliHBTWeightTwoKStarFctn::GetResult() 
                                                                                
 { 
-//returns ratio of numerator and denominator                                    
- return GetRatio(Scale());                                                  
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }                    
                                                               
 /*************************************************************************************/ 
@@ -329,8 +340,10 @@ void AliHBTWeightQOutQSideFctn::ProcessDiffEventParticles(AliHBTPair* trackpair,
 
 TH1* AliHBTWeightQOutQSideFctn::GetResult()
 {
-  //returns result
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }
 
 /*************************************************************************************/ 
@@ -384,8 +397,10 @@ void AliHBTWeightQOutQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair,
 
 TH1* AliHBTWeightQOutQLongFctn::GetResult()
 {
-  //returns result
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
 }
 
 /*************************************************************************************/ 
@@ -439,6 +454,69 @@ void AliHBTWeightQSideQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair
 
 TH1* AliHBTWeightQSideQLongFctn::GetResult()
 {
-  //returns result
-  return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
+}
+/*************************************************************/
+/*************************************************************/
+/*************************************************************/ 
+
+ClassImp(AliHBTWeightQOutSQideQLongFctn)
+
+AliHBTWeightQOutSQideQLongFctn::AliHBTWeightQOutSQideQLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
+                                                   Int_t nYbins, Double_t maxYval, Double_t minYval,
+                                                   Int_t nZbins, Double_t maxZval, Double_t minZval):
+ AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
+{
+  //ctor
+  fWriteNumAndDen = kTRUE;//change default behaviour
+  Rename("wqoslcf","Q_{out}-Q_{side}-Q_{long} Weight Correlation Fctn");
 }
+/*************************************************************/
+
+void AliHBTWeightQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
+{
+//Fills numerator
+  //process particles from same events (fills numerator)
+  trackpair = CheckPair(trackpair);
+  partpair  = CheckPair(partpair);
+  if ( trackpair && partpair)     
+  {
+//    Double_t weightPID=1.;
+    Double_t weight = 1.0;
+    if ( ( trackpair->Particle1()->GetPdgCode() == partpair->Particle1()->GetPdgCode()) &&
+         ( trackpair->Particle2()->GetPdgCode() == partpair->Particle2()->GetPdgCode())    )
+      {   
+         weight=partpair->GetWeight();//here we take weight from the particle pair
+      }   
+//    Double_t weight=weightHBT*weightPID;
+    Double_t out = TMath::Abs(trackpair->GetQOutCMSLC());
+    Double_t side = TMath::Abs(trackpair->GetQSideCMSLC());
+    Double_t lon = TMath::Abs(trackpair->GetQLongCMSLC());
+    fNumerator->Fill(out,side,lon,weight);//here we fill in q's corresponding to track pair 
+                                          //weight calculated for the simulated one
+  }
+}
+/*************************************************************/
+
+void AliHBTWeightQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
+{
+  //process particles from diff events (fills denominator)
+  trackpair = CheckPair(trackpair);
+  partpair  = CheckPair(partpair);
+  if ( trackpair && partpair)  
+   {
+     fDenominator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQSideCMSLC(),trackpair->GetQLongCMSLC());
+   }
+}
+/*************************************************************/
+
+TH1* AliHBTWeightQOutSQideQLongFctn::GetResult()
+{
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
+}