Bug corrected.
[u/mrichter/AliRoot.git] / STEER / AliGlobalQADataMaker.cxx
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
8 #include <TPDGCode.h>
9 #include <TH1F.h>
10 #include <TH2F.h>
11
12 #include "AliCDBPath.h"
13 #include "AliCDBEntry.h"
14 #include "AliCDBManager.h"
15 #include "AliDetectorRecoParam.h"
16 #include "AliQAChecker.h"
17 #include "AliGlobalQADataMaker.h"
18 #include "AliGeomManager.h"
19 #include "AliESDEvent.h"
20 #include "AliESDv0.h"
21 #include "AliRawReader.h"
22 #include "AliESDVZERO.h"
23 #include "AliMultiplicity.h" 
24
25 ClassImp(AliGlobalQADataMaker)
26  
27 //____________________________________________________________________________ 
28 void AliGlobalQADataMaker::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
29 {
30   //Detector specific actions at end of cycle
31   // do the QA checking
32   AliQAChecker::Instance()->Run(AliQAv1::kGLOBAL, task, list) ;  
33 }
34
35 //____________________________________________________________________________ 
36 void AliGlobalQADataMaker::InitRaws()
37 {
38   // create Raws histograms in Raws subdir
39 }
40
41 //____________________________________________________________________________
42 void 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
81 //____________________________________________________________________________ 
82 void AliGlobalQADataMaker::InitRecPoints() {
83   //------------------------------------------------------
84   // This function books the histograms of *track*residuals*
85   // as a part of global QA
86   //------------------------------------------------------
87   static Bool_t first = kTRUE ; 
88   if ( ! first ) 
89     return ; 
90   const Char_t *name[]={
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[]={
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",
126     
127     "TPC1 residuals Y","TPC1 residuals Z",
128     "TPC2 residuals Y","TPC2 residuals Z",
129     
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",
136     
137     "TOF residuals Y","TOF residuals Z",
138     
139     "PHOS1 residuals Y","PHOS1 residuals Z",
140     "PHOS2 residuals Y","PHOS2 residuals Z",
141     
142     "HMPID residuals Y","HMPID residuals Z",
143     
144     "MUON residuals Y","MUON residuals Z",
145     
146     "EMCAL residuals Y","EMCAL residuals Z"
147   };
148   
149   for (Int_t m=1; m<AliGeomManager::kLastLayer; m++) {
150     Int_t i=2*m-2;
151     TH1F *h=new TH1F(name[i],title[i],100,-5.,5.);
152     Add2RecPointsList(h,i);    
153     h=new TH1F(name[i+1],title[i+1],100,-5.,5.);
154     Add2RecPointsList(h,i+1);    
155   }
156
157   Add2RecPointsList(
158   new TH1F("hGlobalSSD1AbsoluteResidualsYNegZ",
159            "SSD1 Absolute Residuals Y Neg Z",100,-2.,2.),40);
160   Add2RecPointsList(
161   new TH1F("hGlobalSSD1AbsoluteResidualsZNegZ",
162            "SSD1 Absolute Residuals Z Neg Z",100,-2.,2.),41);
163   Add2RecPointsList(
164   new TH1F("hGlobalSSD1AbsoluteResidualsYPosZ",
165            "SSD1 Absolute Residuals Y Pos Z",100,-2.,2.),42);
166   Add2RecPointsList(
167   new TH1F("hGlobalSSD1AbsoluteResidualsZPosZ",
168            "SSD1 Absolute Residuals Z Pos Z",100,-2.,2.),43);
169
170
171   Add2RecPointsList(
172   new TH1F("hGlobalSSD2AbsoluteResidualsYNegZ",
173            "SSD2 Absolute Residuals Y Neg Z",100,-3.,3.),44);
174   Add2RecPointsList(
175   new TH1F("hGlobalSSD2AbsoluteResidualsZNegZ",
176            "SSD2 Absolute Residuals Z Neg Z",100,-3.,3.),45);
177   Add2RecPointsList(
178   new TH1F("hGlobalSSD2AbsoluteResidualsYPosZ",
179            "SSD2 Absolute Residuals Y Pos Z",100,-3.,3.),46);
180   Add2RecPointsList(
181   new TH1F("hGlobalSSD2AbsoluteResidualsZPosZ",
182            "SSD2Absolute Residuals Z Pos Z",100,-3.,3.),47);
183   
184   first = kFALSE ; 
185 }
186
187 //____________________________________________________________________________ 
188 void AliGlobalQADataMaker::InitESDs() {
189   //------------------------------------------------------
190   // This function books the ESD QA histograms
191   // as a part of global QA
192   //------------------------------------------------------
193
194   const Bool_t expert   = kTRUE ; 
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
208     const Char_t *name[]={
209       "hGlobalFractionAssignedClustersITS",
210       "hGlobalFractionAssignedClustersTPC",
211       "hGlobalFractionAssignedClustersTRD",
212       "hGlobalClustersPerITSModule"
213     };
214     const Char_t *title[]={
215       "Fraction of the assigned clusters in ITS",
216       "Fraction of the assigned clusters in TPC",
217       "Fraction of the assigned clusters in TRD",
218       "Number of clusters per an ITS module"
219     };
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);
223     Add2ESDsList(new TH1F(name[3],title[3],2201,-0.5,2200.5),kClr3, !expert, image);
224   }
225
226   {// Track related QA
227     const Char_t *name[]={
228       "hGlobalTrackAzimuthe",                               // kTrk0
229       "hGlobalTrackEta",                                    // kTrk1
230       "hGlobalTPCTrackpT",                                  // kTrk2
231       "hGlobalTPCITSMatchedpT",                             // kTrk3
232       "hGlobalTPCTOFMatchedpT",                             // kTrk4
233       "hGlobalTPCITSMatchingProbability",                   // kTrk5
234       "hGlobalTPCTOFMatchingProbability",                   // kTrk6
235       "hGlobalTPCsideAposDCA",                              // kTrk7
236       "hGlobalTPCsideAnegDCA",                              // kTrk8
237       "hGlobalTPCsideCposDCA",                              // kTrk9
238       "hGlobalTPCsideCnegDCA"                               // kTrk10
239   };
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
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
252     };
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);
264   }
265
266   {// V0 related QA
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     };
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);
283   }
284
285   {// PID related QA
286   const Char_t *name[]={
287     "hGlobalITSdEdx",
288     "hGlobalTPCdEdx",
289     "hGlobalTOFTrackingvsMeasured",
290     "hGlobalTPCdEdxvsMomentum"
291    };
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)",
295       "TOF: tracking - measured (ps)",
296       "TPC: dEdx (A.U.) vs momentum (GeV)"
297      };
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);
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     };
312     TH2F *h0=new TH2F(name[0],title[0],41,-0.5,40.5, 33,-0.5,32.5);
313     Add2ESDsList(h0,kMlt0, !expert, image);
314     TH2F *h1=new TH2F(name[1],title[1],41,-0.5,40.5, 33,-0.5,32.5);
315     Add2ESDsList(h1,kMlt1, !expert, image);
316   }
317
318 }
319
320 //____________________________________________________________________________
321 void AliGlobalQADataMaker::MakeRaws(AliRawReader* rawReader)
322 {
323   //Fill prepared histograms with Raw digit properties
324   rawReader->Reset() ;
325
326 }
327
328 //____________________________________________________________________________ 
329 void AliGlobalQADataMaker::MakeESDs(AliESDEvent * event) {
330   //-----------------------------------------------------------
331   // This function fills the ESD QA histograms
332   // as a part of global QA
333   //-----------------------------------------------------------
334
335   const AliESDEvent *esd=event;
336
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
347   Int_t ntrk=esd->GetNumberOfTracks() ; 
348   for (Int_t i=0; i<ntrk; i++) {
349     const AliESDtrack *track=esd->GetTrack(i);
350
351     // Cluster related QA
352     if (track->IsOn(AliESDtrack::kITSrefit)) {
353       Int_t n=track->GetITSclusters(0);
354       GetESDsData(kClr0)->Fill(Float_t(n)/6.); //6 is the number of ITS layers
355     }
356
357     for (Int_t j=0; j<6; ++j) {
358       Int_t idet, sts;
359       Float_t xloc,zloc;
360       if (!track->GetITSModuleIndexInfo(j,idet,sts,xloc,zloc)) continue;
361       if (j>=2) idet+=240;
362       if (j>=4) idet+=260;
363       if ((sts==1)||(sts==2)||(sts==4)) GetESDsData(kClr3)->Fill(idet);  
364     }
365
366     if (track->IsOn(AliESDtrack::kTPCrefit)) {
367       Int_t n =track->GetTPCNcls();
368       Int_t nf=track->GetTPCNclsF();      // number of crossed TPC pad rows
369       if (nf>0) {
370         Double_t val = n*1.0/nf; 
371         GetESDsData(kClr1)->Fill(val); 
372       }
373     }
374
375     if (track->IsOn(AliESDtrack::kTRDrefit)) {
376       Int_t n=track->GetTRDclusters(0);
377       GetESDsData(kClr2)->Fill(Float_t(n)/(6*24));//(6*24) is the number of TRD time bins
378     }
379
380     Double_t p=track->GetP();
381
382     // Track related QA
383     if (track->IsOn(AliESDtrack::kTPCrefit)) {
384       Float_t dz[2]; 
385       track->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz); 
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);
389         Double_t y=track->Eta();
390         GetESDsData(kTrk1)->Fill(y);
391
392         if (TMath::Abs(y)<0.9) {
393            GetESDsData(kTrk2)->Fill(p);
394            if (track->IsOn(AliESDtrack::kITSrefit)) GetESDsData(kTrk3)->Fill(p);
395           //if (track->IsOn(AliESDtrack::kTOFout)) GetESDsData(kTrk4)->Fill(p);
396            if (track->GetTOFsignal()>0) GetESDsData(kTrk4)->Fill(p);
397         }
398       }
399     }
400     const AliExternalTrackParam *tpcTrack=track->GetTPCInnerParam();
401     const AliExternalTrackParam *innTrack=track->GetInnerParam();
402     if (tpcTrack)
403     if (innTrack) {
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     }
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       }
429     }
430     if (p>1.0) {
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          }
442       }
443     }
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  
452   }
453
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
469   TH1 *tpc=GetESDsData(kTrk2); tpc->Sumw2();
470   TH1 *its=GetESDsData(kTrk3); its->Sumw2();
471   TH1 *tof=GetESDsData(kTrk4); tof->Sumw2();
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
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
489     v0.ChangeMassHypothesis(kK0Short);
490     mass=v0.GetEffMass();
491     if (v0.GetOnFlyStatus())
492        GetESDsData(kK0on)->Fill(mass);
493     else
494        GetESDsData(kK0off)->Fill(mass);
495
496     v0.ChangeMassHypothesis(kLambda0);
497     mass=v0.GetEffMass();
498     if (v0.GetOnFlyStatus())
499        GetESDsData(kL0on)->Fill(mass);
500     else
501        GetESDsData(kL0off)->Fill(mass);
502
503     v0.ChangeMassHypothesis(kLambda0Bar);
504     mass=v0.GetEffMass();
505     if (v0.GetOnFlyStatus())
506        GetESDsData(kL0on)->Fill(mass);
507     else
508        GetESDsData(kL0off)->Fill(mass);
509   }
510
511 }