Corrected protection.
[u/mrichter/AliRoot.git] / STEER / AliGlobalQADataMaker.cxx
CommitLineData
c0af1be2 1/*
2 The class for calculating the global (not detector specific) quality assurance.
3 It reuses the following TLists from its base class
4 AliQADataMaker::fRecPointsQAList (for keeping the track residuals)
5 AliQADataMaker::fESDsQAList (for keeping global ESD QA data)
6*/
7
542c6c71 8#include <TPDGCode.h>
c0af1be2 9#include <TH1F.h>
2937b8ff 10#include <TH2F.h>
c0af1be2 11
f14c8c46 12#include "AliCDBPath.h"
13#include "AliCDBEntry.h"
14#include "AliCDBManager.h"
15#include "AliDetectorRecoParam.h"
fb774831 16#include "AliQAChecker.h"
c0af1be2 17#include "AliGlobalQADataMaker.h"
18#include "AliGeomManager.h"
d7259b2e 19#include "AliESDEvent.h"
542c6c71 20#include "AliESDv0.h"
fb774831 21#include "AliRawReader.h"
2937b8ff 22#include "AliESDVZERO.h"
23#include "AliMultiplicity.h"
c0af1be2 24
25ClassImp(AliGlobalQADataMaker)
26
fb774831 27//____________________________________________________________________________
4e25ac79 28void AliGlobalQADataMaker::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
fb774831 29{
30 //Detector specific actions at end of cycle
31 // do the QA checking
4e25ac79 32 AliQAChecker::Instance()->Run(AliQAv1::kGLOBAL, task, list) ;
fb774831 33}
34
35//____________________________________________________________________________
36void AliGlobalQADataMaker::InitRaws()
37{
38 // create Raws histograms in Raws subdir
39}
40
f14c8c46 41//____________________________________________________________________________
42void AliGlobalQADataMaker::InitRecoParams()
43{
44 // Get the recoparam form the OCDB
45 if (!fRecoParam) {
46 TString name("GRP") ;
47 AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", name.Data()));
48 AliCDBPath path(name.Data(),"Calib","RecoParam");
49 AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
50 if(!entry) {
51 fRecoParam = NULL ;
52 AliDebug(AliQAv1::GetQADebugLevel(), Form("Couldn't find RecoParam entry in OCDB for detector %s",name.Data()));
53 }
54 else {
55 TObject * recoParamObj = entry->GetObject() ;
56 if ( strcmp(recoParamObj->ClassName(), "TObjArray") == 0 ) {
57 // The detector has only one set of reco parameters
58 AliDebug(AliQAv1::GetQADebugLevel(), Form("Array of reconstruction parameters found for detector %s",name.Data()));
59 TObjArray *recoParamArray = static_cast<TObjArray*>(recoParamObj) ;
60 for (Int_t iRP=0; iRP<recoParamArray->GetEntriesFast(); iRP++) {
61 fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
62 if (!fRecoParam)
63 break ;
64 else if (fRecoParam->IsDefault())
65 break ;
66 }
67 }
68 else if (recoParamObj->InheritsFrom("AliDetectorRecoParam")) {
69 // The detector has only one set of reco parameters
70 // Registering it in AliRecoParam
71 AliDebug(AliQAv1::GetQADebugLevel(), Form("Single set of reconstruction parameters found for detector %s",name.Data()));
72 fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamObj) ;
73 static_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
74 } else {
75 AliError(Form("No valid RecoParam object found in the OCDB for detector %s",name.Data()));
76 }
77 }
78 }
79}
80
fb774831 81//____________________________________________________________________________
c0af1be2 82void AliGlobalQADataMaker::InitRecPoints() {
83 //------------------------------------------------------
d7259b2e 84 // This function books the histograms of *track*residuals*
c0af1be2 85 // as a part of global QA
86 //------------------------------------------------------
ebb9ea7c 87 static Bool_t first = kTRUE ;
88 if ( ! first )
89 return ;
a6e0ebfe 90 const Char_t *name[]={
dd1b15c4 91 "hGlobalSPD1ResidualsY","SPD1ResidualsZ",
92 "hGlobalSPD2ResidualsY","SPD2ResidualsZ",
93 "hGlobalSDD1ResidualsY","SDD1ResidualsZ",
94 "hGlobalSDD2ResidualsY","SDD2ResidualsZ",
95 "hGlobalSSD1ResidualsY","SSD1ResidualsZ",
96 "hGlobalSSD2ResidualsY","SSD2ResidualsZ",
97
98 "hGlobalTPC1ResidualsY","TPC1ResidualsZ",
99 "hGlobalTPC2ResidualsY","TPC2ResidualsZ",
100
101 "hGlobalTRD1ResidualsY","TRD1ResidualsZ",
102 "hGlobalTRD2ResidualsY","TRD2ResidualsZ",
103 "hGlobalTRD3ResidualsY","TRD3ResidualsZ",
104 "hGlobalTRD4ResidualsY","TRD4ResidualsZ",
105 "hGlobalTRD5ResidualsY","TRD5ResidualsZ",
106 "hGlobalTRD6ResidualsY","TRD6ResidualsZ",
107
108 "hGlobalTOFResidualsY","TOFResidualsZ",
109
110 "hGlobalPHOS1ResidualsY","PHOS1ResidualsZ",
111 "hGlobalPHOS2ResidualsY","PHOS2ResidualsZ",
112
113 "hGlobalHMPIDResidualsY","HMPIDResidualsZ",
114
115 "hGlobalMUONResidualsY","MUONResidualsZ",
116
117 "hGlobalEMCALResidualsY","EMCALResidualsZ"
118 };
119 const Char_t *title[]={
c0af1be2 120 "SPD1 residuals Y","SPD1 residuals Z",
121 "SPD2 residuals Y","SPD2 residuals Z",
122 "SDD1 residuals Y","SDD1 residuals Z",
123 "SDD2 residuals Y","SDD2 residuals Z",
124 "SSD1 residuals Y","SSD1 residuals Z",
125 "SSD2 residuals Y","SSD2 residuals Z",
dd1b15c4 126
c0af1be2 127 "TPC1 residuals Y","TPC1 residuals Z",
128 "TPC2 residuals Y","TPC2 residuals Z",
dd1b15c4 129
c0af1be2 130 "TRD1 residuals Y","TRD1 residuals Z",
131 "TRD2 residuals Y","TRD2 residuals Z",
132 "TRD3 residuals Y","TRD3 residuals Z",
133 "TRD4 residuals Y","TRD4 residuals Z",
134 "TRD5 residuals Y","TRD5 residuals Z",
135 "TRD6 residuals Y","TRD6 residuals Z",
dd1b15c4 136
c0af1be2 137 "TOF residuals Y","TOF residuals Z",
dd1b15c4 138
c0af1be2 139 "PHOS1 residuals Y","PHOS1 residuals Z",
140 "PHOS2 residuals Y","PHOS2 residuals Z",
dd1b15c4 141
c0af1be2 142 "HMPID residuals Y","HMPID residuals Z",
dd1b15c4 143
c0af1be2 144 "MUON residuals Y","MUON residuals Z",
dd1b15c4 145
c0af1be2 146 "EMCAL residuals Y","EMCAL residuals Z"
147 };
dd1b15c4 148
c0af1be2 149 for (Int_t m=1; m<AliGeomManager::kLastLayer; m++) {
150 Int_t i=2*m-2;
dd1b15c4 151 TH1F *h=new TH1F(name[i],title[i],100,-5.,5.);
c0af1be2 152 Add2RecPointsList(h,i);
dd1b15c4 153 h=new TH1F(name[i+1],title[i+1],100,-5.,5.);
c0af1be2 154 Add2RecPointsList(h,i+1);
155 }
a935c6c0 156
157 Add2RecPointsList(
dd1b15c4 158 new TH1F("hGlobalSSD1AbsoluteResidualsYNegZ",
159 "SSD1 Absolute Residuals Y Neg Z",100,-2.,2.),40);
49ab451d 160 Add2RecPointsList(
dd1b15c4 161 new TH1F("hGlobalSSD1AbsoluteResidualsZNegZ",
162 "SSD1 Absolute Residuals Z Neg Z",100,-2.,2.),41);
49ab451d 163 Add2RecPointsList(
dd1b15c4 164 new TH1F("hGlobalSSD1AbsoluteResidualsYPosZ",
165 "SSD1 Absolute Residuals Y Pos Z",100,-2.,2.),42);
a935c6c0 166 Add2RecPointsList(
dd1b15c4 167 new TH1F("hGlobalSSD1AbsoluteResidualsZPosZ",
168 "SSD1 Absolute Residuals Z Pos Z",100,-2.,2.),43);
49ab451d 169
170
171 Add2RecPointsList(
dd1b15c4 172 new TH1F("hGlobalSSD2AbsoluteResidualsYNegZ",
173 "SSD2 Absolute Residuals Y Neg Z",100,-3.,3.),44);
a935c6c0 174 Add2RecPointsList(
dd1b15c4 175 new TH1F("hGlobalSSD2AbsoluteResidualsZNegZ",
176 "SSD2 Absolute Residuals Z Neg Z",100,-3.,3.),45);
49ab451d 177 Add2RecPointsList(
dd1b15c4 178 new TH1F("hGlobalSSD2AbsoluteResidualsYPosZ",
179 "SSD2 Absolute Residuals Y Pos Z",100,-3.,3.),46);
a935c6c0 180 Add2RecPointsList(
dd1b15c4 181 new TH1F("hGlobalSSD2AbsoluteResidualsZPosZ",
182 "SSD2Absolute Residuals Z Pos Z",100,-3.,3.),47);
a935c6c0 183
ebb9ea7c 184 first = kFALSE ;
c0af1be2 185}
d7259b2e 186
fb774831 187//____________________________________________________________________________
d7259b2e 188void AliGlobalQADataMaker::InitESDs() {
189 //------------------------------------------------------
190 // This function books the ESD QA histograms
191 // as a part of global QA
192 //------------------------------------------------------
542c6c71 193
f728e025 194 const Bool_t expert = kTRUE ;
dfbcf2c1 195 const Bool_t image = kTRUE ;
196
197 {// Event related QA
198 const Char_t *name[]={
199 "hGlobalPrimaryVertex"
200 };
201 const Char_t *title[]={
202 "Z-distribution of the primary vertex"
203 };
204 Add2ESDsList(new TH1F(name[0],title[0],100,-20.,20.),kEvt0,!expert,image);
205 }
206
207 {// Cluster related QA
dd1b15c4 208 const Char_t *name[]={
209 "hGlobalFractionAssignedClustersITS",
210 "hGlobalFractionAssignedClustersTPC",
2937b8ff 211 "hGlobalFractionAssignedClustersTRD",
212 "hGlobalClustersPerITSModule"
dd1b15c4 213 };
214 const Char_t *title[]={
215 "Fraction of the assigned clusters in ITS",
216 "Fraction of the assigned clusters in TPC",
2937b8ff 217 "Fraction of the assigned clusters in TRD",
218 "Number of clusters per an ITS module"
dd1b15c4 219 };
f728e025 220 Add2ESDsList(new TH1F(name[0],title[0],100,0.,2.),kClr0, !expert, image);
221 Add2ESDsList(new TH1F(name[1],title[1],100,0.,2.),kClr1, !expert, image);
222 Add2ESDsList(new TH1F(name[2],title[2],100,0.,2.),kClr2, !expert, image);
0428b94a 223 Add2ESDsList(new TH1F(name[3],title[3],2201,-0.5,2200.5),kClr3, !expert, image);
542c6c71 224 }
225
226 {// Track related QA
dd1b15c4 227 const Char_t *name[]={
228 "hGlobalTrackAzimuthe", // kTrk0
229 "hGlobalTrackEta", // kTrk1
230 "hGlobalTPCTrackpT", // kTrk2
231 "hGlobalTPCITSMatchedpT", // kTrk3
232 "hGlobalTPCTOFMatchedpT", // kTrk4
233 "hGlobalTPCITSMatchingProbability", // kTrk5
8336b059 234 "hGlobalTPCTOFMatchingProbability", // kTrk6
235 "hGlobalTPCsideAposDCA", // kTrk7
236 "hGlobalTPCsideAnegDCA", // kTrk8
237 "hGlobalTPCsideCposDCA", // kTrk9
238 "hGlobalTPCsideCnegDCA" // kTrk10
542c6c71 239 };
dd1b15c4 240 const Char_t *title[]={
241 "Track azimuthal distribution (rad)", // kTrk0
242 "Track pseudo-rapidity distribution", // kTrk1
243 "TPC: track momentum distribution (GeV)", // kTrk2
244 "TPC-ITS matched: track momentum distribution (GeV)", // kTrk3
245 "TPC-TOF matched: track momentum distribution (GeV)", // kTrk4
246 "TPC-ITS track-matching probability", // kTrk5
8336b059 247 "TPC-TOF track-matching probability", // kTrk6
248 "TPC side A: DCA for the positive tracks (mm)", // kTrk7
249 "TPC side A: DCA for the negative tracks (mm)", // kTrk8
250 "TPC side C: DCA for the positive tracks (mm)", // kTrk9
251 "TPC side C: DCA for the negative tracks (mm)" // kTrk10
dd1b15c4 252 };
f728e025 253 Add2ESDsList(new TH1F(name[0],title[0],100, 0.,TMath::TwoPi()),kTrk0, !expert, image);
254 Add2ESDsList(new TH1F(name[1],title[1],100,-2.00,2.00),kTrk1, !expert, image);
255 Add2ESDsList(new TH1F(name[2],title[2],50, 0.20,5.00),kTrk2, !expert, image);
256 Add2ESDsList(new TH1F(name[3],title[3],50, 0.20,5.00),kTrk3, !expert, image);
257 Add2ESDsList(new TH1F(name[4],title[4],50, 0.20,5.00),kTrk4, !expert, image);
258 Add2ESDsList(new TH1F(name[5],title[5],50, 0.20,5.00),kTrk5, !expert, image);
259 Add2ESDsList(new TH1F(name[6],title[6],50, 0.20,5.00),kTrk6, !expert, image);
260 Add2ESDsList(new TH1F(name[7],title[7],50, -25.0,25.0),kTrk7, !expert, image);
261 Add2ESDsList(new TH1F(name[8],title[8],50, -25.0,25.0),kTrk8, !expert, image);
262 Add2ESDsList(new TH1F(name[9],title[9],50, -25.0,25.0),kTrk9, !expert, image);
263 Add2ESDsList(new TH1F(name[10],title[10],50, -25.0,25.0),kTrk10, !expert, image);
542c6c71 264 }
265
266 {// V0 related QA
dd1b15c4 267 const Char_t *name[]={
268 "hGlobalPromptK0sMass",
269 "hGlobalOfflineK0sMass",
270 "hGlobalPromptLambda0Lambda0BarMass",
271 "hGlobalOfflineLambda0Lambda0BarMass"
272 };
273 const Char_t *title[]={
274 "On-the-fly K0s mass (GeV)",
275 "Offline K0s mass (GeV)",
276 "On-the-fly Lambda0 + Lambda0Bar mass (GeV)",
277 "Offline Lambda0 + Lambda0Bar mass (GeV)"
278 };
f728e025 279 Add2ESDsList(new TH1F(name[0],title[0],50, 0.4477,0.5477),kK0on, !expert, image);
280 Add2ESDsList(new TH1F(name[1],title[1],50, 0.4477,0.5477),kK0off, !expert, image);
281 Add2ESDsList(new TH1F(name[2],title[2],50, 1.0657,1.1657),kL0on, !expert, image);
282 Add2ESDsList(new TH1F(name[3],title[3],50, 1.0657,1.1657),kL0off, !expert, image);
542c6c71 283 }
284
285 {// PID related QA
a6e0ebfe 286 const Char_t *name[]={
c9622234 287 "hGlobalITSdEdx",
288 "hGlobalTPCdEdx",
2937b8ff 289 "hGlobalTOFTrackingvsMeasured",
290 "hGlobalTPCdEdxvsMomentum"
291 };
dd1b15c4 292 const Char_t *title[]={
293 "ITS: dEdx (ADC) for particles with momentum 0.4 - 0.5 (GeV)",
294 "TPC: dEdx (ADC) for particles with momentum 0.4 - 0.5 (GeV)",
2937b8ff 295 "TOF: tracking - measured (ps)",
296 "TPC: dEdx (A.U.) vs momentum (GeV)"
297 };
f728e025 298 Add2ESDsList(new TH1F(name[0],title[0],50,0.00,200.),kPid0, !expert, image);
299 Add2ESDsList(new TH1F(name[1],title[1],50,0.00,100.),kPid1, !expert, image);
300 Add2ESDsList(new TH1F(name[2],title[2],50,-3500.,3500.),kPid2, !expert, image);
2937b8ff 301 Add2ESDsList(new TH2F(name[3],title[3],1500,0.05,15.,700,0.,700.),kPid3,!expert,image);
302 }
303 {// Multiplicity related QA
304 const Char_t *name[]={
305 "hGlobalV0AvsITS",
306 "hGlobalV0CvsITS"
307 };
308 const Char_t *title[]={
309 "Multiplicity: V0A vs ITS",
310 "Multiplicity: V0C vs ITS"
311 };
0428b94a 312 TH2F *h0=new TH2F(name[0],title[0],41,-0.5,40.5, 33,-0.5,32.5);
2937b8ff 313 Add2ESDsList(h0,kMlt0, !expert, image);
0428b94a 314 TH2F *h1=new TH2F(name[1],title[1],41,-0.5,40.5, 33,-0.5,32.5);
2937b8ff 315 Add2ESDsList(h1,kMlt1, !expert, image);
542c6c71 316 }
317
d7259b2e 318}
319
fb774831 320//____________________________________________________________________________
321void AliGlobalQADataMaker::MakeRaws(AliRawReader* rawReader)
322{
323 //Fill prepared histograms with Raw digit properties
324 rawReader->Reset() ;
325
326}
327
328//____________________________________________________________________________
542c6c71 329void AliGlobalQADataMaker::MakeESDs(AliESDEvent * event) {
d7259b2e 330 //-----------------------------------------------------------
331 // This function fills the ESD QA histograms
332 // as a part of global QA
333 //-----------------------------------------------------------
c9622234 334
542c6c71 335 const AliESDEvent *esd=event;
336
dfbcf2c1 337 // Event related QA
338 const AliESDVertex *vtx=esd->GetPrimaryVertex();
339 if (!vtx->GetStatus()) return;
340
341 Double_t xv=vtx->GetXv();
342 Double_t yv=vtx->GetYv();
343 Double_t zv=vtx->GetZv();
344 GetESDsData(kEvt0)->Fill(zv);
345
346
d7259b2e 347 Int_t ntrk=esd->GetNumberOfTracks() ;
348 for (Int_t i=0; i<ntrk; i++) {
542c6c71 349 const AliESDtrack *track=esd->GetTrack(i);
d7259b2e 350
542c6c71 351 // Cluster related QA
d7259b2e 352 if (track->IsOn(AliESDtrack::kITSrefit)) {
353 Int_t n=track->GetITSclusters(0);
542c6c71 354 GetESDsData(kClr0)->Fill(Float_t(n)/6.); //6 is the number of ITS layers
d7259b2e 355 }
356
ff355e43 357 for (Int_t j=0; j<6; ++j) {
2937b8ff 358 Int_t idet, sts;
359 Float_t xloc,zloc;
ff355e43 360 if (!track->GetITSModuleIndexInfo(j,idet,sts,xloc,zloc)) continue;
361 if (j>=2) idet+=240;
362 if (j>=4) idet+=260;
2937b8ff 363 if ((sts==1)||(sts==2)||(sts==4)) GetESDsData(kClr3)->Fill(idet);
364 }
365
d7259b2e 366 if (track->IsOn(AliESDtrack::kTPCrefit)) {
367 Int_t n =track->GetTPCNcls();
368 Int_t nf=track->GetTPCNclsF(); // number of crossed TPC pad rows
1aaf4118 369 if (nf>0) {
370 Double_t val = n*1.0/nf;
371 GetESDsData(kClr1)->Fill(val);
372 }
d7259b2e 373 }
374
375 if (track->IsOn(AliESDtrack::kTRDrefit)) {
376 Int_t n=track->GetTRDclusters(0);
e3bd5382 377 GetESDsData(kClr2)->Fill(Float_t(n)/(6*24));//(6*24) is the number of TRD time bins
542c6c71 378 }
379
380 Double_t p=track->GetP();
381
382 // Track related QA
383 if (track->IsOn(AliESDtrack::kTPCrefit)) {
384 Float_t dz[2];
dfbcf2c1 385 track->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
542c6c71 386 if ((TMath::Abs(dz[0])<3.) && (TMath::Abs(dz[1])<3.)) { // beam pipe
387 Double_t phi=track->Phi();
388 GetESDsData(kTrk0)->Fill(phi);
44f14df0 389 Double_t y=track->Eta();
542c6c71 390 GetESDsData(kTrk1)->Fill(y);
391
cecff4fc 392 if (TMath::Abs(y)<0.9) {
393 GetESDsData(kTrk2)->Fill(p);
394 if (track->IsOn(AliESDtrack::kITSrefit)) GetESDsData(kTrk3)->Fill(p);
4d9ba05c 395 //if (track->IsOn(AliESDtrack::kTOFout)) GetESDsData(kTrk4)->Fill(p);
396 if (track->GetTOFsignal()>0) GetESDsData(kTrk4)->Fill(p);
cecff4fc 397 }
542c6c71 398 }
399 }
8336b059 400 const AliExternalTrackParam *tpcTrack=track->GetTPCInnerParam();
401 const AliExternalTrackParam *innTrack=track->GetInnerParam();
402 if (tpcTrack)
403 if (innTrack) {
8336b059 404 Float_t dz[2];
405 tpcTrack->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
406 dz[0]*=10.; // in mm
407 if (innTrack->GetZ() > 0)
408 if (innTrack->GetTgl()> 0) { // TPC side A
409 if (tpcTrack->GetSign() > 0) GetESDsData(kTrk7)->Fill(dz[0]);
410 else GetESDsData(kTrk8)->Fill(dz[0]);
411 }
412 if (innTrack->GetZ() < 0)
413 if (innTrack->GetTgl()< 0) { // TPC side C
414 if (tpcTrack->GetSign() > 0) GetESDsData(kTrk9)->Fill(dz[0]);
415 else GetESDsData(kTrk10)->Fill(dz[0]);
416 }
417 }
542c6c71 418
419 // PID related QA
420 if ((p>0.4) && (p<0.5)) {
421 if (track->IsOn(AliESDtrack::kITSpid)) {
422 Double_t dedx=track->GetITSsignal();
423 GetESDsData(kPid0)->Fill(dedx);
424 }
425 if (track->IsOn(AliESDtrack::kTPCpid)) {
426 Double_t dedx=track->GetTPCsignal();
427 GetESDsData(kPid1)->Fill(dedx);
428 }
d7259b2e 429 }
542c6c71 430 if (p>1.0) {
dfbcf2c1 431 if (track->IsOn(AliESDtrack::kITSrefit))
432 if (track->IsOn(AliESDtrack::kTPCrefit))
433 if (track->IsOn(AliESDtrack::kTOFout)) {
434 Float_t dz[2];
435 track->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
436 if (dz[1]<3.) {
437 Double_t times[10];
438 track->GetIntegratedTimes(times);
439 Double_t tof=track->GetTOFsignal()/*-847055 -1771207*/;
440 GetESDsData(kPid2)->Fill(times[2]-tof);
441 }
542c6c71 442 }
443 }
2937b8ff 444 const AliExternalTrackParam *par=track->GetInnerParam();
445 if (par) {
446 Double_t pp=par->GetP();
447 Double_t dedx=track->GetTPCsignal();
448 TH2F *h = dynamic_cast<TH2F*>(GetESDsData(kPid3));
449 h->Fill(pp,dedx);
450 }
451
542c6c71 452 }
d7259b2e 453
2937b8ff 454 // Multiplicity related QA
455 AliESDVZERO *mltV0 =esd->GetVZEROData();
456 const AliMultiplicity *mltITS=esd->GetMultiplicity();
457 if (mltV0)
458 if (mltITS) {
459 Short_t nv0a=mltV0->GetNbPMV0A();
460 Short_t nv0c=mltV0->GetNbPMV0C();
461 Int_t nits=mltITS->GetNumberOfTracklets();
462 TH2F *h0=dynamic_cast<TH2F*>(GetESDsData(kMlt0));
463 h0->Fill(nits,nv0a);
464 TH2F *h1=dynamic_cast<TH2F*>(GetESDsData(kMlt1));
465 h1->Fill(nits,nv0c);
466 }
467
468
cecff4fc 469 TH1 *tpc=GetESDsData(kTrk2); tpc->Sumw2();
470 TH1 *its=GetESDsData(kTrk3); its->Sumw2();
471 TH1 *tof=GetESDsData(kTrk4); tof->Sumw2();
542c6c71 472 GetESDsData(kTrk5)->Divide(its,tpc,1,1.,"b");
473 GetESDsData(kTrk6)->Divide(tof,tpc,1,1.,"b");
474
475 // V0 related QA
476 Int_t nV0=esd->GetNumberOfV0s();
477 for (Int_t i=0; i<nV0; i++) {
478 Double_t mass;
479 AliESDv0 v0(*esd->GetV0(i));
480
dfbcf2c1 481 Int_t nidx=TMath::Abs(v0.GetNindex());
482 AliESDtrack *ntrack1=esd->GetTrack(nidx);
483 if (!ntrack1->IsOn(AliESDtrack::kTPCrefit)) continue;
484
485 Int_t pidx=TMath::Abs(v0.GetPindex());
486 AliESDtrack *ptrack1=esd->GetTrack(pidx);
487 if (!ptrack1->IsOn(AliESDtrack::kTPCrefit)) continue;
488
542c6c71 489 v0.ChangeMassHypothesis(kK0Short);
490 mass=v0.GetEffMass();
b72280b3 491 if (v0.GetOnFlyStatus())
492 GetESDsData(kK0on)->Fill(mass);
493 else
494 GetESDsData(kK0off)->Fill(mass);
542c6c71 495
496 v0.ChangeMassHypothesis(kLambda0);
497 mass=v0.GetEffMass();
b72280b3 498 if (v0.GetOnFlyStatus())
499 GetESDsData(kL0on)->Fill(mass);
500 else
501 GetESDsData(kL0off)->Fill(mass);
542c6c71 502
503 v0.ChangeMassHypothesis(kLambda0Bar);
504 mass=v0.GetEffMass();
b72280b3 505 if (v0.GetOnFlyStatus())
506 GetESDsData(kL0on)->Fill(mass);
507 else
508 GetESDsData(kL0off)->Fill(mass);
d7259b2e 509 }
542c6c71 510
f92b626a 511}