Update by Ludmila Malinina
[u/mrichter/AliRoot.git] / HBTAN / AliHBTLLWeightFctn.cxx
CommitLineData
7f92929e 1#include "AliHBTLLWeightFctn.h"
2#include "AliHBTLLWeights.h"
2f8eea63 3#include "AliHBTLLWeightsPID.h"
7f92929e 4
5//--for test--AliHBTLLWeightQInvFctn* yyy= new AliHBTLLWeightQInvFctn();
6
7ClassImp( AliHBTLLWeightQInvFctn )
8/****************************************************************/
9AliHBTLLWeightQInvFctn::AliHBTLLWeightQInvFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
10 AliHBTTwoPairFctn1D(nbins,maxXval,minXval)
11{
2f8eea63 12//ctor
7f92929e 13}
14/****************************************************************/
15void AliHBTLLWeightQInvFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
16{
2f8eea63 17//Processes Particles and tracks Same different even
7f92929e 18 trackpair = CheckPair(trackpair);
19 partpair = CheckPair(partpair);
20 if ( trackpair && partpair)
21 {
2f8eea63 22 Double_t weightPID=1.;
23 Double_t weightHBT=AliHBTLLWeights::Instance()->GetWeight(partpair);
24 Double_t weight=weightHBT*weightPID;
25 if(TMath::Abs(weight)<=10.) fNumerator->Fill(trackpair->GetQInv(),weight);
7f92929e 26 }
7f92929e 27}
7f92929e 28/****************************************************************/
2f8eea63 29
30void AliHBTLLWeightQInvFctn::ProcessDiffEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
7f92929e 31{
32 trackpair = CheckPair(trackpair);
33 partpair = CheckPair(partpair);
34 if ( trackpair && partpair)
35 {
36 fDenominator->Fill(trackpair->GetQInv());
37 }
38}
39/**************************************************************/
40TH1* AliHBTLLWeightQInvFctn::GetResult()
41
42{
43//returns ratio of numerator and denominator
44 TH1* res = GetRatio(Scale());
45
2f8eea63 46 if(res)
47 {
7f92929e 48 res->GetXaxis()->SetTitle("Qinv [GeV/c]");
49 res->GetYaxis()->SetTitle("C(Qinv)");
2f8eea63 50 res->SetTitle("Correlation function, method of weights(Lednicky's algorithm).");
51 }
7f92929e 52 return res;
53}
54