/* $Id$ */
//_________________________________________________________________________
//
-// class
+// class AliHBTWeightQInvFctn
//
-//This class allows to obtain Q_inv correlation function with weights
-//calculated by Lednicky's alghorithm.
-//Numerator is filled with weighted events. Weights are attributed to reconstructed tracks.
-//Weights are calculated with corresponding simulated particles momenta.
-//Denominator is filled with mixing unweighted reconstructed tracks.
-//One needs both pairs
-//(simulated and recontructed), thus function is of class AliHBTTwoPairFctn1D.
-//Author: Ludmila Malinina, JINR (malinina@sunhe.jinr.ru)
-#include "AliHBTWeightsPID.h"
-
-//--for test--AliHBTWeightQInvFctn* yyy= new AliHBTWeightQInvFctn();
+// This class allows to obtain Q_inv correlation function with weights
+// calculated by Lednicky's alghorithm.
+// Numerator is filled with weighted events. Weights are attributed to reconstructed tracks.
+// Weights are calculated with corresponding simulated particles momenta.
+// Denominator is filled with mixing unweighted reconstructed tracks.
+// One needs both pairs
+// (simulated and recontructed), thus function is of class AliHBTTwoPairFctn1D.
+// Author: Ludmila Malinina, JINR (malinina@sunhe.jinr.ru)
+//
+////////////////////////////////////////////////////////////////////////////////
ClassImp( AliHBTWeightQInvFctn )
Rename("wqinvcf","Q_{inv} Weight Correlation Function");
}
/****************************************************************/
+
void AliHBTWeightQInvFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
{
// Fills the denominator using mixed pairs
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
fDenominator->Fill(trackpair->GetQInv());
}
}
/**************************************************************/
+
TH1* AliHBTWeightQInvFctn::GetResult()
{
//returns ratio of numerator and denominator
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/**************************************************************************************/
Rename("wqoutcf","Q_{out} Weight Correlation Function");
}
/****************************************************************/
+
void AliHBTWeightQOutFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQOutCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQOutLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQOutCMSLC());
+ fDenominator->Fill(trackpair->GetQOutLCMS());
}
}
/**************************************************************/
+
TH1* AliHBTWeightQOutFctn::GetResult()
-
{
-//returns ratio of numerator and denominator
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wqlongcf","Q_{long} Weight Correlation Function");
}
/****************************************************************/
+
void AliHBTWeightQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
- //process particles from same events (fills numerator)
+ //process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQLongCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQLongLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQLongCMSLC());
+ fDenominator->Fill(trackpair->GetQLongLCMS());
}
}
/**************************************************************/
-TH1* AliHBTWeightQLongFctn::GetResult()
-
+TH1* AliHBTWeightQLongFctn::GetResult()
{
-//returns ratio of numerator and denominator
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wqsidecf","Q_{side} Weight Correlation Function");
}
/****************************************************************/
+
void AliHBTWeightQSideFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQSideCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQSideLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQSideCMSLC());
+ fDenominator->Fill(trackpair->GetQSideLCMS());
}
}
/**************************************************************/
+
TH1* AliHBTWeightQSideFctn::GetResult()
-
{
-//returns ratio of numerator and denominator
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wtwokstarcf","2*K^{*} Weight Correlation Function");
}
/****************************************************************/
+
void AliHBTWeightTwoKStarFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
fDenominator->Fill(2.0*(trackpair->GetKStar()));
TH1* AliHBTWeightTwoKStarFctn::GetResult()
{
-//returns ratio of numerator and denominator
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wqoutqsidecf","Q_{out} Q_{side} Weight Correlation Function 2D");
}
/*************************************************************************************/
+
void AliHBTWeightQOutQSideFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQSideCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQSideLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQSideCMSLC());
+ fDenominator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQSideLCMS());
}
}
/**************************************************************/
+
TH1* AliHBTWeightQOutQSideFctn::GetResult()
{
- //returns result
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wqoutqlongcf","Q_{out} Q_{long} Weight Correlation Function 2D");
}
/*************************************************************************************/
+
void AliHBTWeightQOutQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQLongCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQLongLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQOutCMSLC(),trackpair->GetQLongCMSLC());
+ fDenominator->Fill(trackpair->GetQOutLCMS(),trackpair->GetQLongLCMS());
}
}
/**************************************************************/
TH1* AliHBTWeightQOutQLongFctn::GetResult()
{
- //returns result
- return GetRatio(Scale());
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
}
/*************************************************************************************/
Rename("wqsideqlongcf","Q_{side} Q_{long} Weight Correlation Function 2D");
}
/*************************************************************************************/
+
void AliHBTWeightQSideQLongFctn::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair)
{
//process particles from same events (fills numerator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
// Double_t weightPID=1.;
weight=partpair->GetWeight();
}
// Double_t weight=weightHBT*weightPID;
- fNumerator->Fill(trackpair->GetQSideCMSLC(),trackpair->GetQLongCMSLC(),weight);
+ fNumerator->Fill(trackpair->GetQSideLCMS(),trackpair->GetQLongLCMS(),weight);
}
}
/****************************************************************/
{
//process particles from diff events (fills denominator)
trackpair = CheckPair(trackpair);
- partpair = CheckPair(partpair);
+// partpair = CheckPair(partpair);
if ( trackpair && partpair)
{
- fDenominator->Fill(trackpair->GetQSideCMSLC(),trackpair->GetQLongCMSLC());
+ fDenominator->Fill(trackpair->GetQSideLCMS(),trackpair->GetQLongLCMS());
}
}
/**************************************************************/
+
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 = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
+
+ 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)
+ {
+ Double_t out = trackpair->GetQOutLCMS();
+ Double_t side = trackpair->GetQSideLCMS();
+ Double_t lon = trackpair->GetQLongLCMS();
+
+ if (fAbs)
+ {
+ out = TMath::Abs(out);
+ side = TMath::Abs(side);
+ lon = TMath::Abs(lon);
+ }
+
+ fDenominator->Fill(out,side,lon);
+ }
+}
+/*************************************************************/
+
+TH1* AliHBTWeightQOutSQideQLongFctn::GetResult()
+{
+ //returns the scaled ratio
+ delete fRatio;
+ fRatio = GetRatio(Scale());
+ return fRatio;
+}