1 #define AliV0CutVariations_cxx
2 // The class definition in AliV0CutVariations.h has been generated automatically
3 // by the ROOT utility TTree::MakeSelector(). This class is derived
4 // from the ROOT class TSelector. For more information on the TSelector
5 // framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual.
7 // The following methods are defined in this file:
8 // Begin(): called every time a loop on the tree starts,
9 // a convenient place to create your histograms.
10 // SlaveBegin(): called after Begin(), when on PROOF called only on the
12 // Process(): called for each event, in this function you decide what
13 // to read and fill your histograms.
14 // SlaveTerminate: called at the end of the loop on the tree, when on PROOF
15 // called only on the slave servers.
16 // Terminate(): called at the end of the loop on the tree,
17 // a convenient place to draw/fit your histograms.
19 // To use this file, try the following session on your Tree T:
21 // Root > T->Process("AliV0CutVariations.C")
22 // Root > T->Process("AliV0CutVariations.C","some options")
23 // Root > T->Process("AliV0CutVariations.C+")
26 #include "AliV0CutVariations.h"
28 #include "Riostream.h"
31 #include <TDatabasePDG.h>
38 AliV0CutVariations::AliV0CutVariations(TTree * /*tree*/ ) :
41 fSelectNonInjected(kFALSE),
83 fLambdaBarFromXiBar(0),
88 void AliV0CutVariations::Begin(TTree * /*tree*/)
90 // The Begin() function is called at the start of the query.
91 // When running with PROOF Begin() is only called on the client.
92 // The tree argument is deprecated (on PROOF 0 is passed).
94 TString option = GetOption();
98 void AliV0CutVariations::SlaveBegin(TTree * tree)
100 // The SlaveBegin() function is called after the Begin() function.
101 // When running with PROOF SlaveBegin() is called on each slave server.
102 // The tree argument is deprecated (on PROOF 0 is passed).
106 //cout<<tree->GetEntries()<<endl;
108 TString option = GetOption();
110 Int_t lbins=100; // number of bins in lt
111 Int_t kbins=33; // number of bins in pt of Xi
115 const Double_t xBins[]={
116 0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,
117 1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,
118 2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4.0,
119 4.5,5.0,5.5,6.5,8.0,10.0,12.0
121 const Int_t nBins=sizeof(xBins)/sizeof(Double_t) - 1;
123 Double_t yBins[lbins+1];
124 for (Int_t i=0; i<=(lbins+1); i++) yBins[i]=i*ltMax/lbins;
125 Double_t zBins[kbins+1];
126 for (Int_t i=0; i<=(kbins+1); i++) zBins[i]=i*(ptMax+2)/kbins;
129 //fMult=new TH1F("fMult","Multiplicity",1100,0.,3300);
130 //fMult->GetXaxis()->SetTitle("N tracks");
131 fMult=new TH1F("fMult","Centrality",100,0.,100);
132 fMult->GetXaxis()->SetTitle("Centrality (%)");
136 fCosPA=new TH1F("fCosPA","Cos(PA) distribution",50,0.9975,1.0005);
137 fCosPA->GetXaxis()->SetTitle("Cos(PA)");
138 fOutput->Add(fCosPA);
140 fDtrDCA=new TH1F("fDtrDCA","DCA between V0 daughters",50,0.0,1.5);
141 fDtrDCA->GetXaxis()->SetTitle("DCA (rel. u.)");
142 fOutput->Add(fDtrDCA);
144 fTPCrows=new TH1F("fTPCrows","TPC crossed pad rows",180,0.,180.);
145 fTPCrows->GetXaxis()->SetTitle("TPC crossed pad rows");
146 fOutput->Add(fTPCrows);
148 fTPCratio=new TH1F("fTPCratio","TPC crossed/findable pad rows",50,0.0,1.5);
149 fTPCratio->GetXaxis()->SetTitle("TPC crossed/findable pad rows");
150 fOutput->Add(fTPCratio);
152 fPrimDCA=new TH1F("fPrimDCA","DCA wrt the primary vertex",50,0.0,1.5);
153 fPrimDCA->GetXaxis()->SetTitle("DCA wrt the PV (cm)");
154 fOutput->Add(fPrimDCA);
157 fdEdx=new TH2F("fdEdx","dE/dx",50,0.2,3,50,0.,6.);
160 fdEdxPid=new TH2F("fdEdxPid","dE/dx with PID",50,0.2,3,50,0.,6.);
161 fOutput->Add(fdEdxPid);
164 new TH2F("fK0sM", "Mass for K^{0}_{s}", 50,0.448,0.548,nBins,xBins);
165 fK0sM->GetXaxis()->SetTitle("Mass (GeV/c)");
169 new TH2F("fK0sSi","L_{T} vs p_{T} for K^{0}_{s}, side-band subtracted",
170 nBins,xBins,lbins,0.,ltMax);
171 fK0sSi->GetXaxis()->SetTitle("p_{T} (GeV/c)");
172 fK0sSi->GetYaxis()->SetTitle("L_{T} (cm)");
173 fOutput->Add(fK0sSi);
176 new TH2F("fK0sMC","L_{T} vs p_{T} for K^{0}_{s}, from MC stack",
177 nBins,xBins,lbins,0.,ltMax);
178 fK0sMC->GetXaxis()->SetTitle("p_{T} (GeV/c)");
179 fK0sMC->GetYaxis()->SetTitle("L_{T} (cm)");
180 fOutput->Add(fK0sMC);
183 new TH2F("fK0sAs", "L_{T} vs p_{T} for K^{0}_{s}, associated",
184 nBins,xBins,lbins,0.,ltMax);
185 fK0sAs->GetXaxis()->SetTitle("p_{T} (GeV/c)");
186 fK0sAs->GetYaxis()->SetTitle("L_{T} (cm)");
187 fOutput->Add(fK0sAs);
189 //----------------------
192 new TH2F("fLambdaM","Mass for \\Lambda", 100, 1.065, 1.165,nBins,xBins);
193 fLambdaM->GetXaxis()->SetTitle("Mass (GeV/c)");
194 fOutput->Add(fLambdaM);
197 new TH2F("fLambdaSi","L_{T} vs p_{T} for \\Lambda, side-band subtructed",
198 nBins,xBins,lbins,0.,ltMax);
199 fLambdaSi->GetXaxis()->SetTitle("p_{T} (GeV/c)");
200 fLambdaSi->GetYaxis()->SetTitle("L_{T} (cm)");
201 fOutput->Add(fLambdaSi);
204 new TH2F("fLambdaMC","L_{T} vs p_{T} for \\Lambda, from MC stack",
205 nBins,xBins,lbins,0.,ltMax);
206 fLambdaMC->GetXaxis()->SetTitle("p_{T} (GeV/c)");
207 fLambdaMC->GetYaxis()->SetTitle("L_{T} (cm)");
208 fOutput->Add(fLambdaMC);
211 new TH2F("fLambdaAs","L_{T} vs p_{T} for \\Lambda, associated",
212 nBins,xBins,lbins,0.,ltMax);
213 fLambdaAs->GetXaxis()->SetTitle("p_{T} (GeV/c)");
214 fLambdaAs->GetYaxis()->SetTitle("L_{T} (cm)");
215 fOutput->Add(fLambdaAs);
217 //----------------------
219 fLambdaEff=fLambdaAs->ProjectionX();
220 fLambdaEff->SetName("fLambdaEff");
221 fLambdaEff->SetTitle("Efficiency for #Lambda");
222 fOutput->Add(fLambdaEff);
224 fLambdaPt=fLambdaAs->ProjectionX();
225 fLambdaPt->SetName("fLambdaPt");
226 fLambdaPt->SetTitle("Raw #Lambda pT spectrum");
227 fOutput->Add(fLambdaPt);
228 //----------------------
231 new TH2F("fLambdaBarM","Mass for anti-\\Lambda",100,1.065,1.165,nBins,xBins);
232 fLambdaBarM->GetXaxis()->SetTitle("Mass (GeV/c)");
233 fOutput->Add(fLambdaBarM);
236 new TH2F("fLambdaBarSi","L_{T} vs p_{T} for anti-\\Lambda, side-band subtructed",
237 nBins,xBins,lbins,0.,ltMax);
238 fLambdaBarSi->GetXaxis()->SetTitle("p_{T} (GeV/c)");
239 fLambdaBarSi->GetYaxis()->SetTitle("L_{T} (cm)");
240 fOutput->Add(fLambdaBarSi);
243 new TH2F("fLambdaBarMC","L_{T} vs p_{T} for anti-\\Lambda, from MC stack",
244 nBins,xBins,lbins,0.,ltMax);
245 fLambdaBarMC->GetXaxis()->SetTitle("p_{T} (GeV/c)");
246 fLambdaBarMC->GetYaxis()->SetTitle("L_{T} (cm)");
247 fOutput->Add(fLambdaBarMC);
250 new TH2F("fLambdaBarAs","L_{T} vs p_{T} for anti-\\Lambda, associated",
251 nBins,xBins,lbins,0.,ltMax);
252 fLambdaBarAs->GetXaxis()->SetTitle("p_{T} (GeV/c)");
253 fLambdaBarAs->GetYaxis()->SetTitle("L_{T} (cm)");
254 fOutput->Add(fLambdaBarAs);
257 //----------------------
259 fLambdaBarEff=fLambdaBarAs->ProjectionX();
260 fLambdaBarEff->SetName("fLambdaBarEff");
261 fLambdaBarEff->SetTitle("Efficiency for anti-#Lambda");
262 fOutput->Add(fLambdaBarEff);
264 fLambdaBarPt=fLambdaBarAs->ProjectionX();
265 fLambdaBarPt->SetName("fLambdaBarPt");
266 fLambdaBarPt->SetTitle("Raw anti-#Lambda pT spectrum");
267 fOutput->Add(fLambdaBarPt);
269 //----------------------
270 fLambdaFromXi=new TH3F("fLambdaFromXi","L_{T} vs p_{T} vs p_{T} of \\Xi for \\Lambda from \\Xi",
271 nBins,xBins,lbins,yBins,kbins,zBins);
272 fOutput->Add(fLambdaFromXi);
275 new TH2F("fXiM", "\\Xi mass distribution", 50, 1.271, 1.371,33,0.,ptMax+2);
278 fXiSiP = new TH1F("fXiSiP", "Pt for \\Xi, side-band subracted",
280 fOutput->Add(fXiSiP);
283 fLambdaBarFromXiBar=new TH3F("fLambdaBarFromXiBar","L_{T} vs p_{T} vs p_{T} of anti-\\Xi for anti-\\Lambda from anti-\\Xi",
284 nBins,xBins,lbins,yBins,kbins,zBins);
285 fOutput->Add(fLambdaBarFromXiBar);
288 new TH2F("fXiBarM", "anti-\\Xi mass distribution", 50, 1.271, 1.371,33,0.,ptMax+2);
289 fOutput->Add(fXiBarM);
291 fXiBarSiP = new TH1F("fXiBarSiP", "Pt for anti-\\Xi, side-band subracted",
293 fOutput->Add(fXiBarSiP);
297 Bool_t AliV0CutVariations::AcceptTracks() {
298 //if (!t->IsOn(AliAODTrack::kTPCrefit)) return kFALSE;
299 //if (t->GetKinkIndex(0)>0) return kFALSE;
302 if (fTreeVariableLeastNbrCrossedRows < fTPCcr) return kFALSE;
303 if (fTreeVariableLeastRatioCrossedRowsOverFindable < fTPCcrfd) return kFALSE;
305 if (TMath::Abs(fTreeVariableNegEta) > 0.8) return kFALSE;
306 if (TMath::Abs(fTreeVariablePosEta) > 0.8) return kFALSE;
308 fTPCrows->Fill(fTreeVariableLeastNbrCrossedRows);
309 fTPCratio->Fill(fTreeVariableLeastRatioCrossedRowsOverFindable);
314 Bool_t AliV0CutVariations::AcceptV0()
316 //if (v0->GetOnFlyStatus()) return kFALSE;
318 if (fTreeVariableV0CosineOfPointingAngle < fCPA) return kFALSE;
319 if (fTreeVariableDcaV0Daughters > fDCA) return kFALSE;
321 if (!AcceptTracks()) return kFALSE;
323 if (TMath::Abs(fTreeVariableDcaNegToPrimVertex) < fDCApv) return kFALSE;
324 if (TMath::Abs(fTreeVariableDcaPosToPrimVertex) < fDCApv) return kFALSE;
326 if (fTreeVariableV0Radius < 0.9) return kFALSE;
327 if (fTreeVariableV0Radius > 100) return kFALSE;
329 fCosPA->Fill(fTreeVariableV0CosineOfPointingAngle);
330 fDtrDCA->Fill(fTreeVariableDcaV0Daughters);
331 fPrimDCA->Fill(fTreeVariableDcaNegToPrimVertex);
332 fPrimDCA->Fill(fTreeVariableDcaPosToPrimVertex);
337 Bool_t AliV0CutVariations::AcceptPID(Int_t code)
339 //const AliAODPid *pid=ptrack->GetDetPid();
340 //if (!pid) return kTRUE;
342 if (fTreeVariablePosTransvMomentum > 1.) return kTRUE;
344 if (fTreeVariableNegTransvMomentum > 1.) return kTRUE;
351 if (fSelectNonInjected && (!fTreeVariableIsNonInjected)) return kFALSE;
354 if (fTreeVariablePIDPositive == code) return kTRUE;
356 if (fTreeVariablePIDNegative == code) return kTRUE;
361 if (TMath::Abs(fTreeVariableNSigmasPosProton) < 3.) return kTRUE;
363 if (TMath::Abs(fTreeVariableNSigmasNegProton) < 3.) return kTRUE;
371 Bool_t AliV0CutVariations::Process(Long64_t entry)
373 // The Process() function is called for each entry in the tree (or possibly
374 // keyed object in the case of PROOF) to be processed. The entry argument
375 // specifies which entry in the currently loaded tree is to be processed.
376 // It can be passed to either AliV0CutVariations::GetEntry() or TBranch::GetEntry()
377 // to read either all or the required parts of the data. When processing
378 // keyed objects with PROOF, the object is already loaded and is available
379 // via the fObject pointer.
381 // This function should contain the "body" of the analysis. It can contain
382 // simple or elaborate selection criteria, run algorithms on the data
383 // of the event and typically fill histograms.
385 // The processing can be stopped by calling Abort().
387 // Use fStatus to set the return value of TTree::Process().
389 // The return value is currently not used.
391 const Double_t yMax=0.5;
392 const Double_t pMin=0.0;
393 //const Double_t lMax=0.001;
395 fChain->GetTree()->GetEntry(entry);
399 if (fTreeVariableMultiplicity<fCMin) return kFALSE;
400 if (fTreeVariableMultiplicity>fCMax) return kFALSE;
402 fMult->Fill(fTreeVariableMultiplicity);
408 if (fSelectNonInjected && (!fTreeVariableIsNonInjected)) goto real;
410 Int_t code=fTreeVariablePID;
412 if (code != kK0Short)
413 if (code != kLambda0)
414 if (code != kLambda0Bar) goto real;
416 pt=fTreeVariablePtMC;
417 if (pt < pMin) goto real;
419 if (TMath::Abs(fTreeVariableRapMC) > yMax) goto real;
421 //if (TMath::Abs(fTreeVariableV0CreationRadius) > lMax) goto real;
422 if (fTreeVariablePrimaryStatus != 1) goto real;
424 lt=fTreeVariableV0Radius;
430 fLambdaMC->Fill(pt,lt);
433 fLambdaBarMC->Fill(pt,lt);
444 if (pt < pMin) return kFALSE;
446 if (!AcceptV0()) return kFALSE;
448 lt=fTreeVariableV0Radius;
449 if (lt/pt > 3*7.89/1.1157) return kFALSE;
453 Bool_t isLambda=kTRUE;
454 Bool_t isLambdaBar=kTRUE;
456 if (0.4977*lt/pt > 3*2.68) isK0s=kFALSE;
457 if (1.1157*lt/pt > 3*7.89) isLambdaBar=isLambda=kFALSE;
459 if (fTreeVariablePtArmV0<0.2*TMath::Abs(fTreeVariableAlphaV0)) isK0s=kFALSE;
461 if (!AcceptPID(kProton)) isLambda=kFALSE;
462 if (!AcceptPID(kProtonBar)) isLambdaBar=kFALSE;
464 Double_t yK0s=TMath::Abs(fTreeVariableRapK0Short);
465 Double_t yLam=TMath::Abs(fTreeVariableRapLambda);
466 if (yK0s > yMax) isK0s=kFALSE;
467 if (yLam > yMax) isLambda=isLambdaBar=kFALSE;
470 Double_t mass=0., m=0., s=0.;
472 mass=fTreeVariableInvMassK0s;
473 fK0sM->Fill(mass,pt);
475 m=TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass();
476 //s=0.0044 + (0.008-0.0044)/(10-1)*(pt - 1.);
477 s=0.0029 + 0.00077*pt;
478 if (TMath::Abs(m-mass) < 3*s) {
483 if (TMath::Abs(m-mass + 4.5*s) < 1.5*s) {
484 fK0sSi->Fill(pt,lt,-1);
486 if (TMath::Abs(m-mass - 4.5*s) < 1.5*s) {
487 fK0sSi->Fill(pt,lt,-1);
492 mass=fTreeVariableInvMassLambda;
493 fLambdaM->Fill(mass,pt);
495 m=TDatabasePDG::Instance()->GetParticle(kLambda0)->Mass();
496 //s=0.0023 + (0.004-0.0023)/(6-1)*(pt-1);
497 s=0.0021 + 0.00022*pt;
498 if (TMath::Abs(m-mass) < 3*s) {
499 fLambdaSi->Fill(pt,lt);
503 if (TMath::Abs(m-mass + 4.5*s) < 1.5*s) {
504 fLambdaSi->Fill(pt,lt,-1);
506 if (TMath::Abs(m-mass - 4.5*s) < 1.5*s) {
507 fLambdaSi->Fill(pt,lt,-1);
512 mass=fTreeVariableInvMassAntiLambda;
513 fLambdaBarM->Fill(mass,pt);
515 m=TDatabasePDG::Instance()->GetParticle(kLambda0Bar)->Mass();
516 //s=0.0023 + (0.004-0.0023)/(6-1)*(pt-1);
517 s=0.0021 + 0.00022*pt;
518 if (TMath::Abs(m-mass) < 3*s) {
519 fLambdaBarSi->Fill(pt,lt);
523 if (TMath::Abs(m-mass + 4.5*s) < 1.5*s) {
524 fLambdaBarSi->Fill(pt,lt,-1);
526 if (TMath::Abs(m-mass - 4.5*s) < 1.5*s) {
527 fLambdaBarSi->Fill(pt,lt,-1);
531 if (!fIsMC) return kFALSE;
532 if (fSelectNonInjected && (!fTreeVariableIsNonInjected)) return kFALSE;
538 if (!isLambdaBar) return kFALSE;//check MC only for the accepted V0s
540 Int_t code=fTreeVariablePID;
541 if (code != kK0Short)
542 if (code != kLambda0)
543 if (code != kLambda0Bar) return kFALSE;
545 Double_t ptAs=fTreeVariablePtMC;
546 if (ptAs < pMin) return kFALSE;
548 Double_t yAs=fTreeVariableRapMC;
549 if (TMath::Abs(yAs) > yMax) return kFALSE;
551 Double_t ltAs=fTreeVariableV0Radius;
552 if (fTreeVariablePrimaryStatus == 1) {
555 if (isK0s) fK0sAs->Fill(ptAs,ltAs);
558 if (isLambda) fLambdaAs->Fill(ptAs,ltAs);
561 if (isLambdaBar) fLambdaBarAs->Fill(ptAs,ltAs);
566 if (code==kK0Short) return kTRUE;
568 Int_t xcode=fTreeVariablePIDMother;
569 Double_t xpt=fTreeVariablePtXiMother;
574 if ((xcode==kXiMinus) || (xcode==3322))
575 fLambdaFromXi->Fill(ptAs,ltAs,xpt);
579 if ((xcode==kXiPlusBar)||(xcode==-3322))
580 fLambdaBarFromXiBar->Fill(ptAs,ltAs,xpt);
589 void AliV0CutVariations::SlaveTerminate()
591 // The SlaveTerminate() function is called after all entries or objects
592 // have been processed. When running with PROOF SlaveTerminate() is called
593 // on each slave server.
597 void AliV0CutVariations::Terminate()
599 // The Terminate() function is the last function to be called during
600 // a query. It always runs on the client, it can be used to present
601 // the results graphically or save the results to file.
606 Printf("ERROR: fOutput not available");
610 fMult = dynamic_cast<TH1F*>(fOutput->FindObject("fMult")) ;
612 Printf("ERROR: fMult not available");
616 fdEdx = dynamic_cast<TH2F*>(fOutput->FindObject("fdEdx")) ;
618 Printf("ERROR: fdEdx not available");
622 fdEdxPid = dynamic_cast<TH2F*>(fOutput->FindObject("fdEdxPid")) ;
624 Printf("ERROR: fdEdxPid not available");
629 fK0sMC = dynamic_cast<TH2F*>(fOutput->FindObject("fK0sMC")) ;
631 Printf("ERROR: fK0sMC not available");
634 TH1D *k0sMcPx=fK0sMC->ProjectionX(); k0sMcPx->Sumw2();
635 fK0sAs = dynamic_cast<TH2F*>(fOutput->FindObject("fK0sAs")) ;
637 Printf("ERROR: fK0sAs not available");
640 TH1D *k0sAsPx=fK0sAs->ProjectionX();
641 k0sAsPx->Sumw2(); //k0sAsPx->Scale(0.69);
646 fLambdaFromXi = dynamic_cast<TH3F*>(fOutput->FindObject("fLambdaFromXi")) ;
647 if (!fLambdaFromXi) {
648 Printf("ERROR: fLambdaFromXi not available");
651 TH1D *lambdaFromXiPx=fLambdaFromXi->ProjectionX(); lambdaFromXiPx->Sumw2();
653 fLambdaMC = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaMC")) ;
655 Printf("ERROR: fLambdaMC not available");
658 TH1D *lambdaMcPx=fLambdaMC->ProjectionX(); lambdaMcPx->Sumw2();
660 fLambdaAs = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaAs")) ;
662 Printf("ERROR: fLambdaAs not available");
665 TH1D *lambdaAsPx=fLambdaAs->ProjectionX();
666 lambdaAsPx->Sumw2(); //lambdaAsPx->Scale(0.64);
668 fLambdaSi = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaSi")) ;
670 Printf("ERROR: fLambdaSi not available");
673 TH1D *lambdaSiPx=fLambdaSi->ProjectionX();
674 lambdaSiPx->SetName("fLambdaPt");
677 fLambdaEff = dynamic_cast<TH1D*>(fOutput->FindObject("fLambdaEff")) ;
679 Printf("ERROR: fLambdaEff not available");
682 fLambdaPt = dynamic_cast<TH1D*>(fOutput->FindObject("fLambdaPt")) ;
684 Printf("ERROR: fLambdaPt not available");
689 // anti-Lambda histograms
690 fLambdaBarFromXiBar =
691 dynamic_cast<TH3F*>(fOutput->FindObject("fLambdaBarFromXiBar")) ;
692 if (!fLambdaBarFromXiBar) {
693 Printf("ERROR: fLambdaBarFromXiBar not available");
696 TH1D *lambdaBarFromXiBarPx=
697 fLambdaBarFromXiBar->ProjectionX("Bar"); lambdaBarFromXiBarPx->Sumw2();
699 fLambdaBarMC = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaBarMC")) ;
701 Printf("ERROR: fLambdaBarMC not available");
704 TH1D *lambdaBarMcPx=fLambdaBarMC->ProjectionX(); lambdaBarMcPx->Sumw2();
706 fLambdaBarAs = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaBarAs")) ;
708 Printf("ERROR: fLambdaBarAs not available");
711 TH1D *lambdaBarAsPx=fLambdaBarAs->ProjectionX();
712 lambdaBarAsPx->Sumw2(); //lambdaBarAsPx->Scale(0.64);
714 fLambdaBarSi = dynamic_cast<TH2F*>(fOutput->FindObject("fLambdaBarSi")) ;
716 Printf("ERROR: fLambdaBarSi not available");
719 TH1D *lambdaBarSiPx=fLambdaBarSi->ProjectionX();
720 lambdaBarSiPx->SetName("fLambdaBarPt");
721 lambdaBarSiPx->Sumw2();
723 fLambdaBarEff = dynamic_cast<TH1D*>(fOutput->FindObject("fLambdaBarEff")) ;
724 if (!fLambdaBarEff) {
725 Printf("ERROR: fLambdaBarEff not available");
728 fLambdaBarPt = dynamic_cast<TH1D*>(fOutput->FindObject("fLambdaBarPt")) ;
730 Printf("ERROR: fLambdaBarPt not available");
735 if (!gROOT->IsBatch()) {
737 TCanvas *c1 = new TCanvas("c1","Mulitplicity");
741 new TCanvas("c2","dE/dx");
744 new TCanvas("c3","dE/dx with PID");
745 fdEdxPid->DrawCopy() ;
749 TH1D effK(*k0sAsPx); effK.SetTitle("Efficiency for K0s");
750 effK.Divide(k0sAsPx,k0sMcPx,1,1,"b");
751 new TCanvas("c4","Efficiency for K0s");
756 fLambdaEff->Divide(lambdaAsPx,lambdaMcPx,1,1,"b");
757 new TCanvas("c5","Efficiency for #Lambda");
758 fLambdaEff->DrawCopy("E") ;
760 lambdaSiPx->Add(lambdaFromXiPx,-1);
761 lambdaSiPx->Divide(fLambdaEff);
763 new TCanvas("c6","Corrected #Lambda pt");
764 lambdaSiPx->SetTitle("Corrected #Lambda pt");
765 *fLambdaPt = *lambdaSiPx;
766 fLambdaPt->SetLineColor(2);
767 fLambdaPt->DrawCopy("E");
769 lambdaMcPx->DrawCopy("same");
773 fLambdaBarEff->Divide(lambdaBarAsPx,lambdaBarMcPx,1,1,"b");
774 new TCanvas("c7","Efficiency for anti-#Lambda");
775 fLambdaBarEff->DrawCopy("E") ;
777 lambdaBarSiPx->Add(lambdaBarFromXiBarPx,-1);
778 lambdaBarSiPx->Divide(fLambdaBarEff);
780 new TCanvas("c8","Corrected anti-#Lambda pt");
781 lambdaBarSiPx->SetTitle("Corrected anti-#Lambda pt");
782 *fLambdaBarPt = *lambdaBarSiPx;
783 fLambdaBarPt->SetLineColor(2);
784 fLambdaBarPt->DrawCopy("E");
786 lambdaBarMcPx->DrawCopy("same");
788 new TCanvas("c6","Raw #Lambda pt");
789 lambdaSiPx->SetTitle("Raw #Lambda pt");
790 *fLambdaPt = *lambdaSiPx;
791 fLambdaPt->SetLineColor(2);
792 fLambdaPt->DrawCopy("E");
795 new TCanvas("c7","Raw anti-#Lambda pt");
796 lambdaBarSiPx->SetTitle("Raw anti-#Lambda pt");
797 *fLambdaBarPt = *lambdaBarSiPx;
798 fLambdaBarPt->SetLineColor(2);
799 fLambdaBarPt->DrawCopy("E");
805 if (fSelectNonInjected)
806 file=TFile::Open("AliV0CutVariationsMC_nonInj.root", "RECREATE");
808 file=TFile::Open("AliV0CutVariationsMC.root", "RECREATE");
810 file=TFile::Open("AliV0CutVariations.root", "RECREATE");