]>
Commit | Line | Data |
---|---|---|
369a736f | 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 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
16 | ||
17 | #include <TH1F.h> | |
18 | #include <TH2F.h> | |
19 | #include <TH3F.h> | |
20 | ||
21 | #include <TAxis.h> | |
22 | // #include "TObjArray.h" | |
23 | ||
24 | #include <AliAnalysisTask.h> | |
25 | #include <AliAnalysisManager.h> | |
26 | ||
27 | #include <AliAODEvent.h> | |
28 | #include <AliAODVertex.h> | |
29 | #include <AliAODv0.h> | |
30 | #include <AliAODInputHandler.h> | |
31 | ||
32 | #include "AliAnalysisTaskProtonLambda.h" | |
33 | #include <AliCentrality.h> | |
34 | //#include "AliAODpid.h" | |
35 | #include <AliPID.h> | |
36 | #include <AliPIDResponse.h> | |
37 | // #include <../STEER/STEER/AliV0.h> | |
38 | #include <AliExternalTrackParam.h> | |
39 | //#include <AliAODTrack.h> | |
40 | //#include <AliESDtrack.h> | |
41 | ||
42 | //#include "EventCollection.h" | |
43 | ||
44 | // Task to study femtoscopic proton-lambda correlations | |
45 | // Author: Hans Beck | |
46 | ||
47 | ClassImp(AliAnalysisTaskProtonLambda) | |
48 | //ClassImp(AliAnalysisTaskProtonLambda::GlobalTrackInfo) | |
49 | //ClassImp(AliAnalysisTaskProtonLambda::GTIContainer) | |
50 | ||
51 | #endif | |
52 | //________________________________________________________________________ | |
53 | AliAnalysisTaskProtonLambda::AliAnalysisTaskProtonLambda() | |
54 | : AliAnalysisTaskSE(), | |
55 | fkUseOnTheFly(kTRUE), | |
56 | fkAbsZvertexCut(10.0), | |
57 | fkCentCut(20.0), | |
58 | fkLamMass(1.115683), | |
59 | fkProMass(0.9382720), | |
60 | fkPioMass(0.13957018), | |
61 | fPIDResponse(0), | |
62 | fTpcResponse(0), | |
63 | fFemtoBuffer(0), | |
64 | fAOD(0), fPrimaryVtx(0), fOutputList(0), fOutputPrimaries(0), | |
65 | fOutput2Part(0), | |
66 | fGTI(0),fTrackBuffSize(18000), | |
67 | fHistGoodEvent(0), | |
68 | // fHistPrimaryVertexPosXY(0), fHistPrimaryVertexPosZ(0), | |
69 | // fHistTrackMultiplicity(0), | |
70 | // fHistShareV0pos(0),fHistShareV0neg(0), | |
71 | // fHistPosTofBeforeCut(0), fHistPosTofAfterCut(0), | |
72 | // fHistNegTofBeforeCut(0), fHistNegTofAfterCut(0), | |
73 | // fHistPosTpcBeforeCut(0), fHistPosTpcAfterCut(0), | |
74 | // fHistNegTpcBeforeCut(0), fHistNegTpcAfterCut(0), | |
75 | // fHistGoodV0(0), fHistCorrectSigns(0), | |
76 | // fHistDcaPosToPrimVertex(0), fHistDcaNegToPrimVertex(0), | |
77 | // fHistDcaPosToPrimVertexZoom(0), fHistDcaNegToPrimVertexZoom(0), | |
78 | // fHistRadiusV0(0), fHistDecayLengthV0(0), fHistDcaV0Daughters(0), | |
79 | // fHistChi2(0), fHistCosPointAngle(0), fHistCosPointAngleZoom(0), | |
80 | fHistSideBandOffLam(0), fHistSideBandOffALam(0), fHistTPCNclsPosOffLam(0), | |
81 | fHistTPCNclsNegOffLam(0), fHistTPCNclsPosOffALam(0), fHistTPCNclsNegOffALam(0), | |
82 | // fHistPosNsigmaTpcOffLam(0), fHistPosNsigmaTpcOffALam(0), fHistNegNsigmaTpcOffLam(0), | |
83 | // fHistNegNsigmaTpcOffALam(0), fHistUseTofOffLam(0), fHistUseTofOffALam(0), | |
84 | // fHistDcaPosOffLam(0), fHistDcaPosOffALam(0), fHistDcaNegOffLam(0), | |
85 | // fHistDcaNegOffALam(0), fHistDcaV0DaughtersOffLam(0), fHistDcaV0DaughtersOffALam(0), | |
86 | // fHistCosPointLamOff(0), fHistCosPointALamOff(0), fHistCosPointLamZoomOff(0), | |
87 | // fHistCosPointALamZoomOff(0), fHistV0RadiusLamOff(0), fHistV0RadiusALamOff(0), | |
88 | // fHistV0DecayLengthLamOff(0), fHistV0DecayLengthALamOff(0), fHistDcaV0PriVertexLamOff(0), | |
89 | // fHistDcaV0PriVertexALamOff(0), | |
90 | fHistMassLambdaOff(0), fHistMassAntiLambdaOff(0), | |
91 | // fHistPtVsMassLambdaOff(0), fHistPtVsMassAntiLambdaOff(0), | |
92 | fHistYPtMassLamOff(0), fHistYPtMassALamOff(0), | |
93 | // fHistPtVsYLambdaOff(0), fHistPtVsYAntiLambdaOff(0), | |
94 | fHistSideBandOnLam(0), fHistSideBandOnALam(0), | |
95 | // fHistLikeSignOnLam(0), fHistLikeSignOnALam(0), | |
96 | fHistTPCNclsPosOnLam(0), fHistTPCNclsNegOnLam(0), fHistTPCNclsPosOnALam(0),fHistTPCNclsNegOnALam(0), | |
97 | // fHistPosNsigmaTpcOnLam(0), fHistPosNsigmaTpcOnALam(0), fHistNegNsigmaTpcOnLam(0), fHistNegNsigmaTpcOnALam(0), | |
98 | // fHistUseTofOnLam(0),fHistUseTofOnALam(0),fHistDcaPosOnLam(0),fHistDcaPosOnALam(0),fHistDcaNegOnLam(0), | |
99 | // fHistDcaNegOnALam(0),fHistDcaV0DaughtersOnLam(0),fHistDcaV0DaughtersOnALam(0),fHistCosPointLamOn(0), | |
100 | // fHistCosPointALamOn(0),fHistCosPointLamZoomOn(0),fHistCosPointALamZoomOn(0),fHistV0RadiusLamOn(0), | |
101 | // fHistV0RadiusALamOn(0),fHistV0DecayLengthLamOn(0),fHistV0DecayLengthALamOn(0),fHistDcaV0PriVertexLamOn(0), | |
102 | // fHistDcaV0PriVertexALamOn(0), | |
103 | // fHistChi2TPCPosLamOn(0), fHistChi2TPCPosALamOn(0), fHistChi2TPCNegLamOn(0), fHistChi2TPCNegALamOn(0), | |
104 | // fHistMinvTPConlyLamOn(0), fHistMinvTPConlyALamOn(0), | |
105 | fHistMassLambdaOn(0),fHistMassAntiLambdaOn(0), | |
106 | // fHistPtVsMassLambdaOn(0), fHistPtVsMassAntiLambdaOn(0), | |
107 | fHistYPtMassLamOn(0),fHistYPtMassALamOn(0), | |
108 | // fHistPtVsYLambdaOn(0), fHistPtVsYAntiLambdaOn(0), | |
109 | // fHistMomDiffLam(0),fHistMomDiffALam(0),fHistMomDiffBgLam(0),fHistMomDiffBgALam(0), | |
110 | // fHistMomDiffWoSPDLam(0),fHistMomDiffWoSPDALam(0),fHistMomDiffWoSPDBgLam(0),fHistMomDiffWoSPDBgALam(0), | |
111 | fPriHistShare(0), | |
112 | // fPriHistPosNsigmaTof(0), | |
113 | fPriHistPosNsigmaTofVsP(0),fPriHistPosNsigmaTofVsPt(0), | |
114 | // fPriHistNegNsigmaTof(0), | |
115 | fPriHistNegNsigmaTofVsP(0),fPriHistNegNsigmaTofVsPt(0),fPriHistTOFsignalPosVsP(0), | |
116 | fPriHistTOFsignalPosVsPt(0),fPriHistTOFsignalNegVsP(0),fPriHistTOFsignalNegVsPt(0),fPriHistHybridTOFsigPosWoTPC(0), | |
117 | fPriHistHybridTOFsigPosTPCok(0),fPriHistHybridTOFsigNegWoTPC(0),fPriHistHybridTOFsigNegTPCok(0), | |
118 | // fPriHistHasTofPos(0), | |
119 | fPriHistTPCsignalPos(0), | |
120 | // fPriHistNsigmaTPCPos(0), fPriHistTPCsignalTOFcutPos(0),fPriHistNsigmaTPCTOFcutPos(0), | |
121 | fPriHistTPCsignalLowPPos(0),fPriHistTPCsignalMedPPos(0),fPriHistTPCsignalHigPPos(0), | |
122 | // fPriHistHasTofNeg(0), | |
123 | fPriHistTPCsignalNeg(0), | |
124 | // fPriHistNsigmaTPCNeg(0),fPriHistTPCsignalTOFcutNeg(0),fPriHistNsigmaTPCTOFcutNeg(0), | |
125 | fPriHistTPCsignalLowPNeg(0),fPriHistTPCsignalMedPNeg(0),fPriHistTPCsignalHigPNeg(0), | |
126 | fPriHistDCAxyYPtPro(0),fPriHistDCAxyYPtAPro(0), | |
127 | // f2HistLamLamMeanMinDistProReal(0), | |
128 | // f2HistLamLamMeanMinDistPioReal(0),f2HistLamProMeanMinDistProReal(0),f2HistALamALamMeanMinDistAProReal(0), | |
129 | // f2HistALamALamMeanMinDistPioReal(0),f2HistALamAProMeanMinDistAProReal(0), | |
130 | // f2HistSftLamLamMeanMinDistProReal(0), | |
131 | // f2HistSftLamLamMeanMinDistPioReal(0),f2HistSftLamProMeanMinDistProReal(0),f2HistSftALamALamMeanMinDistAProReal(0), | |
132 | // f2HistSftALamALamMeanMinDistPioReal(0),f2HistSftALamAProMeanMinDistAProReal(0), | |
133 | // f2HistSftIrocLamLamMeanMinDistProReal(0), | |
134 | // f2HistSftIrocLamLamMeanMinDistPioReal(0),f2HistSftIrocLamProMeanMinDistProReal(0),f2HistSftIrocALamALamMeanMinDistAProReal(0), | |
135 | // f2HistSftIrocALamALamMeanMinDistPioReal(0),f2HistSftIrocALamAProMeanMinDistAProReal(0), | |
136 | // f2HistSftOrocLamLamMeanMinDistProReal(0), | |
137 | // f2HistSftOrocLamLamMeanMinDistPioReal(0),f2HistSftOrocLamProMeanMinDistProReal(0),f2HistSftOrocALamALamMeanMinDistAProReal(0), | |
138 | // f2HistSftOrocALamALamMeanMinDistPioReal(0),f2HistSftOrocALamAProMeanMinDistAProReal(0), | |
139 | // f2HistMtLamLamReal(0), | |
140 | f2HistMtLamProReal(0), | |
141 | // f2HistMtALamALamReal(0), | |
142 | f2HistMtALamAProReal(0), | |
143 | // f2HistMtLowQLamLamReal(0), | |
144 | f2HistMtLowQLamProReal(0), | |
145 | // f2HistMtLowQALamALamReal(0), | |
146 | f2HistMtLowQALamAProReal(0), | |
147 | LamProReal(0),ALamAProReal(0), | |
148 | // f3HistLamLamQinvReal(0), | |
149 | // f3HistALamALamQinvReal(0),f3HistLamLamMinvReal(0), | |
150 | // f3HistLamProMinvReal(0),f3HistALamALamMinvReal(0),f3HistALamAProMinvReal(0), | |
151 | // f2HistBgLamBgLamMeanMinDistProReal(0),f2HistBgLamBgLamMeanMinDistPioReal(0), | |
152 | // f2HistBgLamProMeanMinDistProReal(0),f2HistBgALamBgALamMeanMinDistAProReal(0), | |
153 | // f2HistBgALamBgALamMeanMinDistPioReal(0),f2HistBgALamAProMeanMinDistAProReal(0), | |
154 | // f2HistSftBgLamBgLamMeanMinDistProReal(0),f2HistSftBgLamBgLamMeanMinDistPioReal(0), | |
155 | // f2HistSftBgLamProMeanMinDistProReal(0),f2HistSftBgALamBgALamMeanMinDistAProReal(0), | |
156 | // f2HistSftBgALamBgALamMeanMinDistPioReal(0),f2HistSftBgALamAProMeanMinDistAProReal(0), | |
157 | // f2HistSftIrocBgLamBgLamMeanMinDistProReal(0),f2HistSftIrocBgLamBgLamMeanMinDistPioReal(0), | |
158 | // f2HistSftIrocBgLamProMeanMinDistProReal(0),f2HistSftIrocBgALamBgALamMeanMinDistAProReal(0), | |
159 | // f2HistSftIrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftIrocBgALamAProMeanMinDistAProReal(0), | |
160 | // f2HistSftOrocBgLamBgLamMeanMinDistProReal(0),f2HistSftOrocBgLamBgLamMeanMinDistPioReal(0), | |
161 | // f2HistSftOrocBgLamProMeanMinDistProReal(0),f2HistSftOrocBgALamBgALamMeanMinDistAProReal(0), | |
162 | // f2HistSftOrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftOrocBgALamAProMeanMinDistAProReal(0), | |
163 | BgLamProReal(0),BgALamAProReal(0), | |
164 | // f3HistBgLamBgLamQinvReal(0), | |
165 | // f3HistBgALamBgALamQinvReal(0), | |
166 | // f2HistLamLamMeanMinDistProMixed(0),f2HistLamLamMeanMinDistPioMixed(0), | |
167 | // f2HistLamProMeanMinDistProMixed(0),f2HistALamALamMeanMinDistAProMixed(0), | |
168 | // f2HistALamALamMeanMinDistPioMixed(0),f2HistALamAProMeanMinDistAProMixed(0), | |
169 | // f2HistSftLamLamMeanMinDistProMixed(0),f2HistSftLamLamMeanMinDistPioMixed(0), | |
170 | // f2HistSftLamProMeanMinDistProMixed(0),f2HistSftALamALamMeanMinDistAProMixed(0), | |
171 | // f2HistSftALamALamMeanMinDistPioMixed(0),f2HistSftALamAProMeanMinDistAProMixed(0), | |
172 | // f2HistSftIrocLamLamMeanMinDistProMixed(0),f2HistSftIrocLamLamMeanMinDistPioMixed(0), | |
173 | // f2HistSftIrocLamProMeanMinDistProMixed(0),f2HistSftIrocALamALamMeanMinDistAProMixed(0), | |
174 | // f2HistSftIrocALamALamMeanMinDistPioMixed(0),f2HistSftIrocALamAProMeanMinDistAProMixed(0), | |
175 | // f2HistSftOrocLamLamMeanMinDistProMixed(0),f2HistSftOrocLamLamMeanMinDistPioMixed(0), | |
176 | // f2HistSftOrocLamProMeanMinDistProMixed(0),f2HistSftOrocALamALamMeanMinDistAProMixed(0), | |
177 | // f2HistSftOrocALamALamMeanMinDistPioMixed(0),f2HistSftOrocALamAProMeanMinDistAProMixed(0), | |
178 | LamProMixed(0),ALamAProMixed(0), | |
179 | // f3HistLamLamQinvMixed(0), | |
180 | // f3HistALamALamQinvMixed(0),f3HistLamLamMinvMixed(0), | |
181 | // f3HistLamProMinvMixed(0),f3HistALamALamMinvMixed(0),f3HistALamAProMinvMixed(0), | |
182 | // f2HistBgLamBgLamMeanMinDistProMixed(0),f2HistBgLamBgLamMeanMinDistPioMixed(0), | |
183 | // f2HistBgLamProMeanMinDistProMixed(0),f2HistBgALamBgALamMeanMinDistAProMixed(0), | |
184 | // f2HistBgALamBgALamMeanMinDistPioMixed(0),f2HistBgALamAProMeanMinDistAProMixed(0), | |
185 | // f2HistSftBgLamBgLamMeanMinDistProMixed(0),f2HistSftBgLamBgLamMeanMinDistPioMixed(0), | |
186 | // f2HistSftBgLamProMeanMinDistProMixed(0),f2HistSftBgALamBgALamMeanMinDistAProMixed(0), | |
187 | // f2HistSftBgALamBgALamMeanMinDistPioMixed(0),f2HistSftBgALamAProMeanMinDistAProMixed(0), | |
188 | // f2HistSftIrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftIrocBgLamBgLamMeanMinDistPioMixed(0), | |
189 | // f2HistSftIrocBgLamProMeanMinDistProMixed(0),f2HistSftIrocBgALamBgALamMeanMinDistAProMixed(0), | |
190 | // f2HistSftIrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftIrocBgALamAProMeanMinDistAProMixed(0), | |
191 | // f2HistSftOrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftOrocBgLamBgLamMeanMinDistPioMixed(0), | |
192 | // f2HistSftOrocBgLamProMeanMinDistProMixed(0),f2HistSftOrocBgALamBgALamMeanMinDistAProMixed(0), | |
193 | // f2HistSftOrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftOrocBgALamAProMeanMinDistAProMixed(0), | |
194 | BgLamProMixed(0),BgALamAProMixed(0) | |
195 | // f3HistBgLamBgLamQinvMixed(0), | |
196 | // f3HistBgALamBgALamQinvMixed(0) | |
197 | { | |
198 | // Dummy constructor | |
199 | fPrimaryVtxPosition[0]=0; | |
200 | fPrimaryVtxPosition[1]=0; | |
201 | fPrimaryVtxPosition[2]=0; | |
202 | } | |
203 | //________________________________________________________________________ | |
204 | AliAnalysisTaskProtonLambda::AliAnalysisTaskProtonLambda(const char *name) | |
205 | : AliAnalysisTaskSE(name), | |
206 | fkUseOnTheFly(kTRUE), | |
207 | fkAbsZvertexCut(10.0), | |
208 | fkCentCut(20.0), | |
209 | fkLamMass(1.115683), | |
210 | fkProMass(0.9382720), | |
211 | fkPioMass(0.13957018), | |
212 | fPIDResponse(0), | |
213 | fTpcResponse(0), | |
214 | fFemtoBuffer(0), | |
215 | fAOD(0), fPrimaryVtx(0), fOutputList(0), fOutputPrimaries(0), | |
216 | fOutput2Part(0), | |
217 | fGTI(0),fTrackBuffSize(18000), | |
218 | fHistGoodEvent(0), | |
219 | // fHistPrimaryVertexPosXY(0), fHistPrimaryVertexPosZ(0), | |
220 | // fHistTrackMultiplicity(0), | |
221 | // fHistShareV0pos(0),fHistShareV0neg(0), | |
222 | // fHistPosTofBeforeCut(0), fHistPosTofAfterCut(0), | |
223 | // fHistNegTofBeforeCut(0), fHistNegTofAfterCut(0), | |
224 | // fHistPosTpcBeforeCut(0), fHistPosTpcAfterCut(0), | |
225 | // fHistNegTpcBeforeCut(0), fHistNegTpcAfterCut(0), | |
226 | // fHistGoodV0(0), fHistCorrectSigns(0), | |
227 | // fHistDcaPosToPrimVertex(0), fHistDcaNegToPrimVertex(0), | |
228 | // fHistDcaPosToPrimVertexZoom(0), fHistDcaNegToPrimVertexZoom(0), | |
229 | // fHistRadiusV0(0), fHistDecayLengthV0(0), fHistDcaV0Daughters(0), | |
230 | // fHistChi2(0), fHistCosPointAngle(0), fHistCosPointAngleZoom(0), | |
231 | fHistSideBandOffLam(0), fHistSideBandOffALam(0), fHistTPCNclsPosOffLam(0), | |
232 | fHistTPCNclsNegOffLam(0), fHistTPCNclsPosOffALam(0), fHistTPCNclsNegOffALam(0), | |
233 | // fHistPosNsigmaTpcOffLam(0), fHistPosNsigmaTpcOffALam(0), fHistNegNsigmaTpcOffLam(0), | |
234 | // fHistNegNsigmaTpcOffALam(0), fHistUseTofOffLam(0), fHistUseTofOffALam(0), | |
235 | // fHistDcaPosOffLam(0), fHistDcaPosOffALam(0), fHistDcaNegOffLam(0), | |
236 | // fHistDcaNegOffALam(0), fHistDcaV0DaughtersOffLam(0), fHistDcaV0DaughtersOffALam(0), | |
237 | // fHistCosPointLamOff(0), fHistCosPointALamOff(0), fHistCosPointLamZoomOff(0), | |
238 | // fHistCosPointALamZoomOff(0), fHistV0RadiusLamOff(0), fHistV0RadiusALamOff(0), | |
239 | // fHistV0DecayLengthLamOff(0), fHistV0DecayLengthALamOff(0), fHistDcaV0PriVertexLamOff(0), | |
240 | // fHistDcaV0PriVertexALamOff(0), | |
241 | fHistMassLambdaOff(0), fHistMassAntiLambdaOff(0), | |
242 | // fHistPtVsMassLambdaOff(0), fHistPtVsMassAntiLambdaOff(0), | |
243 | fHistYPtMassLamOff(0), fHistYPtMassALamOff(0), | |
244 | // fHistPtVsYLambdaOff(0), fHistPtVsYAntiLambdaOff(0), | |
245 | fHistSideBandOnLam(0), fHistSideBandOnALam(0), | |
246 | // fHistLikeSignOnLam(0), fHistLikeSignOnALam(0), | |
247 | fHistTPCNclsPosOnLam(0), fHistTPCNclsNegOnLam(0), fHistTPCNclsPosOnALam(0),fHistTPCNclsNegOnALam(0), | |
248 | // fHistPosNsigmaTpcOnLam(0), fHistPosNsigmaTpcOnALam(0), fHistNegNsigmaTpcOnLam(0), fHistNegNsigmaTpcOnALam(0), | |
249 | // fHistUseTofOnLam(0),fHistUseTofOnALam(0),fHistDcaPosOnLam(0),fHistDcaPosOnALam(0),fHistDcaNegOnLam(0), | |
250 | // fHistDcaNegOnALam(0),fHistDcaV0DaughtersOnLam(0),fHistDcaV0DaughtersOnALam(0),fHistCosPointLamOn(0), | |
251 | // fHistCosPointALamOn(0),fHistCosPointLamZoomOn(0),fHistCosPointALamZoomOn(0),fHistV0RadiusLamOn(0), | |
252 | // fHistV0RadiusALamOn(0),fHistV0DecayLengthLamOn(0),fHistV0DecayLengthALamOn(0),fHistDcaV0PriVertexLamOn(0), | |
253 | // fHistDcaV0PriVertexALamOn(0), | |
254 | // fHistChi2TPCPosLamOn(0), fHistChi2TPCPosALamOn(0), fHistChi2TPCNegLamOn(0), fHistChi2TPCNegALamOn(0), | |
255 | // fHistMinvTPConlyLamOn(0), fHistMinvTPConlyALamOn(0), | |
256 | fHistMassLambdaOn(0),fHistMassAntiLambdaOn(0), | |
257 | // fHistPtVsMassLambdaOn(0), fHistPtVsMassAntiLambdaOn(0), | |
258 | fHistYPtMassLamOn(0),fHistYPtMassALamOn(0), | |
259 | // fHistPtVsYLambdaOn(0), fHistPtVsYAntiLambdaOn(0), | |
260 | // fHistMomDiffLam(0),fHistMomDiffALam(0),fHistMomDiffBgLam(0),fHistMomDiffBgALam(0), | |
261 | // fHistMomDiffWoSPDLam(0),fHistMomDiffWoSPDALam(0),fHistMomDiffWoSPDBgLam(0),fHistMomDiffWoSPDBgALam(0), | |
262 | fPriHistShare(0), | |
263 | // fPriHistPosNsigmaTof(0), | |
264 | fPriHistPosNsigmaTofVsP(0),fPriHistPosNsigmaTofVsPt(0), | |
265 | // fPriHistNegNsigmaTof(0), | |
266 | fPriHistNegNsigmaTofVsP(0),fPriHistNegNsigmaTofVsPt(0),fPriHistTOFsignalPosVsP(0), | |
267 | fPriHistTOFsignalPosVsPt(0),fPriHistTOFsignalNegVsP(0),fPriHistTOFsignalNegVsPt(0),fPriHistHybridTOFsigPosWoTPC(0), | |
268 | fPriHistHybridTOFsigPosTPCok(0),fPriHistHybridTOFsigNegWoTPC(0),fPriHistHybridTOFsigNegTPCok(0), | |
269 | // fPriHistHasTofPos(0), | |
270 | fPriHistTPCsignalPos(0), | |
271 | // fPriHistNsigmaTPCPos(0), fPriHistTPCsignalTOFcutPos(0),fPriHistNsigmaTPCTOFcutPos(0), | |
272 | fPriHistTPCsignalLowPPos(0),fPriHistTPCsignalMedPPos(0),fPriHistTPCsignalHigPPos(0), | |
273 | // fPriHistHasTofNeg(0), | |
274 | fPriHistTPCsignalNeg(0), | |
275 | // fPriHistNsigmaTPCNeg(0),fPriHistTPCsignalTOFcutNeg(0),fPriHistNsigmaTPCTOFcutNeg(0), | |
276 | fPriHistTPCsignalLowPNeg(0),fPriHistTPCsignalMedPNeg(0),fPriHistTPCsignalHigPNeg(0), | |
277 | fPriHistDCAxyYPtPro(0),fPriHistDCAxyYPtAPro(0), | |
278 | // f2HistLamLamMeanMinDistProReal(0), | |
279 | // f2HistLamLamMeanMinDistPioReal(0),f2HistLamProMeanMinDistProReal(0),f2HistALamALamMeanMinDistAProReal(0), | |
280 | // f2HistALamALamMeanMinDistPioReal(0),f2HistALamAProMeanMinDistAProReal(0), | |
281 | // f2HistSftLamLamMeanMinDistProReal(0), | |
282 | // f2HistSftLamLamMeanMinDistPioReal(0),f2HistSftLamProMeanMinDistProReal(0),f2HistSftALamALamMeanMinDistAProReal(0), | |
283 | // f2HistSftALamALamMeanMinDistPioReal(0),f2HistSftALamAProMeanMinDistAProReal(0), | |
284 | // f2HistSftIrocLamLamMeanMinDistProReal(0), | |
285 | // f2HistSftIrocLamLamMeanMinDistPioReal(0),f2HistSftIrocLamProMeanMinDistProReal(0),f2HistSftIrocALamALamMeanMinDistAProReal(0), | |
286 | // f2HistSftIrocALamALamMeanMinDistPioReal(0),f2HistSftIrocALamAProMeanMinDistAProReal(0), | |
287 | // f2HistSftOrocLamLamMeanMinDistProReal(0), | |
288 | // f2HistSftOrocLamLamMeanMinDistPioReal(0),f2HistSftOrocLamProMeanMinDistProReal(0),f2HistSftOrocALamALamMeanMinDistAProReal(0), | |
289 | // f2HistSftOrocALamALamMeanMinDistPioReal(0),f2HistSftOrocALamAProMeanMinDistAProReal(0), | |
290 | // f2HistMtLamLamReal(0), | |
291 | f2HistMtLamProReal(0), | |
292 | // f2HistMtALamALamReal(0), | |
293 | f2HistMtALamAProReal(0), | |
294 | // f2HistMtLowQLamLamReal(0), | |
295 | f2HistMtLowQLamProReal(0), | |
296 | // f2HistMtLowQALamALamReal(0), | |
297 | f2HistMtLowQALamAProReal(0), | |
298 | LamProReal(0),ALamAProReal(0), | |
299 | // f3HistLamLamQinvReal(0), | |
300 | // f3HistALamALamQinvReal(0),f3HistLamLamMinvReal(0), | |
301 | // f3HistLamProMinvReal(0),f3HistALamALamMinvReal(0),f3HistALamAProMinvReal(0), | |
302 | // f2HistBgLamBgLamMeanMinDistProReal(0),f2HistBgLamBgLamMeanMinDistPioReal(0), | |
303 | // f2HistBgLamProMeanMinDistProReal(0),f2HistBgALamBgALamMeanMinDistAProReal(0), | |
304 | // f2HistBgALamBgALamMeanMinDistPioReal(0),f2HistBgALamAProMeanMinDistAProReal(0), | |
305 | // f2HistSftBgLamBgLamMeanMinDistProReal(0),f2HistSftBgLamBgLamMeanMinDistPioReal(0), | |
306 | // f2HistSftBgLamProMeanMinDistProReal(0),f2HistSftBgALamBgALamMeanMinDistAProReal(0), | |
307 | // f2HistSftBgALamBgALamMeanMinDistPioReal(0),f2HistSftBgALamAProMeanMinDistAProReal(0), | |
308 | // f2HistSftIrocBgLamBgLamMeanMinDistProReal(0),f2HistSftIrocBgLamBgLamMeanMinDistPioReal(0), | |
309 | // f2HistSftIrocBgLamProMeanMinDistProReal(0),f2HistSftIrocBgALamBgALamMeanMinDistAProReal(0), | |
310 | // f2HistSftIrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftIrocBgALamAProMeanMinDistAProReal(0), | |
311 | // f2HistSftOrocBgLamBgLamMeanMinDistProReal(0),f2HistSftOrocBgLamBgLamMeanMinDistPioReal(0), | |
312 | // f2HistSftOrocBgLamProMeanMinDistProReal(0),f2HistSftOrocBgALamBgALamMeanMinDistAProReal(0), | |
313 | // f2HistSftOrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftOrocBgALamAProMeanMinDistAProReal(0), | |
314 | BgLamProReal(0),BgALamAProReal(0), | |
315 | // f3HistBgLamBgLamQinvReal(0), | |
316 | // f3HistBgALamBgALamQinvReal(0), | |
317 | // f2HistLamLamMeanMinDistProMixed(0),f2HistLamLamMeanMinDistPioMixed(0), | |
318 | // f2HistLamProMeanMinDistProMixed(0),f2HistALamALamMeanMinDistAProMixed(0), | |
319 | // f2HistALamALamMeanMinDistPioMixed(0),f2HistALamAProMeanMinDistAProMixed(0), | |
320 | // f2HistSftLamLamMeanMinDistProMixed(0),f2HistSftLamLamMeanMinDistPioMixed(0), | |
321 | // f2HistSftLamProMeanMinDistProMixed(0),f2HistSftALamALamMeanMinDistAProMixed(0), | |
322 | // f2HistSftALamALamMeanMinDistPioMixed(0),f2HistSftALamAProMeanMinDistAProMixed(0), | |
323 | // f2HistSftIrocLamLamMeanMinDistProMixed(0),f2HistSftIrocLamLamMeanMinDistPioMixed(0), | |
324 | // f2HistSftIrocLamProMeanMinDistProMixed(0),f2HistSftIrocALamALamMeanMinDistAProMixed(0), | |
325 | // f2HistSftIrocALamALamMeanMinDistPioMixed(0),f2HistSftIrocALamAProMeanMinDistAProMixed(0), | |
326 | // f2HistSftOrocLamLamMeanMinDistProMixed(0),f2HistSftOrocLamLamMeanMinDistPioMixed(0), | |
327 | // f2HistSftOrocLamProMeanMinDistProMixed(0),f2HistSftOrocALamALamMeanMinDistAProMixed(0), | |
328 | // f2HistSftOrocALamALamMeanMinDistPioMixed(0),f2HistSftOrocALamAProMeanMinDistAProMixed(0), | |
329 | LamProMixed(0),ALamAProMixed(0), | |
330 | // f3HistLamLamQinvMixed(0), | |
331 | // f3HistALamALamQinvMixed(0),f3HistLamLamMinvMixed(0), | |
332 | // f3HistLamProMinvMixed(0),f3HistALamALamMinvMixed(0),f3HistALamAProMinvMixed(0), | |
333 | // f2HistBgLamBgLamMeanMinDistProMixed(0),f2HistBgLamBgLamMeanMinDistPioMixed(0), | |
334 | // f2HistBgLamProMeanMinDistProMixed(0),f2HistBgALamBgALamMeanMinDistAProMixed(0), | |
335 | // f2HistBgALamBgALamMeanMinDistPioMixed(0),f2HistBgALamAProMeanMinDistAProMixed(0), | |
336 | // f2HistSftBgLamBgLamMeanMinDistProMixed(0),f2HistSftBgLamBgLamMeanMinDistPioMixed(0), | |
337 | // f2HistSftBgLamProMeanMinDistProMixed(0),f2HistSftBgALamBgALamMeanMinDistAProMixed(0), | |
338 | // f2HistSftBgALamBgALamMeanMinDistPioMixed(0),f2HistSftBgALamAProMeanMinDistAProMixed(0), | |
339 | // f2HistSftIrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftIrocBgLamBgLamMeanMinDistPioMixed(0), | |
340 | // f2HistSftIrocBgLamProMeanMinDistProMixed(0),f2HistSftIrocBgALamBgALamMeanMinDistAProMixed(0), | |
341 | // f2HistSftIrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftIrocBgALamAProMeanMinDistAProMixed(0), | |
342 | // f2HistSftOrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftOrocBgLamBgLamMeanMinDistPioMixed(0), | |
343 | // f2HistSftOrocBgLamProMeanMinDistProMixed(0),f2HistSftOrocBgALamBgALamMeanMinDistAProMixed(0), | |
344 | // f2HistSftOrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftOrocBgALamAProMeanMinDistAProMixed(0), | |
345 | BgLamProMixed(0),BgALamAProMixed(0) | |
346 | // f3HistBgLamBgLamQinvMixed(0), | |
347 | // f3HistBgALamBgALamQinvMixed(0) | |
348 | { | |
349 | // Constructor | |
350 | fPrimaryVtxPosition[0]=0; | |
351 | fPrimaryVtxPosition[1]=0; | |
352 | fPrimaryVtxPosition[2]=0; | |
353 | ||
354 | // Define output slots only here | |
355 | // Output slot #1 writes into a TList container | |
356 | DefineOutput(1, TList::Class()); | |
357 | DefineOutput(2, TList::Class()); | |
358 | DefineOutput(3, TList::Class()); | |
359 | } | |
360 | //________________________________________________________________________ | |
361 | AliAnalysisTaskProtonLambda::~AliAnalysisTaskProtonLambda() { | |
362 | // Destructor, go through the data member and delete them | |
363 | ||
364 | // fPIDResponse is just a pointer to the pid response task, | |
365 | // we don't create it so we don't delete it. It comes from | |
366 | // the AliInputEventHandler | |
367 | ||
368 | if (fTpcResponse){ | |
369 | delete fTpcResponse; | |
370 | fTpcResponse=0; | |
371 | } | |
372 | if(fFemtoBuffer){ | |
373 | delete fFemtoBuffer; | |
374 | fFemtoBuffer=0; | |
375 | } | |
376 | // fAOD also just comes from a function of the AliAnalysisTaskSE | |
377 | // fPrimaryVtx comes from the fAOD | |
378 | ||
379 | // The lists containing the histograms | |
380 | if (fOutputList){ | |
381 | fOutputList->Delete(); | |
382 | delete fOutputList; | |
383 | fOutputList=0; | |
384 | } | |
385 | if (fOutputPrimaries){ | |
386 | fOutputPrimaries->Delete(); | |
387 | delete fOutputPrimaries; | |
388 | fOutputPrimaries=0; | |
389 | } | |
390 | if (fOutput2Part){ | |
391 | fOutput2Part->Delete(); | |
392 | delete fOutput2Part; | |
393 | fOutput2Part=0; | |
394 | } | |
395 | ||
396 | // Array, note the [] with the delete | |
397 | if (fGTI) | |
398 | delete[] fGTI; | |
399 | fGTI=0; | |
400 | ||
401 | } | |
402 | //________________________________________________________________________ | |
403 | void AliAnalysisTaskProtonLambda::UserCreateOutputObjects() | |
404 | { | |
405 | // Create histograms and other objects and variables | |
406 | // Called once | |
407 | ||
408 | // Get the PID response object | |
409 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
410 | if(!man){AliError("Couldn't get the analysis manager!");} | |
411 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
412 | if(!inputHandler){AliError("Couldn't get the input handler!");} | |
413 | fPIDResponse = inputHandler->GetPIDResponse(); | |
414 | if(!fPIDResponse){AliError("Couldn't get the PID response task!");} | |
415 | ||
416 | // Create dE/dx spectra cut. use it by calling | |
417 | // fTpcResponse->GetExpectedSignal(mom, AliPID::kProton) | |
418 | fTpcResponse = new AliTPCPIDResponse(); | |
419 | Double_t AlephParameters[5]; | |
420 | // They are only valid for data, see $ALICE_ROOT/PWG2/SPECTRA/AliProtonAnalysisBase.cxx | |
421 | // for monte carlo parameters | |
422 | AlephParameters[0] = 0.0283086; | |
423 | AlephParameters[1] = 2.63394e+01; | |
424 | AlephParameters[2] = 5.04114e-11; | |
425 | AlephParameters[3] = 2.12543e+00; | |
426 | AlephParameters[4] = 4.88663e+00; | |
427 | fTpcResponse->SetBetheBlochParameters(AlephParameters[0],AlephParameters[1],AlephParameters[2],AlephParameters[3],AlephParameters[4]); | |
428 | ||
429 | // Create the buffer for event mixing | |
430 | // Standard values are | |
431 | // fkZvertexBins(10), | |
432 | // fkCentBins(10), | |
433 | // fkMixBuff(5), | |
434 | // fkPriTrackLim(100), | |
435 | // fkV0Lim(50), | |
436 | // fFemtoBuffer = new FemtoBuffer(10,10,5,100,50,fkAbsZvertexCut,fkCentCut); | |
437 | fFemtoBuffer = new FemtoBuffer(4,2,7,100,50,fkAbsZvertexCut,fkCentCut); | |
438 | ||
439 | // In AODs, TPC only tracks don't have the pid information stored. | |
440 | // Also, the TPC only tracks don't have any resolution in the DCAxy | |
441 | // to distinguish between primaries and secondaries so we need the | |
442 | // corresponding global track for every TPC only track. The way to do | |
443 | // this is to just store the pointer to the global track for every id. | |
444 | fGTI = new AliAODTrack *[fTrackBuffSize]; // Array of pointers | |
445 | ||
446 | // Create the output list | |
447 | fOutputList = new TList(); | |
448 | fOutputList->SetOwner(); | |
449 | fOutputPrimaries = new TList(); | |
450 | fOutputPrimaries->SetOwner(); | |
451 | fOutput2Part = new TList(); | |
452 | fOutput2Part->SetOwner(); | |
453 | ||
454 | // Invariant mass binning for lambdas | |
455 | const Int_t nMinvBins = 140; | |
456 | const Float_t minvLowEdge=1.060683, minvHiEdge=1.200683; | |
457 | ||
458 | // Control hist for event cuts | |
459 | fHistGoodEvent = new TH1F("h1GoodEvent","No of events passing the cuts.",10,-.5,9.5); | |
460 | fOutputList->Add(fHistGoodEvent); | |
461 | ||
462 | // Primary Vertex: | |
463 | // fHistPrimaryVertexPosXY = new TH2F("h2PrimaryVertexPosXY", "Primary Vertex Position XY;Primary Vertex Position X (cm);Primary Vertex Position Y (cm)",100,-0.5,0.5,100,-0.5,0.5); | |
464 | // fOutputList->Add(fHistPrimaryVertexPosXY); | |
465 | // fHistPrimaryVertexPosZ = new TH1F("h1PrimaryVertexPosZ", "Primary Vertex Position Z;Primary Vertex Position Z (cm);Events",200,-12.0,12.0); | |
466 | // fOutputList->Add(fHistPrimaryVertexPosZ); | |
467 | ||
468 | // // Multiplicity | |
469 | // fHistTrackMultiplicity = new TH1F("fHistTrackMultiplicity", "Multiplicity distribution;Number of tracks;Events", 200, 0, 40000); | |
470 | // fOutputList->Add(fHistTrackMultiplicity); | |
471 | ||
472 | // // | |
473 | // // V0 histograms | |
474 | // // | |
475 | // // Shared clusters | |
476 | // fHistShareV0pos = new TH1F("h1ShareV0pos","Shared clusters pos V0 daughters;#shared clusters;counts" | |
477 | // ,160,0,160); | |
478 | // fOutputList->Add(fHistShareV0pos); | |
479 | // fHistShareV0neg = new TH1F("h1ShareV0neg","Shared clusters neg V0 daughters;#shared clusters;counts" | |
480 | // ,160,0,160); | |
481 | // fOutputList->Add(fHistShareV0neg); | |
482 | ||
483 | // // PID via TPC dE/dx | |
484 | // fHistPosTpcBeforeCut = new TH2F ("h2PosTpcBeforeCut","TPC signal (pos daughter) before cut;momentum (GeV/c);TPC signal",40,0,4,100,0,400); | |
485 | // fOutputList->Add(fHistPosTpcBeforeCut); | |
486 | // fHistPosTpcAfterCut = new TH2F ("h2PosTpcAfterCut","TPC signal (pos daughter) after cut;momentum (GeV/c);TPC signal",40,0,4,100,0,400); | |
487 | // fOutputList->Add(fHistPosTpcAfterCut); | |
488 | // fHistNegTpcBeforeCut = new TH2F ("h2NegTpcBeforeCut","TPC signal (neg daughter) before cut;momentum (GeV/c);TPC signal",40,0,4,100,0,400); | |
489 | // fOutputList->Add(fHistNegTpcBeforeCut); | |
490 | // fHistNegTpcAfterCut = new TH2F ("h2NegTpcAfterCut","TPC signal (neg daughter) after cut;momentum (GeV/c);TPC signal",40,0,4,100,0,400); | |
491 | // fOutputList->Add(fHistNegTpcAfterCut); | |
492 | ||
493 | // // Histograms comparing offline and on-the-fly | |
494 | // fHistGoodV0 = new TH2F("h2GoodV0","0: all, 1: two daughters, 2: like-sign, 3: 80 clusters4: tpcrefit;id;Status",10,-.5,9.5,2,-.5,1.5); | |
495 | // fOutputList->Add(fHistGoodV0); | |
496 | // fHistCorrectSigns = new TH2F ("h2CorrectSigns","0: correct, 1: swapped, 2: like-sign;sign;Status",3,-.5,2.5,2,-.5,1.5); | |
497 | // fOutputList->Add(fHistCorrectSigns); | |
498 | // fHistDcaPosToPrimVertex = new TH2F("h2DcaPosToPrimVertex", "Positive V0 daughter;dca(cm);Status",500,0,5,2,-0.5,1.5); | |
499 | // fOutputList->Add(fHistDcaPosToPrimVertex); | |
500 | // fHistDcaNegToPrimVertex = new TH2F("h2DcaNegToPrimVertex", "Negative V0 daughter;dca(cm);Status",500,0,5,2,-0.5,1.5); | |
501 | // fOutputList->Add(fHistDcaNegToPrimVertex); | |
502 | // fHistDcaPosToPrimVertexZoom = new TH2F("h2DcaPosToPrimVertexZoom", "Positive V0 daughter;dca(cm);Status",100,0,0.1,2,-0.5,1.5); | |
503 | // fOutputList->Add(fHistDcaPosToPrimVertexZoom); | |
504 | // fHistDcaNegToPrimVertexZoom = new TH2F("h2DcaNegToPrimVertexZoom", "Negative V0 daughter;dca(cm);Status",100,0,0.1,2,-0.5,1.5); | |
505 | // fOutputList->Add(fHistDcaNegToPrimVertexZoom); | |
506 | // fHistRadiusV0 = new TH2F("h2RadiusV0", "Radius;Radius(cm);Status",1000,0,100,2,-0.5,1.5); | |
507 | // fOutputList->Add(fHistRadiusV0); | |
508 | // fHistDecayLengthV0 = new TH2F("h2DecayLengthV0", "V0s decay Length;decay length(cm);Status", 200, 0, 100,2,-0.5,1.5); | |
509 | // fOutputList->Add(fHistDecayLengthV0); | |
510 | // fHistDcaV0Daughters = new TH2F("h2DcaV0Daughters", "DCA between daughters;dca(cm);Status", 160, 0, 4,2,-0.5,1.5); | |
511 | // fOutputList->Add(fHistDcaV0Daughters); | |
512 | // fHistChi2 = new TH2F("h2Chi2", "V0s chi2;chi2;Status", 12, 0, 1.2,2,-0.5,1.5); | |
513 | // fOutputList->Add(fHistChi2); | |
514 | // fHistCosPointAngle = new TH2F("h2CosPointAngle", "Cosine of V0's pointing angle", 100,0,1,2,-0.5,1.5); | |
515 | // fOutputList->Add(fHistCosPointAngle); | |
516 | // fHistCosPointAngleZoom = new TH2F("h2CosPointAngleZoom", "Cosine of V0's pointing angle", 100,0.9,1,2,-0.5,1.5); | |
517 | // fOutputList->Add(fHistCosPointAngleZoom); | |
518 | ||
519 | // | |
520 | // V0 offline distributons | |
521 | // | |
522 | ||
523 | // Invariant mass distribution for the side band background | |
524 | fHistSideBandOffLam = new TH1F ("h1SideBandOffLam","m_{inv}(#Lambda) w/o any cuts;m_{inv}(#Lambda)",nMinvBins,minvLowEdge,minvHiEdge); | |
525 | fOutputList->Add(fHistSideBandOffLam); | |
526 | fHistSideBandOffALam = new TH1F ("h1SideBandOffALam","m_{inv}(#bar{#Lambda}) w/o any cuts;m_{inv}(#bar{#Lambda})",nMinvBins,minvLowEdge,minvHiEdge); | |
527 | fOutputList->Add(fHistSideBandOffALam); | |
528 | ||
529 | // Number of TPC clusters | |
530 | fHistTPCNclsPosOffLam = new TH2F ("h2MassLamOffTPCNclsPos","m_{inv}(#Lambda) vs NTPCcls(pos);NTPCcls(pos);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
531 | fOutputList->Add(fHistTPCNclsPosOffLam); | |
532 | fHistTPCNclsNegOffLam = new TH2F ("h2MassLamOffTPCNclsNeg","m_{inv}(#Lambda) vs NTPCcls(neg);NTPCcls(neg);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
533 | fOutputList->Add(fHistTPCNclsNegOffLam); | |
534 | fHistTPCNclsPosOffALam = new TH2F ("h2MassALamOffTPCNclsPos","m_{inv}(#bar{#Lambda}) vs NTPCcls(pos);NTPCcls(pos);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
535 | fOutputList->Add(fHistTPCNclsPosOffALam); | |
536 | fHistTPCNclsNegOffALam = new TH2F ("h2MassALamOffTPCNclsNeg","m_{inv}(#bar{#Lambda}) vs NTPCcls(neg);NTPCcls(neg);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
537 | fOutputList->Add(fHistTPCNclsNegOffALam); | |
538 | ||
539 | // fHistPosNsigmaTpcOffLam = new TH2F ("h2PosNsigmaTpcOffLam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
540 | // fOutputList->Add(fHistPosNsigmaTpcOffLam); | |
541 | // fHistPosNsigmaTpcOffALam = new TH2F ("h2PosNsigmaTpcOffALam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
542 | // fOutputList->Add(fHistPosNsigmaTpcOffALam); | |
543 | // fHistNegNsigmaTpcOffLam = new TH2F ("h2NegNsigmaTpcOffLam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
544 | // fOutputList->Add(fHistNegNsigmaTpcOffLam); | |
545 | // fHistNegNsigmaTpcOffALam = new TH2F ("h2NegNsigmaTpcOffALam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
546 | // fOutputList->Add(fHistNegNsigmaTpcOffALam); | |
547 | // fHistUseTofOffLam = new TH2F ("h2UseTofOffLam","0: no tof or within 5sigma, 1: tof more than 5sigma;m_{inv};TOF",2,-.5,1.5,nMinvBins,minvLowEdge,minvHiEdge); | |
548 | // fOutputList->Add(fHistUseTofOffLam); | |
549 | // fHistUseTofOffALam = new TH2F ("h2UseTofOffALam","0: no tof or within 5sigma, 1: tof more than 5sigma;m_{inv};TOF",2,-.5,1.5,nMinvBins,minvLowEdge,minvHiEdge); | |
550 | // fOutputList->Add(fHistUseTofOffALam); | |
551 | ||
552 | // // DCA of daughters to primary vertex | |
553 | // fHistDcaPosOffLam = new TH2F ("h2DcaPosOffLam","m_{inv}(#Lambda) vs dca pos daughter;dca (cm);m_{inv}(p#pi^{-})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
554 | // fOutputList->Add(fHistDcaPosOffLam); | |
555 | // fHistDcaPosOffALam = new TH2F ("h2DcaPosOffALam","m_{inv}(#bar{#Lambda}) vs dca pos daughter;dca (cm);m_{inv}(#bar{p}#pi^{+})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
556 | // fOutputList->Add(fHistDcaPosOffALam); | |
557 | // fHistDcaNegOffLam = new TH2F ("h2DcaNegOffLam","m_{inv}(#Lambda) vs dca neg daughter;dca (cm);m_{inv}(p#pi^{-})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
558 | // fOutputList->Add(fHistDcaNegOffLam); | |
559 | // fHistDcaNegOffALam = new TH2F ("h2DcaNegOffALam","m_{inv}(#bar{#Lambda}) vs dca neg daughter;dca (cm);m_{inv}(#bar{p}#pi^{+})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
560 | // fOutputList->Add(fHistDcaNegOffALam); | |
561 | ||
562 | // // DCA of V0 daughters | |
563 | // fHistDcaV0DaughtersOffLam = new TH2F ("h2DcaLamDaughtersOff","DCA of #Lambda daughters vs minv;dca(cm);minv",20,0,2,nMinvBins,minvLowEdge,minvHiEdge); | |
564 | // fOutputList->Add(fHistDcaV0DaughtersOffLam); | |
565 | // fHistDcaV0DaughtersOffALam = new TH2F ("h2DcaALamDaughtersOff","DCA of #bar{#Lambda} daughters vs minv;dca(cm);minv",20,0,2,nMinvBins,minvLowEdge,minvHiEdge); | |
566 | // fOutputList->Add(fHistDcaV0DaughtersOffALam); | |
567 | ||
568 | // // Cosine of pointing angle | |
569 | // fHistCosPointLamOff = new TH2F ("h2CosPointLamOff","m_{inv}(#Lambda) vs cos(pointing angle);cos(pointing angle);m_{inv}(#Lambda)",10,0.99,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
570 | // fOutputList->Add(fHistCosPointLamOff); | |
571 | // fHistCosPointALamOff = new TH2F ("h2CosPointALamOff","m_{inv}(#bar{#Lambda}) vs cos(pointing angle);cos(pointing angle);m_{inv}(#bar{#Lambda})",10,0.99,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
572 | // fOutputList->Add(fHistCosPointALamOff); | |
573 | // fHistCosPointLamZoomOff = new TH2F ("h2CosPointLamZoomOff","m_{inv}(#Lambda) vs cos(pointing angle);cos(pointing angle);m_{inv}(#Lambda)",10,0.999,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
574 | // fOutputList->Add(fHistCosPointLamZoomOff); | |
575 | // fHistCosPointALamZoomOff = new TH2F ("h2CosPointALamZoomOff","m_{inv}(#bar{#Lambda}) vs cos(pointing angle);cos(pointing angle);m_{inv}(#bar{#Lambda})",10,0.999,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
576 | // fOutputList->Add(fHistCosPointALamZoomOff); | |
577 | ||
578 | // // Radius of V0 vertex position | |
579 | // fHistV0RadiusLamOff = new TH2F ("h2V0RadiusLamOff","m_{inv}(#Lambda) vs V0 radius of V0 vertex;radius(cm);m_{inv}",20,0,10,nMinvBins,minvLowEdge,minvHiEdge); | |
580 | // fOutputList->Add(fHistV0RadiusLamOff); | |
581 | // fHistV0RadiusALamOff = new TH2F ("h2V0RadiusALamOff","m_{inv}(#bar{#Lambda}) vs V0 radius of V0 vertex;radius(cm);m_{inv}",20,0,10,nMinvBins,minvLowEdge,minvHiEdge); | |
582 | // fOutputList->Add(fHistV0RadiusALamOff); | |
583 | ||
584 | // // Decay length of V0 | |
585 | // fHistV0DecayLengthLamOff = new TH2F ("h2V0DecayLengthLamOff","m_{inv}(#Lambda) vs decay length of V0;decay length (cm);m_{inv}(#Lambda)",100,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
586 | // fOutputList->Add(fHistV0DecayLengthLamOff); | |
587 | // fHistV0DecayLengthALamOff = new TH2F ("h2V0DecayLengthALamOff","m_{inv}(#bar{#Lambda}) vs decay length of V0;decay length (cm);m_{inv}(#bar{#Lambda})",100,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
588 | // fOutputList->Add(fHistV0DecayLengthALamOff); | |
589 | ||
590 | // // DCA of primary vertex and V0 | |
591 | // fHistDcaV0PriVertexLamOff = new TH2F ("h2DcaV0PriVertexLamOff","m_{inv}(#Lambda) vs dca (V0 - prim. vertex);dca(cm);m_{inv}(#Lambda)",200,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
592 | // fOutputList->Add(fHistDcaV0PriVertexLamOff); | |
593 | // fHistDcaV0PriVertexALamOff = new TH2F ("h2DcaV0PriVertexALamOff","m_{inv}(#bar{#Lambda}) vs dca (V0 - prim. vertex);dca(cm);m_{inv}(#bar{#Lambda})",200,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
594 | // fOutputList->Add(fHistDcaV0PriVertexALamOff); | |
595 | ||
596 | // Invariant mass, invariant mass vs pt and y-pt | |
597 | fHistMassLambdaOff = new TH1F("h1MassLambdaOff", "#Lambda^{0} Offline candidates;M(p#pi^{-}) (GeV/c^{2});Counts", nMinvBins, minvLowEdge, minvHiEdge); | |
598 | fOutputList->Add(fHistMassLambdaOff); | |
599 | fHistMassAntiLambdaOff = new TH1F("h1MassAntiLambdaOff", "#bar{#Lambda}^{0} Offline candidates;M(#bar{p}#pi^{+}) (GeV/c^{2});Counts", nMinvBins, minvLowEdge, minvHiEdge); | |
600 | fOutputList->Add(fHistMassAntiLambdaOff); | |
601 | // fHistPtVsMassLambdaOff = new TH2F("h2PtVsMassLambdaOff","#Lambda^{0} Offline candidates;p_{t} (GeV/c);M(p#pi^{-}) (GeV/c^{2})",100,0,10,nMinvBins, minvLowEdge, minvHiEdge); | |
602 | // fOutputList->Add(fHistPtVsMassLambdaOff); | |
603 | // fHistPtVsMassAntiLambdaOff = new TH2F("h2PtVsMassAntiLambdaOff","#bar{#Lambda}^{0} Offline candidates;p_{t} (GeV/c);M(#bar{p}#pi^{+}) (GeV/c^{2})",100,0,10,nMinvBins, minvLowEdge, minvHiEdge); | |
604 | // fOutputList->Add(fHistPtVsMassAntiLambdaOff); | |
605 | // fHistPtVsYLambdaOff = new TH2F("h2PtVsYLambdaOff", "#Lambda^{0} Offline candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
606 | // fOutputList->Add(fHistPtVsYLambdaOff); | |
607 | // fHistPtVsYAntiLambdaOff = new TH2F("h2PtVsYAntiLambdaOff", "#bar{#Lambda}^{0} Offline candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
608 | // fOutputList->Add(fHistPtVsYAntiLambdaOff); | |
609 | ||
610 | // 3d y pt mass | |
611 | fHistYPtMassLamOff = new TH3F ("h3YPtMassLamOff","m_{inv}(#Lambda) vs y and pt;y;pt;mass",30,-1.5,1.5,30,0,15,nMinvBins,minvLowEdge,minvHiEdge); | |
612 | fOutputList->Add(fHistYPtMassLamOff); | |
613 | fHistYPtMassALamOff = new TH3F ("h3YPtMassALamOff","m_{inv}(#bar{#Lambda}) vs y and pt;y;pt;mass",30,-1.5,1.5,30,0,15,nMinvBins,minvLowEdge,minvHiEdge); | |
614 | fOutputList->Add(fHistYPtMassALamOff); | |
615 | ||
616 | // | |
617 | // V0 on-the-fly distributons | |
618 | // | |
619 | ||
620 | // Invariant mass distribution for the side band background | |
621 | fHistSideBandOnLam = new TH1F ("h1SideBandOnLam","m_{inv}(#Lambda) w/o any cuts;m_{inv}(#Lambda)",nMinvBins,minvLowEdge,minvHiEdge); | |
622 | fOutputList->Add(fHistSideBandOnLam); | |
623 | fHistSideBandOnALam = new TH1F ("h1SideBandOnALam","m_{inv}(#bar{#Lambda}) w/o any cuts;m_{inv}(#bar{#Lambda})",nMinvBins,minvLowEdge,minvHiEdge); | |
624 | fOutputList->Add(fHistSideBandOnALam); | |
625 | ||
626 | // // Like-sign | |
627 | // fHistLikeSignOnLam = new TH2F ("h2MassLamOnLikeSign"," 0 = ok, 1 = swapped, 2 = like sign;sign;m_{inv} p#pi^{-}",3,-.5,2.5,nMinvBins,minvLowEdge,minvHiEdge); | |
628 | // fOutputList->Add(fHistLikeSignOnLam); | |
629 | // fHistLikeSignOnALam = new TH2F ("h2MassALamOnLikeSign"," 0 = ok, 1 = swapped, 2= like sign;sign;m_{inv} #bar{p}#pi^{+}",3,-.5,2.5,nMinvBins,minvLowEdge,minvHiEdge); | |
630 | // fOutputList->Add(fHistLikeSignOnALam); | |
631 | ||
632 | // Number of TPC clusters | |
633 | fHistTPCNclsPosOnLam = new TH2F ("h2MassLamOnTPCNclsPos","m_{inv}(#Lambda) vs NTPCcls(pos);NTPCcls(pos);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
634 | fOutputList->Add(fHistTPCNclsPosOnLam); | |
635 | fHistTPCNclsNegOnLam = new TH2F ("h2MassLamOnTPCNclsNeg","m_{inv}(#Lambda) vs NTPCcls(neg);NTPCcls(neg);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
636 | fOutputList->Add(fHistTPCNclsNegOnLam); | |
637 | fHistTPCNclsPosOnALam = new TH2F ("h2MassALamOnTPCNclsPos","m_{inv}(#bar{#Lambda}) vs NTPCcls(pos);NTPCcls(pos);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
638 | fOutputList->Add(fHistTPCNclsPosOnALam); | |
639 | fHistTPCNclsNegOnALam = new TH2F ("h2MassALamOnTPCNclsNeg","m_{inv}(#bar{#Lambda}) vs NTPCcls(neg);NTPCcls(neg);minv",18,0,180,nMinvBins,minvLowEdge,minvHiEdge); | |
640 | fOutputList->Add(fHistTPCNclsNegOnALam); | |
641 | ||
642 | // fHistPosNsigmaTpcOnLam = new TH2F ("h2PosNsigmaTpcOnLam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
643 | // fOutputList->Add(fHistPosNsigmaTpcOnLam); | |
644 | // fHistPosNsigmaTpcOnALam = new TH2F ("h2PosNsigmaTpcOnALam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
645 | // fOutputList->Add(fHistPosNsigmaTpcOnALam); | |
646 | // fHistNegNsigmaTpcOnLam = new TH2F ("h2NegNsigmaTpcOnLam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
647 | // fOutputList->Add(fHistNegNsigmaTpcOnLam); | |
648 | // fHistNegNsigmaTpcOnALam = new TH2F ("h2NegNsigmaTpcOnALam","minv vs nsigma tpc pos;Nsigma TPC;m_{inv}",50,0,5,nMinvBins,minvLowEdge,minvHiEdge); | |
649 | // fOutputList->Add(fHistNegNsigmaTpcOnALam); | |
650 | // fHistUseTofOnLam = new TH2F ("h2UseTofOnLam","0: no tof or within 5sigma, 1: tof more than 5sigma;m_{inv};TOF",2,-.5,1.5,nMinvBins,minvLowEdge,minvHiEdge); | |
651 | // fOutputList->Add(fHistUseTofOnLam); | |
652 | // fHistUseTofOnALam = new TH2F ("h2UseTofOnALam","0: no tof or within 5sigma, 1: tof more than 5sigma;m_{inv};TOF",2,-.5,1.5,nMinvBins,minvLowEdge,minvHiEdge); | |
653 | // fOutputList->Add(fHistUseTofOnALam); | |
654 | ||
655 | // // DCA of daughters to primary vertex | |
656 | // fHistDcaPosOnLam = new TH2F ("h2DcaPosOnLam","m_{inv}(#Lambda) vs dca pos daughter;dca (cm);m_{inv}(p#pi^{-})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
657 | // fOutputList->Add(fHistDcaPosOnLam); | |
658 | // fHistDcaPosOnALam = new TH2F ("h2DcaPosOnALam","m_{inv}(#bar{#Lambda}) vs dca pos daughter;dca (cm);m_{inv}(#bar{p}#pi^{+})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
659 | // fOutputList->Add(fHistDcaPosOnALam); | |
660 | // fHistDcaNegOnLam = new TH2F ("h2DcaNegOnLam","m_{inv}(#Lambda) vs dca neg daughter;dca (cm);m_{inv}(p#pi^{-})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
661 | // fOutputList->Add(fHistDcaNegOnLam); | |
662 | // fHistDcaNegOnALam = new TH2F ("h2DcaNegOnALam","m_{inv}(#bar{#Lambda}) vs dca neg daughter;dca (cm);m_{inv}(#bar{p}#pi^{+})",50,0,0.5,nMinvBins,minvLowEdge,minvHiEdge); | |
663 | // fOutputList->Add(fHistDcaNegOnALam); | |
664 | ||
665 | // // DCA of V0 daughters | |
666 | // fHistDcaV0DaughtersOnLam = new TH2F ("h2DcaLamDaughtersOn","DCA of #Lambda daughters vs minv;dca(cm);minv",20,0,2,nMinvBins,minvLowEdge,minvHiEdge); | |
667 | // fOutputList->Add(fHistDcaV0DaughtersOnLam); | |
668 | // fHistDcaV0DaughtersOnALam = new TH2F ("h2DcaALamDaughtersOn","DCA of #bar{#Lambda} daughters vs minv;dca(cm);minv",20,0,2,nMinvBins,minvLowEdge,minvHiEdge); | |
669 | // fOutputList->Add(fHistDcaV0DaughtersOnALam); | |
670 | ||
671 | // // Cosine of pointing angle | |
672 | // fHistCosPointLamOn = new TH2F ("h2CosPointLamOn","m_{inv}(#Lambda) vs cos(pointing angle);cos(pointing angle);m_{inv}(#Lambda)",10,0.99,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
673 | // fOutputList->Add(fHistCosPointLamOn); | |
674 | // fHistCosPointALamOn = new TH2F ("h2CosPointALamOn","m_{inv}(#bar{#Lambda}) vs cos(pointing angle);cos(pointing angle);m_{inv}(#bar{#Lambda})",10,0.99,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
675 | // fOutputList->Add(fHistCosPointALamOn); | |
676 | // fHistCosPointLamZoomOn = new TH2F ("h2CosPointLamZoomOn","m_{inv}(#Lambda) vs cos(pointing angle);cos(pointing angle);m_{inv}(#Lambda)",10,0.999,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
677 | // fOutputList->Add(fHistCosPointLamZoomOn); | |
678 | // fHistCosPointALamZoomOn = new TH2F ("h2CosPointALamZoomOn","m_{inv}(#bar{#Lambda}) vs cos(pointing angle);cos(pointing angle);m_{inv}(#bar{#Lambda})",10,0.999,1.0,nMinvBins,minvLowEdge,minvHiEdge); | |
679 | // fOutputList->Add(fHistCosPointALamZoomOn); | |
680 | ||
681 | // // Radius of V0 vertex position | |
682 | // fHistV0RadiusLamOn = new TH2F ("h2V0RadiusLamOn","m_{inv}(#Lambda) vs V0 radius of V0 vertex;radius(cm);m_{inv}",20,0,10,nMinvBins,minvLowEdge,minvHiEdge); | |
683 | // fOutputList->Add(fHistV0RadiusLamOn); | |
684 | // fHistV0RadiusALamOn = new TH2F ("h2V0RadiusALamOn","m_{inv}(#bar{#Lambda}) vs V0 radius of V0 vertex;radius(cm);m_{inv}",20,0,10,nMinvBins,minvLowEdge,minvHiEdge); | |
685 | // fOutputList->Add(fHistV0RadiusALamOn); | |
686 | ||
687 | // // Decay length of V0 | |
688 | // fHistV0DecayLengthLamOn = new TH2F ("h2V0DecayLengthLamOn","m_{inv}(#Lambda) vs decay length of V0;decay length (cm);m_{inv}(#Lambda)",100,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
689 | // fOutputList->Add(fHistV0DecayLengthLamOn); | |
690 | // fHistV0DecayLengthALamOn = new TH2F ("h2V0DecayLengthALamOn","m_{inv}(#bar{#Lambda}) vs decay length of V0;decay length (cm);m_{inv}(#bar{#Lambda})",100,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
691 | // fOutputList->Add(fHistV0DecayLengthALamOn); | |
692 | ||
693 | // // DCA of primary vertex and V0 | |
694 | // fHistDcaV0PriVertexLamOn = new TH2F ("h2DcaV0PriVertexLamOn","m_{inv}(#Lambda) vs dca (V0 - prim. vertex);dca(cm);m_{inv}(#Lambda)",200,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
695 | // fOutputList->Add(fHistDcaV0PriVertexLamOn); | |
696 | // fHistDcaV0PriVertexALamOn = new TH2F ("h2DcaV0PriVertexALamOn","m_{inv}(#bar{#Lambda}) vs dca (V0 - prim. vertex);dca(cm);m_{inv}(#bar{#Lambda})",200,0,20,nMinvBins,minvLowEdge,minvHiEdge); | |
697 | // fOutputList->Add(fHistDcaV0PriVertexALamOn); | |
698 | ||
699 | // // Chi2 of TPC clusters | |
700 | // fHistChi2TPCPosLamOn = new TH2F ("h2Chi2TPCPosLamOn","m_{inv}(#Lambda) vs TPC #Chi^{2} / ndf pos daughter;TPC #Chi^{2}/ndf pos daughter;m_{inv}(#Lambda)",100,0.,10.,nMinvBins,minvLowEdge,minvHiEdge); | |
701 | // fOutputList->Add(fHistChi2TPCPosLamOn); | |
702 | // fHistChi2TPCPosALamOn = new TH2F ("h2Chi2TPCPosALamOn","m_{inv}(#bar{#Lambda}) vs TPC #Chi^{2} / ndf pos daughter;TPC #Chi^{2}/ndf pos daughter;m_{inv}(#bar{#Lambda})",100,0.,10.,nMinvBins,minvLowEdge,minvHiEdge); | |
703 | // fOutputList->Add(fHistChi2TPCPosALamOn); | |
704 | // fHistChi2TPCNegLamOn = new TH2F ("h2Chi2TPCNegLamOn","m_{inv}(#Lambda) vs TPC #Chi^{2} / ndf neg daughter;TPC #Chi^{2}/ndf neg daughter;m_{inv}(#Lambda)",100,0.,10.,nMinvBins,minvLowEdge,minvHiEdge); | |
705 | // fOutputList->Add(fHistChi2TPCNegLamOn); | |
706 | // fHistChi2TPCNegALamOn = new TH2F ("h2Chi2TPCNegALamOn","m_{inv}(#bar{#Lambda}) vs TPC #Chi^{2} / ndf neg daughter;TPC #Chi^{2}/ndf neg daughter;m_{inv}(#bar{#Lambda})",100,0.,10.,nMinvBins,minvLowEdge,minvHiEdge); | |
707 | // fOutputList->Add(fHistChi2TPCNegALamOn); | |
708 | // // Invariant mass with TPC only tracks | |
709 | // fHistMinvTPConlyLamOn = new TH1F ("h1MinvTPConlyLamOn","m_{inv}(#Lambda) using TPC only daughters;m_{inv}(p#pi^{-})[GeV/c^{2}]",nMinvBins,minvLowEdge,minvHiEdge); | |
710 | // fOutputList->Add(fHistMinvTPConlyLamOn); | |
711 | // fHistMinvTPConlyALamOn = new TH1F ("h1MinvTPConlyALamOn","m_{inv}(#bar{#Lambda}) using TPC only daughters;m_{inv}(#bar{p}#pi^{+})[GeV/c^{2}]",nMinvBins,minvLowEdge,minvHiEdge); | |
712 | // fOutputList->Add(fHistMinvTPConlyALamOn); | |
713 | ||
714 | // Invariant mass, invariant mass vs pt and y-pt | |
715 | fHistMassLambdaOn = new TH1F("h1MassLambdaOn", "#Lambda^{0} Online candidates;M(p#pi^{-}) (GeV/c^{2});Counts", nMinvBins, minvLowEdge, minvHiEdge); | |
716 | fOutputList->Add(fHistMassLambdaOn); | |
717 | fHistMassAntiLambdaOn = new TH1F("h1MassAntiLambdaOn", "#bar{#Lambda}^{0} Online candidates;M(#bar{p}#pi^{+}) (GeV/c^{2});Counts", nMinvBins, minvLowEdge, minvHiEdge); | |
718 | fOutputList->Add(fHistMassAntiLambdaOn); | |
719 | // fHistPtVsMassLambdaOn = new TH2F("h2PtVsMassLambdaOn","#Lambda^{0} Online candidates;p_{t} (GeV/c);M(p#pi^{-}) (GeV/c^{2})",100,0,10,nMinvBins, minvLowEdge, minvHiEdge); | |
720 | // fOutputList->Add(fHistPtVsMassLambdaOn); | |
721 | // fHistPtVsMassAntiLambdaOn = new TH2F("h2PtVsMassAntiLambdaOn","#bar{#Lambda}^{0} Online candidates;p_{t} (GeV/c);M(#bar{p}#pi^{+}) (GeV/c^{2})",100,0,10,nMinvBins, minvLowEdge, minvHiEdge); | |
722 | // fOutputList->Add(fHistPtVsMassAntiLambdaOn); | |
723 | // fHistPtVsYLambdaOn = new TH2F("h2PtVsYLambdaOn", "#Lambda^{0} Online candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
724 | // fOutputList->Add(fHistPtVsYLambdaOn); | |
725 | // fHistPtVsYAntiLambdaOn = new TH2F("h2PtVsYAntiLambdaOn", "#bar{#Lambda}^{0} Online candidates;p_{t} (GeV/c);rapidity",30,0,15,30,-1.5,1.5); | |
726 | // fOutputList->Add(fHistPtVsYAntiLambdaOn); | |
727 | ||
728 | // 3d y pt mass | |
729 | fHistYPtMassLamOn = new TH3F ("h3YPtMassLamOn","m_{inv}(#Lambda) vs y and pt;y;pt;mass",30,-1.5,1.5,30,0,15,nMinvBins,minvLowEdge,minvHiEdge); | |
730 | fOutputList->Add(fHistYPtMassLamOn); | |
731 | fHistYPtMassALamOn = new TH3F ("h3YPtMassALamOn","m_{inv}(#bar{#Lambda}) vs y and pt;y;pt;mass",30,-1.5,1.5,30,0,15,nMinvBins,minvLowEdge,minvHiEdge); | |
732 | fOutputList->Add(fHistYPtMassALamOn); | |
733 | ||
734 | // // Momentum difference of standard (on-the-fly/offline) V0 and TPC only V0 | |
735 | // Int_t nPBins=200; Float_t AbsPRange=1.; | |
736 | // fHistMomDiffLam = new TH3F ("h3MomDiffLam","momentum difference #DeltaP standard V0 / TPConly V0 #Lambda;#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
737 | // ,nPBins,-AbsPRange,AbsPRange | |
738 | // ,nPBins,-AbsPRange,AbsPRange | |
739 | // ,nPBins,-AbsPRange,AbsPRange); | |
740 | // fOutputList->Add(fHistMomDiffLam); | |
741 | // fHistMomDiffALam = new TH3F ("h3MomDiffALam","momentum difference #DeltaP standard V0 / TPConly V0 #bar{#Lamdba};#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
742 | // ,nPBins,-AbsPRange,AbsPRange | |
743 | // ,nPBins,-AbsPRange,AbsPRange | |
744 | // ,nPBins,-AbsPRange,AbsPRange); | |
745 | // fOutputList->Add(fHistMomDiffALam); | |
746 | // fHistMomDiffBgLam = new TH3F ("h3MomDiffBgLam","momentum difference #DeltaP standard V0 / TPConly V0 Bg#Lambda;#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
747 | // ,nPBins,-AbsPRange,AbsPRange | |
748 | // ,nPBins,-AbsPRange,AbsPRange | |
749 | // ,nPBins,-AbsPRange,AbsPRange); | |
750 | // fOutputList->Add(fHistMomDiffBgLam); | |
751 | // fHistMomDiffBgALam = new TH3F ("h3MomDiffBgALam","momentum difference #DeltaP standard V0 / TPConly V0 Bg#bar{#Lambda};#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
752 | // ,nPBins,-AbsPRange,AbsPRange | |
753 | // ,nPBins,-AbsPRange,AbsPRange | |
754 | // ,nPBins,-AbsPRange,AbsPRange); | |
755 | // fOutputList->Add(fHistMomDiffBgALam); | |
756 | ||
757 | // // Same momentum difference with rejecting tracks with SPD hits | |
758 | // fHistMomDiffWoSPDLam = new TH3F ("h3MomDiffWoSPDLam","momentum difference #DeltaP standard V0 / TPConly V0 #Lambda;#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
759 | // ,nPBins,-AbsPRange,AbsPRange | |
760 | // ,nPBins,-AbsPRange,AbsPRange | |
761 | // ,nPBins,-AbsPRange,AbsPRange); | |
762 | // fOutputList->Add(fHistMomDiffWoSPDLam); | |
763 | // fHistMomDiffWoSPDALam = new TH3F ("h3MomDiffWoSPDALam","momentum difference #DeltaP standard V0 / TPConly V0 #bar{#Lamdba};#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
764 | // ,nPBins,-AbsPRange,AbsPRange | |
765 | // ,nPBins,-AbsPRange,AbsPRange | |
766 | // ,nPBins,-AbsPRange,AbsPRange); | |
767 | // fOutputList->Add(fHistMomDiffWoSPDALam); | |
768 | // fHistMomDiffWoSPDBgLam = new TH3F ("h3MomDiffWoSPDBgLam","momentum difference #DeltaP standard V0 / TPConly V0 Bg#Lambda;#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
769 | // ,nPBins,-AbsPRange,AbsPRange | |
770 | // ,nPBins,-AbsPRange,AbsPRange | |
771 | // ,nPBins,-AbsPRange,AbsPRange); | |
772 | // fOutputList->Add(fHistMomDiffWoSPDBgLam); | |
773 | // fHistMomDiffWoSPDBgALam = new TH3F ("h3MomDiffWoSPDBgALam","momentum difference #DeltaP standard V0 / TPConly V0 Bg#bar{#Lambda};#DeltaP_{x}[GeV/c];#DeltaP_{y}[GeV/c];#DeltaP_{z}[GeV/c]" | |
774 | // ,nPBins,-AbsPRange,AbsPRange | |
775 | // ,nPBins,-AbsPRange,AbsPRange | |
776 | // ,nPBins,-AbsPRange,AbsPRange); | |
777 | // fOutputList->Add(fHistMomDiffWoSPDBgALam); | |
778 | ||
779 | // | |
780 | // Distributions for the primaries | |
781 | // | |
782 | // Shared clusters | |
783 | fPriHistShare = new TH1F ("h1PriShare","Shared clusters, primaries;#shared clusters;counts", | |
784 | 160,0,160); | |
785 | fOutputPrimaries->Add(fPriHistShare); | |
786 | ||
787 | // Nsigma TOF distribution when forcing TOF | |
788 | // fPriHistPosNsigmaTof = new TH1F ("h1PosNsigmaTof","Nsigma distribution for positives;n_{#sigma,TOF}(proton);counts",200,-50,50); | |
789 | // fOutputPrimaries->Add(fPriHistPosNsigmaTof); | |
790 | fPriHistPosNsigmaTofVsP = new TH2F ("h2PosNsigmaTofVsP","Nsigma distribution for positives;total momentum [GeV/c];n_{#sigma,TOF}(proton);counts",20,0,5,200,-50,50); | |
791 | fOutputPrimaries->Add(fPriHistPosNsigmaTofVsP); | |
792 | fPriHistPosNsigmaTofVsPt = new TH2F ("h2PosNsigmaTofVsPt","Nsigma distribution for positives;transverse momentum [GeV/c];n_{#sigma,TOF}(proton);counts",20,0,5,200,-50,50); | |
793 | fOutputPrimaries->Add(fPriHistPosNsigmaTofVsPt); | |
794 | ||
795 | // fPriHistNegNsigmaTof = new TH1F ("h1NegNsigmaTof","Nsigma distribution for negatives;n_{#sigma,TOF}(anti-proton);counts",200,-50,50); | |
796 | // fOutputPrimaries->Add(fPriHistNegNsigmaTof); | |
797 | fPriHistNegNsigmaTofVsP = new TH2F ("h2NegNsigmaTofVsP","Nsigma distribution for negatives;total momentum [GeV/c];n_{#sigma,TOF}(anti-proton);counts",20,0,5,200,-50,50); | |
798 | fOutputPrimaries->Add(fPriHistNegNsigmaTofVsP); | |
799 | fPriHistNegNsigmaTofVsPt = new TH2F ("h2NegNsigmaTofVsPt","Nsigma distribution for negatives;transverse momentum [GeV/c];n_{#sigma,TOF}(anti-proton);counts",20,0,5,200,-50,50); | |
800 | fOutputPrimaries->Add(fPriHistNegNsigmaTofVsPt); | |
801 | fPriHistTOFsignalPosVsP = new TH2F ("h2TOFsignalPosVsP","tof signal vs p (positives);p [GeV/c];t_{meas} - t_{0} - t_{expected} [ps]",20,0.0,5.0,120,-10000.0,5000.0); | |
802 | fOutputPrimaries->Add(fPriHistTOFsignalPosVsP); | |
803 | fPriHistTOFsignalPosVsPt = new TH2F ("h2TOFsignalPosVsPt","tof signal vs pt (positives);pt [GeV/c];t_{meas} - t_{0} - t_{expected} [ps]",20,0.0,5.0,120,-10000.0,5000.0); | |
804 | fOutputPrimaries->Add(fPriHistTOFsignalPosVsPt); | |
805 | fPriHistTOFsignalNegVsP = new TH2F ("h2TOFsignalNegVsP","tof signal vs p (negatives);p [GeV/c];t_{meas} - t_{0} - t_{expected} [ps]",20,0.0,5.0,120,-10000.0,5000.0); | |
806 | fOutputPrimaries->Add(fPriHistTOFsignalNegVsP); | |
807 | fPriHistTOFsignalNegVsPt = new TH2F ("h2TOFsignalNegVsPt","tof signal vs pt (negatives);pt [GeV/c];t_{meas} - t_{0} - t_{expected} [ps]",20,0.0,5.0,120,-10000.0,5000.0); | |
808 | fOutputPrimaries->Add(fPriHistTOFsignalNegVsPt); | |
809 | // Hybrid analysis | |
810 | fPriHistHybridTOFsigPosWoTPC = new TH1F ("h1HybridTOFsigPosWoTPC","tof signal pos (p=.75-1.0GeV) w/o dedx sel.;t_{meas} - t_{0} - t_{expected} [ps]",120,-10000.0,5000.0); | |
811 | fOutputPrimaries->Add(fPriHistHybridTOFsigPosWoTPC); | |
812 | fPriHistHybridTOFsigPosTPCok = new TH1F ("h1HybridTOFsigPosTPCok","tof signal pos (p=.75-1.0GeV) with dedx sel.;t_{meas} - t_{0} - t_{expected} [ps]",120,-10000.0,5000.0); | |
813 | fOutputPrimaries->Add(fPriHistHybridTOFsigPosTPCok); | |
814 | fPriHistHybridTOFsigNegWoTPC = new TH1F ("h1HybridTOFsigNegWoTPC","tof signal neg (p=.75-1.0GeV) w/o dedx sel.;t_{meas} - t_{0} - t_{expected} [ps]",120,-10000.0,5000.0); | |
815 | fOutputPrimaries->Add(fPriHistHybridTOFsigNegWoTPC); | |
816 | fPriHistHybridTOFsigNegTPCok = new TH1F ("h1HybridTOFsigNegTPCok","tof signal neg (p=.75-1.0GeV) with dedx sel.;t_{meas} - t_{0} - t_{expected} [ps]",120,-10000.0,5000.0); | |
817 | fOutputPrimaries->Add(fPriHistHybridTOFsigNegTPCok); | |
818 | // dEdx analysis | |
819 | // fPriHistHasTofPos = new TH1F ("h1HasTofPos","Positives: 0 = no TOF, 1 = TOFpid bit there",2,-.5,1.5); | |
820 | // fOutputPrimaries->Add(fPriHistHasTofPos); | |
821 | fPriHistTPCsignalPos = new TH2F ("h2TPCsignalPos","TPC signal for positives;p_{tot};dEdx",40,0,4,100,0,400); | |
822 | fOutputPrimaries->Add(fPriHistTPCsignalPos); | |
823 | // fPriHistNsigmaTPCPos = new TH2F ("h2NsigmaTPCPos","Nsigma TPC for positives;p_{tot};N_{#sigma}",40,0,4,100,-5.0,5.0); | |
824 | // fOutputPrimaries->Add(fPriHistNsigmaTPCPos); | |
825 | // fPriHistTPCsignalTOFcutPos = new TH2F ("h2TPCsignalTOFcutPos","TPC signal for positives using a +/- 10sigma TOF cut;p_{tot};dEdx",40,0.0,4.0,100,0.0,400.0); | |
826 | // fOutputPrimaries->Add(fPriHistTPCsignalTOFcutPos); | |
827 | // fPriHistNsigmaTPCTOFcutPos = new TH2F ("h2NsigmaTPCTOFcutPos","Nsigma TPC for positives using a +/- 10sigma TOF cut;p_{tot};N_{#sigma}",40,0.0,4.0,100,-5.0,5.0); | |
828 | // fOutputPrimaries->Add(fPriHistNsigmaTPCTOFcutPos); | |
829 | ||
830 | // fPriHistHasTofNeg = new TH1F ("h1HasTofNeg","Negatives: 0 = no TOF, 1 = TOFpid bit there",2,-.5,1.5); | |
831 | // fOutputPrimaries->Add(fPriHistHasTofNeg); | |
832 | fPriHistTPCsignalNeg = new TH2F ("h2TPCsignalNeg","TPC signal for negatives;p_{tot};dEdx",40,0.0,4.0,100,0.0,400.0); | |
833 | fOutputPrimaries->Add(fPriHistTPCsignalNeg); | |
834 | // fPriHistNsigmaTPCNeg = new TH2F ("h2NsigmaTPCNeg","Nsigma TPC for negatives;p_{tot};N_{#sigma}",40,0.0,4.0,100,-5.0,5.0); | |
835 | // fOutputPrimaries->Add(fPriHistNsigmaTPCNeg); | |
836 | // fPriHistTPCsignalTOFcutNeg = new TH2F ("h2TPCsignalTOFcutNeg","TPC signal for negatives using a +/- 10sigma TOF cut;p_{tot};dEdx",40,0.0,4.0,100,0.0,400.0); | |
837 | // fOutputPrimaries->Add(fPriHistTPCsignalTOFcutNeg); | |
838 | // fPriHistNsigmaTPCTOFcutNeg = new TH2F ("h2NsigmaTPCTOFcutNeg","Nsigma TPC for negatives using a +/- 10sigma TOF cut;p_{tot};N_{#sigma}",40,0.0,4.0,100,-5.0,5.0); | |
839 | // fOutputPrimaries->Add(fPriHistNsigmaTPCTOFcutNeg); | |
840 | ||
841 | fPriHistTPCsignalLowPPos = new TH2F ("h2TPCsignalLowPPos","dEdx for low momenta, positives",20,0.1,0.3,3000,0,3000); | |
842 | fOutputPrimaries->Add(fPriHistTPCsignalLowPPos); | |
843 | fPriHistTPCsignalMedPPos = new TH2F ("h2TPCsignalMedPPos","dEdx for medium momenta, positives",60,0.3,0.9,500,0,500); | |
844 | fOutputPrimaries->Add(fPriHistTPCsignalMedPPos); | |
845 | fPriHistTPCsignalHigPPos = new TH2F ("h2TPCsignalHigPPos","dEdx for high momenta, positives",100,0.9,1.9,120,0,120); | |
846 | fOutputPrimaries->Add(fPriHistTPCsignalHigPPos); | |
847 | fPriHistTPCsignalLowPNeg = new TH2F ("h2TPCsignalLowPNeg","dEdx for low momenta, negatives",20,0.1,0.3,3000,0,3000); | |
848 | fOutputPrimaries->Add(fPriHistTPCsignalLowPNeg); | |
849 | fPriHistTPCsignalMedPNeg = new TH2F ("h2TPCsignalMedPNeg","dEdx for medium momenta, negatives",60,0.3,0.9,500,0,500); | |
850 | fOutputPrimaries->Add(fPriHistTPCsignalMedPNeg); | |
851 | fPriHistTPCsignalHigPNeg = new TH2F ("h2TPCsignalHigPNeg","dEdx for high momenta, negatives",100,0.9,1.9,120,0,120); | |
852 | fOutputPrimaries->Add(fPriHistTPCsignalHigPNeg); | |
853 | ||
854 | // Common for all protons | |
855 | ||
856 | // DCA xy distribution to determine primaries, secondaries from weak decay and secondaries from material | |
857 | fPriHistDCAxyYPtPro = new TH3F ("h3DCAxyYPtPro","DCAxy vs (y,pt) protons",100,-3.,3.,30,-1.5,1.5,14,0.,3.5); | |
858 | fOutputPrimaries->Add(fPriHistDCAxyYPtPro); | |
859 | fPriHistDCAxyYPtAPro = new TH3F ("h3DCAxyYPtAPro","DCAxy vs (y,pt) anti-protons",100,-3.,3.,30,-1.5,1.5,14,0.,3.5); | |
860 | fOutputPrimaries->Add(fPriHistDCAxyYPtAPro); | |
861 | ||
862 | // 2 particle histograms fOutput2Part | |
863 | // Common binning for TTR | |
864 | Int_t nDistBins=200; | |
865 | Float_t distLow=0.,distHig=20.; | |
866 | // Two-track resolution: real events | |
867 | // f2HistLamLamMeanMinDistProReal = new TH2F ("h2LamLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
868 | // fOutput2Part->Add(f2HistLamLamMeanMinDistProReal); | |
869 | // f2HistLamLamMeanMinDistPioReal = new TH2F ("h2LamLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
870 | // fOutput2Part->Add(f2HistLamLamMeanMinDistPioReal); | |
871 | // f2HistLamProMeanMinDistProReal = new TH2F ("h2LamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
872 | // fOutput2Part->Add(f2HistLamProMeanMinDistProReal); | |
873 | // f2HistALamALamMeanMinDistAProReal = new TH2F ("h2ALamALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
874 | // fOutput2Part->Add(f2HistALamALamMeanMinDistAProReal); | |
875 | // f2HistALamALamMeanMinDistPioReal = new TH2F ("h2ALamALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
876 | // fOutput2Part->Add(f2HistALamALamMeanMinDistPioReal); | |
877 | // f2HistALamAProMeanMinDistAProReal = new TH2F ("h2ALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
878 | // fOutput2Part->Add(f2HistALamAProMeanMinDistAProReal); | |
879 | ||
880 | // f2HistSftLamLamMeanMinDistProReal = new TH2F ("h2SftLamLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
881 | // fOutput2Part->Add(f2HistSftLamLamMeanMinDistProReal); | |
882 | // f2HistSftLamLamMeanMinDistPioReal = new TH2F ("h2SftLamLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
883 | // fOutput2Part->Add(f2HistSftLamLamMeanMinDistPioReal); | |
884 | // f2HistSftLamProMeanMinDistProReal = new TH2F ("h2SftLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
885 | // fOutput2Part->Add(f2HistSftLamProMeanMinDistProReal); | |
886 | // f2HistSftALamALamMeanMinDistAProReal = new TH2F ("h2SftALamALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
887 | // fOutput2Part->Add(f2HistSftALamALamMeanMinDistAProReal); | |
888 | // f2HistSftALamALamMeanMinDistPioReal = new TH2F ("h2SftALamALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
889 | // fOutput2Part->Add(f2HistSftALamALamMeanMinDistPioReal); | |
890 | // f2HistSftALamAProMeanMinDistAProReal = new TH2F ("h2SftALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
891 | // fOutput2Part->Add(f2HistSftALamAProMeanMinDistAProReal); | |
892 | ||
893 | // f2HistSftIrocLamLamMeanMinDistProReal = new TH2F ("h2SftIrocLamLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
894 | // fOutput2Part->Add(f2HistSftIrocLamLamMeanMinDistProReal); | |
895 | // f2HistSftIrocLamLamMeanMinDistPioReal = new TH2F ("h2SftIrocLamLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
896 | // fOutput2Part->Add(f2HistSftIrocLamLamMeanMinDistPioReal); | |
897 | // f2HistSftIrocLamProMeanMinDistProReal = new TH2F ("h2SftIrocLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
898 | // fOutput2Part->Add(f2HistSftIrocLamProMeanMinDistProReal); | |
899 | // f2HistSftIrocALamALamMeanMinDistAProReal = new TH2F ("h2SftIrocALamALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
900 | // fOutput2Part->Add(f2HistSftIrocALamALamMeanMinDistAProReal); | |
901 | // f2HistSftIrocALamALamMeanMinDistPioReal = new TH2F ("h2SftIrocALamALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
902 | // fOutput2Part->Add(f2HistSftIrocALamALamMeanMinDistPioReal); | |
903 | // f2HistSftIrocALamAProMeanMinDistAProReal = new TH2F ("h2SftIrocALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
904 | // fOutput2Part->Add(f2HistSftIrocALamAProMeanMinDistAProReal); | |
905 | ||
906 | // f2HistSftOrocLamLamMeanMinDistProReal = new TH2F ("h2SftOrocLamLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
907 | // fOutput2Part->Add(f2HistSftOrocLamLamMeanMinDistProReal); | |
908 | // f2HistSftOrocLamLamMeanMinDistPioReal = new TH2F ("h2SftOrocLamLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
909 | // fOutput2Part->Add(f2HistSftOrocLamLamMeanMinDistPioReal); | |
910 | // f2HistSftOrocLamProMeanMinDistProReal = new TH2F ("h2SftOrocLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
911 | // fOutput2Part->Add(f2HistSftOrocLamProMeanMinDistProReal); | |
912 | // f2HistSftOrocALamALamMeanMinDistAProReal = new TH2F ("h2SftOrocALamALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
913 | // fOutput2Part->Add(f2HistSftOrocALamALamMeanMinDistAProReal); | |
914 | // f2HistSftOrocALamALamMeanMinDistPioReal = new TH2F ("h2SftOrocALamALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
915 | // fOutput2Part->Add(f2HistSftOrocALamALamMeanMinDistPioReal); | |
916 | // f2HistSftOrocALamAProMeanMinDistAProReal = new TH2F ("h2SftOrocALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
917 | // fOutput2Part->Add(f2HistSftOrocALamAProMeanMinDistAProReal); | |
918 | ||
919 | // Mt of the pairs | |
920 | Int_t nMtBins=25; | |
921 | Float_t mtLow=1.0,mtHig=3.5; | |
922 | // f2HistMtLamLamReal = new TH1F("h1MtLamLamReal" | |
923 | // ,"m_{t}(#Lambda #Lambda);m{t} [GeV];counts" | |
924 | // ,nMtBins,mtLow,mtHig); | |
925 | // fOutput2Part->Add(f2HistMtLamLamReal); | |
926 | f2HistMtLamProReal = new TH1F("h1MtLamProReal" | |
927 | ,"m_{t}(p #Lambda);m{t} [GeV];counts" | |
928 | ,nMtBins,mtLow,mtHig); | |
929 | fOutput2Part->Add(f2HistMtLamProReal); | |
930 | // f2HistMtALamALamReal = new TH1F("h1MtALamALamReal" | |
931 | // ,"m_{t}(#bar{#Lambda} #bar{#Lambda});m{t} [GeV];counts" | |
932 | // ,nMtBins,mtLow,mtHig); | |
933 | // fOutput2Part->Add(f2HistMtALamALamReal); | |
934 | f2HistMtALamAProReal = new TH1F("h1MtALamAProReal" | |
935 | ,"m_{t}(#bar{#Lambda} #bar{#Lambda});m{t} [GeV];counts" | |
936 | ,nMtBins,mtLow,mtHig); | |
937 | fOutput2Part->Add(f2HistMtALamAProReal); | |
938 | // The same only filling for low q pairs | |
939 | // f2HistMtLowQLamLamReal = new TH1F("h1MtLowQLamLamReal" | |
940 | // ,"m_{t}(#Lambda #Lambda);m{t} [GeV];counts" | |
941 | // ,nMtBins,mtLow,mtHig); | |
942 | // fOutput2Part->Add(f2HistMtLowQLamLamReal); | |
943 | f2HistMtLowQLamProReal = new TH1F("h1MtLowQLamProReal" | |
944 | ,"m_{t}(p #Lambda);m{t} [GeV];counts" | |
945 | ,nMtBins,mtLow,mtHig); | |
946 | fOutput2Part->Add(f2HistMtLowQLamProReal); | |
947 | // f2HistMtLowQALamALamReal = new TH1F("h1MtLowQALamALamReal" | |
948 | // ,"m_{t}(#bar{#Lambda} #bar{#Lambda});m{t} [GeV];counts" | |
949 | // ,nMtBins,mtLow,mtHig); | |
950 | // fOutput2Part->Add(f2HistMtLowQALamALamReal); | |
951 | f2HistMtLowQALamAProReal = new TH1F("h1MtLowQALamAProReal" | |
952 | ,"m_{t}(#bar{#Lambda} #bar{#Lambda});m{t} [GeV];counts" | |
953 | ,nMtBins,mtLow,mtHig); | |
954 | fOutput2Part->Add(f2HistMtLowQALamAProReal); | |
955 | ||
956 | // Common qinv binning | |
957 | Int_t nQinvBins = 400; // also for minv | |
958 | Float_t QinvLow = 0.0; | |
959 | Float_t QinvHig = 2.5; | |
960 | ||
961 | // Sept'12 Use a THnSparse for (Bg)(A)Lam(A)Pro with 4 dimensions: | |
962 | // qinv (ppri,ppri), mean dist (ppri,ppri), min dist(ppri,ppri) | |
963 | // qinv (lam pro) | |
964 | Int_t HnSpBins[4]={nQinvBins,nDistBins,nDistBins,nQinvBins}; | |
965 | Double_t HnSpMin[4]={QinvLow,distLow,distLow,QinvLow}; | |
966 | Double_t HnSpMax[4]={QinvHig,distHig,distHig,QinvHig}; | |
967 | LamProReal = new THnSparseF("HnSp4LamProReal","lamProRealQppMeanMinQlamp" | |
968 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
969 | fOutput2Part->Add(LamProReal); | |
970 | ALamAProReal = new THnSparseF("HnSp4ALamAProReal","alamAProRealQppMeanMinQlamp" | |
971 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
972 | fOutput2Part->Add(ALamAProReal); | |
973 | ||
974 | // Qinv: real events | |
975 | // Since March 4th 2012 do corr. fcts vs distances | |
976 | // f3HistLamLamQinvReal = new TH3F ("h3LamLamQinvReal", "Qinv LamLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
977 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
978 | // fOutput2Part->Add(f3HistLamLamQinvReal); | |
979 | // f3HistALamALamQinvReal = new TH3F ("h3ALamALamQinvReal", "Qinv ALamALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min (d) #pi [cm]" | |
980 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
981 | // fOutput2Part->Add(f3HistALamALamQinvReal); | |
982 | // // minv (H2 dibaryon??) | |
983 | // f3HistLamLamMinvReal = new TH3F ("h3LamLamMinvReal", "Minv LamLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
984 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
985 | // fOutput2Part->Add(f3HistLamLamMinvReal); | |
986 | // f3HistLamProMinvReal = new TH3F ("h3LamProMinvReal", "Minv LamPro;q_{inv} [GeV/c];<d> p [cm];min(d) p [cm]" | |
987 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
988 | // fOutput2Part->Add(f3HistLamProMinvReal); | |
989 | // f3HistALamALamMinvReal = new TH3F ("h3ALamALamMinvReal", "Minv ALamALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min(d) #pi [cm]" | |
990 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
991 | // fOutput2Part->Add(f3HistALamALamMinvReal); | |
992 | // f3HistALamAProMinvReal = new TH3F ("h3ALamAProMinvReal", "Minv ALamAPro;q_{inv} [GeV/c];<d> #bar{p} [cm];min(d) #bar{p} [cm]" | |
993 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
994 | // fOutput2Part->Add(f3HistALamAProMinvReal); | |
995 | ||
996 | ||
997 | // // Two-track resolution: mixed events | |
998 | // f2HistLamLamMeanMinDistProMixed = new TH2F ("h2LamLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
999 | // fOutput2Part->Add(f2HistLamLamMeanMinDistProMixed); | |
1000 | // f2HistLamLamMeanMinDistPioMixed = new TH2F ("h2LamLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1001 | // fOutput2Part->Add(f2HistLamLamMeanMinDistPioMixed); | |
1002 | // f2HistLamProMeanMinDistProMixed = new TH2F ("h2LamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1003 | // fOutput2Part->Add(f2HistLamProMeanMinDistProMixed); | |
1004 | // f2HistALamALamMeanMinDistAProMixed = new TH2F ("h2ALamALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1005 | // fOutput2Part->Add(f2HistALamALamMeanMinDistAProMixed); | |
1006 | // f2HistALamALamMeanMinDistPioMixed = new TH2F ("h2ALamALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1007 | // fOutput2Part->Add(f2HistALamALamMeanMinDistPioMixed); | |
1008 | // f2HistALamAProMeanMinDistAProMixed = new TH2F ("h2ALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1009 | // fOutput2Part->Add(f2HistALamAProMeanMinDistAProMixed); | |
1010 | ||
1011 | // f2HistSftLamLamMeanMinDistProMixed = new TH2F ("h2SftLamLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1012 | // fOutput2Part->Add(f2HistSftLamLamMeanMinDistProMixed); | |
1013 | // f2HistSftLamLamMeanMinDistPioMixed = new TH2F ("h2SftLamLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1014 | // fOutput2Part->Add(f2HistSftLamLamMeanMinDistPioMixed); | |
1015 | // f2HistSftLamProMeanMinDistProMixed = new TH2F ("h2SftLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1016 | // fOutput2Part->Add(f2HistSftLamProMeanMinDistProMixed); | |
1017 | // f2HistSftALamALamMeanMinDistAProMixed = new TH2F ("h2SftALamALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1018 | // fOutput2Part->Add(f2HistSftALamALamMeanMinDistAProMixed); | |
1019 | // f2HistSftALamALamMeanMinDistPioMixed = new TH2F ("h2SftALamALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1020 | // fOutput2Part->Add(f2HistSftALamALamMeanMinDistPioMixed); | |
1021 | // f2HistSftALamAProMeanMinDistAProMixed = new TH2F ("h2SftALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1022 | // fOutput2Part->Add(f2HistSftALamAProMeanMinDistAProMixed); | |
1023 | ||
1024 | // f2HistSftIrocLamLamMeanMinDistProMixed = new TH2F ("h2SftIrocLamLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1025 | // fOutput2Part->Add(f2HistSftIrocLamLamMeanMinDistProMixed); | |
1026 | // f2HistSftIrocLamLamMeanMinDistPioMixed = new TH2F ("h2SftIrocLamLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1027 | // fOutput2Part->Add(f2HistSftIrocLamLamMeanMinDistPioMixed); | |
1028 | // f2HistSftIrocLamProMeanMinDistProMixed = new TH2F ("h2SftIrocLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1029 | // fOutput2Part->Add(f2HistSftIrocLamProMeanMinDistProMixed); | |
1030 | // f2HistSftIrocALamALamMeanMinDistAProMixed = new TH2F ("h2SftIrocALamALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1031 | // fOutput2Part->Add(f2HistSftIrocALamALamMeanMinDistAProMixed); | |
1032 | // f2HistSftIrocALamALamMeanMinDistPioMixed = new TH2F ("h2SftIrocALamALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1033 | // fOutput2Part->Add(f2HistSftIrocALamALamMeanMinDistPioMixed); | |
1034 | // f2HistSftIrocALamAProMeanMinDistAProMixed = new TH2F ("h2SftIrocALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1035 | // fOutput2Part->Add(f2HistSftIrocALamAProMeanMinDistAProMixed); | |
1036 | ||
1037 | // f2HistSftOrocLamLamMeanMinDistProMixed = new TH2F ("h2SftOrocLamLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1038 | // fOutput2Part->Add(f2HistSftOrocLamLamMeanMinDistProMixed); | |
1039 | // f2HistSftOrocLamLamMeanMinDistPioMixed = new TH2F ("h2SftOrocLamLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1040 | // fOutput2Part->Add(f2HistSftOrocLamLamMeanMinDistPioMixed); | |
1041 | // f2HistSftOrocLamProMeanMinDistProMixed = new TH2F ("h2SftOrocLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1042 | // fOutput2Part->Add(f2HistSftOrocLamProMeanMinDistProMixed); | |
1043 | // f2HistSftOrocALamALamMeanMinDistAProMixed = new TH2F ("h2SftOrocALamALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1044 | // fOutput2Part->Add(f2HistSftOrocALamALamMeanMinDistAProMixed); | |
1045 | // f2HistSftOrocALamALamMeanMinDistPioMixed = new TH2F ("h2SftOrocALamALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1046 | // fOutput2Part->Add(f2HistSftOrocALamALamMeanMinDistPioMixed); | |
1047 | // f2HistSftOrocALamAProMeanMinDistAProMixed = new TH2F ("h2SftOrocALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1048 | // fOutput2Part->Add(f2HistSftOrocALamAProMeanMinDistAProMixed); | |
1049 | ||
1050 | // Sept'12 Use a THnSparse for (Bg)(A)Lam(A)Pro with 4 dimensions: | |
1051 | // qinv (ppri,ppri), mean dist (ppri,ppri), min dist(ppri,ppri) | |
1052 | // qinv (lam pro) | |
1053 | LamProMixed = new THnSparseF("HnSp4LamProMixed","lamProMixedQppMeanMinQlamp" | |
1054 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1055 | fOutput2Part->Add(LamProMixed); | |
1056 | ALamAProMixed = new THnSparseF("HnSp4ALamAProMixed","alamAProMixedQppMeanMinQlamp" | |
1057 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1058 | fOutput2Part->Add(ALamAProMixed); | |
1059 | ||
1060 | // // Qinv: mixed events | |
1061 | // f3HistLamLamQinvMixed = new TH3F ("h3LamLamQinvMixed", "Qinv LamLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
1062 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1063 | // fOutput2Part->Add(f3HistLamLamQinvMixed); | |
1064 | // f3HistALamALamQinvMixed = new TH3F ("h3ALamALamQinvMixed", "Qinv ALamALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min(d) #pi [cm]" | |
1065 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1066 | // fOutput2Part->Add(f3HistALamALamQinvMixed); | |
1067 | // // minv (H2 di-baryon??) | |
1068 | // f3HistLamLamMinvMixed = new TH3F ("h3LamLamMinvMixed", "Minv LamLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
1069 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
1070 | // fOutput2Part->Add(f3HistLamLamMinvMixed); | |
1071 | // f3HistLamProMinvMixed = new TH3F ("h3LamProMinvMixed", "Minv LamPro;q_{inv} [GeV/c];<d> p [cm];min(d) p [cm]" | |
1072 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
1073 | // fOutput2Part->Add(f3HistLamProMinvMixed); | |
1074 | // f3HistALamALamMinvMixed = new TH3F ("h3ALamALamMinvMixed", "Minv ALamALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min(d) #pi [cm]" | |
1075 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
1076 | // fOutput2Part->Add(f3HistALamALamMinvMixed); | |
1077 | // f3HistALamAProMinvMixed = new TH3F ("h3ALamAProMinvMixed", "Minv ALamAPro;q_{inv} [GeV/c];<d> #bar{p} [cm];min(d) #bar{p} [cm]" | |
1078 | // ,nQinvBins,2.0,3.0,100,0.,10.,100,0.,10.); | |
1079 | // fOutput2Part->Add(f3HistALamAProMinvMixed); | |
1080 | ||
1081 | // Same for Background (anti-)lambdas | |
1082 | ||
1083 | // // Two-track resolution: real events | |
1084 | // f2HistBgLamBgLamMeanMinDistProReal = new TH2F ("h2BgLamBgLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1085 | // fOutput2Part->Add(f2HistBgLamBgLamMeanMinDistProReal); | |
1086 | // f2HistBgLamBgLamMeanMinDistPioReal = new TH2F ("h2BgLamBgLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1087 | // fOutput2Part->Add(f2HistBgLamBgLamMeanMinDistPioReal); | |
1088 | // f2HistBgLamProMeanMinDistProReal = new TH2F ("h2BgLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1089 | // fOutput2Part->Add(f2HistBgLamProMeanMinDistProReal); | |
1090 | // f2HistBgALamBgALamMeanMinDistAProReal = new TH2F ("h2BgALamBgALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1091 | // fOutput2Part->Add(f2HistBgALamBgALamMeanMinDistAProReal); | |
1092 | // f2HistBgALamBgALamMeanMinDistPioReal = new TH2F ("h2BgALamBgALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1093 | // fOutput2Part->Add(f2HistBgALamBgALamMeanMinDistPioReal); | |
1094 | // f2HistBgALamAProMeanMinDistAProReal = new TH2F ("h2BgALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1095 | // fOutput2Part->Add(f2HistBgALamAProMeanMinDistAProReal); | |
1096 | ||
1097 | // f2HistSftBgLamBgLamMeanMinDistProReal = new TH2F ("h2SftBgLamBgLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1098 | // fOutput2Part->Add(f2HistSftBgLamBgLamMeanMinDistProReal); | |
1099 | // f2HistSftBgLamBgLamMeanMinDistPioReal = new TH2F ("h2SftBgLamBgLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1100 | // fOutput2Part->Add(f2HistSftBgLamBgLamMeanMinDistPioReal); | |
1101 | // f2HistSftBgLamProMeanMinDistProReal = new TH2F ("h2SftBgLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1102 | // fOutput2Part->Add(f2HistSftBgLamProMeanMinDistProReal); | |
1103 | // f2HistSftBgALamBgALamMeanMinDistAProReal = new TH2F ("h2SftBgALamBgALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1104 | // fOutput2Part->Add(f2HistSftBgALamBgALamMeanMinDistAProReal); | |
1105 | // f2HistSftBgALamBgALamMeanMinDistPioReal = new TH2F ("h2SftBgALamBgALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1106 | // fOutput2Part->Add(f2HistSftBgALamBgALamMeanMinDistPioReal); | |
1107 | // f2HistSftBgALamAProMeanMinDistAProReal = new TH2F ("h2SftBgALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1108 | // fOutput2Part->Add(f2HistSftBgALamAProMeanMinDistAProReal); | |
1109 | ||
1110 | // f2HistSftIrocBgLamBgLamMeanMinDistProReal = new TH2F ("h2SftIrocBgLamBgLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1111 | // fOutput2Part->Add(f2HistSftIrocBgLamBgLamMeanMinDistProReal); | |
1112 | // f2HistSftIrocBgLamBgLamMeanMinDistPioReal = new TH2F ("h2SftIrocBgLamBgLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1113 | // fOutput2Part->Add(f2HistSftIrocBgLamBgLamMeanMinDistPioReal); | |
1114 | // f2HistSftIrocBgLamProMeanMinDistProReal = new TH2F ("h2SftIrocBgLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1115 | // fOutput2Part->Add(f2HistSftIrocBgLamProMeanMinDistProReal); | |
1116 | // f2HistSftIrocBgALamBgALamMeanMinDistAProReal = new TH2F ("h2SftIrocBgALamBgALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1117 | // fOutput2Part->Add(f2HistSftIrocBgALamBgALamMeanMinDistAProReal); | |
1118 | // f2HistSftIrocBgALamBgALamMeanMinDistPioReal = new TH2F ("h2SftIrocBgALamBgALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1119 | // fOutput2Part->Add(f2HistSftIrocBgALamBgALamMeanMinDistPioReal); | |
1120 | // f2HistSftIrocBgALamAProMeanMinDistAProReal = new TH2F ("h2SftIrocBgALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1121 | // fOutput2Part->Add(f2HistSftIrocBgALamAProMeanMinDistAProReal); | |
1122 | ||
1123 | // f2HistSftOrocBgLamBgLamMeanMinDistProReal = new TH2F ("h2SftOrocBgLamBgLamMeanMinDistProReal","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1124 | // fOutput2Part->Add(f2HistSftOrocBgLamBgLamMeanMinDistProReal); | |
1125 | // f2HistSftOrocBgLamBgLamMeanMinDistPioReal = new TH2F ("h2SftOrocBgLamBgLamMeanMinDistPioReal","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1126 | // fOutput2Part->Add(f2HistSftOrocBgLamBgLamMeanMinDistPioReal); | |
1127 | // f2HistSftOrocBgLamProMeanMinDistProReal = new TH2F ("h2SftOrocBgLamProMeanMinDistProReal","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1128 | // fOutput2Part->Add(f2HistSftOrocBgLamProMeanMinDistProReal); | |
1129 | // f2HistSftOrocBgALamBgALamMeanMinDistAProReal = new TH2F ("h2SftOrocBgALamBgALamMeanMinDistAProReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1130 | // fOutput2Part->Add(f2HistSftOrocBgALamBgALamMeanMinDistAProReal); | |
1131 | // f2HistSftOrocBgALamBgALamMeanMinDistPioReal = new TH2F ("h2SftOrocBgALamBgALamMeanMinDistPioReal","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1132 | // fOutput2Part->Add(f2HistSftOrocBgALamBgALamMeanMinDistPioReal); | |
1133 | // f2HistSftOrocBgALamAProMeanMinDistAProReal = new TH2F ("h2SftOrocBgALamAProMeanMinDistProReal","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1134 | // fOutput2Part->Add(f2HistSftOrocBgALamAProMeanMinDistAProReal); | |
1135 | ||
1136 | // Sept'12 Use a THnSparse for (Bg)(A)Lam(A)Pro with 4 dimensions: | |
1137 | // qinv (ppri,ppri), mean dist (ppri,ppri), min dist(ppri,ppri) | |
1138 | // qinv (lam pro) | |
1139 | BgLamProReal = new THnSparseF("HnSp4BgLamProReal","lamProRealQppMeanMinQlamp" | |
1140 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1141 | fOutput2Part->Add(BgLamProReal); | |
1142 | BgALamAProReal = new THnSparseF("HnSp4BgALamAProReal","alamAProRealQppMeanMinQlamp" | |
1143 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1144 | fOutput2Part->Add(BgALamAProReal); | |
1145 | ||
1146 | // Qinv: real events | |
1147 | // f3HistBgLamBgLamQinvReal = new TH3F ("h3BgLamBgLamQinvReal", "Qinv BgLamBgLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
1148 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1149 | // fOutput2Part->Add(f3HistBgLamBgLamQinvReal); | |
1150 | // f3HistBgALamBgALamQinvReal = new TH3F ("h3BgALamBgALamQinvReal", "Qinv BgALamBgALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min(d) #pi [cm]" | |
1151 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1152 | // fOutput2Part->Add(f3HistBgALamBgALamQinvReal); | |
1153 | ||
1154 | // // Two-track resolution: mixed events | |
1155 | // f2HistBgLamBgLamMeanMinDistProMixed = new TH2F ("h2BgLamBgLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1156 | // fOutput2Part->Add(f2HistBgLamBgLamMeanMinDistProMixed); | |
1157 | // f2HistBgLamBgLamMeanMinDistPioMixed = new TH2F ("h2BgLamBgLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1158 | // fOutput2Part->Add(f2HistBgLamBgLamMeanMinDistPioMixed); | |
1159 | // f2HistBgLamProMeanMinDistProMixed = new TH2F ("h2BgLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1160 | // fOutput2Part->Add(f2HistBgLamProMeanMinDistProMixed); | |
1161 | // f2HistBgALamBgALamMeanMinDistAProMixed = new TH2F ("h2BgALamBgALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1162 | // fOutput2Part->Add(f2HistBgALamBgALamMeanMinDistAProMixed); | |
1163 | // f2HistBgALamBgALamMeanMinDistPioMixed = new TH2F ("h2BgALamBgALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1164 | // fOutput2Part->Add(f2HistBgALamBgALamMeanMinDistPioMixed); | |
1165 | // f2HistBgALamAProMeanMinDistAProMixed = new TH2F ("h2BgALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1166 | // fOutput2Part->Add(f2HistBgALamAProMeanMinDistAProMixed); | |
1167 | ||
1168 | // f2HistSftBgLamBgLamMeanMinDistProMixed = new TH2F ("h2SftBgLamBgLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1169 | // fOutput2Part->Add(f2HistSftBgLamBgLamMeanMinDistProMixed); | |
1170 | // f2HistSftBgLamBgLamMeanMinDistPioMixed = new TH2F ("h2SftBgLamBgLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1171 | // fOutput2Part->Add(f2HistSftBgLamBgLamMeanMinDistPioMixed); | |
1172 | // f2HistSftBgLamProMeanMinDistProMixed = new TH2F ("h2SftBgLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1173 | // fOutput2Part->Add(f2HistSftBgLamProMeanMinDistProMixed); | |
1174 | // f2HistSftBgALamBgALamMeanMinDistAProMixed = new TH2F ("h2SftBgALamBgALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1175 | // fOutput2Part->Add(f2HistSftBgALamBgALamMeanMinDistAProMixed); | |
1176 | // f2HistSftBgALamBgALamMeanMinDistPioMixed = new TH2F ("h2SftBgALamBgALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1177 | // fOutput2Part->Add(f2HistSftBgALamBgALamMeanMinDistPioMixed); | |
1178 | // f2HistSftBgALamAProMeanMinDistAProMixed = new TH2F ("h2SftBgALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1179 | // fOutput2Part->Add(f2HistSftBgALamAProMeanMinDistAProMixed); | |
1180 | ||
1181 | // f2HistSftIrocBgLamBgLamMeanMinDistProMixed = new TH2F ("h2SftIrocBgLamBgLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1182 | // fOutput2Part->Add(f2HistSftIrocBgLamBgLamMeanMinDistProMixed); | |
1183 | // f2HistSftIrocBgLamBgLamMeanMinDistPioMixed = new TH2F ("h2SftIrocBgLamBgLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1184 | // fOutput2Part->Add(f2HistSftIrocBgLamBgLamMeanMinDistPioMixed); | |
1185 | // f2HistSftIrocBgLamProMeanMinDistProMixed = new TH2F ("h2SftIrocBgLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1186 | // fOutput2Part->Add(f2HistSftIrocBgLamProMeanMinDistProMixed); | |
1187 | // f2HistSftIrocBgALamBgALamMeanMinDistAProMixed = new TH2F ("h2SftIrocBgALamBgALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1188 | // fOutput2Part->Add(f2HistSftIrocBgALamBgALamMeanMinDistAProMixed); | |
1189 | // f2HistSftIrocBgALamBgALamMeanMinDistPioMixed = new TH2F ("h2SftIrocBgALamBgALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1190 | // fOutput2Part->Add(f2HistSftIrocBgALamBgALamMeanMinDistPioMixed); | |
1191 | // f2HistSftIrocBgALamAProMeanMinDistAProMixed = new TH2F ("h2SftIrocBgALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1192 | // fOutput2Part->Add(f2HistSftIrocBgALamAProMeanMinDistAProMixed); | |
1193 | ||
1194 | // f2HistSftOrocBgLamBgLamMeanMinDistProMixed = new TH2F ("h2SftOrocBgLamBgLamMeanMinDistProMixed","#Lambda#Lambda Mean vs min dist of decay protons;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1195 | // fOutput2Part->Add(f2HistSftOrocBgLamBgLamMeanMinDistProMixed); | |
1196 | // f2HistSftOrocBgLamBgLamMeanMinDistPioMixed = new TH2F ("h2SftOrocBgLamBgLamMeanMinDistPioMixed","#Lambda#Lambda Mean vs min dist of decay pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1197 | // fOutput2Part->Add(f2HistSftOrocBgLamBgLamMeanMinDistPioMixed); | |
1198 | // f2HistSftOrocBgLamProMeanMinDistProMixed = new TH2F ("h2SftOrocBgLamProMeanMinDistProMixed","p#Lambda Mean vs min dist of pri. p - dec p;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1199 | // fOutput2Part->Add(f2HistSftOrocBgLamProMeanMinDistProMixed); | |
1200 | // f2HistSftOrocBgALamBgALamMeanMinDistAProMixed = new TH2F ("h2SftOrocBgALamBgALamMeanMinDistAProMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist decay #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1201 | // fOutput2Part->Add(f2HistSftOrocBgALamBgALamMeanMinDistAProMixed); | |
1202 | // f2HistSftOrocBgALamBgALamMeanMinDistPioMixed = new TH2F ("h2SftOrocBgALamBgALamMeanMinDistPioMixed","#bar{#Lambda}#bar{#Lambda} Mean vs min dist of dec. pions;mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1203 | // fOutput2Part->Add(f2HistSftOrocBgALamBgALamMeanMinDistPioMixed); | |
1204 | // f2HistSftOrocBgALamAProMeanMinDistAProMixed = new TH2F ("h2SftOrocBgALamAProMeanMinDistProMixed","#bar{p}#bar{#Lambda} Mean vs min dist of pri. #bar{p} - dec #bar{p};mean dist. [cm];min dist [cm]",nDistBins,distLow,distHig,nDistBins,distLow,distHig); | |
1205 | // fOutput2Part->Add(f2HistSftOrocBgALamAProMeanMinDistAProMixed); | |
1206 | ||
1207 | ||
1208 | // Sept'12 Use a THnSparse for (Bg)(A)Lam(A)Pro with 4 dimensions: | |
1209 | // qinv (ppri,ppri), mean dist (ppri,ppri), min dist(ppri,ppri) | |
1210 | // qinv (lam pro) | |
1211 | BgLamProMixed = new THnSparseF("HnSp4BgLamProMixed","lamProMixedQppMeanMinQlamp" | |
1212 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1213 | fOutput2Part->Add(BgLamProMixed); | |
1214 | BgALamAProMixed = new THnSparseF("HnSp4BgALamAProMixed","alamAProMixedQppMeanMinQlamp" | |
1215 | ,4,HnSpBins,HnSpMin,HnSpMax); | |
1216 | fOutput2Part->Add(BgALamAProMixed); | |
1217 | ||
1218 | // Qinv: mixed events | |
1219 | // f3HistBgLamBgLamQinvMixed = new TH3F ("h3BgLamBgLamQinvMixed", "Qinv BgLamBgLam;q_{inv} [GeV/c];min(d) p [cm];min(d) #pi [cm]" | |
1220 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1221 | // fOutput2Part->Add(f3HistBgLamBgLamQinvMixed); | |
1222 | // f3HistBgALamBgALamQinvMixed = new TH3F ("h3BgALamBgALamQinvMixed", "Qinv BgALamBgALam;q_{inv} [GeV/c];min(d) #bar{p} [cm];min(d) #pi [cm]" | |
1223 | // ,nQinvBins,QinvLow,QinvHig,100,0.,10.,100,0.,10.); | |
1224 | // fOutput2Part->Add(f3HistBgALamBgALamQinvMixed); | |
1225 | ||
1226 | // Post the data | |
1227 | PostData(1, fOutputList); | |
1228 | PostData(2, fOutputPrimaries); | |
1229 | PostData(3, fOutput2Part); | |
1230 | ||
1231 | } | |
1232 | ||
1233 | //________________________________________________________________________ | |
1234 | void AliAnalysisTaskProtonLambda::UserExec(Option_t *) | |
1235 | { | |
1236 | // Main loop | |
1237 | // Called for each event | |
1238 | ||
1239 | // Fill a control histogram | |
1240 | fHistGoodEvent->Fill(0.0); | |
1241 | ||
1242 | // Get the event | |
1243 | fAOD = dynamic_cast<AliAODEvent*>(InputEvent()); | |
1244 | if (!fAOD) { | |
1245 | printf("ERROR: fAOD not available\n"); | |
1246 | return; | |
1247 | } | |
1248 | ||
1249 | // Fill a control histogram | |
1250 | fHistGoodEvent->Fill(1.0); | |
1251 | ||
1252 | // Get the centrality selection | |
1253 | AliCentrality *centrality=NULL; | |
1254 | centrality = fAOD->GetCentrality(); | |
1255 | if (!centrality) { | |
1256 | printf ("ERROR: couldn't get the AliCentrality\n"); | |
1257 | return; | |
1258 | } | |
1259 | ||
1260 | // Fill a control histogram | |
1261 | fHistGoodEvent->Fill(2.0); | |
1262 | ||
1263 | // Check the fQuality flag of the centrality task | |
1264 | // for details see | |
1265 | // https://twiki.cern.ch/twiki/bin/viewauth/ALICE/CentStudies#How_we_determine_centrality | |
1266 | if (centrality->GetQuality()){ | |
1267 | return; | |
1268 | } | |
1269 | ||
1270 | // Fill a control histogram | |
1271 | fHistGoodEvent->Fill(3.0); | |
1272 | ||
1273 | // Analyze only 20% most central events using multiplicity in V0 detector (standard) | |
1274 | Float_t centralityPercentile = centrality->GetCentralityPercentileUnchecked("V0M"); | |
1275 | if ( centralityPercentile > fkCentCut){ | |
1276 | return; | |
1277 | } | |
1278 | ||
1279 | // Fill a control histogram | |
1280 | fHistGoodEvent->Fill(4.0); | |
1281 | ||
1282 | // Primary vertex, GetPrimaryVertex() returns the "best" reconstructed vertex | |
1283 | fPrimaryVtx = fAOD->GetPrimaryVertex(); | |
1284 | if (!fPrimaryVtx){ | |
1285 | printf ("ERROR: no primary vertex\n"); | |
1286 | return; | |
1287 | } | |
1288 | ||
1289 | // Fill a control histogram | |
1290 | fHistGoodEvent->Fill(5.0); | |
1291 | fPrimaryVtx->GetXYZ(fPrimaryVtxPosition); | |
1292 | // fHistPrimaryVertexPosXY->Fill(fPrimaryVtxPosition[0],fPrimaryVtxPosition[1]); | |
1293 | // fHistPrimaryVertexPosZ->Fill(fPrimaryVtxPosition[2]); | |
1294 | ||
1295 | // Zvertex cut, probably done anyhow in centrality task | |
1296 | if (TMath::Abs(fPrimaryVtxPosition[2]) > fkAbsZvertexCut) | |
1297 | return; | |
1298 | ||
1299 | // Fill a control histogram | |
1300 | fHistGoodEvent->Fill(6.0); | |
1301 | ||
1302 | // Multiplicity | |
1303 | if (!(fAOD->GetNumberOfTracks())) { | |
1304 | return; | |
1305 | } | |
1306 | ||
1307 | // Fill a control histogram | |
1308 | fHistGoodEvent->Fill(7.0); | |
1309 | ||
1310 | // fHistTrackMultiplicity->Fill(fAOD->GetNumberOfTracks()); | |
1311 | ||
1312 | // Set up the event buffer to store this event | |
1313 | fFemtoBuffer->ShiftAndAdd(fAOD); | |
1314 | ||
1315 | // // Debugging: print number of stored tracks in the event | |
1316 | // for(UChar_t i=0;i<fFemtoBuffer->GetMixBuffSize();i++) | |
1317 | // printf("iMix: %u, NPro %u, NAPro %u, NLam %u, NALam %u" | |
1318 | // "NBgLam %u, NBgALam %u\n" | |
1319 | // ,i | |
1320 | // ,fFemtoBuffer->GetEvt(i)->GetNPro() | |
1321 | // ,fFemtoBuffer->GetEvt(i)->GetNAPro() | |
1322 | // ,fFemtoBuffer->GetEvt(i)->GetNLam() | |
1323 | // ,fFemtoBuffer->GetEvt(i)->GetNALam() | |
1324 | // ,fFemtoBuffer->GetEvt(i)->GetNBgLam() | |
1325 | // ,fFemtoBuffer->GetEvt(i)->GetNBgALam() | |
1326 | // ); | |
1327 | // printf("\n"); | |
1328 | ||
1329 | ||
1330 | // Reset the reference array to the global tracks.. | |
1331 | ResetGlobalTrackReference(); | |
1332 | // ..and set it | |
1333 | AliAODTrack *track=NULL; | |
1334 | for (Int_t iTrack=0;iTrack<fAOD->GetNumberOfTracks();iTrack++){ | |
f15c1f69 | 1335 | track = dynamic_cast<AliAODTrack*>(fAOD->GetTrack(iTrack)); |
1336 | if(!track) AliFatal("Not a standard AOD"); | |
369a736f | 1337 | if (!track) continue; |
1338 | ||
1339 | // Store the reference of the global tracks | |
1340 | StoreGlobalTrackReference(track); | |
1341 | } | |
1342 | ||
1343 | // V0 loop | |
1344 | const Int_t nV0s = fAOD->GetNumberOfV0s(); | |
1345 | AliAODv0 *v0=NULL; | |
1346 | AliAODTrack *pTrack=NULL; | |
1347 | AliAODTrack *nTrack=NULL; | |
1348 | for (Int_t iV0 = 0; iV0 < nV0s; iV0++) { | |
1349 | v0 = fAOD->GetV0(iV0); | |
1350 | ||
1351 | // Skip if V0 is not there | |
1352 | if((!v0)) | |
1353 | continue; | |
1354 | ||
1355 | // Check that the array fGTI isn't too small | |
1356 | // for the track ids | |
1357 | if(v0->GetPosID() >= fTrackBuffSize|| | |
1358 | v0->GetNegID() >= fTrackBuffSize) | |
1359 | continue; | |
1360 | ||
1361 | // This is AODs: find the track for given id: | |
1362 | pTrack=fGTI[v0->GetPosID()]; | |
1363 | nTrack=fGTI[v0->GetNegID()]; | |
1364 | ||
1365 | // Skip if one of the daughter is not there | |
1366 | if ((!pTrack) || (!nTrack)) continue; | |
1367 | ||
1368 | // Famous crossed rows / findable clusters cut, | |
1369 | // rejects split tracks very well | |
1370 | // (Don't do it for the V0s as we require 80 clusters | |
1371 | // and reject shared clusters) | |
1372 | // if( (!acceptTrack(pTrack)) || (!acceptTrack(nTrack)) ) | |
1373 | // continue; | |
1374 | ||
1375 | // Reject tracks with shared clusters | |
1376 | if(!GoodTPCFitMapSharedMap(pTrack,nTrack)) | |
1377 | continue; | |
1378 | ||
1379 | // Analysis done seperately for offline and on-the-fly | |
1380 | if (!(v0->GetOnFlyStatus())) | |
1381 | ProcessOffline(v0, pTrack, nTrack); | |
1382 | else | |
1383 | ProcessOnTheFly(v0, pTrack, nTrack); | |
1384 | ||
1385 | // V0s get added to the mixed events in the 'Process..' fcts | |
1386 | ||
1387 | } // End of V0 loop | |
1388 | ||
1389 | ||
1390 | // Loop over primary tracks | |
1391 | for (Int_t iTrack=0;iTrack<fAOD->GetNumberOfTracks();iTrack++){ | |
f15c1f69 | 1392 | track = dynamic_cast<AliAODTrack*>(fAOD->GetTrack(iTrack)); |
1393 | if(!track) AliFatal("Not a standard AOD"); | |
369a736f | 1394 | if (!track) continue; |
1395 | ||
1396 | if(!track->TestFilterBit(128)) | |
1397 | continue; | |
1398 | ||
1399 | // Famous crossed rows / findable clusters cut, | |
1400 | // rejects split tracks very well | |
1401 | if(!acceptTrack(track)) | |
1402 | continue; | |
1403 | ||
1404 | // Reject tracks with shared clusters | |
1405 | if(!GoodTPCFitMapSharedMap(track)) | |
1406 | continue; | |
1407 | ||
1408 | // Check that the array fGTI isn't too small | |
1409 | // for the track id | |
1410 | if(-track->GetID()-1 >= fTrackBuffSize) | |
1411 | continue; | |
1412 | ||
1413 | // Without a corresponding global track it's useless | |
1414 | if(!fGTI[-track->GetID()-1]){ | |
1415 | printf ("No global info! iTrack %d, ID %d\n",iTrack,track->GetID()); | |
1416 | continue; | |
1417 | } | |
1418 | ||
1419 | // Visualization of TPC dE/dx | |
1420 | FillDedxHist(track); | |
1421 | ||
1422 | // Depending on momentum choose pid method | |
1423 | if (track->P() < 0.75){ | |
1424 | ProcessTPC(track); | |
1425 | } | |
1426 | else if (track->P() < 1.0){ | |
1427 | ProcessHybrid(track); | |
1428 | } | |
1429 | else if (track->P() < 3.25){ | |
1430 | ProcessTOF(track); | |
1431 | } | |
1432 | ||
1433 | ||
1434 | // Tracks get added to the mixed events in the 'Process..' fcts | |
1435 | ||
1436 | } // End of loop over primary tracks | |
1437 | ||
1438 | // Track cuts do not allow for split tracks | |
1439 | ||
1440 | // | |
1441 | // TODO: Use Adam's shared cluster cut! | |
1442 | // | |
1443 | ||
1444 | ||
1445 | // Cleaning procedure for lambdas & lambdas, lambdas & protons, | |
1446 | // anti-lambdas & anti-lambdas, anti-lambdas & protons + (anti-)lambda background | |
1447 | CleaningProcedure(); | |
1448 | ||
1449 | // Process real events | |
1450 | ProcessReal(); | |
1451 | ProcessRealBackground(); | |
1452 | ||
1453 | // Process mixed events | |
1454 | ProcessMixed(); | |
1455 | ProcessMixedBackground(); | |
1456 | ||
1457 | // Post output data. | |
1458 | PostData(1, fOutputList); | |
1459 | PostData(2, fOutputPrimaries); | |
1460 | PostData(3, fOutput2Part); | |
1461 | ||
1462 | } | |
1463 | //________________________________________________________________________ | |
1464 | void AliAnalysisTaskProtonLambda::ProcessOffline(AliAODv0 *v0, AliAODTrack *pTrack, AliAODTrack *nTrack) | |
1465 | { | |
1466 | ||
1467 | // For clarity in code: Fill some hists with on-the-fly status | |
1468 | // const Float_t kOnTheFlyStat = 0.0; | |
1469 | ||
1470 | // All cuts are checked with invariant mass histograms | |
1471 | // v0->ChangeMassHypothesis(3122); | |
1472 | Float_t minvLam = v0->MassLambda(); | |
1473 | // v0->ChangeMassHypothesis(-3122); | |
1474 | Float_t minvALam = v0->MassAntiLambda(); | |
1475 | // Cosine as local variable as this is some computation | |
1476 | const Float_t lCosPoint = v0->CosPointingAngle(fPrimaryVtxPosition); | |
1477 | ||
1478 | // Also calculate a V0 momentum with TPC only daughters | |
1479 | // Double_t TPConlyV0Mom[3], TPConlyV0MinvLam=0, TPConlyV0MinvALam=0; | |
1480 | // getTPConlyV0Info(pTrack, nTrack, | |
1481 | // TPConlyV0Mom, TPConlyV0MinvLam, TPConlyV0MinvALam); | |
1482 | ||
1483 | // Fill a minv hist w/o any cuts. Select background from the sideband | |
1484 | fHistSideBandOffLam->Fill(minvLam); | |
1485 | fHistSideBandOffALam->Fill(minvALam); | |
1486 | // Fill the event buffer w/ background | |
1487 | if (!fkUseOnTheFly){ | |
1488 | if ( TMath::Abs(minvLam - fkLamMass) > 0.015 && | |
1489 | TMath::Abs(minvLam - fkLamMass) < 0.035 ){ | |
1490 | fFemtoBuffer->GetEvt(0)->AddBgLam(v0, pTrack, nTrack); | |
1491 | } | |
1492 | if ( TMath::Abs(minvALam - fkLamMass) > 0.015 && | |
1493 | TMath::Abs(minvALam - fkLamMass) < 0.035 ){ | |
1494 | fFemtoBuffer->GetEvt(0)->AddBgALam(v0, pTrack, nTrack); | |
1495 | } | |
1496 | } | |
1497 | ||
1498 | // Control histogram: fill all v0s | |
1499 | // fHistGoodV0->Fill(0.0,kOnTheFlyStat); | |
1500 | // fHistGoodV0->Fill(1.0,kOnTheFlyStat); | |
1501 | ||
1502 | // Require 80 TPC clusters for both pos and neg daughter | |
1503 | fHistTPCNclsPosOffLam->Fill(pTrack->GetTPCNcls(),minvLam); | |
1504 | fHistTPCNclsNegOffLam->Fill(nTrack->GetTPCNcls(),minvLam); | |
1505 | fHistTPCNclsPosOffALam->Fill(pTrack->GetTPCNcls(),minvALam); | |
1506 | fHistTPCNclsNegOffALam->Fill(nTrack->GetTPCNcls(),minvALam); | |
1507 | ||
1508 | if ( ( (pTrack->GetTPCNcls()) < 80 ) || ( (nTrack->GetTPCNcls()) < 80 ) ) | |
1509 | return; | |
1510 | // fHistGoodV0->Fill(2.0,kOnTheFlyStat); | |
1511 | ||
1512 | // Require a maximum dca of the daughters of 0.6cm | |
1513 | // fHistDcaV0DaughtersOffLam->Fill(v0->DcaV0Daughters(),minvLam); | |
1514 | // fHistDcaV0DaughtersOffALam->Fill(v0->DcaV0Daughters(),minvALam); | |
1515 | // fHistDcaV0Daughters->Fill(v0->DcaV0Daughters(),kOnTheFlyStat); | |
1516 | if (v0->DcaV0Daughters() > 0.6) | |
1517 | return; | |
1518 | // fHistGoodV0->Fill(3.0,kOnTheFlyStat); | |
1519 | ||
1520 | // Force TPC PID to be present | |
1521 | if (!(pTrack->GetStatus() & AliVTrack::kTPCpid) || | |
1522 | !(nTrack->GetStatus() & AliVTrack::kTPCpid)) | |
1523 | return; | |
1524 | // fHistGoodV0->Fill(4.0,kOnTheFlyStat); | |
1525 | ||
1526 | // Visualize TPC signal before performing selection | |
1527 | // fHistPosTpcBeforeCut->Fill(pTrack->P(),pTrack->GetTPCsignal()); | |
1528 | // fHistNegTpcBeforeCut->Fill(nTrack->P(),nTrack->GetTPCsignal()); | |
1529 | // The Nsigma distribution for TPC dE/dx | |
1530 | // fHistPosNsigmaTpcOffLam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kProton)),minvLam); | |
1531 | // fHistPosNsigmaTpcOffALam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kPion)),minvALam); | |
1532 | // fHistNegNsigmaTpcOffLam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kPion)),minvLam); | |
1533 | // fHistNegNsigmaTpcOffALam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kProton)),minvALam); | |
1534 | // Perform cut on TPC dE/dx | |
1535 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kProton)) > 3.4) | |
1536 | minvLam=0.0; | |
1537 | // else | |
1538 | // fHistPosTpcAfterCut->Fill(pTrack->P(),pTrack->GetTPCsignal()); | |
1539 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kPion)) > 4.4) | |
1540 | minvLam=0.0; | |
1541 | // else | |
1542 | // fHistNegTpcAfterCut->Fill(nTrack->P(),nTrack->GetTPCsignal()); | |
1543 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kPion)) > 4.2) | |
1544 | minvALam=0.0; | |
1545 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kProton)) > 3.4) | |
1546 | minvALam=0.0; | |
1547 | ||
1548 | // Don't use a tof cut for pions | |
1549 | ||
1550 | // Check whether to use a 5sigma tof cut or none for protons | |
1551 | // if (pTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1552 | // if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(pTrack, AliPID::kProton)) > 5.0) | |
1553 | // fHistUseTofOffLam->Fill(1.0,minvLam); | |
1554 | // else | |
1555 | // fHistUseTofOffLam->Fill(0.0,minvLam); | |
1556 | // } | |
1557 | // else | |
1558 | // fHistUseTofOffLam->Fill(0.0,minvLam); | |
1559 | // Check whether to use a 5sigma tof cut or none for anti-protons | |
1560 | // if (nTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1561 | // if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(nTrack, AliPID::kProton)) > 5.0) | |
1562 | // fHistUseTofOffALam->Fill(1.0,minvALam); | |
1563 | // else | |
1564 | // fHistUseTofOffALam->Fill(0.0,minvALam); | |
1565 | // } | |
1566 | // else | |
1567 | // fHistUseTofOffALam->Fill(0.0,minvALam); | |
1568 | ||
1569 | // Don't use a TOF cut for offline | |
1570 | ||
1571 | // Don't need to check for sign of pairs as this is always | |
1572 | // correct for offline finder | |
1573 | ||
1574 | // Don't need to check for TPC refit as it is required | |
1575 | // by the offline finder itself | |
1576 | ||
1577 | // | |
1578 | // Require a minimum distance between daughters and primary vertex | |
1579 | // | |
1580 | // Fill histograms with the distributions before cutting | |
1581 | // fHistDcaPosOffLam->Fill(v0->DcaPosToPrimVertex(),minvLam); | |
1582 | // fHistDcaPosOffALam->Fill(v0->DcaPosToPrimVertex(),minvALam); | |
1583 | // fHistDcaNegOffLam->Fill(v0->DcaNegToPrimVertex(),minvLam); | |
1584 | // fHistDcaNegOffALam->Fill(v0->DcaNegToPrimVertex(),minvALam); | |
1585 | ||
1586 | // fHistDcaPosToPrimVertex->Fill(v0->DcaPosToPrimVertex(),kOnTheFlyStat); | |
1587 | // fHistDcaNegToPrimVertex->Fill(v0->DcaNegToPrimVertex(),kOnTheFlyStat); | |
1588 | // fHistDcaPosToPrimVertexZoom->Fill(v0->DcaPosToPrimVertex(),kOnTheFlyStat); | |
1589 | // fHistDcaNegToPrimVertexZoom->Fill(v0->DcaNegToPrimVertex(),kOnTheFlyStat); | |
1590 | ||
1591 | // Do the cut | |
1592 | if (v0->DcaPosToPrimVertex() < 0.1) | |
1593 | minvLam=0.0; | |
1594 | if (v0->DcaPosToPrimVertex() < 0.3) | |
1595 | minvALam=0.0; | |
1596 | if (v0->DcaNegToPrimVertex() < 0.1) | |
1597 | minvALam=0.0; | |
1598 | if (v0->DcaNegToPrimVertex() < 0.3) | |
1599 | minvLam=0.0; | |
1600 | ||
1601 | // Cosine of pointing angle. Computed at the beginning. | |
1602 | // Fill historgrams before cutting | |
1603 | // fHistCosPointLamOff->Fill(lCosPoint,minvLam); | |
1604 | // fHistCosPointALamOff->Fill(lCosPoint,minvALam); | |
1605 | // fHistCosPointLamZoomOff->Fill(lCosPoint,minvLam); | |
1606 | // fHistCosPointALamZoomOff->Fill(lCosPoint,minvALam); | |
1607 | ||
1608 | // fHistCosPointAngle->Fill(lCosPoint,kOnTheFlyStat); | |
1609 | // fHistCosPointAngleZoom->Fill(lCosPoint,kOnTheFlyStat); | |
1610 | ||
1611 | // Do the cut in cos (pointing angle) | |
1612 | // (note the difference 0.9996 for offline and 0.9999 for on-the-fly) | |
1613 | if (lCosPoint < 0.9996) | |
1614 | return; | |
1615 | ||
1616 | // fHistGoodV0->Fill(7.0,kOnTheFlyStat); | |
1617 | ||
1618 | // Fill some histograms with cut variables | |
1619 | // fHistChi2->Fill(v0->Chi2V0(),kOnTheFlyStat); | |
1620 | ||
1621 | // Idea to cut on the radius | |
1622 | // fHistRadiusV0->Fill(v0->RadiusV0(),kOnTheFlyStat); | |
1623 | // fHistV0RadiusLamOff->Fill(v0->RadiusV0(),minvLam); | |
1624 | // fHistV0RadiusALamOff->Fill(v0->RadiusV0(),minvALam); | |
1625 | ||
1626 | // Idea to cut on the decay length | |
1627 | // fHistDecayLengthV0->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),kOnTheFlyStat); | |
1628 | // fHistV0DecayLengthLamOff->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),minvLam); | |
1629 | // fHistV0DecayLengthALamOff->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),minvALam); | |
1630 | ||
1631 | // Idea to cut on DCA of V0 and primay vertex | |
1632 | // fHistDcaV0PriVertexLamOff->Fill(v0->DcaV0ToPrimVertex(),minvLam); | |
1633 | // fHistDcaV0PriVertexALamOff->Fill(v0->DcaV0ToPrimVertex(),minvALam); | |
1634 | ||
1635 | // Fill some invariant mass distributions | |
1636 | fHistMassLambdaOff->Fill(minvLam); | |
1637 | fHistMassAntiLambdaOff->Fill(minvALam); | |
1638 | // fHistPtVsMassLambdaOff->Fill(v0->Pt(),minvLam); | |
1639 | // fHistPtVsMassAntiLambdaOff->Fill(v0->Pt(),minvALam); | |
1640 | ||
1641 | // 3d histogram: rapidity, pt and mass | |
1642 | fHistYPtMassLamOff->Fill(v0->Y(3122),v0->Pt(),minvLam); | |
1643 | fHistYPtMassALamOff->Fill(v0->Y(-3122),v0->Pt(),minvALam); | |
1644 | ||
1645 | // Invariant mass cut lambda :: fill a y-pt hist | |
1646 | // if ( TMath::Abs(minvLam - fkLamMass) < 0.01 ){ | |
1647 | // fHistPtVsYLambdaOff->Fill(v0->Pt(),v0->Y(3122)); | |
1648 | // } | |
1649 | // // Invariant mass cut anti-lambda :: fill a y-pt hist | |
1650 | // if ( TMath::Abs(minvALam - fkLamMass) < 0.01 ){ | |
1651 | // fHistPtVsYAntiLambdaOff->Fill(v0->Pt(),v0->Y(-3122)); | |
1652 | // } | |
1653 | ||
1654 | // Fill the mixed events when offline V0 finder is used | |
1655 | if (!fkUseOnTheFly){ | |
1656 | // Highest significance for minv +/- 4 MeV | |
1657 | if ( TMath::Abs(minvLam - fkLamMass) < 0.004 ){ | |
1658 | fFemtoBuffer->GetEvt(0)->AddLam(v0, pTrack, nTrack); | |
1659 | } | |
1660 | if ( TMath::Abs(minvALam - fkLamMass) < 0.004 ){ | |
1661 | fFemtoBuffer->GetEvt(0)->AddALam(v0, pTrack, nTrack); | |
1662 | } | |
1663 | } | |
1664 | } | |
1665 | //________________________________________________________________________ | |
1666 | void AliAnalysisTaskProtonLambda::ProcessOnTheFly(AliAODv0 *v0, AliAODTrack *pTrack, AliAODTrack *nTrack) | |
1667 | { | |
1668 | // For clarity in code: Fill some hists with on-the-fly status | |
1669 | // const Float_t kOnTheFlyStat = 1.0; | |
1670 | ||
1671 | // All cuts are checked with invariant mass histograms | |
1672 | Float_t minvLam = v0->MassLambda(); | |
1673 | Float_t minvALam = v0->MassAntiLambda(); | |
1674 | const Float_t lCosPoint = v0->CosPointingAngle(fPrimaryVtxPosition); | |
1675 | ||
1676 | // Control histogram: fill all v0s | |
1677 | // fHistGoodV0->Fill(0.0,kOnTheFlyStat); | |
1678 | // Control hist: after require two daughter tracks | |
1679 | // fHistGoodV0->Fill(1.0,kOnTheFlyStat); | |
1680 | // Check the right sign of the tracks (mainly on-the-fly) | |
1681 | if (pTrack->Charge() > 0 && nTrack->Charge() < 0){ | |
1682 | // Correct assignment | |
1683 | // fHistCorrectSigns->Fill(0.0,kOnTheFlyStat); | |
1684 | ||
1685 | // fHistLikeSignOnLam->Fill(0.0,minvLam); | |
1686 | // fHistLikeSignOnALam->Fill(0.0,minvALam); | |
1687 | } | |
1688 | else if (pTrack->Charge() < 0 && nTrack->Charge() > 0){ | |
1689 | // Swapped sings | |
1690 | // fHistCorrectSigns->Fill(1.0,kOnTheFlyStat); | |
1691 | ||
1692 | pTrack = fGTI[v0->GetNegID()]; | |
1693 | nTrack = fGTI[v0->GetPosID()]; | |
1694 | ||
1695 | ||
1696 | // See http://savannah.cern.ch/bugs/?90749 | |
1697 | // For AODs it depends on with which root version | |
1698 | // the AODs got produced. | |
1699 | ||
1700 | // See above: swapping mass assignment | |
1701 | minvLam = v0->MassAntiLambda(); | |
1702 | minvALam = v0->MassLambda(); | |
1703 | ||
1704 | // fHistLikeSignOnLam->Fill(1.0,minvLam); | |
1705 | // fHistLikeSignOnALam->Fill(1.0,minvALam); | |
1706 | } | |
1707 | else { | |
1708 | // Like sign pairs | |
1709 | // fHistCorrectSigns->Fill(2.0,kOnTheFlyStat); | |
1710 | ||
1711 | // fHistLikeSignOnLam->Fill(2.0,minvLam); | |
1712 | // fHistLikeSignOnALam->Fill(2.0,minvALam); | |
1713 | ||
1714 | // Don't use like sign-pairs | |
1715 | return; | |
1716 | } | |
1717 | // fHistGoodV0->Fill(2.0,kOnTheFlyStat); | |
1718 | ||
1719 | // V0 momentum | |
1720 | Double_t V0Mom[3]; | |
1721 | v0->PxPyPz(V0Mom); | |
1722 | // Also calculate a V0 momentum with TPC only daughters | |
1723 | // Double_t TPConlyV0Mom[3], TPConlyV0MinvLam=0, TPConlyV0MinvALam=0; | |
1724 | // getTPConlyV0Info(pTrack, nTrack, | |
1725 | // TPConlyV0Mom, TPConlyV0MinvLam, TPConlyV0MinvALam); | |
1726 | ||
1727 | // Fill a minv hist w/o any cuts. Select background from the sideband | |
1728 | fHistSideBandOnLam->Fill(minvLam); | |
1729 | fHistSideBandOnALam->Fill(minvALam); | |
1730 | // Fill the event buffer w/ background | |
1731 | if (fkUseOnTheFly){ | |
1732 | // Select side band aka background lambdas | |
1733 | if (TMath::Abs(minvLam - fkLamMass) > 0.015 && | |
1734 | TMath::Abs(minvLam - fkLamMass) < 0.035 ){ | |
1735 | ||
1736 | fFemtoBuffer->GetEvt(0)->AddBgLam(v0, pTrack, nTrack); | |
1737 | // Momentum difference of standard V0 / TPC only V0 | |
1738 | // fHistMomDiffBgLam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1739 | // V0Mom[1] - TPConlyV0Mom[1], | |
1740 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1741 | // Same excluding V0s with daughters with SPD hits | |
1742 | // if( !(pTrack->HasPointOnITSLayer(0) || pTrack->HasPointOnITSLayer(1) || | |
1743 | // nTrack->HasPointOnITSLayer(0) || nTrack->HasPointOnITSLayer(1) )){ | |
1744 | // No SPD hits | |
1745 | // fHistMomDiffWoSPDBgLam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1746 | // V0Mom[1] - TPConlyV0Mom[1], | |
1747 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1748 | ||
1749 | // } | |
1750 | } // End of background lambdas | |
1751 | // Select side band aka background anti-lambdas | |
1752 | if ( TMath::Abs(minvALam - fkLamMass) > 0.015 && | |
1753 | TMath::Abs(minvALam - fkLamMass) < 0.035 ){ | |
1754 | ||
1755 | fFemtoBuffer->GetEvt(0)->AddBgALam(v0, pTrack, nTrack); | |
1756 | // Momentum difference of standard V0 / TPC only V0 | |
1757 | // fHistMomDiffBgALam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1758 | // V0Mom[1] - TPConlyV0Mom[1], | |
1759 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1760 | // Same excluding V0s with daughters with SPD hits | |
1761 | // if( !(pTrack->HasPointOnITSLayer(0) || pTrack->HasPointOnITSLayer(1) || | |
1762 | // nTrack->HasPointOnITSLayer(0) || nTrack->HasPointOnITSLayer(1) )){ | |
1763 | // No SPD hits | |
1764 | // fHistMomDiffWoSPDBgALam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1765 | // V0Mom[1] - TPConlyV0Mom[1], | |
1766 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1767 | // } // No SPD hits | |
1768 | } // End of background anti-lambda | |
1769 | } // End of if use on-the-fly finder | |
1770 | ||
1771 | // | |
1772 | // Require 80 TPC clusters for both daughters | |
1773 | // | |
1774 | // There's a lambda signal for 0-9 clusters of the proton | |
1775 | // as it's for 110-120?! | |
1776 | // There was a bug in the finding of the global track, since | |
1777 | // fixing it, offline is fine (and the problem looks less | |
1778 | // severe for on-the-fly). Still there is a problem here. | |
1779 | // There are tracks with 0 clusters. This is not the case | |
1780 | // for the offline finder. The speculation would be that | |
1781 | // 1-9 clusters are treated correctly also here, it's just | |
1782 | // the 0 cluster tracks. Should be a filter issue: on-the-fly | |
1783 | // finds a V0, stores the daughter but info doesn't get written. | |
1784 | if(pTrack->GetTPCNcls()){ | |
1785 | // More than zero clusters | |
1786 | fHistTPCNclsPosOnLam->Fill(pTrack->GetTPCNcls(),minvLam); | |
1787 | fHistTPCNclsPosOnALam->Fill(pTrack->GetTPCNcls(),minvALam); | |
1788 | } | |
1789 | else { | |
1790 | // Zero clusters, fill the underflow to distinguish | |
1791 | fHistTPCNclsPosOnLam->Fill(-1,minvLam); | |
1792 | fHistTPCNclsPosOnALam->Fill(-1,minvALam); | |
1793 | } | |
1794 | if(nTrack->GetTPCNcls()){ | |
1795 | // More than zero clusters | |
1796 | fHistTPCNclsNegOnLam->Fill(nTrack->GetTPCNcls(),minvLam); | |
1797 | fHistTPCNclsNegOnALam->Fill(nTrack->GetTPCNcls(),minvALam); | |
1798 | } | |
1799 | else { | |
1800 | // Zero clusters, fill the underflow to distinguish | |
1801 | fHistTPCNclsNegOnLam->Fill(-1,minvLam); | |
1802 | fHistTPCNclsNegOnALam->Fill(-1,minvALam); | |
1803 | } | |
1804 | ||
1805 | // Do the cut on the TPC clusters, 0 OR at least 80 | |
1806 | if ( ( pTrack->GetTPCNcls() < 80 && pTrack->GetTPCNcls() ) || | |
1807 | ( nTrack->GetTPCNcls() < 80 && nTrack->GetTPCNcls() ) ) | |
1808 | return; | |
1809 | // fHistGoodV0->Fill(3.0,kOnTheFlyStat); | |
1810 | ||
1811 | // Require a maximum dca of the daughters of 0.2cm | |
1812 | // fHistDcaV0DaughtersOnLam->Fill(v0->DcaV0Daughters(),minvLam); | |
1813 | // fHistDcaV0DaughtersOnALam->Fill(v0->DcaV0Daughters(),minvALam); | |
1814 | // fHistDcaV0Daughters->Fill(v0->DcaV0Daughters(),kOnTheFlyStat); | |
1815 | if (v0->DcaV0Daughters() > 0.2) | |
1816 | return; | |
1817 | // fHistGoodV0->Fill(4.0,kOnTheFlyStat); | |
1818 | ||
1819 | // Require cosine of pointing angle bigger than 0.9999 | |
1820 | // fHistCosPointAngle->Fill(lCosPoint,kOnTheFlyStat); | |
1821 | // fHistCosPointAngleZoom->Fill(lCosPoint,kOnTheFlyStat); | |
1822 | // fHistCosPointLamOn->Fill(lCosPoint,minvLam); | |
1823 | // fHistCosPointALamOn->Fill(lCosPoint,minvALam); | |
1824 | // fHistCosPointLamZoomOn->Fill(lCosPoint,minvLam); | |
1825 | // fHistCosPointALamZoomOn->Fill(lCosPoint,minvALam); | |
1826 | if (lCosPoint<0.9999) | |
1827 | return; | |
1828 | // fHistGoodV0->Fill(5.0,kOnTheFlyStat); | |
1829 | // Force TPC PID to be present | |
1830 | if (!(pTrack->GetStatus() & AliVTrack::kTPCpid) || | |
1831 | !(nTrack->GetStatus() & AliVTrack::kTPCpid)) { | |
1832 | // No TPC pid present for this track | |
1833 | return; | |
1834 | } | |
1835 | // fHistGoodV0->Fill(6.0,kOnTheFlyStat); | |
1836 | // Visualize TPC signal before performing selection | |
1837 | // fHistPosTpcBeforeCut->Fill(pTrack->P(),pTrack->GetTPCsignal()); | |
1838 | // fHistNegTpcBeforeCut->Fill(nTrack->P(),nTrack->GetTPCsignal()); | |
1839 | // // The Nsigma distribution for TPC dE/dx | |
1840 | // fHistPosNsigmaTpcOnLam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kProton)),minvLam); | |
1841 | // fHistPosNsigmaTpcOnALam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kPion)),minvALam); | |
1842 | // fHistNegNsigmaTpcOnLam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kPion)),minvLam); | |
1843 | // fHistNegNsigmaTpcOnALam->Fill(TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kProton)),minvALam); | |
1844 | ||
1845 | // Perform cut on TPC dE/dx | |
1846 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kProton)) > 3.7) | |
1847 | minvLam=0.0; | |
1848 | // else | |
1849 | // fHistPosTpcAfterCut->Fill(pTrack->P(),pTrack->GetTPCsignal()); | |
1850 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kPion)) > 3.8) | |
1851 | minvLam=0.0; | |
1852 | // else | |
1853 | // fHistNegTpcAfterCut->Fill(nTrack->P(),nTrack->GetTPCsignal()); | |
1854 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(pTrack, AliPID::kPion)) > 4.2) | |
1855 | minvALam=0.0; | |
1856 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC(nTrack, AliPID::kProton)) > 3.9) | |
1857 | minvALam=0.0; | |
1858 | ||
1859 | // Don't use a tof cut for pions | |
1860 | ||
1861 | // Check whether to use a 5sigma tof cut or none for protons | |
1862 | // if (pTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1863 | // if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(pTrack, AliPID::kProton)) > 5.0) | |
1864 | // fHistUseTofOnLam->Fill(1.0,minvLam); | |
1865 | // else | |
1866 | // fHistUseTofOnLam->Fill(0.0,minvLam); | |
1867 | // } | |
1868 | // else | |
1869 | // fHistUseTofOnLam->Fill(0.0,minvLam); | |
1870 | // // Check whether to use a 5sigma tof cut or none for anti-protons | |
1871 | // if (nTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1872 | // if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(nTrack, AliPID::kProton)) > 5.0) | |
1873 | // fHistUseTofOnALam->Fill(1.0,minvALam); | |
1874 | // else | |
1875 | // fHistUseTofOnALam->Fill(0.0,minvALam); | |
1876 | // } | |
1877 | // else | |
1878 | // fHistUseTofOnALam->Fill(0.0,minvALam); | |
1879 | ||
1880 | // Reject (anti-)protons with more than 5sigma TOF | |
1881 | if (nTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1882 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(nTrack, AliPID::kProton)) > 5.0) | |
1883 | minvALam=0.0; | |
1884 | } | |
1885 | if (pTrack->GetStatus() & AliVTrack::kTOFpid){ | |
1886 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTOF(pTrack, AliPID::kProton)) > 5.0) | |
1887 | minvLam=0.0; | |
1888 | } | |
1889 | ||
1890 | // Don't require TPC refit. You would kill nearly your whole signal | |
1891 | ||
1892 | // Distance between daughters and primary vertex | |
1893 | // fHistDcaPosToPrimVertex->Fill(v0->DcaPosToPrimVertex(),kOnTheFlyStat); | |
1894 | // fHistDcaNegToPrimVertex->Fill(v0->DcaNegToPrimVertex(),kOnTheFlyStat); | |
1895 | // fHistDcaPosToPrimVertexZoom->Fill(v0->DcaPosToPrimVertex(),kOnTheFlyStat); | |
1896 | // fHistDcaNegToPrimVertexZoom->Fill(v0->DcaNegToPrimVertex(),kOnTheFlyStat); | |
1897 | // fHistDcaPosOnLam->Fill(v0->DcaPosToPrimVertex(),minvLam); | |
1898 | // fHistDcaPosOnALam->Fill(v0->DcaPosToPrimVertex(),minvALam); | |
1899 | // fHistDcaNegOnLam->Fill(v0->DcaNegToPrimVertex(),minvLam); | |
1900 | // fHistDcaNegOnALam->Fill(v0->DcaNegToPrimVertex(),minvALam); | |
1901 | // Require at least 0.02 cm distance from the primary vertex for the (anti-)protons | |
1902 | if (v0->DcaPosToPrimVertex() < 0.02) | |
1903 | minvLam=0.0; | |
1904 | if (v0->DcaNegToPrimVertex() < 0.02) | |
1905 | minvALam=0.0; | |
1906 | // Require at least 0.05 cm distance from the primary vertex for the pions | |
1907 | if (v0->DcaPosToPrimVertex() < 0.05) | |
1908 | minvALam=0.0; | |
1909 | if (v0->DcaNegToPrimVertex() < 0.05) | |
1910 | minvLam=0.0; | |
1911 | ||
1912 | // Fill some histograms with cut variables | |
1913 | // fHistChi2->Fill(v0->Chi2V0(),kOnTheFlyStat); | |
1914 | ||
1915 | ||
1916 | // Idea to cut on the radius | |
1917 | // fHistRadiusV0->Fill(v0->RadiusV0(),kOnTheFlyStat); | |
1918 | // fHistV0RadiusLamOn->Fill(v0->RadiusV0(),minvLam); | |
1919 | // fHistV0RadiusALamOn->Fill(v0->RadiusV0(),minvALam); | |
1920 | ||
1921 | // Idea to cut on the decay length | |
1922 | // fHistDecayLengthV0->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),kOnTheFlyStat); | |
1923 | // fHistV0DecayLengthLamOn->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),minvLam); | |
1924 | // fHistV0DecayLengthALamOn->Fill(v0->DecayLengthV0(fPrimaryVtxPosition),minvALam); | |
1925 | ||
1926 | // Idea to cut on DCA of V0 and primay vertex | |
1927 | // fHistDcaV0PriVertexLamOn->Fill(v0->DcaV0ToPrimVertex(),minvLam); | |
1928 | // fHistDcaV0PriVertexALamOn->Fill(v0->DcaV0ToPrimVertex(),minvALam); | |
1929 | ||
1930 | // TPC Chi2 / number of degrees of freedom | |
1931 | // A cut on at least 80 clusters is already done before, | |
1932 | // no concern to divide by zero | |
1933 | // fHistChi2TPCPosLamOn->Fill(pTrack->Chi2perNDF(),minvLam); | |
1934 | // fHistChi2TPCPosALamOn->Fill(pTrack->Chi2perNDF(),minvALam); | |
1935 | // fHistChi2TPCNegLamOn->Fill(nTrack->Chi2perNDF(),minvLam); | |
1936 | // fHistChi2TPCNegALamOn->Fill(nTrack->Chi2perNDF(),minvALam); | |
1937 | // Don't cut like Chi2/ndf < 4! One might throw away the tracks | |
1938 | // with Chi2/ndf roughly one as they are good primaries | |
1939 | ||
1940 | // Fill some invariant mass distributions | |
1941 | fHistMassLambdaOn->Fill(minvLam); | |
1942 | fHistMassAntiLambdaOn->Fill(minvALam); | |
1943 | // fHistPtVsMassLambdaOn->Fill(v0->Pt(),minvLam); | |
1944 | // fHistPtVsMassAntiLambdaOn->Fill(v0->Pt(),minvALam); | |
1945 | ||
1946 | // TPC only invariant mass distributions | |
1947 | // if(minvLam > .1){ | |
1948 | // Lambda is good | |
1949 | // fHistMinvTPConlyLamOn->Fill(TPConlyV0MinvLam); | |
1950 | // } | |
1951 | // if (minvALam > .1){ | |
1952 | // Anti-lambda is good | |
1953 | // fHistMinvTPConlyALamOn->Fill(TPConlyV0MinvALam); | |
1954 | // } | |
1955 | ||
1956 | // 3d histogram: rapidity, pt and mass | |
1957 | fHistYPtMassLamOn->Fill(v0->Y(3122),v0->Pt(),minvLam); | |
1958 | fHistYPtMassALamOn->Fill(v0->Y(-3122),v0->Pt(),minvALam); | |
1959 | ||
1960 | // // Invariant mass cut lambda :: fill a y-pt hists | |
1961 | // if ( TMath::Abs(minvLam - fkLamMass) < 0.01 ){ | |
1962 | // fHistPtVsYLambdaOn->Fill(v0->Pt(),v0->Y(3122)); | |
1963 | // } | |
1964 | // // Invariant mass cut anti-lambda :: fill a y-pt hists | |
1965 | // if ( TMath::Abs(minvALam - fkLamMass) < 0.01 ){ | |
1966 | // fHistPtVsYAntiLambdaOn->Fill(v0->Pt(),v0->Y(-3122)); | |
1967 | // } | |
1968 | ||
1969 | // Fill the mixed events when on-the-fly V0 finder is used | |
1970 | if (fkUseOnTheFly){ | |
1971 | ||
1972 | // Highest significance for minv +/- 4 MeV | |
1973 | if ( TMath::Abs(minvLam - fkLamMass) < 0.004 ){ | |
1974 | fFemtoBuffer->GetEvt(0)->AddLam(v0, pTrack, nTrack); | |
1975 | // Momentum difference of standard V0 / TPC only V0 | |
1976 | // fHistMomDiffLam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1977 | // V0Mom[1] - TPConlyV0Mom[1], | |
1978 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1979 | // Same excluding V0s with daughters with SPD hits | |
1980 | // if( !(pTrack->HasPointOnITSLayer(0) || pTrack->HasPointOnITSLayer(1) || | |
1981 | // nTrack->HasPointOnITSLayer(0) || nTrack->HasPointOnITSLayer(1) )){ | |
1982 | // // No SPD hits | |
1983 | // fHistMomDiffWoSPDLam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1984 | // V0Mom[1] - TPConlyV0Mom[1], | |
1985 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1986 | // } // No SPD hits | |
1987 | } // Good lambda | |
1988 | if ( TMath::Abs(minvALam - fkLamMass) < 0.004 ) { | |
1989 | fFemtoBuffer->GetEvt(0)->AddALam(v0, pTrack, nTrack); | |
1990 | // Momentum difference of standard V0 / TPC only V0 | |
1991 | // fHistMomDiffALam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1992 | // V0Mom[1] - TPConlyV0Mom[1], | |
1993 | // V0Mom[2] - TPConlyV0Mom[2]); | |
1994 | // Same excluding V0s with daughters with SPD hits | |
1995 | // if( !(pTrack->HasPointOnITSLayer(0) || pTrack->HasPointOnITSLayer(1) || | |
1996 | // nTrack->HasPointOnITSLayer(0) || nTrack->HasPointOnITSLayer(1) )){ | |
1997 | // No SPD hits | |
1998 | // fHistMomDiffWoSPDALam->Fill(V0Mom[0] - TPConlyV0Mom[0], | |
1999 | // V0Mom[1] - TPConlyV0Mom[1], | |
2000 | // V0Mom[2] - TPConlyV0Mom[2]); | |
2001 | // } // No SPD hits | |
2002 | } // Good anti-lambda | |
2003 | } // Use on-the-fly finder for Femto analysis | |
2004 | } // ProcessOnTheFly | |
2005 | //________________________________________________________________________ | |
2006 | void AliAnalysisTaskProtonLambda::ProcessTOF(AliAODTrack* track) | |
2007 | { | |
2008 | // Request the kTOFpid bit. There are tracks with kTOFout and wihthout kTOFpid, | |
2009 | // but these tracks have a bad TOF signal. | |
2010 | if(!((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid)) | |
2011 | return; | |
2012 | ||
2013 | // TOF signal corrected for expected time and (if neccessary) for start time | |
2014 | Float_t corrTOFsig = GetCorrectedTOFSignal(track); | |
2015 | ||
2016 | // Distinguish between charges | |
2017 | if (track->Charge() > 0){ | |
2018 | // Simple Nsigma TOF distribution | |
2019 | // fPriHistPosNsigmaTof->Fill(fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2020 | // Nsigma TOF in bins of total momentum | |
2021 | fPriHistPosNsigmaTofVsP->Fill(track->P(),fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2022 | // Nsigma TOF in bins of transverse momentum | |
2023 | fPriHistPosNsigmaTofVsPt->Fill(track->Pt(),fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2024 | ||
2025 | // Try the tof signal instead of nsigma | |
2026 | fPriHistTOFsignalPosVsP->Fill(track->P(), corrTOFsig); | |
2027 | fPriHistTOFsignalPosVsPt->Fill(track->Pt(), corrTOFsig); | |
2028 | ||
2029 | } | |
2030 | else if (track->Charge() < 0){ | |
2031 | // Simple Nsigma TOF distribution | |
2032 | // fPriHistNegNsigmaTof->Fill(fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2033 | // Nsigma TOF in bins of total momentum | |
2034 | fPriHistNegNsigmaTofVsP->Fill(track->P(),fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2035 | // Nsigma TOF in bins of transverse momentum | |
2036 | fPriHistNegNsigmaTofVsPt->Fill(track->Pt(),fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2037 | ||
2038 | // Try the tof signal instead of nsigma | |
2039 | fPriHistTOFsignalNegVsP->Fill(track->P(), corrTOFsig); | |
2040 | fPriHistTOFsignalNegVsPt->Fill(track->Pt(), corrTOFsig); | |
2041 | } | |
2042 | ||
2043 | // Final judging: simple first idea. | |
2044 | // min -800 up to 2 GeV and 0 up to 3.25GeV | |
2045 | if (track->P() < 2.0){ | |
2046 | // if (corrTOFsig > -800.0){ | |
2047 | // In AODs, the resolution is better, do -500 (AODs) | |
2048 | // instead of -800 (ESDs) | |
2049 | if (corrTOFsig > -500.0) { | |
2050 | // Create additional TPC only constrained tp pri. vtx track parameters | |
2051 | // constrainTrack(track); | |
2052 | if (track->Charge()>0){ | |
2053 | // Cut .1 cm on DCAxy and fill a histogram | |
2054 | if(goodDCA(track)){ | |
2055 | // Add to the femto event | |
2056 | fFemtoBuffer->GetEvt(0)->AddPro(track); | |
2057 | } | |
2058 | } | |
2059 | else{ | |
2060 | // Cut .1 cm on DCAxy and fill a histogram | |
2061 | if(goodDCA(track)){ | |
2062 | // Add to the femto event | |
2063 | fFemtoBuffer->GetEvt(0)->AddAPro(track); | |
2064 | } | |
2065 | } | |
2066 | } | |
2067 | } | |
2068 | else if (track->P() < 3.25){ | |
2069 | if (corrTOFsig > 0){ | |
2070 | // Create additional TPC only constrained tp pri. vtx track parameters | |
2071 | // constrainTrack(track); | |
2072 | if (track->Charge()>0){ | |
2073 | // Cut .1 cm on DCAxy and fill a histogram | |
2074 | if(goodDCA(track)){ | |
2075 | // Add to the femto event | |
2076 | fFemtoBuffer->GetEvt(0)->AddPro(track); | |
2077 | } | |
2078 | } | |
2079 | else{ | |
2080 | // Cut .1 cm on DCAxy and fill a histogram | |
2081 | if(goodDCA(track)){ | |
2082 | // Add to the femto event | |
2083 | fFemtoBuffer->GetEvt(0)->AddAPro(track); | |
2084 | } | |
2085 | } | |
2086 | } | |
2087 | } | |
2088 | } // End of void ProcessTOF | |
2089 | //________________________________________________________________________ | |
2090 | void AliAnalysisTaskProtonLambda::ProcessTPC(AliAODTrack* track){ | |
2091 | ||
2092 | // Require the TPCpid bit | |
2093 | if (!((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTPCpid)) | |
2094 | return; | |
2095 | ||
2096 | // In contrast to ESDs one doesn't check for AliESDtrack::kTOFpid | |
2097 | // but for AliVTrack::kTOFout?? | |
2098 | // Check how many particles have TOFout bit | |
2099 | // if (track->Charge() > 0){ | |
2100 | // if ((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid) | |
2101 | // fPriHistHasTofPos->Fill(1.0); | |
2102 | // else | |
2103 | // fPriHistHasTofPos->Fill(0.0); | |
2104 | // } | |
2105 | // else{ | |
2106 | // if ((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid) | |
2107 | // fPriHistHasTofNeg->Fill(1.0); | |
2108 | // else | |
2109 | // fPriHistHasTofNeg->Fill(0.0); | |
2110 | // } | |
2111 | ||
2112 | // For all plots <dE/dx> vs p one should use | |
2113 | // the momentum at the inner wall of the TPC. | |
2114 | ||
2115 | // Use a TOF cut and fill the same dE/dx histograms | |
2116 | // Bool_t acceptedTOF=kFALSE; | |
2117 | // if ((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid){ | |
2118 | // if (fPIDResponse->NumberOfSigmasTOF((fGTI[-track->GetID()-1]), AliPID::kProton) > -10.0) | |
2119 | // acceptedTOF=kTRUE; | |
2120 | // } | |
2121 | // if (acceptedTOF){ | |
2122 | // if (track->Charge() > 0){ | |
2123 | // fPriHistTPCsignalTOFcutPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2124 | // (fGTI[-track->GetID()-1])->GetTPCsignal()); | |
2125 | // fPriHistNsigmaTPCTOFcutPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2126 | // fPIDResponse->NumberOfSigmasTPC((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2127 | // } | |
2128 | // else{ | |
2129 | // fPriHistTPCsignalTOFcutNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2130 | // (fGTI[-track->GetID()-1])->GetTPCsignal()); | |
2131 | // fPriHistNsigmaTPCTOFcutNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2132 | // fPIDResponse->NumberOfSigmasTPC((fGTI[-track->GetID()-1]), AliPID::kProton)); | |
2133 | // } | |
2134 | // } | |
2135 | ||
2136 | // A first idea of a cut: use the spectra cut. | |
2137 | // (should perhaps change for momenta ~ 0.75 GeV) | |
2138 | if ( ((fGTI[-track->GetID()-1])->GetTPCsignal() > | |
2139 | fTpcResponse->GetExpectedSignal((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2140 | AliPID::kProton)) | |
2141 | // New since Sept 10th 2012: Also use a cut to reject deuterons. | |
2142 | // I checked: The cut is good! | |
2143 | && ((fGTI[-track->GetID()-1])->GetTPCsignal() < | |
2144 | 2.0*fTpcResponse->GetExpectedSignal((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2145 | AliPID::kProton)) | |
2146 | ) { | |
2147 | // Distinguish between charges | |
2148 | if (track->Charge()>0){ | |
2149 | // Cut .1 cm on DCAxy and fill a histogram | |
2150 | if(goodDCA(track)){ | |
2151 | // Add to the femto event | |
2152 | fFemtoBuffer->GetEvt(0)->AddPro(track); | |
2153 | } | |
2154 | } | |
2155 | else{ | |
2156 | // Cut .1 cm on DCAxy and fill a histogram | |
2157 | if(goodDCA(track)){ | |
2158 | // Add to the femto event | |
2159 | fFemtoBuffer->GetEvt(0)->AddAPro(track); | |
2160 | } | |
2161 | } | |
2162 | } | |
2163 | } // End of void ProcessTPC | |
2164 | //________________________________________________________________________ | |
2165 | void AliAnalysisTaskProtonLambda::ProcessHybrid(AliAODTrack *track){ | |
2166 | ||
2167 | // Intermediate momentum: use dEdx for a pre-selection | |
2168 | // and do the pid with tof | |
2169 | ||
2170 | // Boolean for extra! tpc pid cuts | |
2171 | Bool_t acceptTPC = kTRUE; | |
2172 | ||
2173 | // Require the TPCpid bit | |
2174 | if (!((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTPCpid)) | |
2175 | acceptTPC = kFALSE; | |
2176 | ||
2177 | // Pre-selection cut with TPC, don't return immediately to be able | |
2178 | // to visualize the effect | |
2179 | if (acceptTPC){ | |
2180 | // Do a mild dEdx cut | |
2181 | if ((fGTI[-track->GetID()-1])->GetTPCsignal() < | |
2182 | fTpcResponse->GetExpectedSignal((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
2183 | AliPID::kElectron)) | |
2184 | acceptTPC = kFALSE; | |
2185 | } | |
2186 | ||
2187 | // Ask for TOF pid flag and fill | |
2188 | if (!((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid)) | |
2189 | return; | |
2190 | ||
2191 | // The corrected TOF signal | |
2192 | Double_t corrTOFsig = GetCorrectedTOFSignal(track); | |
2193 | ||
2194 | // Distinguish between charges | |
2195 | if (track->Charge() > 0) { | |
2196 | // Fill the tof signal w/o dedx pre-selection | |
2197 | fPriHistHybridTOFsigPosWoTPC->Fill(corrTOFsig); | |
2198 | // Do the pre-selection | |
2199 | if (acceptTPC){ | |
2200 | fPriHistHybridTOFsigPosTPCok->Fill(corrTOFsig); | |
2201 | ||
2202 | // Do the tof cut | |
2203 | // Sept '12: also include an upper cut | |
2204 | if ( (corrTOFsig > -1000.0) && (corrTOFsig < 1250.) ){ | |
2205 | // Create additional TPC only constrained to pri. vtx track parameters | |
2206 | // constrainTrack(track); | |
2207 | // Cut .1 cm on DCAxy and fill a histogram | |
2208 | if(goodDCA(track)){ | |
2209 | // Add to the femto event | |
2210 | fFemtoBuffer->GetEvt(0)->AddPro(track); | |
2211 | } | |
2212 | } | |
2213 | } | |
2214 | } | |
2215 | else { | |
2216 | // Fill the tof signal w/o dedx pre-selection | |
2217 | fPriHistHybridTOFsigNegWoTPC->Fill(corrTOFsig); | |
2218 | // Do the pre-selection | |
2219 | if (acceptTPC){ | |
2220 | fPriHistHybridTOFsigNegTPCok->Fill(corrTOFsig); | |
2221 | ||
2222 | // Do the tof cut | |
2223 | // Sept '12: also include an upper cut | |
2224 | if ( (corrTOFsig > -1000.0) && (corrTOFsig < 1250.) ){ | |
2225 | // Create additional TPC only constrained to pri. vtx track parameters | |
2226 | // constrainTrack(track); | |
2227 | // Cut .1 cm on DCAxy and fill a histogram | |
2228 | if(goodDCA(track)){ | |
2229 | // add to the femto event | |
2230 | fFemtoBuffer->GetEvt(0)->AddAPro(track); | |
2231 | } | |
2232 | } | |
2233 | } | |
2234 | } | |
2235 | } // End of ProcessHybrid | |
2236 | //________________________________________________________________________ | |
2237 | void AliAnalysisTaskProtonLambda::CleaningProcedure() { | |
2238 | // fFemtoBuffer->GetEvt(0) pointer must be set | |
2239 | // Checks that no tracks are shared between Lam & Lam, Lam & Pro, ALam & ALam, ALam & APro | |
2240 | ||
2241 | // printf ("Cleaning procedure. Lam: %d, ALam: %d, Pro: %d, APro:%d\n" | |
2242 | // ,fFemtoBuffer->GetEvt(0)->GetNLam(),fFemtoBuffer->GetEvt(0)->GetNALam(),fFemtoBuffer->GetEvt(0)->GetNPro(),fFemtoBuffer->GetEvt(0)->GetNAPro()); | |
2243 | ||
2244 | // | |
2245 | // Check for lambdas.. | |
2246 | // | |
2247 | for (Int_t i=0;i<fFemtoBuffer->GetEvt(0)->GetNLam();i++) { | |
2248 | if (!fFemtoBuffer->GetEvt(0)->fLamTracks[i].UseIt()) | |
2249 | continue; | |
2250 | // Unique track id's for first V0 | |
2251 | Int_t posId1 = fFemtoBuffer->GetEvt(0)->fLamTracks[i].fPosDaughter.fID; | |
2252 | Int_t negId1 = fFemtoBuffer->GetEvt(0)->fLamTracks[i].fNegDaughter.fID; | |
2253 | ||
2254 | // .. & lambdas | |
2255 | for (Int_t j=i+1;j<fFemtoBuffer->GetEvt(0)->GetNLam();j++){ | |
2256 | if (!fFemtoBuffer->GetEvt(0)->fLamTracks[j].UseIt()) | |
2257 | continue; | |
2258 | // Unique track id's for second V0 | |
2259 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fLamTracks[j].fPosDaughter.fID; | |
2260 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fLamTracks[j].fPosDaughter.fID; | |
2261 | ||
2262 | // If V0s share a track remove one | |
2263 | if (posId1 == posId2 || negId1 == negId2){ | |
2264 | ||
2265 | // printf ("shared track lamlam! posId1: %d, posId2: %d, negId1: %d, negId2: %d\n", | |
2266 | // posId1, posId2, negId1, negId2); | |
2267 | ||
2268 | // Use a criterion to select best V0 | |
2269 | if (fFemtoBuffer->GetEvt(0)->fLamTracks[i].fCosPoint > fFemtoBuffer->GetEvt(0)->fLamTracks[j].fCosPoint){ | |
2270 | fFemtoBuffer->GetEvt(0)->fLamTracks[j].SetBadFlag(); | |
2271 | } | |
2272 | else{ | |
2273 | fFemtoBuffer->GetEvt(0)->fLamTracks[i].SetBadFlag(); | |
2274 | } | |
2275 | } | |
2276 | ||
2277 | } // Scnd V0 loop | |
2278 | ||
2279 | if (!fFemtoBuffer->GetEvt(0)->fLamTracks[i].UseIt()) | |
2280 | continue; | |
2281 | ||
2282 | // .. & protons | |
2283 | for (Int_t j=0;j<fFemtoBuffer->GetEvt(0)->GetNPro();j++){ | |
2284 | if (!fFemtoBuffer->GetEvt(0)->fProTracks[j].UseIt()) | |
2285 | continue; | |
2286 | // Unique track id's for second V0 | |
2287 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fProTracks[j].fID; | |
2288 | ||
2289 | // If V0 and proton share a track | |
2290 | if (posId1 == posId2){ | |
2291 | // printf ("shared track lam p! id:%d\n",posId1); | |
2292 | ||
2293 | // Remove the proton | |
2294 | fFemtoBuffer->GetEvt(0)->fProTracks[j].SetBadFlag(); | |
2295 | } | |
2296 | ||
2297 | } // Proton loop | |
2298 | ||
2299 | } // First V0 loop | |
2300 | ||
2301 | // | |
2302 | // Check for anti-lambdas.. | |
2303 | // | |
2304 | for (Int_t i=0;i<fFemtoBuffer->GetEvt(0)->GetNALam();i++){ | |
2305 | if (!fFemtoBuffer->GetEvt(0)->fALamTracks[i].UseIt()) | |
2306 | continue; | |
2307 | // Unique track id's for first V0 | |
2308 | Int_t posId1 = fFemtoBuffer->GetEvt(0)->fALamTracks[i].fPosDaughter.fID; | |
2309 | Int_t negId1 = fFemtoBuffer->GetEvt(0)->fALamTracks[i].fNegDaughter.fID; | |
2310 | ||
2311 | // .. & anti-lambdas | |
2312 | for (Int_t j=i+1;j<fFemtoBuffer->GetEvt(0)->GetNALam();j++){ | |
2313 | if (!fFemtoBuffer->GetEvt(0)->fALamTracks[j].UseIt()) | |
2314 | continue; | |
2315 | // Unique track id's for second V0 | |
2316 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fALamTracks[j].fPosDaughter.fID; | |
2317 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fALamTracks[j].fNegDaughter.fID; | |
2318 | ||
2319 | // If V0s share a track remove one | |
2320 | if (posId1 == posId2 || negId1 == negId2){ | |
2321 | ||
2322 | // printf ("shared track ALamALam! posId1: %d, posId2: %d, negId1: %d, negId2: %d\n", | |
2323 | // posId1, posId2, negId1, negId2); | |
2324 | ||
2325 | // Use a criterion to select best V0 | |
2326 | if (fFemtoBuffer->GetEvt(0)->fALamTracks[i].fCosPoint > fFemtoBuffer->GetEvt(0)->fALamTracks[j].fCosPoint){ | |
2327 | fFemtoBuffer->GetEvt(0)->fALamTracks[j].SetBadFlag(); | |
2328 | } | |
2329 | else{ | |
2330 | fFemtoBuffer->GetEvt(0)->fALamTracks[i].SetBadFlag(); | |
2331 | } | |
2332 | } | |
2333 | ||
2334 | } // Scnd anti-V0 loop | |
2335 | ||
2336 | if (!fFemtoBuffer->GetEvt(0)->fALamTracks[i].UseIt()) | |
2337 | continue; | |
2338 | ||
2339 | // .. & anti-protons | |
2340 | for (Int_t j=0;j<fFemtoBuffer->GetEvt(0)->GetNAPro();j++){ | |
2341 | if (!fFemtoBuffer->GetEvt(0)->fAProTracks[j].UseIt()) | |
2342 | continue; | |
2343 | // Unique track id's for second V0 | |
2344 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fAProTracks[j].fID; | |
2345 | ||
2346 | // If V0 and proton share a track | |
2347 | if (negId1 == negId2){ | |
2348 | // printf ("shared track alam ap! id:%d\n",posId1); | |
2349 | ||
2350 | // Remove the proton | |
2351 | fFemtoBuffer->GetEvt(0)->fAProTracks[j].SetBadFlag(); | |
2352 | } | |
2353 | ||
2354 | } // Anti-proton loop | |
2355 | ||
2356 | } // First anti-V0 loop | |
2357 | ||
2358 | // | |
2359 | // Do the same with the side band background. | |
2360 | // Discard background when sharing track with primary proton. | |
2361 | // | |
2362 | ||
2363 | for (Int_t i=0;i<fFemtoBuffer->GetEvt(0)->GetNBgLam();i++){ | |
2364 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].UseIt()) | |
2365 | continue; | |
2366 | // Unique track id's for first V0 | |
2367 | Int_t posId1 = fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].fPosDaughter.fID; | |
2368 | Int_t negId1 = fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].fNegDaughter.fID; | |
2369 | ||
2370 | // .. & lambdas | |
2371 | for (Int_t j=i+1;j<fFemtoBuffer->GetEvt(0)->GetNBgLam();j++){ | |
2372 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[j].UseIt()) | |
2373 | continue; | |
2374 | // Unique track id's for second V0 | |
2375 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fBgLamTracks[j].fPosDaughter.fID; | |
2376 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fBgLamTracks[j].fNegDaughter.fID; | |
2377 | ||
2378 | // If V0s share a track remove one | |
2379 | if (posId1 == posId2 || negId1 == negId2){ | |
2380 | ||
2381 | // printf ("shared track bglambglam! posId1: %d, posId2: %d, negId1: %d, negId2: %d\n", | |
2382 | // posId1, posId2, negId1, negId2); | |
2383 | ||
2384 | // Use a criterion to select best V0 | |
2385 | if (fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].fCosPoint > fFemtoBuffer->GetEvt(0)->fBgLamTracks[j].fCosPoint){ | |
2386 | fFemtoBuffer->GetEvt(0)->fBgLamTracks[j].SetBadFlag(); | |
2387 | } | |
2388 | else{ | |
2389 | fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].SetBadFlag(); | |
2390 | } | |
2391 | } | |
2392 | ||
2393 | } // Scnd V0 loop | |
2394 | ||
2395 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].UseIt()) | |
2396 | continue; | |
2397 | ||
2398 | // .. & protons | |
2399 | for (Int_t j=0;j<fFemtoBuffer->GetEvt(0)->GetNPro();j++) { | |
2400 | if (!fFemtoBuffer->GetEvt(0)->fProTracks[j].UseIt()) | |
2401 | continue; | |
2402 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].UseIt()) | |
2403 | continue; | |
2404 | ||
2405 | // Unique track id's for second V0 | |
2406 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fProTracks[j].fID; | |
2407 | ||
2408 | // If V0 and proton share a track | |
2409 | if (posId1 == posId2){ | |
2410 | // printf ("shared track bglam p! id:%d\n",posId1); | |
2411 | // Remove the background lambda | |
2412 | fFemtoBuffer->GetEvt(0)->fBgLamTracks[i].SetBadFlag(); | |
2413 | } | |
2414 | ||
2415 | } // Proton loop | |
2416 | ||
2417 | } // First V0 loop | |
2418 | ||
2419 | // | |
2420 | // Check for anti-lambdas.. | |
2421 | // | |
2422 | for (Int_t i=0;i<fFemtoBuffer->GetEvt(0)->GetNBgALam();i++){ | |
2423 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].UseIt()) | |
2424 | continue; | |
2425 | // Unique track id's for first V0 | |
2426 | Int_t posId1 = fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].fPosDaughter.fID; | |
2427 | Int_t negId1 = fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].fNegDaughter.fID; | |
2428 | ||
2429 | // .. & anti-lambdas | |
2430 | for (Int_t j=i+1;j<fFemtoBuffer->GetEvt(0)->GetNBgALam();j++){ | |
2431 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[j].UseIt()) | |
2432 | continue; | |
2433 | // Unique track id's for second V0 | |
2434 | Int_t posId2 = fFemtoBuffer->GetEvt(0)->fBgALamTracks[j].fPosDaughter.fID; | |
2435 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fBgALamTracks[j].fNegDaughter.fID; | |
2436 | ||
2437 | // If V0s share a track remove one | |
2438 | if (posId1 == posId2 || negId1 == negId2){ | |
2439 | ||
2440 | // printf ("shared track BgALamBgALam! posId1: %d, posId2: %d, negId1: %d, negId2: %d\n", | |
2441 | // posId1, posId2, negId1, negId2); | |
2442 | ||
2443 | // Use a criterion to select best V0 | |
2444 | if (fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].fCosPoint > fFemtoBuffer->GetEvt(0)->fBgALamTracks[j].fCosPoint){ | |
2445 | fFemtoBuffer->GetEvt(0)->fBgALamTracks[j].SetBadFlag(); | |
2446 | } | |
2447 | else{ | |
2448 | fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].SetBadFlag(); | |
2449 | } | |
2450 | } | |
2451 | ||
2452 | } // Scnd anti-V0 loop | |
2453 | ||
2454 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].UseIt()) | |
2455 | continue; | |
2456 | ||
2457 | // .. & anti-protons | |
2458 | for (Int_t j=0;j<fFemtoBuffer->GetEvt(0)->GetNAPro();j++){ | |
2459 | if (!fFemtoBuffer->GetEvt(0)->fAProTracks[j].UseIt()) | |
2460 | continue; | |
2461 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].UseIt()) | |
2462 | continue; | |
2463 | ||
2464 | // Unique track id's for second V0 | |
2465 | Int_t negId2 = fFemtoBuffer->GetEvt(0)->fAProTracks[j].fID; | |
2466 | ||
2467 | // If V0 and proton share a track | |
2468 | if (negId1 == negId2){ | |
2469 | // printf ("shared track bgalam ap! id:%d\n",posId1); | |
2470 | // Remove the background anti-lambda | |
2471 | fFemtoBuffer->GetEvt(0)->fBgALamTracks[i].SetBadFlag(); | |
2472 | } | |
2473 | ||
2474 | } // Anti-proton loop | |
2475 | ||
2476 | } // First anti-V0 loop | |
2477 | ||
2478 | ||
2479 | } | |
2480 | //________________________________________________________________________ | |
2481 | void AliAnalysisTaskProtonLambda::ProcessReal() { | |
2482 | // Process real events | |
2483 | ||
2484 | // // Count the number of pairs before TTR cut | |
2485 | // Int_t nLamLamPairsWoTTR = 0,nLamProPairsWoTTR=0,nALamALamPairsWoTTR=0,nALamAProPairsWoTTR=0; | |
2486 | // // and with TTR cut | |
2487 | // Int_t nLamLamPairs = 0,nLamProPairs=0,nALamALamPairs=0,nALamAProPairs=0; | |
2488 | ||
2489 | // Declare numbers to speed up the code | |
2490 | Int_t iLam,//iLam2, | |
2491 | iRadius,iPro,iALam, | |
2492 | //iALam2, | |
2493 | iAPro,nMeasPro, | |
2494 | //nMeasPio, | |
2495 | nMeasAPro; | |
2496 | // Int_t nMeasProIroc,nMeasPioIroc,nMeasAProIroc,nMeasProOroc,nMeasPioOroc,nMeasAProOroc; | |
2497 | // Float_t distPro,distPio,minDistPro,meanDistPro,minDistPio,meanDistPio, | |
2498 | // distAPro,minDistAPro,meanDistAPro; | |
2499 | Float_t distSftPro,//distSftPio, | |
2500 | minDistSftPro,meanDistSftPro,//minDistSftPio,meanDistSftPio, | |
2501 | distSftAPro,minDistSftAPro,meanDistSftAPro; | |
2502 | // Float_t minDistSftIrocPro,meanDistSftIrocPro,minDistSftIrocPio,meanDistSftIrocPio, | |
2503 | // minDistSftIrocAPro,meanDistSftIrocAPro; | |
2504 | // Float_t minDistSftOrocPro,meanDistSftOrocPro,minDistSftOrocPio,meanDistSftOrocPio, | |
2505 | // minDistSftOrocAPro,meanDistSftOrocAPro; | |
2506 | ||
2507 | // printf("Real event, NLam: %d, NPro %d, NALam %d, NAPro %d\n", | |
2508 | // fFemtoBuffer->GetEvt(0)->GetNLam(), | |
2509 | // fFemtoBuffer->GetEvt(0)->GetNPro(), | |
2510 | // fFemtoBuffer->GetEvt(0)->GetNALam(), | |
2511 | // fFemtoBuffer->GetEvt(0)->GetNAPro() | |
2512 | // ); | |
2513 | // Lambda loop | |
2514 | for (iLam = 0; iLam < fFemtoBuffer->GetEvt(0)->GetNLam(); iLam++){ | |
2515 | ||
2516 | // Skip if unUseIt() entry | |
2517 | if (!fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].UseIt()) | |
2518 | continue; | |
2519 | ||
2520 | // // Second lambda loop | |
2521 | // for (iLam2 = iLam+1; iLam2 < fFemtoBuffer->GetEvt(0)->GetNLam(); iLam2++){ | |
2522 | ||
2523 | // // Skip if unUseIt() entry | |
2524 | // if (!fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2].UseIt()) | |
2525 | // continue; | |
2526 | ||
2527 | // // Count the number of lam-lam pairs | |
2528 | // nLamLamPairsWoTTR++; | |
2529 | ||
2530 | // // Reset the distances for each pair | |
2531 | // minDistPro=999.0;meanDistPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
2532 | // minDistSftPro=999.0;meanDistSftPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
2533 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
2534 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
2535 | // // Reset the number of measurements for the mean | |
2536 | // nMeasPro=0;nMeasPio=0;nMeasProIroc=0;nMeasPioIroc=0; | |
2537 | // nMeasProOroc=0;nMeasPioOroc=0; | |
2538 | ||
2539 | // // Check for two-track resolution | |
2540 | // for (iRadius=0;iRadius<9;iRadius++){ | |
2541 | // // Get the spatial distance at each radius | |
2542 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2].fPosDaughter.fXglobal[iRadius]); | |
2543 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2].fNegDaughter.fXglobal[iRadius]); | |
2544 | // // Shifted distances | |
2545 | // distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2546 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2547 | ||
2548 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
2549 | // if (distPro > -1.0) { | |
2550 | // // Minimum distance | |
2551 | // if (distPro < minDistPro) | |
2552 | // minDistPro = distPro; | |
2553 | // if (distSftPro < minDistSftPro) | |
2554 | // minDistSftPro = distSftPro; | |
2555 | // // Mean distance | |
2556 | // meanDistPro+=distPro; | |
2557 | // meanDistSftPro+=distSftPro; | |
2558 | // nMeasPro++; | |
2559 | ||
2560 | // // IROC | |
2561 | // if (iRadius<3){ | |
2562 | // if (distSftPro < minDistSftIrocPro) | |
2563 | // minDistSftIrocPro = distSftPro; | |
2564 | // meanDistSftIrocPro+=distSftPro; | |
2565 | // nMeasProIroc++; | |
2566 | // } | |
2567 | // // OROC | |
2568 | // else { | |
2569 | // if (distSftPro < minDistSftOrocPro) | |
2570 | // minDistSftOrocPro = distSftPro; | |
2571 | // meanDistSftOrocPro+=distSftPro; | |
2572 | // nMeasProOroc++; | |
2573 | // } | |
2574 | // } | |
2575 | // if (distPio > -1.0){ | |
2576 | // // Minimum distance | |
2577 | // if (distPio < minDistPio) | |
2578 | // minDistPio = distPio; | |
2579 | // if (distSftPio < minDistSftPio) | |
2580 | // minDistSftPio = distSftPio; | |
2581 | // // Mean distance | |
2582 | // meanDistPio+=distPio; | |
2583 | // meanDistSftPio+=distSftPio; | |
2584 | // nMeasPio++; | |
2585 | ||
2586 | // // IROC | |
2587 | // if (iRadius<3){ | |
2588 | // if (distSftPio < minDistSftIrocPio) | |
2589 | // minDistSftIrocPio = distSftPio; | |
2590 | // meanDistSftIrocPio+=distSftPio; | |
2591 | // nMeasPioIroc++; | |
2592 | // } | |
2593 | // // OROC | |
2594 | // else { | |
2595 | // if (distSftPio < minDistSftOrocPio) | |
2596 | // minDistSftOrocPio = distSftPio; | |
2597 | // meanDistSftOrocPio+=distSftPio; | |
2598 | // nMeasPioOroc++; | |
2599 | // } | |
2600 | ||
2601 | // } | |
2602 | ||
2603 | // } // Loop over iRadius | |
2604 | ||
2605 | // // Require at least one measurement | |
2606 | // if ( (!nMeasPio) || (!nMeasPro) ) | |
2607 | // continue; | |
2608 | ||
2609 | // // Divide by the number of measurements to get the mean | |
2610 | // meanDistPro /= (Float_t)nMeasPro; | |
2611 | // meanDistPio /= (Float_t)nMeasPio; | |
2612 | // meanDistSftPro /= (Float_t)nMeasPro; | |
2613 | // meanDistSftPio /= (Float_t)nMeasPio; | |
2614 | ||
2615 | // // Fill the two track resolution histograms | |
2616 | // f2HistLamLamMeanMinDistProReal->Fill(meanDistPro,minDistPro); | |
2617 | // f2HistLamLamMeanMinDistPioReal->Fill(meanDistPio,minDistPio); | |
2618 | ||
2619 | // f2HistSftLamLamMeanMinDistProReal->Fill(meanDistSftPro,minDistSftPro); | |
2620 | // f2HistSftLamLamMeanMinDistPioReal->Fill(meanDistSftPio,minDistSftPio); | |
2621 | ||
2622 | // // Fill IROC / OROC histograms only with at least one measurement | |
2623 | // if (nMeasProIroc){ | |
2624 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
2625 | // f2HistSftIrocLamLamMeanMinDistProReal->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
2626 | // } | |
2627 | // if (nMeasPioIroc){ | |
2628 | // meanDistSftIrocPio /= (Float_t)nMeasPioIroc; | |
2629 | // f2HistSftIrocLamLamMeanMinDistPioReal->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
2630 | // } | |
2631 | // if (nMeasProOroc){ | |
2632 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
2633 | // f2HistSftOrocLamLamMeanMinDistProReal->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
2634 | // } | |
2635 | // if (nMeasPioOroc){ | |
2636 | // meanDistSftOrocPio /= (Float_t)nMeasPioOroc; | |
2637 | // f2HistSftOrocLamLamMeanMinDistPioReal->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
2638 | // } | |
2639 | ||
2640 | // // Do a cut (value needs to be refined) | |
2641 | // // if ( meanDistSftPro < 2.0 || meanDistSftPio < 2.0 ) | |
2642 | // // continue; | |
2643 | ||
2644 | // // Count the number of pairs | |
2645 | // nLamLamPairs++; | |
2646 | ||
2647 | // // Mt of the pair | |
2648 | // f2HistMtLamLamReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2649 | // fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2])); | |
2650 | ||
2651 | // // Fill the qinv, minv histogram | |
2652 | // f3HistLamLamQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2]),minDistSftPro,minDistSftPio); | |
2653 | // f3HistLamLamMinvReal->Fill(Minv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2]),minDistSftPro,minDistSftPio); | |
2654 | ||
2655 | // // Mt of the pair fr low q pairs only | |
2656 | // if(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2657 | // fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2]) < .2) | |
2658 | // f2HistMtLowQLamLamReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2659 | // fFemtoBuffer->GetEvt(0)->fLamTracks[iLam2])); | |
2660 | ||
2661 | // } // Second lambda loop | |
2662 | ||
2663 | // Proton loop | |
2664 | for (iPro=0;iPro<fFemtoBuffer->GetEvt(0)->GetNPro();iPro++){ | |
2665 | ||
2666 | // Skip if unUseIt() entry | |
2667 | if (!fFemtoBuffer->GetEvt(0)->fProTracks[iPro].UseIt()) | |
2668 | continue; | |
2669 | ||
2670 | // printf("."); | |
2671 | // nLamProPairsWoTTR++; | |
2672 | ||
2673 | // Reset the distances for each pair | |
2674 | // minDistPro=999.0;meanDistPro=0.0; | |
2675 | minDistSftPro=999.0;meanDistSftPro=0.0; | |
2676 | //minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0;minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0; | |
2677 | // Reset the number of measurements for the mean | |
2678 | nMeasPro=0;//nMeasProIroc=0;nMeasProOroc=0; | |
2679 | ||
2680 | // Check for two-track resolution | |
2681 | for (iRadius=0;iRadius<9;iRadius++){ | |
2682 | // Get the spatial distance at each radius | |
2683 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fProTracks[iPro].fXglobal[iRadius]); | |
2684 | distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fProTracks[iPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2685 | ||
2686 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
2687 | if (distSftPro > -1.0){ | |
2688 | // Minimum distance | |
2689 | // if (distPro < minDistPro) | |
2690 | // minDistPro = distPro; | |
2691 | if (distSftPro < minDistSftPro) | |
2692 | minDistSftPro = distSftPro; | |
2693 | // Mean distance | |
2694 | // meanDistPro+=distPro; | |
2695 | meanDistSftPro+=distSftPro; | |
2696 | nMeasPro++; | |
2697 | ||
2698 | // // IROC | |
2699 | // if (iRadius<3){ | |
2700 | // if (distSftPro < minDistSftIrocPro) | |
2701 | // minDistSftIrocPro = distSftPro; | |
2702 | // meanDistSftIrocPro+=distSftPro; | |
2703 | // nMeasProIroc++; | |
2704 | // } | |
2705 | // // OROC | |
2706 | // else { | |
2707 | // if (distSftPro < minDistSftOrocPro) | |
2708 | // minDistSftOrocPro = distSftPro; | |
2709 | // meanDistSftOrocPro+=distSftPro; | |
2710 | // nMeasProOroc++; | |
2711 | // } | |
2712 | ||
2713 | ||
2714 | } | |
2715 | } // Loop over iRadius | |
2716 | ||
2717 | // Require at least one measurement | |
2718 | if ( !nMeasPro ) | |
2719 | continue; | |
2720 | ||
2721 | // Divide by the number of measurements to get the mean | |
2722 | // meanDistPro /= (Float_t)nMeasPro; | |
2723 | meanDistSftPro /= (Float_t)nMeasPro; | |
2724 | ||
2725 | // Fill the two track resolution histogram | |
2726 | // f2HistLamProMeanMinDistProReal->Fill(meanDistPro,minDistPro); | |
2727 | // f2HistSftLamProMeanMinDistProReal->Fill(meanDistSftPro,minDistSftPro); | |
2728 | ||
2729 | // // Fill IROC / OROC histograms only with at least one measurement | |
2730 | // if (nMeasProIroc){ | |
2731 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
2732 | // f2HistSftIrocLamProMeanMinDistProReal->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
2733 | // } | |
2734 | // if (nMeasProOroc){ | |
2735 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
2736 | // f2HistSftOrocLamProMeanMinDistProReal->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
2737 | // } | |
2738 | ||
2739 | // Do a cut (value needs to be refined) | |
2740 | // if ( meanDistSftPro < 2.0 ) | |
2741 | // continue; | |
2742 | ||
2743 | // Look at possible residual correlations of the daughters | |
2744 | // vs mean dist of protons | |
2745 | // f2HistLamPosDProQinvReal->Fill(QinvProPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter, fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro); | |
2746 | // f2HistLamNegDProQinvReal->Fill(QinvPioPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter, fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro); | |
2747 | ||
2748 | ||
2749 | // Count the number of pairs | |
2750 | // nLamProPairs++; | |
2751 | ||
2752 | // Mt of the pair | |
2753 | f2HistMtLamProReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2754 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro])); | |
2755 | ||
2756 | // THnSparse with qinvpropro, mean dist propro, min dist propro, qinv lampro | |
2757 | Double_t x[4]={ | |
2758 | QinvProPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter, | |
2759 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro]), | |
2760 | meanDistSftPro, | |
2761 | minDistSftPro, | |
2762 | Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2763 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro]) | |
2764 | }; | |
2765 | LamProReal->Fill(x); | |
2766 | ||
2767 | // Fill the qinv histogram, using TPC only momentum for primary protons | |
2768 | // f3HistLamProQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro,minDistSftPro); // Using THnSparse since sept '12 | |
2769 | // f3HistLamProMinvReal->Fill(Minv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
2770 | // and using TPC only plus primary vertex constraint momentum for primary protons | |
2771 | // f3HistLamProQinvConstrReal->Fill(QinvConstr(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
2772 | ||
2773 | // Mt of the pair for low q pairs only | |
2774 | if(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2775 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro]) < .2) | |
2776 | f2HistMtLowQLamProReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
2777 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro])); | |
2778 | ||
2779 | }// Proton loop | |
2780 | ||
2781 | }// Lambda loop | |
2782 | ||
2783 | ||
2784 | ||
2785 | // Anti-lambda loop | |
2786 | for (iALam = 0; iALam < fFemtoBuffer->GetEvt(0)->GetNALam(); iALam++){ | |
2787 | ||
2788 | // Skip if unUseIt() entry | |
2789 | if (!fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].UseIt()) | |
2790 | continue; | |
2791 | ||
2792 | // // Second anti-lambda loop | |
2793 | // for (iALam2 = iALam+1; iALam2 < fFemtoBuffer->GetEvt(0)->GetNALam(); iALam2++){ | |
2794 | ||
2795 | // // Skip if unUseIt() entry | |
2796 | // if (!fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2].UseIt()) | |
2797 | // continue; | |
2798 | ||
2799 | // // Count the number of antilam-antilam pairs | |
2800 | // nALamALamPairsWoTTR++; | |
2801 | ||
2802 | // // Reset the distances for each pair | |
2803 | // minDistAPro=999.0;meanDistAPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
2804 | // minDistSftAPro=999.0;meanDistSftAPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
2805 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
2806 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
2807 | // // Reset the number of measurements for the mean | |
2808 | // nMeasAPro=0;nMeasPio=0;nMeasAProIroc=0;nMeasPioIroc=0;nMeasAProOroc=0;nMeasPioOroc=0; | |
2809 | ||
2810 | // // Check for two-track resolution | |
2811 | // for (iRadius=0;iRadius<9;iRadius++){ | |
2812 | // // Get the spatial distance at each radius | |
2813 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2].fPosDaughter.fXglobal[iRadius]); | |
2814 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2].fNegDaughter.fXglobal[iRadius]); | |
2815 | // // Shifted distances | |
2816 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2817 | // distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2818 | ||
2819 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
2820 | // if (distAPro > -1.0){ | |
2821 | // // Minimum distance | |
2822 | // if (distAPro < minDistAPro) | |
2823 | // minDistAPro = distAPro; | |
2824 | // if (distSftAPro < minDistSftAPro) | |
2825 | // minDistSftAPro = distSftAPro; | |
2826 | // // Mean distance | |
2827 | // meanDistAPro+=distAPro; | |
2828 | // meanDistSftAPro+=distSftAPro; | |
2829 | // nMeasAPro++; | |
2830 | ||
2831 | // // IROC | |
2832 | // if (iRadius<3){ | |
2833 | // if (distSftAPro < minDistSftIrocAPro) | |
2834 | // minDistSftIrocAPro = distSftAPro; | |
2835 | // meanDistSftIrocAPro+=distSftAPro; | |
2836 | // nMeasAProIroc++; | |
2837 | // } | |
2838 | // // OROC | |
2839 | // else { | |
2840 | // if (distSftAPro < minDistSftOrocAPro) | |
2841 | // minDistSftOrocAPro = distSftAPro; | |
2842 | // meanDistSftOrocAPro+=distSftAPro; | |
2843 | // nMeasAProOroc++; | |
2844 | // } | |
2845 | ||
2846 | // } | |
2847 | // if (distPio > -1.0){ | |
2848 | // // Minimum distance | |
2849 | // if (distPio < minDistPio) | |
2850 | // minDistPio = distPio; | |
2851 | // if (distSftPio < minDistSftPio) | |
2852 | // minDistSftPio = distSftPio; | |
2853 | // // Mean distance | |
2854 | // meanDistPio+=distPio; | |
2855 | // meanDistSftPio+=distSftPio; | |
2856 | // nMeasPio++; | |
2857 | ||
2858 | // // IROC | |
2859 | // if (iRadius<3){ | |
2860 | // if (distSftPio < minDistSftIrocPio) | |
2861 | // minDistSftIrocPio = distSftPio; | |
2862 | // meanDistSftIrocPio+=distSftPio; | |
2863 | // nMeasPioIroc++; | |
2864 | // } | |
2865 | // // OROC | |
2866 | // else { | |
2867 | // if (distSftPio < minDistSftOrocPio) | |
2868 | // minDistSftOrocPio = distSftPio; | |
2869 | // meanDistSftOrocPio+=distSftPio; | |
2870 | // nMeasPioOroc++; | |
2871 | // } | |
2872 | // } | |
2873 | // } // Loop over iRadius | |
2874 | ||
2875 | // // Require at least one measurement | |
2876 | // if ( (!nMeasPio) || (!nMeasAPro) ) | |
2877 | // continue; | |
2878 | ||
2879 | // // Divide by the number of measurements to get the mean | |
2880 | // meanDistAPro /= (Float_t)nMeasAPro; | |
2881 | // meanDistPio /= (Float_t)nMeasPio; | |
2882 | // meanDistSftAPro /= (Float_t)nMeasAPro; | |
2883 | // meanDistSftPio /= (Float_t)nMeasPio; | |
2884 | ||
2885 | // // Fill the two track resolution histograms | |
2886 | // f2HistALamALamMeanMinDistAProReal->Fill(meanDistAPro,minDistAPro); | |
2887 | // f2HistALamALamMeanMinDistPioReal->Fill(meanDistPio,minDistPio); | |
2888 | ||
2889 | // f2HistSftALamALamMeanMinDistAProReal->Fill(meanDistSftAPro,minDistSftAPro); | |
2890 | // f2HistSftALamALamMeanMinDistPioReal->Fill(meanDistSftPio,minDistSftPio); | |
2891 | ||
2892 | // // Fill IROC / OROC histograms only with at least one measurement | |
2893 | // if (nMeasAProIroc){ | |
2894 | // meanDistSftAPro /= (Float_t)nMeasAProIroc; | |
2895 | // f2HistSftIrocALamALamMeanMinDistAProReal->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
2896 | // } | |
2897 | // if (nMeasPioIroc){ | |
2898 | // meanDistSftPio /= (Float_t)nMeasPioIroc; | |
2899 | // f2HistSftIrocALamALamMeanMinDistPioReal->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
2900 | // } | |
2901 | // if (nMeasAProOroc){ | |
2902 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
2903 | // f2HistSftOrocALamALamMeanMinDistAProReal->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
2904 | // } | |
2905 | // if (nMeasPioOroc){ | |
2906 | // meanDistSftPio /= (Float_t)nMeasPioOroc; | |
2907 | // f2HistSftOrocALamALamMeanMinDistPioReal->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
2908 | // } | |
2909 | ||
2910 | ||
2911 | // // // Do a cut (value needs to be refined) | |
2912 | // // if ( meanDistSftAPro < 2.0 || meanDistSftPio < 2.0 ) | |
2913 | // // continue; | |
2914 | ||
2915 | // // Count the number of pairs | |
2916 | // nALamALamPairs++; | |
2917 | ||
2918 | // // Mt of the pair | |
2919 | // f2HistMtALamALamReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
2920 | // fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2])); | |
2921 | ||
2922 | // // Fill the qinv, minv histogram | |
2923 | // f3HistALamALamQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2]),minDistSftAPro,minDistSftPio); | |
2924 | // f3HistALamALamMinvReal->Fill(Minv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2]),minDistSftAPro,minDistSftPio); | |
2925 | ||
2926 | // // Mt of the pair for low q pairs only | |
2927 | // if(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
2928 | // fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2]) < .2) | |
2929 | // f2HistMtLowQALamALamReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
2930 | // fFemtoBuffer->GetEvt(0)->fALamTracks[iALam2])); | |
2931 | ||
2932 | // } // Second lambda loop | |
2933 | ||
2934 | // AProton loop | |
2935 | for (iAPro=0;iAPro<fFemtoBuffer->GetEvt(0)->GetNAPro();iAPro++){ | |
2936 | ||
2937 | // Skip if unUseIt() entry | |
2938 | if (!fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].UseIt()) | |
2939 | continue; | |
2940 | ||
2941 | // nALamAProPairsWoTTR++; | |
2942 | ||
2943 | // Reset the distances for each pair | |
2944 | // minDistAPro=999.0;meanDistAPro=0.0; | |
2945 | minDistSftAPro=999.0;meanDistSftAPro=0.0; | |
2946 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0; | |
2947 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0; | |
2948 | // Reset the number of measurements for the mean | |
2949 | nMeasAPro=0;//nMeasAProIroc=0;nMeasAProOroc=0; | |
2950 | ||
2951 | // Check for two-track resolution | |
2952 | for (iRadius=0;iRadius<9;iRadius++){ | |
2953 | // Get the spatial distance at each radius | |
2954 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].fXglobal[iRadius]); | |
2955 | distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
2956 | ||
2957 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
2958 | if (distSftAPro > -1.0){ | |
2959 | // Minimum distance | |
2960 | // if (distAPro < minDistAPro) | |
2961 | // minDistAPro = distAPro; | |
2962 | if (distSftAPro < minDistSftAPro) | |
2963 | minDistSftAPro = distSftAPro; | |
2964 | // Mean distance | |
2965 | // meanDistAPro+=distAPro; | |
2966 | meanDistSftAPro+=distSftAPro; | |
2967 | nMeasAPro++; | |
2968 | ||
2969 | // // IROC | |
2970 | // if (iRadius<3){ | |
2971 | // if (distSftAPro < minDistSftIrocAPro) | |
2972 | // minDistSftIrocAPro = distSftAPro; | |
2973 | // meanDistSftIrocAPro+=distSftAPro; | |
2974 | // nMeasAProIroc++; | |
2975 | // } | |
2976 | // // OROC | |
2977 | // else { | |
2978 | // if (distSftAPro < minDistSftOrocAPro) | |
2979 | // minDistSftOrocAPro = distSftAPro; | |
2980 | // meanDistSftOrocAPro+=distSftAPro; | |
2981 | // nMeasAProOroc++; | |
2982 | // } | |
2983 | ||
2984 | } | |
2985 | } // Loop over iRadius | |
2986 | ||
2987 | // Require at least one measurement | |
2988 | if ( !nMeasAPro ) | |
2989 | continue; | |
2990 | ||
2991 | // Divide by the number of measurements to get the mean | |
2992 | // meanDistAPro /= (Float_t)nMeasAPro; | |
2993 | meanDistSftAPro /= (Float_t)nMeasAPro; | |
2994 | ||
2995 | // Fill the two track resolution histogram | |
2996 | // f2HistALamAProMeanMinDistAProReal->Fill(meanDistAPro,minDistAPro); | |
2997 | // f2HistSftALamAProMeanMinDistAProReal->Fill(meanDistSftAPro,minDistSftAPro); | |
2998 | ||
2999 | // // Fill IROC / OROC histograms only with at least one measurement | |
3000 | // if (nMeasAProIroc){ | |
3001 | // meanDistSftIrocAPro /= (Float_t)nMeasAProIroc; | |
3002 | // f2HistSftIrocALamAProMeanMinDistAProReal->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
3003 | // } | |
3004 | // if (nMeasAProOroc){ | |
3005 | // meanDistSftOrocAPro /= (Float_t)nMeasAProOroc; | |
3006 | // f2HistSftOrocALamAProMeanMinDistAProReal->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
3007 | // } | |
3008 | ||
3009 | // Look at possible residual correlations | |
3010 | // f2HistALamPosDAProQinvReal->Fill(QinvPioPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter, fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro); | |
3011 | // f2HistALamNegDAProQinvReal->Fill(QinvProPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter, fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro); | |
3012 | ||
3013 | ||
3014 | // // Do a cut (value needs to be refined) | |
3015 | // if ( meanDistSftAPro < 2.0 ) | |
3016 | // continue; | |
3017 | ||
3018 | // Count the number of pairs | |
3019 | // nALamAProPairs++; | |
3020 | ||
3021 | // Mt of the pair | |
3022 | f2HistMtALamAProReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
3023 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro])); | |
3024 | // Use THnSparse since sept '12 | |
3025 | Double_t x[4]={ | |
3026 | QinvProPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter, | |
3027 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]), | |
3028 | meanDistSftAPro, | |
3029 | minDistSftAPro, | |
3030 | Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
3031 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]) | |
3032 | }; | |
3033 | ALamAProReal->Fill(x); | |
3034 | ||
3035 | // Fill the qinv histogram using TPC only momentum for the primary protons | |
3036 | // f3HistALamAProQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); // Using THnSparse since Sept '12, see above | |
3037 | // f3HistALamAProMinvReal->Fill(Minv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
3038 | // and using TPC only plus primary vertex constraint momentum for primary protons | |
3039 | // f3HistALamAProQinvConstrReal->Fill(QinvConstr(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
3040 | ||
3041 | // Mt of the pair for low q pairs only | |
3042 | if(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
3043 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]) <.2) | |
3044 | f2HistMtLowQALamAProReal->Fill(mt(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
3045 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro])); | |
3046 | ||
3047 | }// AProton loop | |
3048 | ||
3049 | }// ALambda loop | |
3050 | ||
3051 | ||
3052 | // Print the number of found pairs in this event | |
3053 | // printf ("w/o TTR cut: LamLamPairs: %d, LamProPairs: %d, ALamALamPairs: %d, ALamAProPairs: %d\n", | |
3054 | // nLamLamPairsWoTTR,nLamProPairsWoTTR,nALamALamPairsWoTTR,nALamAProPairsWoTTR); | |
3055 | // printf ("with TTR cut: LamLamPairs: %d, LamProPairs: %d, ALamALamPairs: %d, ALamAProPairs: %d\n", | |
3056 | // nLamLamPairs,nLamProPairs,nALamALamPairs,nALamAProPairs); | |
3057 | ||
3058 | ||
3059 | } | |
3060 | ||
3061 | //________________________________________________________________________ | |
3062 | void AliAnalysisTaskProtonLambda::ProcessMixed() { | |
3063 | // Process mixed events | |
3064 | ||
3065 | // Declare numbers to speed up the code | |
3066 | Int_t iLam,//iLam2, | |
3067 | iRadius,iPro,iALam, | |
3068 | //iALam2, | |
3069 | iAPro,nMeasPro, | |
3070 | //nMeasPio, | |
3071 | nMeasAPro; | |
3072 | // Int_t nMeasProIroc,nMeasPioIroc,nMeasAProIroc,nMeasProOroc,nMeasPioOroc,nMeasAProOroc; | |
3073 | // Float_t distPro,distPio,minDistPro,meanDistPro,minDistPio,meanDistPio, | |
3074 | // distAPro,minDistAPro,meanDistAPro; | |
3075 | Float_t distSftPro, | |
3076 | //distSftPio, | |
3077 | minDistSftPro,meanDistSftPro,//minDistSftPio,meanDistSftPio, | |
3078 | distSftAPro,minDistSftAPro,meanDistSftAPro; | |
3079 | // Float_t minDistSftIrocPro,meanDistSftIrocPro,minDistSftIrocPio,meanDistSftIrocPio, | |
3080 | // minDistSftIrocAPro,meanDistSftIrocAPro; | |
3081 | // Float_t minDistSftOrocPro,meanDistSftOrocPro,minDistSftOrocPio,meanDistSftOrocPio, | |
3082 | // minDistSftOrocAPro,meanDistSftOrocAPro; | |
3083 | ||
3084 | // Loop over the event buffer | |
3085 | for (UChar_t iMix = 1;iMix<fFemtoBuffer->GetMixBuffSize();iMix++){ | |
3086 | // Lambda loop | |
3087 | for (iLam = 0; iLam < fFemtoBuffer->GetEvt(0)->GetNLam(); iLam++){ | |
3088 | ||
3089 | // Skip if unUseIt() entry | |
3090 | if (!fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].UseIt()) | |
3091 | continue; | |
3092 | ||
3093 | // // Second lambda loop | |
3094 | // for (iLam2 = 0; iLam2 < (fFemtoBuffer->GetEvt(iMix))->GetNLam(); iLam2++){ | |
3095 | ||
3096 | // // Skip if unUseIt() entry | |
3097 | // if (!(fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2].UseIt()) | |
3098 | // continue; | |
3099 | ||
3100 | // // Reset the distances for each pair | |
3101 | // minDistPro=999.0;meanDistPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
3102 | // minDistSftPro=999.0;meanDistSftPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
3103 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
3104 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
3105 | // // Reset the number of measurements for the mean | |
3106 | // nMeasPro=0;nMeasPio=0;nMeasProIroc=0;nMeasPioIroc=0;nMeasProOroc=0;nMeasPioOroc=0; | |
3107 | ||
3108 | // // Check for two-track resolution | |
3109 | // for (iRadius=0;iRadius<9;iRadius++){ | |
3110 | // // Get the spatial distance at each radius | |
3111 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2].fPosDaughter.fXglobal[iRadius]); | |
3112 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2].fNegDaughter.fXglobal[iRadius]); | |
3113 | // // Shifted distances | |
3114 | // distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3115 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3116 | ||
3117 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3118 | // if (distPro > -1.0){ | |
3119 | // // Minimum distance | |
3120 | // if (distPro < minDistPro) | |
3121 | // minDistPro = distPro; | |
3122 | // if (distSftPro < minDistSftPro) | |
3123 | // minDistSftPro = distSftPro; | |
3124 | // // Mean distance | |
3125 | // meanDistPro+=distPro; | |
3126 | // meanDistSftPro+=distSftPro; | |
3127 | // nMeasPro++; | |
3128 | ||
3129 | // // IROC | |
3130 | // if (iRadius<3){ | |
3131 | // if (distSftPro < minDistSftIrocPro) | |
3132 | // minDistSftIrocPro = distSftPro; | |
3133 | // meanDistSftIrocPro+=distSftPro; | |
3134 | // nMeasProIroc++; | |
3135 | // } | |
3136 | // // OROC | |
3137 | // else { | |
3138 | // if (distSftPro < minDistSftOrocPro) | |
3139 | // minDistSftOrocPro = distSftPro; | |
3140 | // meanDistSftOrocPro+=distSftPro; | |
3141 | // nMeasProOroc++; | |
3142 | // } | |
3143 | ||
3144 | // } | |
3145 | // if (distPio > -1.0){ | |
3146 | // // Minimum distance | |
3147 | // if (distPio < minDistPio) | |
3148 | // minDistPio = distPio; | |
3149 | // if (distSftPio < minDistSftPio) | |
3150 | // minDistSftPio = distSftPio; | |
3151 | // // Mean distance | |
3152 | // meanDistPio+=distPio; | |
3153 | // meanDistSftPio+=distSftPio; | |
3154 | // nMeasPio++; | |
3155 | ||
3156 | // // IROC | |
3157 | // if (iRadius<3){ | |
3158 | // if (distSftPio < minDistSftIrocPio) | |
3159 | // minDistSftIrocPio = distSftPio; | |
3160 | // meanDistSftIrocPio+=distSftPio; | |
3161 | // nMeasPioIroc++; | |
3162 | // } | |
3163 | // // OROC | |
3164 | // else { | |
3165 | // if (distSftPio < minDistSftOrocPio) | |
3166 | // minDistSftOrocPio = distSftPio; | |
3167 | // meanDistSftOrocPio+=distSftPio; | |
3168 | // nMeasPioOroc++; | |
3169 | // } | |
3170 | ||
3171 | // } | |
3172 | ||
3173 | // } // Loop over iRadius | |
3174 | ||
3175 | // // Require at least one measurement | |
3176 | // if ( (!nMeasPio) || (!nMeasPro) ) | |
3177 | // continue; | |
3178 | ||
3179 | // // Divide by the number of measurements to get the mean | |
3180 | // meanDistPro /= (Float_t)nMeasPro; | |
3181 | // meanDistPio /= (Float_t)nMeasPio; | |
3182 | // meanDistSftPro /= (Float_t)nMeasPro; | |
3183 | // meanDistSftPio /= (Float_t)nMeasPio; | |
3184 | ||
3185 | // // Fill the two track resolution histograms | |
3186 | // f2HistLamLamMeanMinDistProMixed->Fill(meanDistPro,minDistPro); | |
3187 | // f2HistLamLamMeanMinDistPioMixed->Fill(meanDistPio,minDistPio); | |
3188 | ||
3189 | // f2HistSftLamLamMeanMinDistProMixed->Fill(meanDistSftPro,minDistSftPro); | |
3190 | // f2HistSftLamLamMeanMinDistPioMixed->Fill(meanDistSftPio,minDistSftPio); | |
3191 | ||
3192 | // // Fill IROC / OROC histograms only with at least one measurement | |
3193 | // if (nMeasProIroc){ | |
3194 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
3195 | // f2HistSftIrocLamLamMeanMinDistProMixed->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
3196 | // } | |
3197 | // if (nMeasPioIroc){ | |
3198 | // meanDistSftIrocPio /= (Float_t)nMeasPioIroc; | |
3199 | // f2HistSftIrocLamLamMeanMinDistPioMixed->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
3200 | // } | |
3201 | // if (nMeasProOroc){ | |
3202 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
3203 | // f2HistSftOrocLamLamMeanMinDistProMixed->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
3204 | // } | |
3205 | // if (nMeasPioOroc){ | |
3206 | // meanDistSftOrocPio /= (Float_t)nMeasPioOroc; | |
3207 | // f2HistSftOrocLamLamMeanMinDistPioMixed->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
3208 | // } | |
3209 | ||
3210 | // // // Do a cut (value needs to be refined) | |
3211 | // // if ( meanDistSftPro < 2.0 || meanDistSftPio < 2.0 ) | |
3212 | // // continue; | |
3213 | ||
3214 | // // Fill the qinv, minv histogram | |
3215 | // f3HistLamLamQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], (fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2]),minDistSftPro,minDistSftPio); | |
3216 | // f3HistLamLamMinvMixed->Fill(Minv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], (fFemtoBuffer->GetEvt(iMix))->fLamTracks[iLam2]),minDistSftPro,minDistSftPio); | |
3217 | ||
3218 | // } // Second lambda loop | |
3219 | ||
3220 | // Proton loop | |
3221 | for (iPro=0;iPro<(fFemtoBuffer->GetEvt(iMix))->GetNPro();iPro++){ | |
3222 | ||
3223 | // Skip if unUseIt() entry | |
3224 | if (!(fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].UseIt()) | |
3225 | continue; | |
3226 | ||
3227 | // Reset the distances for each pair | |
3228 | // minDistPro=999.0;meanDistPro=0.0; | |
3229 | minDistSftPro=999.0;meanDistSftPro=0.0; | |
3230 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0; | |
3231 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0; | |
3232 | // Reset the number of measurements for the mean | |
3233 | nMeasPro=0;//nMeasProIroc=0;nMeasProOroc=0; | |
3234 | ||
3235 | // Check for two-track resolution | |
3236 | for (iRadius=0;iRadius<9;iRadius++){ | |
3237 | // Get the spatial distance at each radius | |
3238 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].fXglobal[iRadius]); | |
3239 | distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3240 | ||
3241 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3242 | if (distSftPro > -1.0){ | |
3243 | // Minimum distance | |
3244 | // if (distPro < minDistPro) | |
3245 | // minDistPro = distPro; | |
3246 | if (distSftPro < minDistSftPro) | |
3247 | minDistSftPro = distSftPro; | |
3248 | // Mean distance | |
3249 | // meanDistPro+=distPro; | |
3250 | meanDistSftPro+=distSftPro; | |
3251 | nMeasPro++; | |
3252 | ||
3253 | // // IROC | |
3254 | // if (iRadius<3){ | |
3255 | // if (distSftPro < minDistSftIrocPro) | |
3256 | // minDistSftIrocPro = distSftPro; | |
3257 | // meanDistSftIrocPro+=distSftPro; | |
3258 | // nMeasProIroc++; | |
3259 | // } | |
3260 | // // OROC | |
3261 | // else { | |
3262 | // if (distSftPro < minDistSftOrocPro) | |
3263 | // minDistSftOrocPro = distSftPro; | |
3264 | // meanDistSftOrocPro+=distSftPro; | |
3265 | // nMeasProOroc++; | |
3266 | // } | |
3267 | ||
3268 | } | |
3269 | } // Loop over iRadius | |
3270 | ||
3271 | // Require at least one measurement | |
3272 | if ( !nMeasPro ) | |
3273 | continue; | |
3274 | ||
3275 | // Divide by the number of measurements to get the mean | |
3276 | // meanDistPro /= (Float_t)nMeasPro; | |
3277 | meanDistSftPro /= (Float_t)nMeasPro; | |
3278 | ||
3279 | // // Fill the two track resolution histogram | |
3280 | // f2HistLamProMeanMinDistProMixed->Fill(meanDistPro,minDistPro); | |
3281 | // f2HistSftLamProMeanMinDistProMixed->Fill(meanDistSftPro,minDistSftPro); | |
3282 | ||
3283 | // // Fill IROC / OROC histograms only with at least one measurement | |
3284 | // if (nMeasProIroc){ | |
3285 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
3286 | // f2HistSftIrocLamProMeanMinDistProMixed->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
3287 | // } | |
3288 | // if (nMeasProOroc){ | |
3289 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
3290 | // f2HistSftOrocLamProMeanMinDistProMixed->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
3291 | // } | |
3292 | ||
3293 | // Look at possible residual correlations with the daughters | |
3294 | // f2HistLamPosDProQinvMixed->Fill(QinvProPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter, fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]),meanDistSftPro); | |
3295 | // f2HistLamNegDProQinvMixed->Fill(QinvPioPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fNegDaughter, fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]),meanDistSftPro); | |
3296 | ||
3297 | ||
3298 | // // Do a cut (value needs to be refined) | |
3299 | // if ( meanDistSftPro < 2.0 ) | |
3300 | // continue; | |
3301 | ||
3302 | // Use THnSparse since sept '12 | |
3303 | Double_t x[4]={ | |
3304 | QinvProPro(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam].fPosDaughter, | |
3305 | fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]), | |
3306 | meanDistSftPro, | |
3307 | minDistSftPro, | |
3308 | Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], | |
3309 | fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]) | |
3310 | }; | |
3311 | LamProMixed->Fill(x); | |
3312 | ||
3313 | // Fill the qinv histogram using TPC only momentum for the primary protons | |
3314 | // f3HistLamProQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], (fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
3315 | // f3HistLamProMinvMixed->Fill(Minv(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], (fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
3316 | // and using TPC only plus primary vertex constraint for the primary proton | |
3317 | // f3HistLamProQinvConstrMixed->Fill(QinvConstr(fFemtoBuffer->GetEvt(0)->fLamTracks[iLam], (fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
3318 | ||
3319 | }// Proton loop | |
3320 | }// Lambda loop | |
3321 | ||
3322 | ||
3323 | // Anti-lambda loop | |
3324 | for (iALam = 0; iALam < fFemtoBuffer->GetEvt(0)->GetNALam(); iALam++){ | |
3325 | ||
3326 | // Skip if unUseIt() entry | |
3327 | if (!fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].UseIt()) | |
3328 | continue; | |
3329 | ||
3330 | // // Second anti-lambda loop | |
3331 | // for (iALam2 = 0; iALam2 < (fFemtoBuffer->GetEvt(iMix))->GetNALam(); iALam2++){ | |
3332 | ||
3333 | // // Skip if unUseIt() entry | |
3334 | // if (!(fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2].UseIt()) | |
3335 | // continue; | |
3336 | ||
3337 | // // Reset the distances for each pair | |
3338 | // minDistAPro=999.0;meanDistAPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
3339 | // minDistSftAPro=999.0;meanDistSftAPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
3340 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
3341 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
3342 | // // Reset the number of measurements for the mean | |
3343 | // nMeasAPro=0;nMeasPio=0;nMeasAProIroc=0;nMeasPioIroc=0;nMeasAProOroc=0;nMeasPioOroc=0; | |
3344 | ||
3345 | // // Check for two-track resolution | |
3346 | // for (iRadius=0;iRadius<9;iRadius++){ | |
3347 | // // Get the spatial distance at each radius | |
3348 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2].fPosDaughter.fXglobal[iRadius]); | |
3349 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2].fNegDaughter.fXglobal[iRadius]); | |
3350 | // // Shifted distances | |
3351 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3352 | // distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3353 | ||
3354 | ||
3355 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3356 | // if (distAPro > -1.0){ | |
3357 | // // Minimum distance | |
3358 | // if (distAPro < minDistAPro) | |
3359 | // minDistAPro = distAPro; | |
3360 | // if (distSftAPro < minDistSftAPro) | |
3361 | // minDistSftAPro = distSftAPro; | |
3362 | // // Mean distance | |
3363 | // meanDistAPro+=distAPro; | |
3364 | // meanDistSftAPro+=distSftAPro; | |
3365 | // nMeasAPro++; | |
3366 | // // IROC | |
3367 | // if (iRadius<3){ | |
3368 | // if (distSftAPro < minDistSftIrocAPro) | |
3369 | // minDistSftIrocAPro = distSftAPro; | |
3370 | // meanDistSftIrocAPro+=distSftAPro; | |
3371 | // nMeasAProIroc++; | |
3372 | // } | |
3373 | // // OROC | |
3374 | // else { | |
3375 | // if (distSftAPro < minDistSftOrocAPro) | |
3376 | // minDistSftOrocAPro = distSftAPro; | |
3377 | // meanDistSftOrocAPro+=distSftAPro; | |
3378 | // nMeasAProOroc++; | |
3379 | // } | |
3380 | // } | |
3381 | // if (distPio > -1.0){ | |
3382 | // // Minimum distance | |
3383 | // if (distPio < minDistPio) | |
3384 | // minDistPio = distPio; | |
3385 | // if (distSftPio < minDistSftPio) | |
3386 | // minDistSftPio = distSftPio; | |
3387 | // // Mean distance | |
3388 | // meanDistPio+=distPio; | |
3389 | // meanDistSftPio+=distSftPio; | |
3390 | // nMeasPio++; | |
3391 | // // IROC | |
3392 | // if (iRadius<3){ | |
3393 | // if (distSftPio < minDistSftIrocPio) | |
3394 | // minDistSftIrocPio = distSftPio; | |
3395 | // meanDistSftIrocPio+=distSftPio; | |
3396 | // nMeasPioIroc++; | |
3397 | // } | |
3398 | // // OROC | |
3399 | // else { | |
3400 | // if (distSftPio < minDistSftOrocPio) | |
3401 | // minDistSftOrocPio = distSftPio; | |
3402 | // meanDistSftOrocPio+=distSftPio; | |
3403 | // nMeasPioOroc++; | |
3404 | // } | |
3405 | // } | |
3406 | // } // Loop over iRadius | |
3407 | ||
3408 | // // Require at least one measurement | |
3409 | // if ( (!nMeasPio) || (!nMeasAPro) ) | |
3410 | // continue; | |
3411 | ||
3412 | // // Divide by the number of measurements to get the mean | |
3413 | // meanDistAPro /= (Float_t)nMeasAPro; | |
3414 | // meanDistPio /= (Float_t)nMeasPio; | |
3415 | // meanDistSftAPro /= (Float_t)nMeasAPro; | |
3416 | // meanDistSftPio /= (Float_t)nMeasPio; | |
3417 | ||
3418 | // // Fill the two track resolution histograms | |
3419 | // f2HistALamALamMeanMinDistAProMixed->Fill(meanDistAPro,minDistAPro); | |
3420 | // f2HistALamALamMeanMinDistPioMixed->Fill(meanDistPio,minDistPio); | |
3421 | // f2HistSftALamALamMeanMinDistAProMixed->Fill(meanDistSftAPro,minDistSftAPro); | |
3422 | // f2HistSftALamALamMeanMinDistPioMixed->Fill(meanDistSftPio,minDistSftPio); | |
3423 | ||
3424 | // // Fill IROC / OROC histograms only with at least one measurement | |
3425 | // if (nMeasAProIroc){ | |
3426 | // meanDistSftIrocAPro /= (Float_t)nMeasAProIroc; | |
3427 | // f2HistSftIrocALamALamMeanMinDistAProMixed->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
3428 | // } | |
3429 | // if (nMeasPioIroc){ | |
3430 | // meanDistSftIrocPio /= (Float_t)nMeasPioIroc; | |
3431 | // f2HistSftIrocALamALamMeanMinDistPioMixed->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
3432 | // } | |
3433 | // if (nMeasAProOroc){ | |
3434 | // meanDistSftOrocAPro /= (Float_t)nMeasAProOroc; | |
3435 | // f2HistSftOrocALamALamMeanMinDistAProMixed->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
3436 | // } | |
3437 | // if (nMeasPioOroc){ | |
3438 | // meanDistSftOrocPio /= (Float_t)nMeasPioOroc; | |
3439 | // f2HistSftOrocALamALamMeanMinDistPioMixed->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
3440 | // } | |
3441 | // // // Do a cut (value needs to be refined) | |
3442 | // // if ( meanDistSftAPro < 2.0 || meanDistSftPio < 2.0 ) | |
3443 | // // continue; | |
3444 | ||
3445 | // // Fill the qinv, minv histogram | |
3446 | // f3HistALamALamQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], (fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2]),minDistSftAPro,minDistSftPio); | |
3447 | // f3HistALamALamMinvMixed->Fill(Minv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], (fFemtoBuffer->GetEvt(iMix))->fALamTracks[iALam2]),minDistSftAPro,minDistSftPio); | |
3448 | ||
3449 | // } // Second lambda loop | |
3450 | ||
3451 | // AProton loop | |
3452 | for (iAPro=0;iAPro<(fFemtoBuffer->GetEvt(iMix))->GetNAPro();iAPro++){ | |
3453 | ||
3454 | // Skip if unUseIt() entry | |
3455 | if (!(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].UseIt()) | |
3456 | continue; | |
3457 | ||
3458 | // Reset the distances for each pair | |
3459 | // minDistAPro=999.0;meanDistAPro=0.0; | |
3460 | minDistSftAPro=999.0;meanDistSftAPro=0.0; | |
3461 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0; | |
3462 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0; | |
3463 | // Reset the number of measurements for the mean | |
3464 | nMeasAPro=0;//nMeasAProIroc=0;nMeasAProOroc=0; | |
3465 | ||
3466 | // Check for two-track resolution | |
3467 | for (iRadius=0;iRadius<9;iRadius++){ | |
3468 | // Get the spatial distance at each radius | |
3469 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].fXglobal[iRadius]); | |
3470 | distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
3471 | ||
3472 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3473 | if (distSftAPro > -1.0){ | |
3474 | // Minimum distance | |
3475 | // if (distAPro < minDistAPro) | |
3476 | // minDistAPro = distAPro; | |
3477 | if (distSftAPro < minDistSftAPro) | |
3478 | minDistSftAPro = distSftAPro; | |
3479 | // Mean distance | |
3480 | // meanDistAPro+=distAPro; | |
3481 | meanDistSftAPro+=distSftAPro; | |
3482 | nMeasAPro++; | |
3483 | // // IROC | |
3484 | // if (iRadius<3){ | |
3485 | // if (distSftAPro < minDistSftIrocAPro) | |
3486 | // minDistSftIrocAPro = distSftAPro; | |
3487 | // meanDistSftIrocAPro+=distSftAPro; | |
3488 | // nMeasAProIroc++; | |
3489 | // } | |
3490 | // // OROC | |
3491 | // else { | |
3492 | // if (distSftAPro < minDistSftOrocAPro) | |
3493 | // minDistSftOrocAPro = distSftAPro; | |
3494 | // meanDistSftOrocAPro+=distSftAPro; | |
3495 | // nMeasAProOroc++; | |
3496 | // } | |
3497 | ||
3498 | } | |
3499 | } // Loop over iRadius | |
3500 | ||
3501 | // Require at least one measurement | |
3502 | if ( !nMeasAPro ) | |
3503 | continue; | |
3504 | ||
3505 | // Divide by the number of measurements to get the mean | |
3506 | // meanDistAPro /= (Float_t)nMeasAPro; | |
3507 | meanDistSftAPro /= (Float_t)nMeasAPro; | |
3508 | ||
3509 | // // Fill the two track resolution histogram | |
3510 | // f2HistALamAProMeanMinDistAProMixed->Fill(meanDistAPro,minDistAPro); | |
3511 | // f2HistSftALamAProMeanMinDistAProMixed->Fill(meanDistSftAPro,minDistSftAPro); | |
3512 | ||
3513 | // // Fill IROC / OROC histograms only with at least one measurement | |
3514 | // if (nMeasAProIroc){ | |
3515 | // meanDistSftAPro /= (Float_t)nMeasAProIroc; | |
3516 | // f2HistSftIrocALamAProMeanMinDistAProMixed->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
3517 | // } | |
3518 | // if (nMeasAProOroc){ | |
3519 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
3520 | // f2HistSftOrocALamAProMeanMinDistAProMixed->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
3521 | // } | |
3522 | ||
3523 | // Look at possible residual correlations for the daughters | |
3524 | // f2HistALamPosDAProQinvMixed->Fill(QinvPioPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fPosDaughter, fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]),meanDistSftAPro); | |
3525 | // f2HistALamNegDAProQinvMixed->Fill(QinvProPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter, fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]),meanDistSftAPro); | |
3526 | ||
3527 | // Do a cut (value needs to be refined) | |
3528 | // if ( meanDistSftAPro < 2.0 ) | |
3529 | // continue; | |
3530 | ||
3531 | // Use THnSparse since sept '12 | |
3532 | Double_t x[4]={ | |
3533 | QinvProPro(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam].fNegDaughter, | |
3534 | fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]), | |
3535 | meanDistSftAPro, | |
3536 | minDistSftAPro, | |
3537 | Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], | |
3538 | fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]) | |
3539 | }; | |
3540 | ALamAProMixed->Fill(x); | |
3541 | ||
3542 | ||
3543 | // Fill the qinv histogram using TPC only momentum for the primary proton | |
3544 | // f3HistALamAProQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], (fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
3545 | // f3HistALamAProMinvMixed->Fill(Minv(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], (fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
3546 | // and using TPC only plus primary vertex constraint for the primary proton | |
3547 | // f3HistALamAProQinvConstrMixed->Fill(QinvConstr(fFemtoBuffer->GetEvt(0)->fALamTracks[iALam], (fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
3548 | ||
3549 | }// AProton loop | |
3550 | }// ALambda loop | |
3551 | ||
3552 | }// Event buffer loop | |
3553 | ||
3554 | }// End of void ProcessMixed | |
3555 | //________________________________________________________________________ | |
3556 | void AliAnalysisTaskProtonLambda::ProcessRealBackground() { | |
3557 | // Process real events with background lambdas | |
3558 | ||
3559 | // Declare numbers to speed up the code | |
3560 | Int_t iBgLam, | |
3561 | //iBgLam2, | |
3562 | iRadius,iPro,iBgALam, | |
3563 | //iBgALam2, | |
3564 | iAPro,nMeasPro, | |
3565 | //nMeasPio, | |
3566 | nMeasAPro; | |
3567 | // Int_t nMeasProIroc,nMeasPioIroc,nMeasAProIroc,nMeasProOroc,nMeasPioOroc,nMeasAProOroc; | |
3568 | // Float_t distPro,distPio,minDistPro=999.0,meanDistPro=0.0,minDistPio=999.0,meanDistPio=0.0, | |
3569 | // distAPro,minDistAPro=999.0,meanDistAPro=0.0; | |
3570 | Float_t distSftPro, | |
3571 | //distSftPio, | |
3572 | minDistSftPro=999.0,meanDistSftPro=0.0, | |
3573 | //minDistSftPio=999.0,meanDistSftPio=0.0, | |
3574 | distSftAPro,minDistSftAPro=999.0,meanDistSftAPro=0.0; | |
3575 | // Float_t minDistSftIrocPro=999.0,meanDistSftIrocPro=0.0,minDistSftIrocPio=999.0,meanDistSftIrocPio=0.0, | |
3576 | // minDistSftIrocAPro=999.0,meanDistSftIrocAPro=0.0; | |
3577 | // Float_t minDistSftOrocPro=999.0,meanDistSftOrocPro=0.0,minDistSftOrocPio=999.0,meanDistSftOrocPio=0.0, | |
3578 | // minDistSftOrocAPro=999.0,meanDistSftOrocAPro=0.0; | |
3579 | ||
3580 | ||
3581 | // BgLambda loop | |
3582 | for (iBgLam = 0; iBgLam < fFemtoBuffer->GetEvt(0)->GetNBgLam(); iBgLam++){ | |
3583 | ||
3584 | // Skip if unUseIt() entry | |
3585 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].UseIt()) | |
3586 | continue; | |
3587 | ||
3588 | // // Second lambda loop | |
3589 | // for (iBgLam2 = iBgLam+1; iBgLam2 < fFemtoBuffer->GetEvt(0)->GetNBgLam(); iBgLam2++){ | |
3590 | ||
3591 | // // Skip if unUseIt() entry | |
3592 | // if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2].UseIt()) | |
3593 | // continue; | |
3594 | ||
3595 | // // Reset the distances for each pair | |
3596 | // minDistPro=999.0;meanDistPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
3597 | // minDistSftPro=999.0;meanDistSftPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
3598 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
3599 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
3600 | // // Reset the number of measurements for the mean | |
3601 | // nMeasPro=0;nMeasPio=0;nMeasProIroc=0;nMeasPioIroc=0;nMeasProOroc=0;nMeasPioOroc=0; | |
3602 | ||
3603 | // // Check for two-track resolution | |
3604 | // for (iRadius=0;iRadius<9;iRadius++){ | |
3605 | // // Get the spatial distance at each radius | |
3606 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2].fPosDaughter.fXglobal[iRadius]); | |
3607 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2].fNegDaughter.fXglobal[iRadius]); | |
3608 | // // Shifted distances | |
3609 | // distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3610 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3611 | ||
3612 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3613 | // if (distPro > -1.0){ | |
3614 | // // Minimum distance | |
3615 | // if (distPro < minDistPro) | |
3616 | // minDistPro = distPro; | |
3617 | // if (distSftPro < minDistSftPro) | |
3618 | // minDistSftPro = distSftPro; | |
3619 | // // Mean distance | |
3620 | // meanDistPro+=distPro; | |
3621 | // meanDistSftPro+=distSftPro; | |
3622 | // nMeasPro++; | |
3623 | ||
3624 | // // IROC | |
3625 | // if (iRadius<3){ | |
3626 | // if (distSftPro < minDistSftIrocPro) | |
3627 | // minDistSftIrocPro = distSftPro; | |
3628 | // meanDistSftIrocPro+=distSftPro; | |
3629 | // nMeasProIroc++; | |
3630 | // } | |
3631 | // // OROC | |
3632 | // else { | |
3633 | // if (distSftPro < minDistSftOrocPro) | |
3634 | // minDistSftOrocPro = distSftPro; | |
3635 | // meanDistSftOrocPro+=distSftPro; | |
3636 | // nMeasProOroc++; | |
3637 | // } | |
3638 | // } | |
3639 | ||
3640 | // if (distPio > -1.0){ | |
3641 | // // Minimum distance | |
3642 | // if (distPio < minDistPio) | |
3643 | // minDistPio = distPio; | |
3644 | // if (distSftPio < minDistSftPio) | |
3645 | // minDistSftPio = distSftPio; | |
3646 | // // Mean distance | |
3647 | // meanDistPio+=distPio; | |
3648 | // meanDistSftPio+=distSftPio; | |
3649 | // nMeasPio++; | |
3650 | // // IROC | |
3651 | // if (iRadius<3){ | |
3652 | // if (distSftPio < minDistSftIrocPio) | |
3653 | // minDistSftIrocPio = distSftPio; | |
3654 | // meanDistSftIrocPio+=distSftPio; | |
3655 | // nMeasPioIroc++; | |
3656 | // } | |
3657 | // // OROC | |
3658 | // else { | |
3659 | // if (distSftPio < minDistSftOrocPio) | |
3660 | // minDistSftOrocPio = distSftPio; | |
3661 | // meanDistSftOrocPio+=distSftPio; | |
3662 | // nMeasPioOroc++; | |
3663 | // } | |
3664 | // } | |
3665 | ||
3666 | // } // Loop over iRadius | |
3667 | ||
3668 | ||
3669 | ||
3670 | // // Require at least one measurement | |
3671 | // if ( (!nMeasPio) || (!nMeasPro) ) | |
3672 | // continue; | |
3673 | ||
3674 | // // Divide by the number of measurements to get the mean | |
3675 | // meanDistPro /= (Float_t)nMeasPro; | |
3676 | // meanDistPio /= (Float_t)nMeasPio; | |
3677 | // meanDistSftPro /= (Float_t)nMeasPro; | |
3678 | // meanDistSftPio /= (Float_t)nMeasPio; | |
3679 | ||
3680 | // // Fill the two track resolution histograms | |
3681 | // f2HistBgLamBgLamMeanMinDistProReal->Fill(meanDistPro,minDistPro); | |
3682 | // f2HistBgLamBgLamMeanMinDistPioReal->Fill(meanDistPio,minDistPio); | |
3683 | // f2HistSftBgLamBgLamMeanMinDistProReal->Fill(meanDistSftPro,minDistSftPro); | |
3684 | // f2HistSftBgLamBgLamMeanMinDistPioReal->Fill(meanDistSftPio,minDistSftPio); | |
3685 | ||
3686 | // // Fill IROC / OROC histograms only with at least one measurement | |
3687 | // if (nMeasProIroc){ | |
3688 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
3689 | // f2HistSftIrocBgLamBgLamMeanMinDistProReal->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
3690 | // } | |
3691 | // if (nMeasPioIroc){ | |
3692 | // meanDistSftIrocPio /= (Float_t)nMeasPioIroc; | |
3693 | // f2HistSftIrocBgLamBgLamMeanMinDistPioReal->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
3694 | // } | |
3695 | // if (nMeasProOroc){ | |
3696 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
3697 | // f2HistSftOrocBgLamBgLamMeanMinDistProReal->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
3698 | // } | |
3699 | // if (nMeasPioOroc){ | |
3700 | // meanDistSftOrocPio /= (Float_t)nMeasPioOroc; | |
3701 | // f2HistSftOrocBgLamBgLamMeanMinDistPioReal->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
3702 | // } | |
3703 | ||
3704 | ||
3705 | ||
3706 | // // // Do a cut (value needs to be refined) | |
3707 | // // if ( meanDistSftPro < 2.0 || meanDistSftPio < 2.0 ) | |
3708 | // // continue; | |
3709 | ||
3710 | // // Fill the qinv, minv histogram | |
3711 | // f3HistBgLamBgLamQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam2]),minDistSftPro,minDistSftPio); | |
3712 | ||
3713 | // } // Second lambda loop | |
3714 | ||
3715 | ||
3716 | // Proton loop | |
3717 | for (iPro=0;iPro<fFemtoBuffer->GetEvt(0)->GetNPro();iPro++){ | |
3718 | ||
3719 | // Skip if unUseIt() entry | |
3720 | if (!fFemtoBuffer->GetEvt(0)->fProTracks[iPro].UseIt()) | |
3721 | continue; | |
3722 | ||
3723 | // Reset the distances for each pair | |
3724 | // minDistPro=999.0;meanDistPro=0.0; | |
3725 | minDistSftPro=999.0;meanDistSftPro=0.0; | |
3726 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0; | |
3727 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0; | |
3728 | // Reset the number of measurements for the mean | |
3729 | nMeasPro=0;//nMeasProIroc=0;nMeasProOroc=0; | |
3730 | ||
3731 | // Check for two-track resolution | |
3732 | for (iRadius=0;iRadius<9;iRadius++){ | |
3733 | // Get the spatial distance at each radius | |
3734 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fProTracks[iPro].fXglobal[iRadius]); | |
3735 | distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fProTracks[iPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3736 | ||
3737 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3738 | if (distSftPro > -1.0){ | |
3739 | // Minimum distance | |
3740 | // if (distPro < minDistPro) | |
3741 | // minDistPro = distPro; | |
3742 | if (distSftPro < minDistSftPro) | |
3743 | minDistSftPro = distSftPro; | |
3744 | // Mean distance | |
3745 | // meanDistPro+=distPro; | |
3746 | meanDistSftPro+=distSftPro; | |
3747 | nMeasPro++; | |
3748 | // // IROC | |
3749 | // if (iRadius<3){ | |
3750 | // if (distSftPro < minDistSftIrocPro) | |
3751 | // minDistSftIrocPro = distSftPro; | |
3752 | // meanDistSftIrocPro+=distSftPro; | |
3753 | // nMeasProIroc++; | |
3754 | // } | |
3755 | // // OROC | |
3756 | // else { | |
3757 | // if (distSftPro < minDistSftOrocPro) | |
3758 | // minDistSftOrocPro = distSftPro; | |
3759 | // meanDistSftOrocPro+=distSftPro; | |
3760 | // nMeasProOroc++; | |
3761 | // } | |
3762 | ||
3763 | } | |
3764 | ||
3765 | } // Loop over iRadius | |
3766 | ||
3767 | // Require at least one measurement | |
3768 | if ( !nMeasPro ) | |
3769 | continue; | |
3770 | ||
3771 | // Divide by the number of measurements to get the mean | |
3772 | // meanDistPro /= (Float_t)nMeasPro; | |
3773 | meanDistSftPro /= (Float_t)nMeasPro; | |
3774 | ||
3775 | // Fill the two track resolution histogram | |
3776 | // f2HistBgLamProMeanMinDistProReal->Fill(meanDistPro,minDistPro); | |
3777 | // f2HistSftBgLamProMeanMinDistProReal->Fill(meanDistSftPro,minDistSftPro); | |
3778 | ||
3779 | // // Fill IROC / OROC histograms only with at least one measurement | |
3780 | // if (nMeasProIroc){ | |
3781 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
3782 | // f2HistSftIrocBgLamProMeanMinDistProReal->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
3783 | // } | |
3784 | // if (nMeasProOroc){ | |
3785 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
3786 | // f2HistSftOrocBgLamProMeanMinDistProReal->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
3787 | // } | |
3788 | ||
3789 | ||
3790 | // Do a cut (value needs to be refined) | |
3791 | // if ( meanDistSftPro < 2.0 ) | |
3792 | // continue; | |
3793 | ||
3794 | // Since sept '12 do THnSparse with qinvpropro, | |
3795 | // mean dist propro, min dist propro, qinv lampro | |
3796 | Double_t x[4]={ | |
3797 | QinvProPro(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter, | |
3798 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro]), | |
3799 | meanDistSftPro, | |
3800 | minDistSftPro, | |
3801 | Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], | |
3802 | fFemtoBuffer->GetEvt(0)->fProTracks[iPro]) | |
3803 | }; | |
3804 | BgLamProReal->Fill(x); | |
3805 | ||
3806 | // Fill the qinv histogram | |
3807 | // f3HistBgLamProQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], fFemtoBuffer->GetEvt(0)->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
3808 | ||
3809 | }// Proton loop | |
3810 | }// BgLambda loop | |
3811 | ||
3812 | ||
3813 | // Anti-lambda loop | |
3814 | for (iBgALam = 0; iBgALam < fFemtoBuffer->GetEvt(0)->GetNBgALam(); iBgALam++){ | |
3815 | ||
3816 | // Skip if unUseIt() entry | |
3817 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].UseIt()) | |
3818 | continue; | |
3819 | ||
3820 | // // Second anti-lambda loop | |
3821 | // for (iBgALam2 = iBgALam+1; iBgALam2 < fFemtoBuffer->GetEvt(0)->GetNBgALam(); iBgALam2++){ | |
3822 | ||
3823 | // // Skip if unUseIt() entry | |
3824 | // if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].UseIt()) | |
3825 | // continue; | |
3826 | ||
3827 | // // Reset the distances for each pair | |
3828 | // minDistAPro=999.0;meanDistAPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
3829 | // minDistSftAPro=999.0;meanDistSftAPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
3830 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
3831 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
3832 | // // Reset the number of measurements for the mean | |
3833 | // nMeasAPro=0;nMeasPio=0; | |
3834 | // nMeasAProIroc=0;nMeasPioIroc=0; | |
3835 | // nMeasAProOroc=0;nMeasPioOroc=0; | |
3836 | ||
3837 | // // Check for two-track resolution | |
3838 | // for (iRadius=0;iRadius<9;iRadius++){ | |
3839 | // // Get the spatial distance at each radius | |
3840 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fPosDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fPosDaughter.fXglobal[iRadius]); | |
3841 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fNegDaughter.fXglobal[iRadius]); | |
3842 | // // Shifted distances | |
3843 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fPosDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3844 | // distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3845 | ||
3846 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3847 | // if (distAPro > -1.0){ | |
3848 | // // Minimum distance | |
3849 | // if (distAPro < minDistAPro) | |
3850 | // minDistAPro = distAPro; | |
3851 | // if (distSftAPro < minDistSftAPro) | |
3852 | // minDistSftAPro = distSftAPro; | |
3853 | // // Mean distance | |
3854 | // meanDistAPro+=distAPro; | |
3855 | // meanDistSftAPro+=distSftAPro; | |
3856 | // nMeasAPro++; | |
3857 | ||
3858 | // // IROC | |
3859 | // if (iRadius<3){ | |
3860 | // if (distSftAPro < minDistSftIrocAPro) | |
3861 | // minDistSftIrocAPro = distSftAPro; | |
3862 | // meanDistSftIrocAPro+=distSftAPro; | |
3863 | // nMeasAProIroc++; | |
3864 | // } | |
3865 | // // OROC | |
3866 | // else { | |
3867 | // if (distSftAPro < minDistSftOrocAPro) | |
3868 | // minDistSftOrocAPro = distSftAPro; | |
3869 | // meanDistSftOrocAPro+=distSftAPro; | |
3870 | // nMeasAProOroc++; | |
3871 | // } | |
3872 | ||
3873 | // } | |
3874 | // if (distPio > -1.0){ | |
3875 | // // Minimum distance | |
3876 | // if (distPio < minDistPio) | |
3877 | // minDistPio = distPio; | |
3878 | // if (distSftPio < minDistSftPio) | |
3879 | // minDistSftPio = distSftPio; | |
3880 | // // Mean distance | |
3881 | // meanDistPio+=distPio; | |
3882 | // meanDistSftPio+=distSftPio; | |
3883 | // nMeasPio++; | |
3884 | // // IROC | |
3885 | // if (iRadius<3){ | |
3886 | // if (distSftPio < minDistSftIrocPio) | |
3887 | // minDistSftIrocPio = distSftPio; | |
3888 | // meanDistSftIrocPio+=distSftPio; | |
3889 | // nMeasPioIroc++; | |
3890 | // } | |
3891 | // // OROC | |
3892 | // else { | |
3893 | // if (distSftPio < minDistSftOrocPio) | |
3894 | // minDistSftOrocPio = distSftPio; | |
3895 | // meanDistSftOrocPio+=distSftPio; | |
3896 | // nMeasPioOroc++; | |
3897 | // } | |
3898 | ||
3899 | // } | |
3900 | ||
3901 | // } // Loop over iRadius | |
3902 | ||
3903 | // // Require at least one measurement | |
3904 | // if ( (!nMeasPio) || (!nMeasAPro) ) | |
3905 | // continue; | |
3906 | ||
3907 | // // Divide by the number of measurements to get the mean | |
3908 | // meanDistAPro /= (Float_t)nMeasAPro; | |
3909 | // meanDistPio /= (Float_t)nMeasPio; | |
3910 | // meanDistSftAPro /= (Float_t)nMeasAPro; | |
3911 | // meanDistSftPio /= (Float_t)nMeasPio; | |
3912 | ||
3913 | // // Fill the two track resolution histograms | |
3914 | // f2HistBgALamBgALamMeanMinDistAProReal->Fill(meanDistAPro,minDistAPro); | |
3915 | // f2HistBgALamBgALamMeanMinDistPioReal->Fill(meanDistPio,minDistPio); | |
3916 | // f2HistSftBgALamBgALamMeanMinDistAProReal->Fill(meanDistSftAPro,minDistSftAPro); | |
3917 | // f2HistSftBgALamBgALamMeanMinDistPioReal->Fill(meanDistSftPio,minDistSftPio); | |
3918 | // // Fill IROC / OROC histograms only with at least one measurement | |
3919 | // if (nMeasAProIroc){ | |
3920 | // meanDistSftAPro /= (Float_t)nMeasAProIroc; | |
3921 | // f2HistSftIrocBgALamBgALamMeanMinDistAProReal->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
3922 | // } | |
3923 | // if (nMeasPioIroc){ | |
3924 | // meanDistSftPio /= (Float_t)nMeasPioIroc; | |
3925 | // f2HistSftIrocBgALamBgALamMeanMinDistPioReal->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
3926 | // } | |
3927 | // if (nMeasAProOroc){ | |
3928 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
3929 | // f2HistSftOrocBgALamBgALamMeanMinDistAProReal->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
3930 | // } | |
3931 | // if (nMeasPioOroc){ | |
3932 | // meanDistSftPio /= (Float_t)nMeasPioOroc; | |
3933 | // f2HistSftOrocBgALamBgALamMeanMinDistPioReal->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
3934 | // } | |
3935 | ||
3936 | ||
3937 | // // // Do a cut (value needs to be refined) | |
3938 | // // if ( meanDistSftAPro < 2.0 || meanDistSftPio < 2.0 ) | |
3939 | // // continue; | |
3940 | ||
3941 | // // Fill the qinv histogram | |
3942 | // f3HistBgALamBgALamQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2]),minDistSftAPro,minDistSftPio); | |
3943 | ||
3944 | // } // Second lambda loop | |
3945 | ||
3946 | ||
3947 | // AProton loop | |
3948 | for (iAPro=0;iAPro<fFemtoBuffer->GetEvt(0)->GetNAPro();iAPro++){ | |
3949 | ||
3950 | // Skip if unUseIt() entry | |
3951 | if (!fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].UseIt()) | |
3952 | continue; | |
3953 | ||
3954 | // Reset the distances for each pair | |
3955 | // minDistAPro=999.0;meanDistAPro=0.0; | |
3956 | minDistSftAPro=999.0;meanDistSftAPro=0.0; | |
3957 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0; | |
3958 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0; | |
3959 | // Reset the number of measurements for the mean | |
3960 | nMeasAPro=0;//nMeasAProIroc=0;nMeasAProOroc=0; | |
3961 | ||
3962 | // Check for two-track resolution | |
3963 | for (iRadius=0;iRadius<9;iRadius++){ | |
3964 | // Get the spatial distance at each radius | |
3965 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXglobal[iRadius],fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].fXglobal[iRadius]); | |
3966 | distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXshifted[iRadius],fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),fFemtoBuffer->GetEvt(0)); | |
3967 | ||
3968 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
3969 | if (distSftAPro > -1.0){ | |
3970 | // Minimum distance | |
3971 | // if (distAPro < minDistAPro) | |
3972 | // minDistAPro = distAPro; | |
3973 | if (distSftAPro < minDistSftAPro) | |
3974 | minDistSftAPro = distSftAPro; | |
3975 | // Mean distance | |
3976 | // meanDistAPro+=distAPro; | |
3977 | meanDistSftAPro+=distSftAPro; | |
3978 | nMeasAPro++; | |
3979 | ||
3980 | // // IROC | |
3981 | // if (iRadius<3){ | |
3982 | // if (distSftAPro < minDistSftIrocAPro) | |
3983 | // minDistSftIrocAPro = distSftAPro; | |
3984 | // meanDistSftIrocAPro+=distSftAPro; | |
3985 | // nMeasAProIroc++; | |
3986 | // } | |
3987 | // // OROC | |
3988 | // else { | |
3989 | // if (distSftAPro < minDistSftOrocAPro) | |
3990 | // minDistSftOrocAPro = distSftAPro; | |
3991 | // meanDistSftOrocAPro+=distSftAPro; | |
3992 | // nMeasAProOroc++; | |
3993 | // } | |
3994 | } | |
3995 | } // Loop over iRadius | |
3996 | ||
3997 | // Require at least one measurement | |
3998 | if ( !nMeasAPro ) | |
3999 | continue; | |
4000 | ||
4001 | // Divide by the number of measurements to get the mean | |
4002 | // meanDistAPro /= (Float_t)nMeasAPro; | |
4003 | meanDistSftAPro /= (Float_t)nMeasAPro; | |
4004 | ||
4005 | // // Fill the two track resolution histogram | |
4006 | // f2HistBgALamAProMeanMinDistAProReal->Fill(meanDistAPro,minDistAPro); | |
4007 | // f2HistSftBgALamAProMeanMinDistAProReal->Fill(meanDistSftAPro,minDistSftAPro); | |
4008 | // // Fill IROC / OROC histograms only with at least one measurement | |
4009 | // if (nMeasAProIroc){ | |
4010 | // meanDistSftAPro /= (Float_t)nMeasAProIroc; | |
4011 | // f2HistSftIrocBgALamAProMeanMinDistAProReal->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
4012 | // } | |
4013 | // if (nMeasAProOroc){ | |
4014 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
4015 | // f2HistSftOrocBgALamAProMeanMinDistAProReal->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
4016 | // } | |
4017 | ||
4018 | ||
4019 | // Do a cut (value needs to be refined) | |
4020 | // if ( meanDistSftAPro < 2.0 ) | |
4021 | // continue; | |
4022 | ||
4023 | // Since sept '12 do THnSparse with qinvpropro, | |
4024 | // mean dist propro, min dist propro, qinv lampro | |
4025 | Double_t x[4]={ | |
4026 | QinvProPro(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter, | |
4027 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]), | |
4028 | meanDistSftAPro, | |
4029 | minDistSftAPro, | |
4030 | Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], | |
4031 | fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]) | |
4032 | }; | |
4033 | BgALamAProReal->Fill(x); | |
4034 | ||
4035 | // Fill the qinv histogram | |
4036 | // f3HistBgALamAProQinvReal->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], fFemtoBuffer->GetEvt(0)->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
4037 | ||
4038 | }// AProton loop | |
4039 | }// BgALambda loop | |
4040 | } // End of void ProcessRealBackground | |
4041 | ||
4042 | //________________________________________________________________________ | |
4043 | void AliAnalysisTaskProtonLambda::ProcessMixedBackground() { | |
4044 | // Process mixed events | |
4045 | ||
4046 | // Declare numbers to speed up the code | |
4047 | Int_t iBgLam, | |
4048 | //iBgLam2, | |
4049 | iRadius,iPro,iBgALam, | |
4050 | //iBgALam2, | |
4051 | iAPro,nMeasPro, | |
4052 | //nMeasPio, | |
4053 | nMeasAPro; | |
4054 | // Int_t nMeasProIroc,nMeasPioIroc,nMeasAProIroc,nMeasProOroc,nMeasPioOroc,nMeasAProOroc; | |
4055 | // Float_t distPro,distPio,minDistPro,meanDistPro,minDistPio,meanDistPio, | |
4056 | // distAPro,minDistAPro,meanDistAPro; | |
4057 | Float_t distSftPro,//distSftPio, | |
4058 | minDistSftPro,meanDistSftPro,//minDistSftPio,meanDistSftPio, | |
4059 | distSftAPro,minDistSftAPro,meanDistSftAPro; | |
4060 | // Float_t minDistSftIrocPro,meanDistSftIrocPro,minDistSftIrocPio,meanDistSftIrocPio, | |
4061 | // minDistSftIrocAPro,meanDistSftIrocAPro; | |
4062 | // Float_t minDistSftOrocPro,meanDistSftOrocPro,minDistSftOrocPio,meanDistSftOrocPio, | |
4063 | // minDistSftOrocAPro,meanDistSftOrocAPro; | |
4064 | ||
4065 | ||
4066 | // Loop over the event buffer | |
4067 | for (UChar_t iMix = 1;iMix<fFemtoBuffer->GetMixBuffSize();iMix++){ | |
4068 | // BgLambda loop | |
4069 | for (iBgLam = 0; iBgLam < fFemtoBuffer->GetEvt(0)->GetNBgLam(); iBgLam++){ | |
4070 | ||
4071 | // Skip if unUseIt() entry | |
4072 | if (!fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].UseIt()) | |
4073 | continue; | |
4074 | ||
4075 | // // Second lambda loop | |
4076 | // for (iBgLam2 = 0; iBgLam2 < (fFemtoBuffer->GetEvt(iMix))->GetNBgLam(); iBgLam2++){ | |
4077 | ||
4078 | // // Skip if unUseIt() entry | |
4079 | // if (!(fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2].UseIt()) | |
4080 | // continue; | |
4081 | ||
4082 | // // Reset the distances for each pair | |
4083 | // minDistPro=999.0;meanDistPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
4084 | // minDistSftPro=999.0;meanDistSftPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
4085 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
4086 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
4087 | // // Reset the number of measurements for the mean | |
4088 | // nMeasPro=0;nMeasPio=0;nMeasProIroc=0;nMeasPioIroc=0;nMeasProOroc=0;nMeasPioOroc=0; | |
4089 | ||
4090 | // // Check for two-track resolution | |
4091 | // for (iRadius=0;iRadius<9;iRadius++){ | |
4092 | // // Get the spatial distance at each radius | |
4093 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2].fPosDaughter.fXglobal[iRadius]); | |
4094 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fNegDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2].fNegDaughter.fXglobal[iRadius]); | |
4095 | // // Shifted distances | |
4096 | // distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4097 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fNegDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4098 | ||
4099 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
4100 | // if (distPro > -1.0){ | |
4101 | // // Minimum distance | |
4102 | // if (distPro < minDistPro) | |
4103 | // minDistPro = distPro; | |
4104 | // if (distSftPro < minDistSftPro) | |
4105 | // minDistSftPro = distSftPro; | |
4106 | // // Mean distance | |
4107 | // meanDistPro+=distPro; | |
4108 | // meanDistSftPro+=distSftPro; | |
4109 | // nMeasPro++; | |
4110 | // // IROC | |
4111 | // if (iRadius<3){ | |
4112 | // if (distSftPro < minDistSftIrocPro) | |
4113 | // minDistSftIrocPro = distSftPro; | |
4114 | // meanDistSftIrocPro+=distSftPro; | |
4115 | // nMeasProIroc++; | |
4116 | // } | |
4117 | // // OROC | |
4118 | // else { | |
4119 | // if (distSftPro < minDistSftOrocPro) | |
4120 | // minDistSftOrocPro = distSftPro; | |
4121 | // meanDistSftOrocPro+=distSftPro; | |
4122 | // nMeasProOroc++; | |
4123 | // } | |
4124 | // } | |
4125 | // if (distPio > -1.0){ | |
4126 | // // Minimum distance | |
4127 | // if (distPio < minDistPio) | |
4128 | // minDistPio = distPio; | |
4129 | // if (distSftPio < minDistSftPio) | |
4130 | // minDistSftPio = distSftPio; | |
4131 | // // Mean distance | |
4132 | // meanDistPio+=distPio; | |
4133 | // meanDistSftPio+=distSftPio; | |
4134 | // nMeasPio++; | |
4135 | // // IROC | |
4136 | // if (iRadius<3){ | |
4137 | // if (distSftPio < minDistSftIrocPio) | |
4138 | // minDistSftIrocPio = distSftPio; | |
4139 | // meanDistSftIrocPio+=distSftPio; | |
4140 | // nMeasPioIroc++; | |
4141 | // } | |
4142 | // // OROC | |
4143 | // else { | |
4144 | // if (distSftPio < minDistSftOrocPio) | |
4145 | // minDistSftOrocPio = distSftPio; | |
4146 | // meanDistSftOrocPio+=distSftPio; | |
4147 | // nMeasPioOroc++; | |
4148 | // } | |
4149 | // } | |
4150 | // } // Loop over iRadius | |
4151 | ||
4152 | // // Require at least one measurement | |
4153 | // if ( (!nMeasPio) || (!nMeasPro) ) | |
4154 | // continue; | |
4155 | ||
4156 | // // Divide by the number of measurements to get the mean | |
4157 | // meanDistPro /= (Float_t)nMeasPro; | |
4158 | // meanDistPio /= (Float_t)nMeasPio; | |
4159 | // meanDistSftPro /= (Float_t)nMeasPro; | |
4160 | // meanDistSftPio /= (Float_t)nMeasPio; | |
4161 | ||
4162 | // // Fill the two track resolution histograms | |
4163 | // f2HistBgLamBgLamMeanMinDistProMixed->Fill(meanDistPro,minDistPro); | |
4164 | // f2HistBgLamBgLamMeanMinDistPioMixed->Fill(meanDistPio,minDistPio); | |
4165 | // f2HistSftBgLamBgLamMeanMinDistProMixed->Fill(meanDistSftPro,minDistSftPro); | |
4166 | // f2HistSftBgLamBgLamMeanMinDistPioMixed->Fill(meanDistSftPio,minDistSftPio); | |
4167 | // // Fill IROC / OROC histograms only with at least one measurement | |
4168 | // if (nMeasProIroc){ | |
4169 | // meanDistSftPro /= (Float_t)nMeasProIroc; | |
4170 | // f2HistSftIrocBgLamBgLamMeanMinDistProMixed->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
4171 | // } | |
4172 | // if (nMeasPioIroc){ | |
4173 | // meanDistSftPio /= (Float_t)nMeasPioIroc; | |
4174 | // f2HistSftIrocBgLamBgLamMeanMinDistPioMixed->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
4175 | // } | |
4176 | // if (nMeasProOroc){ | |
4177 | // meanDistSftPro /= (Float_t)nMeasProOroc; | |
4178 | // f2HistSftOrocBgLamBgLamMeanMinDistProMixed->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
4179 | // } | |
4180 | // if (nMeasPioOroc){ | |
4181 | // meanDistSftPio /= (Float_t)nMeasPioOroc; | |
4182 | // f2HistSftOrocBgLamBgLamMeanMinDistPioMixed->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
4183 | // } | |
4184 | ||
4185 | // // // Do a cut (value needs to be refined) | |
4186 | // // if ( meanDistSftPro < 2.0 || meanDistSftPio < 2.0 ) | |
4187 | // // continue; | |
4188 | ||
4189 | // // Fill the qinv, minv histogram | |
4190 | // f3HistBgLamBgLamQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], (fFemtoBuffer->GetEvt(iMix))->fBgLamTracks[iBgLam2]),minDistSftPro,minDistSftPio); | |
4191 | ||
4192 | // } // Second lambda loop | |
4193 | ||
4194 | ||
4195 | // Proton loop | |
4196 | for (iPro=0;iPro<(fFemtoBuffer->GetEvt(iMix))->GetNPro();iPro++){ | |
4197 | ||
4198 | // Skip if unUseIt() entry | |
4199 | if (!(fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].UseIt()) | |
4200 | continue; | |
4201 | ||
4202 | // Reset the distances for each pair | |
4203 | // minDistPro=999.0;meanDistPro=0.0; | |
4204 | minDistSftPro=999.0;meanDistSftPro=0.0; | |
4205 | // minDistSftIrocPro=999.0;meanDistSftIrocPro=0.0; | |
4206 | // minDistSftOrocPro=999.0;meanDistSftOrocPro=0.0; | |
4207 | // Reset the number of measurements for the mean | |
4208 | nMeasPro=0;//nMeasProIroc=0;nMeasProOroc=0; | |
4209 | ||
4210 | // Check for two-track resolution | |
4211 | for (iRadius=0;iRadius<9;iRadius++){ | |
4212 | // Get the spatial distance at each radius | |
4213 | // distPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].fXglobal[iRadius]); | |
4214 | distSftPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter.fXshifted[iRadius], | |
4215 | (fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4216 | ||
4217 | ||
4218 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
4219 | if (distSftPro > -1.0){ | |
4220 | // Minimum distance | |
4221 | // if (distPro < minDistPro) | |
4222 | // minDistPro = distPro; | |
4223 | if (distSftPro < minDistSftPro) | |
4224 | minDistSftPro = distSftPro; | |
4225 | // Mean distance | |
4226 | // meanDistPro+=distPro; | |
4227 | meanDistSftPro+=distSftPro; | |
4228 | nMeasPro++; | |
4229 | // // IROC | |
4230 | // if (iRadius<3){ | |
4231 | // if (distSftPro < minDistSftIrocPro) | |
4232 | // minDistSftIrocPro = distSftPro; | |
4233 | // meanDistSftIrocPro+=distSftPro; | |
4234 | // nMeasProIroc++; | |
4235 | // } | |
4236 | // // OROC | |
4237 | // else { | |
4238 | // if (distSftPro < minDistSftOrocPro) | |
4239 | // minDistSftOrocPro = distSftPro; | |
4240 | // meanDistSftOrocPro+=distSftPro; | |
4241 | // nMeasProOroc++; | |
4242 | // } | |
4243 | } | |
4244 | } // Loop over iRadius | |
4245 | ||
4246 | // Require at least one measurement | |
4247 | if ( !nMeasPro ) | |
4248 | continue; | |
4249 | ||
4250 | // Divide by the number of measurements to get the mean | |
4251 | // meanDistPro /= (Float_t)nMeasPro; | |
4252 | meanDistSftPro /= (Float_t)nMeasPro; | |
4253 | ||
4254 | // // Fill the two track resolution histogram | |
4255 | // f2HistBgLamProMeanMinDistProMixed->Fill(meanDistPro,minDistPro); | |
4256 | // f2HistSftBgLamProMeanMinDistProMixed->Fill(meanDistSftPro,minDistSftPro); | |
4257 | // // Fill IROC / OROC histograms only with at least one measurement | |
4258 | // if (nMeasProIroc){ | |
4259 | // meanDistSftIrocPro /= (Float_t)nMeasProIroc; | |
4260 | // f2HistSftIrocBgLamProMeanMinDistProMixed->Fill(meanDistSftIrocPro,minDistSftIrocPro); | |
4261 | // } | |
4262 | // if (nMeasProOroc){ | |
4263 | // meanDistSftOrocPro /= (Float_t)nMeasProOroc; | |
4264 | // f2HistSftOrocBgLamProMeanMinDistProMixed->Fill(meanDistSftOrocPro,minDistSftOrocPro); | |
4265 | // } | |
4266 | ||
4267 | // // Do a cut (value needs to be refined) | |
4268 | // if ( meanDistSftPro < 2.0 ) | |
4269 | // continue; | |
4270 | ||
4271 | // Since sept '12 do THnSparse with qinvpropro, | |
4272 | // mean dist propro, min dist propro, qinv lampro | |
4273 | Double_t x[4]={ | |
4274 | QinvProPro(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam].fPosDaughter, | |
4275 | fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]), | |
4276 | meanDistSftPro, | |
4277 | minDistSftPro, | |
4278 | Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], | |
4279 | fFemtoBuffer->GetEvt(iMix)->fProTracks[iPro]) | |
4280 | }; | |
4281 | BgLamProMixed->Fill(x); | |
4282 | ||
4283 | ||
4284 | // Fill the qinv histogram | |
4285 | // f3HistBgLamProQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgLamTracks[iBgLam], (fFemtoBuffer->GetEvt(iMix))->fProTracks[iPro]),meanDistSftPro,minDistSftPro); | |
4286 | ||
4287 | }// Proton loop | |
4288 | }// BgLambda loop | |
4289 | ||
4290 | ||
4291 | // Anti-lambda loop | |
4292 | for (iBgALam = 0; iBgALam < fFemtoBuffer->GetEvt(0)->GetNBgALam(); iBgALam++){ | |
4293 | ||
4294 | // Skip if unUseIt() entry | |
4295 | if (!fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].UseIt()) | |
4296 | continue; | |
4297 | ||
4298 | // // Second anti-lambda loop | |
4299 | // for (iBgALam2 = 0; iBgALam2 < (fFemtoBuffer->GetEvt(iMix))->GetNBgALam(); iBgALam2++){ | |
4300 | ||
4301 | // // Skip if unUseIt() entry | |
4302 | // if (!(fFemtoBuffer->GetEvt(iMix))->fBgALamTracks[iBgALam2].UseIt()) | |
4303 | // continue; | |
4304 | ||
4305 | // // Reset the distances for each pair | |
4306 | // minDistAPro=999.0;meanDistAPro=0.0;minDistPio=999.0;meanDistPio=0.0; | |
4307 | // minDistSftAPro=999.0;meanDistSftAPro=0.0;minDistSftPio=999.0;meanDistSftPio=0.0; | |
4308 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0;minDistSftIrocPio=999.0;meanDistSftIrocPio=0.0; | |
4309 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0;minDistSftOrocPio=999.0;meanDistSftOrocPio=0.0; | |
4310 | ||
4311 | // // Reset the number of measurements for the mean | |
4312 | // nMeasAPro=0;nMeasPio=0;nMeasAProIroc=0;nMeasPioIroc=0;nMeasAProOroc=0;nMeasPioOroc=0; | |
4313 | ||
4314 | // // Check for two-track resolution | |
4315 | // for (iRadius=0;iRadius<9;iRadius++){ | |
4316 | // // Get the spatial distance at each radius | |
4317 | // distPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fPosDaughter.fXglobal[iRadius], | |
4318 | // (fFemtoBuffer->GetEvt(iMix))->fBgALamTracks[iBgALam2].fPosDaughter.fXglobal[iRadius]); | |
4319 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXglobal[iRadius], | |
4320 | // (fFemtoBuffer->GetEvt(iMix))->fBgALamTracks[iBgALam2].fNegDaughter.fXglobal[iRadius]); | |
4321 | // // Shifted distances | |
4322 | // distSftPio = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fPosDaughter.fXshifted[iRadius], | |
4323 | // fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fPosDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4324 | // distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXshifted[iRadius], | |
4325 | // fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam2].fNegDaughter.fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4326 | ||
4327 | // // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
4328 | // if (distAPro > -1.0){ | |
4329 | // // Minimum distance | |
4330 | // if (distAPro < minDistAPro) | |
4331 | // minDistAPro = distAPro; | |
4332 | // if (distSftAPro < minDistSftAPro) | |
4333 | // minDistSftAPro = distSftAPro; | |
4334 | // // Mean distance | |
4335 | // meanDistAPro+=distAPro; | |
4336 | // meanDistSftAPro+=distSftAPro; | |
4337 | // nMeasAPro++; | |
4338 | // // IROC | |
4339 | // if (iRadius<3){ | |
4340 | // if (distSftAPro < minDistSftIrocAPro) | |
4341 | // minDistSftIrocAPro = distSftAPro; | |
4342 | // meanDistSftIrocAPro+=distSftAPro; | |
4343 | // nMeasAProIroc++; | |
4344 | // } | |
4345 | // // OROC | |
4346 | // else { | |
4347 | // if (distSftAPro < minDistSftOrocAPro) | |
4348 | // minDistSftOrocAPro = distSftAPro; | |
4349 | // meanDistSftOrocAPro+=distSftAPro; | |
4350 | // nMeasAProOroc++; | |
4351 | // } | |
4352 | // } | |
4353 | ||
4354 | // if (distPio > -1.0){ | |
4355 | // // Minimum distance | |
4356 | // if (distPio < minDistPio) | |
4357 | // minDistPio = distPio; | |
4358 | // if (distSftPio < minDistSftPio) | |
4359 | // minDistSftPio = distSftPio; | |
4360 | // // Mean distance | |
4361 | // meanDistPio+=distPio; | |
4362 | // meanDistSftPio+=distSftPio; | |
4363 | // nMeasPio++; | |
4364 | // // IROC | |
4365 | // if (iRadius<3){ | |
4366 | // if (distSftPio < minDistSftIrocPio) | |
4367 | // minDistSftIrocPio = distSftPio; | |
4368 | // meanDistSftIrocPio+=distSftPio; | |
4369 | // nMeasPioIroc++; | |
4370 | // } | |
4371 | // // OROC | |
4372 | // else { | |
4373 | // if (distSftPio < minDistSftOrocPio) | |
4374 | // minDistSftOrocPio = distSftPio; | |
4375 | // meanDistSftOrocPio+=distSftPio; | |
4376 | // nMeasPioOroc++; | |
4377 | // } | |
4378 | // } | |
4379 | ||
4380 | // } // Loop over iRadius | |
4381 | ||
4382 | // // Require at least one measurement | |
4383 | // if ( (!nMeasPio) || (!nMeasAPro) ) | |
4384 | // continue; | |
4385 | ||
4386 | // // Divide by the number of measurements to get the mean | |
4387 | // meanDistAPro /= (Float_t)nMeasAPro; | |
4388 | // meanDistPio /= (Float_t)nMeasPio; | |
4389 | // meanDistSftAPro /= (Float_t)nMeasAPro; | |
4390 | // meanDistSftPio /= (Float_t)nMeasPio; | |
4391 | ||
4392 | // // Fill the two track resolution histograms | |
4393 | // f2HistBgALamBgALamMeanMinDistAProMixed->Fill(meanDistAPro,minDistAPro); | |
4394 | // f2HistBgALamBgALamMeanMinDistPioMixed->Fill(meanDistPio,minDistPio); | |
4395 | // f2HistSftBgALamBgALamMeanMinDistAProMixed->Fill(meanDistSftAPro,minDistSftAPro); | |
4396 | // f2HistSftBgALamBgALamMeanMinDistPioMixed->Fill(meanDistSftPio,minDistSftPio); | |
4397 | ||
4398 | // // Fill IROC / OROC histograms only with at least one measurement | |
4399 | // if (nMeasAProIroc){ | |
4400 | // meanDistSftIrocAPro /= (Float_t)nMeasAProIroc; | |
4401 | // f2HistSftIrocBgALamBgALamMeanMinDistAProMixed->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
4402 | // } | |
4403 | // if (nMeasPioIroc){ | |
4404 | // meanDistSftPio /= (Float_t)nMeasPioIroc; | |
4405 | // f2HistSftIrocBgALamBgALamMeanMinDistPioMixed->Fill(meanDistSftIrocPio,minDistSftIrocPio); | |
4406 | // } | |
4407 | // if (nMeasAProOroc){ | |
4408 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
4409 | // f2HistSftOrocBgALamBgALamMeanMinDistAProMixed->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
4410 | // } | |
4411 | // if (nMeasPioOroc){ | |
4412 | // meanDistSftPio /= (Float_t)nMeasPioOroc; | |
4413 | // f2HistSftOrocBgALamBgALamMeanMinDistPioMixed->Fill(meanDistSftOrocPio,minDistSftOrocPio); | |
4414 | // } | |
4415 | // // // Do a cut (value needs to be refined) | |
4416 | // // if ( meanDistSftAPro < 2.0 || meanDistSftPio < 2.0 ) | |
4417 | // // continue; | |
4418 | ||
4419 | // // Fill the qinv, minv histogram | |
4420 | // f3HistBgALamBgALamQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], (fFemtoBuffer->GetEvt(iMix))->fBgALamTracks[iBgALam2]),minDistSftAPro,minDistSftPio); | |
4421 | ||
4422 | // } // Second lambda loop | |
4423 | ||
4424 | // AProton loop | |
4425 | for (iAPro=0;iAPro<(fFemtoBuffer->GetEvt(iMix))->GetNAPro();iAPro++){ | |
4426 | ||
4427 | // Skip if unUseIt() entry | |
4428 | if (!(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].UseIt()) | |
4429 | continue; | |
4430 | ||
4431 | // Reset the distances for each pair | |
4432 | // minDistAPro=999.0;meanDistAPro=0.0; | |
4433 | minDistSftAPro=999.0;meanDistSftAPro=0.0; | |
4434 | // minDistSftIrocAPro=999.0;meanDistSftIrocAPro=0.0; | |
4435 | // minDistSftOrocAPro=999.0;meanDistSftOrocAPro=0.0; | |
4436 | // Reset the number of measurements for the mean | |
4437 | nMeasAPro=0;//nMeasAProIroc=0;nMeasAProOroc=0; | |
4438 | ||
4439 | // Check for two-track resolution | |
4440 | for (iRadius=0;iRadius<9;iRadius++){ | |
4441 | // Get the spatial distance at each radius | |
4442 | // distAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXglobal[iRadius],(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].fXglobal[iRadius]); | |
4443 | distSftAPro = calcDist(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter.fXshifted[iRadius],(fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro].fXshifted[iRadius]);//,fFemtoBuffer->GetEvt(0),(fFemtoBuffer->GetEvt(iMix))); | |
4444 | ||
4445 | // calcDist returns -2.0 if one shouldn't use this distance, see calcDist function | |
4446 | if (distSftAPro > -1.0){ | |
4447 | // Minimum distance | |
4448 | // if (distAPro < minDistAPro) | |
4449 | // minDistAPro = distAPro; | |
4450 | if (distSftAPro < minDistSftAPro) | |
4451 | minDistSftAPro = distSftAPro; | |
4452 | // Mean distance | |
4453 | // meanDistAPro+=distAPro; | |
4454 | meanDistSftAPro+=distSftAPro; | |
4455 | nMeasAPro++; | |
4456 | // // IROC | |
4457 | // if (iRadius<3){ | |
4458 | // if (distSftAPro < minDistSftIrocAPro) | |
4459 | // minDistSftIrocAPro = distSftAPro; | |
4460 | // meanDistSftIrocAPro+=distSftAPro; | |
4461 | // nMeasAProIroc++; | |
4462 | // } | |
4463 | // // OROC | |
4464 | // else { | |
4465 | // if (distSftAPro < minDistSftOrocAPro) | |
4466 | // minDistSftOrocAPro = distSftAPro; | |
4467 | // meanDistSftOrocAPro+=distSftAPro; | |
4468 | // nMeasAProOroc++; | |
4469 | // } | |
4470 | } | |
4471 | } // Loop over iRadius | |
4472 | ||
4473 | // Require at least one measurement | |
4474 | if ( !nMeasAPro ) | |
4475 | continue; | |
4476 | ||
4477 | // Divide by the number of measurements to get the mean | |
4478 | // meanDistAPro /= (Float_t)nMeasAPro; | |
4479 | meanDistSftAPro /= (Float_t)nMeasAPro; | |
4480 | ||
4481 | // // Fill the two track resolution histogram | |
4482 | // f2HistBgALamAProMeanMinDistAProMixed->Fill(meanDistAPro,minDistAPro); | |
4483 | // f2HistSftBgALamAProMeanMinDistAProMixed->Fill(meanDistSftAPro,minDistSftAPro); | |
4484 | ||
4485 | // // Fill IROC / OROC histograms only with at least one measurement | |
4486 | // if (nMeasAProIroc){ | |
4487 | // meanDistSftAPro /= (Float_t)nMeasAProIroc; | |
4488 | // f2HistSftIrocBgALamAProMeanMinDistAProMixed->Fill(meanDistSftIrocAPro,minDistSftIrocAPro); | |
4489 | // } | |
4490 | // if (nMeasAProOroc){ | |
4491 | // meanDistSftAPro /= (Float_t)nMeasAProOroc; | |
4492 | // f2HistSftOrocBgALamAProMeanMinDistAProMixed->Fill(meanDistSftOrocAPro,minDistSftOrocAPro); | |
4493 | // } | |
4494 | // // Do a cut (value needs to be refined) | |
4495 | // if ( meanDistSftAPro < 2.0 ) | |
4496 | // continue; | |
4497 | ||
4498 | // Use THnSparse since Sept '12 | |
4499 | Double_t x[4]={ | |
4500 | QinvProPro(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam].fNegDaughter, | |
4501 | fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]), | |
4502 | meanDistSftAPro, | |
4503 | minDistSftAPro, | |
4504 | Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], | |
4505 | fFemtoBuffer->GetEvt(iMix)->fAProTracks[iAPro]) | |
4506 | }; | |
4507 | BgALamAProMixed->Fill(x); | |
4508 | ||
4509 | // Fill the qinv histogram | |
4510 | // f3HistBgALamAProQinvMixed->Fill(Qinv(fFemtoBuffer->GetEvt(0)->fBgALamTracks[iBgALam], (fFemtoBuffer->GetEvt(iMix))->fAProTracks[iAPro]),meanDistSftAPro,minDistSftAPro); | |
4511 | ||
4512 | }// AProton loop | |
4513 | }// BgALambda loop | |
4514 | ||
4515 | }// Event buffer loop | |
4516 | ||
4517 | }// End of void ProcessMixedBackground | |
4518 | ||
4519 | //________________________________________________________________________ | |
4520 | Float_t AliAnalysisTaskProtonLambda::Qinv(FemtoBufferV0 v01, FemtoBufferV0 v02){ | |
4521 | // Copied from NA49. See http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Qinv | |
4522 | // Always using lambda mass (no mass difference found yet for lam <-> alam (see PDG)) | |
4523 | ||
4524 | // printf("v01 px %3.2f py %3.2f pz %3.2f" | |
4525 | // "v02 px %3.2f py %3.2f pz %3.2f" | |
4526 | // "\n" | |
4527 | // ,v01.fP[0],v01.fP[1],v01.fP[2] | |
4528 | // ,v02.fP[0],v02.fP[1],v02.fP[2] | |
4529 | // ); | |
4530 | ||
4531 | //Double_t e1 = t1->GetE(mPart1); | |
4532 | Double_t e1 = sqrt(fkLamMass*fkLamMass + v01.fP[0]*v01.fP[0]+v01.fP[1]*v01.fP[1]+v01.fP[2]*v01.fP[2]); | |
4533 | //Double_t e2 = t2->GetE(mPart2); | |
4534 | Double_t e2 = sqrt(fkLamMass*fkLamMass + v02.fP[0]*v02.fP[0]+v02.fP[1]*v02.fP[1]+v02.fP[2]*v02.fP[2]); | |
4535 | Double_t qinvL; | |
4536 | Double_t qP; | |
4537 | Double_t pinv; | |
4538 | ||
4539 | // First calculate -Qinv^2 as usual : | |
4540 | //qinvL = (e1-e2) * (e1-e2) - Q(t1,t2) * Q(t1,t2); | |
4541 | qinvL = (e1-e2) * (e1-e2) - ( (v01.fP[0]-v02.fP[0])*(v01.fP[0]-v02.fP[0]) + (v01.fP[1]-v02.fP[1])*(v01.fP[1]-v02.fP[1]) + (v01.fP[2]-v02.fP[2])*(v01.fP[2]-v02.fP[2]) ); | |
4542 | ||
4543 | //Qx(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()-t2->GetPx()); }; | |
4544 | //static Double_t Qy(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPy()-t2->GetPy()); }; | |
4545 | //static Double_t Qz(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPz()-t2->GetPz()); }; | |
4546 | //static Double_t Q(T49ParticleRoot* t1,T49ParticleRoot* t2) | |
4547 | // { return TMath::Sqrt(Qx(t1,t2)*Qx(t1,t2)+Qy(t1,t2)*Qy(t1,t2)+Qz(t1,t2)*Qz(t1,t2)); }; | |
4548 | ||
4549 | ||
4550 | ||
4551 | //static Double_t Px(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()+t2->GetPx()); }; | |
4552 | //qP = (e1-e2) * (e1+e2) | |
4553 | // - Qx(t1,t2) * Px(t1,t2) | |
4554 | // - Qy(t1,t2) * Py(t1,t2) | |
4555 | // - Qz(t1,t2) * Pz(t1,t2); | |
4556 | qP = (e1-e2) * (e1+e2) | |
4557 | - (v01.fP[0]-v02.fP[0]) * (v01.fP[0]+v02.fP[0]) | |
4558 | - (v01.fP[1]-v02.fP[1]) * (v01.fP[1]+v02.fP[1]) | |
4559 | - (v01.fP[2]-v02.fP[2]) * (v01.fP[2]+v02.fP[2]); | |
4560 | ||
4561 | //pinv = (e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2); | |
4562 | pinv = (e1+e2) * (e1+e2) - ( (v01.fP[0]+v02.fP[0])*(v01.fP[0]+v02.fP[0]) | |
4563 | +(v01.fP[1]+v02.fP[1])*(v01.fP[1]+v02.fP[1]) | |
4564 | +(v01.fP[2]+v02.fP[2])*(v01.fP[2]+v02.fP[2])); | |
4565 | ||
4566 | return TMath::Sqrt(qP*qP/pinv - qinvL); | |
4567 | } | |
4568 | //________________________________________________________________________ | |
4569 | Float_t AliAnalysisTaskProtonLambda::Qinv(FemtoBufferV0 v0, FemtoBufferTrack track) { | |
4570 | // Copied from NA49. See http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Qinv | |
4571 | // Always using lambda mass (no mass difference found yet for lam <-> alam (see PDG)) | |
4572 | ||
4573 | // Double_t e1 = t1->GetE(mPart1); | |
4574 | Double_t e1 = sqrt(fkLamMass*fkLamMass + v0.fP[0]*v0.fP[0]+v0.fP[1]*v0.fP[1]+v0.fP[2]*v0.fP[2]); | |
4575 | // Double_t e2 = t2->GetE(mPart2); | |
4576 | Double_t e2 = sqrt(fkProMass*fkProMass + track.fP[0]*track.fP[0]+track.fP[1]*track.fP[1]+track.fP[2]*track.fP[2]); | |
4577 | Double_t qinvL; | |
4578 | Double_t qP; | |
4579 | Double_t pinv; | |
4580 | ||
4581 | // First calculate -Qinv^2 as usual : | |
4582 | //qinvL = (e1-e2) * (e1-e2) - Q(t1,t2) * Q(t1,t2); | |
4583 | qinvL = (e1-e2) * (e1-e2) - ( (v0.fP[0]-track.fP[0])*(v0.fP[0]-track.fP[0]) + (v0.fP[1]-track.fP[1])*(v0.fP[1]-track.fP[1]) + (v0.fP[2]-track.fP[2])*(v0.fP[2]-track.fP[2]) ); | |
4584 | ||
4585 | //Qx(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()-t2->GetPx()); }; | |
4586 | //static Double_t Qy(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPy()-t2->GetPy()); }; | |
4587 | //static Double_t Qz(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPz()-t2->GetPz()); }; | |
4588 | //static Double_t Q(T49ParticleRoot* t1,T49ParticleRoot* t2) | |
4589 | // { return TMath::Sqrt(Qx(t1,t2)*Qx(t1,t2)+Qy(t1,t2)*Qy(t1,t2)+Qz(t1,t2)*Qz(t1,t2)); }; | |
4590 | ||
4591 | ||
4592 | ||
4593 | //static Double_t Px(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()+t2->GetPx()); }; | |
4594 | //qP = (e1-e2) * (e1+e2) | |
4595 | // - Qx(t1,t2) * Px(t1,t2) | |
4596 | // - Qy(t1,t2) * Py(t1,t2) | |
4597 | // - Qz(t1,t2) * Pz(t1,t2); | |
4598 | qP = (e1-e2) * (e1+e2) | |
4599 | - (v0.fP[0]-track.fP[0]) * (v0.fP[0]+track.fP[0]) | |
4600 | - (v0.fP[1]-track.fP[1]) * (v0.fP[1]+track.fP[1]) | |
4601 | - (v0.fP[2]-track.fP[2]) * (v0.fP[2]+track.fP[2]); | |
4602 | ||
4603 | //pinv = (e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2); | |
4604 | pinv = (e1+e2) * (e1+e2) - ( (v0.fP[0]+track.fP[0])*(v0.fP[0]+track.fP[0]) | |
4605 | +(v0.fP[1]+track.fP[1])*(v0.fP[1]+track.fP[1]) | |
4606 | +(v0.fP[2]+track.fP[2])*(v0.fP[2]+track.fP[2])); | |
4607 | ||
4608 | return TMath::Sqrt(qP*qP/pinv - qinvL); | |
4609 | } | |
4610 | //________________________________________________________________________ | |
4611 | Float_t AliAnalysisTaskProtonLambda::Qinv(FemtoBufferTrack track, FemtoBufferV0 v0){ | |
4612 | return Qinv(v0, track); | |
4613 | } | |
4614 | //________________________________________________________________________ | |
4615 | Float_t AliAnalysisTaskProtonLambda::QinvProPro(FemtoBufferTrack proTrack1, FemtoBufferTrack proTrack2) { | |
4616 | // Same as above, with different masses for the tracks, | |
4617 | // here both tracks are protons | |
4618 | ||
4619 | // Copied from NA49. See http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Qinv | |
4620 | ||
4621 | // PDG_t e1 = t1->GetE(mPart1); | |
4622 | Double_t e1 = sqrt(fkProMass*fkProMass + proTrack1.fP[0]*proTrack1.fP[0]+proTrack1.fP[1]*proTrack1.fP[1]+proTrack1.fP[2]*proTrack1.fP[2]); | |
4623 | // Double_t e2 = t2->GetE(mPart2); | |
4624 | Double_t e2 = sqrt(fkProMass*fkProMass + proTrack2.fP[0]*proTrack2.fP[0]+proTrack2.fP[1]*proTrack2.fP[1]+proTrack2.fP[2]*proTrack2.fP[2]); | |
4625 | Double_t qinvL; | |
4626 | Double_t qP; | |
4627 | Double_t pinv; | |
4628 | ||
4629 | // First calculate -Qinv^2 as usual : | |
4630 | //qinvL = (e1-e2) * (e1-e2) - Q(t1,t2) * Q(t1,t2); | |
4631 | qinvL = (e1-e2) * (e1-e2) - ( (proTrack1.fP[0]-proTrack2.fP[0])*(proTrack1.fP[0]-proTrack2.fP[0]) + (proTrack1.fP[1]-proTrack2.fP[1])*(proTrack1.fP[1]-proTrack2.fP[1]) + (proTrack1.fP[2]-proTrack2.fP[2])*(proTrack1.fP[2]-proTrack2.fP[2]) ); | |
4632 | ||
4633 | //Qx(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()-t2->GetPx()); }; | |
4634 | //static Double_t Qy(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPy()-t2->GetPy()); }; | |
4635 | //static Double_t Qz(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPz()-t2->GetPz()); }; | |
4636 | //static Double_t Q(T49ParticleRoot* t1,T49ParticleRoot* t2) | |
4637 | // { return TMath::Sqrt(Qx(t1,t2)*Qx(t1,t2)+Qy(t1,t2)*Qy(t1,t2)+Qz(t1,t2)*Qz(t1,t2)); }; | |
4638 | ||
4639 | ||
4640 | ||
4641 | //static Double_t Px(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()+t2->GetPx()); }; | |
4642 | //qP = (e1-e2) * (e1+e2) | |
4643 | // - Qx(t1,t2) * Px(t1,t2) | |
4644 | // - Qy(t1,t2) * Py(t1,t2) | |
4645 | // - Qz(t1,t2) * Pz(t1,t2); | |
4646 | qP = (e1-e2) * (e1+e2) | |
4647 | - (proTrack1.fP[0]-proTrack2.fP[0]) * (proTrack1.fP[0]+proTrack2.fP[0]) | |
4648 | - (proTrack1.fP[1]-proTrack2.fP[1]) * (proTrack1.fP[1]+proTrack2.fP[1]) | |
4649 | - (proTrack1.fP[2]-proTrack2.fP[2]) * (proTrack1.fP[2]+proTrack2.fP[2]); | |
4650 | ||
4651 | //pinv = (e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2); | |
4652 | pinv = (e1+e2) * (e1+e2) - ( (proTrack1.fP[0]+proTrack2.fP[0])*(proTrack1.fP[0]+proTrack2.fP[0]) | |
4653 | +(proTrack1.fP[1]+proTrack2.fP[1])*(proTrack1.fP[1]+proTrack2.fP[1]) | |
4654 | +(proTrack1.fP[2]+proTrack2.fP[2])*(proTrack1.fP[2]+proTrack2.fP[2])); | |
4655 | ||
4656 | return TMath::Sqrt(qP*qP/pinv - qinvL); | |
4657 | } | |
4658 | //________________________________________________________________________ | |
4659 | Float_t AliAnalysisTaskProtonLambda::QinvPioPro(FemtoBufferTrack pioTrack, FemtoBufferTrack proTrack) { | |
4660 | // Same as above, with different masses for the tracks, | |
4661 | // here both tracks are protons | |
4662 | ||
4663 | // Copied from NA49. See http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Qinv | |
4664 | ||
4665 | // PDG_t e1 = t1->GetE(mPart1); | |
4666 | Double_t e1 = sqrt(fkPioMass*fkPioMass + pioTrack.fP[0]*pioTrack.fP[0]+pioTrack.fP[1]*pioTrack.fP[1]+pioTrack.fP[2]*pioTrack.fP[2]); | |
4667 | // Double_t e2 = t2->GetE(mPart2); | |
4668 | Double_t e2 = sqrt(fkProMass*fkProMass + proTrack.fP[0]*proTrack.fP[0]+proTrack.fP[1]*proTrack.fP[1]+proTrack.fP[2]*proTrack.fP[2]); | |
4669 | Double_t qinvL; | |
4670 | Double_t qP; | |
4671 | Double_t pinv; | |
4672 | ||
4673 | // First calculate -Qinv^2 as usual : | |
4674 | //qinvL = (e1-e2) * (e1-e2) - Q(t1,t2) * Q(t1,t2); | |
4675 | qinvL = (e1-e2) * (e1-e2) - ( (pioTrack.fP[0]-proTrack.fP[0])*(pioTrack.fP[0]-proTrack.fP[0]) + (pioTrack.fP[1]-proTrack.fP[1])*(pioTrack.fP[1]-proTrack.fP[1]) + (pioTrack.fP[2]-proTrack.fP[2])*(pioTrack.fP[2]-proTrack.fP[2]) ); | |
4676 | ||
4677 | //Qx(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()-t2->GetPx()); }; | |
4678 | //static Double_t Qy(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPy()-t2->GetPy()); }; | |
4679 | //static Double_t Qz(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPz()-t2->GetPz()); }; | |
4680 | //static Double_t Q(T49ParticleRoot* t1,T49ParticleRoot* t2) | |
4681 | // { return TMath::Sqrt(Qx(t1,t2)*Qx(t1,t2)+Qy(t1,t2)*Qy(t1,t2)+Qz(t1,t2)*Qz(t1,t2)); }; | |
4682 | ||
4683 | ||
4684 | ||
4685 | //static Double_t Px(T49ParticleRoot* t1,T49ParticleRoot* t2) { return (t1->GetPx()+t2->GetPx()); }; | |
4686 | //qP = (e1-e2) * (e1+e2) | |
4687 | // - Qx(t1,t2) * Px(t1,t2) | |
4688 | // - Qy(t1,t2) * Py(t1,t2) | |
4689 | // - Qz(t1,t2) * Pz(t1,t2); | |
4690 | qP = (e1-e2) * (e1+e2) | |
4691 | - (pioTrack.fP[0]-proTrack.fP[0]) * (pioTrack.fP[0]+proTrack.fP[0]) | |
4692 | - (pioTrack.fP[1]-proTrack.fP[1]) * (pioTrack.fP[1]+proTrack.fP[1]) | |
4693 | - (pioTrack.fP[2]-proTrack.fP[2]) * (pioTrack.fP[2]+proTrack.fP[2]); | |
4694 | ||
4695 | //pinv = (e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2); | |
4696 | pinv = (e1+e2) * (e1+e2) - ( (pioTrack.fP[0]+proTrack.fP[0])*(pioTrack.fP[0]+proTrack.fP[0]) | |
4697 | +(pioTrack.fP[1]+proTrack.fP[1])*(pioTrack.fP[1]+proTrack.fP[1]) | |
4698 | +(pioTrack.fP[2]+proTrack.fP[2])*(pioTrack.fP[2]+proTrack.fP[2])); | |
4699 | ||
4700 | return TMath::Sqrt(qP*qP/pinv - qinvL); | |
4701 | } | |
4702 | //________________________________________________________________________ | |
4703 | // Float_t AliAnalysisTaskProtonLambda::QinvConstr(FemtoBufferV0 v0, FemtoBufferTrack track) { | |
4704 | // // Same as Qinv(v0,track) but with constrained momentum for the track | |
4705 | ||
4706 | // // Check whether constrained momentum is there | |
4707 | // if ((track.fPconstr[0]<0.00001)&&(track.fPconstr[1]<0.00001)&&(track.fPconstr[2]<0.00001)) | |
4708 | // return Qinv(v0,track); | |
4709 | ||
4710 | // // Standard Qinv(v0, track), just with constrained momentum instead of TPC only momentum | |
4711 | // Double_t e1 = sqrt(fkLamMass*fkLamMass + v0.fP[0]*v0.fP[0]+v0.fP[1]*v0.fP[1]+v0.fP[2]*v0.fP[2]); | |
4712 | // Double_t e2 = sqrt(fkProMass*fkProMass + track.fPconstr[0]*track.fPconstr[0]+track.fPconstr[1]*track.fPconstr[1]+track.fPconstr[2]*track.fPconstr[2]); | |
4713 | // Double_t qinvL; | |
4714 | // Double_t qP; | |
4715 | // Double_t pinv; | |
4716 | // qinvL = (e1-e2) * (e1-e2) - ( (v0.fP[0]-track.fPconstr[0])*(v0.fP[0]-track.fPconstr[0]) + (v0.fP[1]-track.fPconstr[1])*(v0.fP[1]-track.fPconstr[1]) + (v0.fP[2]-track.fPconstr[2])*(v0.fP[2]-track.fPconstr[2]) ); | |
4717 | // qP = (e1-e2) * (e1+e2) | |
4718 | // - (v0.fP[0]-track.fPconstr[0]) * (v0.fP[0]+track.fPconstr[0]) | |
4719 | // - (v0.fP[1]-track.fPconstr[1]) * (v0.fP[1]+track.fPconstr[1]) | |
4720 | // - (v0.fP[2]-track.fPconstr[2]) * (v0.fP[2]+track.fPconstr[2]); | |
4721 | // pinv = (e1+e2) * (e1+e2) - ( (v0.fP[0]+track.fPconstr[0])*(v0.fP[0]+track.fPconstr[0]) | |
4722 | // +(v0.fP[1]+track.fPconstr[1])*(v0.fP[1]+track.fPconstr[1]) | |
4723 | // +(v0.fP[2]+track.fPconstr[2])*(v0.fP[2]+track.fPconstr[2])); | |
4724 | ||
4725 | // return TMath::Sqrt(qP*qP/pinv - qinvL); | |
4726 | // } | |
4727 | // //________________________________________________________________________ | |
4728 | // Float_t AliAnalysisTaskProtonLambda::QinvConstr(FemtoBufferTrack track, FemtoBufferV0 v0){ | |
4729 | // return QinvConstr(v0, track); | |
4730 | // } | |
4731 | //________________________________________________________________________ | |
4732 | Float_t AliAnalysisTaskProtonLambda::Minv(FemtoBufferV0 v01, FemtoBufferV0 v02){ | |
4733 | // Taken from NA49. See | |
4734 | // http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Minv | |
4735 | ||
4736 | // Double_t e1 = t1->GetE(mPart1); | |
4737 | // Double_t e2 = t2->GetE(mPart2); | |
4738 | // GetE(Float_t mass) { return sqrt(GetP()*GetP()+mass*mass); } | |
4739 | Float_t e1 = TMath::Sqrt(v01.fP[0]*v01.fP[0] + v01.fP[1]*v01.fP[1] + v01.fP[2]*v01.fP[2] | |
4740 | + fkLamMass*fkLamMass); | |
4741 | Float_t e2 = TMath::Sqrt(v02.fP[0]*v02.fP[0] + v02.fP[1]*v02.fP[1] + v02.fP[2]*v02.fP[2] | |
4742 | + fkLamMass*fkLamMass); | |
4743 | ||
4744 | // return TMath::Sqrt((e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2)); | |
4745 | return TMath::Sqrt((e1+e2) * (e1+e2) - ( (v01.fP[0]+v02.fP[0])*(v01.fP[0]+v02.fP[0]) | |
4746 | +(v01.fP[1]+v02.fP[1])*(v01.fP[1]+v02.fP[1]) | |
4747 | +(v01.fP[2]+v02.fP[2])*(v01.fP[2]+v02.fP[2]))); | |
4748 | ||
4749 | } | |
4750 | //________________________________________________________________________ | |
4751 | Float_t AliAnalysisTaskProtonLambda::Minv(FemtoBufferV0 v0, FemtoBufferTrack track){ | |
4752 | // Taken from NA49. See | |
4753 | // http://na49info.web.cern.ch/na49info/na49/Software/minidst/ana/html/src/T49Tool.cxx.html#T49Tool:Minv | |
4754 | ||
4755 | // Double_t e1 = t1->GetE(mPart1); | |
4756 | // Double_t e2 = t2->GetE(mPart2); | |
4757 | // GetE(Float_t mass) { return sqrt(GetP()*GetP()+mass*mass); } | |
4758 | Float_t e1 = TMath::Sqrt(v0.fP[0]*v0.fP[0] + v0.fP[1]*v0.fP[1] + v0.fP[2]*v0.fP[2] | |
4759 | + fkLamMass*fkLamMass); | |
4760 | Float_t e2 = TMath::Sqrt(track.fP[0]*track.fP[0] + track.fP[1]*track.fP[1] + track.fP[2]*track.fP[2] | |
4761 | + fkProMass*fkProMass); | |
4762 | ||
4763 | // return TMath::Sqrt((e1+e2) * (e1+e2) - P(t1,t2) * P(t1,t2)); | |
4764 | return TMath::Sqrt((e1+e2) * (e1+e2) - ( (v0.fP[0]+track.fP[0])*(v0.fP[0]+track.fP[0]) | |
4765 | +(v0.fP[1]+track.fP[1])*(v0.fP[1]+track.fP[1]) | |
4766 | +(v0.fP[2]+track.fP[2])*(v0.fP[2]+track.fP[2]))); | |
4767 | ||
4768 | } | |
4769 | //________________________________________________________________________ | |
4770 | Float_t AliAnalysisTaskProtonLambda::Minv(FemtoBufferTrack track, FemtoBufferV0 v0){ | |
4771 | return Minv(v0, track); | |
4772 | } | |
4773 | //________________________________________________________________________ | |
4774 | Float_t AliAnalysisTaskProtonLambda::calcDist(const Float_t r1[3], const Float_t r2[3]){ | |
4775 | // Return the spatial distance of two space vectors r1 and r2 | |
4776 | ||
4777 | // Return 'error' when no position is given. | |
4778 | // // When a particle doesn't manage to get to a certain radius, | |
4779 | // // the function GetXYZAt returns position 0,0,0 | |
4780 | // if ( (r1[0] < 0.0001 && r1[1] < 0.0001 && r1[1] < 0.0001) || | |
4781 | // (r2[0] < 0.0001 && r2[1] < 0.0001 && r2[1] < 0.0001) ) | |
4782 | // return -2.0; | |
4783 | ||
4784 | // The above stuff is stupid, this discards every | |
4785 | // track just going in the negative direction. | |
4786 | // Also we don't use the GetXYZAt anymore and our | |
4787 | // 'bad position' value is -9999.,-9999.-9999. | |
4788 | if ( (r1[0] < -9998. && r1[1] < -9998. && r1[1] < -9998.) || | |
4789 | (r2[0] < -9998. && r2[1] < -9998. && r2[1] < -9998.) ) | |
4790 | return -2.0; | |
4791 | ||
4792 | ||
4793 | return TMath::Sqrt((r1[0]-r2[0])*(r1[0]-r2[0]) + | |
4794 | (r1[1]-r2[1])*(r1[1]-r2[1]) + | |
4795 | (r1[2]-r2[2])*(r1[2]-r2[2]) ); | |
4796 | } | |
4797 | //________________________________________________________________________ | |
4798 | // This function is no longer needed | |
4799 | // Float_t AliAnalysisTaskProtonLambda::calcDistSft(const Float_t r1[3], const Float_t r2[3], const FemtoBufferEvent *evt1, const FemtoBufferEvent *evt2){ | |
4800 | // // Return the spatial distance of two space vectors r1 and r2 | |
4801 | // // With each event shifted to (0,0,0) | |
4802 | ||
4803 | // // // Return 'error' when no position is given. | |
4804 | // // // When a particle doesn't manage to get to a certain radius, | |
4805 | // // // the function GetXYZAt returns position 0,0,0 | |
4806 | // // if ( (r1[0] < 0.0001 && r1[1] < 0.0001 && r1[2] < 0.0001) || | |
4807 | // // (r2[0] < 0.0001 && r2[1] < 0.0001 && r2[2] < 0.0001) ) | |
4808 | // // return -2.0; | |
4809 | // // The above stuff is stupid, this discards every | |
4810 | // // track just going in the negative direction. | |
4811 | // // Also we don't use the GetXYZAt anymore and our | |
4812 | // // 'bad position' value is -9999.,-9999.-9999. | |
4813 | // if ( (r1[0] < -9998. && r1[1] < -9998. && r1[1] < -9998.) || | |
4814 | // (r2[0] < -9998. && r2[1] < -9998. && r2[1] < -9998.) ) | |
4815 | // return -2.0; | |
4816 | ||
4817 | // // Get the vertex postions | |
4818 | // Double_t vtx1[3],vtx2[3]; | |
4819 | // evt1->GetVtxPos(vtx1); | |
4820 | // evt2->GetVtxPos(vtx2); | |
4821 | ||
4822 | // // Calculate shifted positions | |
4823 | // Double_t r1Sft[3],r2Sft[3]; | |
4824 | // for (Int_t i=0;i<3;i++){ | |
4825 | // r1Sft[i]=r1[i] - vtx1[i]; | |
4826 | // r2Sft[i]=r2[i] - vtx2[i]; | |
4827 | // } | |
4828 | ||
4829 | // // Return shifted distances | |
4830 | // return TMath::Sqrt((r1Sft[0]-r2Sft[0])*(r1Sft[0]-r2Sft[0]) + | |
4831 | // (r1Sft[1]-r2Sft[1])*(r1Sft[1]-r2Sft[1]) + | |
4832 | // (r1Sft[2]-r2Sft[2])*(r1Sft[2]-r2Sft[2]) ); | |
4833 | // } | |
4834 | //________________________________________________________________________ | |
4835 | // void AliAnalysisTaskProtonLambda::constrainTrack(AliAODTrack *track) { | |
4836 | // // Abuses data members of the AliAODTrack to store a set of track | |
4837 | // // parameters for TPC only constrained to the primary vtx | |
4838 | // // plus a bool whether constraining was successful | |
4839 | // if (!track->GetConstrainedParam()) | |
4840 | // return; | |
4841 | ||
4842 | // // Constrain track to pri vtx, set the bool to successful / unsuccessful | |
4843 | // track->SetTOFcluster(track->RelateToVertexTPC(fAOD->GetPrimaryVertex(), fAOD->GetMagneticField(), | |
4844 | // 5.0, const_cast<AliExternalTrackParam *> (track->GetConstrainedParam()))); | |
4845 | // } | |
4846 | //________________________________________________________________________ | |
4847 | Bool_t AliAnalysisTaskProtonLambda::goodDCA(AliAODTrack *track) { | |
4848 | // Get the DCAxy and DCAz. There also exists a TPC only | |
4849 | // impact parameter, but this has not enough resolution | |
4850 | // to discriminate between primaries, secondaries and material | |
4851 | Float_t xy=0.,rap=RapidityProton(track),pt=track->Pt(); | |
4852 | xy = DCAxy(fGTI[-track->GetID()-1], fAOD); | |
4853 | // Fill the DCAxy histograms | |
4854 | if (track->Charge() > 0){ | |
4855 | fPriHistDCAxyYPtPro->Fill(xy,rap,pt); | |
4856 | } | |
4857 | else{ | |
4858 | fPriHistDCAxyYPtAPro->Fill(xy,rap,pt); | |
4859 | } | |
4860 | // Do a cut. 0.1 cm shows highest significance for primaries | |
4861 | if (xy>.1) | |
4862 | return kFALSE; | |
4863 | return kTRUE; | |
4864 | } | |
4865 | //_______________________________________________________________ | |
4866 | Float_t AliAnalysisTaskProtonLambda::RapidityProton(AliAODTrack *track){ | |
4867 | // Can't find how to set the assumed mass for the AliAODTrack. | |
4868 | // Same stuff as in AliAODTrack::Y() just with proton mass | |
4869 | Double_t e = TMath::Sqrt(track->P()*track->P() + fkProMass*fkProMass); | |
4870 | Double_t pz = track->Pz(); | |
4871 | if (e != TMath::Abs(pz)) { // energy was not equal to pz | |
4872 | return 0.5*TMath::Log((e+pz)/(e-pz)); | |
4873 | } else { // energy was equal to pz | |
4874 | return -999.; | |
4875 | } | |
4876 | } | |
4877 | //________________________________________________________________________ | |
4878 | // void AliAnalysisTaskProtonLambda::getTPConlyV0Info(const AliAODTrack *posDaughter,const AliAODTrack *negDaughter, Double_t tpcV0Mom[3], Double_t TPConlyV0MinvLam, Double_t TPConlyV0MinvALam){ | |
4879 | // // | |
4880 | // // Calculates a V0 with the TPC only parameters | |
4881 | // // | |
4882 | ||
4883 | // // Duplicate the V0 | |
4884 | // AliV0 tpcV0; | |
4885 | // // Get the TPC only track parameters from the daughters | |
4886 | // const AliExternalTrackParam *pParam = 0, *nParam = 0; | |
4887 | // pParam = posDaughter->GetTPCInnerParam(); | |
4888 | // nParam = negDaughter->GetTPCInnerParam(); | |
4889 | // // Protection if there's no TPC only track parameters | |
4890 | // if(!pParam||!nParam) | |
4891 | // return; | |
4892 | // // Set the tpcV0 daughters to the TPC only ones | |
4893 | // tpcV0.SetParamP(*pParam); | |
4894 | // tpcV0.SetParamN(*nParam); | |
4895 | // // Calculate the new properties of the V0 | |
4896 | // Double_t vertex[3]; | |
4897 | // fFemtoBuffer->GetEvt(0)->GetVtxPos(vertex); | |
4898 | // tpcV0.Update((Float_t *) vertex); | |
4899 | // // Get the updated momentum | |
4900 | // tpcV0.fPxPyPz(tpcV0Mom); | |
4901 | // // New TPC only mass, lambda.. | |
4902 | // tpcV0.ChangeMassHypothesis(3122); | |
4903 | // TPConlyV0MinvLam = tpcV0.GetEffMass(); | |
4904 | // // ..anti-lambda. | |
4905 | // tpcV0.ChangeMassHypothesis(-3122); | |
4906 | // TPConlyV0MinvALam = tpcV0.GetEffMass(); | |
4907 | // } | |
4908 | //________________________________________________________________________ | |
4909 | Float_t AliAnalysisTaskProtonLambda::DCAxy(const AliAODTrack *track, const AliVEvent *evt){ | |
4910 | // Note that AliAODTrack::PropagateToDCA() changes the track. | |
4911 | // Don't know whether this is what one wants? | |
4912 | if(!track){ | |
4913 | printf("Pointer to track is zero!\n"); | |
4914 | return -9999.; | |
4915 | } | |
4916 | ||
4917 | // Create an external parameter from the AODtrack | |
4918 | AliExternalTrackParam etp; etp.CopyFromVTrack(track); | |
4919 | // Propagation through the beam pipe would need a correction | |
4920 | // for material, I guess. | |
4921 | if(etp.GetX()>3.) { | |
4922 | printf("This method can be used only for propagation inside the beam pipe\n"); | |
4923 | printf(" id: %d, filtermap: %d\n",track->GetID(),track->GetFilterMap()); | |
4924 | return -9999.; | |
4925 | } | |
4926 | // Do the propagation | |
4927 | Double_t dca[2]={-9999.,-9999.},covar[3]={0.,0.,0.}; | |
4928 | if(!etp.PropagateToDCA(evt->GetPrimaryVertex(),evt->GetMagneticField(),10.,dca,covar)) return -9999.; | |
4929 | // return the DCAxy | |
4930 | return dca[0]; | |
4931 | } | |
4932 | //________________________________________________________________________ | |
4933 | void AliAnalysisTaskProtonLambda::FillDedxHist(const AliVTrack *track){ | |
4934 | // This is for visualization. Fill the the dE/dx histograms | |
4935 | // for all tracks, not only for those, where only the TPC | |
4936 | // is used for PID. Thus avoiding the sharp cut off at a | |
4937 | // momentum of 0.75 GeV/c. | |
4938 | ||
4939 | if(!(fGTI[-track->GetID()-1])){ | |
4940 | printf("Warning: No global track info there!\n"); | |
4941 | return; | |
4942 | } | |
4943 | ||
4944 | // TPC signal and Nsigma. See STEER/STEERBase/AliPIDResponse.h for how | |
4945 | // NSigmaTPC works (and refrain from banging your head against the wall | |
4946 | // when you see it). | |
4947 | // Positive tracks | |
4948 | if (track->Charge() > 0){ | |
4949 | fPriHistTPCsignalPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4950 | // fPriHistNsigmaTPCPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
4951 | // fPIDResponse->GetTPCResponse().GetNumberOfSigmas((fGTI[-track->GetID()-1])->GetTPCmomentum() | |
4952 | // ,(fGTI[-track->GetID()-1])->GetTPCsignal() | |
4953 | // ,(fGTI[-track->GetID()-1])->GetTPCsignalN() | |
4954 | // ,AliPID::kProton)); | |
4955 | // Fill histograms in three momentum ranges | |
4956 | fPriHistTPCsignalLowPPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4957 | fPriHistTPCsignalMedPPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4958 | fPriHistTPCsignalHigPPos->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4959 | ||
4960 | } | |
4961 | // Negative tracks | |
4962 | else{ | |
4963 | fPriHistTPCsignalNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4964 | // fPriHistNsigmaTPCNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(), | |
4965 | // fPIDResponse->GetTPCResponse().GetNumberOfSigmas((fGTI[-track->GetID()-1])->GetTPCmomentum() | |
4966 | // ,(fGTI[-track->GetID()-1])->GetTPCsignal() | |
4967 | // ,(fGTI[-track->GetID()-1])->GetTPCsignalN() | |
4968 | // ,AliPID::kProton)); | |
4969 | // Fill histograms in three momentum ranges | |
4970 | fPriHistTPCsignalLowPNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4971 | fPriHistTPCsignalMedPNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4972 | fPriHistTPCsignalHigPNeg->Fill((fGTI[-track->GetID()-1])->GetTPCmomentum(),(fGTI[-track->GetID()-1])->GetTPCsignal()); | |
4973 | } | |
4974 | } | |
4975 | //________________________________________________________________________ | |
4976 | void AliAnalysisTaskProtonLambda::StoreGlobalTrackReference(AliAODTrack *track){ | |
4977 | // Stores the pointer to the global track | |
4978 | ||
4979 | // This was AOD073 | |
4980 | // // Don't use the filter bits 2 (ITS standalone) and 128 TPC only | |
4981 | // // Remove this return statement and you'll see they don't have | |
4982 | // // any TPC signal | |
4983 | // if(track->TestFilterBit(128) || track->TestFilterBit(2)) | |
4984 | // return; | |
4985 | // This is AOD086 | |
4986 | // Another set of tracks was introduced: Global constrained. | |
4987 | // We only want filter bit 1 <-- NO! we also want no | |
4988 | // filter bit at all, which are the v0 tracks | |
4989 | // if(!track->TestFilterBit(1)) | |
4990 | // return; | |
4991 | ||
4992 | // There are also tracks without any filter bit, i.e. filter map 0, | |
4993 | // at the beginning of the event: they have ~id 1 to 5, 1 to 12 | |
4994 | // This are tracks that didn't survive the primary track filter but | |
4995 | // got written cause they are V0 daughters | |
4996 | ||
4997 | // Check whether the track has some info | |
4998 | // I don't know: there are tracks with filter bit 0 | |
4999 | // and no TPC signal. ITS standalone V0 daughters? | |
5000 | // if(!track->GetTPCsignal()){ | |
5001 | // printf("Warning: track has no TPC signal, " | |
5002 | // // "not adding it's info! " | |
5003 | // "ID: %d FilterMap: %d\n" | |
5004 | // ,track->GetID(),track->GetFilterMap()); | |
5005 | // // return; | |
5006 | // } | |
5007 | ||
5008 | // Check that the id is positive | |
5009 | if(track->GetID()<0){ | |
5010 | // printf("Warning: track has negative ID: %d\n",track->GetID()); | |
5011 | return; | |
5012 | } | |
5013 | ||
5014 | // Check id is not too big for buffer | |
5015 | if(track->GetID()>=fTrackBuffSize){ | |
5016 | printf("Warning: track ID too big for buffer: ID: %d, buffer %d\n" | |
5017 | ,track->GetID(),fTrackBuffSize); | |
5018 | return; | |
5019 | } | |
5020 | ||
5021 | // Warn if we overwrite a track | |
5022 | if(fGTI[track->GetID()]){ | |
5023 | // Seems like there are FilterMap 0 tracks | |
5024 | // that have zero TPCNcls, don't store these! | |
5025 | if( (!track->GetFilterMap()) && | |
5026 | (!track->GetTPCNcls()) ) | |
5027 | return; | |
5028 | ||
5029 | // Imagine the other way around, | |
5030 | // the zero map zero clusters track | |
5031 | // is stored and the good one wants | |
5032 | // to be added. We ommit the warning | |
5033 | // and just overwrite the 'bad' track | |
5034 | if( fGTI[track->GetID()]->GetFilterMap() || | |
5035 | fGTI[track->GetID()]->GetTPCNcls() ){ | |
5036 | // If we come here, there's a problem | |
5037 | printf("Warning! global track info already there!"); | |
5038 | printf(" TPCNcls track1 %u track2 %u", | |
5039 | (fGTI[track->GetID()])->GetTPCNcls(),track->GetTPCNcls()); | |
5040 | printf(" FilterMap track1 %u track2 %u\n", | |
5041 | (fGTI[track->GetID()])->GetFilterMap(),track->GetFilterMap()); | |
5042 | } | |
5043 | } // Two tracks same id | |
5044 | ||
5045 | // // There are tracks with filter bit 0, | |
5046 | // // do they have TPCNcls stored? | |
5047 | // if(!track->GetFilterMap()){ | |
5048 | // printf("Filter map is zero, TPCNcls: %u\n" | |
5049 | // ,track->GetTPCNcls()); | |
5050 | // } | |
5051 | ||
5052 | // Assign the pointer | |
5053 | (fGTI[track->GetID()]) = track; | |
5054 | } | |
5055 | //________________________________________________________________________ | |
5056 | void AliAnalysisTaskProtonLambda::ResetGlobalTrackReference(){ | |
5057 | // Sets all the pointers to zero. To be called at | |
5058 | // the beginning or end of an event | |
5059 | for(UShort_t i=0;i<fTrackBuffSize;i++){ | |
5060 | fGTI[i]=0; | |
5061 | } | |
5062 | } | |
5063 | //________________________________________________________________________ | |
5064 | Bool_t AliAnalysisTaskProtonLambda::acceptTrack(const AliAODTrack *track){ | |
5065 | // Apply additional track cuts | |
5066 | ||
5067 | // In the documents | |
5068 | // https://alisoft.cern.ch/AliRoot/trunk/TPC/doc/Definitions/Definitions.pdf | |
5069 | // TPC people describe the cut strategy for the TPC. It is explicitly | |
5070 | // stated that a cut on the number of crossed rows and a cut on the | |
5071 | // number of crossed rows over findable clusters is recommended to | |
5072 | // remove fakes. In the pdf a cut value of .83 on the ratio | |
5073 | // is stated, no value for the number of crossed rows. Looking at the | |
5074 | // AliESDtrackCuts.cxx one sees that exactly this cut is used with | |
5075 | // 0.8 on the ratio and 70 on the crossed rows. | |
5076 | ||
5077 | // Checked the filter task and AliAODTrack and AliESDtrack and | |
5078 | // AliESDtrackCuts and the Definitions.pdf: | |
5079 | // The function to get the findable clusters is GetTPCNclsF() | |
5080 | ||
5081 | // For the number fo crossed rows for ESD tracks, the function | |
5082 | // GetTPCCrossedRows() usually is used. Looking at the AliESDtrack.cxx | |
5083 | // one sees that it's just an alias (with additional caching) for | |
5084 | // GetTPCClusterInfo(2, 1); The identical function exists in the | |
5085 | // AliAODTrack.cxx | |
5086 | ||
5087 | // I checked: for AOD073 both, the number of crossed rows and the | |
5088 | // number of findable clusters, are there. | |
5089 | ||
5090 | // WARNING: in LHC10h pass2 the cluster map is wrong for | |
5091 | // sector 0 / 18. It's used in the calculation of | |
5092 | // the number of crossed rows! | |
5093 | ||
5094 | Float_t nCrossed = track->GetTPCClusterInfo(2, 1); | |
5095 | if(nCrossed<70) | |
5096 | return kFALSE; | |
5097 | if(!track->GetTPCNclsF()) | |
5098 | return kFALSE; // Note that the AliESDtrackCuts would here return kTRUE | |
5099 | if((nCrossed/track->GetTPCNclsF()) < .8) | |
5100 | return kFALSE; | |
5101 | return kTRUE; | |
5102 | } | |
5103 | //________________________________________________________________________ | |
5104 | Bool_t AliAnalysisTaskProtonLambda::GoodTPCFitMapSharedMap(const AliAODTrack *pTrack, | |
5105 | const AliAODTrack *nTrack){ | |
5106 | // Rejects tracks with shared clusters after filling a control histogram | |
5107 | // This overload is used for positive and negative daughters from V0s | |
5108 | ||
5109 | // Get the shared maps | |
5110 | const TBits posSharedMap = pTrack->GetTPCSharedMap(); | |
5111 | const TBits negSharedMap = nTrack->GetTPCSharedMap(); | |
5112 | // Fill a control histogram | |
5113 | // fHistShareV0pos->Fill(posSharedMap.CountBits()); | |
5114 | // fHistShareV0neg->Fill(negSharedMap.CountBits()); | |
5115 | // Reject shared clusters | |
5116 | if( ((posSharedMap.CountBits()) >= 1) || | |
5117 | ((negSharedMap.CountBits()) >= 1)){ | |
5118 | // Bad tracks, have too many shared clusters! | |
5119 | return kFALSE; | |
5120 | } | |
5121 | return kTRUE; | |
5122 | } | |
5123 | //________________________________________________________________________ | |
5124 | Bool_t AliAnalysisTaskProtonLambda::GoodTPCFitMapSharedMap(const AliAODTrack *track){ | |
5125 | // Rejects tracks with shared clusters after filling a control histogram | |
5126 | // This overload is used for primaries | |
5127 | ||
5128 | // Get the shared maps | |
5129 | const TBits sharedMap = track->GetTPCSharedMap(); | |
5130 | // Fill a control histogram | |
5131 | fPriHistShare->Fill(sharedMap.CountBits()); | |
5132 | // Reject shared clusters | |
5133 | if((sharedMap.CountBits()) >= 1){ | |
5134 | // Bad track, has too many shared clusters! | |
5135 | return kFALSE; | |
5136 | } | |
5137 | return kTRUE; | |
5138 | } | |
5139 | //________________________________________________________________________ | |
5140 | Float_t AliAnalysisTaskProtonLambda::GetCorrectedTOFSignal(const AliVTrack *track){ | |
5141 | // Return the corrected TOF signal, see https://twiki.cern.ch/twiki/bin/viewauth/ALICE/TOF | |
5142 | ||
5143 | // Check for the global track | |
5144 | if(!(fGTI[-track->GetID()-1])){ | |
5145 | printf("Warning: no corresponding global track found!\n"); | |
5146 | return -9999.; | |
5147 | } | |
5148 | ||
5149 | // Request the TOFpid bit | |
5150 | if(!((fGTI[-track->GetID()-1])->GetStatus() & AliVTrack::kTOFpid)) | |
5151 | return -9999.; | |
5152 | ||
5153 | // The expected time | |
5154 | Double_t expectedTimes[AliPID::kSPECIES]; | |
5155 | (fGTI[-track->GetID()-1])->GetIntegratedTimes(expectedTimes); | |
5156 | ||
5157 | // Check for TOF header | |
5158 | if(fAOD->GetTOFHeader()){ | |
5159 | // New AODs without start time subtraction | |
5160 | return ((fGTI[-track->GetID()-1])->GetTOFsignal() | |
5161 | - expectedTimes[AliPID::kProton] | |
5162 | - fPIDResponse->GetTOFResponse().GetStartTime(track->P())); | |
5163 | } | |
5164 | ||
5165 | // Old AODs with start time already subtracted | |
5166 | return ((fGTI[-track->GetID()-1])->GetTOFsignal() | |
5167 | - expectedTimes[AliPID::kProton]); | |
5168 | } | |
5169 | //________________________________________________________________________ | |
5170 | Float_t AliAnalysisTaskProtonLambda::mt(FemtoBufferTrack track, FemtoBufferV0 v0) { | |
5171 | // Overloaded function | |
5172 | return mt(v0,track); | |
5173 | } | |
5174 | //________________________________________________________________________ | |
5175 | Float_t AliAnalysisTaskProtonLambda::mt(FemtoBufferV0 v0, FemtoBufferTrack track){ | |
5176 | // Returns the transverse mass of the pair assuming | |
5177 | // proton mass for track and lambda mass for v0 | |
5178 | ||
5179 | // Following Phys Rev C 83, 054906 | |
5180 | return TMath::Sqrt(ktSquared(v0,track) + | |
5181 | TMath::Power((0.5*(fkLamMass + fkProMass)),2)); | |
5182 | } | |
5183 | ||
5184 | //________________________________________________________________________ | |
5185 | Float_t AliAnalysisTaskProtonLambda::mt(FemtoBufferV0 v01, FemtoBufferV0 v02){ | |
5186 | // Returns the transverse mass of the pair assuming | |
5187 | // lambda mass for both v0 | |
5188 | ||
5189 | // Following Phys Rev C 83, 054906 | |
5190 | return TMath::Sqrt(ktSquared(v01,v02) + | |
5191 | TMath::Power(fkLamMass,2)); | |
5192 | } | |
5193 | //________________________________________________________________________ | |
5194 | Float_t AliAnalysisTaskProtonLambda::ktSquared(FemtoBufferV0 v01, FemtoBufferV0 v02){ | |
5195 | // Returns the kt squared | |
5196 | // kt = 1/2 * | (vector{pt1} + vector{pt2}) | | |
5197 | // kt = 1/2 * | ({px1+px2}, {py1+py2}) | | |
5198 | // kt2 = 1/2*1/2 * ( (px1+px2)*(px1+px2) + (py1+py2)*(py1+py2) ) | |
5199 | return .5*.5*( (v01.fP[0] + v02.fP[0])*(v01.fP[0] + v02.fP[0]) | |
5200 | + (v01.fP[1] + v02.fP[1])*(v01.fP[1] + v02.fP[1])); | |
5201 | } | |
5202 | //________________________________________________________________________ | |
5203 | Float_t AliAnalysisTaskProtonLambda::ktSquared(FemtoBufferTrack track, FemtoBufferV0 v0){ | |
5204 | // Overloaded function | |
5205 | return ktSquared(v0,track); | |
5206 | } | |
5207 | //________________________________________________________________________ | |
5208 | Float_t AliAnalysisTaskProtonLambda::ktSquared(FemtoBufferV0 v0, FemtoBufferTrack track){ | |
5209 | // Returns the kt squared | |
5210 | // kt = 1/2 * | (vector{pt1} + vector{pt2}) | | |
5211 | // kt = 1/2 * | ({px1+px2}, {py1+py2}) | | |
5212 | // kt2 = 1/2*1/2 * ( (px1+px2)*(px1+px2) + (py1+py2)*(py1+py2) ) | |
5213 | return .5*.5*( (v0.fP[0] + track.fP[0])*(v0.fP[0] + track.fP[0]) | |
5214 | + (v0.fP[1] + track.fP[1])*(v0.fP[1] + track.fP[1])); | |
5215 | } | |
5216 | //________________________________________________________________________ | |
5217 | AliAnalysisTaskProtonLambda::AliAnalysisTaskProtonLambda(const AliAnalysisTaskProtonLambda& atpl) | |
5218 | // Not implemented, only initializing the const data member as the compiler complains. | |
5219 | // Implementation is straight forward, though. | |
5220 | : AliAnalysisTaskSE(atpl), | |
5221 | fkUseOnTheFly(atpl.fkUseOnTheFly), | |
5222 | fkAbsZvertexCut(atpl.fkAbsZvertexCut), | |
5223 | fkCentCut(atpl.fkCentCut), | |
5224 | fkLamMass(atpl.fkLamMass), | |
5225 | fkProMass(atpl.fkProMass), | |
5226 | fkPioMass(atpl.fkPioMass), | |
5227 | ||
5228 | fPIDResponse(0), | |
5229 | fTpcResponse(0), | |
5230 | fFemtoBuffer(0), | |
5231 | fAOD(0), fPrimaryVtx(0), fOutputList(0), fOutputPrimaries(0), | |
5232 | fOutput2Part(0), | |
5233 | fGTI(0), | |
5234 | fTrackBuffSize(atpl.fTrackBuffSize), | |
5235 | fHistGoodEvent(0), | |
5236 | // fHistPrimaryVertexPosXY(0), fHistPrimaryVertexPosZ(0), | |
5237 | // fHistTrackMultiplicity(0), | |
5238 | // fHistShareV0pos(0),fHistShareV0neg(0), | |
5239 | // fHistPosTofBeforeCut(0), fHistPosTofAfterCut(0), | |
5240 | // fHistNegTofBeforeCut(0), fHistNegTofAfterCut(0), | |
5241 | // fHistPosTpcBeforeCut(0), fHistPosTpcAfterCut(0), | |
5242 | // fHistNegTpcBeforeCut(0), fHistNegTpcAfterCut(0), | |
5243 | // fHistGoodV0(0), fHistCorrectSigns(0), | |
5244 | // fHistDcaPosToPrimVertex(0), fHistDcaNegToPrimVertex(0), | |
5245 | // fHistDcaPosToPrimVertexZoom(0), fHistDcaNegToPrimVertexZoom(0), | |
5246 | // fHistRadiusV0(0), fHistDecayLengthV0(0), fHistDcaV0Daughters(0), | |
5247 | // fHistChi2(0), fHistCosPointAngle(0), fHistCosPointAngleZoom(0), | |
5248 | fHistSideBandOffLam(0), fHistSideBandOffALam(0), fHistTPCNclsPosOffLam(0), | |
5249 | fHistTPCNclsNegOffLam(0), fHistTPCNclsPosOffALam(0), fHistTPCNclsNegOffALam(0), | |
5250 | // fHistPosNsigmaTpcOffLam(0), fHistPosNsigmaTpcOffALam(0), fHistNegNsigmaTpcOffLam(0), | |
5251 | // fHistNegNsigmaTpcOffALam(0), fHistUseTofOffLam(0), fHistUseTofOffALam(0), | |
5252 | // fHistDcaPosOffLam(0), fHistDcaPosOffALam(0), fHistDcaNegOffLam(0), | |
5253 | // fHistDcaNegOffALam(0), fHistDcaV0DaughtersOffLam(0), fHistDcaV0DaughtersOffALam(0), | |
5254 | // fHistCosPointLamOff(0), fHistCosPointALamOff(0), fHistCosPointLamZoomOff(0), | |
5255 | // fHistCosPointALamZoomOff(0), fHistV0RadiusLamOff(0), fHistV0RadiusALamOff(0), | |
5256 | // fHistV0DecayLengthLamOff(0), fHistV0DecayLengthALamOff(0), fHistDcaV0PriVertexLamOff(0), | |
5257 | // fHistDcaV0PriVertexALamOff(0), | |
5258 | fHistMassLambdaOff(0), fHistMassAntiLambdaOff(0), | |
5259 | // fHistPtVsMassLambdaOff(0), fHistPtVsMassAntiLambdaOff(0), | |
5260 | fHistYPtMassLamOff(0), fHistYPtMassALamOff(0), | |
5261 | // fHistPtVsYLambdaOff(0), fHistPtVsYAntiLambdaOff(0), | |
5262 | fHistSideBandOnLam(0), fHistSideBandOnALam(0), | |
5263 | // fHistLikeSignOnLam(0), fHistLikeSignOnALam(0), | |
5264 | fHistTPCNclsPosOnLam(0), fHistTPCNclsNegOnLam(0), fHistTPCNclsPosOnALam(0),fHistTPCNclsNegOnALam(0), | |
5265 | // fHistPosNsigmaTpcOnLam(0), fHistPosNsigmaTpcOnALam(0), fHistNegNsigmaTpcOnLam(0), fHistNegNsigmaTpcOnALam(0), | |
5266 | // fHistUseTofOnLam(0),fHistUseTofOnALam(0),fHistDcaPosOnLam(0),fHistDcaPosOnALam(0),fHistDcaNegOnLam(0), | |
5267 | // fHistDcaNegOnALam(0),fHistDcaV0DaughtersOnLam(0),fHistDcaV0DaughtersOnALam(0),fHistCosPointLamOn(0), | |
5268 | // fHistCosPointALamOn(0),fHistCosPointLamZoomOn(0),fHistCosPointALamZoomOn(0),fHistV0RadiusLamOn(0), | |
5269 | // fHistV0RadiusALamOn(0),fHistV0DecayLengthLamOn(0),fHistV0DecayLengthALamOn(0),fHistDcaV0PriVertexLamOn(0), | |
5270 | // fHistDcaV0PriVertexALamOn(0), | |
5271 | // fHistChi2TPCPosLamOn(0), fHistChi2TPCPosALamOn(0), fHistChi2TPCNegLamOn(0), fHistChi2TPCNegALamOn(0), | |
5272 | // fHistMinvTPConlyLamOn(0), fHistMinvTPConlyALamOn(0), | |
5273 | fHistMassLambdaOn(0),fHistMassAntiLambdaOn(0), | |
5274 | // fHistPtVsMassLambdaOn(0), fHistPtVsMassAntiLambdaOn(0), | |
5275 | fHistYPtMassLamOn(0),fHistYPtMassALamOn(0), | |
5276 | // fHistPtVsYLambdaOn(0), fHistPtVsYAntiLambdaOn(0), | |
5277 | // fHistMomDiffLam(0),fHistMomDiffALam(0),fHistMomDiffBgLam(0),fHistMomDiffBgALam(0), | |
5278 | // fHistMomDiffWoSPDLam(0),fHistMomDiffWoSPDALam(0),fHistMomDiffWoSPDBgLam(0),fHistMomDiffWoSPDBgALam(0), | |
5279 | fPriHistShare(0), | |
5280 | // fPriHistPosNsigmaTof(0), | |
5281 | fPriHistPosNsigmaTofVsP(0),fPriHistPosNsigmaTofVsPt(0), | |
5282 | // fPriHistNegNsigmaTof(0), | |
5283 | fPriHistNegNsigmaTofVsP(0),fPriHistNegNsigmaTofVsPt(0),fPriHistTOFsignalPosVsP(0), | |
5284 | fPriHistTOFsignalPosVsPt(0),fPriHistTOFsignalNegVsP(0),fPriHistTOFsignalNegVsPt(0),fPriHistHybridTOFsigPosWoTPC(0), | |
5285 | fPriHistHybridTOFsigPosTPCok(0),fPriHistHybridTOFsigNegWoTPC(0),fPriHistHybridTOFsigNegTPCok(0), | |
5286 | // fPriHistHasTofPos(0), | |
5287 | fPriHistTPCsignalPos(0), | |
5288 | // fPriHistNsigmaTPCPos(0), fPriHistTPCsignalTOFcutPos(0),fPriHistNsigmaTPCTOFcutPos(0), | |
5289 | fPriHistTPCsignalLowPPos(0),fPriHistTPCsignalMedPPos(0),fPriHistTPCsignalHigPPos(0), | |
5290 | // fPriHistHasTofNeg(0), | |
5291 | fPriHistTPCsignalNeg(0), | |
5292 | // fPriHistNsigmaTPCNeg(0),fPriHistTPCsignalTOFcutNeg(0),fPriHistNsigmaTPCTOFcutNeg(0), | |
5293 | fPriHistTPCsignalLowPNeg(0),fPriHistTPCsignalMedPNeg(0),fPriHistTPCsignalHigPNeg(0), | |
5294 | fPriHistDCAxyYPtPro(0),fPriHistDCAxyYPtAPro(0), | |
5295 | // f2HistLamLamMeanMinDistProReal(0), | |
5296 | // f2HistLamLamMeanMinDistPioReal(0),f2HistLamProMeanMinDistProReal(0),f2HistALamALamMeanMinDistAProReal(0), | |
5297 | // f2HistALamALamMeanMinDistPioReal(0),f2HistALamAProMeanMinDistAProReal(0), | |
5298 | // f2HistSftLamLamMeanMinDistProReal(0), | |
5299 | // f2HistSftLamLamMeanMinDistPioReal(0),f2HistSftLamProMeanMinDistProReal(0),f2HistSftALamALamMeanMinDistAProReal(0), | |
5300 | // f2HistSftALamALamMeanMinDistPioReal(0),f2HistSftALamAProMeanMinDistAProReal(0), | |
5301 | // f2HistSftIrocLamLamMeanMinDistProReal(0), | |
5302 | // f2HistSftIrocLamLamMeanMinDistPioReal(0),f2HistSftIrocLamProMeanMinDistProReal(0),f2HistSftIrocALamALamMeanMinDistAProReal(0), | |
5303 | // f2HistSftIrocALamALamMeanMinDistPioReal(0),f2HistSftIrocALamAProMeanMinDistAProReal(0), | |
5304 | // f2HistSftOrocLamLamMeanMinDistProReal(0), | |
5305 | // f2HistSftOrocLamLamMeanMinDistPioReal(0),f2HistSftOrocLamProMeanMinDistProReal(0),f2HistSftOrocALamALamMeanMinDistAProReal(0), | |
5306 | // f2HistSftOrocALamALamMeanMinDistPioReal(0),f2HistSftOrocALamAProMeanMinDistAProReal(0), | |
5307 | // f2HistMtLamLamReal(0), | |
5308 | f2HistMtLamProReal(0), | |
5309 | // f2HistMtALamALamReal(0), | |
5310 | f2HistMtALamAProReal(0), | |
5311 | // f2HistMtLowQLamLamReal(0), | |
5312 | f2HistMtLowQLamProReal(0), | |
5313 | // f2HistMtLowQALamALamReal(0), | |
5314 | f2HistMtLowQALamAProReal(0), | |
5315 | LamProReal(0),ALamAProReal(0), | |
5316 | // f3HistLamLamQinvReal(0), | |
5317 | // f3HistALamALamQinvReal(0),f3HistLamLamMinvReal(0), | |
5318 | // f3HistLamProMinvReal(0),f3HistALamALamMinvReal(0),f3HistALamAProMinvReal(0), | |
5319 | // f2HistBgLamBgLamMeanMinDistProReal(0),f2HistBgLamBgLamMeanMinDistPioReal(0), | |
5320 | // f2HistBgLamProMeanMinDistProReal(0),f2HistBgALamBgALamMeanMinDistAProReal(0), | |
5321 | // f2HistBgALamBgALamMeanMinDistPioReal(0),f2HistBgALamAProMeanMinDistAProReal(0), | |
5322 | // f2HistSftBgLamBgLamMeanMinDistProReal(0),f2HistSftBgLamBgLamMeanMinDistPioReal(0), | |
5323 | // f2HistSftBgLamProMeanMinDistProReal(0),f2HistSftBgALamBgALamMeanMinDistAProReal(0), | |
5324 | // f2HistSftBgALamBgALamMeanMinDistPioReal(0),f2HistSftBgALamAProMeanMinDistAProReal(0), | |
5325 | // f2HistSftIrocBgLamBgLamMeanMinDistProReal(0),f2HistSftIrocBgLamBgLamMeanMinDistPioReal(0), | |
5326 | // f2HistSftIrocBgLamProMeanMinDistProReal(0),f2HistSftIrocBgALamBgALamMeanMinDistAProReal(0), | |
5327 | // f2HistSftIrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftIrocBgALamAProMeanMinDistAProReal(0), | |
5328 | // f2HistSftOrocBgLamBgLamMeanMinDistProReal(0),f2HistSftOrocBgLamBgLamMeanMinDistPioReal(0), | |
5329 | // f2HistSftOrocBgLamProMeanMinDistProReal(0),f2HistSftOrocBgALamBgALamMeanMinDistAProReal(0), | |
5330 | // f2HistSftOrocBgALamBgALamMeanMinDistPioReal(0),f2HistSftOrocBgALamAProMeanMinDistAProReal(0), | |
5331 | BgLamProReal(0),BgALamAProReal(0), | |
5332 | // f3HistBgLamBgLamQinvReal(0), | |
5333 | // f3HistBgALamBgALamQinvReal(0), | |
5334 | // f2HistLamLamMeanMinDistProMixed(0),f2HistLamLamMeanMinDistPioMixed(0), | |
5335 | // f2HistLamProMeanMinDistProMixed(0),f2HistALamALamMeanMinDistAProMixed(0), | |
5336 | // f2HistALamALamMeanMinDistPioMixed(0),f2HistALamAProMeanMinDistAProMixed(0), | |
5337 | // f2HistSftLamLamMeanMinDistProMixed(0),f2HistSftLamLamMeanMinDistPioMixed(0), | |
5338 | // f2HistSftLamProMeanMinDistProMixed(0),f2HistSftALamALamMeanMinDistAProMixed(0), | |
5339 | // f2HistSftALamALamMeanMinDistPioMixed(0),f2HistSftALamAProMeanMinDistAProMixed(0), | |
5340 | // f2HistSftIrocLamLamMeanMinDistProMixed(0),f2HistSftIrocLamLamMeanMinDistPioMixed(0), | |
5341 | // f2HistSftIrocLamProMeanMinDistProMixed(0),f2HistSftIrocALamALamMeanMinDistAProMixed(0), | |
5342 | // f2HistSftIrocALamALamMeanMinDistPioMixed(0),f2HistSftIrocALamAProMeanMinDistAProMixed(0), | |
5343 | // f2HistSftOrocLamLamMeanMinDistProMixed(0),f2HistSftOrocLamLamMeanMinDistPioMixed(0), | |
5344 | // f2HistSftOrocLamProMeanMinDistProMixed(0),f2HistSftOrocALamALamMeanMinDistAProMixed(0), | |
5345 | // f2HistSftOrocALamALamMeanMinDistPioMixed(0),f2HistSftOrocALamAProMeanMinDistAProMixed(0), | |
5346 | LamProMixed(0),ALamAProMixed(0), | |
5347 | // f3HistLamLamQinvMixed(0), | |
5348 | // f3HistALamALamQinvMixed(0),f3HistLamLamMinvMixed(0), | |
5349 | // f3HistLamProMinvMixed(0),f3HistALamALamMinvMixed(0),f3HistALamAProMinvMixed(0), | |
5350 | // f2HistBgLamBgLamMeanMinDistProMixed(0),f2HistBgLamBgLamMeanMinDistPioMixed(0), | |
5351 | // f2HistBgLamProMeanMinDistProMixed(0),f2HistBgALamBgALamMeanMinDistAProMixed(0), | |
5352 | // f2HistBgALamBgALamMeanMinDistPioMixed(0),f2HistBgALamAProMeanMinDistAProMixed(0), | |
5353 | // f2HistSftBgLamBgLamMeanMinDistProMixed(0),f2HistSftBgLamBgLamMeanMinDistPioMixed(0), | |
5354 | // f2HistSftBgLamProMeanMinDistProMixed(0),f2HistSftBgALamBgALamMeanMinDistAProMixed(0), | |
5355 | // f2HistSftBgALamBgALamMeanMinDistPioMixed(0),f2HistSftBgALamAProMeanMinDistAProMixed(0), | |
5356 | // f2HistSftIrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftIrocBgLamBgLamMeanMinDistPioMixed(0), | |
5357 | // f2HistSftIrocBgLamProMeanMinDistProMixed(0),f2HistSftIrocBgALamBgALamMeanMinDistAProMixed(0), | |
5358 | // f2HistSftIrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftIrocBgALamAProMeanMinDistAProMixed(0), | |
5359 | // f2HistSftOrocBgLamBgLamMeanMinDistProMixed(0),f2HistSftOrocBgLamBgLamMeanMinDistPioMixed(0), | |
5360 | // f2HistSftOrocBgLamProMeanMinDistProMixed(0),f2HistSftOrocBgALamBgALamMeanMinDistAProMixed(0), | |
5361 | // f2HistSftOrocBgALamBgALamMeanMinDistPioMixed(0),f2HistSftOrocBgALamAProMeanMinDistAProMixed(0), | |
5362 | BgLamProMixed(0),BgALamAProMixed(0) | |
5363 | // f3HistBgLamBgLamQinvMixed(0), | |
5364 | // f3HistBgALamBgALamQinvMixed(0) | |
5365 | ||
5366 | { | |
5367 | // Copy constructor | |
5368 | printf("Copy constructor not implemented\n"); | |
5369 | } | |
5370 | //________________________________________________________________________ | |
5371 | AliAnalysisTaskProtonLambda& AliAnalysisTaskProtonLambda::operator=(const AliAnalysisTaskProtonLambda& atpl) | |
5372 | { | |
5373 | if(this!=&atpl){ | |
5374 | // One operation with the atpl to get rid of the warning unused parameter | |
5375 | fPrimaryVtxPosition[0]=atpl.fPrimaryVtxPosition[0]; | |
5376 | printf("Assignment operator not implemented\n"); | |
5377 | } | |
5378 | return *this; | |
5379 | } | |
5380 | //________________________________________________________________________ | |
5381 | void AliAnalysisTaskProtonLambda::Terminate(Option_t *) | |
5382 | { | |
5383 | // Draw result to the screen | |
5384 | // Called once at the end of the query | |
5385 | } | |
5386 | //________________________________________________________________________ | |
5387 | // | |
5388 | // | |
5389 | // Classes in the class AliAnalysisTaskProtonLambda | |
5390 | // FemtoBuffer, FemtoBufferEvent, FemtoBufferV0 and FemtoBufferTrack | |
5391 | // | |
5392 | //________________________________________________________________________ | |
5393 | // | |
5394 | // FemtoBufferTrack | |
5395 | //________________________________________________________________________ | |
5396 | AliAnalysisTaskProtonLambda::FemtoBufferTrack::FemtoBufferTrack(): | |
5397 | fID(65535) | |
5398 | { | |
5399 | // Standard constructor, initialize everything with values indicating | |
5400 | // a track that should not be used | |
5401 | ||
5402 | // No idea how to initialize the arrays nicely like the fID(65535).. | |
5403 | for (UChar_t i=0;i<3;i++){ | |
5404 | fP[i]=-9999.; | |
5405 | for (UChar_t j=0;j<9;j++){ | |
5406 | // fXglobal[j][i]=-9999.; | |
5407 | fXshifted[j][i]=-9999.; | |
5408 | } | |
5409 | } | |
5410 | } | |
5411 | //________________________________________________________________________ | |
5412 | AliAnalysisTaskProtonLambda::FemtoBufferTrack::FemtoBufferTrack(const AliAODTrack *track,const Float_t bfield,const Float_t priVtx[3]): | |
5413 | fID(65535) | |
5414 | { | |
5415 | // Constructor | |
5416 | ||
5417 | // Use the function to have the code in one place | |
5418 | Set(track,bfield,priVtx); | |
5419 | } | |
5420 | //________________________________________________________________________ | |
5421 | void AliAnalysisTaskProtonLambda::FemtoBufferTrack::GetGlobalPositionAtGlobalRadii(const AliAODTrack *track, const Float_t bfield){ | |
5422 | // Function not used, do dummy operations to get rid of warnings | |
5423 | Float_t a=bfield; | |
5424 | a=track->P(); | |
5425 | ||
5426 | // // Gets the global position of the track at nine different radii in the TPC | |
5427 | // // track is the track you want to propagate | |
5428 | // // bfield is the magnetic field of your event | |
5429 | // // globalPositionsAtRadii is the array of global positions in the radii and xyz | |
5430 | ||
5431 | // // We have two versions of the two track resolution plots in our proton-lambda task: | |
5432 | // // a) with all events shifted to (0,0,0), b) without shift. | |
5433 | // // For a) we should compare the tracks at shifted radii, | |
5434 | // // for b) we should still use the global radii. This function here is for b). | |
5435 | ||
5436 | // // Initialize the array to something indicating there was no propagation | |
5437 | // for(Int_t i=0;i<9;i++){ | |
5438 | // for(Int_t j=0;j<3;j++){ | |
5439 | // fXglobal[i][j]=-9999.; | |
5440 | // } | |
5441 | // } | |
5442 | ||
5443 | // // Make a copy of the track to not change parameters of the track | |
5444 | // AliExternalTrackParam etp; etp.CopyFromVTrack(track); | |
5445 | // // printf("\nAfter CopyFromVTrack\n"); | |
5446 | // // etp.Print(); | |
5447 | ||
5448 | // // The global position of the the track | |
5449 | // Double_t xyz[3]={-9999.,-9999.,-9999.}; | |
5450 | ||
5451 | // // Counter for which radius we want | |
5452 | // Int_t iR=0; | |
5453 | // // The radii at which we get the global positions | |
5454 | // // IROC (OROC) from 84.1 cm to 132.1 cm (134.6 cm to 246.6 cm) | |
5455 | // // Compare squared radii for faster code | |
5456 | // Float_t RSquaredWanted[9]={85.*85.,105.*105.,125.*125.,145.*145.,165.*165., | |
5457 | // 185.*185.,205.*205.,225.*225.,245.*245.}; | |
5458 | // // The global radius we are at, squared. Compare squared radii for faster code | |
5459 | // Float_t globalRadiusSquared=0; | |
5460 | ||
5461 | // // Propagation is done in local x of the track | |
5462 | // for (Float_t x = 58.;x<247.;x+=1.){ | |
5463 | // // Starts at 83 / Sqrt(2) and goes outwards. 85/Sqrt(2) is the smallest local x | |
5464 | // // for global radius 85 cm. x = 245 is the outer radial limit of the TPC when | |
5465 | // // the track is straight, i.e. has inifinite pt and doesn't get bent. | |
5466 | // // If the track's momentum is smaller than infinite, it will develop a y-component, | |
5467 | // // which adds to the global radius | |
5468 | ||
5469 | // // Stop if the propagation was not succesful. This can happen for low pt tracks | |
5470 | // // that don't reach outer radii | |
5471 | // if(!etp.PropagateTo(x,bfield))break; | |
5472 | // etp.GetXYZ(xyz); // GetXYZ returns global coordinates | |
5473 | ||
5474 | // // No shifting for global radii | |
5475 | // globalRadiusSquared = (xyz[0])*(xyz[0]) | |
5476 | // + (xyz[1])*(xyz[1]); | |
5477 | ||
5478 | // // Roughly reached the radius we want | |
5479 | // if(globalRadiusSquared > RSquaredWanted[iR]){ | |
5480 | ||
5481 | // // Bigger loop has bad precision, we're nearly one centimeter too far, | |
5482 | // // go back in small steps. | |
5483 | // while (globalRadiusSquared>RSquaredWanted[iR]){ | |
5484 | // x-=.1; | |
5485 | // // printf("propagating to x %5.2f\n",x); | |
5486 | // if(!etp.PropagateTo(x,bfield))break; | |
5487 | // etp.GetXYZ(xyz); // GetXYZ returns global coordinates | |
5488 | ||
5489 | // // No shifting for global radii | |
5490 | // globalRadiusSquared = (xyz[0])*(xyz[0]) | |
5491 | // + (xyz[1])*(xyz[1]); | |
5492 | // } | |
5493 | // // printf("At Radius:%05.2f (local x %5.2f). Setting position to x %4.1f y %4.1f z %4.1f\n",TMath::Sqrt(globalRadiusSquared),x,xyz[0],xyz[1],xyz[2]); | |
5494 | // fXglobal[iR][0]=xyz[0]; | |
5495 | // fXglobal[iR][1]=xyz[1]; | |
5496 | // fXglobal[iR][2]=xyz[2]; | |
5497 | // // Indicate we want the next radius | |
5498 | // iR+=1; | |
5499 | // } | |
5500 | // if(iR>=8){ | |
5501 | // // TPC edge reached | |
5502 | // return; | |
5503 | // } | |
5504 | // } | |
5505 | } | |
5506 | //________________________________________________________________________ | |
5507 | void AliAnalysisTaskProtonLambda::FemtoBufferTrack::GetShiftedPositionAtShiftedRadii(const AliAODTrack *track, const Float_t bfield, const Float_t priVtx[3]){ | |
5508 | // Gets the global position of the track at nine different radii in the TPC | |
5509 | // track is the track you want to propagate | |
5510 | // bfield is the magnetic field of your event | |
5511 | // globalPositionsAtRadii is the array of global positions in the radii and xyz | |
5512 | ||
5513 | // Initialize the array to something indicating there was no propagation | |
5514 | for(Int_t i=0;i<9;i++){ | |
5515 | for(Int_t j=0;j<3;j++){ | |
5516 | fXshifted[i][j]=-9999.; | |
5517 | } | |
5518 | } | |
5519 | ||
5520 | // Make a copy of the track to not change parameters of the track | |
5521 | AliExternalTrackParam etp; etp.CopyFromVTrack(track); | |
5522 | // printf("\nAfter CopyFromVTrack\n"); | |
5523 | // etp.Print(); | |
5524 | ||
5525 | // The global position of the the track | |
5526 | Double_t xyz[3]={-9999.,-9999.,-9999.}; | |
5527 | ||
5528 | // Counter for which radius we want | |
5529 | Int_t iR=0; | |
5530 | // The radii at which we get the global positions | |
5531 | // IROC (OROC) from 84.1 cm to 132.1 cm (134.6 cm to 246.6 cm) | |
5532 | // Compare squared radii for faster code | |
5533 | Float_t RSquaredWanted[9]={85.*85.,105.*105.,125.*125.,145.*145.,165.*165., | |
5534 | 185.*185.,205.*205.,225.*225.,245.*245.}; | |
5535 | // The shifted radius we are at, squared. Compare squared radii for faster code | |
5536 | Float_t shiftedRadiusSquared=0; | |
5537 | ||
5538 | // Propagation is done in local x of the track | |
5539 | for (Float_t x = 58.;x<247.;x+=1.){ | |
5540 | // Starts at 83 / Sqrt(2) and goes outwards. 85/Sqrt(2) is the smallest local x | |
5541 | // for global radius 85 cm. x = 245 is the outer radial limit of the TPC when | |
5542 | // the track is straight, i.e. has inifinite pt and doesn't get bent. | |
5543 | // If the track's momentum is smaller than infinite, it will develop a y-component, | |
5544 | // which adds to the global radius | |
5545 | ||
5546 | // Stop if the propagation was not succesful. This can happen for low pt tracks | |
5547 | // that don't reach outer radii | |
5548 | if(!etp.PropagateTo(x,bfield))break; | |
5549 | etp.GetXYZ(xyz); // GetXYZ returns global coordinates | |
5550 | ||
5551 | // Without shifting the primary vertex to (0.,0.,0.) the next line would just be | |
5552 | // WRONG: globalRadiusSquared = xyz[0]*xyz[0]+xyz[1]*xyz[1]; | |
5553 | // but as we shift the primary vertex we want to compare positions at shifted radii. | |
5554 | // I can't draw in ASCII but please take a piece of paper and just visualize it once. | |
5555 | ||
5556 | // Changing plus to minus on July10th2012 | |
5557 | shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0]) | |
5558 | + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]); | |
5559 | ||
5560 | // Roughly reached the radius we want | |
5561 | if(shiftedRadiusSquared > RSquaredWanted[iR]){ | |
5562 | ||
5563 | // Bigger loop has bad precision, we're nearly one centimeter too far, | |
5564 | // go back in small steps. | |
5565 | while (shiftedRadiusSquared>RSquaredWanted[iR]){ | |
5566 | x-=.1; | |
5567 | // printf("propagating to x %5.2f\n",x); | |
5568 | if(!etp.PropagateTo(x,bfield))break; | |
5569 | etp.GetXYZ(xyz); // GetXYZ returns global coordinates | |
5570 | // Added the shifting also here on July11th2012 | |
5571 | shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0]) | |
5572 | + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]); | |
5573 | } | |
5574 | // printf("At Radius:%05.2f (local x %5.2f). Setting position to x %4.1f y %4.1f z %4.1f\n",TMath::Sqrt(globalRadiusSquared),x,xyz[0],xyz[1],xyz[2]); | |
5575 | fXshifted[iR][0]=xyz[0]-priVtx[0]; | |
5576 | fXshifted[iR][1]=xyz[1]-priVtx[1]; | |
5577 | fXshifted[iR][2]=xyz[2]-priVtx[2]; | |
5578 | // Indicate we want the next radius | |
5579 | iR+=1; | |
5580 | } | |
5581 | if(iR>=8){ | |
5582 | // TPC edge reached | |
5583 | return; | |
5584 | } | |
5585 | } | |
5586 | } | |
5587 | //________________________________________________________________________ | |
5588 | void AliAnalysisTaskProtonLambda::FemtoBufferTrack::Set(const AliAODTrack *track,const Float_t bfield,const Double_t priVtx[3]){ | |
5589 | // Overloaded function | |
2942f542 | 5590 | Float_t priVtxPos[3]={static_cast<Float_t>(priVtx[0]),static_cast<Float_t>(priVtx[1]),static_cast<Float_t>(priVtx[2])}; |
369a736f | 5591 | Set(track,bfield,priVtxPos); |
5592 | } | |
5593 | //________________________________________________________________________ | |
5594 | void AliAnalysisTaskProtonLambda::FemtoBufferTrack::Set(const AliAODTrack *track,const Float_t bfield,const Float_t priVtx[3]){ | |
5595 | // Set the properties of this to the AliAODtrack | |
5596 | // | |
5597 | // UShort_t fID; //! Unique track id (->AliAODTrack.h), UShort_t goes to 65000 | |
5598 | // Double_t fP[3]; //! Momentum of track | |
5599 | // Float_t fXglobal[9][3]; //! Global positions at different global radii | |
5600 | // Float_t fXshifted[9][3]; //! Shifted positions at different shifted radii | |
5601 | ||
5602 | ||
5603 | // Set the ID, a good ID also indicates to use the track | |
5604 | if(track->GetID() >=0){ | |
5605 | // global tracks, i.e. v0 daughters | |
5606 | fID = track->GetID(); | |
5607 | } | |
5608 | else { | |
5609 | // e.g. tpc only tracks, i.e. primary protons | |
5610 | fID = -track->GetID()-1; | |
5611 | ||
5612 | } | |
5613 | // Set the momentum | |
5614 | track->PxPyPz(fP); | |
5615 | // GetGlobalPositionAtGlobalRadii(track,bfield); | |
5616 | GetShiftedPositionAtShiftedRadii(track,bfield,priVtx); | |
5617 | ||
5618 | } | |
5619 | //________________________________________________________________________ | |
5620 | AliAnalysisTaskProtonLambda::FemtoBufferTrack::FemtoBufferTrack(const FemtoBufferTrack& fbt): | |
5621 | fID(fbt.fID) | |
5622 | { | |
5623 | // Copy constructor | |
5624 | ||
5625 | for (UChar_t i=0;i<3;i++){ | |
5626 | fP[i]=fbt.fP[i]; | |
5627 | for (UChar_t j=0;j<9;j++){ | |
5628 | // fXglobal[j][i]=fbt.fXglobal[j][i]; | |
5629 | fXshifted[j][i]=fbt.fXshifted[j][i]; | |
5630 | } | |
5631 | } | |
5632 | } | |
5633 | //________________________________________________________________________ | |
5634 | AliAnalysisTaskProtonLambda::FemtoBufferTrack& AliAnalysisTaskProtonLambda::FemtoBufferTrack::operator=(const FemtoBufferTrack& fbt){ | |
5635 | // Assignment operator, from wikipedia :) | |
5636 | ||
5637 | // Protect against self-assignment | |
5638 | if(this != &fbt){ | |
5639 | fID = fbt.fID; | |
5640 | for (UChar_t i=0;i<3;i++){ | |
5641 | fP[i]=fbt.fP[i]; | |
5642 | for (UChar_t j=0;j<9;j++){ | |
5643 | // fXglobal[j][i]=fbt.fXglobal[j][i]; | |
5644 | fXshifted[j][i]=fbt.fXshifted[j][i]; | |
5645 | } | |
5646 | } | |
5647 | } | |
5648 | // By convention, always return *this (Could it be the convention is called c++?) | |
5649 | return *this; | |
5650 | } | |
5651 | //________________________________________________________________________ | |
5652 | // | |
5653 | // FemtoBufferV0 | |
5654 | //________________________________________________________________________ | |
5655 | AliAnalysisTaskProtonLambda::FemtoBufferV0::FemtoBufferV0(): | |
5656 | fCosPoint(-9999.), | |
5657 | fPosDaughter(), | |
5658 | fNegDaughter() | |
5659 | { | |
5660 | // Dummy constructor, set everything so it | |
5661 | // indicates a V0 which should not be used | |
5662 | fP[0]=-9999.; | |
5663 | fP[1]=-9999.; | |
5664 | fP[2]=-9999.; | |
5665 | // C++11 provides initializer lists, it should work like | |
5666 | //class C | |
5667 | //{ | |
5668 | //int x[4]; | |
5669 | //public: | |
5670 | //C(): x{0,1,2,3} {} | |
5671 | //}; | |
5672 | // and http://clang.llvm.org/cxx_status.html says, they have it in clang 3.1, | |
5673 | // but it doesn't seem to work! :/ | |
5674 | ||
5675 | } | |
5676 | //________________________________________________________________________ | |
5677 | AliAnalysisTaskProtonLambda::FemtoBufferV0::FemtoBufferV0(const AliAODv0 *v0, const AliAODTrack *posDaughter, const AliAODTrack *negDaughter, const Double_t bfield, Double_t priVtxPos[3]): | |
5678 | fCosPoint(-9999.), | |
5679 | fPosDaughter(), | |
5680 | fNegDaughter() | |
5681 | { | |
5682 | // Constructor, set the properties of this to these of the AliAODv0 | |
5683 | ||
5684 | // Use Set function to keep code in one place. Only constant data member | |
5685 | // would require the FemtoBuff() : fbla(), fblup() {} method | |
5686 | Set(v0,posDaughter,negDaughter,bfield,priVtxPos); | |
5687 | } | |
5688 | //________________________________________________________________________ | |
5689 | void AliAnalysisTaskProtonLambda::FemtoBufferV0::Set(const AliAODv0 *v0, const AliAODTrack *posDaughter, const AliAODTrack *negDaughter, const Double_t bfield, Double_t priVtxPos[3]) | |
5690 | { | |
5691 | // Set the properties of this to these of the AliAODv0 | |
5692 | fCosPoint=v0->CosPointingAngle(priVtxPos); | |
5693 | v0->PxPyPz(fP); | |
5694 | // printf("Set px %3.2f, py %3.2f, pz %3.2f\n" | |
5695 | // ,fP[0],fP[1],fP[2] | |
5696 | // ); | |
5697 | // The daughters | |
5698 | fPosDaughter.Set(posDaughter,bfield,priVtxPos); | |
5699 | fNegDaughter.Set(negDaughter,bfield,priVtxPos); | |
5700 | } | |
5701 | //________________________________________________________________________ | |
5702 | AliAnalysisTaskProtonLambda::FemtoBufferV0::FemtoBufferV0(const FemtoBufferV0 &fbv): | |
5703 | fCosPoint(fbv.fCosPoint), | |
5704 | fPosDaughter(fbv.fPosDaughter), | |
5705 | fNegDaughter(fbv.fNegDaughter) | |
5706 | //,fP{fbv.fP[0],fbv.fP[1],fbv.fP[2]} // C++11 | |
5707 | { | |
5708 | // Copy constructor | |
5709 | fP[0] = fbv.fP[0]; // C++03 | |
5710 | fP[1] = fbv.fP[1]; | |
5711 | fP[2] = fbv.fP[2]; | |
5712 | } | |
5713 | //________________________________________________________________________ | |
5714 | AliAnalysisTaskProtonLambda::FemtoBufferV0& AliAnalysisTaskProtonLambda::FemtoBufferV0::operator=(const FemtoBufferV0 &fbv){ | |
5715 | // Assignment operator | |
5716 | ||
5717 | // Protect against self-assignment | |
5718 | if(this != &fbv){ | |
5719 | fCosPoint=fbv.fCosPoint; | |
5720 | fP[0]=fbv.fP[0]; | |
5721 | fP[1]=fbv.fP[1]; | |
5722 | fP[2]=fbv.fP[2]; | |
5723 | fPosDaughter=fbv.fPosDaughter; | |
5724 | fNegDaughter=fbv.fNegDaughter; | |
5725 | } | |
5726 | return *this; | |
5727 | } | |
5728 | //________________________________________________________________________ | |
5729 | // | |
5730 | // FemtoBufferEvent | |
5731 | //________________________________________________________________________ | |
5732 | AliAnalysisTaskProtonLambda::FemtoBufferEvent::FemtoBufferEvent(): | |
5733 | fPriTrackLim(0),fV0Lim(0) | |
5734 | ,fProTracks(0),fAProTracks(0) | |
5735 | ,fLamTracks(0),fALamTracks(0) | |
5736 | ,fBgLamTracks(0),fBgALamTracks(0) | |
5737 | ,fNProTracks(0),fNAProTracks(0),fNLamTracks(0),fNALamTracks(0) | |
5738 | ,fNBgLamTracks(0),fNBgALamTracks(0) | |
5739 | ,fBfield(-9999.) | |
5740 | { | |
5741 | // Standard constructor, all pointer to zero | |
5742 | fPriVtxPos[0]=-9999.; | |
5743 | fPriVtxPos[1]=-9999.; | |
5744 | fPriVtxPos[2]=-9999.; | |
5745 | ||
5746 | printf("This constructor has zero size in the arrays!\n"); | |
5747 | } | |
5748 | //________________________________________________________________________ | |
5749 | AliAnalysisTaskProtonLambda::FemtoBufferEvent::FemtoBufferEvent(const UShort_t priTrackBuff,const UShort_t V0Buff,const Double_t bfield,const Double_t priVtxPos[3]): | |
5750 | fPriTrackLim(priTrackBuff),fV0Lim(V0Buff) | |
5751 | ,fProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5752 | ,fAProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5753 | ,fLamTracks (new FemtoBufferV0[fV0Lim]) | |
5754 | ,fALamTracks(new FemtoBufferV0[fV0Lim]) | |
5755 | ,fBgLamTracks(new FemtoBufferV0[fV0Lim]) | |
5756 | ,fBgALamTracks(new FemtoBufferV0[fV0Lim]) | |
5757 | ,fNProTracks(0),fNAProTracks(0),fNLamTracks(0),fNALamTracks(0) | |
5758 | ,fNBgLamTracks(0),fNBgALamTracks(0) | |
5759 | ,fBfield(-bfield) | |
5760 | // ,fPriVtxPos{priVtxPos[0],priVtxPos[1],priVtxPos[2]} // This is C++11 | |
5761 | { | |
5762 | // Constructor. | |
5763 | fPriVtxPos[0] = priVtxPos[0]; // This is some old C++ | |
5764 | fPriVtxPos[1] = priVtxPos[1]; | |
5765 | fPriVtxPos[2] = priVtxPos[2]; | |
5766 | } | |
5767 | //________________________________________________________________________ | |
5768 | AliAnalysisTaskProtonLambda::FemtoBufferEvent::FemtoBufferEvent(const UShort_t priTrackBuff,const UShort_t V0Buff): | |
5769 | fPriTrackLim(priTrackBuff),fV0Lim(V0Buff) | |
5770 | ,fProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5771 | ,fAProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5772 | ,fLamTracks (new FemtoBufferV0[fV0Lim]) | |
5773 | ,fALamTracks(new FemtoBufferV0[fV0Lim]) | |
5774 | ,fBgLamTracks(new FemtoBufferV0[fV0Lim]) | |
5775 | ,fBgALamTracks(new FemtoBufferV0[fV0Lim]) | |
5776 | ,fNProTracks(0),fNAProTracks(0),fNLamTracks(0),fNALamTracks(0) | |
5777 | ,fNBgLamTracks(0),fNBgALamTracks(0) | |
5778 | ,fBfield(-9999.) | |
5779 | // ,fPriVtxPos{-9999.,-9999.,-9999.} // This is C++11 | |
5780 | { | |
5781 | // Constructor. fBfield and fPriVtxPos not needed yet, can be set later. | |
5782 | fPriVtxPos[0] = -9999.; // This is C++03 | |
5783 | fPriVtxPos[1] = -9999.; | |
5784 | fPriVtxPos[2] = -9999.; | |
5785 | ||
5786 | // printf("constructed eventwith NBgLam: %u\n",fNBgLamTracks); | |
5787 | } | |
5788 | //________________________________________________________________________ | |
5789 | AliAnalysisTaskProtonLambda::FemtoBufferEvent::FemtoBufferEvent(const FemtoBufferEvent &fbe): | |
5790 | fPriTrackLim(fbe.GetPriTrackLim()) | |
5791 | ,fV0Lim(fbe.GetV0Lim()) | |
5792 | ,fProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5793 | ,fAProTracks(new FemtoBufferTrack[fPriTrackLim]) | |
5794 | ,fLamTracks (new FemtoBufferV0[fV0Lim]) | |
5795 | ,fALamTracks(new FemtoBufferV0[fV0Lim]) | |
5796 | ,fBgLamTracks(new FemtoBufferV0[fV0Lim]) | |
5797 | ,fBgALamTracks(new FemtoBufferV0[fV0Lim]) | |
5798 | ,fNProTracks(fbe.GetNPro()),fNAProTracks(fbe.GetNAPro()) | |
5799 | ,fNLamTracks(fbe.GetNLam()),fNALamTracks(fbe.GetNALam()) | |
5800 | ,fNBgLamTracks(fbe.GetNBgLam()),fNBgALamTracks(fbe.GetNBgALam()) | |
5801 | ,fBfield(fbe.GetBfield()) | |
5802 | { | |
5803 | // Copy constructor | |
5804 | fbe.GetVtxPos(fPriVtxPos); | |
5805 | // Avoid to much creation and deletion of objects | |
5806 | UShort_t i; | |
5807 | // Copy the primary tracks | |
5808 | for (i=0;i<fPriTrackLim;i++){ | |
5809 | fProTracks[i]=fbe.fProTracks[i]; | |
5810 | fAProTracks[i]=fbe.fAProTracks[i]; | |
5811 | } | |
5812 | // Copy the V0s | |
5813 | for (i=0;i<fV0Lim;i++){ | |
5814 | fLamTracks[i]=fbe.fLamTracks[i]; | |
5815 | fALamTracks[i]=fbe.fALamTracks[i]; | |
5816 | fBgLamTracks[i]=fbe.fBgLamTracks[i]; | |
5817 | fBgALamTracks[i]=fbe.fBgALamTracks[i]; | |
5818 | } | |
5819 | } | |
5820 | //________________________________________________________________________ | |
5821 | AliAnalysisTaskProtonLambda::FemtoBufferEvent& AliAnalysisTaskProtonLambda::FemtoBufferEvent::operator=(const FemtoBufferEvent &fbe){ | |
5822 | // Assignment operator | |
5823 | ||
5824 | // Protect against self-assignment | |
5825 | if(this!=&fbe){ | |
5826 | // Well, we use arrays of a constant size to avoid | |
5827 | // excessive memory allocation and won't give this up. | |
5828 | // So we'll only copy as much as fits on the left side | |
5829 | // from the right side. | |
5830 | // DON'T COPY THE ARRAY SIZES fV0Lim AND fPriTrackLim !!! | |
5831 | if(fPriTrackLim < fbe.GetPriTrackLim() | |
5832 | || fV0Lim < fbe.GetV0Lim()){ | |
5833 | // AliWarning(Form("Trying to assign too big event (buffer %d/%d) to" | |
5834 | // " this (buffer %d/%d). Only partially copying.", | |
5835 | // fbe.GetPriTrackLim(),fbe.GetV0Lim(), | |
5836 | // fPriTrackLim,fV0Lim)); | |
5837 | printf("Trying to assign too big event (buffer %d/%d) to" | |
5838 | " this (buffer %d/%d). Only partially copying.\n", | |
5839 | fbe.GetPriTrackLim(),fbe.GetV0Lim(), | |
5840 | fPriTrackLim,fV0Lim); | |
5841 | } | |
5842 | // Always start with the easy stuff :) | |
5843 | fbe.GetVtxPos(fPriVtxPos); | |
5844 | fBfield = fbe.GetBfield(); | |
5845 | // Number of tracks is minimum of array size of 'this' | |
5846 | // and the number of tracks from the right side | |
5847 | fNProTracks = TMath::Min(fPriTrackLim,fbe.GetNPro()); | |
5848 | fNAProTracks = TMath::Min(fPriTrackLim,fbe.GetNAPro()); | |
5849 | fNLamTracks = TMath::Min(fV0Lim,fbe.GetNLam()); | |
5850 | fNALamTracks = TMath::Min(fV0Lim,fbe.GetNALam()); | |
5851 | fNBgLamTracks = TMath::Min(fV0Lim,fbe.GetNBgLam()); | |
5852 | fNBgALamTracks = TMath::Min(fV0Lim,fbe.GetNBgALam()); | |
5853 | ||
5854 | // Avoid creation and deletion of 'i' for every loop | |
5855 | UShort_t i; | |
5856 | // Copy primary tracks. No need to set a 'bad track' | |
5857 | // flag for the entries above GetNPro() (...) as | |
5858 | // above everything is bad by definition. | |
5859 | // Protons | |
5860 | for (i=0;i<GetNPro();i++) | |
5861 | fProTracks[i]=fbe.fProTracks[i]; | |
5862 | // Anti-protons | |
5863 | for (i=0;i<GetNAPro();i++) | |
5864 | fAProTracks[i]=fbe.fAProTracks[i]; | |
5865 | // Copy the V0s | |
5866 | // Lambdas | |
5867 | for (i=0;i<GetNLam();i++){ | |
5868 | fLamTracks[i]=fbe.fLamTracks[i]; | |
5869 | } | |
5870 | // Anti-lambdas | |
5871 | for (i=0;i<GetNALam();i++){ | |
5872 | fALamTracks[i]=fbe.fALamTracks[i]; | |
5873 | } | |
5874 | // Background lambdas | |
5875 | for (i=0;i<GetNBgLam();i++){ | |
5876 | fBgLamTracks[i]=fbe.fBgLamTracks[i]; | |
5877 | } | |
5878 | // Background anti-lambdas | |
5879 | for (i=0;i<GetNBgALam();i++){ | |
5880 | fBgALamTracks[i]=fbe.fBgALamTracks[i]; | |
5881 | } | |
5882 | } | |
5883 | return *this; | |
5884 | } | |
5885 | //________________________________________________________________________ | |
5886 | AliAnalysisTaskProtonLambda::FemtoBufferEvent::~FemtoBufferEvent(){ | |
5887 | // Destructor | |
5888 | ||
5889 | // Delete the arrays of tracks, | |
5890 | // note the [] with the delete | |
5891 | if(fProTracks){ | |
5892 | delete[] fProTracks; | |
5893 | fProTracks=0; | |
5894 | } | |
5895 | if(fAProTracks){ | |
5896 | delete[] fAProTracks; | |
5897 | fAProTracks=0; | |
5898 | } | |
5899 | if(fLamTracks){ | |
5900 | delete[] fLamTracks; | |
5901 | fLamTracks=0; | |
5902 | } | |
5903 | if(fALamTracks){ | |
5904 | delete[] fALamTracks; | |
5905 | fALamTracks=0; | |
5906 | } | |
5907 | if(fBgLamTracks){ | |
5908 | delete[] fBgLamTracks; | |
5909 | fBgLamTracks=0; | |
5910 | } | |
5911 | if(fBgALamTracks){ | |
5912 | delete[] fBgALamTracks; | |
5913 | fBgALamTracks=0; | |
5914 | } | |
5915 | } | |
5916 | //________________________________________________________________________ | |
5917 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::Reset(const Double_t bfield, const Double_t priVtxPos[3]){ | |
5918 | // Reset the old event, i.e., make clear 'here is no info' | |
5919 | // by setting the 'number of stored ...' to zero | |
5920 | fNProTracks=0; | |
5921 | fNAProTracks=0; | |
5922 | fNLamTracks=0; | |
5923 | fNALamTracks=0; | |
5924 | fNBgLamTracks=0; | |
5925 | fNBgALamTracks=0; | |
5926 | ||
5927 | // And set the new event properties | |
5928 | fBfield = bfield; | |
5929 | fPriVtxPos[0]=priVtxPos[0]; | |
5930 | fPriVtxPos[1]=priVtxPos[1]; | |
5931 | fPriVtxPos[2]=priVtxPos[2]; | |
5932 | } | |
5933 | //________________________________________________________________________ | |
5934 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddPro(const AliAODTrack *track){ | |
5935 | // Add a proton to this event | |
5936 | ||
5937 | // Check whether there is still space in the array | |
5938 | if(fNProTracks > fPriTrackLim-1){ | |
5939 | // AliWarning(Form("Cannot add proton, array size (%d) too small" | |
5940 | // ,fPriTrackLim)); | |
5941 | printf("Cannot add proton, array size (%d) too small\n" | |
5942 | ,fPriTrackLim); | |
5943 | return; | |
5944 | } | |
5945 | // Add the V0 at the end of the array | |
5946 | fProTracks[fNProTracks].Set(track,fBfield,fPriVtxPos); | |
5947 | fNProTracks++; | |
5948 | // printf("Added proton %d/%d\n",fNProTracks,fPriTrackLim); | |
5949 | ||
5950 | } | |
5951 | //________________________________________________________________________ | |
5952 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddAPro(const AliAODTrack *track){ | |
5953 | // Add a anti-proton to this event | |
5954 | ||
5955 | // Check whether there is still space in the array | |
5956 | if(fNAProTracks > fPriTrackLim-1){ | |
5957 | // AliWarning(Form("Cannot add anti-proton, array size (%d) too small" | |
5958 | // ,fPriTrackLim)); | |
5959 | printf("Cannot add anti-proton, array size (%d) too small\n" | |
5960 | ,fPriTrackLim); | |
5961 | return; | |
5962 | } | |
5963 | // Add the V0 at the end of the array | |
5964 | fAProTracks[fNAProTracks].Set(track,fBfield,fPriVtxPos); | |
5965 | fNAProTracks++; | |
5966 | } | |
5967 | //________________________________________________________________________ | |
5968 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddLam(const AliAODv0 *v0,const AliAODTrack *posDaughter,const AliAODTrack *negDaughter){ | |
5969 | // Adds a lambda with it's daughters to the event | |
5970 | ||
5971 | // Check whether there is still space in the array | |
5972 | if(fNLamTracks > fV0Lim-1){ | |
5973 | // AliWarning(Form("Cannot add lambda, array size (%d) too small" | |
5974 | // ,fV0Lim)); | |
5975 | printf("Cannot add lambda, array size (%d) too small" | |
5976 | ,fV0Lim); | |
5977 | return; | |
5978 | } | |
5979 | ||
5980 | // Add the V0 at the end of the array | |
5981 | fLamTracks[fNLamTracks].Set(v0,posDaughter,negDaughter, | |
5982 | fBfield,fPriVtxPos); | |
5983 | fNLamTracks++; | |
5984 | } | |
5985 | //________________________________________________________________________ | |
5986 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddALam(const AliAODv0 *v0,const AliAODTrack *posDaughter,const AliAODTrack *negDaughter){ | |
5987 | // Adds a lambda with it's daughters to the event | |
5988 | ||
5989 | // Check whether there is still space in the array | |
5990 | if(fNALamTracks > fV0Lim-1){ | |
5991 | // AliWarning(Form("Cannot add anti-lambda, array size (%d) too small" | |
5992 | // ,fV0Lim)); | |
5993 | printf("Cannot add anti-lambda, array size (%d) too small\n" | |
5994 | ,fV0Lim); | |
5995 | return; | |
5996 | } | |
5997 | ||
5998 | // Add the V0 at the end of the array | |
5999 | fALamTracks[fNALamTracks].Set(v0,posDaughter,negDaughter, | |
6000 | fBfield,fPriVtxPos); | |
6001 | fNALamTracks++; | |
6002 | } | |
6003 | //________________________________________________________________________ | |
6004 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddBgLam(const AliAODv0 *v0,const AliAODTrack *posDaughter,const AliAODTrack *negDaughter){ | |
6005 | // Adds a lambda with it's daughters to the event | |
6006 | ||
6007 | // Check whether there is still space in the array | |
6008 | if(fNBgLamTracks > fV0Lim-1){ | |
6009 | // AliWarning(Form("Cannot add background lambda," | |
6010 | // " array size (%d) too small" | |
6011 | // ,fV0Lim)); | |
6012 | // printf("Cannot add background lambda," | |
6013 | // "already stored %d" | |
6014 | // " array size (%d) too small\n" | |
6015 | // ,fNBgLamTracks | |
6016 | // ,fV0Lim); | |
6017 | return; | |
6018 | } | |
6019 | ||
6020 | // Add the V0 at the end of the array | |
6021 | fBgLamTracks[fNALamTracks].Set(v0,posDaughter,negDaughter, | |
6022 | fBfield,fPriVtxPos); | |
6023 | fNBgLamTracks++; | |
6024 | } | |
6025 | //________________________________________________________________________ | |
6026 | void AliAnalysisTaskProtonLambda::FemtoBufferEvent::AddBgALam(const AliAODv0 *v0,const AliAODTrack *posDaughter,const AliAODTrack *negDaughter){ | |
6027 | // Adds a lambda with it's daughters to the event | |
6028 | ||
6029 | // Check whether there is still space in the array | |
6030 | if(fNBgALamTracks > fV0Lim-1){ | |
6031 | // AliWarning(Form("Cannot add background anti-lambda," | |
6032 | // " array size (%d) too small" | |
6033 | // ,fV0Lim)); | |
6034 | // printf("Cannot add background anti-lambda," | |
6035 | // " array size (%d) too small\n" | |
6036 | // ,fV0Lim); | |
6037 | return; | |
6038 | } | |
6039 | ||
6040 | // Add the V0 at the end of the array | |
6041 | fBgALamTracks[fNALamTracks].Set(v0,posDaughter,negDaughter, | |
6042 | fBfield,fPriVtxPos); | |
6043 | fNBgALamTracks++; | |
6044 | } | |
6045 | //________________________________________________________________________ | |
6046 | // | |
6047 | // FemtoBuffer | |
6048 | //________________________________________________________________________ | |
6049 | AliAnalysisTaskProtonLambda::FemtoBuffer::FemtoBuffer() : | |
6050 | fkZvertexBins(0), | |
6051 | fkCentBins(0), | |
6052 | fkMixBuffSize(0), | |
6053 | fkPriTrackLim(0), | |
6054 | fkV0Lim(0), | |
6055 | fZvertexAxis(0), | |
6056 | fCentAxis(0), | |
6057 | fCurEvt(0), | |
6058 | fEC(0) | |
6059 | { | |
6060 | // Dummy constructor, create arrays with zero size | |
6061 | // Note that some data member are constant, you | |
6062 | // won't be able to create the FemtoBuffer first with this | |
6063 | // constructor and then set the appropiate size. | |
6064 | ||
6065 | } | |
6066 | //________________________________________________________________________ | |
6067 | AliAnalysisTaskProtonLambda::FemtoBuffer::FemtoBuffer(const UChar_t ZvertexBins,const UChar_t CentBins,const UChar_t MixBuff,const UShort_t PriTrackLim,const UShort_t V0Lim, const Float_t AbsZvertexCut,const Float_t CentCut) : | |
6068 | fkZvertexBins(ZvertexBins), | |
6069 | fkCentBins(CentBins), | |
6070 | fkMixBuffSize(MixBuff), | |
6071 | fkPriTrackLim(PriTrackLim), | |
6072 | fkV0Lim(V0Lim), | |
6073 | fZvertexAxis(new TAxis(fkZvertexBins,-AbsZvertexCut,AbsZvertexCut)), | |
6074 | fCentAxis(new TAxis (fkCentBins,0.0,CentCut)), | |
6075 | fCurEvt(new FemtoBufferEvent *[fkMixBuffSize]), | |
6076 | fEC(new FemtoBufferEvent ***[fkZvertexBins]) | |
6077 | { | |
6078 | // Constructor, creates at once all events with all tracks | |
6079 | // printf ("Creating with pritracklim %d and v0lim %d\n",fkPriTrackLim,fkV0Lim); | |
6080 | ||
6081 | // Create the array step by step | |
6082 | // Bins in z of the primary vertex position. Do this as | |
6083 | // the detector looks different from a different z coordinate | |
6084 | for (UChar_t iZBin=0;iZBin<fkZvertexBins;iZBin++){ | |
6085 | fEC[iZBin] = new FemtoBufferEvent **[fkCentBins]; | |
6086 | // Bins in centrality | |
6087 | for (UChar_t iCentBin=0;iCentBin<fkCentBins;iCentBin++){ | |
6088 | fEC[iZBin][iCentBin] = new FemtoBufferEvent *[fkMixBuffSize]; | |
6089 | // The number of events to keep for one mixing class | |
6090 | for(UChar_t iMixBuff=0;iMixBuff<fkMixBuffSize;iMixBuff++){ | |
6091 | // Create an event to hold the info for mixing | |
6092 | fEC[iZBin][iCentBin][iMixBuff] = new FemtoBufferEvent(fkPriTrackLim,fkV0Lim); | |
6093 | } | |
6094 | } | |
6095 | } | |
6096 | } | |
6097 | //________________________________________________________________________ | |
6098 | AliAnalysisTaskProtonLambda::FemtoBuffer::FemtoBuffer(const AliAnalysisTaskProtonLambda::FemtoBuffer &fb) : | |
6099 | fkZvertexBins(fb.fkZvertexBins), | |
6100 | fkCentBins(fb.fkCentBins), | |
6101 | fkMixBuffSize(fb.fkMixBuffSize), | |
6102 | fkPriTrackLim(fb.fkPriTrackLim), | |
6103 | fkV0Lim(fb.fkV0Lim), | |
6104 | fZvertexAxis(new TAxis(*(fb.fZvertexAxis))), | |
6105 | fCentAxis(new TAxis (*(fb.fCentAxis))), | |
6106 | fCurEvt(new FemtoBufferEvent *[fkMixBuffSize]), | |
6107 | fEC(new FemtoBufferEvent ***[fkZvertexBins]) | |
6108 | { | |
6109 | // Copy constructor. Linux complains not having this and | |
6110 | // compiling this task with aliroot | |
6111 | ||
6112 | printf("FemtoBuffer ctor not tested yet, be cautious\n"); | |
6113 | ||
6114 | // Create the array step by step | |
6115 | // Bins in z of the primary vertex position. Do this as | |
6116 | // the detector looks different from a different z coordinate | |
6117 | for (UChar_t iZBin=0;iZBin<fkZvertexBins;iZBin++){ | |
6118 | fEC[iZBin] = new FemtoBufferEvent **[fkCentBins]; | |
6119 | // Bins in centrality | |
6120 | for (UChar_t iCentBin=0;iCentBin<fkCentBins;iCentBin++){ | |
6121 | fEC[iZBin][iCentBin] = new FemtoBufferEvent *[fkMixBuffSize]; | |
6122 | // The number of events to keep for one mixing class | |
6123 | for(UChar_t iMixBuff=0;iMixBuff<fkMixBuffSize;iMixBuff++){ | |
6124 | // Create an event to hold the info for mixing | |
6125 | fEC[iZBin][iCentBin][iMixBuff] = new FemtoBufferEvent(*(fb.fEC[iZBin][iCentBin][iMixBuff])); | |
6126 | } | |
6127 | } | |
6128 | } | |
6129 | } | |
6130 | //________________________________________________________________________ | |
6131 | AliAnalysisTaskProtonLambda::FemtoBuffer& AliAnalysisTaskProtonLambda::FemtoBuffer::operator=(const AliAnalysisTaskProtonLambda::FemtoBuffer& fb){ | |
6132 | //Assignment operator | |
6133 | if(this!=&fb){ | |
6134 | printf("FemtoBuffer assignment operator not implemented\n"); | |
6135 | } | |
6136 | return *this; | |
6137 | ||
6138 | } | |
6139 | //________________________________________________________________________ | |
6140 | AliAnalysisTaskProtonLambda::FemtoBuffer::~FemtoBuffer(){ | |
6141 | // Destructor | |
6142 | // The axes to fin the correct bins | |
6143 | if(fZvertexAxis){ | |
6144 | delete fZvertexAxis; | |
6145 | fZvertexAxis=0; | |
6146 | } | |
6147 | if(fCentAxis){ | |
6148 | delete fCentAxis; | |
6149 | fCentAxis=0; | |
6150 | } | |
6151 | // fCurEvt is an array of pointer | |
6152 | if(fCurEvt){ | |
6153 | delete[] fCurEvt; | |
6154 | fCurEvt=0; | |
6155 | } | |
6156 | // Delete all the events and the pointer to them | |
6157 | for (UChar_t iZBin=0;iZBin<fkZvertexBins;iZBin++){ | |
6158 | for (UChar_t iCentBin=0;iCentBin<fkCentBins;iCentBin++){ | |
6159 | for(UChar_t iMixBuff=0;iMixBuff<fkMixBuffSize;iMixBuff++){ | |
6160 | if(fEC[iZBin][iCentBin][iMixBuff]){ | |
6161 | delete fEC[iZBin][iCentBin][iMixBuff]; | |
6162 | fEC[iZBin][iCentBin][iMixBuff]=0; | |
6163 | } | |
6164 | } | |
6165 | if(fEC[iZBin][iCentBin]){ | |
6166 | delete fEC[iZBin][iCentBin]; | |
6167 | fEC[iZBin][iCentBin]=0; | |
6168 | } | |
6169 | } | |
6170 | if(fEC[iZBin]){ | |
6171 | delete fEC[iZBin]; | |
6172 | fEC[iZBin]=0; | |
6173 | } | |
6174 | } | |
6175 | if(fEC){ | |
6176 | delete fEC; | |
6177 | fEC=0; | |
6178 | } | |
6179 | } | |
6180 | //________________________________________________________________________ | |
6181 | void AliAnalysisTaskProtonLambda::FemtoBuffer::ShiftAndAdd(AliAODEvent *evt){ | |
6182 | // Shift the events in the appropiate centrality / zvertex bin and set the | |
6183 | // current event pointer correctly | |
6184 | Double_t priVtxPos[3]; | |
6185 | evt->GetPrimaryVertex()->GetXYZ(priVtxPos); | |
6186 | // printf("Mag field: %f\n",evt->GetMagneticField()); | |
6187 | ShiftAndAdd(evt->GetMagneticField(), | |
6188 | priVtxPos, | |
6189 | evt->GetCentrality()->GetCentralityPercentileUnchecked("V0M")); | |
6190 | } | |
6191 | //________________________________________________________________________ | |
6192 | void AliAnalysisTaskProtonLambda::FemtoBuffer::ShiftAndAdd(const Double_t bfield,const Double_t priVtxPos[3],const Float_t centrality){ | |
6193 | // Shift the events in the appropiate centrality / zvertex bin and set the | |
6194 | // current event pointer correctly | |
6195 | ||
6196 | // Find the correct centrality/zvertex bin | |
6197 | const UChar_t ZvertexBin = fZvertexAxis->FindFixBin(priVtxPos[2]) - 1; // -1 for array starting at 0 | |
6198 | const UChar_t CentBin = fCentAxis->FindFixBin(centrality) - 1;// -1 for array starting at 0 | |
6199 | ||
6200 | // The new current event is the old last event | |
6201 | fCurEvt[0] = fEC[ZvertexBin][CentBin][fkMixBuffSize-1]; | |
6202 | ||
6203 | // Shift the pointer, starting from the back | |
6204 | UChar_t iMix; | |
6205 | for(iMix=fkMixBuffSize-1;iMix>0;iMix--){ | |
6206 | fEC[ZvertexBin][CentBin][iMix] = fEC[ZvertexBin][CentBin][iMix-1]; | |
6207 | } | |
6208 | // And reset the zero'th one | |
6209 | fEC[ZvertexBin][CentBin][0] = fCurEvt[0]; | |
6210 | fEC[ZvertexBin][CentBin][0]->Reset(bfield,priVtxPos); | |
6211 | // Also set the pointer to the other events.. | |
6212 | for (iMix=1;iMix<fkMixBuffSize;iMix++){ | |
6213 | fCurEvt[iMix] = fEC[ZvertexBin][CentBin][iMix]; | |
6214 | } | |
6215 | } |