Removing redundant printout
[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
380df697 85 x = TMath::Abs(pair->GetDeltaPx());
86 y = TMath::Abs(pair->GetDeltaPy());
87 z = TMath::Abs(pair->GetDeltaPz());
67348e59 88}
8de70730 89/******************************************************************/
90
91TH1* AliHBTTwoTrackEffFctnPxPyPz::GetResult()
92{
93//returns ratio of numerator and denominator
94 delete fRatio;
95 fRatio = GetRatio(Scale());
96 return fRatio;
97}
98
99/******************************************************************/
100/******************************************************************/
101/******************************************************************/
102ClassImp(AliHBTTwoTrackEffFctnPtThetaPhi)
103
104AliHBTTwoTrackEffFctnPtThetaPhi::AliHBTTwoTrackEffFctnPtThetaPhi(Int_t nXbins, Double_t maxXval, Double_t minXval,
105 Int_t nYbins, Double_t maxYval, Double_t minYval,
106 Int_t nZbins, Double_t maxZval, Double_t minZval):
107 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
108{
109//ctor
110//Set Axis Title
111 fWriteNumAndDen = kTRUE;
112 Rename("tteffptthetaphi","P_{t} \\theta \\phi Two Track Efficiency Function");
113 if(fNumerator)
114 {
115 fNumerator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
116 fNumerator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
117 fNumerator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
118 }
119
120 if(fDenominator)
121 {
122 fDenominator->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
123 fDenominator->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
124 fDenominator->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
125 }
126}
127/******************************************************************/
128
a22a56ec 129void AliHBTTwoTrackEffFctnPtThetaPhi::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
8de70730 130{
131//Returns values to be histogrammed
132//it does not
380df697 133 x = TMath::Abs(pair->GetDeltaPt());
134 y = TMath::Abs(pair->GetDeltaTheta());
135 z = TMath::Abs(pair->GetDeltaPhi());
8de70730 136}
137/******************************************************************/
138
139TH1* AliHBTTwoTrackEffFctnPtThetaPhi::GetResult()
140{
141//returns ratio of numerator and denominator
142 delete fRatio;
143 fRatio = GetRatio(Scale());
144 if(fRatio)
145 {
146 fRatio->GetXaxis()->SetTitle("\\Delta P_{t} [GeV]");
147 fRatio->GetYaxis()->SetTitle("\\Delta \\theta [rad]");
148 fRatio->GetZaxis()->SetTitle("\\Delta \\phi [rad]");
149 }
150 return fRatio;
151}