Updated PaintContour() method
[u/mrichter/AliRoot.git] / HBTAN / AliHBTTwoTrackEffFctn.cxx
CommitLineData
67348e59 1#include "AliHBTTwoTrackEffFctn.h"
16f9289f 2//____________________________________________________________________
3//////////////////////////////////////////////////////////////////////
4// //
5// class AliHBTTwoTrackEffFctn //
6// //
7// classes for calculating two track efficiency of the tracking //
8// binning is done using value of simulated pair montum difference //
9// pair must be recontructed, that is why we need both pairs //
10// (simulated and recontructed), thus functions are "two pair" //
11// Piotr.Skowronski@cern.ch //
12// //
13//////////////////////////////////////////////////////////////////////
67348e59 14
15
67348e59 16ClassImp(AliHBTTwoTrackEffFctn)
17/******************************************************************/
18
19AliHBTTwoTrackEffFctn::AliHBTTwoTrackEffFctn()
16f9289f 20{
21 //def ctor
22}
67348e59 23/******************************************************************/
24
16f9289f 25AliHBTTwoTrackEffFctn::AliHBTTwoTrackEffFctn(Int_t nbins, Double_t maxval, Double_t minval):
67348e59 26 AliHBTOnePairFctn1D("TwoTrackEff","Two Track Efficiency",nbins,maxval,minval)
27{
28//contructor
29//nbins - numner of bins of the function
30//maxval - max X of the fctn
31//minval - min X of the fctn
32 GetNumerator()->GetXaxis()->SetTitle("dP [GeV]");
33 GetDenominator()->GetXaxis()->SetTitle("dP [GeV]");
34}
16f9289f 35/******************************************************************/
36
67348e59 37TH1* AliHBTTwoTrackEffFctn::GetResult()
38{
39//returns ratio of numerator and denominator
fc13079c 40 delete fRatio;
41 fRatio = GetRatio(Scale());
42 if(fRatio)
67348e59 43 {
fc13079c 44 fRatio->GetXaxis()->SetTitle("dP [GeV]");
45 fRatio->GetYaxis()->SetTitle("C(dP)");
46 fRatio->SetTitle("Double Track Resolution: dP Correlation Fctn.");
67348e59 47 }
fc13079c 48 return fRatio;
67348e59 49}
50/******************************************************************/
51/******************************************************************/
52/******************************************************************/
8de70730 53ClassImp(AliHBTTwoTrackEffFctnPxPyPz)
67348e59 54
8de70730 55AliHBTTwoTrackEffFctnPxPyPz::AliHBTTwoTrackEffFctnPxPyPz(Int_t nXbins, Double_t maxXval, Double_t minXval,
56 Int_t nYbins, Double_t maxYval, Double_t minYval,
57 Int_t nZbins, Double_t maxZval, Double_t minZval):
58 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
67348e59 59{
8de70730 60//ctor
67348e59 61//Set Axis Title
8de70730 62 fWriteNumAndDen = kTRUE;
63 Rename("tteffpxpypz","P_{x} P_{y} P_{z} Two Track Efficiency Function");
64 if(fNumerator)
65 {
66 fNumerator->GetXaxis()->SetTitle("\\Delta P_{x} [GeV]");
67 fNumerator->GetYaxis()->SetTitle("\\Delta P_{y} [GeV]");
68 fNumerator->GetZaxis()->SetTitle("\\Delta P_{z} [GeV]");
69 }
70
71 if(fDenominator)
72 {
73 fDenominator->GetXaxis()->SetTitle("\\Delta P_{x} [GeV]");
74 fDenominator->GetYaxis()->SetTitle("\\Delta P_{y} [GeV]");
75 fDenominator->GetZaxis()->SetTitle("\\Delta P_{z} [GeV]");
76 }
77
67348e59 78}
16f9289f 79/******************************************************************/
67348e59 80
a22a56ec 81void AliHBTTwoTrackEffFctnPxPyPz::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
67348e59 82{
83//Returns values to be histogrammed
84//it does not
a296aa84 85 x = pair->GetDeltaPx();
86 y = pair->GetDeltaPy();
87 z = pair->GetDeltaPz();
88
89 if (fAbs)
90 {
91 x = TMath::Abs(x);
92 y = TMath::Abs(y);
93 z = TMath::Abs(z);
94 }
67348e59 95}
8de70730 96/******************************************************************/
97
98TH1* AliHBTTwoTrackEffFctnPxPyPz::GetResult()
99{
100//returns ratio of numerator and denominator
101 delete fRatio;
102 fRatio = GetRatio(Scale());
103 return fRatio;
104}
105
106/******************************************************************/
107/******************************************************************/
108/******************************************************************/
109ClassImp(AliHBTTwoTrackEffFctnPtThetaPhi)
110
111AliHBTTwoTrackEffFctnPtThetaPhi::AliHBTTwoTrackEffFctnPtThetaPhi(Int_t nXbins, Double_t maxXval, Double_t minXval,
112 Int_t nYbins, Double_t maxYval, Double_t minYval,
113 Int_t nZbins, Double_t maxZval, Double_t minZval):
114 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
115{
116//ctor
117//Set Axis Title
118 fWriteNumAndDen = kTRUE;
119 Rename("tteffptthetaphi","P_{t} \\theta \\phi Two Track Efficiency Function");
120 if(fNumerator)
121 {
122 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
123 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
124 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
125 }
126
127 if(fDenominator)
128 {
129 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
130 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
131 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
132 }
133}
134/******************************************************************/
135
a22a56ec 136void AliHBTTwoTrackEffFctnPtThetaPhi::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
8de70730 137{
138//Returns values to be histogrammed
139//it does not
a296aa84 140 x = pair->GetDeltaPt();
141 y = pair->GetDeltaTheta();
142 z = pair->GetDeltaPhi();
143
144 if (fAbs)
145 {
146 x = TMath::Abs(x);
147 y = TMath::Abs(y);
148 z = TMath::Abs(z);
149 }
150
8de70730 151}
152/******************************************************************/
153
154TH1* AliHBTTwoTrackEffFctnPtThetaPhi::GetResult()
155{
156//returns ratio of numerator and denominator
157 delete fRatio;
158 fRatio = GetRatio(Scale());
159 if(fRatio)
160 {
161 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
162 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
163 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
164 }
165 return fRatio;
166}