]>
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 | ||
5ef9f7fb | 776 | hname="hStdEstimSignalPercentile"; |
777 | TH2F*hStdEstimSignalPercentile = new TH2F(hname.Data(),"Std estimator signal vs Percentile;Std estimator signal;percentile",1000,-0.5,9999.5,120,-10.,110); | |
b68a0f6a | 778 | |
5ef9f7fb | 779 | hname="hStdEstimSignalNtrackletsIn"; |
780 | TH2F*hStdEstimSignalNtrackletsIn = new TH2F(hname.Data(),"Std estimator signal vs Number of tracklets in the CC;Std estimator signal;number of tracklets",1000,-0.5,9999.5,5000,-0.5,4999.5); | |
b68a0f6a | 781 | |
5ef9f7fb | 782 | hname="hStdPercentileSecondPercentile"; |
783 | TH2F* hStdPercentileSecondPercentile = new TH2F(hname.Data(),"Std estimator Percentile Vs Second Estimator Percentile;Std estimator percentile;Second estimator percentile",120,-10.,110,120,-10.,110); | |
784 | ||
785 | hname="hStdSignalSecondSignal"; | |
786 | TH2F* hStdSignalSecondSignal = new TH2F(hname.Data(),"Std estimator signal Vs Second Estimator signal;Std estimator;Second estimator",1000,-0.5,9999.5,1000,-0.5,9999.5); | |
b68a0f6a | 787 | |
a4ef4383 | 788 | fOutputCheckCentrality->Add(hNtrackletsIn); |
789 | fOutputCheckCentrality->Add(hNtrackletsOut); | |
790 | fOutputCheckCentrality->Add(hMultIn); | |
791 | fOutputCheckCentrality->Add(hMultOut); | |
ac0c2841 | 792 | fOutputCheckCentrality->Add(hMultvsPercentile); |
7a5f2502 | 793 | fOutputCheckCentrality->Add(hntrklvsPercentile); |
138e0d89 | 794 | fOutputCheckCentrality->Add(hnTPCTracksvsPercentile); |
795 | fOutputCheckCentrality->Add(hnTPCITSTracksvsPercentile); | |
796 | fOutputCheckCentrality->Add(hnTPCITS1SPDTracksvsPercentile); | |
5ef9f7fb | 797 | fOutputCheckCentrality->Add(hStdEstimSignalPercentile); |
798 | fOutputCheckCentrality->Add(hStdEstimSignalNtrackletsIn); | |
799 | fOutputCheckCentrality->Add(hStdPercentileSecondPercentile); | |
800 | fOutputCheckCentrality->Add(hStdSignalSecondSignal); | |
82f89d0d | 801 | |
802 | PostData(6,fOutputCheckCentrality); | |
803 | ||
a4ef4383 | 804 | } else{ |
5fc4893f | 805 | if(fOnOff[0]){ |
806 | TString hname="hNtracklets"; | |
807 | TH1F* hNtracklets=new TH1F(hname.Data(),"Number of tracklets;ntracklets;Entries",5000,-0.5,4999.5); | |
808 | ||
809 | hname="hMult"; | |
810 | TH1F* hMult=new TH1F(hname.Data(),"Multiplicity;multiplicity;Entries",10000,-0.5,9999.5); | |
811 | fOutputTrack->Add(hNtracklets); | |
812 | fOutputTrack->Add(hMult); | |
813 | } | |
a4ef4383 | 814 | } |
815 | ||
818c1271 | 816 | //event selection (z vertex for the moment) |
817 | if(fOnOff[3]){ | |
818 | fOutputEvSelection=new TList(); | |
819 | fOutputEvSelection->SetOwner(); | |
820 | fOutputEvSelection->SetName(GetOutputSlot(7)->GetContainer()->GetName()); | |
821 | AliCounterCollection *evselection=new AliCounterCollection("evselection"); | |
822 | evselection->AddRubric("run",500000); | |
823 | evselection->AddRubric("evnonsel","zvtx"); | |
824 | evselection->Init(); | |
825 | ||
b25dd7e3 | 826 | TH1F* hxvtx=new TH1F("hxvtx", "Distribution of x_{VTX};x_{VTX} [cm];Entries",800,-1,1); |
827 | TH1F* hyvtx=new TH1F("hyvtx", "Distribution of y_{VTX};y_{VTX} [cm];Entries",800,-1,1); | |
828 | TH1F* hzvtx=new TH1F("hzvtx", "Distribution of z_{VTX};z_{VTX} [cm];Entries",800,-30,30); | |
829 | TH1F* hxvtxSelEv=new TH1F("hxvtxSelEv", "Distribution of x_{VTX} Selected Ev;x_{VTX} [cm];Entries",800,-1,1); | |
830 | TH1F* hyvtxSelEv=new TH1F("hyvtxSelEv", "Distribution of y_{VTX} Selected Ev;y_{VTX} [cm];Entries",800,-1,1); | |
831 | TH1F* hzvtxSelEv=new TH1F("hzvtxSelEv", "Distribution of z_{VTX} Selected Ev;z_{VTX} [cm];Entries",800,-30,30); | |
6c66ddad | 832 | TH1F* hWhichVert=new TH1F("hWhichVert","Vertex Type",4,-1.5,2.5); |
833 | hWhichVert->GetXaxis()->SetBinLabel(1,"Not found"); | |
834 | hWhichVert->GetXaxis()->SetBinLabel(2,"Track"); | |
835 | hWhichVert->GetXaxis()->SetBinLabel(3,"SPD-3D"); | |
836 | hWhichVert->GetXaxis()->SetBinLabel(4,"SPD-z"); | |
837 | TH1F* hWhichVertSelEv=new TH1F("hWhichVertSelEv","Vertex Type",4,-1.5,2.5); | |
838 | hWhichVertSelEv->GetXaxis()->SetBinLabel(1,"Not found"); | |
839 | hWhichVertSelEv->GetXaxis()->SetBinLabel(2,"Track"); | |
840 | hWhichVertSelEv->GetXaxis()->SetBinLabel(3,"SPD-3D"); | |
841 | hWhichVertSelEv->GetXaxis()->SetBinLabel(4,"SPD-z"); | |
23dfe729 | 842 | |
1b6b9a05 | 843 | TH2F* hTrigCent=new TH2F("hTrigCent","Centrality vs. Trigger types",14,-1.5,12.5,12,-10,110); |
23dfe729 | 844 | hTrigCent->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 845 | hTrigCent->GetXaxis()->SetBinLabel(2,"kAny"); |
846 | hTrigCent->GetXaxis()->SetBinLabel(3,"kMB"); | |
847 | hTrigCent->GetXaxis()->SetBinLabel(4,"kINT7"); | |
848 | hTrigCent->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
849 | hTrigCent->GetXaxis()->SetBinLabel(6,"kCent"); | |
850 | hTrigCent->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
851 | hTrigCent->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
852 | hTrigCent->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
853 | hTrigCent->GetXaxis()->SetBinLabel(10,"Muons"); | |
854 | hTrigCent->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 855 | hTrigCent->GetXaxis()->SetBinLabel(12,"TRD"); |
856 | hTrigCent->GetXaxis()->SetBinLabel(13,"HighMult"); | |
857 | hTrigCent->GetXaxis()->SetBinLabel(14,"Others"); | |
2a844546 | 858 | |
1b6b9a05 | 859 | TH2F* hTrigMul=new TH2F("hTrigMul","Multiplicity vs. Trigger types",14,-1.5,12.5,100,0.,10000.); |
23dfe729 | 860 | hTrigMul->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 861 | hTrigMul->GetXaxis()->SetBinLabel(2,"kAny"); |
862 | hTrigMul->GetXaxis()->SetBinLabel(3,"kMB"); | |
863 | hTrigMul->GetXaxis()->SetBinLabel(4,"kINT7"); | |
864 | hTrigMul->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
865 | hTrigMul->GetXaxis()->SetBinLabel(6,"kCent"); | |
866 | hTrigMul->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
867 | hTrigMul->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
868 | hTrigMul->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
869 | hTrigMul->GetXaxis()->SetBinLabel(10,"Muons"); | |
870 | hTrigMul->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 871 | hTrigMul->GetXaxis()->SetBinLabel(12,"TRD"); |
872 | hTrigMul->GetXaxis()->SetBinLabel(13,"HighMult"); | |
873 | hTrigMul->GetXaxis()->SetBinLabel(14,"Others"); | |
2a844546 | 874 | |
1b6b9a05 | 875 | TH2F* hTrigCentSel=new TH2F("hTrigCentSel","Trigger types",14,-1.5,12.5,12,-10,110); |
23dfe729 | 876 | hTrigCentSel->GetXaxis()->SetBinLabel(1,"All"); |
2a844546 | 877 | hTrigCentSel->GetXaxis()->SetBinLabel(2,"kAny"); |
878 | hTrigCentSel->GetXaxis()->SetBinLabel(3,"kMB"); | |
879 | hTrigCentSel->GetXaxis()->SetBinLabel(4,"kINT7"); | |
880 | hTrigCentSel->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
881 | hTrigCentSel->GetXaxis()->SetBinLabel(6,"kCent"); | |
882 | hTrigCentSel->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
883 | hTrigCentSel->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
884 | hTrigCentSel->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
885 | hTrigCentSel->GetXaxis()->SetBinLabel(10,"Muons"); | |
886 | hTrigCentSel->GetXaxis()->SetBinLabel(11,"PHOS"); | |
1b6b9a05 | 887 | hTrigCentSel->GetXaxis()->SetBinLabel(12,"TRD"); |
888 | hTrigCentSel->GetXaxis()->SetBinLabel(13,"HighMult"); | |
889 | hTrigCentSel->GetXaxis()->SetBinLabel(14,"Others"); | |
23dfe729 | 890 | |
a626ae47 | 891 | TH2F* hTrigMulSel=new TH2F("hTrigMulSel","Multiplicity after selection vs. Trigger types",14,-1.5,12.5,100,0.,10000.); |
892 | hTrigMulSel->GetXaxis()->SetBinLabel(1,"All"); | |
893 | hTrigMulSel->GetXaxis()->SetBinLabel(2,"kAny"); | |
894 | hTrigMulSel->GetXaxis()->SetBinLabel(3,"kMB"); | |
895 | hTrigMulSel->GetXaxis()->SetBinLabel(4,"kINT7"); | |
896 | hTrigMulSel->GetXaxis()->SetBinLabel(5,"kCINT5"); | |
897 | hTrigMulSel->GetXaxis()->SetBinLabel(6,"kCent"); | |
898 | hTrigMulSel->GetXaxis()->SetBinLabel(7,"kSemiCent"); | |
899 | hTrigMulSel->GetXaxis()->SetBinLabel(8,"kEMC1+7"); | |
900 | hTrigMulSel->GetXaxis()->SetBinLabel(9,"kEMCJET+GAMMA"); | |
901 | hTrigMulSel->GetXaxis()->SetBinLabel(10,"Muons"); | |
902 | hTrigMulSel->GetXaxis()->SetBinLabel(11,"PHOS"); | |
903 | hTrigMulSel->GetXaxis()->SetBinLabel(12,"TRD"); | |
904 | hTrigMulSel->GetXaxis()->SetBinLabel(13,"HighMult"); | |
905 | hTrigMulSel->GetXaxis()->SetBinLabel(14,"Others"); | |
906 | ||
1b765719 | 907 | AliCounterCollection *trigCounter=new AliCounterCollection("trigCounter"); |
908 | trigCounter->AddRubric("run",500000); | |
3dfe174d | 909 | trigCounter->AddRubric("triggerType","All/Any/MB/Cent/SemiCent/EMCAL/MUON/NoPhysSelMUON/NoPhysSelEvNot7/NoPhysSelCMUP1/NoPhysSelMB/NoPhysSelCent/NoPhysSelSemiCent/CINT7"); |
1b765719 | 910 | trigCounter->Init(); |
911 | ||
af7c067e | 912 | TH1F* hWhyEvRejected=new TH1F("hWhyEvRejected", "Why Event rejected",7,-1.5,5.5); |
1d654f7b | 913 | |
af7c067e | 914 | hWhyEvRejected->GetXaxis()->SetBinLabel(1,"N events"); |
915 | hWhyEvRejected->GetXaxis()->SetBinLabel(2,"pileup"); | |
916 | hWhyEvRejected->GetXaxis()->SetBinLabel(3,"centrality"); | |
917 | hWhyEvRejected->GetXaxis()->SetBinLabel(4,"Vertex not found"); | |
918 | hWhyEvRejected->GetXaxis()->SetBinLabel(5,"trigger"); | |
919 | hWhyEvRejected->GetXaxis()->SetBinLabel(6,"z vertex out of 10 cm"); | |
920 | hWhyEvRejected->GetXaxis()->SetBinLabel(7,"physics sel"); | |
1d654f7b | 921 | |
922 | ||
818c1271 | 923 | fOutputEvSelection->Add(evselection); |
6c66ddad | 924 | fOutputEvSelection->Add(hxvtx); |
925 | fOutputEvSelection->Add(hyvtx); | |
818c1271 | 926 | fOutputEvSelection->Add(hzvtx); |
6c66ddad | 927 | fOutputEvSelection->Add(hxvtxSelEv); |
928 | fOutputEvSelection->Add(hyvtxSelEv); | |
929 | fOutputEvSelection->Add(hzvtxSelEv); | |
930 | fOutputEvSelection->Add(hWhichVert); | |
931 | fOutputEvSelection->Add(hWhichVertSelEv); | |
23dfe729 | 932 | fOutputEvSelection->Add(hTrigCent); |
933 | fOutputEvSelection->Add(hTrigMul); | |
a626ae47 | 934 | fOutputEvSelection->Add(hTrigMulSel); |
23dfe729 | 935 | fOutputEvSelection->Add(hTrigCentSel); |
1b765719 | 936 | fOutputEvSelection->Add(trigCounter); |
1d654f7b | 937 | fOutputEvSelection->Add(hWhyEvRejected); |
938 | ||
818c1271 | 939 | } |
d48d81b5 | 940 | if(fOnOff[4]){ // FLOW OBSERVABLES |
941 | fOutputFlowObs=new TList(); | |
942 | fOutputFlowObs->SetOwner(); | |
943 | fOutputFlowObs->SetName(GetOutputSlot(8)->GetContainer()->GetName()); | |
944 | ||
945 | fFlowEvent = new AliFlowEvent(3000); | |
946 | fRFPcuts = new AliFlowTrackCuts("rfpCuts"); | |
947 | ||
65274ad6 | 948 | TH2F *hFEvents = new TH2F("hFlowEvents","FlowEvent Selection",7,0,7,7,-10,60); |
d48d81b5 | 949 | hFEvents->GetXaxis()->SetBinLabel(1,"REACHED"); |
950 | hFEvents->GetXaxis()->SetBinLabel(2,"TRIGGERED"); | |
65274ad6 | 951 | hFEvents->GetXaxis()->SetBinLabel(3,"kMB"); |
952 | hFEvents->GetXaxis()->SetBinLabel(4,"kCent"); | |
953 | hFEvents->GetXaxis()->SetBinLabel(5,"kSemiC"); | |
954 | hFEvents->GetXaxis()->SetBinLabel(6,"Triggered + vtx cut"); | |
955 | hFEvents->GetXaxis()->SetBinLabel(7,"UnexpectedBehaviour"); | |
d48d81b5 | 956 | fOutputFlowObs->Add(hFEvents); |
957 | ||
958 | TProfile2D *hQ[3]; | |
959 | TH2F *hAngleQ[3]; | |
960 | TH3F *hPhiEta[3]; | |
961 | TString ref[3] = {"FB1","FB128","VZE"}; | |
962 | Int_t etabin[3] = {40,40,20}; | |
963 | Int_t etamax[3] = { 1, 1, 5}; | |
964 | for(Int_t i=0; i<3; ++i) { | |
965 | hQ[i]= new TProfile2D( Form("h%s_Q",ref[i].Data()), | |
966 | Form("Q_{2} components for %s",ref[i].Data()), | |
967 | 4,0,4,12,0,60,"s"); | |
968 | hQ[i]->GetXaxis()->SetBinLabel(1,"Qx^{-}"); | |
969 | hQ[i]->GetXaxis()->SetBinLabel(2,"Qy^{-}"); | |
970 | hQ[i]->GetXaxis()->SetBinLabel(3,"Qx^{+}"); | |
971 | hQ[i]->GetXaxis()->SetBinLabel(4,"Qy^{+}"); | |
972 | hQ[i]->GetYaxis()->SetTitle("Centrality"); | |
973 | fOutputFlowObs->Add(hQ[i]); | |
974 | ||
975 | hAngleQ[i] = new TH2F( Form("h%s_AngleQ",ref[i].Data()), | |
976 | Form("#Psi_{2} for %s",ref[i].Data()), | |
977 | 72,0,TMath::Pi(),12,0,60); | |
978 | hAngleQ[i]->GetXaxis()->SetTitle( Form("#Psi_{2}^{%s}",ref[i].Data()) ); | |
979 | hAngleQ[i]->GetYaxis()->SetTitle("Centrality"); | |
980 | fOutputFlowObs->Add(hAngleQ[i]); | |
981 | ||
982 | hPhiEta[i] = new TH3F( Form("h%s_PhiEta",ref[i].Data()), | |
983 | Form("Eta vs Phi for %s",ref[i].Data()), | |
65274ad6 | 984 | 144,0,TMath::TwoPi(),etabin[i],-1.0*etamax[i],+1.0*etamax[i],12,0,60); |
d48d81b5 | 985 | hPhiEta[i]->GetXaxis()->SetTitle("Phi"); |
986 | hPhiEta[i]->GetYaxis()->SetTitle("Eta"); | |
987 | hPhiEta[i]->GetZaxis()->SetTitle("Centrality"); | |
988 | fOutputFlowObs->Add(hPhiEta[i]); | |
989 | ||
990 | } | |
991 | 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); | |
992 | hTPCVZE_AngleQ->GetXaxis()->SetTitle("#Psi_{2}^{TPC}"); | |
993 | hTPCVZE_AngleQ->GetYaxis()->SetTitle("#Psi_{2}^{VZE}"); | |
994 | hTPCVZE_AngleQ->GetZaxis()->SetTitle("Centrality"); | |
995 | fOutputFlowObs->Add(hTPCVZE_AngleQ); | |
65274ad6 | 996 | |
997 | TH2F *hCentVsMultRPS = new TH2F("hCentVsMultRPS", " Centrality Vs. Multiplicity RPs",5000, 0, 5000.,12,0,60 ); | |
998 | hCentVsMultRPS->GetXaxis()->SetTitle("Multiplicity RPs"); | |
999 | hCentVsMultRPS->GetYaxis()->SetTitle("Centrality"); | |
1000 | fOutputFlowObs->Add(hCentVsMultRPS); | |
d48d81b5 | 1001 | } |
e7af8919 | 1002 | |
a578b2da | 1003 | /* |
e7af8919 | 1004 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
1005 | AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler(); | |
1006 | AliPIDResponse *pidResp=inputHandler->GetPIDResponse(); | |
1007 | if (fCuts->GetIsUsePID() && fDecayChannel==kLambdactoV0) { | |
1008 | fCuts->GetPidHF()->SetPidResponse(pidResp); | |
89b8ddf3 | 1009 | AliRDHFCutsLctoV0* lccuts=dynamic_cast<AliRDHFCutsLctoV0*>(fCuts); |
1010 | if(lccuts){ | |
1011 | lccuts->GetPidV0pos()->SetPidResponse(pidResp); | |
1012 | lccuts->GetPidV0neg()->SetPidResponse(pidResp); | |
1013 | fCuts->GetPidHF()->SetOldPid(kFALSE); | |
1014 | lccuts->GetPidV0pos()->SetOldPid(kFALSE); | |
1015 | lccuts->GetPidV0neg()->SetOldPid(kFALSE); | |
1016 | } | |
e7af8919 | 1017 | } |
a578b2da | 1018 | */ |
e7af8919 | 1019 | |
0dbb51a0 | 1020 | // Post the data |
1021 | PostData(1,fNEntries); | |
d48d81b5 | 1022 | |
5fc4893f | 1023 | if(fOnOff[1]) PostData(2,fOutputPID); |
1024 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
0dbb51a0 | 1025 | PostData(4,fCuts); |
5fc4893f | 1026 | if(fOnOff[2]) PostData(5,fOutputCounters); |
818c1271 | 1027 | if(fOnOff[3]) PostData(7,fOutputEvSelection); |
d48d81b5 | 1028 | if(fOnOff[4]) PostData(8,fOutputFlowObs); |
818c1271 | 1029 | |
5fc4893f | 1030 | if(!fOnOff[0] && !fOnOff[1] && !fOnOff[2]) AliError("Nothing will be filled!"); |
0dbb51a0 | 1031 | } |
1032 | ||
1033 | //___________________________________________________________________________ | |
1034 | void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/) | |
1035 | { | |
1036 | // Execute analysis for current event | |
1037 | ||
1038 | AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent()); | |
1039 | if(fDebug>2) printf("Analysing decay %d\n",fDecayChannel); | |
1040 | // Post the data already here | |
1041 | PostData(1,fNEntries); | |
5fc4893f | 1042 | if(fOnOff[1]) PostData(2,fOutputPID); |
1043 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
0dbb51a0 | 1044 | PostData(4,fCuts); |
5fc4893f | 1045 | if(fOnOff[2]) { |
1046 | PostData(5,fOutputCounters); | |
1047 | if(fCuts->GetUseCentrality()) PostData(6,fOutputCheckCentrality); | |
1048 | } | |
0dbb51a0 | 1049 | |
1050 | TClonesArray *arrayProng =0; | |
1051 | Int_t pdg=0; | |
a4ef4383 | 1052 | Int_t *pdgdaughters=0x0; |
1053 | ||
0dbb51a0 | 1054 | if(!aod && AODEvent() && IsStandardAOD()) { |
1055 | // In case there is an AOD handler writing a standard AOD, use the AOD | |
1056 | // event in memory rather than the input (ESD) event. | |
1057 | aod = dynamic_cast<AliAODEvent*> (AODEvent()); | |
1058 | // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root) | |
1059 | // have to taken from the AOD event hold by the AliAODExtension | |
1060 | AliAODHandler* aodHandler = (AliAODHandler*) | |
1061 | ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
1062 | if(aodHandler->GetExtensions()) { | |
1063 | ||
1064 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root"); | |
1065 | AliAODEvent *aodFromExt = ext->GetAOD(); | |
1066 | ||
1067 | ||
1068 | ||
1069 | switch(fDecayChannel){ | |
1070 | case 0: | |
1071 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1072 | pdg=411; | |
a4ef4383 | 1073 | if(fReadMC){ |
1074 | pdgdaughters =new Int_t[3]; | |
1075 | pdgdaughters[0]=211;//pi | |
1076 | pdgdaughters[1]=321;//K | |
1077 | pdgdaughters[2]=211;//pi | |
1078 | } | |
0dbb51a0 | 1079 | break; |
1080 | case 1: | |
1081 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi"); | |
1082 | pdg=421; | |
a4ef4383 | 1083 | if(fReadMC){ |
1084 | pdgdaughters =new Int_t[2]; | |
1085 | pdgdaughters[0]=211;//pi | |
1086 | pdgdaughters[1]=321;//K | |
1087 | } | |
0dbb51a0 | 1088 | break; |
1089 | case 2: | |
1090 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Dstar"); | |
1091 | pdg=413; | |
a4ef4383 | 1092 | if(fReadMC){ |
fb9311e8 | 1093 | pdgdaughters =new Int_t[3]; |
a4ef4383 | 1094 | pdgdaughters[1]=211;//pi |
1095 | pdgdaughters[0]=321;//K | |
1096 | pdgdaughters[2]=211;//pi (soft?) | |
1097 | } | |
0dbb51a0 | 1098 | break; |
1099 | case 3: | |
1100 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1101 | pdg=431; | |
a4ef4383 | 1102 | if(fReadMC){ |
1103 | pdgdaughters =new Int_t[3]; | |
1104 | pdgdaughters[0]=321;//K | |
1105 | pdgdaughters[1]=321;//K | |
1106 | pdgdaughters[2]=211;//pi | |
1107 | } | |
0dbb51a0 | 1108 | break; |
1109 | case 4: | |
1110 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong"); | |
1111 | pdg=421; | |
a4ef4383 | 1112 | if(fReadMC){ |
1113 | pdgdaughters =new Int_t[4]; | |
1114 | pdgdaughters[0]=321; | |
1115 | pdgdaughters[1]=211; | |
1116 | pdgdaughters[2]=211; | |
1117 | pdgdaughters[3]=211; | |
1118 | } | |
0dbb51a0 | 1119 | break; |
1120 | case 5: | |
1121 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1122 | pdg=4122; | |
a4ef4383 | 1123 | if(fReadMC){ |
1124 | pdgdaughters =new Int_t[3]; | |
1125 | pdgdaughters[0]=2212;//p | |
1126 | pdgdaughters[1]=321;//K | |
1127 | pdgdaughters[2]=211;//pi | |
1128 | } | |
0dbb51a0 | 1129 | break; |
ca688a98 | 1130 | case kLambdactoV0: |
e7af8919 | 1131 | arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("CascadesHF"); |
ca688a98 | 1132 | pdg=4122; |
1133 | if(fReadMC){ | |
1134 | pdgdaughters =new Int_t[3]; | |
1135 | pdgdaughters[0]=2212;//p | |
1136 | pdgdaughters[1]=211;//pi | |
1137 | pdgdaughters[2]=211;//pi | |
1138 | } | |
1139 | break; | |
0dbb51a0 | 1140 | } |
1141 | } | |
dc222f77 | 1142 | } else if(aod) { |
0dbb51a0 | 1143 | switch(fDecayChannel){ |
1144 | case 0: | |
1145 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1146 | pdg=411; | |
a4ef4383 | 1147 | if(fReadMC){ |
1148 | pdgdaughters =new Int_t[3]; | |
1149 | pdgdaughters[0]=211;//pi | |
1150 | pdgdaughters[1]=321;//K | |
1151 | pdgdaughters[2]=211;//pi | |
1152 | } | |
0dbb51a0 | 1153 | break; |
1154 | case 1: | |
1155 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("D0toKpi"); | |
1156 | pdg=421; | |
a4ef4383 | 1157 | if(fReadMC){ |
1158 | pdgdaughters =new Int_t[2]; | |
1159 | pdgdaughters[0]=211;//pi | |
1160 | pdgdaughters[1]=321;//K | |
1161 | } | |
0dbb51a0 | 1162 | break; |
1163 | case 2: | |
1164 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Dstar"); | |
1165 | pdg=413; | |
a4ef4383 | 1166 | if(fReadMC){ |
24bcb2f3 | 1167 | pdgdaughters =new Int_t[3]; |
a4ef4383 | 1168 | pdgdaughters[1]=211;//pi |
1169 | pdgdaughters[0]=321;//K | |
1170 | pdgdaughters[2]=211;//pi (soft?) | |
1171 | } | |
0dbb51a0 | 1172 | break; |
1173 | case 3: | |
1174 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1175 | pdg=431; | |
a4ef4383 | 1176 | if(fReadMC){ |
1177 | pdgdaughters =new Int_t[3]; | |
1178 | pdgdaughters[0]=321;//K | |
1179 | pdgdaughters[1]=321;//K | |
1180 | pdgdaughters[2]=211;//pi | |
1181 | } | |
0dbb51a0 | 1182 | break; |
1183 | case 4: | |
1184 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm4Prong"); | |
1185 | pdg=421; | |
a4ef4383 | 1186 | if(fReadMC){ |
1187 | pdgdaughters =new Int_t[4]; | |
1188 | pdgdaughters[0]=321; | |
1189 | pdgdaughters[1]=211; | |
1190 | pdgdaughters[2]=211; | |
1191 | pdgdaughters[3]=211; | |
1192 | } | |
0dbb51a0 | 1193 | break; |
1194 | case 5: | |
1195 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); | |
1196 | pdg=4122; | |
a4ef4383 | 1197 | if(fReadMC){ |
1198 | pdgdaughters =new Int_t[3]; | |
1199 | pdgdaughters[0]=2212;//p | |
1200 | pdgdaughters[1]=321;//K | |
1201 | pdgdaughters[2]=211;//pi | |
1202 | } | |
0dbb51a0 | 1203 | break; |
ca688a98 | 1204 | case kLambdactoV0: |
e7af8919 | 1205 | arrayProng=(TClonesArray*)aod->GetList()->FindObject("CascadesHF"); |
ca688a98 | 1206 | pdg=4122; |
1207 | if(fReadMC){ | |
1208 | pdgdaughters =new Int_t[3]; | |
1209 | pdgdaughters[0]=2212;//p | |
1210 | pdgdaughters[1]=211;//pi | |
1211 | pdgdaughters[2]=211;//pi | |
1212 | } | |
1213 | break; | |
0dbb51a0 | 1214 | } |
1215 | } | |
19222b31 | 1216 | Bool_t isSimpleMode=fSimpleMode; |
0dbb51a0 | 1217 | if(!arrayProng) { |
5c13a4db | 1218 | AliInfo("Branch not found! The output will contain only track related histograms\n"); |
0dbb51a0 | 1219 | isSimpleMode=kTRUE; |
9af24f46 | 1220 | fNEntries->Fill(2); |
0dbb51a0 | 1221 | } |
1222 | ||
a4ef4383 | 1223 | TClonesArray *mcArray = 0; |
1224 | AliAODMCHeader *mcHeader = 0; | |
1225 | ||
3655ecf2 | 1226 | if(!aod) { |
1227 | delete [] pdgdaughters; | |
1228 | return; | |
1229 | } | |
1230 | ||
a4ef4383 | 1231 | //check if MC |
1232 | if(fReadMC) { | |
1233 | // load MC particles | |
1234 | mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()); | |
1235 | if(!mcArray) { | |
1236 | printf("AliAnalysisTaskSEHFQA::UserExec: MC particles branch not found!\n"); | |
fb9311e8 | 1237 | delete [] pdgdaughters; |
a4ef4383 | 1238 | return; |
1239 | } | |
1240 | ||
1241 | // load MC header | |
1242 | mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName()); | |
1243 | if(!mcHeader) { | |
1244 | printf("AliAnalysisTaskSEHFQA::UserExec: MC header branch not found!\n"); | |
fb9311e8 | 1245 | delete [] pdgdaughters; |
a4ef4383 | 1246 | return; |
1247 | } | |
1248 | } | |
23dfe729 | 1249 | |
1250 | ||
1251 | UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
1252 | Double_t centrality=fCuts->GetCentrality(aod); | |
1253 | Double_t multiplicity=aod->GetHeader()->GetRefMultiplicity(); | |
17531bbd | 1254 | Int_t runNumber = aod->GetRunNumber(); |
5e67f11a | 1255 | TString trigClass=aod->GetFiredTriggerClasses(); |
138e0d89 | 1256 | Int_t nAODtracks=aod->GetNTracks(); |
1257 | Int_t nSelTracksTPCOnly=0; | |
1258 | Int_t nSelTracksTPCITS=0; | |
1259 | Int_t nSelTracksTPCITS1SPD=0; | |
1260 | ||
82376491 | 1261 | if(fReadMC) { |
1262 | if(aod->GetTriggerMask()==0 && | |
1263 | (runNumber>=195344 && runNumber<=195677)){ | |
1264 | AliDebug(3,"Event rejected because of null trigger mask"); | |
1265 | delete [] pdgdaughters; | |
1266 | return; | |
1267 | } | |
1268 | } | |
1269 | ||
138e0d89 | 1270 | for (Int_t k=0;k<nAODtracks;k++){ |
1271 | AliAODTrack* track=aod->GetTrack(k); | |
1272 | if(track->GetID()<0) continue; | |
1273 | Int_t nclsTot=0,nclsSPD=0; | |
1274 | for(Int_t l=0;l<6;l++) { | |
1275 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
1276 | nclsTot++; if(l<2) nclsSPD++; | |
1277 | } | |
1278 | } | |
1279 | UShort_t nTPCClus=track->GetTPCClusterMap().CountBits(); | |
1280 | if(TMath::Abs(track->Eta())<0.8 && nTPCClus>=70 && track->GetStatus()&AliESDtrack::kTPCrefit){ | |
1281 | if(track->TestFilterBit(1)) nSelTracksTPCOnly++; | |
1282 | if(track->GetStatus()&AliESDtrack::kITSrefit){ | |
1283 | nSelTracksTPCITS++; | |
1284 | if(nclsSPD>0) nSelTracksTPCITS1SPD++; | |
1285 | } | |
1286 | } | |
1287 | } | |
1288 | ||
d48d81b5 | 1289 | if(fOnOff[4]) { |
1290 | FillFlowObs(aod); | |
1291 | PostData(8,fOutputFlowObs); | |
1292 | } | |
1b765719 | 1293 | if(fOnOff[3]){ |
1294 | TH2F* hTrigC=(TH2F*)fOutputEvSelection->FindObject("hTrigCent"); | |
1295 | TH2F* hTrigM=(TH2F*)fOutputEvSelection->FindObject("hTrigMul"); | |
1296 | AliCounterCollection* trigCount=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter"); | |
17531bbd | 1297 | |
2a844546 | 1298 | hTrigC->Fill(-1.,centrality); |
1299 | hTrigM->Fill(-1.,multiplicity); | |
da3b34af | 1300 | trigCount->Count(Form("triggerType:All/Run:%d",runNumber)); |
5e67f11a | 1301 | if(evSelMask==0){ |
1302 | if(aod->GetEventType()!=7){ | |
1303 | trigCount->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber)); | |
1304 | }else if(trigClass.Contains("CMUP1")){ | |
1305 | trigCount->Count(Form("triggerType:NoPhysSelCMUP1/Run:%d",runNumber)); | |
1306 | }else if(trigClass.Contains("MUON")){ | |
1307 | trigCount->Count(Form("triggerType:NoPhysSelMUON/Run:%d",runNumber)); | |
1308 | }else if(trigClass.Contains("CPBI2_B1-B") || trigClass.Contains(" CPBI2WU_B1-B")){ | |
1309 | trigCount->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber)); | |
1310 | }else if(trigClass.Contains("CCENT") || trigClass.Contains("CVHN")){ | |
1311 | trigCount->Count(Form("triggerType:NoPhysSelCent/Run:%d",runNumber)); | |
1312 | }else if(trigClass.Contains("CSEMI") || trigClass.Contains("CVLN")){ | |
1313 | trigCount->Count(Form("triggerType:NoPhysSelSemiCent/Run:%d",runNumber)); | |
1314 | } | |
1315 | } | |
2a844546 | 1316 | if(evSelMask & AliVEvent::kAny){ |
1317 | hTrigC->Fill(0.,centrality); | |
1318 | hTrigM->Fill(0.,multiplicity); | |
1319 | trigCount->Count(Form("triggerType:Any/Run:%d",runNumber)); | |
1320 | } | |
1b765719 | 1321 | if(evSelMask & AliVEvent::kMB){ |
1322 | hTrigC->Fill(1.,centrality); | |
1323 | hTrigM->Fill(1.,multiplicity); | |
1324 | trigCount->Count(Form("triggerType:MB/Run:%d",runNumber)); | |
1325 | } | |
1326 | if(evSelMask & AliVEvent::kINT7){ | |
1327 | hTrigC->Fill(2.,centrality); | |
1328 | hTrigM->Fill(2.,multiplicity); | |
3dfe174d | 1329 | trigCount->Count(Form("triggerType:CINT7/Run:%d",runNumber)); |
1b765719 | 1330 | } |
1331 | if(evSelMask & AliVEvent::kCINT5){ | |
1332 | hTrigC->Fill(3.,centrality); | |
1333 | hTrigM->Fill(3.,multiplicity); | |
1334 | } | |
1335 | if(evSelMask & AliVEvent::kCentral){ | |
1336 | hTrigC->Fill(4.,centrality); | |
1337 | hTrigM->Fill(4.,multiplicity); | |
1338 | trigCount->Count(Form("triggerType:Cent/Run:%d",runNumber)); | |
1339 | } | |
1340 | if(evSelMask & AliVEvent::kSemiCentral){ | |
1341 | hTrigC->Fill(5.,centrality); | |
1342 | hTrigM->Fill(5.,multiplicity); | |
1343 | trigCount->Count(Form("triggerType:SemiCent/Run:%d",runNumber)); | |
1344 | } | |
1345 | if(evSelMask & (AliVEvent::kEMC1 | AliVEvent::kEMC7)){ | |
1346 | hTrigC->Fill(6.,centrality); | |
1347 | hTrigM->Fill(6.,multiplicity); | |
1348 | } | |
1349 | if(evSelMask & (AliVEvent::kEMCEJE | AliVEvent::kEMCEGA)){ | |
1350 | hTrigC->Fill(7.,centrality); | |
1351 | hTrigM->Fill(7.,multiplicity); | |
1352 | trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber)); | |
1353 | } | |
1354 | if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){ | |
1355 | hTrigC->Fill(8.,centrality); | |
1356 | hTrigM->Fill(8.,multiplicity); | |
5e67f11a | 1357 | trigCount->Count(Form("triggerType:MUON/Run:%d",runNumber)); |
1b765719 | 1358 | } |
1359 | if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){ | |
1360 | hTrigC->Fill(9.,centrality); | |
1361 | hTrigM->Fill(9.,multiplicity); | |
1362 | } | |
1b6b9a05 | 1363 | if(evSelMask & (AliVEvent::kTRD)){ |
1b765719 | 1364 | hTrigC->Fill(10.,centrality); |
1365 | hTrigM->Fill(10.,multiplicity); | |
1366 | } | |
1b6b9a05 | 1367 | if(evSelMask & (AliVEvent::kHighMult)){ |
1340a059 | 1368 | hTrigC->Fill(11.,centrality); |
1369 | hTrigM->Fill(11.,multiplicity); | |
1370 | } | |
1b6b9a05 | 1371 | if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){ |
1372 | hTrigC->Fill(12.,centrality); | |
1373 | hTrigM->Fill(12.,multiplicity); | |
1374 | } | |
23dfe729 | 1375 | } |
1376 | ||
1377 | ||
0dbb51a0 | 1378 | // fix for temporary bug in ESDfilter |
1379 | // the AODs with null vertex pointer didn't pass the PhysSel | |
3655ecf2 | 1380 | if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001) { |
1381 | delete [] pdgdaughters; | |
1382 | return; | |
1383 | } | |
0dbb51a0 | 1384 | |
1385 | // count event | |
1386 | fNEntries->Fill(0); | |
9af24f46 | 1387 | |
1388 | //count events with good vertex | |
1389 | // AOD primary vertex | |
1390 | AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex(); | |
824b448a | 1391 | |
1392 | Double_t pos[3],cov[6]; | |
1393 | vtx1->GetXYZ(pos); | |
1394 | vtx1->GetCovarianceMatrix(cov); | |
1395 | const AliESDVertex vESD(pos,cov,100.,100); | |
1396 | ||
9af24f46 | 1397 | TString primTitle = vtx1->GetTitle(); |
1398 | if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0) fNEntries->Fill(4); | |
1399 | ||
a3aa1279 | 1400 | // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD, C0SMH-B-NOPF-ALL |
5fc4893f | 1401 | //TString trigclass=aod->GetFiredTriggerClasses(); |
1402 | //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fNEntries->Fill(5); //tmp | |
a3aa1279 | 1403 | |
818c1271 | 1404 | |
23dfe729 | 1405 | |
1406 | ||
2a844546 | 1407 | Bool_t evSelbyCentrality=kTRUE,evSelected=kTRUE,evSelByVertex=kTRUE,evselByPileup=kTRUE,evSelByPS=kTRUE; |
1d654f7b | 1408 | |
7f241934 | 1409 | TH1F* hWhyEvRejected=0x0; |
1410 | if(fOnOff[3]){ | |
1411 | hWhyEvRejected=(TH1F*)fOutputEvSelection->FindObject("hWhyEvRejected"); | |
af7c067e | 1412 | if(hWhyEvRejected) hWhyEvRejected->Fill(-1); |
7f241934 | 1413 | } |
1d654f7b | 1414 | |
0dbb51a0 | 1415 | //select event |
1416 | if(!fCuts->IsEventSelected(aod)) { | |
82f89d0d | 1417 | evSelected=kFALSE; |
ba3a678d | 1418 | if(fCuts->IsEventRejectedDueToPileupSPD()) { |
af7c067e | 1419 | if(hWhyEvRejected) hWhyEvRejected->Fill(0); |
ba3a678d | 1420 | evselByPileup=kFALSE; |
1421 | }// rejected for pileup | |
1422 | if(fCuts->IsEventRejectedDueToCentrality()) { | |
af7c067e | 1423 | if(hWhyEvRejected) hWhyEvRejected->Fill(1); |
ba3a678d | 1424 | evSelbyCentrality=kFALSE; //rejected by centrality |
1d654f7b | 1425 | } |
439ce262 | 1426 | if(fCuts->IsEventRejectedDueToNotRecoVertex() || |
af7c067e | 1427 | fCuts->IsEventRejectedDueToVertexContributors()){ |
439ce262 | 1428 | evSelByVertex=kFALSE; |
af7c067e | 1429 | if(hWhyEvRejected) hWhyEvRejected->Fill(2); |
7f241934 | 1430 | } |
1431 | if(fCuts->IsEventRejectedDueToTrigger()){ | |
af7c067e | 1432 | if(hWhyEvRejected) hWhyEvRejected->Fill(3); |
ba3a678d | 1433 | } |
7f241934 | 1434 | if(fCuts->IsEventRejectedDueToZVertexOutsideFiducialRegion()) { |
af7c067e | 1435 | evSelByVertex=kFALSE; |
7f241934 | 1436 | if(fOnOff[3]) ((AliCounterCollection*)fOutputEvSelection->FindObject("evselection"))->Count(Form("evnonsel:zvtx/Run:%d",runNumber)); |
af7c067e | 1437 | if(hWhyEvRejected) hWhyEvRejected->Fill(4); |
439ce262 | 1438 | } |
ba3a678d | 1439 | if(fCuts->IsEventRejectedDuePhysicsSelection()) { |
1440 | evSelByPS=kFALSE; | |
af7c067e | 1441 | if(hWhyEvRejected) hWhyEvRejected->Fill(5); |
1d654f7b | 1442 | } |
0dbb51a0 | 1443 | } |
ba3a678d | 1444 | if(evSelected && fOnOff[3]){ |
23dfe729 | 1445 | TH2F* hTrigS=(TH2F*)fOutputEvSelection->FindObject("hTrigCentSel"); |
a626ae47 | 1446 | TH2F* hTrigSM=(TH2F*)fOutputEvSelection->FindObject("hTrigMulSel"); |
2a844546 | 1447 | hTrigS->Fill(-1.,centrality); |
a626ae47 | 1448 | hTrigSM->Fill(-1.,multiplicity); |
1449 | if(evSelMask & AliVEvent::kAny) { | |
1450 | hTrigS->Fill(0.,centrality); | |
1451 | hTrigSM->Fill(0.,multiplicity);} | |
1452 | if(evSelMask & AliVEvent::kMB) { | |
1453 | hTrigS->Fill(1.,centrality); | |
1454 | hTrigSM->Fill(1.,multiplicity);} | |
1455 | if(evSelMask & AliVEvent::kINT7){ | |
1456 | hTrigS->Fill(2.,centrality); | |
1457 | hTrigSM->Fill(2.,multiplicity);} | |
1458 | if(evSelMask & AliVEvent::kCINT5){ | |
1459 | hTrigS->Fill(3.,centrality); | |
1460 | hTrigSM->Fill(3.,multiplicity);} | |
1461 | if(evSelMask & AliVEvent::kCentral){ | |
1462 | hTrigS->Fill(4.,centrality); | |
1463 | hTrigSM->Fill(4.,multiplicity);} | |
1464 | if(evSelMask & AliVEvent::kSemiCentral){ | |
1465 | hTrigS->Fill(5.,centrality); | |
1466 | hTrigSM->Fill(5.,multiplicity);} | |
1467 | if(evSelMask & (AliVEvent::kEMC1 | AliVEvent::kEMC7)){ | |
1468 | hTrigS->Fill(6.,centrality); | |
1469 | hTrigSM->Fill(6.,multiplicity);} | |
1470 | if(evSelMask & (AliVEvent::kEMCEJE | AliVEvent::kEMCEGA)){ | |
1471 | hTrigS->Fill(7.,centrality); | |
1472 | hTrigSM->Fill(7.,multiplicity);} | |
1473 | if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){ | |
1474 | hTrigS->Fill(8.,centrality); | |
1475 | hTrigSM->Fill(8.,multiplicity);} | |
1476 | if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){ | |
1477 | hTrigS->Fill(9.,centrality); | |
1478 | hTrigSM->Fill(9.,multiplicity);} | |
1479 | if(evSelMask & (AliVEvent::kTRD)){ | |
1480 | hTrigS->Fill(10.,centrality); | |
1481 | hTrigSM->Fill(10.,multiplicity);} | |
1482 | if(evSelMask & (AliVEvent::kHighMult)){ | |
1483 | hTrigS->Fill(11.,centrality); | |
1484 | hTrigSM->Fill(11.,multiplicity);} | |
1485 | if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){ | |
1486 | hTrigS->Fill(12.,centrality); | |
1487 | hTrigSM->Fill(12.,multiplicity);} | |
23dfe729 | 1488 | } |
1489 | ||
2a844546 | 1490 | if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality |
5fc4893f | 1491 | if(fOnOff[2] && fCuts->GetUseCentrality()){ |
818c1271 | 1492 | |
ac0c2841 | 1493 | Float_t stdCentf=fCuts->GetCentrality(aod); |
1494 | Int_t stdCent = (Int_t)(stdCentf+0.5); | |
5fc4893f | 1495 | Float_t secondCentf =fCuts->GetCentrality(aod,fEstimator); |
1496 | Int_t secondCent = (Int_t)(secondCentf+0.5); | |
82f89d0d | 1497 | Int_t mincent=stdCent-stdCent%10; |
5ef9f7fb | 1498 | Float_t stdSignal = 0.; |
1499 | Float_t secondSignal = 0.; | |
b68a0f6a | 1500 | AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData(); |
5ef9f7fb | 1501 | AliAODZDC *zdcAOD = (AliAODZDC*)aod->GetZDCData(); |
1502 | const Double_t *towerZNASignal = zdcAOD->GetZNATowerEnergy(); | |
1503 | switch(fCuts->GetUseCentrality()) | |
1504 | { | |
1505 | case AliRDHFCuts::kCentV0M: | |
1506 | stdSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C(); | |
1507 | break; | |
1508 | case AliRDHFCuts::kCentV0A: | |
1509 | stdSignal = vzeroAOD->GetMTotV0A(); | |
1510 | break; | |
1511 | case AliRDHFCuts::kCentZNA: | |
1512 | stdSignal = towerZNASignal[0]; | |
1513 | break; | |
1514 | default: | |
1515 | stdSignal = 0.; | |
1516 | break; | |
1517 | } | |
1518 | switch(fEstimator) | |
1519 | { | |
1520 | case AliRDHFCuts::kCentV0M: | |
1521 | secondSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C(); | |
1522 | break; | |
1523 | case AliRDHFCuts::kCentV0A: | |
1524 | secondSignal = vzeroAOD->GetMTotV0A(); | |
1525 | break; | |
1526 | case AliRDHFCuts::kCentZNA: | |
1527 | secondSignal = towerZNASignal[0]; | |
1528 | break; | |
1529 | default: | |
1530 | secondSignal = 0.; | |
1531 | break; | |
1532 | } | |
1533 | //AliCentrality *aodcent = aod->GetCentrality(); | |
1534 | // Float_t spdCentf = aodcent->GetCentralityPercentile("CL1"); | |
5fc4893f | 1535 | if(stdCentf==-1) { |
5ef9f7fb | 1536 | mincent=-10; |
1537 | stdCent=-1; | |
5fc4893f | 1538 | } |
c40c91c6 | 1539 | if(mincent==100)mincent--; |
82f89d0d | 1540 | ((AliCounterCollection*)fOutputCounters->FindObject("stdEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber)); |
5fc4893f | 1541 | |
82f89d0d | 1542 | mincent=secondCent-secondCent%10; |
5fc4893f | 1543 | if(secondCentf==-1) { |
5587ae1a | 1544 | mincent=-10; |
5fc4893f | 1545 | secondCent=-1; |
1546 | } | |
c40c91c6 | 1547 | if(mincent==100)mincent--; |
82f89d0d | 1548 | ((AliCounterCollection*)fOutputCounters->FindObject("secondEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber)); |
1549 | ||
1550 | if(stdCent<fCuts->GetMinCentrality() || stdCent>fCuts->GetMaxCentrality()){ | |
1551 | ((TH1F*)fOutputCheckCentrality->FindObject("hNtrackletsOut"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1552 | ((TH1F*)fOutputCheckCentrality->FindObject("hMultOut"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1553 | }else{ | |
1554 | ((TH1F*)fOutputCheckCentrality->FindObject("hNtrackletsIn"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1555 | ((TH1F*)fOutputCheckCentrality->FindObject("hMultIn"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1556 | } | |
ac0c2841 | 1557 | ((TH2F*)fOutputCheckCentrality->FindObject("hMultvsPercentile"))->Fill(aod->GetHeader()->GetRefMultiplicity(),stdCentf); |
7a5f2502 | 1558 | ((TH2F*)fOutputCheckCentrality->FindObject("hntrklvsPercentile"))->Fill(aod->GetTracklets()->GetNumberOfTracklets(),stdCentf); |
138e0d89 | 1559 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCTracksvsPercentile"))->Fill(nSelTracksTPCOnly,stdCentf); |
1560 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCITSTracksvsPercentile"))->Fill(nSelTracksTPCITS,stdCentf); | |
1561 | ((TH2F*)fOutputCheckCentrality->FindObject("hnTPCITS1SPDTracksvsPercentile"))->Fill(nSelTracksTPCITS1SPD,stdCentf); | |
5ef9f7fb | 1562 | ((TH2F*)fOutputCheckCentrality->FindObject("hStdEstimSignalPercentile"))->Fill(stdSignal,stdCentf); |
1563 | ((TH2F*)fOutputCheckCentrality->FindObject("hStdEstimSignalNtrackletsIn"))->Fill(stdSignal,aod->GetTracklets()->GetNumberOfTracklets()); | |
1564 | ((TH2F*)fOutputCheckCentrality->FindObject("hStdPercentileSecondPercentile"))->Fill(stdCentf,secondCentf); | |
1565 | ((TH2F*)fOutputCheckCentrality->FindObject("hStdSignalSecondSignal"))->Fill(stdSignal,secondSignal); | |
0dbb51a0 | 1566 | |
82f89d0d | 1567 | PostData(6,fOutputCheckCentrality); |
1568 | ||
1569 | } else{ | |
5fc4893f | 1570 | if(fOnOff[0]){ |
1571 | ((TH1F*)fOutputTrack->FindObject("hNtracklets"))->Fill(aod->GetTracklets()->GetNumberOfTracklets()); | |
1572 | ((TH1F*)fOutputTrack->FindObject("hMult"))->Fill(aod->GetHeader()->GetRefMultiplicity()); | |
1573 | } | |
a4ef4383 | 1574 | } |
82f89d0d | 1575 | } |
1576 | ||
818c1271 | 1577 | if(fOnOff[3]){ |
1578 | const AliVVertex *vertex = aod->GetPrimaryVertex(); | |
6c66ddad | 1579 | Double_t xvtx=vertex->GetX(); |
1580 | Double_t yvtx=vertex->GetY(); | |
818c1271 | 1581 | Double_t zvtx=vertex->GetZ(); |
6c66ddad | 1582 | Int_t vtxTyp=0; |
1583 | if(vertex->GetNContributors()<=0) vtxTyp=-1; | |
1584 | TString title=vertex->GetTitle(); | |
401afa7c | 1585 | if(title.Contains("Z")) vtxTyp=2; |
1586 | if(title.Contains("3D")) vtxTyp=1; | |
6c66ddad | 1587 | ((TH1F*)fOutputEvSelection->FindObject("hxvtx"))->Fill(xvtx); |
1588 | ((TH1F*)fOutputEvSelection->FindObject("hyvtx"))->Fill(yvtx); | |
818c1271 | 1589 | ((TH1F*)fOutputEvSelection->FindObject("hzvtx"))->Fill(zvtx); |
6c66ddad | 1590 | ((TH1F*)fOutputEvSelection->FindObject("hWhichVert"))->Fill(vtxTyp); |
1591 | if(evSelected){ | |
1592 | ((TH1F*)fOutputEvSelection->FindObject("hxvtxSelEv"))->Fill(xvtx); | |
1593 | ((TH1F*)fOutputEvSelection->FindObject("hyvtxSelEv"))->Fill(yvtx); | |
1594 | ((TH1F*)fOutputEvSelection->FindObject("hzvtxSelEv"))->Fill(zvtx); | |
1595 | ((TH1F*)fOutputEvSelection->FindObject("hWhichVertSelEv"))->Fill(vtxTyp); | |
1596 | } | |
818c1271 | 1597 | } |
1598 | ||
82f89d0d | 1599 | if(!evSelected) { |
1600 | delete [] pdgdaughters; | |
1601 | return; //discard all events not selected (vtx and/or centrality) | |
a4ef4383 | 1602 | } |
1603 | ||
818c1271 | 1604 | |
476db98d | 1605 | AliAODPidHF* pidHF=fCuts->GetPidHF(); |
362242bf | 1606 | if(!pidHF) { |
1607 | delete [] pdgdaughters; | |
1608 | return; | |
1609 | } | |
5c13a4db | 1610 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
1611 | AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler(); | |
1612 | AliPIDResponse *pidResp=inputHandler->GetPIDResponse(); | |
1613 | ||
4940d5bf | 1614 | //AliPIDResponse* respF=pidHF->GetPidResponse(); |
476db98d | 1615 | AliTPCPIDResponse* tpcres=new AliTPCPIDResponse(); |
4940d5bf | 1616 | Bool_t oldPID=pidHF->GetOldPid(); |
1617 | if(oldPID){ | |
70e398d3 | 1618 | Double_t alephParameters[5]; |
1619 | pidHF->GetTPCBetheBlochParams(alephParameters); | |
1620 | tpcres->SetBetheBlochParameters(alephParameters[0],alephParameters[1],alephParameters[2],alephParameters[3],alephParameters[4]); | |
1621 | } | |
476db98d | 1622 | |
1623 | ||
0dbb51a0 | 1624 | Int_t ntracks=0; |
824b448a | 1625 | Int_t isGoodTrack=0, isFakeTrack=0, isSelTrack=0; |
0dbb51a0 | 1626 | |
1627 | if(aod) ntracks=aod->GetNTracks(); | |
1628 | ||
5fc4893f | 1629 | if(fOnOff[0] || fOnOff[1]){ |
1630 | //loop on tracks in the event | |
1631 | for (Int_t k=0;k<ntracks;k++){ | |
1632 | AliAODTrack* track=aod->GetTrack(k); | |
5c13a4db | 1633 | |
1634 | // Track selection cuts | |
138e0d89 | 1635 | if(track->GetID()<0) continue; |
ba3a678d | 1636 | Double_t d0z0[2],covd0z0[3]; |
fc155e53 | 1637 | if(!track->PropagateToDCA(vtx1,aod->GetMagneticField(),99999.,d0z0,covd0z0)) continue; |
ba3a678d | 1638 | if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){ |
1639 | ((TH1F*)fOutputTrack->FindObject("hd0TracksFilterBit4"))->Fill(d0z0[0]); | |
1640 | } | |
5c13a4db | 1641 | ULong_t trStatus=track->GetStatus(); |
ba3a678d | 1642 | if(trStatus&AliESDtrack::kITSrefit){ |
1643 | if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){ | |
1644 | ((TH1F*)fOutputTrack->FindObject("hd0TracksSPDany"))->Fill(d0z0[0]); | |
1645 | if(track->HasPointOnITSLayer(0)){ | |
1646 | ((TH1F*)fOutputTrack->FindObject("hd0TracksSPDin"))->Fill(d0z0[0]); | |
1647 | } | |
1648 | } | |
1649 | } | |
1650 | ||
1651 | Bool_t selTrack=kTRUE; | |
1652 | if (!((trStatus & AliVTrack::kTPCrefit) == AliVTrack::kTPCrefit) || | |
5c13a4db | 1653 | !((trStatus & AliVTrack::kITSrefit) == AliVTrack::kITSrefit)){ |
1654 | selTrack=kFALSE; | |
1655 | } | |
ba3a678d | 1656 | |
5c13a4db | 1657 | Float_t nCrossedRowsTPC = track->GetTPCClusterInfo(2,1); |
1658 | Float_t ratioCrossedRowsOverFindableClustersTPC = 1.0; | |
1659 | if (track->GetTPCNclsF()>0) { | |
1660 | ratioCrossedRowsOverFindableClustersTPC = nCrossedRowsTPC/track->GetTPCNclsF(); | |
1661 | } | |
1662 | if ( nCrossedRowsTPC<70 || ratioCrossedRowsOverFindableClustersTPC<.8 ){ | |
1663 | selTrack=kFALSE; | |
1664 | } | |
ba3a678d | 1665 | if(selTrack){ |
1666 | if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){ | |
1667 | ((TH1F*)fOutputTrack->FindObject("hd0TracksTPCITSSPDany"))->Fill(d0z0[0]); | |
1668 | } | |
1669 | } | |
5230fd6a | 1670 | |
5fc4893f | 1671 | AliAODPid *pid = track->GetDetPid(); |
138e0d89 | 1672 | if(!pid && fDebug>1) cout<<"No AliAODPid found"<<endl; |
5fc4893f | 1673 | |
138e0d89 | 1674 | if(pid && fOnOff[1]){ |
5fc4893f | 1675 | Double_t times[AliPID::kSPECIES]; |
1676 | pid->GetIntegratedTimes(times); | |
0dbb51a0 | 1677 | |
5fc4893f | 1678 | Double_t tofRes[AliPID::kSPECIES]; |
1679 | pid->GetTOFpidResolution(tofRes); | |
1680 | ||
1681 | //check TOF | |
b906dda8 | 1682 | TH1F* htmpfl=((TH1F*)fOutputPID->FindObject("hTOFflags")); |
1683 | htmpfl->Fill(0.); | |
5c13a4db | 1684 | if (trStatus&AliESDtrack::kTPCout) htmpfl->Fill(1.); |
1685 | if (trStatus&AliESDtrack::kTOFout) htmpfl->Fill(2.); | |
1686 | if (trStatus&AliESDtrack::kTIME) htmpfl->Fill(3.); | |
1687 | if (trStatus&AliESDtrack::kTOFpid) htmpfl->Fill(4.); | |
1688 | if (trStatus&AliESDtrack::kTOFmismatch) htmpfl->Fill(5.); | |
1689 | ||
1690 | Bool_t isTOFok=kFALSE; | |
1691 | if(pidResp){ | |
1692 | Double_t prob[AliPID::kSPECIES]; | |
1693 | if(pidResp->ComputeTOFProbability(track,AliPID::kSPECIES,prob)==AliPIDResponse::kDetPidOk){ | |
1694 | isTOFok=kTRUE; | |
1695 | htmpfl->Fill(6.); | |
1696 | } | |
1697 | } | |
ba3a678d | 1698 | |
5c13a4db | 1699 | if(selTrack && isTOFok){ |
20baad42 | 1700 | Double_t tofTime=pid->GetTOFsignal(); |
1701 | AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader(); | |
1702 | if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD | |
1703 | // with new AOD we need to retrieve startTime, subtract it and retrieve correctly TOF PID resolutions *PA* | |
5c13a4db | 1704 | AliTOFPIDResponse tofResp=pidResp->GetTOFResponse(); |
20baad42 | 1705 | Double_t startTime = tofResp.GetStartTime(track->P()); |
1706 | Float_t startTimeRes = tofResp.GetStartTimeRes(track->P()); | |
1707 | Int_t startTimeMask = tofResp.GetStartTimeMask(track->P()); | |
5c13a4db | 1708 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeDistrib"))->Fill(startTime); |
20baad42 | 1709 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeMask"))->Fill(startTimeMask); |
1710 | ((TH1F*)fOutputPID->FindObject("hTOFstartTimeRes"))->Fill(startTimeRes); | |
1711 | tofTime-=startTime; | |
ea6f40e6 | 1712 | for (Int_t type=0;type<AliPID::kSPECIES;type++) tofRes[type]=tofResp.GetExpectedSigma(track->P(),times[type],AliPID::ParticleMassZ(type)); |
20baad42 | 1713 | } |
5fc4893f | 1714 | ((TH1F*)fOutputPID->FindObject("hTOFtime"))->Fill(times[AliPID::kProton]); |
20baad42 | 1715 | ((TH2F*)fOutputPID->FindObject("hTOFtimeKaonHyptime"))->Fill(track->P(),tofTime-times[3]); //3 is kaon |
1716 | ((TH1F*)fOutputPID->FindObject("hTOFsig"))->Fill(tofTime); | |
5fc4893f | 1717 | if (pid->GetTOFsignal()< 0) ((TH1F*)fOutputPID->FindObject("hTOFsig"))->Fill(-1); |
1718 | ||
4940d5bf | 1719 | Double_t nsigma[3]={-10,-10,-10}; |
5c13a4db | 1720 | nsigma[0]=pidResp->NumberOfSigmasTOF(track,AliPID::kPion); |
1721 | nsigma[1]=pidResp->NumberOfSigmasTOF(track,AliPID::kKaon); | |
1722 | nsigma[2]=pidResp->NumberOfSigmasTOF(track,AliPID::kProton); | |
4940d5bf | 1723 | |
1724 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaKSigPid"))->Fill(track->P(),nsigma[1]); | |
1725 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaPionSigPid"))->Fill(track->P(),nsigma[0]); | |
1726 | ((TH2F*)fOutputPID->FindObject("hTOFsigmaProtonSigPid"))->Fill(track->P(),nsigma[2]); | |
1727 | if(fReadMC){ | |
1728 | Int_t label=track->GetLabel(); | |
1729 | if(label<=0) continue; | |
1730 | AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label); | |
1731 | if(mcpart){ | |
1732 | Int_t abspdgcode=TMath::Abs(mcpart->PdgCode()); | |
1733 | if(abspdgcode==211) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCPionSigPid"))->Fill(track->P(),nsigma[0]); | |
1734 | if(abspdgcode==321) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCKSigPid"))->Fill(track->P(),nsigma[1]); | |
1735 | if(abspdgcode==2212) ((TH2F*)fOutputPID->FindObject("hTOFsigmaMCProtonSigPid"))->Fill(track->P(),nsigma[2]); | |
24748c57 | 1736 | |
24748c57 | 1737 | } |
4940d5bf | 1738 | } |
24748c57 | 1739 | |
4940d5bf | 1740 | for (Int_t iS=2; iS<5; iS++){ //we plot TOF Pid resolution for 3-sigma identified particles |
1741 | if ( TMath::Abs(nsigma[iS-2])<3.){ | |
1742 | switch (iS) { | |
1743 | case AliPID::kPion: | |
1744 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigPion"))->Fill(tofRes[iS]); | |
1745 | break; | |
1746 | case AliPID::kKaon: | |
1747 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigKaon"))->Fill(tofRes[iS]); | |
1748 | break; | |
1749 | case AliPID::kProton: | |
1750 | ((TH1F*)fOutputPID->FindObject("hTOFsigPid3sigProton"))->Fill(tofRes[iS]); | |
1751 | break; | |
1752 | default: | |
1753 | break; | |
5fc4893f | 1754 | } |
a4ef4383 | 1755 | } |
1756 | } | |
5fc4893f | 1757 | }//if TOF status |
4940d5bf | 1758 | //} |
ba3a678d | 1759 | |
5fc4893f | 1760 | if(pidHF && pidHF->CheckStatus(track,"TPC")){ |
476db98d | 1761 | |
5fc4893f | 1762 | Double_t TPCp=pid->GetTPCmomentum(); |
1763 | Double_t TPCsignal=pid->GetTPCsignal(); | |
84a4c5bc | 1764 | UShort_t TPCsignalN=pid->GetTPCsignalN(); |
5fc4893f | 1765 | ((TH1F*)fOutputPID->FindObject("hTPCsig"))->Fill(TPCsignal); |
1766 | ((TH1F*)fOutputPID->FindObject("hTPCsigvsp"))->Fill(TPCp,TPCsignal); | |
1767 | //if (pidHF->IsKaonRaw(track, "TOF")) | |
4940d5bf | 1768 | Double_t nsigma[3]={-10,-10,-10}; |
1769 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kPion,nsigma[0]); | |
1770 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kKaon,nsigma[1]); | |
1771 | pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kProton,nsigma[2]); | |
24748c57 | 1772 | |
4940d5bf | 1773 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaK"))->Fill(TPCp,nsigma[1]); |
1774 | ||
1775 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaPion"))->Fill(TPCp,nsigma[0]); | |
1776 | ((TH2F*)fOutputPID->FindObject("hTPCsigmaProton"))->Fill(TPCp,nsigma[2]); | |
1777 | ||
24748c57 | 1778 | if(fReadMC){ |
1779 | Int_t label=track->GetLabel(); | |
1780 | if(label<=0) continue; | |
1781 | AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label); | |
1782 | if(mcpart){ | |
1783 | Int_t abspdgcode=TMath::Abs(mcpart->PdgCode()); | |
1784 | if(abspdgcode==211) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCPion"))->Fill(track->P(),nsigma[0]); | |
1785 | if(abspdgcode==321) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCK"))->Fill(track->P(),nsigma[1]); | |
1786 | if(abspdgcode==2212) ((TH2F*)fOutputPID->FindObject("hTPCsigmaMCProton"))->Fill(track->P(),nsigma[2]); | |
1787 | ||
1788 | } | |
1789 | ||
1790 | } | |
84a4c5bc | 1791 | if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){ |
1792 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPtAllTracks"))->Fill(track->Pt(),(Float_t)TPCsignalN); | |
1793 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPhiAllTracks"))->Fill(track->Phi(),(Float_t)TPCsignalN); | |
1794 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsEtaAllTracks"))->Fill(track->Eta(),(Float_t)TPCsignalN); | |
1795 | } | |
1796 | ||
5fc4893f | 1797 | }//if TPC status |
1798 | } //end PID histograms | |
84a4c5bc | 1799 | |
5fc4893f | 1800 | Int_t nclsTot=0,nclsSPD=0; |
1801 | ||
1802 | //check clusters of the tracks | |
1803 | if(fOnOff[0]){ | |
1804 | ||
bc6846db | 1805 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(-1); |
5fc4893f | 1806 | for(Int_t l=0;l<6;l++) { |
1807 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
bc6846db | 1808 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(l); |
5fc4893f | 1809 | nclsTot++; if(l<2) nclsSPD++; |
1810 | } | |
1811 | } | |
1812 | ((TH1F*)fOutputTrack->FindObject("hnClsITS"))->Fill(nclsTot); | |
1813 | ((TH1F*)fOutputTrack->FindObject("hnClsSPD"))->Fill(nclsSPD); | |
84a4c5bc | 1814 | |
1815 | if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){ | |
8e4c6c96 | 1816 | |
1817 | ((TH1F*)fOutputTrack->FindObject("hPtAllTracks"))->Fill(track->Pt()); | |
1818 | ((TH1F*)fOutputTrack->FindObject("hPhiAllTracks"))->Fill(track->Phi()); | |
1819 | ((TH1F*)fOutputTrack->FindObject("hEtaAllTracks"))->Fill(track->Eta()); | |
1820 | ((TH2F*)fOutputTrack->FindObject("hEtavsPhiAllTracks"))->Fill(track->Phi(),track->Eta()); | |
1821 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPtAllTracks"))->Fill(track->Pt(),track->GetTPCNcls()); | |
1822 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPhiAllTracks"))->Fill(track->Phi(),track->GetTPCNcls()); | |
1823 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsEtaAllTracks"))->Fill(track->Eta(),track->GetTPCNcls()); | |
7d690084 | 1824 | |
1825 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPtAllTracks"))->Fill(track->Pt(),nCrossedRowsTPC); | |
1826 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPhiAllTracks"))->Fill(track->Phi(),nCrossedRowsTPC); | |
1827 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsEtaAllTracks"))->Fill(track->Eta(),nCrossedRowsTPC); | |
1828 | ||
8e4c6c96 | 1829 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPtAllTracks"))->Fill(track->Pt(),ratioCrossedRowsOverFindableClustersTPC); |
1830 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPhiAllTracks"))->Fill(track->Phi(),ratioCrossedRowsOverFindableClustersTPC); | |
1831 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsEtaAllTracks"))->Fill(track->Eta(),ratioCrossedRowsOverFindableClustersTPC); | |
84a4c5bc | 1832 | |
8e4c6c96 | 1833 | if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points |
1834 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(0); | |
1835 | } | |
1836 | if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst | |
1837 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(1); | |
1838 | } | |
1839 | if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond | |
1840 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(2); | |
1841 | } | |
1842 | if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth | |
1843 | ((TH1I*)fOutputTrack->FindObject("hSPDclsAllTracks"))->Fill(3); | |
1844 | } | |
1845 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPtAllTracks"))->Fill(track->Pt(), nclsTot); | |
1846 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPhiAllTracks"))->Fill(track->Phi(), nclsTot); | |
1847 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsEtaAllTracks"))->Fill(track->Eta(), nclsTot); | |
1848 | ||
84a4c5bc | 1849 | } |
1850 | ||
39dd297f | 1851 | if(track->Pt()>0.3 && |
1852 | TMath::Abs(track->Eta())<0.8 && | |
1853 | track->GetStatus()&AliESDtrack::kITSrefit && | |
1854 | track->GetStatus()&AliESDtrack::kTPCrefit && | |
1855 | nclsSPD>0){ | |
1856 | ((TH1F*)fOutputTrack->FindObject("hnClsITSselTr"))->Fill(nclsTot); | |
1857 | } | |
5fc4893f | 1858 | if(!(track->GetStatus()&AliESDtrack::kTPCin) && track->GetStatus()&AliESDtrack::kITSrefit && !(track->GetStatus()&AliESDtrack::kITSpureSA)){//tracks retrieved in the ITS and not reconstructed in the TPC |
1859 | ((TH1F*)fOutputTrack->FindObject("hnClsITS-SA"))->Fill(nclsTot); | |
bc6846db | 1860 | ((TH1F*)fOutputTrack->FindObject("hnLayerITS"))->Fill(-1); |
1861 | for(Int_t l=0;l<6;l++) { | |
1862 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
1863 | ((TH1F*)fOutputTrack->FindObject("hnLayerITSsa"))->Fill(l); | |
1864 | } | |
1865 | } | |
acc33385 | 1866 | } |
5fc4893f | 1867 | Int_t label=0; |
1868 | if(fReadMC){ | |
1869 | label=track->GetLabel(); | |
1870 | if (label<0)fNEntries->Fill(8); | |
1871 | else fNEntries->Fill(9); | |
acc33385 | 1872 | } |
0dbb51a0 | 1873 | |
5fc4893f | 1874 | |
824b448a | 1875 | if (track->Pt()>0.3 && |
1876 | track->GetStatus()&AliESDtrack::kTPCrefit && | |
1877 | track->GetStatus()&AliESDtrack::kITSrefit && | |
1878 | /*nclsTot>3 &&*/ | |
1879 | nclsSPD>0) {//count good tracks | |
5fc4893f | 1880 | |
ba3a678d | 1881 | |
824b448a | 1882 | if(fReadMC && label<0) { |
1883 | ((TH1F*)fOutputTrack->FindObject("hptFakeTr"))->Fill(track->Pt()); | |
1884 | isFakeTrack++; | |
1885 | } else { | |
1886 | ((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt()); | |
1887 | isGoodTrack++; | |
ad42e35b | 1888 | } |
fc155e53 | 1889 | |
1890 | if(fCuts->IsDaughterSelected(track,&vESD,fCuts->GetTrackCuts())){ | |
1891 | isSelTrack++; | |
1892 | }//select tracks for our analyses | |
1893 | ||
824b448a | 1894 | } |
818c1271 | 1895 | } //fill track histos |
5fc4893f | 1896 | } //end loop on tracks |
0dbb51a0 | 1897 | |
4940d5bf | 1898 | //fill once per event |
5fc4893f | 1899 | if(fOnOff[0]){ |
1900 | if (fReadMC) ((TH1F*)fOutputTrack->FindObject("hdistrFakeTr"))->Fill(isFakeTrack); | |
1901 | ((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack); | |
824b448a | 1902 | ((TH1F*)fOutputTrack->FindObject("hdistrSelTr"))->Fill(isSelTrack); |
5fc4893f | 1903 | } |
0dbb51a0 | 1904 | |
5fc4893f | 1905 | if(!isSimpleMode){ |
1906 | // loop over candidates | |
1907 | Int_t nCand = arrayProng->GetEntriesFast(); | |
1908 | Int_t ndaugh=3; | |
1909 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi) ndaugh=2; | |
1910 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpipipi) ndaugh=4; | |
1911 | ||
1912 | for (Int_t iCand = 0; iCand < nCand; iCand++) { | |
1913 | AliAODRecoDecayHF *d = (AliAODRecoDecayHF*)arrayProng->UncheckedAt(iCand); | |
19f6b9ff | 1914 | if(fUseSelectionBit && d->GetSelectionMap()) { |
5fc4893f | 1915 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi && !d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) continue; //skip the D0 from Dstar |
1916 | if(fDecayChannel==AliAnalysisTaskSEHFQA::kDplustoKpipi && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts)) continue; //skip the 3 prong !D+ | |
1917 | } | |
acc33385 | 1918 | |
5fc4893f | 1919 | if(fReadMC){ |
e7af8919 | 1920 | |
1921 | Int_t labD = -1; | |
1922 | if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) { | |
1923 | ||
4b4ca79e | 1924 | Int_t pdgDgLctoV0bachelor[2]={2212,310}; |
e7af8919 | 1925 | Int_t pdgDgV0toDaughters[2]={211,211}; |
4b4ca79e | 1926 | Int_t mcLabelK0S = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->K0S+p and cc |
1927 | pdgDgLctoV0bachelor[1]=3122, pdgDgLctoV0bachelor[0]=211; | |
e7af8919 | 1928 | pdgDgV0toDaughters[0]=2212, pdgDgV0toDaughters[1]=211; |
4b4ca79e | 1929 | Int_t mcLabelLambda = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->Lambda+pi and cc |
e7af8919 | 1930 | if (mcLabelK0S!=-1 || mcLabelLambda!=-1) AliInfo(Form("mcLabelK0S=%d - mcLabelLambda=%d",mcLabelK0S,mcLabelLambda)); |
1931 | ||
1932 | if (mcLabelK0S!=-1 && mcLabelLambda!=-1) | |
1933 | AliInfo("Strange: current Lc->V0+bachelor candidate has two MC different labels!"); | |
1934 | else if (mcLabelK0S>-1 && mcLabelLambda==-1) | |
1935 | labD = mcLabelK0S; | |
1936 | else if (mcLabelLambda>-1 && mcLabelK0S==-1) | |
1937 | labD = mcLabelLambda; | |
1938 | } | |
1939 | else | |
1940 | labD = d->MatchToMC(pdg,mcArray,ndaugh,pdgdaughters); | |
1941 | ||
5fc4893f | 1942 | if(labD>=0){ |
1943 | AliAODMCParticle *partD = (AliAODMCParticle*)mcArray->At(labD); | |
1944 | Int_t label=partD->GetMother(); | |
1945 | AliAODMCParticle *mot = (AliAODMCParticle*)mcArray->At(label); | |
1946 | while(label>=0){//get first mother | |
1947 | mot = (AliAODMCParticle*)mcArray->At(label); | |
1948 | label=mot->GetMother(); | |
1949 | } | |
24748c57 | 1950 | if(mot){ |
1951 | Int_t pdgMotCode = mot->GetPdgCode(); | |
5fc4893f | 1952 | |
24748c57 | 1953 | if(TMath::Abs(pdgMotCode)==4) fNEntries->Fill(6); //from primary charm |
1954 | if(TMath::Abs(pdgMotCode)==5) fNEntries->Fill(7); //from beauty | |
1955 | } | |
acc33385 | 1956 | } |
5fc4893f | 1957 | }//end MC |
1d654f7b | 1958 | fNEntries->Fill(5); //count the candidates (data and MC) |
5fc4893f | 1959 | |
1960 | for(Int_t id=0;id<ndaugh;id++){ | |
5fc4893f | 1961 | //other histograms to be filled when the cut object is given |
e7af8919 | 1962 | AliAODTrack* track=0; |
1963 | ||
1964 | if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) { | |
1965 | if (id==0) | |
1966 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->GetBachelor(); | |
1967 | else if (id==1) | |
1968 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0PositiveTrack(); | |
1969 | else if (id==2) | |
1970 | track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0NegativeTrack(); | |
1971 | } | |
1972 | else | |
1973 | track=(AliAODTrack*)d->GetDaughter(id); | |
5fc4893f | 1974 | |
1975 | //track quality | |
1976 | ||
1977 | if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kTracks,aod)) { | |
1978 | ||
1979 | Int_t label=0; | |
1980 | if(fReadMC)label=track->GetLabel(); | |
ad42e35b | 1981 | if(fOnOff[0]){ |
818c1271 | 1982 | |
ad42e35b | 1983 | if(fReadMC && label<0) { |
1984 | isFakeTrack++; | |
824b448a | 1985 | ((TH1F*)fOutputTrack->FindObject("hptFakeTrFromDaugh"))->Fill(track->Pt()); |
5fc4893f | 1986 | |
ad42e35b | 1987 | ((TH1F*)fOutputTrack->FindObject("hd0f"))->Fill(d->Getd0Prong(id)); |
1988 | } else { | |
824b448a | 1989 | ((TH1F*)fOutputTrack->FindObject("hptGoodTrFromDaugh"))->Fill(track->Pt()); |
ba3a678d | 1990 | ((TH1F*)fOutputTrack->FindObject("hd0dau"))->Fill(d->Getd0Prong(id)); |
4563d678 | 1991 | Double_t d0rphiz[2],covd0[3]; |
1992 | Bool_t isDCA=track->PropagateToDCA(aod->GetPrimaryVertex(),aod->GetMagneticField(),9999.,d0rphiz,covd0); | |
ba3a678d | 1993 | if(isDCA) ((TH1F*)fOutputTrack->FindObject("hd0zdau"))->Fill(d0rphiz[1]); |
ad42e35b | 1994 | } |
818c1271 | 1995 | } |
84a4c5bc | 1996 | |
1997 | ||
1998 | if(fFillDistrTrackEffChecks){ | |
1999 | Int_t nITScls = 0; | |
2000 | Double_t nTPCCrossedRows = track->GetTPCClusterInfo(2,1); | |
2001 | Double_t ratioCrossedRowsOverFcls = 1.0; | |
2002 | if(track->GetTPCNclsF()>0){ | |
2003 | ratioCrossedRowsOverFcls = (nTPCCrossedRows)/(track->GetTPCNclsF()); | |
2004 | } | |
2005 | for(Int_t l=0;l<6;l++) { | |
2006 | if(TESTBIT(track->GetITSClusterMap(),l)) { | |
2007 | nITScls++; | |
8e4c6c96 | 2008 | } |
84a4c5bc | 2009 | } |
8e4c6c96 | 2010 | |
84a4c5bc | 2011 | ((TH1F*)fOutputTrack->FindObject("hPtDaughters"))->Fill(track->Pt()); |
2012 | ((TH1F*)fOutputTrack->FindObject("hPhiDaughters"))->Fill(track->Phi()); | |
2013 | ((TH1F*)fOutputTrack->FindObject("hEtaDaughters"))->Fill(track->Eta()); | |
2014 | ((TH2F*)fOutputTrack->FindObject("hEtavsPhiDaughters"))->Fill(track->Phi(),track->Eta()); | |
2015 | ||
2016 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPtDaughters"))->Fill(track->Pt(),track->GetTPCNcls()); | |
2017 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsPhiDaughters"))->Fill(track->Phi(),track->GetTPCNcls()); | |
2018 | ((TH2F*)fOutputTrack->FindObject("hNTPCclsvsEtaDaughters"))->Fill(track->Eta(),track->GetTPCNcls()); | |
2019 | ||
2020 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPtDaughters"))->Fill(track->Pt(),nTPCCrossedRows); | |
2021 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsPhiDaughters"))->Fill(track->Phi(),nTPCCrossedRows); | |
2022 | ((TH2F*)fOutputTrack->FindObject("hNTPCCrossedRowsvsEtaDaughters"))->Fill(track->Eta(),nTPCCrossedRows); | |
2023 | ||
2024 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPtDaughters"))->Fill(track->Pt(),ratioCrossedRowsOverFcls); | |
2025 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsPhiDaughters"))->Fill(track->Phi(),ratioCrossedRowsOverFcls); | |
2026 | ((TH2F*)fOutputTrack->FindObject("hRatioCRowsOverFclsvsEtaDaughters"))->Fill(track->Eta(),ratioCrossedRowsOverFcls); | |
2027 | ||
2028 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPtDaughters"))->Fill(track->Pt(), nITScls); | |
2029 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsPhiDaughters"))->Fill(track->Phi(), nITScls); | |
2030 | ((TH2F*)fOutputTrack->FindObject("hNITSclsvsEtaDaughters"))->Fill(track->Eta(), nITScls); | |
2031 | if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points | |
2032 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(0); | |
2033 | } | |
2034 | if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst | |
2035 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(1); | |
2036 | } | |
2037 | if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond | |
2038 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(2); | |
2039 | } | |
2040 | if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth | |
2041 | ((TH1I*)fOutputTrack->FindObject("hSPDclsDaughters"))->Fill(3); | |
2042 | } | |
2043 | ||
2044 | ||
2045 | if(fOnOff[1]){ | |
2046 | AliAODPid *pid = track->GetDetPid(); | |
2047 | if(pid){ | |
2048 | if(pidHF && pidHF->CheckStatus(track,"TPC")){ | |
2049 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPtDaughters"))->Fill(track->Pt(),pid->GetTPCsignalN()); | |
2050 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsPhiDaughters"))->Fill(track->Phi(),pid->GetTPCsignalN()); | |
2051 | ((TH2F*)fOutputPID->FindObject("hTPCsigNvsEtaDaughters"))->Fill(track->Eta(),pid->GetTPCsignalN()); | |
2052 | } | |
8e4c6c96 | 2053 | } |
8e4c6c96 | 2054 | } |
84a4c5bc | 2055 | } |
2056 | ||
2057 | ||
2058 | if (fCuts->IsSelected(d,AliRDHFCuts::kAll,aod) && fOnOff[1]){ | |
2059 | fNEntries->Fill(3); //candidates passing analysis cuts | |
2060 | ||
5230fd6a | 2061 | AliAODPid *pid = track->GetDetPid(); |
138e0d89 | 2062 | if(pid){ |
2063 | Double_t times[5]; | |
2064 | pid->GetIntegratedTimes(times); | |
20baad42 | 2065 | if(pidHF && pidHF->CheckStatus(track,"TOF")){ |
2066 | Double_t tofTime=pid->GetTOFsignal(); | |
2067 | AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader(); | |
2068 | Double_t tofRes[AliPID::kSPECIES]; | |
2069 | pid->GetTOFpidResolution(tofRes); | |
2070 | if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD | |
2071 | AliTOFPIDResponse tofResp=pidHF->GetPidResponse()->GetTOFResponse(); | |
2072 | Double_t startTime=tofResp.GetStartTime(track->P()); | |
2073 | tofTime-=startTime; | |
2074 | } | |
2075 | ((TH2F*)fOutputPID->FindObject("hTOFtimeKaonHyptimeAC"))->Fill(track->P(),tofTime-times[AliPID::kKaon]); | |
2076 | } | |
138e0d89 | 2077 | if(pidHF && pidHF->CheckStatus(track,"TPC")) ((TH2F*)fOutputPID->FindObject("hTPCsigvspAC"))->Fill(pid->GetTPCmomentum(),pid->GetTPCsignal()); |
2078 | } | |
1d654f7b | 2079 | |
5fc4893f | 2080 | } //end analysis cuts |
2081 | } //end acceptance and track cuts | |
2082 | } //end loop on tracks in the candidate | |
2083 | } //end loop on candidates | |
824b448a | 2084 | |
5fc4893f | 2085 | } |
2086 | } //end if on pid or track histograms | |
fb9311e8 | 2087 | |
476db98d | 2088 | delete tpcres; |
fb9311e8 | 2089 | delete [] pdgdaughters; |
a4ef4383 | 2090 | PostData(1,fNEntries); |
5fc4893f | 2091 | if(fOnOff[1]) PostData(2,fOutputPID); |
2092 | if(fOnOff[0]) PostData(3,fOutputTrack); | |
a4ef4383 | 2093 | PostData(4,fCuts); |
5fc4893f | 2094 | if(fOnOff[2]) PostData(5,fOutputCounters); |
2095 | //Post data 6 done in case of centrality on | |
82f89d0d | 2096 | |
0dbb51a0 | 2097 | } |
2098 | ||
d48d81b5 | 2099 | //____________________________________________________________________________ |
2100 | void AliAnalysisTaskSEHFQA::FillFlowObs(AliAODEvent *aod){ | |
2101 | //fills the flow observables | |
65274ad6 | 2102 | Double_t cc; |
2103 | cc = fCuts->GetCentrality(aod); | |
2104 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(0., cc); | |
d48d81b5 | 2105 | |
2106 | UInt_t mask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
2107 | UInt_t trigger=AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral; | |
d48d81b5 | 2108 | if(mask & trigger) { |
65274ad6 | 2109 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(1.,cc); // fired |
2110 | if (mask & AliVEvent::kMB) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(2.,cc); | |
2111 | if (mask & AliVEvent::kCentral) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(3.,cc); | |
2112 | if (mask & AliVEvent::kSemiCentral) ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(4.,cc); | |
d48d81b5 | 2113 | Bool_t rejected=false; |
d48d81b5 | 2114 | if(cc<0 || cc>60) rejected=true; |
2115 | const AliVVertex *vertex = aod->GetPrimaryVertex(); | |
2116 | Double_t zvtx=vertex->GetZ(); | |
65274ad6 | 2117 | if(TMath::Abs(zvtx)>fCuts->GetMaxVtxZ()) rejected=true; |
d48d81b5 | 2118 | if(rejected) return; //not interesting for flow QA |
2119 | } else { | |
2120 | return; | |
2121 | } | |
2122 | ||
2123 | // event accepted | |
65274ad6 | 2124 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(5.,cc); |
d48d81b5 | 2125 | fRFPcuts->SetParamType(AliFlowTrackCuts::kGlobal); |
2126 | fRFPcuts->SetPtRange(0.2,5.); | |
2127 | fRFPcuts->SetEtaRange(-0.8,0.8); | |
2128 | fRFPcuts->SetMinNClustersTPC(70); | |
2129 | fRFPcuts->SetMinChi2PerClusterTPC(0.2); | |
2130 | fRFPcuts->SetMaxChi2PerClusterTPC(4.0); | |
2131 | fRFPcuts->SetAcceptKinkDaughters(kFALSE); | |
2132 | fRFPcuts->SetEvent(aod); | |
2133 | ||
2134 | TString ref[3] = {"FB1","FB128","VZE"}; | |
2135 | Double_t psi[3]; | |
2136 | for(Int_t i=0; i!=3; ++i) { | |
2137 | if(i==0) { // switching to bit 1 | |
2138 | fRFPcuts->SetMinimalTPCdedx(10.); | |
2139 | fRFPcuts->SetAODfilterBit(1); | |
2140 | } else { // switching to bit 128 | |
2141 | fRFPcuts->SetMinimalTPCdedx(-1); | |
2142 | fRFPcuts->SetAODfilterBit(128); | |
2143 | } | |
2144 | if(i>1) { | |
5f1661a2 | 2145 | fRFPcuts->SetParamType(AliFlowTrackCuts::kVZERO); |
d48d81b5 | 2146 | fRFPcuts->SetEtaRange(-5,+5); |
2147 | fRFPcuts->SetPhiMin(0); | |
2148 | fRFPcuts->SetPhiMax(TMath::TwoPi()); | |
2149 | } | |
2150 | fFlowEvent->Fill(fRFPcuts,fRFPcuts); | |
2151 | fFlowEvent->TagSubeventsInEta(-5,0,0,+5); | |
65274ad6 | 2152 | // getting informationt |
d48d81b5 | 2153 | AliFlowVector vQ, vQaQb[2]; |
2154 | fFlowEvent->Get2Qsub(vQaQb,2); | |
2155 | vQ = vQaQb[0]+vQaQb[1]; | |
2156 | Double_t dMa=vQaQb[0].GetMult(); | |
2157 | Double_t dMb=vQaQb[1].GetMult(); | |
2158 | if( dMa<2 || dMb<2 ) { | |
65274ad6 | 2159 | ((TH2F*) fOutputFlowObs->FindObject("hFlowEvents"))->Fill(6.,cc); //??? |
d48d81b5 | 2160 | continue; |
2161 | } | |
2162 | psi[i] = vQ.Phi()/2; | |
2163 | // publishing | |
2164 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(0,cc,vQaQb[0].X()/dMa,dMa); // Qx- | |
2165 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(1,cc,vQaQb[0].Y()/dMa,dMa); // Qy- | |
2166 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(2,cc,vQaQb[1].X()/dMb,dMb); // Qx+ | |
2167 | ((TProfile2D*) fOutputFlowObs->FindObject( Form("h%s_Q",ref[i].Data())))->Fill(3,cc,vQaQb[1].Y()/dMb,dMb); // Qy+ | |
2168 | ((TH2F*) fOutputFlowObs->FindObject( Form("h%s_AngleQ",ref[i].Data()) ))->Fill(psi[i],cc); // Psi | |
2169 | AliFlowTrackSimple *track; | |
2170 | for(Int_t t=0; t!=fFlowEvent->NumberOfTracks(); ++t) { | |
2171 | track = (AliFlowTrackSimple*) fFlowEvent->GetTrack(t); | |
2172 | if(!track) continue; | |
2173 | if(!track->InRPSelection()) continue; | |
2174 | ((TH3F*) fOutputFlowObs->FindObject( Form("h%s_PhiEta",ref[i].Data()) ))->Fill(track->Phi(),track->Eta(),cc,track->Weight()); //PhiEta | |
2175 | } | |
65274ad6 | 2176 | |
2177 | //histo filled only for TPCFB1 | |
2178 | if (i==0) { | |
2179 | ((TH2F*) fOutputFlowObs->FindObject("hCentVsMultRPS"))->Fill(fFlowEvent->GetNumberOfRPs(),cc); | |
2180 | } | |
d48d81b5 | 2181 | } |
2182 | // TPC vs VZERO | |
2183 | ((TH3F*) fOutputFlowObs->FindObject( "hTPCVZE_AngleQ" ))->Fill(psi[0],psi[2],cc); | |
2184 | } | |
2185 | ||
a4ef4383 | 2186 | //____________________________________________________________________________ |
0dbb51a0 | 2187 | void AliAnalysisTaskSEHFQA::Terminate(Option_t */*option*/){ |
2188 | //terminate analysis | |
2189 | ||
2190 | fNEntries = dynamic_cast<TH1F*>(GetOutputData(1)); | |
2191 | if(!fNEntries){ | |
2192 | printf("ERROR: %s not available\n",GetOutputSlot(1)->GetContainer()->GetName()); | |
2193 | return; | |
2194 | } | |
2195 | ||
2196 | fOutputPID = dynamic_cast<TList*> (GetOutputData(2)); | |
5fc4893f | 2197 | if (!fOutputPID && fOnOff[1]) { |
0dbb51a0 | 2198 | printf("ERROR: %s not available\n",GetOutputSlot(2)->GetContainer()->GetName()); |
2199 | return; | |
2200 | } | |
2201 | ||
2202 | fOutputTrack = dynamic_cast<TList*> (GetOutputData(3)); | |
5fc4893f | 2203 | if (!fOutputTrack && fOnOff[0]) { |
0dbb51a0 | 2204 | printf("ERROR: %s not available\n",GetOutputSlot(3)->GetContainer()->GetName()); |
2205 | return; | |
2206 | } | |
2207 | ||
2208 | } | |
2209 |