]>
Commit | Line | Data |
---|---|---|
de383542 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // author: Manuel Colocci <manuel.colocci@cern.ch> | |
17 | ||
983b8a42 | 18 | #include "AliAnalysisNucleiMass.h" |
19 | ||
20 | // ROOT includes | |
21 | #include <TMath.h> | |
22 | #include "TChain.h" | |
23 | ||
24 | // AliRoot includes | |
25 | #include "AliInputEventHandler.h" | |
26 | #include "AliAODEvent.h" | |
27 | #include "AliESDEvent.h" | |
28 | #include "AliVEvent.h" | |
29 | #include "AliAODTrack.h" | |
30 | #include "AliAODPid.h" | |
31 | #include "AliCentrality.h" | |
32 | #include "TH2F.h" | |
33 | #include "TH2D.h" | |
34 | #include "TH1F.h" | |
35 | #include "TF1.h" | |
36 | #include "TGraph.h" | |
37 | #include "TProfile.h" | |
38 | #include "AliESDtrackCuts.h" | |
39 | #include "AliAnalysisManager.h" | |
24395a5c | 40 | #include "TFile.h" |
983b8a42 | 41 | |
42 | ClassImp(AliAnalysisNucleiMass) | |
43 | ||
44 | //_____________________________________________________________________________ | |
45 | AliAnalysisNucleiMass::AliAnalysisNucleiMass(): | |
46 | AliAnalysisTaskSE(), | |
de383542 | 47 | //Centrality(NULL), |
48 | FilterBit(16), | |
49 | // EtaLimit(NULL), | |
50 | DCAxyCut(0.1), | |
51 | DCAzCut(1000.), | |
52 | NsigmaTpcCut(2.0), | |
53 | NminTpcCluster(0), | |
54 | iTrdCut(0), | |
55 | kSignalCheck(1), | |
56 | iMtof(1), | |
57 | iBconf(0), | |
58 | kTOF(0), | |
59 | fAOD(NULL), | |
983b8a42 | 60 | fESD(NULL), |
61 | fEvent(NULL), | |
de383542 | 62 | fPIDResponse(NULL) |
983b8a42 | 63 | { |
de383542 | 64 | fList[0]=new TList(); |
65 | fList[0]->SetName("results"); | |
bfb9094a | 66 | |
de383542 | 67 | fList[1]=new TList(); |
68 | fList[1]->SetName("results2"); | |
983b8a42 | 69 | } |
70 | //______________________________________________________________________________ | |
71 | AliAnalysisNucleiMass::AliAnalysisNucleiMass(const char *name): | |
72 | AliAnalysisTaskSE(name), | |
de383542 | 73 | //Centrality(NULL), |
74 | FilterBit(16), | |
75 | //EtaLimit(NULL), | |
76 | DCAxyCut(0.1), | |
77 | DCAzCut(1000.), | |
78 | NsigmaTpcCut(2.0), | |
79 | NminTpcCluster(0), | |
80 | iTrdCut(0), | |
81 | kSignalCheck(1), | |
82 | iMtof(1), | |
83 | iBconf(0), | |
84 | kTOF(0), | |
983b8a42 | 85 | fAOD(NULL), |
86 | fESD(NULL), | |
87 | fEvent(NULL), | |
de383542 | 88 | fPIDResponse(NULL) |
983b8a42 | 89 | { |
de383542 | 90 | fList[0]=new TList(); |
983b8a42 | 91 | DefineOutput(1, TList::Class()); |
de383542 | 92 | fList[0]->SetName("results"); |
bfb9094a | 93 | |
de383542 | 94 | fList[1]=new TList(); |
bfb9094a | 95 | DefineOutput(2, TList::Class()); |
de383542 | 96 | fList[1]->SetName("results2"); |
983b8a42 | 97 | } |
98 | //_____________________________________________________________________________ | |
99 | AliAnalysisNucleiMass::~AliAnalysisNucleiMass() | |
100 | { | |
de383542 | 101 | if(fList[0]) delete fList[0]; |
102 | if(fList[1]) delete fList[1]; | |
983b8a42 | 103 | } |
104 | //______________________________________________________________________________ | |
105 | void AliAnalysisNucleiMass::UserCreateOutputObjects() | |
106 | { | |
de383542 | 107 | Char_t namePart[nPart][30]; |
108 | snprintf(namePart[0],30,"e"); | |
109 | snprintf(namePart[1],30,"#mu"); | |
110 | snprintf(namePart[2],30,"#pi"); | |
111 | snprintf(namePart[3],30,"K"); | |
112 | snprintf(namePart[4],30,"p"); | |
113 | snprintf(namePart[5],30,"d"); | |
114 | snprintf(namePart[6],30,"t"); | |
115 | snprintf(namePart[7],30,"He3"); | |
116 | snprintf(namePart[8],30,"He4"); | |
983b8a42 | 117 | |
de383542 | 118 | Char_t name[nSpec][30]; |
119 | snprintf(name[0],20,"e^{+}"); | |
120 | snprintf(name[1],20,"#mu^{+}"); | |
121 | snprintf(name[2],20,"#pi^{+}"); | |
122 | snprintf(name[3],20,"K^{+}"); | |
123 | snprintf(name[4],20,"p"); | |
124 | snprintf(name[5],20,"d"); | |
125 | snprintf(name[6],20,"t"); | |
126 | snprintf(name[7],20,"He3"); | |
127 | snprintf(name[8],20,"He4"); | |
128 | snprintf(name[9],20,"e^{-}"); | |
129 | snprintf(name[10],20,"#mu^{-}"); | |
130 | snprintf(name[11],20,"#pi^{-}"); | |
131 | snprintf(name[12],20,"K^{-}"); | |
132 | snprintf(name[13],20,"#bar{p}"); | |
133 | snprintf(name[14],20,"#bar{d}"); | |
134 | snprintf(name[15],20,"#bar{t}"); | |
135 | snprintf(name[16],20,"#bar{He3}"); | |
136 | snprintf(name[17],20,"#bar{He4}"); | |
137 | ||
138 | Double_t binPt[nbin+1]; | |
139 | for(Int_t i=0;i<nbin+1;i++) { | |
140 | binPt[i]=0.4+0.1*i; | |
141 | } | |
142 | ||
143 | Char_t name_nbin[nbin][200]; | |
144 | for(Int_t j=0;j<nbin;j++) { | |
145 | snprintf(name_nbin[j],200,"%.1f<Pt<%.1f",binPt[j],binPt[j+1]); | |
146 | } | |
147 | ||
148 | for(Int_t iB=0;iB<nBconf;iB++) { | |
983b8a42 | 149 | |
de383542 | 150 | htemp[iB] = new TH1F("htemp","htemp (avoid the problem with the empty list...);B field",20,-10,10); |
3f2b4d7b | 151 | |
de383542 | 152 | hCentrality[iB][0] = new TH1F("hCentrality_Selected","Centrality (selected events);centrality(%)",20,0,100); |
153 | hCentrality[iB][1] = new TH1F("hCentrality_Analyzed","Centrality (analyzed events);centrality (%)",20,0,100); | |
bfb9094a | 154 | |
de383542 | 155 | hZvertex[iB][0] = new TH1F("hZvertex_Selected","Vertex distribution of selected events;z vertex (cm)",240,-30,30); |
156 | hZvertex[iB][1] = new TH1F("hZvertex_Analyzed","Vertex distribution of analyzed events;z vertex (cm)",240,-30,30); | |
bfb9094a | 157 | |
de383542 | 158 | hEta[iB] = new TH1F("hEta_Analyzed","|#eta| distribution after the track cuts;|#eta|",100,0.0,1.0); |
bfb9094a | 159 | |
de383542 | 160 | hPhi[iB] = new TH1F("hPhi_Analyzed","#phi distribution after the track cuts;#phi (rad.)",90,0,6.3);//Each TRD supermodule is divided for 5 (DeltaPhi(TRD)=0.35 theoretical) |
bfb9094a | 161 | |
de383542 | 162 | Int_t hbins[2]={1,1}; |
163 | if(kSignalCheck>1) {hbins[0]=100; hbins[1]=90;} | |
164 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
165 | fEtaPhi[iB] = new TH2F("fEtaPhi_Analyzed","|#eta| vs. #phi after the track cuts;|#eta|;#phi (rad.)",hbins[0],0.0,1.0,hbins[1],0,6.3); | |
38fdd8e0 | 166 | |
de383542 | 167 | hNTpcCluster[iB] = new TH1F("hNTpcCluster","Number of the TPC clusters after the track cuts;n_{cl}^{TPC}",300,0,300); |
38fdd8e0 | 168 | |
de383542 | 169 | hNTrdSlices[iB] = new TH1F("hNTrdSlices","Number of the TRD slices after the track cuts;n_{slices}^{TRD}",40,0,40); |
38fdd8e0 | 170 | |
de383542 | 171 | if(kSignalCheck==1) {hbins[0]=500; hbins[1]=2000;} |
172 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
173 | else if(kSignalCheck==2) {hbins[0]=100; hbins[1]=500;} | |
174 | fdEdxVSp[iB][0] = new TH2F("fdEdxVSp_pos","dE/dx vs p (positive charge); p/|z| (GeV/c); dE/dx_{TPC} (a.u.)",hbins[0],0,5,hbins[1],0,1000); | |
175 | fdEdxVSp[iB][1] = new TH2F("fdEdxVSp_neg","dE/dx vs p (negative charge); p/|z| (GeV/c); dE/dx_{TPC} (a.u.)",hbins[0],0,5,hbins[1],0,1000); | |
38fdd8e0 | 176 | |
de383542 | 177 | Char_t name_hDeDxExp[nPart][200]; |
178 | Char_t title_hDeDxExp[nPart][200]; | |
179 | for(Int_t i=0;i<nPart;i++) { | |
180 | snprintf(name_hDeDxExp[i],200,"hDeDxExp_%s",namePart[i]); | |
181 | snprintf(title_hDeDxExp[i],200,"Expected dE/dx of %s in the TPC;p/|z| (GeV/c);dE/dx_{TPC} (a.u.)",namePart[i]); | |
182 | hDeDxExp[iB][i] = new TProfile(name_hDeDxExp[i],title_hDeDxExp[i],500,0,5,0,1000,""); | |
38fdd8e0 | 183 | } |
38fdd8e0 | 184 | |
de383542 | 185 | Char_t name_fNsigmaTpc[nPart][200]; |
186 | Char_t title_fNsigmaTpc[nPart][200]; | |
187 | if(kSignalCheck==1) {hbins[0]=100; hbins[1]=100;} | |
188 | else {hbins[0]=1; hbins[1]=1;} | |
189 | for(Int_t i=0;i<nPart;i++) { | |
190 | snprintf(name_fNsigmaTpc[i],200,"NsigmaTpc_%s",namePart[i]); | |
191 | snprintf(title_fNsigmaTpc[i],200,"NsigmaTpc_%s;p_{TPC}/|z| (GeV/c);n_{#sigma_{TPC}}^{%s}",namePart[i],namePart[i]); | |
192 | fNsigmaTpc[iB][i] = new TH2F(name_fNsigmaTpc[i],title_fNsigmaTpc[i],hbins[0],0,5,hbins[1],-5,5); | |
3f2b4d7b | 193 | } |
194 | ||
de383542 | 195 | if(kSignalCheck>1) {hbins[0]=100; hbins[1]=100;} |
196 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
197 | Char_t name_fNsigmaTpc_kTOF[nSpec][200]; | |
198 | Char_t title_fNsigmaTpc_kTOF[nSpec][200]; | |
199 | for(Int_t i=0;i<nSpec;i++) { | |
200 | snprintf(name_fNsigmaTpc_kTOF[i],200,"NsigmaTpc_%s_kTOF",name[i]); | |
201 | snprintf(title_fNsigmaTpc_kTOF[i],200,"NsigmaTpc_kTOF_%s in DCAxyCut;p_{T}/|z| (GeV/c);n_{#sigma_{TPC}}^{%s}",name[i],name[i]); | |
202 | fNsigmaTpc_kTOF[iB][i] = new TH2F(name_fNsigmaTpc_kTOF[i],title_fNsigmaTpc_kTOF[i],hbins[0],0,5,hbins[1],-5,5); | |
3f2b4d7b | 203 | } |
204 | ||
de383542 | 205 | if(kSignalCheck==1) {hbins[0]=1000; hbins[1]=1300;} |
206 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
207 | else if(kSignalCheck==2) {hbins[0]=100; hbins[1]=260;} | |
208 | fBetaTofVSp[iB][0] = new TH2F("fBetaTofVSp_pos","#beta_{TOF} vs p/|z| (positive charge);p(GeV/c);#beta_{TOF}",hbins[0],0,5,hbins[1],0.4,1.05); | |
209 | fBetaTofVSp[iB][1] = new TH2F("fBetaTofVSp_neg","#beta_{TOF} vs p/|z| (negative charge);p(GeV/c);#beta_{TOF}",hbins[0],0,5,hbins[1],0.4,1.05); | |
210 | ||
211 | Char_t name_hBetaExp[nPart][200]; | |
212 | Char_t title_hBetaExp[nPart][200]; | |
213 | for(Int_t i=0;i<nPart;i++) { | |
214 | snprintf(name_hBetaExp[i],200,"hBetaTofVsP_Exp_%s",namePart[i]); | |
215 | snprintf(title_hBetaExp[i],200,"Expected #beta_{TOF} vs p/|z| of %s;p/|z| (GeV/c); #beta_{TOF}",namePart[i]); | |
216 | hBetaExp[iB][i] = new TProfile(name_hBetaExp[i],title_hBetaExp[i],400,0,5,0.4,1.05,""); | |
3f2b4d7b | 217 | } |
218 | ||
de383542 | 219 | Char_t name_fNsigmaTof[nPart][200]; |
220 | Char_t title_fNsigmaTof[nPart][200]; | |
221 | if(kSignalCheck==1) {hbins[0]=100; hbins[1]=100;} | |
222 | else {hbins[0]=1; hbins[1]=1;} | |
223 | for(Int_t i=0;i<nPart;i++) { | |
224 | snprintf(name_fNsigmaTof[i],200,"NsigmaTof_%s",namePart[i]); | |
225 | snprintf(title_fNsigmaTof[i],200,"NsigmaTof_%s;p_{T}/|z| (GeV/c);n_{#sigma_{TOF}}^{%s}",namePart[i],namePart[i]); | |
226 | fNsigmaTof[iB][i] = new TH2F(name_fNsigmaTof[i],title_fNsigmaTof[i],hbins[0],0,5,hbins[1],-5,5); | |
3f2b4d7b | 227 | } |
228 | ||
de383542 | 229 | Char_t name_fNsigmaTof_DcaCut[nSpec][200]; |
230 | Char_t title_fNsigmaTof_DcaCut[nSpec][200]; | |
231 | if(kSignalCheck>1) {hbins[0]=100; hbins[1]=100;} | |
232 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
233 | for(Int_t i=0;i<nSpec;i++) { | |
234 | snprintf(name_fNsigmaTof_DcaCut[i],200,"NsigmaTof_DcaCut_%s",name[i]); | |
235 | snprintf(title_fNsigmaTof_DcaCut[i],200,"NsigmaTof_%s with DCAxyCut;p_{T}/|z| (GeV/c);n_{#sigma_{TOF}}^{%s}",name[i],name[i]); | |
236 | fNsigmaTof_DcaCut[iB][i] = new TH2F(name_fNsigmaTof_DcaCut[i],title_fNsigmaTof_DcaCut[i],hbins[0],0,5,hbins[1],-5,5); | |
24395a5c | 237 | } |
24395a5c | 238 | |
de383542 | 239 | if(kSignalCheck==1) {hbins[0]=8000; hbins[1]=100;} |
240 | else {hbins[0]=1; hbins[1]=1;} | |
241 | fM2vsPt_NoTpcCut[iB][0][0] = new TH2F("fM2vsPt_NoTpcCut_pos","m^{2}/z^{2}_{TOF} vs p_{T}/|z| (positive charge);m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",hbins[0],0,10,hbins[1],0,5); | |
242 | fM2vsPt_NoTpcCut[iB][0][1] = new TH2F("fM2vsPt_NoTpcCut_neg","m^{2}/z^{2}_{TOF} vs p_{T}/|z| (negative charge);m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",hbins[0],0,10,hbins[1],0,5); | |
24395a5c | 243 | |
de383542 | 244 | if(kSignalCheck==1) {hbins[0]=8000; hbins[1]=100;} |
245 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
246 | else if(kSignalCheck==2) {hbins[0]=1000; hbins[1]=100;} | |
247 | fM2vsPt_NoTpcCut[iB][1][0] = new TH2F("fM2vsPt_NoTpcCut_DCAxyCut_pos","m^{2}/z^{2}_{TOF} vs p_{T}/|z| (positive charge) with DCAxy cut;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",hbins[0],0,10,hbins[1],0,5); | |
248 | fM2vsPt_NoTpcCut[iB][1][1] = new TH2F("fM2vsPt_NoTpcCut_DCAxyCut_neg","m^{2}/z^{2}_{TOF} vs p_{T}/|z| (negative charge) with DCAxy cut;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",hbins[0],0,10,hbins[1],0,5); | |
24395a5c | 249 | |
de383542 | 250 | Char_t name_fM2vsPt[2][18][300]; |
251 | Char_t title_fM2vsPt[2][18][300]; | |
252 | ||
253 | for(Int_t i=0;i<nSpec;i++) { | |
254 | snprintf(name_fM2vsPt[0][i],300,"fM2vsPt_%s",name[i]); | |
255 | snprintf(title_fM2vsPt[0][i],300,"m^{2}/z^{2}_{TOF} vs p_{T}/|z| of %s with a NsigmaTpcCut;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",name[i]); | |
24395a5c | 256 | |
de383542 | 257 | snprintf(name_fM2vsPt[1][i],300,"fM2vsPt_%s_DCAxyCut",name[i]); |
258 | snprintf(title_fM2vsPt[1][i],300,"m^{2}/z^{2}_{TOF} vs p_{T}/|z| of %s with a NsigmaTpcCut and with the DCAxy cut;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4});p_{T}/|z| (GeV/c)",name[i]); | |
24395a5c | 259 | |
de383542 | 260 | if(kSignalCheck==1) {hbins[0]=8000; hbins[1]=100;} |
261 | else {hbins[0]=1; hbins[1]=1;} | |
262 | fM2vsPt[iB][0][i] = new TH2F(name_fM2vsPt[0][i],title_fM2vsPt[0][i],hbins[0],0,10,hbins[1],0,5); | |
263 | ||
264 | if(kSignalCheck==1) {hbins[0]=8000; hbins[1]=100;} | |
265 | else if(kSignalCheck==0) {hbins[0]=1; hbins[1]=1;} | |
266 | else if(kSignalCheck==2) {hbins[0]=1000; hbins[1]=100;} | |
267 | fM2vsPt[iB][1][i] = new TH2F(name_fM2vsPt[1][i],title_fM2vsPt[1][i],hbins[0],0,10,hbins[1],0,5); | |
bfb9094a | 268 | } |
269 | ||
de383542 | 270 | if(kSignalCheck==1) {hbins[0]=4000; hbins[1]=1000;} |
271 | else {hbins[0]=1; hbins[1]=1;} | |
272 | fM2vsZ[iB][0] = new TH2F("fM2vsZ","m^{2}/z^{2}_{TOF} vs z_{TPC} Integrated p_{T};z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
273 | fM2vsZ[iB][1] = new TH2F("fM2vsZ_0.5pT1.0","m^{2}/z^{2}_{TOF} vs z_{TPC} 0.5<pT<1.0;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
274 | fM2vsZ[iB][2] = new TH2F("fM2vsZ_1.0pT1.5","m^{2}/z^{2}_{TOF} vs z_{TPC} 1.0<pT<1.5;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
275 | fM2vsZ[iB][3] = new TH2F("fM2vsZ_1.5pT2.0","m^{2}/z^{2}_{TOF} vs z_{TPC} 1.5<pT<2.0;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
276 | fM2vsZ[iB][4] = new TH2F("fM2vsZ_2.0pT2.5","m^{2}/z^{2}_{TOF} vs z_{TPC} 2.0<pT<2.5;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
277 | fM2vsZ[iB][5] = new TH2F("fM2vsZ_2.5pT3.0","m^{2}/z^{2}_{TOF} vs z_{TPC} 2.5<pT<3.0;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
278 | fM2vsZ[iB][6] = new TH2F("fM2vsZ_3.0pT3.5","m^{2}/z^{2}_{TOF} vs z_{TPC} 3.0<pT<3.5;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
279 | fM2vsZ[iB][7] = new TH2F("fM2vsZ_3.5pT4.0","m^{2}/z^{2}_{TOF} vs z_{TPC} 3.5<pT<4.0;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
280 | fM2vsZ[iB][8] = new TH2F("fM2vsZ_4.0pT4.5","m^{2}/z^{2}_{TOF} vs z_{TPC} 4.0<pT<4.5;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
281 | fM2vsZ[iB][9] = new TH2F("fM2vsZ_4.5pT5.0","m^{2}/z^{2}_{TOF} vs z_{TPC} 2.0<pT<2.5;z_{TPC};m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",hbins[0],-4,4,hbins[1],0,10); | |
282 | ||
283 | Char_t name_hDCAxy[18][nbin][200]; | |
284 | Char_t title_hDCAxy[18][nbin][200]; | |
285 | Char_t name_hDCAz[18][nbin][200]; | |
286 | Char_t title_hDCAz[18][nbin][200]; | |
287 | for(Int_t iS=0;iS<nSpec;iS++) { | |
bfb9094a | 288 | for(Int_t j=0;j<nbin;j++) { |
de383542 | 289 | snprintf(name_hDCAxy[iS][j],200,"hDCAxy_%s_%s",name[iS],name_nbin[j]); |
290 | snprintf(title_hDCAxy[iS][j],200,"hDCAxy_%s_%s;DCA_{xy} (cm)",name[iS],name_nbin[j]); | |
291 | hDCAxy[iB][iS][j] = new TH1D(name_hDCAxy[iS][j],title_hDCAxy[iS][j],875,-3.5,3.5); | |
24395a5c | 292 | |
de383542 | 293 | snprintf(name_hDCAz[iS][j],200,"hDCAz_%s_%s",name[iS],name_nbin[j]); |
294 | snprintf(title_hDCAz[iS][j],200,"hDCAz_%s_%s;DCA_{z} (cm)",name[iS],name_nbin[j]); | |
295 | hDCAz[iB][iS][j] = new TH1D(name_hDCAz[iS][j],title_hDCAz[iS][j],875,-3.5,3.5); | |
bfb9094a | 296 | } |
297 | } | |
de383542 | 298 | |
299 | Char_t name_hM2CutDCAxy[18][nbin][200]; | |
300 | Char_t title_hM2CutDCAxy[18][nbin][200]; | |
301 | Char_t name_hM2CutGroundDCAxy[18][nbin][200]; | |
302 | Char_t title_hM2CutGroundDCAxy[18][nbin][200]; | |
303 | for(Int_t iS=0;iS<nSpec;iS++) { | |
24395a5c | 304 | for(Int_t j=0;j<nbin;j++) { |
de383542 | 305 | snprintf(name_hM2CutDCAxy[iS][j],200,"hM2_CutDCAxy_%s_%s",name[iS],name_nbin[j]); |
306 | snprintf(title_hM2CutDCAxy[iS][j],200,"m^{2}/z^{2} Tof distribution of %s in DCAxy cut and in %s;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",name[iS],name_nbin[j]); | |
307 | snprintf(name_hM2CutGroundDCAxy[iS][j],200,"hM2_GroundCatDCAxy_%s_%s",name[iS],name_nbin[j]); | |
308 | snprintf(title_hM2CutGroundDCAxy[iS][j],200,"m^{2}/z^{2} Tof distribution of %s in the bkg. of DCAxy and in %s;m^{2}/z^{2}_{TOF} (GeV^{2}/c^{4})",name[iS],name_nbin[j]); | |
24395a5c | 309 | } |
bfb9094a | 310 | } |
3f2b4d7b | 311 | |
de383542 | 312 | const Int_t BinM2pT[nPart]={1,1,600,250,500,500,1000,400,600}; |
313 | const Double_t RangeM2min[nPart]={0.0,0.0,-0.1,0.0,0.0,0.0,0.0,0.0,0.0}; | |
314 | const Double_t RangeM2max[nPart]={1.0,1.0,0.5,2.0,4.0,6.0,12.0,4.0,6.0}; | |
3202676b | 315 | |
de383542 | 316 | for(Int_t iS=0;iS<nPart;iS++) { |
317 | for(Int_t j=0;j<nbin;j++) { | |
7f7ede25 | 318 | |
de383542 | 319 | hM2CutDCAxy[iB][iS][j] = new TH1D(name_hM2CutDCAxy[iS][j],title_hM2CutDCAxy[iS][j],BinM2pT[iS],RangeM2min[iS],RangeM2max[iS]); |
320 | hM2CutGroundDCAxy[iB][iS][j] = new TH1D(name_hM2CutGroundDCAxy[iS][j],title_hM2CutGroundDCAxy[iS][j],BinM2pT[iS],RangeM2min[iS],RangeM2max[iS]); | |
321 | ||
322 | hM2CutDCAxy[iB][iS+nPart][j] = new TH1D(name_hM2CutDCAxy[iS+nPart][j],title_hM2CutDCAxy[iS+nPart][j],BinM2pT[iS],RangeM2min[iS],RangeM2max[iS]); | |
323 | hM2CutGroundDCAxy[iB][iS+nPart][j] = new TH1D(name_hM2CutGroundDCAxy[iS+nPart][j],title_hM2CutGroundDCAxy[iS+nPart][j],BinM2pT[iS],RangeM2min[iS],RangeM2max[iS]); | |
8aa5d867 | 324 | } |
bfb9094a | 325 | } |
de383542 | 326 | |
327 | //Parameterizations: | |
328 | fPmeanVsPexp[0]=new TF1("fPmeanVsPexp_p","[2]-[0]*TMath::Exp(-(TMath::Max(x,[3])*[1]))",0,20); | |
329 | fPmeanVsPexp[1]=new TF1("fPmeanVsPexp_d","[2]-[0]*TMath::Exp(-(TMath::Max(x,[3])*[1]))",0,20); | |
330 | fPmeanVsPexp[2]=new TF1("fPmeanVsPexp_He3","[2]-[0]*TMath::Exp(-(TMath::Max(x,[3])*[1]))",0,20); | |
331 | ||
332 | Double_t fpars_p[4]={5.14500484596484148e-03,9.74729863202270397e-01,0.0,1.00607413672776569e+00}; | |
333 | Double_t fpars_d[4]={3.16023942908439243e-02,1.24005027514358490e+00,-1.50000000000000003e-03,1.40607413672776560e+00}; | |
334 | Double_t fpars_He3[4]={2.73329079591698026e-02,1.53005942367188852e+00,-4.10231310888738848e-03,1.20607413672776564e+00}; | |
335 | fPmeanVsPexp[0]->SetParameters(fpars_p); | |
336 | fPmeanVsPexp[1]->SetParameters(fpars_d); | |
337 | fPmeanVsPexp[2]->SetParameters(fpars_He3); | |
338 | ||
339 | /*Char_t title_Xaxis[3][200]; | |
340 | Char_t title_Yaxis[3][200]; | |
341 | snprintf(title_Xaxis[0],200,"p(t_{exp}^{%s})",namePart[4]); | |
342 | snprintf(title_Yaxis[0],200,"p(t_{TOF})-p(t_{exp}^{%s})/p(t_{exp}^{%s})",namePart[4],namePart[4]); | |
343 | snprintf(title_Xaxis[1],200,"p(t_{exp}^{%s})",namePart[5]); | |
344 | snprintf(title_Yaxis[1],200,"p(t_{TOF})-p(t_{exp}^{%s})/p(t_{exp}^{%s})",namePart[5],namePart[5]); | |
345 | snprintf(title_Xaxis[2],200,"p(t_{exp}^{%s})",namePart[7]); | |
346 | snprintf(title_Yaxis[2],200,"p(t_{TOF})-p(t_{exp}^{%s})/p(t_{exp}^{%s})",namePart[7],namePart[7]); | |
347 | for(Int_t i=0;i<3;i++){ | |
348 | fPmeanVsPexp[i]->GetXaxis()->SetTitle(title_Xaxis[i]); | |
349 | fPmeanVsPexp[i]->GetYaxis()->SetTitle(title_Yaxis[i]); | |
350 | fPmeanVsPexp[i]->SetTitle("Parameterization calculated with Monte Carlo (LHC13d15)"); | |
351 | }*/ | |
352 | //end parameterizations | |
353 | ||
354 | fList[iB]->Add(htemp[iB]); | |
355 | for(Int_t i=0;i<2;i++) fList[iB]->Add(hCentrality[iB][i]); | |
356 | for(Int_t i=0;i<2;i++) fList[iB]->Add(hZvertex[iB][i]); | |
357 | fList[iB]->Add(hEta[iB]); | |
358 | fList[iB]->Add(hPhi[iB]); | |
359 | fList[iB]->Add(fEtaPhi[iB]); | |
360 | fList[iB]->Add(hNTpcCluster[iB]); | |
361 | fList[iB]->Add(hNTrdSlices[iB]); | |
362 | for(Int_t i=0;i<2;i++) fList[iB]->Add(fdEdxVSp[iB][i]); | |
363 | for(Int_t i=0;i<nPart;i++) fList[iB]->Add(hDeDxExp[iB][i]); | |
364 | for(Int_t i=0;i<nPart;i++) fList[iB]->Add(fNsigmaTpc[iB][i]); | |
365 | for(Int_t i=0;i<nPart;i++) { | |
366 | if(kSignalCheck!=1) | |
367 | if(i<3 || i==6 || i==8) continue;//e,mu,pi,t,he4 excluded | |
368 | fList[iB]->Add(fNsigmaTpc_kTOF[iB][i]); | |
369 | fList[iB]->Add(fNsigmaTpc_kTOF[iB][i+nPart]); | |
bfb9094a | 370 | } |
de383542 | 371 | for(Int_t i=0;i<2;i++) fList[iB]->Add(fBetaTofVSp[iB][i]); |
372 | for(Int_t i=0;i<nPart;i++) fList[iB]->Add(hBetaExp[iB][i]); | |
373 | for(Int_t i=0;i<nPart;i++) fList[iB]->Add(fNsigmaTof[iB][i]); | |
374 | for(Int_t i=0;i<nPart;i++) { | |
375 | if(kSignalCheck!=1) | |
376 | if(i<3 || i==6 || i==8) continue;//e,mu,pi,t,he4 excluded | |
377 | fList[iB]->Add(fNsigmaTof_DcaCut[iB][i]); | |
378 | fList[iB]->Add(fNsigmaTof_DcaCut[iB][i+nPart]); | |
bfb9094a | 379 | } |
de383542 | 380 | for(Int_t i=0;i<2;i++) fList[iB]->Add(fM2vsPt_NoTpcCut[iB][0][i]); |
381 | for(Int_t i=0;i<2;i++) fList[iB]->Add(fM2vsPt_NoTpcCut[iB][1][i]); | |
382 | for(Int_t i=0;i<nPart;i++) { | |
383 | if(i<3 || i==6 || i==8) continue;//e,mu,pi,t,he4 excluded | |
384 | fList[iB]->Add(fM2vsPt[iB][0][i]); | |
385 | fList[iB]->Add(fM2vsPt[iB][0][i+nPart]); | |
bfb9094a | 386 | } |
de383542 | 387 | for(Int_t i=0;i<nPart;i++){ |
388 | if(kSignalCheck!=1) | |
389 | if(i<3 || i==6 || i==8) continue;//e,mu,pi,t,he4 excluded | |
390 | fList[iB]->Add(fM2vsPt[iB][1][i]); | |
391 | fList[iB]->Add(fM2vsPt[iB][1][i+nPart]); | |
bfb9094a | 392 | } |
de383542 | 393 | if(iMtof==8) for(Int_t i=0;i<3;i++) fList[iB]->Add(fPmeanVsPexp[i]); |
394 | else if(iMtof==4) for(Int_t i=1;i<3;i++) fList[iB]->Add(fPmeanVsPexp[i]); | |
395 | for(Int_t i=0;i<10;i++) fList[iB]->Add(fM2vsZ[iB][i]); | |
396 | for(Int_t i=0;i<nPart;i++){ | |
397 | if(kSignalCheck!=1) | |
398 | if(i<3 || i==6 || i==8) continue;//e,mu,pi,t,he4 excluded | |
399 | for(Int_t j=0;j<nbin;j++){ | |
400 | fList[iB]->Add(hDCAxy[iB][i][j]); | |
401 | fList[iB]->Add(hDCAz[iB][i][j]); | |
402 | fList[iB]->Add(hM2CutDCAxy[iB][i][j]); | |
403 | fList[iB]->Add(hM2CutGroundDCAxy[iB][i][j]); | |
404 | fList[iB]->Add(hDCAxy[iB][i+nPart][j]); | |
405 | fList[iB]->Add(hDCAz[iB][i+nPart][j]); | |
406 | fList[iB]->Add(hM2CutDCAxy[iB][i+nPart][j]); | |
407 | fList[iB]->Add(hM2CutGroundDCAxy[iB][i+nPart][j]); | |
bfb9094a | 408 | } |
24395a5c | 409 | } |
de383542 | 410 | |
bfb9094a | 411 | // Post output data. |
de383542 | 412 | PostData(1, fList[0]); |
413 | PostData(2, fList[1]); | |
414 | ||
415 | }//end iB loop | |
983b8a42 | 416 | } |
417 | //______________________________________________________________________________ | |
418 | void AliAnalysisNucleiMass::UserExec(Option_t *) | |
419 | { | |
420 | // Main loop | |
421 | // Called for each event | |
422 | ||
423 | fAOD = dynamic_cast<AliAODEvent*>(InputEvent()); | |
424 | fESD = dynamic_cast<AliESDEvent*>(InputEvent()); | |
425 | if(!fAOD && !fESD){ | |
426 | Printf("%s:%d AODEvent and ESDEvent not found in Input Manager",(char*)__FILE__,__LINE__); | |
983b8a42 | 427 | return; |
428 | } | |
429 | ||
430 | if(fESD) fEvent = fESD; | |
431 | else fEvent = fAOD; | |
432 | ||
433 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
434 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
de383542 | 435 | fPIDResponse=inputHandler->GetPIDResponse(); |
bfb9094a | 436 | |
de383542 | 437 | //--------------------------Magnetic field polarity-------------------- |
bfb9094a | 438 | Double_t fBfield=fEvent->GetMagneticField(); |
439 | if(fBfield<0.0) iBconf=0;//B-- | |
440 | else iBconf=1;//B++ | |
de383542 | 441 | for(Int_t i=0;i<nBconf;i++) htemp[i]->Fill(fBfield); |
442 | ||
443 | //--------------------------Centrality-------------------------------- | |
444 | Double_t v0Centr = -10.; | |
445 | AliCentrality *centrality = fEvent->GetCentrality(); | |
446 | if (centrality){ | |
447 | v0Centr=centrality->GetCentralityPercentile("V0M"); // VZERO | |
448 | } | |
449 | hCentrality[iBconf][0]->Fill(v0Centr); | |
983b8a42 | 450 | |
de383542 | 451 | //-------------------------zVertex determination of event---------------- |
452 | Double_t zvtx = 9999.9; | |
38fdd8e0 | 453 | const AliVVertex* vtxEVENT = fEvent->GetPrimaryVertex(); |
de383542 | 454 | if(vtxEVENT->GetNContributors()>0) zvtx = vtxEVENT->GetZ(); |
983b8a42 | 455 | |
de383542 | 456 | hZvertex[iBconf][0]->Fill(zvtx); |
457 | ||
458 | //---------------------------EVENT CUTS----------------------------- | |
459 | if(TMath::Abs(zvtx) < 10.0 && v0Centr>Centrality[0] && v0Centr<Centrality[1]){ | |
460 | ||
461 | hCentrality[iBconf][1]->Fill(v0Centr); | |
462 | hZvertex[iBconf][1]->Fill(zvtx); | |
983b8a42 | 463 | |
464 | Int_t nTracks = fEvent->GetNumberOfTracks(); | |
465 | ||
de383542 | 466 | //----------------------loop on the TRACKS----------------------------- |
467 | for(Int_t iT = 0; iT < nTracks; iT++) { | |
468 | AliVTrack* track = (AliVTrack *) fEvent->GetTrack(iT); | |
983b8a42 | 469 | |
de383542 | 470 | if (!track){ |
471 | continue; | |
472 | } | |
473 | ||
474 | //For the geometrical cuts | |
475 | Double_t etaAbs = TMath::Abs(track->Eta()); | |
476 | ||
477 | Bool_t trkFlag = 0; | |
478 | trkFlag = ((AliAODTrack *) track)->TestFilterBit(FilterBit); | |
479 | //TestFilterBit(16) -- Standard Cuts with very loose DCA: GetStandardITSTPCTrackCuts2011(kFALSE) && SetMaxDCAToVertexXY(2.4) && SetMaxDCAToVertexZ(3.2) && SetDCaToVertex2D(kTRUE) | |
480 | //TestFilterBit(32) (STARDARD) -- Standard Cuts with very tight DCA cut ( 7sigma^primaries: 7*(0.0015+0.0050/pt^1.1) ) : GetStandardITSTPCTrackCuts2011(). | |
481 | ||
482 | //Cut on the Minumum Number of the TPC clusters | |
483 | Bool_t isMinTpcCluster=kFALSE; | |
484 | Int_t nTpcCluster=0; | |
485 | nTpcCluster=track->GetTPCNcls(); | |
486 | if(nTpcCluster>NminTpcCluster) isMinTpcCluster=kTRUE; | |
487 | ||
488 | //-------------------------------------start TRACK CUTS---------------------------------- | |
489 | if ((track->Pt() < 0.2) || (etaAbs<EtaLimit[0]) || (etaAbs>EtaLimit[1]) || !trkFlag || !isMinTpcCluster) | |
490 | continue; | |
3202676b | 491 | |
de383542 | 492 | //Vertex determination |
493 | Double_t b[2] = {-99., -99.}; | |
494 | Double_t bCov[3] = {-99., -99., -99.}; | |
495 | if (!track->PropagateToDCA(fEvent->GetPrimaryVertex(), fEvent->GetMagneticField(), 100., b, bCov)) | |
496 | continue; | |
497 | ||
498 | Double_t DCAxy = b[0]; | |
499 | Double_t DCAz = b[1]; | |
500 | ||
501 | //Cut on the DCAz | |
502 | Bool_t isDCAzCut=kFALSE; | |
503 | if(DCAz<DCAzCut) isDCAzCut=kTRUE; | |
983b8a42 | 504 | |
de383542 | 505 | if(!isDCAzCut) |
506 | continue; | |
507 | ||
508 | //For the Tpc purity cut | |
509 | Double_t dedx = track->GetTPCsignal(); | |
510 | if(dedx<10) continue; | |
3f2b4d7b | 511 | |
de383542 | 512 | Int_t nTrdSlices = track->GetNumberOfTRDslices(); |
513 | if(nTrdSlices<2 && iTrdCut==1) continue; | |
514 | if(nTrdSlices>0 && iTrdCut==2) continue; | |
515 | ||
516 | //-------------------------------------end TRACK CUTS---------------------------------- | |
517 | ||
518 | //Track info: | |
519 | Double_t phi= track->Phi(); | |
520 | ||
521 | hEta[iBconf]->Fill(etaAbs); | |
522 | hPhi[iBconf]->Fill(phi); | |
523 | fEtaPhi[iBconf]->Fill(etaAbs,phi); | |
524 | hNTpcCluster[iBconf]->Fill(nTpcCluster); | |
525 | hNTrdSlices[iBconf]->Fill(nTrdSlices); | |
526 | ||
527 | Double_t charge = (Double_t)track->Charge(); | |
528 | Double_t p = track->P(); | |
529 | Double_t pt = track->Pt(); | |
530 | Double_t tof = track->GetTOFsignal()-fPIDResponse->GetTOFResponse().GetStartTime(p); | |
531 | Double_t pTPC = track->GetTPCmomentum(); | |
532 | Double_t beta = 0.0; | |
533 | Double_t M2 = 999.9; | |
534 | Double_t Z2 = 999.9; | |
535 | ||
536 | kTOF = (track->GetStatus() & AliVTrack::kTOFout) && (track->GetStatus() & AliVTrack::kTIME); | |
537 | ||
538 | //-----------------------------TPC info------------------------------ | |
539 | Double_t nsigmaTPC[nPart]; | |
540 | Double_t expdedx[nPart]; | |
541 | ||
542 | Int_t stdFlagPid[9] = {1,2,4,8,16,32,64,128,256};//e,#mu,#pi,K,p,d,t,3He,4He | |
543 | Int_t FlagPid = 0; | |
544 | ||
545 | for(Int_t iS=0;iS<9;iS++){ | |
546 | expdedx[iS] = fPIDResponse->GetTPCResponse().GetExpectedSignal(track, (AliPID::EParticleType) iS, AliTPCPIDResponse::kdEdxDefault, kTRUE); | |
547 | hDeDxExp[iBconf][iS]->Fill(pTPC,expdedx[iS]); | |
548 | nsigmaTPC[iS] = fPIDResponse->NumberOfSigmasTPC(track,(AliPID::EParticleType) iS); | |
549 | fNsigmaTpc[iBconf][iS]->Fill(pTPC,nsigmaTPC[iS]); | |
550 | if(charge>0) {//positive particle | |
551 | if(kTOF && (TMath::Abs(DCAxy)<DCAxyCut)) fNsigmaTpc_kTOF[iBconf][iS]->Fill(pt,nsigmaTPC[iS]); | |
3f2b4d7b | 552 | } |
de383542 | 553 | else {//negative particle |
554 | if(kTOF && (TMath::Abs(DCAxy)<DCAxyCut)) fNsigmaTpc_kTOF[iBconf][iS+nPart]->Fill(pt,nsigmaTPC[iS]); | |
3f2b4d7b | 555 | } |
3202676b | 556 | |
de383542 | 557 | //TPC identification: |
558 | if(TMath::Abs(nsigmaTPC[iS])<NsigmaTpcCut) { | |
559 | FlagPid += ((Int_t)TMath::Power(2,iS)); | |
3f2b4d7b | 560 | } |
de383542 | 561 | } |
562 | ||
563 | if(charge>0) fdEdxVSp[iBconf][0]->Fill(pTPC,dedx); | |
564 | else fdEdxVSp[iBconf][1]->Fill(pTPC,dedx); | |
3202676b | 565 | |
de383542 | 566 | //-----------------------------TOF info------------------------------ |
567 | ||
568 | Double_t massOverZ[9] = {0.000511,0.105658,0.139570,0.493677,0.938272,1.875612859,2.808921005,1.404195741,1.863689620}; | |
983b8a42 | 569 | |
de383542 | 570 | //----------------------------------------kTOF available----------------------------- |
571 | ||
572 | if(kTOF) { | |
573 | Double_t exptimes[9]; | |
983b8a42 | 574 | track->GetIntegratedTimes(exptimes); |
de383542 | 575 | //Integrated times of the Nuclei: |
576 | for(Int_t iN=5;iN<9;iN++) { | |
577 | exptimes[iN] = exptimes[4]*exptimes[4]*(massOverZ[iN]*massOverZ[iN]/p/p+1)/(massOverZ[4]*massOverZ[4]/p/p+1); | |
578 | exptimes[iN] = TMath::Sqrt(exptimes[iN]); | |
579 | } | |
580 | ||
581 | beta=exptimes[0]; | |
582 | beta=beta/tof;//beta = L/tof/c = t_e/tof | |
583 | ||
584 | Double_t nsigmaTOF[9]; | |
585 | for(Int_t iS=0;iS<9;iS++){ | |
586 | nsigmaTOF[iS] = fPIDResponse->NumberOfSigmasTOF(track,(AliPID::EParticleType) iS); | |
587 | fNsigmaTof[iBconf][iS]->Fill(pt,nsigmaTOF[iS]); | |
588 | if(charge>0) { | |
589 | hBetaExp[iBconf][iS]->Fill(p,exptimes[0]/exptimes[iS]); | |
590 | if(TMath::Abs(DCAxy)<DCAxyCut) fNsigmaTof_DcaCut[iBconf][iS]->Fill(pt,nsigmaTOF[iS]); | |
24395a5c | 591 | } |
de383542 | 592 | else { |
593 | hBetaExp[iBconf][iS+nPart]->Fill(p,exptimes[0]/exptimes[iS]); | |
594 | if(TMath::Abs(DCAxy)<DCAxyCut) fNsigmaTof_DcaCut[iBconf][iS+nPart]->Fill(pt,nsigmaTOF[iS]); | |
24395a5c | 595 | } |
de383542 | 596 | } |
597 | if(charge>0) fBetaTofVSp[iBconf][0]->Fill(p,beta); | |
598 | else fBetaTofVSp[iBconf][1]->Fill(p,beta); | |
599 | ||
600 | this->GetMassFromPvertex(beta,p,M2); | |
601 | this->GetZTpc(dedx,pTPC,M2,Z2); | |
602 | ||
603 | //-----------------------------M2 as a function of expected times, if iMtof>1--------------------------------- | |
604 | Double_t Mass2[9]; | |
605 | if(iMtof>1) this->GetMassFromExpTimes(beta,exptimes,Mass2,iMtof); | |
606 | ||
607 | //-------------------------------Squared Mass TH2 distributions----------------------- | |
608 | if(charge>0) { | |
609 | //without TPC | |
610 | fM2vsPt_NoTpcCut[iBconf][0][0]->Fill(M2,pt); | |
611 | if(TMath::Abs(DCAxy)<DCAxyCut) fM2vsPt_NoTpcCut[iBconf][1][0]->Fill(M2,pt); | |
612 | //with TPC | |
613 | for(Int_t iS=0;iS<9;iS++) { | |
614 | //-----------------------------M2 as a function of expected times, if iMtof>1--------------------------------- | |
615 | if(iMtof>1) { | |
616 | M2=999.9; | |
617 | M2=Mass2[iS]; | |
983b8a42 | 618 | } |
de383542 | 619 | //----------------- |
620 | if(FlagPid & stdFlagPid[iS]) { | |
621 | fM2vsPt[iBconf][0][iS]->Fill(M2,pt); | |
622 | if(TMath::Abs(DCAxy)<DCAxyCut) fM2vsPt[iBconf][1][iS]->Fill(M2,pt); | |
bfb9094a | 623 | } |
983b8a42 | 624 | } |
de383542 | 625 | } |
626 | else {//charge<0 | |
627 | //without TPC | |
628 | fM2vsPt_NoTpcCut[iBconf][0][1]->Fill(M2,pt); | |
629 | if(TMath::Abs(DCAxy)<DCAxyCut) fM2vsPt_NoTpcCut[iBconf][1][1]->Fill(M2,pt); | |
630 | //with TPC | |
631 | for(Int_t iS=0;iS<9;iS++) { | |
632 | //-----------------------------M2 as a function of expected times, if iMtof>1--------------------------------- | |
633 | if(iMtof>1) { | |
634 | M2=999.9; | |
635 | M2=Mass2[iS]; | |
983b8a42 | 636 | } |
de383542 | 637 | //----------------- |
638 | if(FlagPid & stdFlagPid[iS]) { | |
639 | fM2vsPt[iBconf][0][iS+nPart]->Fill(M2,pt); | |
640 | if(TMath::Abs(DCAxy)<DCAxyCut) fM2vsPt[iBconf][1][iS+nPart]->Fill(M2,pt); | |
983b8a42 | 641 | } |
642 | } | |
de383542 | 643 | } |
644 | ||
645 | //------------------------------start DCA and Squared Mass TH1 distributions------------------------- | |
646 | Double_t binPt[nbin+1]; | |
647 | for(Int_t i=0;i<nbin+1;i++) { | |
648 | binPt[i]=0.4+i*0.1; | |
649 | } | |
650 | ||
651 | if(charge>0) { | |
983b8a42 | 652 | for(Int_t iS=0;iS<9;iS++) { |
de383542 | 653 | //-----------------------------M2 as a function of expected times, if iMtof>1--------------------------------- |
654 | if(iMtof>1) { | |
655 | M2=999.9; | |
656 | M2=Mass2[iS]; | |
983b8a42 | 657 | } |
de383542 | 658 | //----------------- |
659 | if(FlagPid & stdFlagPid[iS]) { | |
660 | for(Int_t j=0;j<nbin;j++) { | |
661 | if(pt>binPt[j] && pt<binPt[j+1]) { | |
662 | hDCAxy[iBconf][iS][j]->Fill(DCAxy); | |
663 | hDCAxy[iBconf][iS][j]->Fill(-DCAxy); | |
664 | hDCAz[iBconf][iS][j]->Fill(DCAz); | |
665 | hDCAz[iBconf][iS][j]->Fill(-DCAz); | |
666 | if(TMath::Abs(DCAxy)<DCAxyCut) { | |
667 | hM2CutDCAxy[iBconf][iS][j]->Fill(M2); | |
bfb9094a | 668 | } |
de383542 | 669 | if(TMath::Abs(DCAxy+0.5)<DCAxyCut) { |
670 | hM2CutGroundDCAxy[iBconf][iS][j]->Fill(M2); | |
671 | } | |
672 | break; | |
bfb9094a | 673 | } |
de383542 | 674 | }//end loop on the pT bins (j) |
bfb9094a | 675 | } |
de383542 | 676 | }//end loop on the particle species (iS) |
677 | } | |
678 | else {//charge<0 | |
983b8a42 | 679 | for(Int_t iS=0;iS<9;iS++) { |
de383542 | 680 | //-----------------------------M2 as a function of expected times, if iMtof>1--------------------------------- |
681 | if(iMtof>1) { | |
682 | M2=999.9; | |
683 | M2=Mass2[iS]; | |
684 | } | |
685 | //----------------- | |
686 | if(FlagPid & stdFlagPid[iS]) { | |
687 | for(Int_t j=0;j<nbin;j++) { | |
688 | if(pt>binPt[j] && pt<binPt[j+1]) { | |
689 | hDCAxy[iBconf][iS+nPart][j]->Fill(DCAxy); | |
690 | hDCAxy[iBconf][iS+nPart][j]->Fill(-DCAxy); | |
691 | hDCAz[iBconf][iS+nPart][j]->Fill(DCAz); | |
692 | hDCAz[iBconf][iS+nPart][j]->Fill(-DCAz); | |
693 | if(TMath::Abs(DCAxy)<DCAxyCut) { | |
694 | hM2CutDCAxy[iBconf][iS+nPart][j]->Fill(M2); | |
24395a5c | 695 | } |
de383542 | 696 | if(TMath::Abs(DCAxy+0.5)<DCAxyCut) { |
697 | hM2CutGroundDCAxy[iBconf][iS+nPart][j]->Fill(M2); | |
983b8a42 | 698 | } |
de383542 | 699 | break; |
983b8a42 | 700 | } |
de383542 | 701 | }//end loop on the pT bins (j) |
983b8a42 | 702 | } |
de383542 | 703 | }//end loop on the particle species (iS) |
704 | } | |
705 | ||
706 | //-------------------------------------------------M2/Z2 vs Z------------------------- | |
707 | ||
708 | ||
709 | Double_t binCutPt[10] = {0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0}; | |
710 | Double_t Z=999.9; | |
711 | if(Z2>0) Z=TMath::Sqrt(Z2); | |
712 | ||
713 | fM2vsZ[iBconf][0]->Fill(charge*TMath::Sqrt(Z2),M2); | |
714 | for(Int_t i=1;i<10;i++) { | |
715 | if(pt>binCutPt[i-1] && pt<binCutPt[i]){ | |
716 | fM2vsZ[iBconf][i]->Fill(charge*Z,M2); | |
717 | break; | |
983b8a42 | 718 | } |
de383542 | 719 | } |
983b8a42 | 720 | |
721 | ||
de383542 | 722 | |
723 | }//end kTOF available | |
724 | }//end track loop | |
725 | }//end loop on the events | |
983b8a42 | 726 | } |
727 | ||
728 | //_____________________________________________________________________________ | |
729 | void AliAnalysisNucleiMass::Terminate(Option_t *) | |
730 | { | |
731 | // Terminate loop | |
732 | Printf("Terminate()"); | |
733 | } | |
de383542 | 734 | //_____________________________________________________________________________ |
735 | void AliAnalysisNucleiMass::GetMassFromPvertex(Double_t beta, Double_t p, Double_t &M2) { | |
736 | ||
737 | M2 = p*p*(1-beta*beta)/(beta*beta); | |
738 | ||
739 | return; | |
740 | ||
741 | } | |
742 | //____________________________________________________________________________________________________________ | |
743 | void AliAnalysisNucleiMass::GetMassFromExpTimes(Double_t beta, Double_t *IntTimes, Double_t *Mass2, Int_t iCorr) { | |
744 | ||
745 | // m = p_exp/beta/gamma where p_exp = mPDG*beta_exp*gamma_exp; beta_exp = L/t_exp/c = t_e/t_exp ; beta=L/tof/c = t_e/tof | |
746 | // In this way m_tof = mPDG only if tof=t_exp | |
747 | ||
748 | Double_t massOverZ[9] = {0.000511,0.105658,0.139570,0.493677,0.938272,1.875612859,2.808921005,1.404195741,1.863689620}; | |
749 | ||
750 | Double_t beta2Exp[9]; | |
751 | Double_t p2Exp[9]; | |
752 | ||
753 | Double_t pExp[9]; | |
754 | Double_t CorrFactor=0.0; | |
755 | ||
756 | for(Int_t iS=0;iS<9;iS++) { | |
757 | beta2Exp[iS]=IntTimes[0]/IntTimes[iS];//beta = L/tof*c = t_e/tof | |
758 | beta2Exp[iS]=beta2Exp[iS]*beta2Exp[iS]; | |
759 | if((1-beta2Exp[iS])==0) { | |
760 | Mass2[iS]=999.9; | |
761 | continue; | |
762 | } | |
763 | p2Exp[iS]=massOverZ[iS]*massOverZ[iS]*beta2Exp[iS]/(1-beta2Exp[iS]); | |
764 | ||
765 | //--------------------for MC corrections | |
766 | if(p2Exp[iS]<0) { | |
767 | Mass2[iS]=999.9; | |
768 | continue; | |
769 | } | |
770 | pExp[iS]=TMath::Sqrt(p2Exp[iS]); | |
771 | ||
772 | CorrFactor=0.0; | |
773 | if(iCorr & 12) {//iCorr==4 || iCorr==8 | |
774 | if(iCorr==8 && iS==4) CorrFactor=fPmeanVsPexp[0]->Eval(pExp[iS]); | |
775 | ||
776 | if(iS==5) CorrFactor=fPmeanVsPexp[1]->Eval(pExp[iS]); | |
777 | else if(iS==7) CorrFactor=fPmeanVsPexp[2]->Eval(pExp[iS]); | |
778 | CorrFactor=pExp[iS]*CorrFactor; | |
779 | pExp[iS]=pExp[iS]+CorrFactor;//CorrFactor is negative so pExp(Corrected)<pExp | |
780 | } | |
781 | p2Exp[iS]=pExp[iS]*pExp[iS]; | |
782 | //------------ | |
783 | ||
784 | Mass2[iS]=p2Exp[iS]*(1-beta*beta)/(beta*beta); | |
785 | } | |
786 | ||
787 | return; | |
788 | ||
789 | } | |
790 | //_________________________________________________________________________________________________________________________ | |
791 | void AliAnalysisNucleiMass::GetZTpc(Double_t dedx, Double_t pTPC, Double_t M2, Double_t &Z2) { | |
792 | ||
793 | //z^2_tpc = dedx^{Tpc} / dedx^{exp,Tof}_{z=1} | |
794 | ||
795 | Z2=999.9; | |
796 | ||
797 | Double_t M=999.9; | |
798 | Double_t pTPC_pr=999.9;//rescaling of the pTPC for the proton | |
799 | Double_t expdedx_Tof=999.9; | |
800 | ||
801 | if(M2>0) { | |
802 | M=TMath::Sqrt(M2); | |
803 | pTPC_pr=pTPC*0.938272/M; | |
804 | expdedx_Tof=fPIDResponse->GetTPCResponse().GetExpectedSignal(pTPC_pr,AliPID::kProton); | |
805 | if((dedx/expdedx_Tof)<0) return; | |
806 | Z2=TMath::Power(dedx/expdedx_Tof,0.862); | |
807 | } | |
808 | ||
809 | return; | |
810 | } |