Removing redundant printout
[u/mrichter/AliRoot.git] / HBTAN / AliHBTTwoTrackEffFctn.cxx
1 #include "AliHBTTwoTrackEffFctn.h"
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 //////////////////////////////////////////////////////////////////////
14
15
16 ClassImp(AliHBTTwoTrackEffFctn)
17 /******************************************************************/
18
19 AliHBTTwoTrackEffFctn::AliHBTTwoTrackEffFctn()
20 {
21   //def ctor
22 }
23 /******************************************************************/
24
25 AliHBTTwoTrackEffFctn::AliHBTTwoTrackEffFctn(Int_t nbins, Double_t maxval, Double_t minval):
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 }
35 /******************************************************************/
36
37 TH1* AliHBTTwoTrackEffFctn::GetResult()
38 {
39 //returns ratio of numerator and denominator
40  delete fRatio;
41  fRatio = GetRatio(Scale());
42  if(fRatio)
43   {
44    fRatio->GetXaxis()->SetTitle("dP [GeV]");
45    fRatio->GetYaxis()->SetTitle("C(dP)");
46    fRatio->SetTitle("Double Track Resolution: dP Correlation Fctn.");
47   }
48  return fRatio;
49 }
50 /******************************************************************/
51 /******************************************************************/
52 /******************************************************************/
53 ClassImp(AliHBTTwoTrackEffFctnPxPyPz)
54
55 AliHBTTwoTrackEffFctnPxPyPz::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)
59 {
60 //ctor
61 //Set Axis Title
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
78 }
79 /******************************************************************/
80
81 void AliHBTTwoTrackEffFctnPxPyPz::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
82 {
83 //Returns values to be histogrammed
84 //it does not 
85  x = TMath::Abs(pair->GetDeltaPx());
86  y = TMath::Abs(pair->GetDeltaPy());
87  z = TMath::Abs(pair->GetDeltaPz());
88 }
89 /******************************************************************/
90
91 TH1* 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 /******************************************************************/
102 ClassImp(AliHBTTwoTrackEffFctnPtThetaPhi)
103
104 AliHBTTwoTrackEffFctnPtThetaPhi::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
129 void AliHBTTwoTrackEffFctnPtThetaPhi::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
130 {
131 //Returns values to be histogrammed
132 //it does not 
133  x = TMath::Abs(pair->GetDeltaPt());
134  y = TMath::Abs(pair->GetDeltaTheta());
135  z = TMath::Abs(pair->GetDeltaPhi());
136 }
137 /******************************************************************/
138
139 TH1* 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 }