]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HBTAN/AliHBTTwoTrackEffFctn.cxx
Additional SAVE statements comented out in case of blank SAVE
[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 = 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   }
95 }
96 /******************************************************************/
97
98 TH1* 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 /******************************************************************/
109 ClassImp(AliHBTTwoTrackEffFctnPtThetaPhi)
110
111 AliHBTTwoTrackEffFctnPtThetaPhi::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
136 void AliHBTTwoTrackEffFctnPtThetaPhi::GetValues(AliHBTPair* pair, Double_t& x, Double_t&y ,Double_t& z) const
137 {
138 //Returns values to be histogrammed
139 //it does not 
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  
151 }
152 /******************************************************************/
153
154 TH1* 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 }