]>
Commit | Line | Data |
---|---|---|
0dbb51a0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2009, 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 | ||
27de2dfb | 16 | /* $Id$ */ |
17 | ||
0dbb51a0 | 18 | ///////////////////////////////////////////////////////////// |
19 | // | |
20 | // AliAnalysisTaskSE for HF quality assurance | |
21 | // | |
22 | // Author: Chiara Bianchin, chiara.bianchin@pd.infn.it | |
23 | ///////////////////////////////////////////////////////////// | |
24 | ||
25 | #include <Riostream.h> | |
26 | #include <TClonesArray.h> | |
27 | #include <TCanvas.h> | |
28 | #include <TList.h> | |
29 | #include <TH1F.h> | |
30 | #include <TH2F.h> | |
d48d81b5 | 31 | #include <TH3F.h> |
32 | #include <TProfile2D.h> | |
0dbb51a0 | 33 | #include <TDatabasePDG.h> |
34 | ||
35 | #include <AliAnalysisDataSlot.h> | |
36 | #include <AliAnalysisDataContainer.h> | |
37 | #include "AliAnalysisManager.h" | |
38 | #include "AliESDtrack.h" | |
824b448a | 39 | #include "AliESDVertex.h" |
0dbb51a0 | 40 | #include "AliVertexerTracks.h" |
41 | #include "AliPID.h" | |
e7af8919 | 42 | #include "AliPIDResponse.h" |
0dbb51a0 | 43 | #include "AliTPCPIDResponse.h" |
44 | #include "AliAODHandler.h" | |
45 | #include "AliAODEvent.h" | |
46 | #include "AliAODVertex.h" | |
47 | #include "AliAODTrack.h" | |
48 | #include "AliAODMCParticle.h" | |
a4ef4383 | 49 | #include "AliAODMCHeader.h" |
0dbb51a0 | 50 | #include "AliAODRecoDecayHF2Prong.h" |
51 | #include "AliAODRecoCascadeHF.h" | |
52 | #include "AliAnalysisVertexingHF.h" | |
53 | #include "AliAnalysisTaskSE.h" | |
a4ef4383 | 54 | #include "AliCounterCollection.h" |
0dbb51a0 | 55 | #include "AliRDHFCuts.h" |
56 | #include "AliRDHFCutsDplustoKpipi.h" | |
57 | #include "AliRDHFCutsD0toKpipipi.h" | |
58 | #include "AliRDHFCutsDstoKKpi.h" | |
59 | #include "AliRDHFCutsDStartoKpipi.h" | |
60 | #include "AliRDHFCutsD0toKpi.h" | |
61 | #include "AliRDHFCutsLctopKpi.h" | |
ca688a98 | 62 | #include "AliRDHFCutsLctoV0.h" |
a4b0ffc7 | 63 | #include "AliInputEventHandler.h" |
0dbb51a0 | 64 | |
d48d81b5 | 65 | #include "AliFlowEvent.h" |
66 | #include "AliFlowTrackCuts.h" | |
67 | #include "AliFlowTrackSimple.h" | |
68 | #include "AliFlowVector.h" | |
69 | ||
0dbb51a0 | 70 | #include "AliAnalysisTaskSEHFQA.h" |
71 | ||
c64cb1f6 | 72 | using std::cout; |
73 | using std::endl; | |
74 | ||
0dbb51a0 | 75 | ClassImp(AliAnalysisTaskSEHFQA) |
76 | ||
77 | //____________________________________________________________________________ | |
78 | ||
79 | AliAnalysisTaskSEHFQA::AliAnalysisTaskSEHFQA():AliAnalysisTaskSE(), | |
80 | fNEntries(0x0), | |
81 | fOutputPID(0x0), | |
82 | fOutputTrack(0x0), | |
a4ef4383 | 83 | fOutputCounters(0x0), |
84 | fOutputCheckCentrality(0x0), | |
818c1271 | 85 | fOutputEvSelection(0x0), |
d48d81b5 | 86 | fOutputFlowObs(0x0), |
0dbb51a0 | 87 | fDecayChannel(AliAnalysisTaskSEHFQA::kD0toKpi), |
a4ef4383 | 88 | fCuts(0x0), |
d48d81b5 | 89 | fFlowEvent(0x0), |
90 | fRFPcuts(0x0), | |
a4ef4383 | 91 | fEstimator(AliRDHFCuts::kCentTRK), |
19222b31 | 92 | fReadMC(kFALSE), |
5fc4893f | 93 | fSimpleMode(kFALSE), |
0dc0101f | 94 | fUseSelectionBit(kTRUE), |
8e4c6c96 | 95 | fOnOff(), |
96 | fFillDistrTrackEffChecks(kFALSE) | |
0dbb51a0 | 97 | { |
98 | //default constructor | |
5fc4893f | 99 | fOnOff[0]=kTRUE; |
100 | fOnOff[1]=kTRUE; | |
101 | fOnOff[2]=kTRUE; | |
818c1271 | 102 | fOnOff[3]=kTRUE; |
d48d81b5 | 103 | fOnOff[4]=kTRUE; |
0dbb51a0 | 104 | } |
105 | ||
106 | //____________________________________________________________________________ | |
107 | AliAnalysisTaskSEHFQA::AliAnalysisTaskSEHFQA(const char *name, AliAnalysisTaskSEHFQA::DecChannel ch,AliRDHFCuts* cuts): | |
a4ef4383 | 108 | AliAnalysisTaskSE(name), |
109 | fNEntries(0x0), | |
110 | fOutputPID(0x0), | |
111 | fOutputTrack(0x0), | |
112 | fOutputCounters(0x0), | |
113 | fOutputCheckCentrality(0x0), | |
818c1271 | 114 | fOutputEvSelection(0x0), |
d48d81b5 | 115 | fOutputFlowObs(0x0), |
a4ef4383 | 116 | fDecayChannel(ch), |
117 | fCuts(0x0), | |
d48d81b5 | 118 | fFlowEvent(0x0), |
119 | fRFPcuts(0x0), | |
a4ef4383 | 120 | fEstimator(AliRDHFCuts::kCentTRK), |
19222b31 | 121 | fReadMC(kFALSE), |
5fc4893f | 122 | fSimpleMode(kFALSE), |
19f6b9ff | 123 | fUseSelectionBit(kTRUE), |
8e4c6c96 | 124 | fOnOff(), |
125 | fFillDistrTrackEffChecks(kFALSE) | |
0dbb51a0 | 126 | { |
127 | //constructor | |
128 | ||
129 | //SetCutObject(cuts); | |
130 | fCuts=cuts; | |
131 | ||
5fc4893f | 132 | fOnOff[0]=kTRUE; |
133 | fOnOff[1]=kTRUE; | |
134 | fOnOff[2]=kTRUE; | |
818c1271 | 135 | fOnOff[3]=kTRUE; |
d48d81b5 | 136 | fOnOff[4]=kTRUE; |
5fc4893f | 137 | |
0dbb51a0 | 138 | // Output slot #1 writes into a TH1F container (number of events) |
139 | DefineOutput(1,TH1F::Class()); //My private output | |
140 | // Output slot #2 writes into a TList container (PID) | |
5fc4893f | 141 | if (fOnOff[1]) DefineOutput(2,TList::Class()); //My private output |
0dbb51a0 | 142 | // Output slot #3 writes into a TList container (Tracks) |
5fc4893f | 143 | if (fOnOff[0]) DefineOutput(3,TList::Class()); //My private output |
0dbb51a0 | 144 | // Output slot #4 writes into a AliRDHFCuts container (cuts) |
145 | switch(fDecayChannel){ | |
146 | case 0: | |
147 | DefineOutput(4,AliRDHFCutsDplustoKpipi::Class()); //My private output | |
148 | break; | |
149 | case 1: | |
150 | DefineOutput(4,AliRDHFCutsD0toKpi::Class()); //My private output | |
151 | break; | |
152 | case 2: | |
153 | DefineOutput(4,AliRDHFCutsDStartoKpipi::Class()); //My private output | |
154 | break; | |
155 | case 3: | |
156 | DefineOutput(4,AliRDHFCutsDstoKKpi::Class()); //My private output | |
157 | break; | |
158 | case 4: | |
159 | DefineOutput(4,AliRDHFCutsD0toKpipipi::Class()); //My private output | |
160 | break; | |
a4ef4383 | 161 | case 5: |
0dbb51a0 | 162 | DefineOutput(4,AliRDHFCutsLctopKpi::Class()); //My private output |
163 | break; | |
ca688a98 | 164 | case kLambdactoV0: |
165 | DefineOutput(4,AliRDHFCutsLctoV0::Class()); //My private output | |
166 | break; | |
a4ef4383 | 167 | } |
5fc4893f | 168 | if (fOnOff[2]) { |
169 | // Output slot #5 writes into a TList container (AliCounterCollection) | |
170 | DefineOutput(5,TList::Class()); //My private output | |
171 | // Output slot #6 writes into a TList container (TH1F) | |
172 | DefineOutput(6,TList::Class()); //My private output | |
173 | } | |
818c1271 | 174 | |
175 | if(fOnOff[3]) DefineOutput(7,TList::Class()); //My private output | |
d48d81b5 | 176 | if(fOnOff[4]) DefineOutput(8,TList::Class()); //My private output |
818c1271 | 177 | |
0dbb51a0 | 178 | } |
179 | ||
180 | //___________________________________________________________________________ | |
181 | AliAnalysisTaskSEHFQA::~AliAnalysisTaskSEHFQA() | |
182 | { | |
183 | //destructor | |
a4ef4383 | 184 | delete fNEntries; |
185 | ||
186 | delete fOutputPID; | |
187 | ||
188 | delete fOutputTrack; | |
189 | ||
190 | delete fOutputCounters; | |
191 | ||
192 | delete fOutputCheckCentrality; | |
193 | ||
818c1271 | 194 | delete fOutputEvSelection; |
195 | ||
d48d81b5 | 196 | if(fOnOff[4]) { |
197 | delete fOutputFlowObs; | |
198 | delete fFlowEvent; | |
199 | } | |
0dbb51a0 | 200 | } |
201 | ||
202 | //___________________________________________________________________________ | |
203 | void AliAnalysisTaskSEHFQA::Init(){ | |
204 | ||
205 | //initialization | |
206 | if(fDebug > 1) printf("AnalysisTaskSEHFQA::Init() \n"); | |
439ce262 | 207 | AliRDHFCuts *copycut = 0x0; |
0dbb51a0 | 208 | |
209 | switch(fDecayChannel){ | |
210 | case 0: | |
211 | { | |
439ce262 | 212 | copycut=new AliRDHFCutsDplustoKpipi(*(static_cast<AliRDHFCutsDplustoKpipi*>(fCuts))); |
0dbb51a0 | 213 | } |
214 | break; | |
215 | case 1: | |
216 | { | |
439ce262 | 217 | copycut=new AliRDHFCutsD0toKpi(*(static_cast<AliRDHFCutsD0toKpi*>(fCuts))); |
0dbb51a0 | 218 | } |
219 | break; | |
220 | case 2: | |
221 | { | |
439ce262 | 222 | copycut=new AliRDHFCutsDStartoKpipi(*(static_cast<AliRDHFCutsDStartoKpipi*>(fCuts))); |
0dbb51a0 | 223 | } |
224 | break; | |
225 | case 3: | |
226 | { | |
439ce262 | 227 | copycut=new AliRDHFCutsDstoKKpi(*(static_cast<AliRDHFCutsDstoKKpi*>(fCuts))); |
0dbb51a0 | 228 | } |
229 | break; | |
230 | case 4: | |
231 | { | |
439ce262 | 232 | copycut=new AliRDHFCutsD0toKpipipi(*(static_cast<AliRDHFCutsD0toKpipipi*>(fCuts))); |
0dbb51a0 | 233 | } |
234 | break; | |
235 | case 5: | |
236 | { | |
439ce262 | 237 | copycut=new AliRDHFCutsLctopKpi(*(static_cast<AliRDHFCutsLctopKpi*>(fCuts))); |
0dbb51a0 | 238 | } |
239 | break; | |
ca688a98 | 240 | case kLambdactoV0: |
241 | { | |
439ce262 | 242 | copycut=new AliRDHFCutsLctoV0(*(static_cast<AliRDHFCutsLctoV0*>(fCuts))); |
ca688a98 | 243 | } |
244 | break; | |
0dbb51a0 | 245 | default: |
439ce262 | 246 | AliFatal("Bad initialization for the decay channe - Exiting..."); |
247 | break; | |
248 | } | |
0dbb51a0 | 249 | |
439ce262 | 250 | const char* nameoutput=GetOutputSlot(4)->GetContainer()->GetName(); |
251 | if (copycut){ | |
252 | copycut->SetName(nameoutput); | |
253 | ||
254 | // Post the data | |
255 | PostData(4,copycut); | |
256 | }else{ | |
257 | AliFatal("Failing initializing AliRDHFCuts object - Exiting..."); | |
258 | } | |
0dbb51a0 | 259 | |
439ce262 | 260 | return; |
0dbb51a0 | 261 | |
262 | } | |
263 | ||
264 | //___________________________________________________________________________ | |
265 | void AliAnalysisTaskSEHFQA::UserCreateOutputObjects() | |
266 | { | |
267 | ||
268 | //create the output container | |
269 | if(fDebug > 1) printf("AnalysisTaskSEHFQA::UserCreateOutputObjects() \n"); | |
270 | ||
271 | //count events | |
272 | ||
acc33385 | 273 | fNEntries=new TH1F(GetOutputSlot(1)->GetContainer()->GetName(), "Counts the number of events", 10,-0.5,9.5); |
0dbb51a0 | 274 | fNEntries->GetXaxis()->SetBinLabel(1,"nEventsAnal"); |
275 | fNEntries->GetXaxis()->SetBinLabel(2,"Pile-up Rej"); | |
276 | fNEntries->GetXaxis()->SetBinLabel(3,"No VertexingHF"); | |
9af24f46 | 277 | fNEntries->GetXaxis()->SetBinLabel(4,"nCandidates(AnCuts)"); |
278 | fNEntries->GetXaxis()->SetBinLabel(5,"EventsWithGoodVtx"); | |
5fc4893f | 279 | //fNEntries->GetXaxis()->SetBinLabel(6,"N. of 0SMH"); |
1d654f7b | 280 | fNEntries->GetXaxis()->SetBinLabel(6,"N candidates"); |
a4ef4383 | 281 | if(fReadMC){ |
282 | fNEntries->GetXaxis()->SetBinLabel(7,"MC Cand from c"); | |
283 | fNEntries->GetXaxis()->SetBinLabel(8,"MC Cand from b"); | |
acc33385 | 284 | fNEntries->GetXaxis()->SetBinLabel(9,"N fake Trks"); |
285 | fNEntries->GetXaxis()->SetBinLabel(10,"N true Trks"); | |
a4ef4383 | 286 | } |
287 | ||
0dbb51a0 | 288 | fNEntries->GetXaxis()->SetNdivisions(1,kFALSE); |
289 | ||
290 | //PID | |
5fc4893f | 291 | if(fOnOff[1]){ |
292 | fOutputPID=new TList(); | |
293 | fOutputPID->SetOwner(); | |
294 | fOutputPID->SetName(GetOutputSlot(2)->GetContainer()->GetName()); | |
0dbb51a0 | 295 | |
5fc4893f | 296 | //TOF pid |
5c13a4db | 297 | TH1F* hTOFflags=new TH1F("hTOFflags","TOF flags",7,-0.5,6.5); |
b906dda8 | 298 | hTOFflags->SetMinimum(0.); |
299 | hTOFflags->GetXaxis()->SetBinLabel(1,"All Tracks"); | |
23dfe729 | 300 | hTOFflags->GetXaxis()->SetBinLabel(2,"kTPCout"); |
301 | hTOFflags->GetXaxis()->SetBinLabel(3,"kTOFout"); | |
302 | hTOFflags->GetXaxis()->SetBinLabel(4,"kTIME"); | |
303 | hTOFflags->GetXaxis()->SetBinLabel(5,"kTOFpid"); | |
304 | hTOFflags->GetXaxis()->SetBinLabel(6,"kTOFmismatch"); | |
5c13a4db | 305 | hTOFflags->GetXaxis()->SetBinLabel(7,"kDetPidOK"); |
b906dda8 | 306 | |
5fc4893f | 307 | TString hname="hTOFsig"; |
308 | TH1F* hTOFsig=new TH1F(hname.Data(),"Distribution of TOF signal;TOF time [ps];Entries", 100, -2.e3,40.e3); | |
0dbb51a0 | 309 | |
20baad42 | 310 | hname="hTOFstartTimeMask"; |
311 | TH1F* hTOFstartTimeMask=new TH1F(hname.Data(),"TOF start time mask; Mask ;Entries", 8, -0.5,7.5); | |
312 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(1,"FILL"); | |
313 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(2,"TOF"); | |
314 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(3,"T0A"); | |
315 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(4,"TOF.and.T0A"); | |
316 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(5,"T0C"); | |
317 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(6,"TOF.and.T0C"); | |
318 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(7,"T0AC"); | |
319 | hTOFstartTimeMask->GetXaxis()->SetBinLabel(8,"TOF.and.T0AC"); | |
320 | ||
321 | hname="hTOFstartTimeRes"; | |
322 | TH1F* hTOFstartTimeRes=new TH1F(hname.Data(),"TOF start time resolution; Resolution (ps) ;Entries", 100, 0.,300.); | |
323 | ||
5c13a4db | 324 | hname="hTOFstartTimeDistrib"; |
325 | TH1F* hTOFstartTimeDistrib=new TH1F(hname.Data(),"TOF start time distribution; Start time ;Entries", 400, -1000.,1000.); | |
326 | ||
5fc4893f | 327 | hname="hTOFtime"; |
328 | TH1F* hTOFtime=new TH1F(hname.Data(),"Distribution of TOF time Kaon;TOF time(Kaon) [ps];Entries", 1000, 0.,50000.); | |
0dbb51a0 | 329 | |
5fc4893f | 330 | hname="hTOFtimeKaonHyptime"; |
b906dda8 | 331 | TH2F* hTOFtimeKaonHyptime=new TH2F(hname.Data(),"TOFtime - timeHypothesisForKaon;p[GeV/c];TOFtime - timeHypothesisForKaon [ps]",500,0.,10.,1000,-20000.,20000.); |
0dbb51a0 | 332 | |
5fc4893f | 333 | hname="hTOFtimeKaonHyptimeAC"; |
b906dda8 | 334 | TH2F* hTOFtimeKaonHyptimeAC=new TH2F(hname.Data(),"TOFtime - timeHypothesisForKaon;p[GeV/c];TOFtime - timeHypothesisForKaon [ps]",500,0.,10.,1000,-20000.,20000.); |
0dbb51a0 | 335 | |
5fc4893f | 336 | hname="hTOFsigmaKSigPid"; |
23dfe729 | 337 | TH2F* hTOFsigmaKSigPid=new TH2F(hname.Data(),"(TOFsignal-timeK)/tofSigPid;p[GeV/c];(TOFsignal-timeK)/tofSigPid",500,0.,10.,400,-20,20); |
0dbb51a0 | 338 | |
5fc4893f | 339 | hname="hTOFsigmaPionSigPid"; |
23dfe729 | 340 | TH2F* hTOFsigmaPionSigPid=new TH2F(hname.Data(),"(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid",500,0.,10.,400,-20,20); |
a4ef4383 | 341 | |
5fc4893f | 342 | hname="hTOFsigmaProtonSigPid"; |
23dfe729 | 343 | TH2F* hTOFsigmaProtonSigPid=new TH2F(hname.Data(),"(TOFsignal-timep)/tofSigPid;p[GeV/c];(TOFsignal-time p)/tofSigPid",500,0.,10.,400,-20,20); |
a4ef4383 | 344 | |
5fc4893f | 345 | hname="hTOFsigPid3sigPion"; |
346 | TH1F* hTOFsigPid3sigPion=new TH1F(hname.Data(),"TOF PID resolution (#pi) [ps]",500,0.,1000.); | |
a4ef4383 | 347 | |
5fc4893f | 348 | hname="hTOFsigPid3sigKaon"; |
349 | TH1F* hTOFsigPid3sigKaon=new TH1F(hname.Data(),"TOF PID resolution (K) [ps]",500,0.,1000.); | |
0dbb51a0 | 350 | |
5fc4893f | 351 | hname="hTOFsigPid3sigProton"; |
352 | TH1F* hTOFsigPid3sigProton=new TH1F(hname.Data(),"TOF PID resolution (p) [ps]",500,0.,1000.); | |
a4ef4383 | 353 | |
0dbb51a0 | 354 | |
5fc4893f | 355 | //TPC pid |
356 | hname="hTPCsig"; | |
357 | TH1F* hTPCsig=new TH1F(hname.Data(),"Distribution of TPC signal;TPC sig;Entries", 100, 35.,100.); | |
0dbb51a0 | 358 | |
5fc4893f | 359 | hname="hTPCsigvsp"; |
b906dda8 | 360 | TH2F* hTPCsigvsp=new TH2F(hname.Data(),"TPCsig vs p;TPC p[GeV/c];TPCsig",500,0.,10.,1000,35.,100.); |
0dbb51a0 | 361 | |
5fc4893f | 362 | hname="hTPCsigvspAC"; |
b906dda8 | 363 | TH2F* hTPCsigvspAC=new TH2F(hname.Data(),"TPCsig vs p;TPCp[GeV/c];TPCsig",500,0.,10.,1000,35.,100.); |
5fc4893f | 364 | |
365 | hname="hTPCsigmaK"; | |
b906dda8 | 366 | TH2F* hTPCsigmaK=new TH2F(hname.Data(),"TPC Sigma for K as a function of momentum;p[GeV/c];Sigma Kaon",500,0.,10.,400,-20,20); |
5fc4893f | 367 | |
368 | hname="hTPCsigmaPion"; | |
b906dda8 | 369 | TH2F* hTPCsigmaPion=new TH2F(hname.Data(),"TPC Sigma for #pi as a function of momentum;p[GeV/c];Sigma #pi",500,0.,10.,400,-20,20); |
5fc4893f | 370 | |
371 | hname="hTPCsigmaProton"; | |
b906dda8 | 372 | TH2F* hTPCsigmaProton=new TH2F(hname.Data(),"TPC Sigma for proton as a function of momentum;p[GeV/c];Sigma Proton",500,0.,10.,400,-20,20); |
5fc4893f | 373 | |
84a4c5bc | 374 | |
b906dda8 | 375 | fOutputPID->Add(hTOFflags); |
5fc4893f | 376 | fOutputPID->Add(hTOFsig); |
377 | fOutputPID->Add(hTPCsig); | |
20baad42 | 378 | fOutputPID->Add(hTOFstartTimeMask); |
379 | fOutputPID->Add(hTOFstartTimeRes); | |
5c13a4db | 380 | fOutputPID->Add(hTOFstartTimeDistrib); |
5fc4893f | 381 | fOutputPID->Add(hTOFtime); |
382 | fOutputPID->Add(hTOFtimeKaonHyptime); | |
383 | fOutputPID->Add(hTOFtimeKaonHyptimeAC); | |
5fc4893f | 384 | fOutputPID->Add(hTOFsigmaKSigPid); |
385 | fOutputPID->Add(hTOFsigmaPionSigPid); | |
386 | fOutputPID->Add(hTOFsigmaProtonSigPid); | |
387 | fOutputPID->Add(hTOFsigPid3sigPion); | |
388 | fOutputPID->Add(hTOFsigPid3sigKaon); | |
389 | fOutputPID->Add(hTOFsigPid3sigProton); | |
390 | fOutputPID->Add(hTPCsigvsp); | |
391 | fOutputPID->Add(hTPCsigvspAC); | |
392 | fOutputPID->Add(hTPCsigmaK); | |
393 | fOutputPID->Add(hTPCsigmaPion); | |
394 | fOutputPID->Add(hTPCsigmaProton); | |
24748c57 | 395 | |
84a4c5bc | 396 | if(fFillDistrTrackEffChecks){ |
397 | ||
398 | hname="hTPCsigNvsPtAllTracks"; | |
399 | TH2F* hTPCsigNvsPtAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. p_{T};p_{T} [GeV/c]; n. points", 200, 0.,20.,161,-0.5,160.5); | |
400 | ||
401 | hname="hTPCsigNvsPhiAllTracks"; | |
402 | TH2F* hTPCsigNvsPhiAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #phi;#phi [rad]; n. points", 100, 0.,2*TMath::Pi(),161,-0.5,160.5); | |
403 | ||
404 | hname="hTPCsigNvsEtaAllTracks"; | |
405 | TH2F* hTPCsigNvsEtaAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #eta;eta; n. points", 80,-2.,2.,161,-0.5,160.5); | |
406 | ||
407 | hname="hTPCsigNvsPtDaughters"; | |
408 | TH2F* hTPCsigNvsPtDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. p_{T};p_{T} [GeV/c]; n. points", 200, 0.,20.,161,-0.5,160.5); | |
409 | ||
410 | hname="hTPCsigNvsPhiDaughters"; | |
411 | TH2F* hTPCsigNvsPhiDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #phi;#phi [rad]; n. points", 100, 0.,2*TMath::Pi(),161,-0.5,160.5); | |
412 | ||
413 | hname="hTPCsigNvsEtaDaughters"; | |
414 | TH2F* hTPCsigNvsEtaDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #eta;eta; n. points", 80,-2.,2.,161,-0.5,160.5); | |
415 | ||
416 | fOutputPID->Add(hTPCsigNvsPtAllTracks); | |
417 | fOutputPID->Add(hTPCsigNvsPhiAllTracks); | |
418 | fOutputPID->Add(hTPCsigNvsEtaAllTracks); | |
419 | fOutputPID->Add(hTPCsigNvsPtDaughters); | |
420 | fOutputPID->Add(hTPCsigNvsPhiDaughters); | |
421 | fOutputPID->Add(hTPCsigNvsEtaDaughters); | |
422 | } | |
423 | ||
424 | ||
24748c57 | 425 | if(fReadMC){ |
426 | //TOF | |
427 | hname="hTOFsigmaMCKSigPid"; | |
428 | TH2F* hTOFsigmaMCKSigPid=new TH2F(hname.Data(),"(TOFsignal-timeK)/tofSigPid;p[GeV/c];(TOFsignal-timeK)/tofSigPid",500,0.,10.,400,-20,20); | |
429 | ||
430 | hname="hTOFsigmaMCPionSigPid"; | |
431 | TH2F* hTOFsigmaMCPionSigPid=new TH2F(hname.Data(),"(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid",500,0.,10.,400,-20,20); | |
432 | ||
433 | hname="hTOFsigmaMCProtonSigPid"; | |
434 | TH2F* hTOFsigmaMCProtonSigPid=new TH2F(hname.Data(),"(TOFsignal-timep)/tofSigPid;p[GeV/c];(TOFsignal-time p)/tofSigPid",500,0.,10.,400,-20,20); | |
435 | ||
436 | //TPC | |
437 | hname="hTPCsigmaMCK"; | |
438 | TH2F* hTPCsigmaMCK=new TH2F(hname.Data(),"TPC Sigma for K as a function of momentum;p[GeV/c];Sigma Kaon",500,0.,10.,400,-20,20); | |
439 | ||
440 | hname="hTPCsigmaMCPion"; | |
441 | TH2F* hTPCsigmaMCPion=new TH2F(hname.Data(),"TPC Sigma for #pi as a function of momentum;p[GeV/c];Sigma #pi",500,0.,10.,400,-20,20); | |
442 | ||
443 | hname="hTPCsigmaMCProton"; | |
444 | TH2F* hTPCsigmaMCProton=new TH2F(hname.Data(),"TPC Sigma for proton as a function of momentum;p[GeV/c];Sigma Proton",500,0.,10.,400,-20,20); | |
445 | ||
446 | fOutputPID->Add(hTOFsigmaMCKSigPid); | |
447 | fOutputPID->Add(hTOFsigmaMCPionSigPid); | |
448 | fOutputPID->Add(hTOFsigmaMCProtonSigPid); | |
449 | fOutputPID->Add(hTPCsigmaMCK); | |
450 | fOutputPID->Add(hTPCsigmaMCPion); | |
451 | fOutputPID->Add(hTPCsigmaMCProton); | |
452 | ||
453 | } | |
5fc4893f | 454 | } |
0dbb51a0 | 455 | |
456 | //quality of the tracks | |
5fc4893f | 457 | if(fOnOff[0]){ |
458 | fOutputTrack=new TList(); | |
459 | fOutputTrack->SetOwner(); | |
460 | fOutputTrack->SetName(GetOutputSlot(3)->GetContainer()->GetName()); | |
0dbb51a0 | 461 | |
5fc4893f | 462 | TString hname="hnClsITS"; |
463 | TH1F* hnClsITS=new TH1F(hname.Data(),"Distribution of number of ITS clusters;nITScls;Entries",7,-0.5,6.5); | |
0dbb51a0 | 464 | |
39dd297f | 465 | hname="hnClsITSselTr"; |
466 | TH1F* hnClsITSselTr=new TH1F(hname.Data(),"Distribution of number of ITS clusters selected tracks;nITScls;Entries",7,-0.5,6.5); | |
467 | ||
5fc4893f | 468 | hname="hnClsITS-SA"; |
469 | TH1F* hnClsITSSA=new TH1F(hname.Data(),"Distribution of number of ITS clusters(ITS-SA);nITScls;Entries",7,-0.5,6.5); | |
0dbb51a0 | 470 | |
bc6846db | 471 | |
472 | hname="hnLayerITS"; | |
f3e1ad2f | 473 | TH1F* hnLayerITS=new TH1F(hname.Data(),"Number of tracks with point in layer;ITS layer;",7,-1.5,5.5); |
474 | hnLayerITS->GetXaxis()->SetBinLabel(1,"n tracks"); | |
4a4aee7b | 475 | hnLayerITS->GetXaxis()->SetBinLabel(2,"SPDin"); |
476 | hnLayerITS->GetXaxis()->SetBinLabel(3,"SPDout"); | |
477 | hnLayerITS->GetXaxis()->SetBinLabel(4,"SDDin"); | |
478 | hnLayerITS->GetXaxis()->SetBinLabel(5,"SDDout"); | |
479 | hnLayerITS->GetXaxis()->SetBinLabel(6,"SSDin"); | |
480 | hnLayerITS->GetXaxis()->SetBinLabel(7,"SSDout"); | |
bc6846db | 481 | |
482 | hname="hnLayerITSsa"; | |
f3e1ad2f | 483 | TH1F* hnLayerITSsa=new TH1F(hname.Data(),"Number of tracks with point in layer;ITS layer;",7,-1.5,5.5); |
484 | hnLayerITSsa->GetXaxis()->SetBinLabel(1,"n tracks"); | |
4a4aee7b | 485 | hnLayerITSsa->GetXaxis()->SetBinLabel(2,"SPDin"); |
486 | hnLayerITSsa->GetXaxis()->SetBinLabel(3,"SPDout"); | |
487 | hnLayerITSsa->GetXaxis()->SetBinLabel(4,"SDDin"); | |
488 | hnLayerITSsa->GetXaxis()->SetBinLabel(5,"SDDout"); | |
489 | hnLayerITSsa->GetXaxis()->SetBinLabel(6,"SSDin"); | |
490 | hnLayerITSsa->GetXaxis()->SetBinLabel(7,"SSDout"); | |
f3e1ad2f | 491 | |
5fc4893f | 492 | hname="hnClsSPD"; |
493 | TH1F* hnClsSPD=new TH1F(hname.Data(),"Distribution of number of SPD clusters;nSPDcls;Entries",3,-0.5,2.5); | |
0dbb51a0 | 494 | |
5fc4893f | 495 | hname="hptGoodTr"; |
496 | TH1F* hptGoodTr=new TH1F(hname.Data(),"Pt distribution of 'good' tracks;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.); | |
497 | hptGoodTr->SetTitleOffset(1.3,"Y"); | |
0dbb51a0 | 498 | |
824b448a | 499 | if(!fSimpleMode){ |
500 | hname="hptGoodTrFromDaugh"; | |
501 | TH1F* hptGoodTrFromDaugh=new TH1F(hname.Data(),"Pt distribution of 'good' candidate's daughters;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.); | |
502 | hptGoodTrFromDaugh->SetTitleOffset(1.3,"Y"); | |
503 | fOutputTrack->Add(hptGoodTrFromDaugh); | |
504 | } | |
505 | ||
5fc4893f | 506 | hname="hdistrGoodTr"; |
824b448a | 507 | TH1F* hdistrGoodTr=new TH1F(hname.Data(),"Distribution of number of 'good' candidate's daughters per event;no.good-tracks/ev;Entries",4000,-0.5,3999.5); |
5fc4893f | 508 | hdistrGoodTr->SetTitleOffset(1.3,"Y"); |
0dbb51a0 | 509 | |
824b448a | 510 | hname="hdistrSelTr"; |
511 | TH1F* hdistrSelTr=new TH1F(hname.Data(),"Distribution of number of Selected tracks per event;no.good-tracks/ev;Entries",4000,-0.5,3999.5); | |
512 | hdistrSelTr->SetTitleOffset(1.3,"Y"); | |
513 | ||
ba3a678d | 514 | hname="hd0dau"; |
515 | TH1F* hd0dau=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of D daughter tracks;d_{0rphi}[cm];Entries/10^{3} cm",200,-0.1,0.1); | |
4563d678 | 516 | |
ba3a678d | 517 | hname="hd0zdau"; |
518 | TH1F* hd0zdau=new TH1F(hname.Data(),"Impact parameter (z) distribution of D daughter tracks;d_{0z}[cm];Entries/10^{3} cm",200,-0.1,0.1); | |
519 | ||
520 | hname="hd0TracksSPDin"; | |
521 | TH1F* hd0TracksSPDin=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks kITSrefit, SPDinner; d_{0rphi}[cm];Entries",200,-0.5,0.5); | |
522 | ||
523 | hname="hd0TracksSPDany"; | |
524 | TH1F* hd0TracksSPDany=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks kITSrefit, SPDany; d_{0rphi}[cm];Entries",200,-0.5,0.5); | |
525 | ||
526 | hname="hd0TracksFilterBit4"; | |
527 | TH1F* hd0TracksFilterBit4=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks FilterBit4; d_{0rphi}[cm];Entries",200,-0.5,0.5); | |
528 | ||
529 | hname="hd0TracksTPCITSSPDany"; | |
530 | TH1F* hd0TracksTPCITSSPDany=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks TPC+ITScuts+SPDany; d_{0rphi}[cm];Entries",200,-0.5,0.5); | |
0dbb51a0 | 531 | |
5230fd6a | 532 | |
8e4c6c96 | 533 | if(fFillDistrTrackEffChecks){ |
534 | hname="hPtDaughters"; | |
7d690084 | 535 | TH1F *hPtDaughters=new TH1F(hname.Data(),"p_{T} distributions of the daughter tracks;p_{T} [GeV/c];Entries",200,0.,20.); |
84a4c5bc | 536 | |
8e4c6c96 | 537 | hname="hPhiDaughters"; |
538 | TH1F *hPhiDaughters=new TH1F(hname.Data(),"#phi distribution of the daughter tracks;#phi [rad];Entries",100,0.,2*(TMath::Pi())); | |
84a4c5bc | 539 | |
8e4c6c96 | 540 | hname="hEtaDaughters"; |
541 | TH1F *hEtaDaughters=new TH1F(hname.Data(),"#eta distribution of the daughter tracks;#eta;Entries",80,-2.,2.); | |
84a4c5bc | 542 | |
8e4c6c96 | 543 | hname="hEtavsPhiDaughters"; |
544 | TH2F *hEtavsPhiDaughters=new TH2F(hname.Data(),"#eta vs #phi distribution of the daughter tracks;#phi;#eta",100,0.,2*(TMath::Pi()),80,-2.,2.); | |
84a4c5bc | 545 | |
8e4c6c96 | 546 | hname="hNTPCclsvsPtDaughters"; |
7d690084 | 547 | TH2F *hNTPCclsvsPtDaughters=new TH2F(hname.Data(),"N TPC clusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N TPC cls",200,0.,20.,85,-0.5,169.5); |
84a4c5bc | 548 | |
8e4c6c96 | 549 | hname="hNTPCclsvsPhiDaughters"; |
7d690084 | 550 | TH2F *hNTPCclsvsPhiDaughters=new TH2F(hname.Data(),"N TPC clusters vs #phi distribution of the daughter tracks;#phi [rad];N TPC cls",100,0.,2*(TMath::Pi()),85,-0.5,169.5); |
84a4c5bc | 551 | |
8e4c6c96 | 552 | hname="hNTPCclsvsEtaDaughters"; |
7d690084 | 553 | TH2F *hNTPCclsvsEtaDaughters=new TH2F(hname.Data(),"N TPC clusters vs #eta distribution of the daughter tracks;#eta;N TPC cls",80,-2.,2.,85,-0.5,169.5); |
554 | ||
555 | hname="hNTPCCrossedRowsvsPtDaughters"; | |
556 | TH2F *hNTPCCrossedRowsvsPtDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N TPC cros. rows",200,0.,20.,100,-0.5,199.5); | |
84a4c5bc | 557 | |
7d690084 | 558 | hname="hNTPCCrossedRowsvsPhiDaughters"; |
559 | TH2F *hNTPCCrossedRowsvsPhiDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs #phi distribution of the daughter tracks;#phi [rad];N TPC cros. rows",100,0.,2*(TMath::Pi()),100,-0.5,199.5); | |
84a4c5bc | 560 | |
7d690084 | 561 | hname="hNTPCCrossedRowsvsEtaDaughters"; |
562 | TH2F *hNTPCCrossedRowsvsEtaDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs #eta distribution of the daughter tracks;#eta;N TPC cros. rows",80,-2.,2.,100,-0.5,199.5); | |
84a4c5bc | 563 | |
8e4c6c96 | 564 | hname="hRatioCRowsOverFclsvsPtDaughters"; |
7d690084 | 565 | TH2F *hRatioCRowsOverFclsvsPtDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];CRows/FCls",200,0.,20,100,0.,1.); |
84a4c5bc | 566 | |
8e4c6c96 | 567 | hname="hRatioCRowsOverFclsvsPhiDaughters"; |
568 | TH2F *hRatioCRowsOverFclsvsPhiDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #phi distribution of the daughter tracks;#phi [rad];CRows/FCls",100,0.,2*(TMath::Pi()),100,0.,1.); | |
84a4c5bc | 569 | |
8e4c6c96 | 570 | hname="hRatioCRowsOverFclsvsEtaDaughters"; |
571 | TH2F *hRatioCRowsOverFclsvsEtaDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #eta distribution of the daughter tracks;#eta;CRows/FCls",80,-2.,2.,100,0.,1.); | |
84a4c5bc | 572 | |
8e4c6c96 | 573 | hname="hNITSclsvsPtDaughters"; |
7d690084 | 574 | TH2F *hNITSclsvsPtDaughters=new TH2F(hname.Data(),"N ITS clusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N ITS cls",200,0.,20,7,-0.5,6.5); |
84a4c5bc | 575 | |
8e4c6c96 | 576 | hname="hNITSclsvsPhiDaughters"; |
577 | TH2F *hNITSclsvsPhiDaughters=new TH2F(hname.Data(),"N ITS clusters vs #phi distribution of the daughter tracks;#phi [rad];N ITS cls",100,0.,2*(TMath::Pi()),7,-0.5,6.5); | |
84a4c5bc | 578 | |
8e4c6c96 | 579 | hname="hNITSclsvsEtaDaughters"; |
580 | TH2F *hNITSclsvsEtaDaughters=new TH2F(hname.Data(),"N ITS clusters vs #eta distribution of the daughter tracks;#eta;N ITS cls",80,-2.,2.,7,-0.5,6.5); | |
84a4c5bc | 581 | |
8e4c6c96 | 582 | hname="hSPDclsDaughters"; |
84a4c5bc | 583 | TH1I *hSPDclsDaughters = new TH1I(hname.Data(),"N SPD points distribution;;Entries",4,0,4); |
8e4c6c96 | 584 | hSPDclsDaughters->GetXaxis()->SetBinLabel(1, "no SPD"); |
585 | hSPDclsDaughters->GetXaxis()->SetBinLabel(2, "kOnlyFirst"); | |
586 | hSPDclsDaughters->GetXaxis()->SetBinLabel(3, "kOnlySecond"); | |
587 | hSPDclsDaughters->GetXaxis()->SetBinLabel(4, "kBoth"); | |
588 | ||
589 | hname="hPtAllTracks"; | |
7d690084 | 590 | TH1F *hPtAllTracks=new TH1F(hname.Data(),"p_{T} distributions of the AOD tracks (ID>0);p_{T} [GeV/c];Entries",200,0.,20.); |
84a4c5bc | 591 | |
8e4c6c96 | 592 | hname="hPhiAllTracks"; |
593 | TH1F *hPhiAllTracks=new TH1F(hname.Data(),"#phi distribution of the AOD tracks (ID>0);#phi [rad];Entries",100,0.,2*(TMath::Pi())); | |
84a4c5bc | 594 | |
8e4c6c96 | 595 | hname="hEtaAllTracks"; |
596 | TH1F *hEtaAllTracks=new TH1F(hname.Data(),"#eta distribution of the AOD tracks (ID>0);#eta;Entries",80,-2.,2.); | |
84a4c5bc | 597 | |
8e4c6c96 | 598 | hname="hEtavsPhiAllTracks"; |
599 | TH2F *hEtavsPhiAllTracks=new TH2F(hname.Data(),"#eta vs #phi distribution of the AOD tracks (ID>0);#phi;#eta",100,0.,2*(TMath::Pi()),80,-2.,2.); | |
84a4c5bc | 600 | |
8e4c6c96 | 601 | hname="hNTPCclsvsPtAllTracks"; |
7d690084 | 602 | TH2F *hNTPCclsvsPtAllTracks=new TH2F(hname.Data(),"N TPC clusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];N TPC cls",200,0.,20,85,-0.5,169.5); |
84a4c5bc | 603 | |
8e4c6c96 | 604 | hname="hNTPCclsvsPhiAllTracks"; |
7d690084 | 605 | TH2F *hNTPCclsvsPhiAllTracks=new TH2F(hname.Data(),"N TPC clusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];N TPC cls",100,0.,2*(TMath::Pi()),85,-0.5,169.5); |
84a4c5bc | 606 | |
8e4c6c96 | 607 | hname="hNTPCclsvsEtaAllTracks"; |
7d690084 | 608 | TH2F *hNTPCclsvsEtaAllTracks=new TH2F(hname.Data(),"N TPC clusters vs #eta distribution of the AOD tracks (ID>0);#eta;N TPC cls",80,-2.,2.,85,-0.5,169.5); |
609 | ||
610 | hname="hNTPCCrossedRowsvsPtAllTracks"; | |
611 | TH2F *hNTPCCrossedRowsvsPtAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs p_{T} distribution of the AOD tracks;p_{T} [GeV/c];N TPC cros. rows",200,0.,20.,100,-0.5,199.5); | |
84a4c5bc | 612 | |
7d690084 | 613 | hname="hNTPCCrossedRowsvsPhiAllTracks"; |
614 | TH2F *hNTPCCrossedRowsvsPhiAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs #phi distribution of the AOD tracks;#phi [rad];N TPC cros. rows",100,0.,2*(TMath::Pi()),100,-0.5,199.5); | |
84a4c5bc | 615 | |
7d690084 | 616 | hname="hNTPCCrossedRowsvsEtaAllTracks"; |
617 | TH2F *hNTPCCrossedRowsvsEtaAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs #eta distribution of the AOD tracks;#eta;N TPC cros. rows",80,-2.,2.,100,-0.5,199.5); | |
84a4c5bc | 618 | |
8e4c6c96 | 619 | hname="hRatioCRowsOverFclsvsPtAllTracks"; |
7d690084 | 620 | TH2F *hRatioCRowsOverFclsvsPtAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];CRows/FCls",200,0.,20,100,0.,1.); |
84a4c5bc | 621 | |
8e4c6c96 | 622 | hname="hRatioCRowsOverFclsvsPhiAllTracks"; |
623 | TH2F *hRatioCRowsOverFclsvsPhiAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];CRows/FCls",100,0.,2*(TMath::Pi()),100,0.,1.); | |
84a4c5bc | 624 | |
8e4c6c96 | 625 | hname="hRatioCRowsOverFclsvsEtaAllTracks"; |
626 | TH2F *hRatioCRowsOverFclsvsEtaAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #eta distribution of the AOD tracks (ID>0);#eta;CRows/FCls",80,-2.,2.,100,0.,1.); | |
84a4c5bc | 627 | |
8e4c6c96 | 628 | hname="hNITSclsvsPtAllTracks"; |
7d690084 | 629 | TH2F *hNITSclsvsPtAllTracks=new TH2F(hname.Data(),"N ITS clusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];N ITS cls",200,0.,20,7,-0.5,6.5); |
84a4c5bc | 630 | |
8e4c6c96 | 631 | hname="hNITSclsvsPhiAllTracks"; |
632 | TH2F *hNITSclsvsPhiAllTracks=new TH2F(hname.Data(),"N ITS clusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];N ITS cls",100,0.,2*(TMath::Pi()),7,-0.5,6.5); | |
84a4c5bc | 633 | |
8e4c6c96 | 634 | hname="hNITSclsvsEtaAllTracks"; |
635 | TH2F *hNITSclsvsEtaAllTracks=new TH2F(hname.Data(),"N ITS clusters vs #eta distribution of the AOD tracks (ID>0);#eta;N ITS cls",80,-2.,2.,7,-0.5,6.5); | |
84a4c5bc | 636 | |
8e4c6c96 | 637 | hname="hSPDclsAllTracks"; |
84a4c5bc | 638 | TH1I *hSPDclsAllTracks = new TH1I(hname.Data(),"N SPD points distribution AOD tracks (ID>0);;Entries",4,0,4); |
8e4c6c96 | 639 | hSPDclsAllTracks->GetXaxis()->SetBinLabel(1, "no SPD"); |
640 | hSPDclsAllTracks->GetXaxis()->SetBinLabel(2, "kOnlyFirst"); | |
641 | hSPDclsAllTracks->GetXaxis()->SetBinLabel(3, "kOnlySecond"); | |
642 | hSPDclsAllTracks->GetXaxis()->SetBinLabel(4, "kBoth"); | |
643 | ||
84a4c5bc | 644 | |
8e4c6c96 | 645 | fOutputTrack->Add(hPtDaughters); |
646 | fOutputTrack->Add(hPhiDaughters); | |
647 | fOutputTrack->Add(hEtaDaughters); | |
648 | fOutputTrack->Add(hEtavsPhiDaughters); | |
649 | fOutputTrack->Add(hNTPCclsvsPtDaughters); | |
650 | fOutputTrack->Add(hNTPCclsvsPhiDaughters); | |
651 | fOutputTrack->Add(hNTPCclsvsEtaDaughters); | |
7d690084 | 652 | fOutputTrack->Add(hNTPCCrossedRowsvsPtDaughters); |
653 | fOutputTrack->Add(hNTPCCrossedRowsvsPhiDaughters); | |
654 | fOutputTrack->Add(hNTPCCrossedRowsvsEtaDaughters); | |
8e4c6c96 | 655 | fOutputTrack->Add(hRatioCRowsOverFclsvsPtDaughters); |
656 | fOutputTrack->Add(hRatioCRowsOverFclsvsPhiDaughters); | |
657 | fOutputTrack->Add(hRatioCRowsOverFclsvsEtaDaughters); | |
658 | fOutputTrack->Add(hNITSclsvsPtDaughters); | |
659 | fOutputTrack->Add(hNITSclsvsPhiDaughters); | |
660 | fOutputTrack->Add(hNITSclsvsEtaDaughters); | |
661 | fOutputTrack->Add(hSPDclsDaughters); | |
662 | fOutputTrack->Add(hPtAllTracks); | |
663 | fOutputTrack->Add(hPhiAllTracks); | |
664 | fOutputTrack->Add(hEtaAllTracks); | |
665 | fOutputTrack->Add(hEtavsPhiAllTracks); | |
666 | fOutputTrack->Add(hNTPCclsvsPtAllTracks); | |
667 | fOutputTrack->Add(hNTPCclsvsPhiAllTracks); | |
668 | fOutputTrack->Add(hNTPCclsvsEtaAllTracks); | |
7d690084 | 669 | fOutputTrack->Add(hNTPCCrossedRowsvsPtAllTracks); |
670 | fOutputTrack->Add(hNTPCCrossedRowsvsPhiAllTracks); | |
671 | fOutputTrack->Add(hNTPCCrossedRowsvsEtaAllTracks); | |
8e4c6c96 | 672 | fOutputTrack->Add(hRatioCRowsOverFclsvsPtAllTracks); |
673 | fOutputTrack->Add(hRatioCRowsOverFclsvsPhiAllTracks); | |
674 | fOutputTrack->Add(hRatioCRowsOverFclsvsEtaAllTracks); | |
675 | fOutputTrack->Add(hNITSclsvsPtAllTracks); | |
676 | fOutputTrack->Add(hNITSclsvsPhiAllTracks); | |
677 | fOutputTrack->Add(hNITSclsvsEtaAllTracks); | |
678 | fOutputTrack->Add(hSPDclsAllTracks); | |
5230fd6a | 679 | |
8e4c6c96 | 680 | } |
681 | ||
5fc4893f | 682 | fOutputTrack->Add(hnClsITS); |
39dd297f | 683 | fOutputTrack->Add(hnClsITSselTr); |
5fc4893f | 684 | fOutputTrack->Add(hnClsITSSA); |
bc6846db | 685 | fOutputTrack->Add(hnLayerITS); |
686 | fOutputTrack->Add(hnLayerITSsa); | |
5fc4893f | 687 | fOutputTrack->Add(hnClsSPD); |
688 | fOutputTrack->Add(hptGoodTr); | |
689 | fOutputTrack->Add(hdistrGoodTr); | |
824b448a | 690 | fOutputTrack->Add(hdistrSelTr); |
ba3a678d | 691 | fOutputTrack->Add(hd0TracksSPDin); |
692 | fOutputTrack->Add(hd0TracksSPDany); | |
693 | fOutputTrack->Add(hd0TracksFilterBit4); | |
694 | fOutputTrack->Add(hd0TracksTPCITSSPDany); | |
695 | fOutputTrack->Add(hd0dau); | |
696 | fOutputTrack->Add(hd0zdau); | |
8e4c6c96 | 697 | |
acc33385 | 698 | |
5fc4893f | 699 | if(fReadMC){ |
700 | hname="hdistrFakeTr"; | |
701 | TH1F* hdistrFakeTr=new TH1F(hname.Data(),"Distribution of number of fake tracks per event;no.fake-tracks/ev;Entries",4000,-0.5,3999.5); | |
824b448a | 702 | hdistrFakeTr->SetTitleOffset(1.3,"Y"); |
acc33385 | 703 | |
5fc4893f | 704 | hname="hd0f"; |
705 | TH1F* hd0f=new TH1F(hname.Data(),"Impact parameter distribution of fake tracks;d_{0}[cm];Entries/10^{3} cm",200,-0.1,0.1); | |
acc33385 | 706 | |
5fc4893f | 707 | hname="hptFakeTr"; |
708 | TH1F* hptFakeTr=new TH1F(hname.Data(),"Pt distribution of fake tracks;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.); | |
ad42e35b | 709 | hptFakeTr->SetTitleOffset(1.3,"Y"); |
824b448a | 710 | if(!fSimpleMode){ |
711 | hname="hptFakeTrFromDaugh"; | |
712 | TH1F* hptFakeTrFromDaugh=new TH1F(hname.Data(),"Pt distribution of fake tracks from daughters;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.); | |
713 | hptFakeTrFromDaugh->SetTitleOffset(1.3,"Y"); | |
714 | fOutputTrack->Add(hptFakeTrFromDaugh); | |
715 | } | |
acc33385 | 716 | |
5fc4893f | 717 | fOutputTrack->Add(hptFakeTr); |
718 | fOutputTrack->Add(hdistrFakeTr); | |
719 | fOutputTrack->Add(hd0f); | |
720 | ||
721 | } | |
acc33385 | 722 | } |
723 | ||
0dbb51a0 | 724 | |
5fc4893f | 725 | if(fOnOff[2] && fCuts->GetUseCentrality()){ |
a4ef4383 | 726 | |
727 | //Centrality (Counters) | |
728 | fOutputCounters=new TList(); | |
729 | fOutputCounters->SetOwner(); | |
730 | fOutputCounters->SetName(GetOutputSlot(5)->GetContainer()->GetName()); | |
731 | ||
732 | AliCounterCollection *stdEstimator=new AliCounterCollection("stdEstimator"); | |
733 | stdEstimator->AddRubric("run",500000); | |
5fc4893f | 734 | stdEstimator->AddRubric("centralityclass","-10_0/0_10/10_20/20_30/30_40/40_50/50_60/60_70/70_80/80_90/90_100/-990_-980"); |
a4ef4383 | 735 | stdEstimator->Init(); |
736 | AliCounterCollection *secondEstimator=new AliCounterCollection("secondEstimator"); | |
737 | secondEstimator->AddRubric("run",500000); | |
5fc4893f | 738 | secondEstimator->AddRubric("centralityclass","-10_0/0_10/10_20/20_30/30_40/40_50/50_60/60_70/70_80/80_90/90_100/-990_-980"); |
a4ef4383 | 739 | secondEstimator->Init(); |
1b765719 | 740 | |
a4ef4383 | 741 | fOutputCounters->Add(stdEstimator); |
742 | fOutputCounters->Add(secondEstimator); | |
1b765719 | 743 | |
a4ef4383 | 744 | //Centrality (Checks) |
745 | fOutputCheckCentrality=new TList(); | |
746 | fOutputCheckCentrality->SetOwner(); | |
747 | fOutputCheckCentrality->SetName(GetOutputSlot(6)->GetContainer()->GetName()); | |
748 | ||
5fc4893f | 749 | TString hname="hNtrackletsIn"; |
a4ef4383 | 750 | TH1F* hNtrackletsIn=new TH1F(hname.Data(),"Number of tracklets in Centrality range;ntracklets;Entries",5000,-0.5,4999.5); |
751 | ||
752 | hname="hMultIn"; | |
753 | TH1F* hMultIn=new TH1F(hname.Data(),"Multiplicity;multiplicity in Centrality range;Entries",10000,-0.5,9999.5); | |
754 | ||
755 | hname="hNtrackletsOut"; | |
756 | TH1F* hNtrackletsOut=new TH1F(hname.Data(),"Number of tracklets out of Centrality range;ntracklets;Entries",5000,-0.5,4999.5); | |
757 | ||
758 | hname="hMultOut"; | |
759 | TH1F* hMultOut=new TH1F(hname.Data(),"Multiplicity out of Centrality range;multiplicity;Entries",10000,-0.5,9999.5); | |
760 | ||
ac0c2841 | 761 | hname="hMultvsPercentile"; |
7a5f2502 | 762 | TH2F* hMultvsPercentile=new TH2F(hname.Data(),"Multiplicity vs Percentile;multiplicity;percentile",10000,-0.5,9999.5,240,-10.,110); |
ac0c2841 | 763 | |
7a5f2502 | 764 | hname="hntrklvsPercentile"; |
765 | TH2F* hntrklvsPercentile=new TH2F(hname.Data(),"N tracklets vs Percentile;ntracklets;percentile",5000,-0.5,4999.5,240,-10.,110); | |
23dfe729 | 766 | |
138e0d89 | 767 | hname="hnTPCTracksvsPercentile"; |
768 | TH2F* hnTPCTracksvsPercentile=new TH2F(hname.Data(),"N TPC tracks vs Percentile;nTPCTracks;percentile",5000,-0.5,9999.5,240,-10.,110); | |
769 | ||
770 | hname="hnTPCITSTracksvsPercentile"; | |
771 | TH2F* hnTPCITSTracksvsPercentile=new TH2F(hname.Data(),"N TPC+ITS tracks vs Percentile;nTPCITSTracks;percentile",5000,-0.5,9999.5,240,-10.,110); | |
772 | ||
773 | hname="hnTPCITS1SPDTracksvsPercentile"; | |
774 | TH2F* hnTPCITS1SPDTracksvsPercentile=new TH2F(hname.Data(),"N TPC+ITS+1SPD tracks vs Percentile;nTPCITS1SPDTracks;percentile",5000,-0.5,9999.5,240,-10.,110); | |
775 | ||
b68a0f6a | 776 | hname="hV0MultiplicityPercentile"; |
777 | TH2F*hV0MultiplicityPercentile = new TH2F(hname.Data(),"V0 Multiplicity vs Percentile;V0 multiplicity;percentile",1000,-0.5,9999.5,120,-10.,110); | |
778 | ||
779 | hname="hV0MultiplicityNtrackletsIn"; | |
780 | TH2F*hV0MultiplicityNtrackletsIn = new TH2F(hname.Data(),"V0 Multiplicity vs Number of tracklets in the CC;V0 multiplicity;percentile",1000,-0.5,9999.5,5000,-0.5,4999.5); | |
781 | ||
782 | hname="hStdPercentileSPDPercentile"; | |
783 | TH2F* hStdPercentileSPDPercentile = new TH2F(hname.Data(),"Std estimator Percentile Vs SPD Percentile;Std estimator percentile;SPD percentile",120,-10.,110,120,-10.,110); | |
784 | ||
a4ef4383 | 785 | fOutputCheckCentrality->Add(hNtrackletsIn); |
786 | fOutputCheckCentrality->Add(hNtrackletsOut); | |
787 | fOutputCheckCentrality->Add(hMultIn); | |
788 | fOutputCheckCentrality->Add(hMultOut); | |
ac0c2841 | 789 | fOutputCheckCentrality->Add(hMultvsPercentile); |
7a5f2502 | 790 | fOutputCheckCentrality->Add(hntrklvsPercentile); |
138e0d89 | 791 | fOutputCheckCentrality->Add(hnTPCTracksvsPercentile); |
792 | fOutputCheckCentrality->Add(hnTPCITSTracksvsPercentile); | |
793 | fOutputCheckCentrality->Add(hnTPCITS1SPDTracksvsPercentile); | |
b68a0f6a | 794 | fOutputCheckCentrality->Add(hV0MultiplicityPercentile); |
795 | fOutputCheckCentrality->Add(hV0MultiplicityNtrackletsIn); | |
796 | fOutputCheckCentrality->Add(hStdPercentileSPDPercentile); | |
82f89d0d | 797 | |
798 | PostData(6,fOutputCheckCentrality); | |
799 | ||
a4ef4383 | 800 | } else{ |
5fc4893f | 801 | if(fOnOff[0]){ |
802 | TString hname="hNtracklets"; | |
803 | TH1F* hNtracklets=new TH1F(hname.Data(),"Number of tracklets;ntracklets;Entries",5000,-0.5,4999.5); | |
804 | ||
805 | hname="hMult"; | |
806 | TH1F* hMult=new TH1F(hname.Data(),"Multiplicity;multiplicity;Entries",10000,-0.5,9999.5); | |
807 | fOutputTrack->Add(hNtracklets); | |
808 | fOutputTrack->Add(hMult); | |
809 | } | |
a4ef4383 | 810 | } |
811 | ||
818c1271 | 812 | //event selection (z vertex for the moment) |
813 | if(fOnOff[3]){ | |
814 | fOutputEvSelection=new TList(); | |
815 | fOutputEvSelection->SetOwner(); | |
816 | fOutputEvSelection->SetName(GetOutputSlot(7)->GetContainer()->GetName()); | |
817 | AliCounterCollection *evselection=new AliCounterCollection("evselection"); | |
818 | evselection->AddRubric("run",500000); | |
819 | evselection->AddRubric("evnonsel","zvtx"); | |
820 | evselection->Init(); | |
821 | ||
b25dd7e3 | 822 | TH1F* hxvtx=new TH1F("hxvtx", "Distribution of x_{VTX};x_{VTX} [cm];Entries",800,-1,1); |
823 | TH1F* hyvtx=new TH1F("hyvtx", "Distribution of y_{VTX};y_{VTX} [cm];Entries",800,-1,1); | |
824 | TH1F* hzvtx=new TH1F("hzvtx", "Distribution of z_{VTX};z_{VTX} [cm];Entries",800,-30,30); | |
825 | TH1F* hxvtxSelEv=new TH1F("hxvtxSelEv", "Distribution of x_{VTX} Selected Ev;x_{VTX} [cm];Entries",800,-1,1); | |
826 | TH1F* hyvtxSelEv=new TH1F("hyvtxSelEv", "Distribution of y_{VTX} Selected Ev;y_{VTX} [cm];Entries",800,-1,1); | |
827 | TH1F* hzvtxSelEv=new TH1F("hzvtxSelEv", "Distribution of z_{VTX} Selected Ev;z_{VTX} [cm];Entries",800,-30,30); | |
6c66ddad | 828 | TH1F* hWhichVert=new TH1F("hWhichVert","Vertex Type",4,-1.5,2.5); |
829 | hWhichVert->GetXaxis()->SetBinLabel(1,"Not found"); | |
830 | hWhichVert->GetXaxis()->SetBinLabel(2,"Track"); | |
831 | hWhichVert->GetXaxis()->SetBinLabel(3,"SPD-3D"); | |
832 | hWhichVert->GetXaxis()->SetBinLabel(4,"SPD-z"); | |
833 | TH1F* hWhichVertSelEv=new TH1F("hWhichVertSelEv","Vertex Type",4,-1.5,2.5); | |
834 | hWhichVertSelEv->GetXaxis()->SetBinLabel(1,"Not found"); | |
835 | hWhichVertSelEv->GetXaxis()->SetBinLabel(2,"Track"); | |
836 | hWhichVertSelEv->GetXaxis()->SetBinLabel(3,"SPD-3D"); | |
837 | hWhichVertSelEv->GetXaxis()->SetBinLabel(4,"SPD-z"); | |
23dfe729 | 838 | |
1b6b9a05 | 839 | TH2F* hTrigCent=new TH2F("hTrigCent","Centrality vs. Trigger types",14,-1.5,12.5,12,-10,110); |
23dfe729 | 840 | hTrigCent->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 841 | hTrigCent->GetXaxis()->SetBinLabel(2,"kAny"); |
842 | hTrigCent->GetXaxis()->SetBinLabel(3,"kMB"); | |
843 | hTrigCent->GetXaxis()->SetBinLabel(4,"kINT7"); | |
844 | hTrigCent->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
845 | hTrigCent->GetXaxis()->SetBinLabel(6,"kCent"); | |
846 | hTrigCent->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
847 | hTrigCent->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
848 | hTrigCent->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
849 | hTrigCent->GetXaxis()->SetBinLabel(10,"Muons"); | |
850 | hTrigCent->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 851 | hTrigCent->GetXaxis()->SetBinLabel(12,"TRD"); |
852 | hTrigCent->GetXaxis()->SetBinLabel(13,"HighMult"); | |
853 | hTrigCent->GetXaxis()->SetBinLabel(14,"Others"); | |
2a844546 | 854 | |
1b6b9a05 | 855 | TH2F* hTrigMul=new TH2F("hTrigMul","Multiplicity vs. Trigger types",14,-1.5,12.5,100,0.,10000.); |
23dfe729 | 856 | hTrigMul->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 857 | hTrigMul->GetXaxis()->SetBinLabel(2,"kAny"); |
858 | hTrigMul->GetXaxis()->SetBinLabel(3,"kMB"); | |
859 | hTrigMul->GetXaxis()->SetBinLabel(4,"kINT7"); | |
860 | hTrigMul->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
861 | hTrigMul->GetXaxis()->SetBinLabel(6,"kCent"); | |
862 | hTrigMul->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
863 | hTrigMul->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
864 | hTrigMul->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
865 | hTrigMul->GetXaxis()->SetBinLabel(10,"Muons"); | |
866 | hTrigMul->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 867 | hTrigMul->GetXaxis()->SetBinLabel(12,"TRD"); |
868 | hTrigMul->GetXaxis()->SetBinLabel(13,"HighMult"); | |
869 | hTrigMul->GetXaxis()->SetBinLabel(14,"Others"); | |
2a844546 | 870 | |
1b6b9a05 | 871 | TH2F* hTrigCentSel=new TH2F("hTrigCentSel","Trigger types",14,-1.5,12.5,12,-10,110); |
23dfe729 | 872 | hTrigCentSel->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 873 | hTrigCentSel->GetXaxis()->SetBinLabel(2,"kAny"); |
874 | hTrigCentSel->GetXaxis()->SetBinLabel(3,"kMB"); | |
875 | hTrigCentSel->GetXaxis()->SetBinLabel(4,"kINT7"); | |
876 | hTrigCentSel->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
877 | hTrigCentSel->GetXaxis()->SetBinLabel(6,"kCent"); | |
878 | hTrigCentSel->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
879 | hTrigCentSel->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
880 | hTrigCentSel->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
881 | hTrigCentSel->GetXaxis()->SetBinLabel(10,"Muons"); | |
882 | hTrigCentSel->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 883 | hTrigCentSel->GetXaxis()->SetBinLabel(12,"TRD"); |
884 | hTrigCentSel->GetXaxis()->SetBinLabel(13,"HighMult"); | |
885 | hTrigCentSel->GetXaxis()->SetBinLabel(14,"Others"); | |
23dfe729 | 886 | |
1b765719 | 887 | AliCounterCollection *trigCounter=new AliCounterCollection("trigCounter"); |
888 | trigCounter->AddRubric("run",500000); | |
3dfe174d | 889 | trigCounter->AddRubric("triggerType","All/Any/MB/Cent/SemiCent/EMCAL/MUON/NoPhysSelMUON/NoPhysSelEvNot7/NoPhysSelCMUP1/NoPhysSelMB/NoPhysSelCent/NoPhysSelSemiCent/CINT7"); |
1b765719 | 890 | trigCounter->Init(); |
891 | ||
af7c067e | 892 | TH1F* hWhyEvRejected=new TH1F("hWhyEvRejected", "Why Event rejected",7,-1.5,5.5); |
1d654f7b | 893 | |
af7c067e | 894 | hWhyEvRejected->GetXaxis()->SetBinLabel(1,"N events"); |
895 | hWhyEvRejected->GetXaxis()->SetBinLabel(2,"pileup"); | |
896 | hWhyEvRejected->GetXaxis()->SetBinLabel(3,"centrality"); | |
897 | hWhyEvRejected->GetXaxis()->SetBinLabel(4,"Vertex not found"); | |
898 | hWhyEvRejected->GetXaxis()->SetBinLabel(5,"trigger"); | |
899 | hWhyEvRejected->GetXaxis()->SetBinLabel(6,"z vertex out of 10 cm"); | |
900 | hWhyEvRejected->GetXaxis()->SetBinLabel(7,"physics sel"); | |
1d654f7b | 901 | |
902 | ||
818c1271 | 903 | fOutputEvSelection->Add(evselection); |
6c66ddad | 904 | fOutputEvSelection->Add(hxvtx); |
905 | fOutputEvSelection->Add(hyvtx); | |
818c1271 | 906 | fOutputEvSelection->Add(hzvtx); |
6c66ddad | 907 | fOutputEvSelection->Add(hxvtxSelEv); |
908 | fOutputEvSelection->Add(hyvtxSelEv); | |
909 | fOutputEvSelection->Add(hzvtxSelEv); | |
910 | fOutputEvSelection->Add(hWhichVert); | |
911 | fOutputEvSelection->Add(hWhichVertSelEv); | |
23dfe729 | 912 | fOutputEvSelection->Add(hTrigCent); |
913 | fOutputEvSelection->Add(hTrigMul); | |
914 | fOutputEvSelection->Add(hTrigCentSel); | |
1b765719 | 915 | fOutputEvSelection->Add(trigCounter); |
1d654f7b | 916 | fOutputEvSelection->Add(hWhyEvRejected); |
917 | ||
818c1271 | 918 | } |
d48d81b5 | 919 | if(fOnOff[4]){ // FLOW OBSERVABLES |
920 | fOutputFlowObs=new TList(); | |
921 | fOutputFlowObs->SetOwner(); | |
922 | fOutputFlowObs->SetName(GetOutputSlot(8)->GetContainer()->GetName()); | |
923 | ||
924 | fFlowEvent = new AliFlowEvent(3000); | |
925 | fRFPcuts = new AliFlowTrackCuts("rfpCuts"); | |
926 | ||
65274ad6 | 927 | TH2F *hFEvents = new TH2F("hFlowEvents","FlowEvent Selection",7,0,7,7,-10,60); |
d48d81b5 | 928 | hFEvents->GetXaxis()->SetBinLabel(1,"REACHED"); |
929 | hFEvents->GetXaxis()->SetBinLabel(2,"TRIGGERED"); | |
65274ad6 | 930 | hFEvents->GetXaxis()->SetBinLabel(3,"kMB"); |
931 | hFEvents->GetXaxis()->SetBinLabel(4,"kCent"); | |
932 | hFEvents->GetXaxis()->SetBinLabel(5,"kSemiC"); | |
933 | hFEvents->GetXaxis()->SetBinLabel(6,"Triggered + vtx cut"); | |
934 | hFEvents->GetXaxis()->SetBinLabel(7,"UnexpectedBehaviour"); | |
d48d81b5 | 935 | fOutputFlowObs->Add(hFEvents); |
936 | ||
937 | TProfile2D *hQ[3]; | |
938 | TH2F *hAngleQ[3]; | |
939 | TH3F *hPhiEta[3]; | |
940 | TString ref[3] = {"FB1","FB128","VZE"}; | |
941 | Int_t etabin[3] = {40,40,20}; | |
942 | Int_t etamax[3] = { 1, 1, 5}; | |
943 | for(Int_t i=0; i<3; ++i) { | |
944 | hQ[i]= new TProfile2D( Form("h%s_Q",ref[i].Data()), | |
945 | Form("Q_{2} components for %s",ref[i].Data()), | |
946 | 4,0,4,12,0,60,"s"); | |
947 | hQ[i]->GetXaxis()->SetBinLabel(1,"Qx^{-}"); | |
948 | hQ[i]->GetXaxis()->SetBinLabel(2,"Qy^{-}"); | |
949 | hQ[i]->GetXaxis()->SetBinLabel(3,"Qx^{+}"); | |
950 | hQ[i]->GetXaxis()->SetBinLabel(4,"Qy^{+}"); | |
951 | hQ[i]->GetYaxis()->SetTitle("Centrality"); | |
952 | fOutputFlowObs->Add(hQ[i]); | |
953 | ||
954 | hAngleQ[i] = new TH2F( Form("h%s_AngleQ",ref[i].Data()), | |
955 | Form("#Psi_{2} for %s",ref[i].Data()), | |
956 | 72,0,TMath::Pi(),12,0,60); | |
957 | hAngleQ[i]->GetXaxis()->SetTitle( Form("#Psi_{2}^{%s}",ref[i].Data()) ); | |
958 | hAngleQ[i]->GetYaxis()->SetTitle("Centrality"); | |
959 | fOutputFlowObs->Add(hAngleQ[i]); | |
960 | ||
961 | hPhiEta[i] = new TH3F( Form("h%s_PhiEta",ref[i].Data()), | |
962 | Form("Eta vs Phi for %s",ref[i].Data()), | |
65274ad6 | 963 | 144,0,TMath::TwoPi(),etabin[i],-1.0*etamax[i],+1.0*etamax[i],12,0,60); |
d48d81b5 | 964 | hPhiEta[i]->GetXaxis()->SetTitle("Phi"); |
965 | hPhiEta[i]->GetYaxis()->SetTitle("Eta"); | |
966 | hPhiEta[i]->GetZaxis()->SetTitle("Centrality"); | |
967 | fOutputFlowObs->Add(hPhiEta[i]); | |
968 | ||
969 | } | |
970 | TH3F *hTPCVZE_AngleQ = new TH3F("hTPCVZE_AngleQ","#Psi_{2}^{VZERO} vs #Psi_{2}^{TPC}", 72,0,TMath::Pi(),72,0,TMath::Pi(),12,0,60); | |
971 | hTPCVZE_AngleQ->GetXaxis()->SetTitle("#Psi_{2}^{TPC}"); | |
972 | hTPCVZE_AngleQ->GetYaxis()->SetTitle("#Psi_{2}^{VZE}"); | |
973 | hTPCVZE_AngleQ->GetZaxis()->SetTitle("Centrality"); | |
974 | fOutputFlowObs->Add(hTPCVZE_AngleQ); | |
65274ad6 | 975 | |
976 | TH2F *hCentVsMultRPS = new TH2F("hCentVsMultRPS", " Centrality Vs. Multiplicity RPs",5000, 0, 5000.,12,0,60 ); | |
977 | hCentVsMultRPS->GetXaxis()->SetTitle("Multiplicity RPs"); | |
978 | hCentVsMultRPS->GetYaxis()->SetTitle("Centrality"); | |
979 | fOutputFlowObs->Add(hCentVsMultRPS); | |
d48d81b5 | 980 | } |
e7af8919 | 981 | |
a578b2da | 982 | /* |
e7af8919 | 983 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
984 | AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler(); | |
985 | AliPIDResponse *pidResp=inputHandler->GetPIDResponse(); | |
986 | if (fCuts->GetIsUsePID() && fDecayChannel==kLambdactoV0) { | |
987 | fCuts->GetPidHF()->SetPidResponse(pidResp); | |
89b8ddf3 | 988 | AliRDHFCutsLctoV0* lccuts=dynamic_cast<AliRDHFCutsLctoV0*>(fCuts); |
989 | if(lccuts){ | |
990 | lccuts->GetPidV0pos()->SetPidResponse(pidResp); | |
991 | lccuts->GetPidV0neg()->SetPidResponse(pidResp); | |
992 | fCuts->GetPidHF()->SetOldPid(kFALSE); | |
993 | lccuts->GetPidV0pos()->SetOldPid(kFALSE); | |
994 | lccuts->GetPidV0neg()->SetOldPid(kFALSE); | |
995 | } | |
e7af8919 | 996 | } |
a578b2da | 997 | */ |
e7af8919 | 998 | |
0dbb51a0 | 999 | // Post the data |
1000 | PostData(1,fNEntries); | |
d48d81b5 | 1001 | |
5fc4893f | 1002 | if(fOnOff[1]) PostData(2,fOutputPID); |
1003 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
0dbb51a0 | 1004 | PostData(4,fCuts); |
5fc4893f | 1005 | if(fOnOff[2]) PostData(5,fOutputCounters); |
818c1271 | 1006 | if(fOnOff[3]) PostData(7,fOutputEvSelection); |
d48d81b5 | 1007 | if(fOnOff[4]) PostData(8,fOutputFlowObs); |
818c1271 | 1008 | |
5fc4893f | 1009 | if(!fOnOff[0] && !fOnOff[1] && !fOnOff[2]) AliError("Nothing will be filled!"); |
0dbb51a0 | 1010 | } |
1011 | ||
1012 | //___________________________________________________________________________ | |
1013 | void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/) | |
1014 | { | |
1015 | // Execute analysis for current event | |
1016 | ||
1017 | AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent()); | |
1018 | if(fDebug>2) printf("Analysing decay %d\n",fDecayChannel); | |
1019 | // Post the data already here | |
1020 | PostData(1,fNEntries); | |
5fc4893f | 1021 | if(fOnOff[1]) PostData(2,fOutputPID); |
1022 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
0dbb51a0 | 1023 | PostData(4,fCuts); |
5fc4893f | 1024 | if(fOnOff[2]) { |
1025 | PostData(5,fOutputCounters); | |
1026 | if(fCuts->GetUseCentrality()) PostData(6,fOutputCheckCentrality); | |
1027 | } | |
0dbb51a0 | 1028 | |
1029 | TClonesArray *arrayProng =0; | |
1030 | Int_t pdg=0; | |
a4ef4383 | 1031 | Int_t *pdgdaughters=0x0; |
1032 | ||
0dbb51a0 | 1033 | if(!aod && AODEvent() && IsStandardAOD()) { |
1034 | // In case there is an AOD handler writing a standard AOD, use the AOD | |
1035 | // event in memory rather than the input (ESD) event. | |
1036 | aod = dynamic_cast<AliAODEvent*> (AODEvent()); | |
1037 | // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root) | |
1038 | // have to taken from the AOD event hold by the AliAODExtension | |
1039 | AliAODHandler* aodHandler = (AliAODHandler*) | |
1040 | ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
1041 | if(aodHandler->GetExtensions()) { | |
1042 | ||
1043 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root"); | |
1044 | AliAODEvent *aodFromExt = ext->GetAOD(); | |
1045 | ||
1046 | ||
1047 | ||
1048 | switch(fDecayChannel){ | |
1049 | case 0: | |
1050 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1051 | pdg=411; | |
a4ef4383 | 1052 | if(fReadMC){ |
1053 | pdgdaughters =new Int_t[3]; | |
1054 | pdgdaughters[0]=211;//pi | |
1055 | pdgdaughters[1]=321;//K | |
1056 | pdgdaughters[2]=211;//pi | |
1057 | } | |
0dbb51a0 | 1058 | break; |
1059 | case 1: | |
1060 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi"); | |
1061 | pdg=421; | |
a4ef4383 | 1062 | if(fReadMC){ |
1063 | pdgdaughters =new Int_t[2]; | |
1064 | pdgdaughters[0]=211;//pi | |
1065 | pdgdaughters[1]=321;//K | |
1066 | } | |
0dbb51a0 | 1067 | break; |
1068 | case 2: | |
1069 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Dstar"); | |
1070 | pdg=413; | |
a4ef4383 | 1071 | if(fReadMC){ |
fb9311e8 | 1072 | pdgdaughters =new Int_t[3]; |
a4ef4383 | 1073 | pdgdaughters[1]=211;//pi |
1074 | pdgdaughters[0]=321;//K | |
1075 | pdgdaughters[2]=211;//pi (soft?) | |
1076 | } | |
0dbb51a0 | 1077 | break; |
1078 | case 3: | |
1079 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1080 | pdg=431; | |
a4ef4383 | 1081 | if(fReadMC){ |
1082 | pdgdaughters =new Int_t[3]; | |
1083 | pdgdaughters[0]=321;//K | |
1084 | pdgdaughters[1]=321;//K | |
1085 | pdgdaughters[2]=211;//pi | |
1086 | } | |
0dbb51a0 | 1087 | break; |
1088 | case 4: | |
1089 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong"); | |
1090 | pdg=421; | |
a4ef4383 | 1091 | if(fReadMC){ |
1092 | pdgdaughters =new Int_t[4]; | |
1093 | pdgdaughters[0]=321; | |
1094 | pdgdaughters[1]=211; | |
1095 | pdgdaughters[2]=211; | |
1096 | pdgdaughters[3]=211; | |
1097 | } | |
0dbb51a0 | 1098 | break; |
1099 | case 5: | |
1100 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1101 | pdg=4122; | |
a4ef4383 | 1102 | if(fReadMC){ |
1103 | pdgdaughters =new Int_t[3]; | |
1104 | pdgdaughters[0]=2212;//p | |
1105 | pdgdaughters[1]=321;//K | |
1106 | pdgdaughters[2]=211;//pi | |
1107 | } | |
0dbb51a0 | 1108 | break; |
ca688a98 | 1109 | case kLambdactoV0: |
e7af8919 | 1110 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("CascadesHF"); |
ca688a98 | 1111 | pdg=4122; |
1112 | if(fReadMC){ | |
1113 | pdgdaughters =new Int_t[3]; | |
1114 | pdgdaughters[0]=2212;//p | |
1115 | pdgdaughters[1]=211;//pi | |
1116 | pdgdaughters[2]=211;//pi | |
1117 | } | |
1118 | break; | |
0dbb51a0 | 1119 | } |
1120 | } | |
dc222f77 | 1121 | } else if(aod) { |
0dbb51a0 | 1122 | switch(fDecayChannel){ |
1123 | case 0: | |
1124 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1125 | pdg=411; | |
a4ef4383 | 1126 | if(fReadMC){ |
1127 | pdgdaughters =new Int_t[3]; | |
1128 | pdgdaughters[0]=211;//pi | |
1129 | pdgdaughters[1]=321;//K | |
1130 | pdgdaughters[2]=211;//pi | |
1131 | } | |
0dbb51a0 | 1132 | break; |
1133 | case 1: | |
1134 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("D0toKpi"); | |
1135 | pdg=421; | |
a4ef4383 | 1136 | if(fReadMC){ |
1137 | pdgdaughters =new Int_t[2]; | |
1138 | pdgdaughters[0]=211;//pi | |
1139 | pdgdaughters[1]=321;//K | |
1140 | } | |
0dbb51a0 | 1141 | break; |
1142 | case 2: | |
1143 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Dstar"); | |
1144 | pdg=413; | |
a4ef4383 | 1145 | if(fReadMC){ |
24bcb2f3 | 1146 | pdgdaughters =new Int_t[3]; |
a4ef4383 | 1147 | pdgdaughters[1]=211;//pi |
1148 | pdgdaughters[0]=321;//K | |
1149 | pdgdaughters[2]=211;//pi (soft?) | |
1150 | } | |
0dbb51a0 | 1151 | break; |
1152 | case 3: | |
1153 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1154 | pdg=431; | |
a4ef4383 | 1155 | if(fReadMC){ |
1156 | pdgdaughters =new Int_t[3]; | |
1157 | pdgdaughters[0]=321;//K | |
1158 | pdgdaughters[1]=321;//K | |
1159 | pdgdaughters[2]=211;//pi | |
1160 | } | |
0dbb51a0 | 1161 | break; |
1162 | case 4: | |
1163 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm4Prong"); | |
1164 | pdg=421; | |
a4ef4383 | 1165 | if(fReadMC){ |
1166 | pdgdaughters =new Int_t[4]; | |
1167 | pdgdaughters[0]=321; | |
1168 | pdgdaughters[1]=211; | |
1169 | pdgdaughters[2]=211; | |
1170 | pdgdaughters[3]=211; | |
1171 | } | |
0dbb51a0 | 1172 | break; |
1173 | case 5: | |
1174 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1175 | pdg=4122; | |
a4ef4383 | 1176 | if(fReadMC){ |
1177 | pdgdaughters =new Int_t[3]; | |
1178 | pdgdaughters[0]=2212;//p | |
1179 | pdgdaughters[1]=321;//K | |
1180 | pdgdaughters[2]=211;//pi | |
1181 | } | |
0dbb51a0 | 1182 | break; |
ca688a98 | 1183 | case kLambdactoV0: |
e7af8919 | 1184 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("CascadesHF"); |
ca688a98 | 1185 | pdg=4122; |
1186 | if(fReadMC){ | |
1187 | pdgdaughters =new Int_t[3]; | |
1188 | pdgdaughters[0]=2212;//p | |
1189 | pdgdaughters[1]=211;//pi | |
1190 | pdgdaughters[2]=211;//pi | |
1191 | } | |
1192 | break; | |
0dbb51a0 | 1193 | } |
1194 | } | |
19222b31 | 1195 | Bool_t isSimpleMode=fSimpleMode; |
0dbb51a0 | 1196 | if(!arrayProng) { |
5c13a4db | 1197 | AliInfo("Branch not found! The output will contain only track related histograms\n"); |
0dbb51a0 | 1198 | isSimpleMode=kTRUE; |
9af24f46 | 1199 | fNEntries->Fill(2); |
0dbb51a0 | 1200 | } |
1201 | ||
a4ef4383 | 1202 | TClonesArray *mcArray = 0; |
1203 | AliAODMCHeader *mcHeader = 0; | |
1204 | ||
3655ecf2 | 1205 | if(!aod) { |
1206 | delete [] pdgdaughters; | |
1207 | return; | |
1208 | } | |
1209 | ||
a4ef4383 | 1210 | //check if MC |
1211 | if(fReadMC) { | |
1212 | // load MC particles | |
1213 | mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()); | |
1214 | if(!mcArray) { | |
1215 | printf("AliAnalysisTaskSEHFQA::UserExec: MC particles branch not found!\n"); | |
fb9311e8 | 1216 | delete [] pdgdaughters; |
a4ef4383 | 1217 | return; |
1218 | } | |
1219 | ||
1220 | // load MC header | |
1221 | mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName()); | |
1222 | if(!mcHeader) { | |
1223 | printf("AliAnalysisTaskSEHFQA::UserExec: MC header branch not found!\n"); | |
fb9311e8 | 1224 | delete [] pdgdaughters; |
a4ef4383 | 1225 | return; |
1226 | } | |
1227 | } | |
23dfe729 | 1228 | |
1229 | ||
1230 | UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
1231 | Double_t centrality=fCuts->GetCentrality(aod); | |
1232 | Double_t multiplicity=aod->GetHeader()->GetRefMultiplicity(); | |
17531bbd | 1233 | Int_t runNumber = aod->GetRunNumber(); |
5e67f11a | 1234 | TString trigClass=aod->GetFiredTriggerClasses(); |
138e0d89 | 1235 | Int_t nAODtracks=aod->GetNTracks(); |
1236 | Int_t nSelTracksTPCOnly=0; | |
1237 | Int_t nSelTracksTPCITS=0; | |
1238 | Int_t nSelTracksTPCITS1SPD=0; | |
1239 | ||
82376491 | 1240 | if(fReadMC) { |
1241 | if(aod->GetTriggerMask()==0 && | |
1242 | (runNumber>=195344 && runNumber<=195677)){ | |
1243 | AliDebug(3,"Event rejected because of null trigger mask"); | |
1244 | delete [] pdgdaughters; | |
1245 | return; | |
1246 | } | |
1247 | } | |
1248 | ||
138e0d89 | 1249 | for (Int_t k=0;k<nAODtracks;k++){ |
1250 | AliAODTrack* track=aod->GetTrack(k); | |
1251 | if(track->GetID()<0) continue; | |
1252 | Int_t nclsTot=0,nclsSPD=0; | |
1253 | for(Int_t l=0;l<6;l++) { | |
1254 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
1255 | nclsTot++; if(l<2) nclsSPD++; | |
1256 | } | |
1257 | } | |
1258 | UShort_t nTPCClus=track->GetTPCClusterMap().CountBits(); | |
1259 | if(TMath::Abs(track->Eta())<0.8 && nTPCClus>=70 && track->GetStatus()&AliESDtrack::kTPCrefit){ | |
1260 | if(track->TestFilterBit(1)) nSelTracksTPCOnly++; | |
1261 | if(track->GetStatus()&AliESDtrack::kITSrefit){ | |
1262 | nSelTracksTPCITS++; | |
1263 | if(nclsSPD>0) nSelTracksTPCITS1SPD++; | |
1264 | } | |
1265 | } | |
1266 | } | |
1267 | ||
d48d81b5 | 1268 | if(fOnOff[4]) { |
1269 | FillFlowObs(aod); | |
1270 | PostData(8,fOutputFlowObs); | |
1271 | } | |
1b765719 | 1272 | if(fOnOff[3]){ |
1273 | TH2F* hTrigC=(TH2F*)fOutputEvSelection->FindObject("hTrigCent"); | |
1274 | TH2F* hTrigM=(TH2F*)fOutputEvSelection->FindObject("hTrigMul"); | |
1275 | AliCounterCollection* trigCount=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter"); | |
17531bbd | 1276 | |
2a844546 | 1277 | hTrigC->Fill(-1.,centrality); |
1278 | hTrigM->Fill(-1.,multiplicity); | |
da3b34af | 1279 | trigCount->Count(Form("triggerType:All/Run:%d",runNumber)); |
5e67f11a | 1280 | if(evSelMask==0){ |
1281 | if(aod->GetEventType()!=7){ | |
1282 | trigCount->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber)); | |
1283 | }else if(trigClass.Contains("CMUP1")){ | |
1284 | trigCount->Count(Form("triggerType:NoPhysSelCMUP1/Run:%d",runNumber)); | |
1285 | }else if(trigClass.Contains("MUON")){ | |
1286 | trigCount->Count(Form("triggerType:NoPhysSelMUON/Run:%d",runNumber)); | |
1287 | }else if(trigClass.Contains("CPBI2_B1-B") || trigClass.Contains(" CPBI2WU_B1-B")){ | |
1288 | trigCount->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber)); | |
1289 | }else if(trigClass.Contains("CCENT") || trigClass.Contains("CVHN")){ | |
1290 | trigCount->Count(Form("triggerType:NoPhysSelCent/Run:%d",runNumber)); | |
1291 | }else if(trigClass.Contains("CSEMI") || trigClass.Contains("CVLN")){ | |
1292 | trigCount->Count(Form("triggerType:NoPhysSelSemiCent/Run:%d",runNumber)); | |
1293 | } | |
1294 | } | |
2a844546 | 1295 | if(evSelMask & AliVEvent::kAny){ |
1296 | hTrigC->Fill(0.,centrality); | |
1297 | hTrigM->Fill(0.,multiplicity); | |
1298 | trigCount->Count(Form("triggerType:Any/Run:%d",runNumber)); | |
1299 | } | |
1b765719 | 1300 | if(evSelMask & AliVEvent::kMB){ |
1301 | hTrigC->Fill(1.,centrality); | |
1302 | hTrigM->Fill(1.,multiplicity); | |
1303 | trigCount->Count(Form("triggerType:MB/Run:%d",runNumber)); | |
1304 | } | |
1305 | if(evSelMask & AliVEvent::kINT7){ | |
1306 | hTrigC->Fill(2.,centrality); | |
1307 | hTrigM->Fill(2.,multiplicity); | |
3dfe174d | 1308 | trigCount->Count(Form("triggerType:CINT7/Run:%d",runNumber)); |
1b765719 | 1309 | } |
1310 | if(evSelMask & AliVEvent::kCINT5){ | |
1311 | hTrigC->Fill(3.,centrality); | |
1312 | hTrigM->Fill(3.,multiplicity); | |
1313 | } | |
1314 | if(evSelMask & AliVEvent::kCentral){ | |
1315 | hTrigC->Fill(4.,centrality); | |
1316 | hTrigM->Fill(4.,multiplicity); | |
1317 | trigCount->Count(Form("triggerType:Cent/Run:%d",runNumber)); | |
1318 | } | |
1319 | if(evSelMask & AliVEvent::kSemiCentral){ | |
1320 | hTrigC->Fill(5.,centrality); | |
1321 | hTrigM->Fill(5.,multiplicity); | |
1322 | trigCount->Count(Form("triggerType:SemiCent/Run:%d",runNumber)); | |
1323 | } | |
1324 | if(evSelMask & (AliVEvent::kEMC1 | AliVEvent::kEMC7)){ | |
1325 | hTrigC->Fill(6.,centrality); | |
1326 | hTrigM->Fill(6.,multiplicity); | |
1327 | } | |
1328 | if(evSelMask & (AliVEvent::kEMCEJE | AliVEvent::kEMCEGA)){ | |
1329 | hTrigC->Fill(7.,centrality); | |
1330 | hTrigM->Fill(7.,multiplicity); | |
1331 | trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber)); | |
1332 | } | |
1333 | if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){ | |
1334 | hTrigC->Fill(8.,centrality); | |
1335 | hTrigM->Fill(8.,multiplicity); | |
5e67f11a | 1336 | trigCount->Count(Form("triggerType:MUON/Run:%d",runNumber)); |
1b765719 | 1337 | } |
1338 | if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){ | |
1339 | hTrigC->Fill(9.,centrality); | |
1340 | hTrigM->Fill(9.,multiplicity); | |
1341 | } | |
1b6b9a05 | 1342 | if(evSelMask & (AliVEvent::kTRD)){ |
1b765719 | 1343 | hTrigC->Fill(10.,centrality); |
1344 | hTrigM->Fill(10.,multiplicity); | |
1345 | } | |
1b6b9a05 | 1346 | if(evSelMask & (AliVEvent::kHighMult)){ |
1340a059 | 1347 | hTrigC->Fill(11.,centrality); |
1348 | hTrigM->Fill(11.,multiplicity); | |
1349 | } | |
1b6b9a05 | 1350 | if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){ |
1351 | hTrigC->Fill(12.,centrality); | |
1352 | hTrigM->Fill(12.,multiplicity); | |
1353 | } | |
23dfe729 | 1354 | } |
1355 | ||
1356 | ||
0dbb51a0 | 1357 | // fix for temporary bug in ESDfilter |
1358 | // the AODs with null vertex pointer didn't pass the PhysSel | |
3655ecf2 | 1359 | if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001) { |
1360 | delete [] pdgdaughters; | |
1361 | return; | |
1362 | } | |
0dbb51a0 | 1363 | |
1364 | // count event | |
1365 | fNEntries->Fill(0); | |
9af24f46 | 1366 | |
1367 | //count events with good vertex | |
1368 | // AOD primary vertex | |
1369 | AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex(); | |
824b448a | 1370 | |
1371 | Double_t pos[3],cov[6]; | |
1372 | vtx1->GetXYZ(pos); | |
1373 | vtx1->GetCovarianceMatrix(cov); | |
1374 | const AliESDVertex vESD(pos,cov,100.,100); | |
1375 | ||
9af24f46 | 1376 | TString primTitle = vtx1->GetTitle(); |
1377 | if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0) fNEntries->Fill(4); | |
1378 | ||
a3aa1279 | 1379 | // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD, C0SMH-B-NOPF-ALL |
5fc4893f | 1380 | //TString trigclass=aod->GetFiredTriggerClasses(); |
1381 | //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fNEntries->Fill(5); //tmp | |
a3aa1279 | 1382 | |
818c1271 | 1383 | |
23dfe729 | 1384 | |
1385 | ||
2a844546 | 1386 | Bool_t evSelbyCentrality=kTRUE,evSelected=kTRUE,evSelByVertex=kTRUE,evselByPileup=kTRUE,evSelByPS=kTRUE; |
1d654f7b | 1387 | |
7f241934 | 1388 | TH1F* hWhyEvRejected=0x0; |
1389 | if(fOnOff[3]){ | |
1390 | hWhyEvRejected=(TH1F*)fOutputEvSelection->FindObject("hWhyEvRejected"); | |
af7c067e | 1391 | if(hWhyEvRejected) hWhyEvRejected->Fill(-1); |
7f241934 | 1392 | } |
1d654f7b | 1393 | |
0dbb51a0 | 1394 | //select event |
1395 | if(!fCuts->IsEventSelected(aod)) { | |
82f89d0d | 1396 | evSelected=kFALSE; |
ba3a678d | 1397 | if(fCuts->IsEventRejectedDueToPileupSPD()) { |
af7c067e | 1398 | if(hWhyEvRejected) hWhyEvRejected->Fill(0); |
ba3a678d | 1399 | evselByPileup=kFALSE; |
1400 | }// rejected for pileup | |
1401 | if(fCuts->IsEventRejectedDueToCentrality()) { | |
af7c067e | 1402 | if(hWhyEvRejected) hWhyEvRejected->Fill(1); |
ba3a678d | 1403 | evSelbyCentrality=kFALSE; //rejected by centrality |
1d654f7b | 1404 | } |
439ce262 | 1405 | if(fCuts->IsEventRejectedDueToNotRecoVertex() || |
af7c067e | 1406 | fCuts->IsEventRejectedDueToVertexContributors()){ |
439ce262 | 1407 | evSelByVertex=kFALSE; |
af7c067e | 1408 | if(hWhyEvRejected) hWhyEvRejected->Fill(2); |
7f241934 | 1409 | } |
1410 | if(fCuts->IsEventRejectedDueToTrigger()){ | |
af7c067e | 1411 | if(hWhyEvRejected) hWhyEvRejected->Fill(3); |
ba3a678d | 1412 | } |
7f241934 | 1413 | if(fCuts->IsEventRejectedDueToZVertexOutsideFiducialRegion()) { |
af7c067e | 1414 | evSelByVertex=kFALSE; |
7f241934 | 1415 | if(fOnOff[3]) ((AliCounterCollection*)fOutputEvSelection->FindObject("evselection"))->Count(Form("evnonsel:zvtx/Run:%d",runNumber)); |
af7c067e | 1416 | if(hWhyEvRejected) hWhyEvRejected->Fill(4); |
439ce262 | 1417 | } |
ba3a678d | 1418 | if(fCuts->IsEventRejectedDuePhysicsSelection()) { |
1419 | evSelByPS=kFALSE; | |
af7c067e | 1420 | if(hWhyEvRejected) hWhyEvRejected->Fill(5); |
1d654f7b | 1421 | } |
0dbb51a0 | 1422 | } |
ba3a678d | 1423 | if(evSelected && fOnOff[3]){ |
23dfe729 | 1424 | TH2F* hTrigS=(TH2F*)fOutputEvSelection->FindObject("hTrigCentSel"); |
2a844546 | 1425 | hTrigS->Fill(-1.,centrality); |
23dfe729 | 1426 | |
2a844546 | 1427 | if(evSelMask & AliVEvent::kAny) hTrigS->Fill(0.,centrality); |
23dfe729 | 1428 | if(evSelMask & AliVEvent::kMB) hTrigS->Fill(1.,centrality); |
1429 | if(evSelMask & AliVEvent::kINT7) hTrigS->Fill(2.,centrality); | |
1430 | if(evSelMask & AliVEvent::kCINT5) hTrigS->Fill(3.,centrality); | |
1431 | if(evSelMask & AliVEvent::kCentral) hTrigS->Fill(4.,centrality); | |
1432 | if(evSelMask & AliVEvent::kSemiCentral) hTrigS->Fill(5.,centrality); | |
1433 | if(evSelMask & (AliVEvent::kEMC1 | AliVEvent::kEMC7)) hTrigS->Fill(6.,centrality); | |
1434 | if(evSelMask & (AliVEvent::kEMCEJE | AliVEvent::kEMCEGA)) hTrigS->Fill(7.,centrality); | |
1435 | if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))) hTrigS->Fill(8.,centrality); | |
1436 | if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)) hTrigS->Fill(9.,centrality); | |
1b6b9a05 | 1437 | if(evSelMask & (AliVEvent::kTRD)) hTrigS->Fill(10.,centrality); |
1438 | if(evSelMask & (AliVEvent::kHighMult)) hTrigS->Fill(11.,centrality); | |
1439 | if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)) hTrigS->Fill(12.,centrality); | |
23dfe729 | 1440 | } |
1441 | ||
2a844546 | 1442 | if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality |
5fc4893f | 1443 | if(fOnOff[2] && fCuts->GetUseCentrality()){ |
818c1271 | 1444 | |
ac0c2841 | 1445 | Float_t stdCentf=fCuts->GetCentrality(aod); |
1446 | Int_t stdCent = (Int_t)(stdCentf+0.5); | |
5fc4893f | 1447 | Float_t secondCentf =fCuts->GetCentrality(aod,fEstimator); |
1448 | Int_t secondCent = (Int_t)(secondCentf+0.5); | |
82f89d0d | 1449 | Int_t mincent=stdCent-stdCent%10; |
b68a0f6a | 1450 | AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData(); |
1451 | Float_t vzeroMult = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C(); | |
1452 | AliCentrality *aodcent = aod->GetCentrality(); | |
1453 | Float_t spdCentf = aodcent->GetCentralityPercentile("CL1"); | |
5fc4893f | 1454 | if(stdCentf==-1) { |
5587ae1a | 1455 | mincent=-10; |
5fc4893f | 1456 | stdCent=-1; |
1457 | } | |
c40c91c6 | 1458 | if(mincent==100)mincent--; |
82f89d0d | 1459 | ((AliCounterCollection*)fOutputCounters->FindObject("stdEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber)); |
5fc4893f | 1460 | |
82f89d0d | 1461 | mincent=secondCent-secondCent%10; |
5fc4893f | 1462 | if(secondCentf==-1) { |
5587ae1a | 1463 | mincent=-10; |
5fc4893f | 1464 | secondCent=-1; |
1465 | } | |
c40c91c6 | 1466 | if(mincent==100)mincent--; |
82f89d0d | 1467 | ((AliCounterCollection*)fOutputCounters->FindObject("secondEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber)); |
1468 | ||
1469 | if(stdCent<fCuts->GetMinCentrality() || stdCent>fCuts->GetMaxCentrality()){ | |
1470 | ((TH1F*)fOutputCheckCentrality->FindObject("hNtrackletsOut"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1471 | ((TH1F*)fOutputCheckCentrality->FindObject("hMultOut"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1472 | }else{ | |
1473 | ((TH1F*)fOutputCheckCentrality->FindObject("hNtrackletsIn"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1474 | ((TH1F*)fOutputCheckCentrality->FindObject("hMultIn"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1475 | } | |
ac0c2841 | 1476 | ((TH2F*)fOutputCheckCentrality->FindObject("hMultvsPercentile"))->Fill(aod->GetHeader()->GetRefMultiplicity(),stdCentf); |
7a5f2502 | 1477 | ((TH2F*)fOutputCheckCentrality->FindObject("hntrklvsPercentile"))->Fill(aod->GetTracklets()->GetNumberOfTracklets(),stdCentf); |
138e0d89 | 1478 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCTracksvsPercentile"))->Fill(nSelTracksTPCOnly,stdCentf); |
1479 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCITSTracksvsPercentile"))->Fill(nSelTracksTPCITS,stdCentf); | |
1480 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCITS1SPDTracksvsPercentile"))->Fill(nSelTracksTPCITS1SPD,stdCentf); | |
b68a0f6a | 1481 | ((TH2F*)fOutputCheckCentrality->FindObject("hV0MultiplicityPercentile"))->Fill(vzeroMult,stdCentf); |
1482 | ((TH2F*)fOutputCheckCentrality->FindObject("hV0MultiplicityNtrackletsIn"))->Fill(vzeroMult,aod->GetTracklets()->GetNumberOfTracklets()); | |
1483 | ((TH2F*)fOutputCheckCentrality->FindObject("hStdPercentileSPDPercentile"))->Fill(stdCentf,spdCentf); | |
0dbb51a0 | 1484 | |
82f89d0d | 1485 | PostData(6,fOutputCheckCentrality); |
1486 | ||
1487 | } else{ | |
5fc4893f | 1488 | if(fOnOff[0]){ |
1489 | ((TH1F*)fOutputTrack->FindObject("hNtracklets"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1490 | ((TH1F*)fOutputTrack->FindObject("hMult"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1491 | } | |
a4ef4383 | 1492 | } |
82f89d0d | 1493 | } |
1494 | ||
818c1271 | 1495 | if(fOnOff[3]){ |
1496 | const AliVVertex *vertex = aod->GetPrimaryVertex(); | |
6c66ddad | 1497 | Double_t xvtx=vertex->GetX(); |
1498 | Double_t yvtx=vertex->GetY(); | |
818c1271 | 1499 | Double_t zvtx=vertex->GetZ(); |
6c66ddad | 1500 | Int_t vtxTyp=0; |
1501 | if(vertex->GetNContributors()<=0) vtxTyp=-1; | |
1502 | TString title=vertex->GetTitle(); | |
401afa7c | 1503 | if(title.Contains("Z")) vtxTyp=2; |
1504 | if(title.Contains("3D")) vtxTyp=1; | |
6c66ddad | 1505 | ((TH1F*)fOutputEvSelection->FindObject("hxvtx"))->Fill(xvtx); |
1506 | ((TH1F*)fOutputEvSelection->FindObject("hyvtx"))->Fill(yvtx); | |
818c1271 | 1507 | ((TH1F*)fOutputEvSelection->FindObject("hzvtx"))->Fill(zvtx); |
6c66ddad | 1508 | ((TH1F*)fOutputEvSelection->FindObject("hWhichVert"))->Fill(vtxTyp); |
1509 | if(evSelected){ | |
1510 | ((TH1F*)fOutputEvSelection->FindObject("hxvtxSelEv"))->Fill(xvtx); | |
1511 | ((TH1F*)fOutputEvSelection->FindObject("hyvtxSelEv"))->Fill(yvtx); | |
1512 | ((TH1F*)fOutputEvSelection->FindObject("hzvtxSelEv"))->Fill(zvtx); | |
1513 | ((TH1F*)fOutputEvSelection->FindObject("hWhichVertSelEv"))->Fill(vtxTyp); | |
1514 | } | |
818c1271 | 1515 | } |
1516 | ||
82f89d0d | 1517 | if(!evSelected) { |
1518 | delete [] pdgdaughters; | |
1519 | return; //discard all events not selected (vtx and/or centrality) | |
a4ef4383 | 1520 | } |
1521 | ||
818c1271 | 1522 | |
476db98d | 1523 | AliAODPidHF* pidHF=fCuts->GetPidHF(); |
362242bf | 1524 | if(!pidHF) { |
1525 | delete [] pdgdaughters; | |
1526 | return; | |
1527 | } | |
5c13a4db | 1528 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
1529 | AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler(); | |
1530 | AliPIDResponse *pidResp=inputHandler->GetPIDResponse(); | |
1531 | ||
4940d5bf | 1532 | //AliPIDResponse* respF=pidHF->GetPidResponse(); |
476db98d | 1533 | AliTPCPIDResponse* tpcres=new AliTPCPIDResponse(); |
4940d5bf | 1534 | Bool_t oldPID=pidHF->GetOldPid(); |
1535 | if(oldPID){ | |
70e398d3 | 1536 | Double_t alephParameters[5]; |
1537 | pidHF->GetTPCBetheBlochParams(alephParameters); | |
1538 | tpcres->SetBetheBlochParameters(alephParameters[0],alephParameters[1],alephParameters[2],alephParameters[3],alephParameters[4]); | |
1539 | } | |
476db98d | 1540 | |
1541 | ||
0dbb51a0 | 1542 | Int_t ntracks=0; |
824b448a | 1543 | Int_t isGoodTrack=0, isFakeTrack=0, isSelTrack=0; |
0dbb51a0 | 1544 | |
1545 | if(aod) ntracks=aod->GetNTracks(); | |
1546 | ||
5fc4893f | 1547 | if(fOnOff[0] || fOnOff[1]){ |
1548 | //loop on tracks in the event | |
1549 | for (Int_t k=0;k<ntracks;k++){ | |
1550 | AliAODTrack* track=aod->GetTrack(k); | |
5c13a4db | 1551 | |
1552 | // Track selection cuts | |
138e0d89 | 1553 | if(track->GetID()<0) continue; |
ba3a678d | 1554 | Double_t d0z0[2],covd0z0[3]; |
1555 | track->PropagateToDCA(vtx1,aod->GetMagneticField(),99999.,d0z0,covd0z0); | |
1556 | if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){ | |
1557 | ((TH1F*)fOutputTrack->FindObject("hd0TracksFilterBit4"))->Fill(d0z0[0]); | |
1558 | } | |
5c13a4db | 1559 | ULong_t trStatus=track->GetStatus(); |
ba3a678d | 1560 | if(trStatus&AliESDtrack::kITSrefit){ |
1561 | if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){ | |
1562 | ((TH1F*)fOutputTrack->FindObject("hd0TracksSPDany"))->Fill(d0z0[0]); | |
1563 | if(track->HasPointOnITSLayer(0)){ | |
1564 | ((TH1F*)fOutputTrack->FindObject("hd0TracksSPDin"))->Fill(d0z0[0]); | |
1565 | } | |
1566 | } | |
1567 | } | |
1568 | ||
1569 | Bool_t selTrack=kTRUE; | |
1570 | if (!((trStatus & AliVTrack::kTPCrefit) == AliVTrack::kTPCrefit) || | |
5c13a4db | 1571 | !((trStatus & AliVTrack::kITSrefit) == AliVTrack::kITSrefit)){ |
1572 | selTrack=kFALSE; | |
1573 | } | |
ba3a678d | 1574 | |
5c13a4db | 1575 | Float_t nCrossedRowsTPC = track->GetTPCClusterInfo(2,1); |
1576 | Float_t ratioCrossedRowsOverFindableClustersTPC = 1.0; | |
1577 | if (track->GetTPCNclsF()>0) { | |
1578 | ratioCrossedRowsOverFindableClustersTPC = nCrossedRowsTPC/track->GetTPCNclsF(); | |
1579 | } | |
1580 | if ( nCrossedRowsTPC<70 || ratioCrossedRowsOverFindableClustersTPC<.8 ){ | |
1581 | selTrack=kFALSE; | |
1582 | } | |
ba3a678d | 1583 | if(selTrack){ |
1584 | if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){ | |
1585 | ((TH1F*)fOutputTrack->FindObject("hd0TracksTPCITSSPDany"))->Fill(d0z0[0]); | |
1586 | } | |
1587 | } | |
5230fd6a | 1588 | |
5fc4893f | 1589 | AliAODPid *pid = track->GetDetPid(); |
138e0d89 | 1590 | if(!pid && fDebug>1) cout<<"No AliAODPid found"<<endl; |
5fc4893f | 1591 | |
138e0d89 | 1592 | if(pid && fOnOff[1]){ |
5fc4893f | 1593 | Double_t times[AliPID::kSPECIES]; |
1594 | pid->GetIntegratedTimes(times); | |
0dbb51a0 | 1595 | |
5fc4893f | 1596 | Double_t tofRes[AliPID::kSPECIES]; |
1597 | pid->GetTOFpidResolution(tofRes); | |
1598 | ||
1599 | //check TOF | |
b906dda8 | 1600 | TH1F* htmpfl=((TH1F*)fOutputPID->FindObject("hTOFflags")); |
1601 | htmpfl->Fill(0.); | |
5c13a4db | 1602 | if (trStatus&AliESDtrack::kTPCout) htmpfl->Fill(1.); |
1603 | if (trStatus&AliESDtrack::kTOFout) htmpfl->Fill(2.); | |
1604 | if (trStatus&AliESDtrack::kTIME) htmpfl->Fill(3.); | |
1605 | if (trStatus&AliESDtrack::kTOFpid) htmpfl->Fill(4.); | |
1606 | if (trStatus&AliESDtrack::kTOFmismatch) htmpfl->Fill(5.); | |
1607 | ||
1608 | Bool_t isTOFok=kFALSE; | |
1609 | if(pidResp){ | |
1610 | Double_t prob[AliPID::kSPECIES]; | |
1611 | if(pidResp->ComputeTOFProbability(track,AliPID::kSPECIES,prob)==AliPIDResponse::kDetPidOk){ | |
1612 | isTOFok=kTRUE; | |
1613 | htmpfl->Fill(6.); | |
1614 | } | |
1615 | } | |
ba3a678d | 1616 | |
5c13a4db | 1617 | if(selTrack && isTOFok){ |
20baad42 | 1618 | Double_t tofTime=pid->GetTOFsignal(); |
1619 | AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader(); | |
1620 | if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD | |
1621 | // with new AOD we need to retrieve startTime, subtract it and retrieve correctly TOF PID resolutions *PA* | |
5c13a4db | 1622 | AliTOFPIDResponse tofResp=pidResp->GetTOFResponse(); |
20baad42 | 1623 | Double_t startTime = tofResp.GetStartTime(track->P()); |
1624 | Float_t startTimeRes = tofResp.GetStartTimeRes(track->P()); | |
1625 | Int_t startTimeMask = tofResp.GetStartTimeMask(track->P()); | |
5c13a4db | 1626 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeDistrib"))->Fill(startTime); |
20baad42 | 1627 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeMask"))->Fill(startTimeMask); |
1628 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeRes"))->Fill(startTimeRes); | |
1629 | tofTime-=startTime; | |
ea6f40e6 | 1630 | for (Int_t type=0;type<AliPID::kSPECIES;type++) tofRes[type]=tofResp.GetExpectedSigma(track->P(),times[type],AliPID::ParticleMassZ(type)); |
20baad42 | 1631 | } |
5fc4893f | 1632 | ((TH1F*)fOutputPID->FindObject("hTOFtime"))->Fill(times[AliPID::kProton]); |
20baad42 | 1633 | ((TH2F*)fOutputPID->FindObject("hTOFtimeKaonHyptime"))->Fill(track->P(),tofTime-times[3]); //3 is kaon |
1634 | ((TH1F*)fOutputPID->FindObject("hTOFsig"))->Fill(tofTime); | |
5fc4893f | 1635 | if (pid->GetTOFsignal()< 0) ((TH1F*)fOutputPID->FindObject("hTOFsig"))->Fill(-1); |
1636 | ||
4940d5bf | 1637 | Double_t nsigma[3]={-10,-10,-10}; |
5c13a4db | 1638 | nsigma[0]=pidResp->NumberOfSigmasTOF(track,AliPID::kPion); |
1639 | nsigma[1]=pidResp->NumberOfSigmasTOF(track,AliPID::kKaon); | |
1640 | nsigma[2]=pidResp->NumberOfSigmasTOF(track,AliPID::kProton); | |
4940d5bf | 1641 | |
1642 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaKSigPid"))->Fill(track->P(),nsigma[1]); | |
1643 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaPionSigPid"))->Fill(track->P(),nsigma[0]); | |
1644 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaProtonSigPid"))->Fill(track->P(),nsigma[2]); | |
1645 | if(fReadMC){ | |
1646 | Int_t label=track->GetLabel(); | |
1647 | if(label<=0) continue; | |
1648 | AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label); | |
1649 | if(mcpart){ | |
1650 | Int_t abspdgcode=TMath::Abs(mcpart->PdgCode()); | |
1651 | if(abspdgcode==211) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCPionSigPid"))->Fill(track->P(),nsigma[0]); | |
1652 | if(abspdgcode==321) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCKSigPid"))->Fill(track->P(),nsigma[1]); | |
1653 | if(abspdgcode==2212) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCProtonSigPid"))->Fill(track->P(),nsigma[2]); | |
24748c57 | 1654 | |
24748c57 | 1655 | } |
4940d5bf | 1656 | } |
24748c57 | 1657 | |
4940d5bf | 1658 | for (Int_t iS=2; iS<5; iS++){ //we plot TOF Pid resolution for 3-sigma identified particles |
1659 | if ( TMath::Abs(nsigma[iS-2])<3.){ | |
1660 | switch (iS) { | |
1661 | case AliPID::kPion: | |
1662 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigPion"))->Fill(tofRes[iS]); | |
1663 | break; | |
1664 | case AliPID::kKaon: | |
1665 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigKaon"))->Fill(tofRes[iS]); | |
1666 | break; | |
1667 | case AliPID::kProton: | |
1668 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigProton"))->Fill(tofRes[iS]); | |
1669 | break; | |
1670 | default: | |
1671 | break; | |
5fc4893f | 1672 | } |
a4ef4383 | 1673 | } |
1674 | } | |
5fc4893f | 1675 | }//if TOF status |
4940d5bf | 1676 | //} |
ba3a678d | 1677 | |
5fc4893f | 1678 | if(pidHF && pidHF->CheckStatus(track,"TPC")){ |
476db98d | 1679 | |
5fc4893f | 1680 | Double_t TPCp=pid->GetTPCmomentum(); |
1681 | Double_t TPCsignal=pid->GetTPCsignal(); | |
84a4c5bc | 1682 | UShort_t TPCsignalN=pid->GetTPCsignalN(); |
5fc4893f | 1683 | ((TH1F*)fOutputPID->FindObject("hTPCsig"))->Fill(TPCsignal); |
1684 | ((TH1F*)fOutputPID->FindObject("hTPCsigvsp"))->Fill(TPCp,TPCsignal); | |
1685 | //if (pidHF->IsKaonRaw(track, "TOF")) | |
4940d5bf | 1686 | Double_t nsigma[3]={-10,-10,-10}; |
1687 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kPion,nsigma[0]); | |
1688 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kKaon,nsigma[1]); | |
1689 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kProton,nsigma[2]); | |
24748c57 | 1690 | |
4940d5bf | 1691 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaK"))->Fill(TPCp,nsigma[1]); |
1692 | ||
1693 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaPion"))->Fill(TPCp,nsigma[0]); | |
1694 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaProton"))->Fill(TPCp,nsigma[2]); | |
1695 | ||
24748c57 | 1696 | if(fReadMC){ |
1697 | Int_t label=track->GetLabel(); | |
1698 | if(label<=0) continue; | |
1699 | AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label); | |
1700 | if(mcpart){ | |
1701 | Int_t abspdgcode=TMath::Abs(mcpart->PdgCode()); | |
1702 | if(abspdgcode==211) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCPion"))->Fill(track->P(),nsigma[0]); | |
1703 | if(abspdgcode==321) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCK"))->Fill(track->P(),nsigma[1]); | |
1704 | if(abspdgcode==2212) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCProton"))->Fill(track->P(),nsigma[2]); | |
1705 | ||
1706 | } | |
1707 | ||
1708 | } | |
84a4c5bc | 1709 | if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){ |
1710 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPtAllTracks"))->Fill(track->Pt(),(Float_t)TPCsignalN); | |
1711 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPhiAllTracks"))->Fill(track->Phi(),(Float_t)TPCsignalN); | |
1712 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsEtaAllTracks"))->Fill(track->Eta(),(Float_t)TPCsignalN); | |
1713 | } | |
1714 | ||
5fc4893f | 1715 | }//if TPC status |
1716 | } //end PID histograms | |
84a4c5bc | 1717 | |
5fc4893f | 1718 | Int_t nclsTot=0,nclsSPD=0; |
1719 | ||
1720 | //check clusters of the tracks | |
1721 | if(fOnOff[0]){ | |
1722 | ||
bc6846db | 1723 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(-1); |
5fc4893f | 1724 | for(Int_t l=0;l<6;l++) { |
1725 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
bc6846db | 1726 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(l); |
5fc4893f | 1727 | nclsTot++; if(l<2) nclsSPD++; |
1728 | } | |
1729 | } | |
1730 | ((TH1F*)fOutputTrack->FindObject("hnClsITS"))->Fill(nclsTot); | |
1731 | ((TH1F*)fOutputTrack->FindObject("hnClsSPD"))->Fill(nclsSPD); | |
84a4c5bc | 1732 | |
1733 | if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){ | |
8e4c6c96 | 1734 | |
1735 | ((TH1F*)fOutputTrack->FindObject("hPtAllTracks"))->Fill(track->Pt()); | |
1736 | ((TH1F*)fOutputTrack->FindObject("hPhiAllTracks"))->Fill(track->Phi()); | |
1737 | ((TH1F*)fOutputTrack->FindObject("hEtaAllTracks"))->Fill(track->Eta()); | |
1738 | ((TH2F*)fOutputTrack->FindObject("hEtavsPhiAllTracks"))->Fill(track->Phi(),track->Eta()); | |
1739 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPtAllTracks"))->Fill(track->Pt(),track->GetTPCNcls()); | |
1740 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPhiAllTracks"))->Fill(track->Phi(),track->GetTPCNcls()); | |
1741 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsEtaAllTracks"))->Fill(track->Eta(),track->GetTPCNcls()); | |
7d690084 | 1742 | |
1743 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPtAllTracks"))->Fill(track->Pt(),nCrossedRowsTPC); | |
1744 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPhiAllTracks"))->Fill(track->Phi(),nCrossedRowsTPC); | |
1745 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsEtaAllTracks"))->Fill(track->Eta(),nCrossedRowsTPC); | |
1746 | ||
8e4c6c96 | 1747 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPtAllTracks"))->Fill(track->Pt(),ratioCrossedRowsOverFindableClustersTPC); |
1748 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPhiAllTracks"))->Fill(track->Phi(),ratioCrossedRowsOverFindableClustersTPC); | |
1749 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsEtaAllTracks"))->Fill(track->Eta(),ratioCrossedRowsOverFindableClustersTPC); | |
84a4c5bc | 1750 | |
8e4c6c96 | 1751 | if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points |
1752 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(0); | |
1753 | } | |
1754 | if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst | |
1755 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(1); | |
1756 | } | |
1757 | if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond | |
1758 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(2); | |
1759 | } | |
1760 | if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth | |
1761 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(3); | |
1762 | } | |
1763 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPtAllTracks"))->Fill(track->Pt(), nclsTot); | |
1764 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPhiAllTracks"))->Fill(track->Phi(), nclsTot); | |
1765 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsEtaAllTracks"))->Fill(track->Eta(), nclsTot); | |
1766 | ||
84a4c5bc | 1767 | } |
1768 | ||
39dd297f | 1769 | if(track->Pt()>0.3 && |
1770 | TMath::Abs(track->Eta())<0.8 && | |
1771 | track->GetStatus()&AliESDtrack::kITSrefit && | |
1772 | track->GetStatus()&AliESDtrack::kTPCrefit && | |
1773 | nclsSPD>0){ | |
1774 | ((TH1F*)fOutputTrack->FindObject("hnClsITSselTr"))->Fill(nclsTot); | |
1775 | } | |
5fc4893f | 1776 | if(!(track->GetStatus()&AliESDtrack::kTPCin) && track->GetStatus()&AliESDtrack::kITSrefit && !(track->GetStatus()&AliESDtrack::kITSpureSA)){//tracks retrieved in the ITS and not reconstructed in the TPC |
1777 | ((TH1F*)fOutputTrack->FindObject("hnClsITS-SA"))->Fill(nclsTot); | |
bc6846db | 1778 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(-1); |
1779 | for(Int_t l=0;l<6;l++) { | |
1780 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
1781 | ((TH1F*)fOutputTrack->FindObject("hnLayerITSsa"))->Fill(l); | |
1782 | } | |
1783 | } | |
acc33385 | 1784 | } |
5fc4893f | 1785 | Int_t label=0; |
1786 | if(fReadMC){ | |
1787 | label=track->GetLabel(); | |
1788 | if (label<0)fNEntries->Fill(8); | |
1789 | else fNEntries->Fill(9); | |
acc33385 | 1790 | } |
0dbb51a0 | 1791 | |
5fc4893f | 1792 | |
824b448a | 1793 | if (track->Pt()>0.3 && |
1794 | track->GetStatus()&AliESDtrack::kTPCrefit && | |
1795 | track->GetStatus()&AliESDtrack::kITSrefit && | |
1796 | /*nclsTot>3 &&*/ | |
1797 | nclsSPD>0) {//count good tracks | |
5fc4893f | 1798 | |
ba3a678d | 1799 | |
824b448a | 1800 | if(fReadMC && label<0) { |
1801 | ((TH1F*)fOutputTrack->FindObject("hptFakeTr"))->Fill(track->Pt()); | |
1802 | isFakeTrack++; | |
1803 | } else { | |
1804 | ((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt()); | |
1805 | isGoodTrack++; | |
ad42e35b | 1806 | } |
824b448a | 1807 | } |
1808 | if(fCuts->IsDaughterSelected(track,&vESD,fCuts->GetTrackCuts())){ | |
1809 | isSelTrack++; | |
1810 | }//select tracks for our analyses | |
818c1271 | 1811 | } //fill track histos |
5fc4893f | 1812 | } //end loop on tracks |
0dbb51a0 | 1813 | |
4940d5bf | 1814 | //fill once per event |
5fc4893f | 1815 | if(fOnOff[0]){ |
1816 | if (fReadMC) ((TH1F*)fOutputTrack->FindObject("hdistrFakeTr"))->Fill(isFakeTrack); | |
1817 | ((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack); | |
824b448a | 1818 | ((TH1F*)fOutputTrack->FindObject("hdistrSelTr"))->Fill(isSelTrack); |
5fc4893f | 1819 | } |
0dbb51a0 | 1820 | |
5fc4893f | 1821 | if(!isSimpleMode){ |
1822 | // loop over candidates | |
1823 | Int_t nCand = arrayProng->GetEntriesFast(); | |
1824 | Int_t ndaugh=3; | |
1825 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi) ndaugh=2; | |
1826 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpipipi) ndaugh=4; | |
1827 | ||
1828 | for (Int_t iCand = 0; iCand < nCand; iCand++) { | |
1829 | AliAODRecoDecayHF *d = (AliAODRecoDecayHF*)arrayProng->UncheckedAt(iCand); | |
19f6b9ff | 1830 | if(fUseSelectionBit && d->GetSelectionMap()) { |
5fc4893f | 1831 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi && !d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) continue; //skip the D0 from Dstar |
1832 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kDplustoKpipi && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts)) continue; //skip the 3 prong !D+ | |
1833 | } | |
acc33385 | 1834 | |
5fc4893f | 1835 | if(fReadMC){ |
e7af8919 | 1836 | |
1837 | Int_t labD = -1; | |
1838 | if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) { | |
1839 | ||
4b4ca79e | 1840 | Int_t pdgDgLctoV0bachelor[2]={2212,310}; |
e7af8919 | 1841 | Int_t pdgDgV0toDaughters[2]={211,211}; |
4b4ca79e | 1842 | Int_t mcLabelK0S = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->K0S+p and cc |
1843 | pdgDgLctoV0bachelor[1]=3122, pdgDgLctoV0bachelor[0]=211; | |
e7af8919 | 1844 | pdgDgV0toDaughters[0]=2212, pdgDgV0toDaughters[1]=211; |
4b4ca79e | 1845 | Int_t mcLabelLambda = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->Lambda+pi and cc |
e7af8919 | 1846 | if (mcLabelK0S!=-1 || mcLabelLambda!=-1) AliInfo(Form("mcLabelK0S=%d - mcLabelLambda=%d",mcLabelK0S,mcLabelLambda)); |
1847 | ||
1848 | if (mcLabelK0S!=-1 && mcLabelLambda!=-1) | |
1849 | AliInfo("Strange: current Lc->V0+bachelor candidate has two MC different labels!"); | |
1850 | else if (mcLabelK0S>-1 && mcLabelLambda==-1) | |
1851 | labD = mcLabelK0S; | |
1852 | else if (mcLabelLambda>-1 && mcLabelK0S==-1) | |
1853 | labD = mcLabelLambda; | |
1854 | } | |
1855 | else | |
1856 | labD = d->MatchToMC(pdg,mcArray,ndaugh,pdgdaughters); | |
1857 | ||
5fc4893f | 1858 | if(labD>=0){ |
1859 | AliAODMCParticle *partD = (AliAODMCParticle*)mcArray->At(labD); | |
1860 | Int_t label=partD->GetMother(); | |
1861 | AliAODMCParticle *mot = (AliAODMCParticle*)mcArray->At(label); | |
1862 | while(label>=0){//get first mother | |
1863 | mot = (AliAODMCParticle*)mcArray->At(label); | |
1864 | label=mot->GetMother(); | |
1865 | } | |
24748c57 | 1866 | if(mot){ |
1867 | Int_t pdgMotCode = mot->GetPdgCode(); | |
5fc4893f | 1868 | |
24748c57 | 1869 | if(TMath::Abs(pdgMotCode)==4) fNEntries->Fill(6); //from primary charm |
1870 | if(TMath::Abs(pdgMotCode)==5) fNEntries->Fill(7); //from beauty | |
1871 | } | |
acc33385 | 1872 | } |
5fc4893f | 1873 | }//end MC |
1d654f7b | 1874 | fNEntries->Fill(5); //count the candidates (data and MC) |
5fc4893f | 1875 | |
1876 | for(Int_t id=0;id<ndaugh;id++){ | |
5fc4893f | 1877 | //other histograms to be filled when the cut object is given |
e7af8919 | 1878 | AliAODTrack* track=0; |
1879 | ||
1880 | if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) { | |
1881 | if (id==0) | |
1882 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->GetBachelor(); | |
1883 | else if (id==1) | |
1884 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0PositiveTrack(); | |
1885 | else if (id==2) | |
1886 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0NegativeTrack(); | |
1887 | } | |
1888 | else | |
1889 | track=(AliAODTrack*)d->GetDaughter(id); | |
5fc4893f | 1890 | |
1891 | //track quality | |
1892 | ||
1893 | if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kTracks,aod)) { | |
1894 | ||
1895 | Int_t label=0; | |
1896 | if(fReadMC)label=track->GetLabel(); | |
ad42e35b | 1897 | if(fOnOff[0]){ |
818c1271 | 1898 | |
ad42e35b | 1899 | if(fReadMC && label<0) { |
1900 | isFakeTrack++; | |
824b448a | 1901 | ((TH1F*)fOutputTrack->FindObject("hptFakeTrFromDaugh"))->Fill(track->Pt()); |
5fc4893f | 1902 | |
ad42e35b | 1903 | ((TH1F*)fOutputTrack->FindObject("hd0f"))->Fill(d->Getd0Prong(id)); |
1904 | } else { | |
824b448a | 1905 | ((TH1F*)fOutputTrack->FindObject("hptGoodTrFromDaugh"))->Fill(track->Pt()); |
ba3a678d | 1906 | ((TH1F*)fOutputTrack->FindObject("hd0dau"))->Fill(d->Getd0Prong(id)); |
4563d678 | 1907 | Double_t d0rphiz[2],covd0[3]; |
1908 | Bool_t isDCA=track->PropagateToDCA(aod->GetPrimaryVertex(),aod->GetMagneticField(),9999.,d0rphiz,covd0); | |
ba3a678d | 1909 | if(isDCA) ((TH1F*)fOutputTrack->FindObject("hd0zdau"))->Fill(d0rphiz[1]); |
ad42e35b | 1910 | } |
818c1271 | 1911 | } |
84a4c5bc | 1912 | |
1913 | ||
1914 | if(fFillDistrTrackEffChecks){ | |
1915 | Int_t nITScls = 0; | |
1916 | Double_t nTPCCrossedRows = track->GetTPCClusterInfo(2,1); | |
1917 | Double_t ratioCrossedRowsOverFcls = 1.0; | |
1918 | if(track->GetTPCNclsF()>0){ | |
1919 | ratioCrossedRowsOverFcls = (nTPCCrossedRows)/(track->GetTPCNclsF()); | |
1920 | } | |
1921 | for(Int_t l=0;l<6;l++) { | |
1922 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
1923 | nITScls++; | |
8e4c6c96 | 1924 | } |
84a4c5bc | 1925 | } |
8e4c6c96 | 1926 | |
84a4c5bc | 1927 | ((TH1F*)fOutputTrack->FindObject("hPtDaughters"))->Fill(track->Pt()); |
1928 | ((TH1F*)fOutputTrack->FindObject("hPhiDaughters"))->Fill(track->Phi()); | |
1929 | ((TH1F*)fOutputTrack->FindObject("hEtaDaughters"))->Fill(track->Eta()); | |
1930 | ((TH2F*)fOutputTrack->FindObject("hEtavsPhiDaughters"))->Fill(track->Phi(),track->Eta()); | |
1931 | ||
1932 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPtDaughters"))->Fill(track->Pt(),track->GetTPCNcls()); | |
1933 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPhiDaughters"))->Fill(track->Phi(),track->GetTPCNcls()); | |
1934 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsEtaDaughters"))->Fill(track->Eta(),track->GetTPCNcls()); | |
1935 | ||
1936 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPtDaughters"))->Fill(track->Pt(),nTPCCrossedRows); | |
1937 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPhiDaughters"))->Fill(track->Phi(),nTPCCrossedRows); | |
1938 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsEtaDaughters"))->Fill(track->Eta(),nTPCCrossedRows); | |
1939 | ||
1940 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPtDaughters"))->Fill(track->Pt(),ratioCrossedRowsOverFcls); | |
1941 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPhiDaughters"))->Fill(track->Phi(),ratioCrossedRowsOverFcls); | |
1942 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsEtaDaughters"))->Fill(track->Eta(),ratioCrossedRowsOverFcls); | |
1943 | ||
1944 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPtDaughters"))->Fill(track->Pt(), nITScls); | |
1945 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPhiDaughters"))->Fill(track->Phi(), nITScls); | |
1946 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsEtaDaughters"))->Fill(track->Eta(), nITScls); | |
1947 | if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points | |
1948 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(0); | |
1949 | } | |
1950 | if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst | |
1951 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(1); | |
1952 | } | |
1953 | if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond | |
1954 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(2); | |
1955 | } | |
1956 | if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth | |
1957 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(3); | |
1958 | } | |
1959 | ||
1960 | ||
1961 | if(fOnOff[1]){ | |
1962 | AliAODPid *pid = track->GetDetPid(); | |
1963 | if(pid){ | |
1964 | if(pidHF && pidHF->CheckStatus(track,"TPC")){ | |
1965 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPtDaughters"))->Fill(track->Pt(),pid->GetTPCsignalN()); | |
1966 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPhiDaughters"))->Fill(track->Phi(),pid->GetTPCsignalN()); | |
1967 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsEtaDaughters"))->Fill(track->Eta(),pid->GetTPCsignalN()); | |
1968 | } | |
8e4c6c96 | 1969 | } |
8e4c6c96 | 1970 | } |
84a4c5bc | 1971 | } |
1972 | ||
1973 | ||
1974 | if (fCuts->IsSelected(d,AliRDHFCuts::kAll,aod) && fOnOff[1]){ | |
1975 | fNEntries->Fill(3); //candidates passing analysis cuts | |
1976 | ||
5230fd6a | 1977 | AliAODPid *pid = track->GetDetPid(); |
138e0d89 | 1978 | if(pid){ |
1979 | Double_t times[5]; | |
1980 | pid->GetIntegratedTimes(times); | |
20baad42 | 1981 | if(pidHF && pidHF->CheckStatus(track,"TOF")){ |
1982 | Double_t tofTime=pid->GetTOFsignal(); | |
1983 | AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader(); | |
1984 | Double_t tofRes[AliPID::kSPECIES]; | |
1985 | pid->GetTOFpidResolution(tofRes); | |
1986 | if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD | |
1987 | AliTOFPIDResponse tofResp=pidHF->GetPidResponse()->GetTOFResponse(); | |
1988 | Double_t startTime=tofResp.GetStartTime(track->P()); | |
1989 | tofTime-=startTime; | |
1990 | } | |
1991 | ((TH2F*)fOutputPID->FindObject("hTOFtimeKaonHyptimeAC"))->Fill(track->P(),tofTime-times[AliPID::kKaon]); | |
1992 | } | |
138e0d89 | 1993 | if(pidHF && pidHF->CheckStatus(track,"TPC")) ((TH2F*)fOutputPID->FindObject("hTPCsigvspAC"))->Fill(pid->GetTPCmomentum(),pid->GetTPCsignal()); |
1994 | } | |
1d654f7b | 1995 | |
5fc4893f | 1996 | } //end analysis cuts |
1997 | } //end acceptance and track cuts | |
1998 | } //end loop on tracks in the candidate | |
1999 | } //end loop on candidates | |
824b448a | 2000 | |
5fc4893f | 2001 | } |
2002 | } //end if on pid or track histograms | |
fb9311e8 | 2003 | |
476db98d | 2004 | delete tpcres; |
fb9311e8 | 2005 | delete [] pdgdaughters; |
a4ef4383 | 2006 | PostData(1,fNEntries); |
5fc4893f | 2007 | if(fOnOff[1]) PostData(2,fOutputPID); |
2008 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
a4ef4383 | 2009 | PostData(4,fCuts); |
5fc4893f | 2010 | if(fOnOff[2]) PostData(5,fOutputCounters); |
2011 | //Post data 6 done in case of centrality on | |
82f89d0d | 2012 | |
0dbb51a0 | 2013 | } |
2014 | ||
d48d81b5 | 2015 | //____________________________________________________________________________ |
2016 | void AliAnalysisTaskSEHFQA::FillFlowObs(AliAODEvent *aod){ | |
2017 | //fills the flow observables | |
65274ad6 | 2018 | Double_t cc; |
2019 | cc = fCuts->GetCentrality(aod); | |
2020 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(0., cc); | |
d48d81b5 | 2021 | |
2022 | UInt_t mask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
2023 | UInt_t trigger=AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral; | |
d48d81b5 | 2024 | if(mask & trigger) { |
65274ad6 | 2025 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(1.,cc); // fired |
2026 | if (mask & AliVEvent::kMB) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(2.,cc); | |
2027 | if (mask & AliVEvent::kCentral) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(3.,cc); | |
2028 | if (mask & AliVEvent::kSemiCentral) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(4.,cc); | |
d48d81b5 | 2029 | Bool_t rejected=false; |
d48d81b5 | 2030 | if(cc<0 || cc>60) rejected=true; |
2031 | const AliVVertex *vertex = aod->GetPrimaryVertex(); | |
2032 | Double_t zvtx=vertex->GetZ(); | |
65274ad6 | 2033 | if(TMath::Abs(zvtx)>fCuts->GetMaxVtxZ()) rejected=true; |
d48d81b5 | 2034 | if(rejected) return; //not interesting for flow QA |
2035 | } else { | |
2036 | return; | |
2037 | } | |
2038 | ||
2039 | // event accepted | |
65274ad6 | 2040 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(5.,cc); |
d48d81b5 | 2041 | fRFPcuts->SetParamType(AliFlowTrackCuts::kGlobal); |
2042 | fRFPcuts->SetPtRange(0.2,5.); | |
2043 | fRFPcuts->SetEtaRange(-0.8,0.8); | |
2044 | fRFPcuts->SetMinNClustersTPC(70); | |
2045 | fRFPcuts->SetMinChi2PerClusterTPC(0.2); | |
2046 | fRFPcuts->SetMaxChi2PerClusterTPC(4.0); | |
2047 | fRFPcuts->SetAcceptKinkDaughters(kFALSE); | |
2048 | fRFPcuts->SetEvent(aod); | |
2049 | ||
2050 | TString ref[3] = {"FB1","FB128","VZE"}; | |
2051 | Double_t psi[3]; | |
2052 | for(Int_t i=0; i!=3; ++i) { | |
2053 | if(i==0) { // switching to bit 1 | |
2054 | fRFPcuts->SetMinimalTPCdedx(10.); | |
2055 | fRFPcuts->SetAODfilterBit(1); | |
2056 | } else { // switching to bit 128 | |
2057 | fRFPcuts->SetMinimalTPCdedx(-1); | |
2058 | fRFPcuts->SetAODfilterBit(128); | |
2059 | } | |
2060 | if(i>1) { | |
2061 | fRFPcuts->SetParamType(AliFlowTrackCuts::kV0); | |
2062 | fRFPcuts->SetEtaRange(-5,+5); | |
2063 | fRFPcuts->SetPhiMin(0); | |
2064 | fRFPcuts->SetPhiMax(TMath::TwoPi()); | |
2065 | } | |
2066 | fFlowEvent->Fill(fRFPcuts,fRFPcuts); | |
2067 | fFlowEvent->TagSubeventsInEta(-5,0,0,+5); | |
65274ad6 | 2068 | // getting informationt |
d48d81b5 | 2069 | AliFlowVector vQ, vQaQb[2]; |
2070 | fFlowEvent->Get2Qsub(vQaQb,2); | |
2071 | vQ = vQaQb[0]+vQaQb[1]; | |
2072 | Double_t dMa=vQaQb[0].GetMult(); | |
2073 | Double_t dMb=vQaQb[1].GetMult(); | |
2074 | if( dMa<2 || dMb<2 ) { | |
65274ad6 | 2075 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(6.,cc); //??? |
d48d81b5 | 2076 | continue; |
2077 | } | |
2078 | psi[i] = vQ.Phi()/2; | |
2079 | // publishing | |
2080 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(0,cc,vQaQb[0].X()/dMa,dMa); // Qx- | |
2081 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(1,cc,vQaQb[0].Y()/dMa,dMa); // Qy- | |
2082 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(2,cc,vQaQb[1].X()/dMb,dMb); // Qx+ | |
2083 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(3,cc,vQaQb[1].Y()/dMb,dMb); // Qy+ | |
2084 | ((TH2F*) fOutputFlowObs->FindObject( Form("h%s_AngleQ",ref[i].Data()) ))->Fill(psi[i],cc); // Psi | |
2085 | AliFlowTrackSimple *track; | |
2086 | for(Int_t t=0; t!=fFlowEvent->NumberOfTracks(); ++t) { | |
2087 | track = (AliFlowTrackSimple*) fFlowEvent->GetTrack(t); | |
2088 | if(!track) continue; | |
2089 | if(!track->InRPSelection()) continue; | |
2090 | ((TH3F*) fOutputFlowObs->FindObject( Form("h%s_PhiEta",ref[i].Data()) ))->Fill(track->Phi(),track->Eta(),cc,track->Weight()); //PhiEta | |
2091 | } | |
65274ad6 | 2092 | |
2093 | //histo filled only for TPCFB1 | |
2094 | if (i==0) { | |
2095 | ((TH2F*) fOutputFlowObs->FindObject("hCentVsMultRPS"))->Fill(fFlowEvent->GetNumberOfRPs(),cc); | |
2096 | } | |
d48d81b5 | 2097 | } |
2098 | // TPC vs VZERO | |
2099 | ((TH3F*) fOutputFlowObs->FindObject( "hTPCVZE_AngleQ" ))->Fill(psi[0],psi[2],cc); | |
2100 | } | |
2101 | ||
a4ef4383 | 2102 | //____________________________________________________________________________ |
0dbb51a0 | 2103 | void AliAnalysisTaskSEHFQA::Terminate(Option_t */*option*/){ |
2104 | //terminate analysis | |
2105 | ||
2106 | fNEntries = dynamic_cast<TH1F*>(GetOutputData(1)); | |
2107 | if(!fNEntries){ | |
2108 | printf("ERROR: %s not available\n",GetOutputSlot(1)->GetContainer()->GetName()); | |
2109 | return; | |
2110 | } | |
2111 | ||
2112 | fOutputPID = dynamic_cast<TList*> (GetOutputData(2)); | |
5fc4893f | 2113 | if (!fOutputPID && fOnOff[1]) { |
0dbb51a0 | 2114 | printf("ERROR: %s not available\n",GetOutputSlot(2)->GetContainer()->GetName()); |
2115 | return; | |
2116 | } | |
2117 | ||
2118 | fOutputTrack = dynamic_cast<TList*> (GetOutputData(3)); | |
5fc4893f | 2119 | if (!fOutputTrack && fOnOff[0]) { |
0dbb51a0 | 2120 | printf("ERROR: %s not available\n",GetOutputSlot(3)->GetContainer()->GetName()); |
2121 | return; | |
2122 | } | |
2123 | ||
2124 | } | |
2125 |