1 /***************************************************************************
3 * $Id: AliFemtoQinvCorrFctnEMCIC.cxx $
5 * Author: Nicolas Bock, Ohio State University, bock@mps.ohio-state.edu
6 ***************************************************************************
8 * Description: Calculates of the Qinv Correlation Function, and also
9 * produces histograms to calculate EMCICs
11 ***************************************************************************
13 **************************************************************************/
16 #include "AliFemtoQinvCorrFctnEMCIC.h"
17 //#include "AliFemtoHisto.h"
22 ClassImp(AliFemtoQinvCorrFctnEMCIC)
25 //____________________________
26 AliFemtoQinvCorrFctnEMCIC::AliFemtoQinvCorrFctnEMCIC(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
27 AliFemtoQinvCorrFctn(title, nbins, QinvLo, QinvHi),
40 // set up emcic histograms
41 char tTitESum[100] = "ESumReal";
42 strcat(tTitESum,title);
43 fESumReal = new TH1D(tTitESum,title,nbins,QinvLo,QinvHi);
44 char tTitEMult[100] = "EMultReal";
45 strcat(tTitEMult,title);
46 fEMultReal = new TH1D(tTitEMult,title,nbins,QinvLo,QinvHi);
47 char tTitPt[100] = "PtMultReal";
49 fPtMultReal = new TH1D(tTitPt,title,nbins,QinvLo,QinvHi);
50 char tTitPz[100] = "PzMultReal";
52 fPzMultReal = new TH1D(tTitPz,title,nbins,QinvLo,QinvHi);
54 char tTitESum2[100] = "ESumMix";
55 strcat(tTitESum2,title);
56 fESumMix = new TH1D(tTitESum2,title,nbins,QinvLo,QinvHi);
57 char tTitEMult2[100] = "EMultMix";
58 strcat(tTitEMult2,title);
59 fEMultMix = new TH1D(tTitEMult2,title,nbins,QinvLo,QinvHi);
60 char tTitPt2[100] = "PtMultMix";
61 strcat(tTitPt2,title);
62 fPtMultMix = new TH1D(tTitPt2,title,nbins,QinvLo,QinvHi);
63 char tTitPz2[100] = "PzMultMix";
64 strcat(tTitPz2,title);
65 fPzMultMix = new TH1D(tTitPz2,title,nbins,QinvLo,QinvHi);
69 // to enable error bar calculation...
81 //____________________________
82 AliFemtoQinvCorrFctnEMCIC::AliFemtoQinvCorrFctnEMCIC(const AliFemtoQinvCorrFctnEMCIC& aCorrFctn) :
83 AliFemtoQinvCorrFctn(aCorrFctn),
95 fESumReal= new TH1D(*aCorrFctn.fESumReal);
96 fEMultReal= new TH1D(*aCorrFctn.fEMultReal);
97 fPtMultReal= new TH1D(*aCorrFctn.fPtMultReal);
98 fPzMultReal= new TH1D(*aCorrFctn.fPzMultReal);
99 fESumMix= new TH1D(*aCorrFctn.fESumMix);
100 fEMultMix= new TH1D(*aCorrFctn.fEMultMix);
101 fPtMultMix= new TH1D(*aCorrFctn.fPtMultMix);
102 fPzMultMix= new TH1D(*aCorrFctn.fPzMultMix);
105 //____________________________
106 AliFemtoQinvCorrFctnEMCIC::~AliFemtoQinvCorrFctnEMCIC(){
119 //_________________________
120 AliFemtoQinvCorrFctnEMCIC& AliFemtoQinvCorrFctnEMCIC::operator=(const AliFemtoQinvCorrFctnEMCIC& aCorrFctn)
122 // assignment operator
123 if (this == &aCorrFctn)
126 if (fESumReal) delete fESumReal;
127 fESumReal= new TH1D(*aCorrFctn.fESumReal);
128 if (fEMultReal) delete fEMultReal;
129 fEMultReal= new TH1D(*aCorrFctn.fEMultReal);
130 if (fPtMultReal) delete fPtMultReal;
131 fPtMultReal= new TH1D(*aCorrFctn.fPtMultReal);
132 if (fPzMultReal) delete fPzMultReal;
133 fPzMultReal= new TH1D(*aCorrFctn.fPzMultReal);
134 if (fESumMix) delete fESumMix;
135 fESumMix= new TH1D(*aCorrFctn.fESumMix);
136 if (fEMultMix) delete fEMultMix;
137 fEMultMix= new TH1D(*aCorrFctn.fEMultMix);
138 if (fPtMultMix) delete fPtMultMix;
139 fPtMultMix= new TH1D(*aCorrFctn.fPtMultMix);
140 if (fPzMultMix) delete fPzMultMix;
141 fPzMultMix= new TH1D(*aCorrFctn.fPzMultMix);
146 //____________________________
147 void AliFemtoQinvCorrFctnEMCIC::AddRealPair(AliFemtoPair* pair){
150 if (!fPairCut->Pass(pair)) return;
152 double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
155 // The EMCICs are calculated here for real pairs
156 AliFemtoLorentzVector tMom1 = pair->Track1()->FourMomentum();
157 AliFemtoLorentzVector tMom2 = pair->Track2()->FourMomentum();
158 double tE1 = tMom1.e();
159 double tE2 = tMom2.e();
160 double tPz1 = tMom1.pz();
161 double tPz2 = tMom2.pz();
165 tPt1.Set(tMom1.px(),tMom1.py());
166 tPt2.Set(tMom2.px(),tMom2.py());
167 double tPt1DotPt2=tPt1*tPt2;
169 fESumReal->Fill(tQinv,tE1+tE2);
170 fEMultReal->Fill(tQinv,tE1*tE2);
171 fPzMultReal->Fill(tQinv,tPz1*tPz2);
172 fPtMultReal->Fill(tQinv,tPt1DotPt2);
175 //____________________________
176 void AliFemtoQinvCorrFctnEMCIC::AddMixedPair(AliFemtoPair* pair){
177 // add mixed (background) pair
179 if (!fPairCut->Pass(pair)) return;
181 double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
184 // The EMCICs are calculated here for mixed pairs
185 AliFemtoLorentzVector tMom1 = pair->Track1()->FourMomentum();
186 AliFemtoLorentzVector tMom2 = pair->Track2()->FourMomentum();
187 double tE1 = tMom1.e();
188 double tE2 = tMom2.e();
189 double tPz1 = tMom1.pz();
190 double tPz2 = tMom2.pz();
194 tPt1.Set(tMom1.px(),tMom1.py());
195 tPt2.Set(tMom2.px(),tMom2.py());
196 double tPt1DotPt2=tPt1*tPt2;
198 fESumMix->Fill(tQinv,tE1+tE2);
199 fEMultMix->Fill(tQinv,tE1*tE2);
200 fPzMultMix->Fill(tQinv,tPz1*tPz2);
201 fPtMultMix->Fill(tQinv,tPt1DotPt2);
206 //____________________________
207 void AliFemtoQinvCorrFctnEMCIC::Write(){
208 // Write out neccessary objects
212 fPtMultReal->Write();
213 fPzMultReal->Write();
220 //______________________________
221 TList* AliFemtoQinvCorrFctnEMCIC::GetOutputList()
223 // Prepare the list of objects to be written to the output
224 TList *tOutputList = new TList();
226 cout << "Getting list from Qinv CF emicic" << endl;
227 tOutputList->Add(fESumReal);
228 tOutputList->Add(fEMultReal);
229 tOutputList->Add(fPtMultReal);
230 tOutputList->Add(fPzMultReal);
231 tOutputList->Add(fESumMix);
232 tOutputList->Add(fEMultMix);
233 tOutputList->Add(fPtMultMix);
234 tOutputList->Add(fPzMultMix);