]>
Commit | Line | Data |
---|---|---|
683b5ead | 1 | |
2 | /************************************************************************** | |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Author: The ALICE Off-line Project. * | |
6 | * Contributors are mentioned in the code where appropriate. * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | // macro to study V0s | |
18 | // loops over ESD files, and creates AliAODv0 | |
19 | // Author: H.Ricaud, Helene.Ricaud@IReS.in2p3.fr | |
20 | ||
21 | ||
22 | #include "Riostream.h" | |
23 | #include "TChain.h" | |
24 | #include "TTree.h" | |
25 | #include "TH1F.h" | |
26 | #include "TH2F.h" | |
27 | #include "TList.h" | |
28 | #include "TMath.h" | |
29 | #include "TCanvas.h" | |
30 | ||
31 | #include "AliAnalysisTask.h" | |
32 | #include "AliAnalysisManager.h" | |
33 | ||
34 | #include "AliESDVertex.h" | |
35 | #include "AliESDEvent.h" | |
36 | #include "AliESDInputHandler.h" | |
37 | #include "AliESDtrack.h" | |
38 | #include "AliESDv0.h" | |
39 | #include "AliAODv0.h" | |
40 | #include "AliAODTrack.h" | |
41 | ||
42 | #include "AliAnalysisTaskESDStrange.h" | |
43 | ||
44 | ||
45 | ClassImp(AliAnalysisTaskESDStrange) | |
46 | ||
47 | //________________________________________________________________________ | |
48 | AliAnalysisTaskESDStrange::AliAnalysisTaskESDStrange(const char *name) | |
49 | : AliAnalysisTask(name, ""), fESD(0), fListHist(), | |
50 | fHistTrackPerEvent(0), | |
51 | fHistPrimaryVertexX(0), | |
52 | fHistPrimaryVertexY(0), | |
53 | fHistPrimaryVertexZ(0), | |
54 | fHistDcaPosToPrimVertex(0), | |
55 | fHistDcaNegToPrimVertex(0), | |
56 | fHistDcaPosToPrimVertexZoom(0), | |
57 | fHistDcaNegToPrimVertexZoom(0), | |
58 | fHistRadiusV0(0), | |
59 | fHistDecayLengthV0(0), | |
60 | fHistDcaV0Daughters(0), | |
61 | fHistChi2(0), | |
62 | fHistCosPointAngle(0), | |
63 | fHistCosPointAngleZoom(0), | |
64 | fHistPtVsYK0s(0), | |
65 | fHistPtVsYK0sMI(0), | |
66 | fHistPtVsYLambda(0), | |
67 | fHistPtVsYLambdaMI(0), | |
68 | fHistPtVsYAntiLambda(0), | |
69 | fHistPtVsYAntiLambdaMI(0), | |
70 | fHistMassK0(0), | |
71 | fHistMassK0MI(0), | |
72 | fHistMassLambda(0), | |
73 | fHistMassLambdaMI(0), | |
74 | fHistMassAntiLambda(0), | |
75 | fHistMassAntiLambdaMI(0), | |
76 | fHistArmenterosPodolanski(0), | |
77 | fHistArmenterosPodolanskiMI(0) | |
78 | ||
79 | ||
80 | ||
81 | { | |
82 | // Constructor | |
83 | ||
84 | // Define input and output slots here | |
85 | // Input slot #0 works with a TChain | |
86 | DefineInput(0, TChain::Class()); | |
87 | ||
88 | // Output slot #0 writes into a TList container | |
89 | DefineOutput(0, TList::Class()); | |
90 | } | |
91 | ||
92 | //________________________________________________________________________ | |
93 | void AliAnalysisTaskESDStrange::ConnectInputData(Option_t *) | |
94 | { | |
95 | // Connect ESD or AOD here | |
96 | // Called once | |
97 | ||
98 | TTree* tree = dynamic_cast<TTree*> (GetInputData(0)); | |
99 | if (!tree) { | |
100 | Printf("ERROR: Could not read chain from input slot 0"); | |
101 | } else { | |
102 | tree->SetBranchStatus("*", kFALSE); | |
103 | tree->SetBranchStatus("fTracks.*", kTRUE); | |
104 | tree->SetBranchStatus("fV0s.*", kTRUE); | |
105 | ||
106 | AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()); | |
107 | ||
108 | if (!esdH) { | |
109 | Printf("ERROR: Could not get ESDInputHandler"); | |
110 | } else | |
111 | fESD = esdH->GetEvent(); | |
112 | } | |
113 | } | |
114 | ||
115 | //________________________________________________________________________ | |
116 | void AliAnalysisTaskESDStrange::CreateOutputObjects() | |
117 | { | |
118 | // Create histograms | |
119 | // Called once | |
120 | ||
121 | fListHist = new TList(); | |
122 | ||
123 | // multiplicity | |
124 | fHistTrackPerEvent = new TH1F("h1TrackPerEvent", "Tracks per event;Number of Tracks;Number of Events",50,0,50); | |
125 | fListHist->Add(fHistTrackPerEvent); | |
126 | ||
127 | // Primary Vertex: | |
128 | fHistPrimaryVertexX = new TH1F("h1PrimaryVertexX", "Primary Vertex Position X;Primary Vertex Position X (cm);Events",40,-1,1); | |
129 | fListHist->Add(fHistPrimaryVertexX); | |
130 | ||
131 | fHistPrimaryVertexY = new TH1F("h1PrimaryVertexY", "Primary Vertex Position Y;Primary Vertex Position Y (cm);Events",40,-1,1); | |
132 | fListHist->Add(fHistPrimaryVertexY); | |
133 | ||
134 | fHistPrimaryVertexZ = new TH1F("h1PrimaryVertexZ", "Primary Vertex Position Z;Primary Vertex Position Z (cm);Events",60,-5,5); | |
135 | fListHist->Add(fHistPrimaryVertexZ); | |
136 | ||
137 | // Cut checks: | |
138 | fHistDcaPosToPrimVertex = new TH2F("h2DcaPosToPrimVertex", "Positive V0 daughter;dca(cm);Status",500,0,5,2,-0.5,1.5); | |
139 | fListHist->Add(fHistDcaPosToPrimVertex); | |
140 | ||
141 | fHistDcaNegToPrimVertex = new TH2F("h2DcaNegToPrimVertex", "Negative V0 daughter;dca(cm);Status",500,0,5,2,-0.5,1.5); | |
142 | fListHist->Add(fHistDcaNegToPrimVertex); | |
143 | ||
144 | fHistDcaPosToPrimVertexZoom = new TH2F("h2DcaPosToPrimVertexZoom", "Positive V0 daughter;dca(cm);Status",100,0,0.1,2,-0.5,1.5); | |
145 | fListHist->Add(fHistDcaPosToPrimVertexZoom); | |
146 | ||
147 | fHistDcaNegToPrimVertexZoom = new TH2F("h2DcaNegToPrimVertexZoom", "Negative V0 daughter;dca(cm);Status",100,0,0.1,2,-0.5,1.5); | |
148 | fListHist->Add(fHistDcaNegToPrimVertexZoom); | |
149 | ||
150 | fHistRadiusV0 = new TH2F("h2RadiusV0", "Radius;Radius(cm);Status",1000,0,100,2,-0.5,1.5); | |
151 | fListHist->Add(fHistRadiusV0); | |
152 | ||
153 | fHistDecayLengthV0 = new TH2F("h2DecayLengthV0", "V0s decay Length;decay length(cm);Status", 200, 0, 100,2,-0.5,1.5); | |
154 | fListHist->Add(fHistDecayLengthV0); | |
155 | ||
156 | fHistDcaV0Daughters = new TH2F("h2DcaV0Daughters", "DCA between daughters;dca(cm);Status", 160, 0, 4,2,-0.5,1.5); | |
157 | fListHist->Add(fHistDcaV0Daughters); | |
158 | ||
159 | fHistChi2 = new TH2F("h2Chi2", "V0s chi2;chi2;Status", 33, 0, 33,2,-0.5,1.5); | |
160 | fListHist->Add(fHistChi2); | |
161 | ||
162 | fHistCosPointAngle = new TH2F("h2CosPointAngle", "Cosine of V0's pointing angle", 100,0,1,2,-0.5,1.5); | |
163 | fListHist->Add(fHistCosPointAngle); | |
164 | ||
165 | fHistCosPointAngleZoom = new TH2F("h2CosPointAngleZoom", "Cosine of V0's pointing angle", 100,0.9,1,2,-0.5,1.5); | |
166 | fListHist->Add(fHistCosPointAngleZoom); | |
167 | ||
168 | ||
169 | // Pt and rapidity distribution: | |
170 | fHistPtVsYK0s = new TH2F("h2PtVsYK0s", "K^{0} candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
171 | fListHist->Add(fHistPtVsYK0s); | |
172 | fHistPtVsYK0sMI = new TH2F("h2PtVsYK0sMI", "K^{0} MI candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
173 | fListHist->Add(fHistPtVsYK0sMI); | |
174 | ||
175 | fHistPtVsYLambda = new TH2F("h2PtVsYLambda", "#Lambda^{0} candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
176 | fListHist->Add(fHistPtVsYLambda); | |
177 | fHistPtVsYLambdaMI = new TH2F("h2PtVsYLambdaMI", "#Lambda^{0} MI candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
178 | fListHist->Add(fHistPtVsYLambdaMI); | |
179 | ||
180 | fHistPtVsYAntiLambda = new TH2F("h2PtVsYAntiLambda", "#bar{#Lambda}^{0} candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
181 | fListHist->Add(fHistPtVsYAntiLambda); | |
182 | fHistPtVsYAntiLambdaMI = new TH2F("h2PtVsYAntiLambdaMI", "#bar{#Lambda}^{0} MI candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
183 | fListHist->Add(fHistPtVsYAntiLambdaMI); | |
184 | ||
185 | ||
186 | // Mass: | |
187 | fHistMassK0 = new TH1F("h1MassK0", "K^{0} candidates;M(#pi^{+}#pi^{-}) (GeV/c^{2});Counts", 100, 0.4, 0.6); | |
188 | fListHist->Add(fHistMassK0); | |
189 | fHistMassK0MI = new TH1F("h1MassK0MI", "K^{0} candidates;M(#pi^{+}#pi^{-}) (GeV/c^{2});Counts", 100, 0.4, 0.6); | |
190 | fListHist->Add(fHistMassK0MI); | |
191 | ||
192 | fHistMassLambda = new TH1F("h1MassLambda", "#Lambda^{0} candidates;M(p#pi^{-}) (GeV/c^{2});Counts", 75, 1.05, 1.2); | |
193 | fListHist->Add(fHistMassLambda); | |
194 | fHistMassLambdaMI = new TH1F("h1MassLambdaMI", "#Lambda^{0} candidates;M(p#pi^{-}) (GeV/c^{2});Counts", 75, 1.05, 1.2); | |
195 | fListHist->Add(fHistMassLambdaMI); | |
196 | ||
197 | fHistMassAntiLambda = new TH1F("h1MassAntiLambda", "#bar{#Lambda}^{0} candidates;M(#bar{p}#pi^{+}) (GeV/c^{2});Counts", 75, 1.05, 1.2); | |
198 | fListHist->Add(fHistMassAntiLambda); | |
199 | fHistMassAntiLambdaMI = new TH1F("h1MassAntiLambdaMI", "#bar{#Lambda}^{0} candidates;M(#bar{p}#pi^{+}) (GeV/c^{2});Counts", 75, 1.05, 1.2); | |
200 | fListHist->Add(fHistMassAntiLambdaMI); | |
201 | ||
202 | ||
203 | fHistArmenterosPodolanski = new TH2F("h2ArmenterosPodolanski","Armenteros-Podolanski phase space;#alpha;p_{t} arm",100,-1.0,1.0,50,0,0.5); | |
204 | fHistArmenterosPodolanskiMI = new TH2F("h2ArmenterosPodolanskiMI","Armenteros-Podolanski phase space;#alpha;p_{t} arm",100,-1.0,1.0,50,0,0.5); | |
205 | ||
206 | ||
207 | } | |
208 | ||
209 | //________________________________________________________________________ | |
210 | void AliAnalysisTaskESDStrange::Exec(Option_t *) | |
211 | { | |
212 | //********************************************* | |
213 | // Called for each event | |
214 | //********************************************* | |
215 | ||
216 | if (!fESD) { | |
217 | Printf("ERROR: fESD not available"); | |
218 | return; | |
219 | } | |
220 | ||
221 | //Printf("There are %d tracks in this event", fESD->GetNumberOfTracks()); | |
222 | if (!(fESD->GetNumberOfTracks())) { | |
223 | Printf("No ESD track in the event"); | |
224 | return; | |
225 | } | |
226 | fHistTrackPerEvent->Fill(fESD->GetNumberOfTracks()); | |
227 | ||
228 | // Primary Vertex | |
229 | Double_t PrimaryVtxPosition[3]; | |
230 | Double_t PrimaryVtxCov[6]; | |
231 | ||
232 | const AliESDVertex *primaryVtx = fESD->GetPrimaryVertex(); | |
233 | ||
234 | primaryVtx->GetXYZ(PrimaryVtxPosition); | |
235 | primaryVtx->GetCovMatrix(PrimaryVtxCov); | |
236 | ||
237 | AliAODVertex *primary = new AliAODVertex(PrimaryVtxPosition, PrimaryVtxCov, primaryVtx->GetChi2toNDF(), NULL, -1, AliAODVertex::kPrimary); | |
238 | ||
239 | fHistPrimaryVertexX->Fill(primary->GetX()); | |
240 | fHistPrimaryVertexY->Fill(primary->GetY()); | |
241 | fHistPrimaryVertexZ->Fill(primary->GetZ()); | |
242 | ||
243 | // V0 variables: | |
244 | // to get info from ESD files and fill AliAODVertex: | |
245 | Float_t tdcaPosToPrimVertexXYZ[2], tdcaNegToPrimVertexXYZ[2]; // ..[0] = Impact parameter in XY plane and ..[1] = Impact parameter in Z | |
246 | Double_t tdcaDaughterToPrimVertex[2]; // ..[0] = Pos and ..[1] = Neg | |
247 | Double_t tdcaV0Daughters = 0, tdcaV0ToPrimVertex = 0; | |
248 | Double_t tMomPos[3]; | |
249 | Double_t tMomNeg[3]; | |
250 | Double_t V0Position[3]; | |
251 | Double_t V0Cov[6]; | |
252 | ||
253 | // to fill AliAODtrack: | |
254 | Double_t TrackP[3]; | |
255 | Double_t TrackPosition[3]; | |
256 | Double_t TrackcovTr[21]; | |
257 | Double_t Trackpid[10]; | |
258 | ||
259 | ||
260 | Double_t rcPosX = 0, rcPosY = 0, rcPosZ = 0; | |
261 | Double_t rcPosR = 0; | |
262 | Double_t cosPointAngle = 0; | |
263 | Double_t deltaPos2 = 0; | |
264 | Double_t deltaPos[3]; | |
265 | ||
266 | Int_t myStatus = 0; | |
267 | Double_t pt = 0; | |
268 | ||
269 | Int_t lIndexTrackPos = 0, lIndexTrackNeg = 0; | |
270 | UInt_t lLabelTrackPos = 0, lLabelTrackNeg = 0; | |
271 | ||
272 | AliAODTrack *myPosAodTrack = new AliAODTrack(); | |
273 | AliAODTrack *myNegAodTrack = new AliAODTrack(); | |
274 | AliAODVertex *myAODVertex = new AliAODVertex(); | |
275 | AliAODv0 *myAODv0 = new AliAODv0(); | |
276 | ||
277 | //cout<<"number V0s:"<<fESD->GetNumberOfV0s()<<endl; | |
278 | ||
279 | ||
280 | //************************* | |
281 | // V0 loop | |
282 | //************************* | |
283 | for (Int_t iV0 = 0; iV0 < fESD->GetNumberOfV0s(); iV0++) { | |
284 | ||
285 | AliESDv0 *v0 = fESD->GetV0(iV0); | |
286 | if (!v0) continue; | |
287 | myAODv0->ResetV0(); | |
288 | ||
289 | // AliAODVertex | |
290 | v0->GetXYZ(V0Position[0], V0Position[1], V0Position[2]); | |
291 | v0->GetPosCov(V0Cov); | |
292 | myAODVertex->SetPosition(V0Position[0],V0Position[1],V0Position[2]); | |
293 | myAODVertex->SetCovMatrix(V0Cov); | |
294 | myAODVertex->SetChi2perNDF(v0->GetChi2V0()); | |
295 | myAODVertex->SetID((Short_t)iV0); | |
296 | myAODVertex->SetParent(primary); | |
297 | myAODVertex->SetType(AliAODVertex::kV0); | |
298 | ||
299 | // AliAODtrack (V0 Daughters) | |
300 | lIndexTrackPos = TMath::Abs(v0->GetPindex()); | |
301 | lIndexTrackNeg = TMath::Abs(v0->GetNindex()); | |
302 | AliESDtrack *TrackPos = fESD->GetTrack(lIndexTrackPos); | |
303 | AliESDtrack *TrackNeg = fESD->GetTrack(lIndexTrackNeg); | |
304 | if (!TrackPos || !TrackNeg) { | |
305 | Printf("ERROR: Could not retreive one of the daughter track"); | |
306 | continue; | |
307 | } | |
308 | lLabelTrackPos = (UInt_t)TMath::Abs(TrackPos->GetLabel()); | |
309 | lLabelTrackNeg = (UInt_t)TMath::Abs(TrackNeg->GetLabel()); | |
310 | ||
311 | myPosAodTrack->SetID((Short_t)(TrackPos->GetID())); | |
312 | myPosAodTrack->SetLabel(lLabelTrackPos); | |
313 | TrackPos->GetPxPyPz(TrackP); | |
314 | myPosAodTrack->SetP(TrackP); | |
315 | TrackPos->GetXYZ(TrackPosition); | |
316 | myPosAodTrack->SetPosition(TrackPosition,kFALSE); | |
317 | TrackPos->GetCovarianceXYZPxPyPz(TrackcovTr); | |
318 | myPosAodTrack->SetCovMatrix(TrackcovTr); | |
319 | TrackPos->GetESDpid(Trackpid); | |
320 | myPosAodTrack->SetPID(Trackpid); | |
321 | myPosAodTrack->SetCharge((Short_t)(TrackPos->Charge())); | |
322 | myPosAodTrack->SetITSClusterMap(TrackPos->GetITSClusterMap()); | |
323 | myPosAodTrack->SetProdVertex(myAODVertex); | |
324 | myPosAodTrack->SetUsedForVtxFit(kTRUE); | |
325 | myPosAodTrack->SetUsedForPrimVtxFit(kFALSE); | |
326 | myPosAodTrack->SetType(AliAODTrack::kSecondary); | |
327 | myPosAodTrack->ConvertAliPIDtoAODPID(); | |
328 | ||
329 | myNegAodTrack->SetID((Short_t)(TrackNeg->GetID())); | |
330 | myNegAodTrack->SetLabel(lLabelTrackNeg); | |
331 | TrackNeg->GetPxPyPz(TrackP); | |
332 | myNegAodTrack->SetP(TrackP); | |
333 | TrackNeg->GetXYZ(TrackPosition); | |
334 | myNegAodTrack->SetPosition(TrackPosition,kFALSE); | |
335 | TrackNeg->GetCovarianceXYZPxPyPz(TrackcovTr); | |
336 | myNegAodTrack->SetCovMatrix(TrackcovTr); | |
337 | TrackNeg->GetESDpid(Trackpid); | |
338 | myNegAodTrack->SetPID(Trackpid); | |
339 | myNegAodTrack->SetCharge((Short_t)(TrackNeg->Charge())); | |
340 | myNegAodTrack->SetITSClusterMap(TrackPos->GetITSClusterMap()); | |
341 | myNegAodTrack->SetProdVertex(myAODVertex); | |
342 | myNegAodTrack->SetUsedForVtxFit(kTRUE); | |
343 | myNegAodTrack->SetUsedForPrimVtxFit(kFALSE); | |
344 | myNegAodTrack->SetType(AliAODTrack::kSecondary); | |
345 | myNegAodTrack->ConvertAliPIDtoAODPID(); | |
346 | ||
347 | myAODVertex->AddDaughter(myPosAodTrack); | |
348 | myAODVertex->AddDaughter(myNegAodTrack); | |
349 | ||
350 | // filling myAODv0 | |
351 | tdcaV0Daughters = v0->GetDcaV0Daughters(); | |
352 | tdcaV0ToPrimVertex = v0->GetD(); | |
353 | ||
354 | if (TrackPos) TrackPos->GetImpactParameters(tdcaPosToPrimVertexXYZ[0],tdcaPosToPrimVertexXYZ[1]); | |
355 | if (TrackNeg) TrackNeg->GetImpactParameters(tdcaNegToPrimVertexXYZ[0],tdcaNegToPrimVertexXYZ[1]); | |
356 | tdcaDaughterToPrimVertex[0] = TMath::Sqrt(tdcaPosToPrimVertexXYZ[0]*tdcaPosToPrimVertexXYZ[0]+tdcaPosToPrimVertexXYZ[1]*tdcaPosToPrimVertexXYZ[1]); | |
357 | tdcaDaughterToPrimVertex[1] = TMath::Sqrt(tdcaNegToPrimVertexXYZ[0]*tdcaNegToPrimVertexXYZ[0]+tdcaNegToPrimVertexXYZ[1]*tdcaNegToPrimVertexXYZ[1]); | |
358 | ||
359 | v0->GetPPxPyPz(tMomPos[0],tMomPos[1],tMomPos[2]); | |
360 | v0->GetNPxPyPz(tMomNeg[0],tMomNeg[1],tMomNeg[2]); | |
361 | ||
362 | myAODv0->Fill(myAODVertex, tdcaV0Daughters, tdcaV0ToPrimVertex, tMomPos, tMomNeg, tdcaDaughterToPrimVertex); | |
363 | ||
364 | ||
365 | // Reconstructed V0 position and Cos pointing angle: | |
366 | rcPosX = myAODv0->DecayVertexV0X(); | |
367 | rcPosY = myAODv0->DecayVertexV0Y(); | |
368 | rcPosZ = myAODv0->DecayVertexV0Z(); | |
369 | rcPosR = TMath::Sqrt(rcPosX*rcPosX+rcPosY*rcPosY); | |
370 | ||
371 | deltaPos[0] = rcPosX - PrimaryVtxPosition[0]; | |
372 | deltaPos[1] = rcPosY - PrimaryVtxPosition[1]; | |
373 | deltaPos[2] = rcPosZ - PrimaryVtxPosition[2]; | |
374 | deltaPos2 = deltaPos[0]*deltaPos[0] + deltaPos[1]*deltaPos[1] + deltaPos[2]*deltaPos[2]; | |
375 | cosPointAngle = (deltaPos[0]*(myAODv0->MomV0X()) + deltaPos[1]*(myAODv0->MomV0Y()) + deltaPos[2]*(myAODv0->MomV0Z()))/TMath::Sqrt((myAODv0->Ptot2V0())*deltaPos2); | |
376 | ||
377 | ||
378 | myStatus = v0->GetOnFlyStatus(); | |
379 | pt = TMath::Sqrt(myAODv0->Ptot2V0()); | |
380 | ||
381 | // filling histograms | |
382 | fHistDcaPosToPrimVertex->Fill(myAODv0->DcaPosToPrimVertex(),myStatus); | |
383 | fHistDcaNegToPrimVertex->Fill(myAODv0->DcaNegToPrimVertex(),myStatus); | |
384 | fHistDcaPosToPrimVertexZoom->Fill(myAODv0->DcaPosToPrimVertex(),myStatus); | |
385 | fHistDcaNegToPrimVertexZoom->Fill(myAODv0->DcaNegToPrimVertex(),myStatus); | |
386 | fHistRadiusV0->Fill(myAODv0->RadiusV0(),myStatus); | |
387 | fHistDecayLengthV0->Fill(myAODv0->DecayLengthV0(PrimaryVtxPosition),myStatus); | |
388 | fHistDcaV0Daughters->Fill(myAODv0->DcaV0Daughters(),myStatus); | |
389 | fHistChi2->Fill(myAODv0->Chi2V0(),myStatus); | |
390 | fHistCosPointAngle->Fill(cosPointAngle,myStatus); | |
391 | if (cosPointAngle >= 0.9) fHistCosPointAngleZoom->Fill(cosPointAngle,myStatus); | |
392 | if (!myStatus) { | |
393 | fHistPtVsYK0s->Fill(pt,myAODv0->RapK0Short()); | |
394 | fHistPtVsYLambda->Fill(pt,myAODv0->RapLambda()); | |
395 | fHistPtVsYAntiLambda->Fill(pt,myAODv0->RapLambda()); | |
396 | fHistArmenterosPodolanski->Fill(myAODv0->AlphaV0(),myAODv0->PtArmV0()); | |
397 | } | |
398 | else { | |
399 | fHistPtVsYK0sMI->Fill(pt,myAODv0->RapK0Short()); | |
400 | fHistPtVsYLambdaMI->Fill(pt,myAODv0->RapLambda()); | |
401 | fHistPtVsYAntiLambdaMI->Fill(pt,myAODv0->RapLambda()); | |
402 | fHistArmenterosPodolanskiMI->Fill(myAODv0->AlphaV0(),myAODv0->PtArmV0()); | |
403 | } | |
404 | // K0s histograms: | |
405 | if (TMath::Abs(myAODv0->RapK0Short()) < 1) { | |
406 | if (!myStatus) fHistMassK0->Fill(myAODv0->MassK0Short()); | |
407 | else fHistMassK0MI->Fill(myAODv0->MassK0Short()); | |
408 | } | |
409 | ||
410 | // Lambda and AntiLambda histograms | |
411 | if (TMath::Abs(myAODv0->RapLambda()) < 1) { | |
412 | if (!myStatus) { | |
413 | fHistMassLambda->Fill(myAODv0->MassLambda()); | |
414 | fHistMassAntiLambda->Fill(myAODv0->MassAntiLambda()); | |
415 | } | |
416 | else { | |
417 | fHistMassLambdaMI->Fill(myAODv0->MassLambda()); | |
418 | fHistMassAntiLambdaMI->Fill(myAODv0->MassAntiLambda()); | |
419 | } | |
420 | } | |
421 | ||
422 | } // end V0 loop | |
423 | ||
424 | if (primary) delete primary; | |
425 | if (myPosAodTrack) delete myPosAodTrack; | |
426 | if (myNegAodTrack) delete myNegAodTrack; | |
427 | if (myAODv0) delete myAODv0; | |
428 | ||
429 | ||
430 | // Post output data. | |
431 | PostData(0, fListHist); | |
432 | } | |
433 | ||
434 | //________________________________________________________________________ | |
435 | void AliAnalysisTaskESDStrange::Terminate(Option_t *) | |
436 | { | |
437 | // Draw result to the screen | |
438 | // Called once at the end of the query | |
439 | ||
440 | /* | |
441 | fHistTrackPerEvent = dynamic_cast<TH1F*> (((TList*)GetOutputData(0))->FindObject("fHistTrackPerEvent")); | |
442 | if (!fHistTrackPerEvent) { | |
443 | Printf("ERROR: fHistTrackPerEvent not available"); | |
444 | return; | |
445 | } | |
446 | ||
447 | TCanvas *c1 = new TCanvas("AliAnalysisTaskESDStrange","TrackPerEvent",10,10,510,510); | |
448 | c1->cd(1); | |
449 | fHistTrackPerEvent->DrawCopy("E"); | |
450 | */ | |
451 | } | |
452 | ||
453 | //---------------------------------------------------------------------------- | |
454 | ||
455 | Double_t myRap(Double_t rE, Double_t rPz) | |
456 | { | |
457 | Double_t lRapidity = 1.e30; | |
458 | if(rPz && rE && (rPz != rE) && (1.+(2./((rE/rPz)-1.))>0)) | |
459 | lRapidity = 0.5*log(1.+(2./((rE/rPz)-1.))); | |
460 | return lRapidity; | |
461 | } | |
462 | ||
463 | //---------------------------------------------------------------------------- | |
464 |