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