Update by Ludmila Malinina
[u/mrichter/AliRoot.git] / HBTAN / AliHBTLLWeightFctn.cxx
index b840975aba79e33d6ef1af70ba94bdafc2f7c1f8..6da2224bbc9c8f07ffc7ac441ca1724cfac21409 100644 (file)
@@ -1,6 +1,6 @@
-#include <Riostream.h>
 #include "AliHBTLLWeightFctn.h"
 #include "AliHBTLLWeights.h"
+#include "AliHBTLLWeightsPID.h"
 
 //--for test--AliHBTLLWeightQInvFctn* yyy= new AliHBTLLWeightQInvFctn();
 
@@ -9,25 +9,25 @@ ClassImp( AliHBTLLWeightQInvFctn )
 AliHBTLLWeightQInvFctn::AliHBTLLWeightQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
            AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
 {
-  Rename("Correlation function, method of weights(Lednicky's algorithm)");
+//ctor
 }
 /****************************************************************/
 void  AliHBTLLWeightQInvFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
-
+//Processes Particles and tracks Same different even
   trackpair = CheckPair(trackpair);
   partpair  = CheckPair(partpair);
   if ( trackpair && partpair)     
   {
-     fNumerator->Fill(trackpair->GetQInv(),
-          AliHBTLLWeights::Instance()->GetWeight(partpair));
+    Double_t weightPID=1.;
+    Double_t weightHBT=AliHBTLLWeights::Instance()->GetWeight(partpair);
+    Double_t weight=weightHBT*weightPID;
+    if(TMath::Abs(weight)<=10.) fNumerator->Fill(trackpair->GetQInv(),weight);
   }
-  
 } 
-                
-
 /****************************************************************/
- void  AliHBTLLWeightQInvFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
+
+void  AliHBTLLWeightQInvFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
 {
   trackpair = CheckPair(trackpair);
   partpair  = CheckPair(partpair);
@@ -43,12 +43,12 @@ TH1* AliHBTLLWeightQInvFctn::GetResult()
 //returns ratio of numerator and denominator                                    
  TH1* res = GetRatio(Scale());                                                  
   
- if(res)
-   {                                                                             
+ if(res)                                                                        
+    {                                                                             
     res->GetXaxis()->SetTitle("Qinv [GeV/c]");                                       
     res->GetYaxis()->SetTitle("C(Qinv)");                                          
-    res->SetTitle(GetTitle());
-   }                                                                             
+    res->SetTitle("Correlation function, method of weights(Lednicky's algorithm).");              
+     }                                                                             
   return res;                                                                     
 }