1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////
20 // Analysis task to produce Ds candidates mass spectra //
21 // Origin: F.Prino, Torino, prino@to.infn.it //
23 ///////////////////////////////////////////////////////////////////
25 #include <TClonesArray.h>
31 #include <TDatabasePDG.h>
33 #include "AliAnalysisManager.h"
34 #include "AliAODHandler.h"
35 #include "AliAODEvent.h"
36 #include "AliAODVertex.h"
37 #include "AliAODTrack.h"
38 #include "AliAODMCHeader.h"
39 #include "AliAODMCParticle.h"
40 #include "AliAODRecoDecayHF3Prong.h"
41 #include "AliAnalysisVertexingHF.h"
42 #include "AliRDHFCutsDstoKKpi.h"
43 #include "AliAnalysisTaskSE.h"
44 #include "AliAnalysisTaskSEDs.h"
46 ClassImp(AliAnalysisTaskSEDs)
49 //________________________________________________________________________
50 AliAnalysisTaskSEDs::AliAnalysisTaskSEDs():
62 // Default constructor
65 //________________________________________________________________________
66 AliAnalysisTaskSEDs::AliAnalysisTaskSEDs(const char *name, AliRDHFCutsDstoKKpi* productioncuts, AliRDHFCutsDstoKKpi* analysiscuts):
67 AliAnalysisTaskSE(name),
75 fProdCuts(productioncuts),
76 fAnalysisCuts(analysiscuts)
78 // Default constructor
79 // Output slot #1 writes into a TList container
80 Int_t nptbins=fAnalysisCuts->GetNPtBins();
81 Float_t *ptlim=fAnalysisCuts->GetPtBinLimits();
82 SetPtBins(nptbins,ptlim);
84 DefineOutput(1,TList::Class()); //My private output
86 DefineOutput(2,TList::Class());
89 //________________________________________________________________________
90 void AliAnalysisTaskSEDs::SetPtBins(Int_t n, Float_t* lim){
91 // define pt bins for analysis
93 printf("Max. number of Pt bins = %d\n",kMaxPtBins);
100 for(Int_t i=5; i<kMaxPtBins+1; i++) fPtLimits[i]=99999999.;
103 for(Int_t i=0; i<fNPtBins+1; i++) fPtLimits[i]=lim[i];
104 for(Int_t i=fNPtBins+1; i<kMaxPtBins+1; i++) fPtLimits[i]=99999999.;
107 printf("Number of Pt bins = %d\n",fNPtBins);
108 for(Int_t i=0; i<fNPtBins+1; i++) printf(" Bin%d = %8.2f-%8.2f\n",i,fPtLimits[i],fPtLimits[i+1]);
111 //________________________________________________________________________
112 AliAnalysisTaskSEDs::~AliAnalysisTaskSEDs()
129 delete fAnalysisCuts;
134 //________________________________________________________________________
135 void AliAnalysisTaskSEDs::Init()
139 if(fDebug > 1) printf("AnalysisTaskSEDs::Init() \n");
141 fListCuts=new TList();
142 AliRDHFCutsDstoKKpi *production = new AliRDHFCutsDstoKKpi();
143 production=fProdCuts;
144 AliRDHFCutsDstoKKpi *analysis = new AliRDHFCutsDstoKKpi();
145 analysis=fAnalysisCuts;
147 fListCuts->Add(production);
148 fListCuts->Add(analysis);
149 PostData(2,fListCuts);
153 //________________________________________________________________________
154 void AliAnalysisTaskSEDs::UserCreateOutputObjects()
156 // Create the output container
158 if(fDebug > 1) printf("AnalysisTaskSEDs::UserCreateOutputObjects() \n");
160 // Several histograms are more conveniently managed in a TList
161 fOutput = new TList();
163 fOutput->SetName("OutputHistos");
165 Double_t massDs=TDatabasePDG::Instance()->GetParticle(431)->Mass();
166 Int_t nInvMassBins=(Int_t)(fMassRange/fMassBinSize+0.5);
167 if(nInvMassBins%2==1) nInvMassBins++;
168 Double_t minMass=massDs-0.5*nInvMassBins*fMassBinSize;
169 Double_t maxMass=massDs+0.5*nInvMassBins*fMassBinSize;
174 for(Int_t iType=0; iType<4; iType++){
175 for(Int_t i=0;i<fNPtBins;i++){
178 index=GetHistoIndex(i);
181 index=GetSignalHistoIndex(i);
184 index=GetBackgroundHistoIndex(i);
187 index=GetReflSignalHistoIndex(i);
189 hisname.Form("hMass%sPt%d",htype.Data(),i);
190 fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nInvMassBins,minMass,maxMass);
191 fMassHist[index]->Sumw2();
192 hisname.Form("hMass%sPt%dCuts",htype.Data(),i);
193 fMassHistCuts[index]=new TH1F(hisname.Data(),hisname.Data(),nInvMassBins,minMass,maxMass);
194 fMassHistCuts[index]->Sumw2();
195 hisname.Form("hMass%sPt%dphi",htype.Data(),i);
196 fMassHistPhi[index]=new TH1F(hisname.Data(),hisname.Data(),100,minMass,maxMass);
197 fMassHistPhi[index]->Sumw2();
198 hisname.Form("hMass%sPt%dphiCuts",htype.Data(),i);
199 fMassHistCutsPhi[index]=new TH1F(hisname.Data(),hisname.Data(),100,minMass,maxMass);
200 fMassHistCutsPhi[index]->Sumw2();
201 hisname.Form("hMass%sPt%dk0st",htype.Data(),i);
202 fMassHistK0st[index]=new TH1F(hisname.Data(),hisname.Data(),100,minMass,maxMass);
203 fMassHistK0st[index]->Sumw2();
204 hisname.Form("hMass%sPt%dk0stCuts",htype.Data(),i);
205 fMassHistCutsK0st[index]=new TH1F(hisname.Data(),hisname.Data(),100,minMass,maxMass);
206 fMassHistCutsK0st[index]->Sumw2();
207 hisname.Form("hCosP%sPt%d",htype.Data(),i);
208 fCosPHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.5,1.);
209 fCosPHist[index]->Sumw2();
210 hisname.Form("hDLen%sPt%d",htype.Data(),i);
211 fDLenHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.5);
212 fDLenHist[index]->Sumw2();
213 hisname.Form("hSumd02%sPt%d",htype.Data(),i);
214 fSumd02Hist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.,1.);
215 fSumd02Hist[index]->Sumw2();
216 hisname.Form("hSigVert%sPt%d",htype.Data(),i);
217 fSigVertHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
218 fSigVertHist[index]->Sumw2();
219 hisname.Form("hPtMax%sPt%d",htype.Data(),i);
220 fPtMaxHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.5,20.);
221 fPtMaxHist[index]->Sumw2();
222 hisname.Form("hPtCand%sPt%d",htype.Data(),i);
223 fPtCandHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.5,20.);
224 fPtCandHist[index]->Sumw2();
225 hisname.Form("hDCA%sPt%d",htype.Data(),i);
226 fDCAHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
227 fDCAHist[index]->Sumw2();
228 hisname.Form("hPtProng0%sPt%d",htype.Data(),i);
229 fPtProng0Hist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
230 fPtProng0Hist[index]->Sumw2();
231 hisname.Form("hPtProng1%sPt%d",htype.Data(),i);
232 fPtProng1Hist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
233 fPtProng1Hist[index]->Sumw2();
234 hisname.Form("hPtProng2%sPt%d",htype.Data(),i);
235 fPtProng2Hist[index]=new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
236 fPtProng2Hist[index]->Sumw2();
237 hisname.Form("hDalitz%sPt%d",htype.Data(),i);
238 fDalitz[index]=new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
239 fDalitz[index]->Sumw2();
240 hisname.Form("hDalitz%sPt%dphi",htype.Data(),i);
241 fDalitzPhi[index]=new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
242 fDalitzPhi[index]->Sumw2();
243 hisname.Form("hDalitz%sPt%dk0st",htype.Data(),i);
244 fDalitzK0st[index]=new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
245 fDalitzK0st[index]->Sumw2();
249 for(Int_t i=0; i<4*fNPtBins; i++){
250 fOutput->Add(fMassHist[i]);
251 fOutput->Add(fMassHistCuts[i]);
252 fOutput->Add(fMassHistPhi[i]);
253 fOutput->Add(fMassHistCutsPhi[i]);
254 fOutput->Add(fMassHistK0st[i]);
255 fOutput->Add(fMassHistCutsK0st[i]);
256 fOutput->Add(fCosPHist[i]);
257 fOutput->Add(fDLenHist[i]);
258 fOutput->Add(fSumd02Hist[i]);
259 fOutput->Add(fSigVertHist[i]);
260 fOutput->Add(fPtMaxHist[i]);
261 fOutput->Add(fPtCandHist[i]);
262 fOutput->Add(fDCAHist[i]);
263 fOutput->Add(fPtProng0Hist[i]);
264 fOutput->Add(fPtProng1Hist[i]);
265 fOutput->Add(fPtProng2Hist[i]);
266 fOutput->Add(fDalitz[i]);
267 fOutput->Add(fDalitzPhi[i]);
268 fOutput->Add(fDalitzK0st[i]);
271 fChanHist[0] = new TH1F("hChanAll", "KKpi and piKK candidates",4,-0.5,3.5);
272 fChanHist[1] = new TH1F("hChanSig", "KKpi and piKK candidates",4,-0.5,3.5);
273 fChanHist[2] = new TH1F("hChanBkg", "KKpi and piKK candidates",4,-0.5,3.5);
274 fChanHist[3] = new TH1F("hChanReflSig", "KKpi and piKK candidates",4,-0.5,3.5);
275 fChanHistCuts[0] = new TH1F("hChanAllCuts", "KKpi and piKK candidates",4,-0.5,3.5);
276 fChanHistCuts[1] = new TH1F("hChanSigCuts", "KKpi and piKK candidates",4,-0.5,3.5);
277 fChanHistCuts[2] = new TH1F("hChanBkgCuts", "KKpi and piKK candidates",4,-0.5,3.5);
278 fChanHistCuts[3] = new TH1F("hChanReflSigCuts", "KKpi and piKK candidates",4,-0.5,3.5);
279 for(Int_t i=0;i<4;i++){
280 fChanHist[i]->Sumw2();
281 fChanHist[i]->SetMinimum(0);
282 fChanHistCuts[i]->Sumw2();
283 fChanHistCuts[i]->SetMinimum(0);
284 fOutput->Add(fChanHist[i]);
285 fOutput->Add(fChanHistCuts[i]);
288 fHistNEvents = new TH1F("hNEvents", "Number of processed events",3,-1.5,1.5);
289 fHistNEvents->Sumw2();
290 fHistNEvents->SetMinimum(0);
291 fOutput->Add(fHistNEvents);
297 //________________________________________________________________________
298 void AliAnalysisTaskSEDs::UserExec(Option_t */*option*/)
300 // Ds selection for current event, fill mass histos and selecetion variable histo
301 // separate signal and backgound if fReadMC is activated
303 AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
304 fHistNEvents->Fill(0); // count event
305 // Post the data already here
309 TClonesArray *array3Prong = 0;
310 if(!aod && AODEvent() && IsStandardAOD()) {
311 // In case there is an AOD handler writing a standard AOD, use the AOD
312 // event in memory rather than the input (ESD) event.
313 aod = dynamic_cast<AliAODEvent*> (AODEvent());
314 // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
315 // have to taken from the AOD event hold by the AliAODExtension
316 AliAODHandler* aodHandler = (AliAODHandler*)
317 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
318 if(aodHandler->GetExtensions()) {
319 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
320 AliAODEvent *aodFromExt = ext->GetAOD();
321 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
324 array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
328 printf("AliAnalysisTaskSEDs::UserExec: Charm3Prong branch not found!\n");
333 TClonesArray *arrayMC=0;
334 AliAODMCHeader *mcHeader=0;
336 // AOD primary vertex
337 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
343 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
345 printf("AliAnalysisTaskSEDs::UserExec: MC particles branch not found!\n");
350 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
352 printf("AliAnalysisTaskSEDs::UserExec: MC header branch not found!\n");
357 Int_t n3Prong = array3Prong->GetEntriesFast();
358 if(fDebug>1) printf("Number of Ds->KKpi: %d\n",n3Prong);
361 Int_t pdgDstoKKpi[3]={321,321,211};
362 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
363 AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong);
366 Bool_t unsetvtx=kFALSE;
367 if(!d->GetOwnPrimaryVtx()){
368 d->SetOwnPrimaryVtx(vtx1);
372 Int_t retCodeProductionCuts=fProdCuts->IsSelected(d,AliRDHFCuts::kCandidate);
373 if(retCodeProductionCuts>0){
374 Int_t isKKpi=retCodeProductionCuts&1;
375 Int_t ispiKK=retCodeProductionCuts&2;
376 Int_t isPhi=retCodeProductionCuts&4;
377 Int_t isK0star=retCodeProductionCuts&8;
378 Double_t ptCand = d->Pt();
379 Int_t iPtBin=TMath::BinarySearch(fNPtBins,fPtLimits,(Float_t)ptCand);
380 Int_t retCodeAnalysisCuts=fAnalysisCuts->IsSelected(d,AliRDHFCuts::kCandidate);
381 Int_t isKKpiAC=retCodeAnalysisCuts&1;
382 Int_t ispiKKAC=retCodeAnalysisCuts&2;
383 Int_t isPhiAC=retCodeAnalysisCuts&4;
384 Int_t isK0starAC=retCodeAnalysisCuts&8;
388 labDs = d->MatchToMC(431,arrayMC,3,pdgDstoKKpi);
391 Double_t dlen=d->DecayLength();
392 Double_t cosp=d->CosPointingAngle();
393 Double_t pt0=d->PtProng(0);
394 Double_t pt1=d->PtProng(1);
395 Double_t pt2=d->PtProng(2);
396 Double_t sigvert=d->GetSigmaVert();
397 Double_t sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
398 Double_t dca=d->GetDCA();
400 for(Int_t i=0;i<3;i++){
401 if(d->PtProng(i)>ptmax)ptmax=d->PtProng(i);
404 Int_t index=GetHistoIndex(iPtBin);
409 if(isKKpiAC) typeAC+=1;
410 if(ispiKKAC) typeAC+=2;
411 fCosPHist[index]->Fill(cosp);
412 fDLenHist[index]->Fill(dlen);
413 fSigVertHist[index]->Fill(sigvert);
414 fSumd02Hist[index]->Fill(sumD02);
415 fPtMaxHist[index]->Fill(ptmax);
416 fPtCandHist[index]->Fill(ptCand);
417 fDCAHist[index]->Fill(dca);
418 fChanHist[0]->Fill(type);
419 fPtProng0Hist[index]->Fill(pt0);
420 fPtProng1Hist[index]->Fill(pt1);
421 fPtProng2Hist[index]->Fill(pt2);
423 if(retCodeAnalysisCuts>0) fChanHistCuts[0]->Fill(typeAC);
426 index=GetSignalHistoIndex(iPtBin);
427 fChanHist[1]->Fill(type);
428 if(retCodeAnalysisCuts>0) fChanHistCuts[1]->Fill(typeAC);
430 index=GetBackgroundHistoIndex(iPtBin);
431 fChanHist[2]->Fill(type);
432 if(retCodeAnalysisCuts>0) fChanHistCuts[2]->Fill(typeAC);
436 index=GetHistoIndex(iPtBin);
437 Double_t invMass=d->InvMassDsKKpi();
438 fMassHist[index]->Fill(invMass);
439 if(isPhi) fMassHistPhi[index]->Fill(invMass);
440 if(isK0star) fMassHistK0st[index]->Fill(invMass);
441 Double_t massKK=d->InvMass2Prongs(0,1,321,321);
442 Double_t massKp=d->InvMass2Prongs(1,2,321,211);
443 fDalitz[index]->Fill(massKK,massKp);
444 if(isPhi) fDalitzPhi[index]->Fill(massKK,massKp);
445 if(isK0star) fDalitzK0st[index]->Fill(massKK,massKp);
446 if(retCodeAnalysisCuts>0 && isKKpiAC){
447 fMassHistCuts[index]->Fill(invMass);
448 if(isPhiAC) fMassHistCutsPhi[index]->Fill(invMass);
449 if(isK0starAC) fMassHistCutsK0st[index]->Fill(invMass);
452 Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
453 AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
454 Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
457 index=GetSignalHistoIndex(iPtBin);
459 index=GetReflSignalHistoIndex(iPtBin);
462 index=GetBackgroundHistoIndex(iPtBin);
464 fMassHist[index]->Fill(invMass);
465 if(isPhi) fMassHistPhi[index]->Fill(invMass);
466 if(isK0star) fMassHistK0st[index]->Fill(invMass);
467 fCosPHist[index]->Fill(cosp);
468 fDLenHist[index]->Fill(dlen);
469 fSigVertHist[index]->Fill(sigvert);
470 fSumd02Hist[index]->Fill(sumD02);
471 fPtMaxHist[index]->Fill(ptmax);
472 fPtCandHist[index]->Fill(ptCand);
473 fDCAHist[index]->Fill(dca);
474 fPtProng0Hist[index]->Fill(pt0);
475 fPtProng1Hist[index]->Fill(pt1);
476 fPtProng2Hist[index]->Fill(pt2);
477 fDalitz[index]->Fill(massKK,massKp);
478 if(isPhi) fDalitzPhi[index]->Fill(massKK,massKp);
479 if(isK0star) fDalitzK0st[index]->Fill(massKK,massKp);
480 if(retCodeAnalysisCuts>0 && isKKpiAC){
481 fMassHistCuts[index]->Fill(invMass);
482 if(isPhiAC) fMassHistCutsPhi[index]->Fill(invMass);
483 if(isK0starAC) fMassHistCutsK0st[index]->Fill(invMass);
488 index=GetHistoIndex(iPtBin);
489 Double_t invMass=d->InvMassDspiKK();
490 fMassHist[index]->Fill(invMass);
491 if(isPhi) fMassHistPhi[index]->Fill(invMass);
492 if(isK0star) fMassHistK0st[index]->Fill(invMass);
493 Double_t massKK=d->InvMass2Prongs(1,2,321,321);
494 Double_t massKp=d->InvMass2Prongs(0,1,211,321);
495 fDalitz[index]->Fill(massKK,massKp);
496 if(isPhi) fDalitzPhi[index]->Fill(massKK,massKp);
497 if(isK0star) fDalitzK0st[index]->Fill(massKK,massKp);
498 if(retCodeAnalysisCuts>0 && ispiKKAC){
499 fMassHistCuts[index]->Fill(invMass);
500 if(isPhiAC) fMassHistCutsPhi[index]->Fill(invMass);
501 if(isK0starAC) fMassHistCutsK0st[index]->Fill(invMass);
504 Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
505 AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
506 Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
509 index=GetSignalHistoIndex(iPtBin);
511 index=GetReflSignalHistoIndex(iPtBin);
514 index=GetBackgroundHistoIndex(iPtBin);
516 fMassHist[index]->Fill(invMass);
517 if(isPhi) fMassHistPhi[index]->Fill(invMass);
518 if(isK0star) fMassHistK0st[index]->Fill(invMass);
519 fCosPHist[index]->Fill(cosp);
520 fDLenHist[index]->Fill(dlen);
521 fSigVertHist[index]->Fill(sigvert);
522 fSumd02Hist[index]->Fill(sumD02);
523 fPtMaxHist[index]->Fill(ptmax);
524 fPtCandHist[index]->Fill(ptCand);
525 fDCAHist[index]->Fill(dca);
526 fPtProng0Hist[index]->Fill(pt0);
527 fPtProng1Hist[index]->Fill(pt1);
528 fPtProng2Hist[index]->Fill(pt2);
529 fDalitz[index]->Fill(massKK,massKp);
530 if(isPhi) fDalitzPhi[index]->Fill(massKK,massKp);
531 if(isK0star) fDalitzK0st[index]->Fill(massKK,massKp);
532 if(retCodeAnalysisCuts>0 && ispiKKAC){
533 fMassHistCuts[index]->Fill(invMass);
534 if(isPhiAC) fMassHistCutsPhi[index]->Fill(invMass);
535 if(isK0starAC) fMassHistCutsK0st[index]->Fill(invMass);
540 if(unsetvtx) d->UnsetOwnPrimaryVtx();
548 //_________________________________________________________________
550 void AliAnalysisTaskSEDs::Terminate(Option_t */*option*/)
552 // Terminate analysis
554 if(fDebug > 1) printf("AnalysisTaskSEDs: Terminate() \n");
555 fOutput = dynamic_cast<TList*> (GetOutputData(1));
557 printf("ERROR: fOutput not available\n");
560 fHistNEvents = dynamic_cast<TH1F*>(fOutput->FindObject("hNEvents"));
561 fChanHist[0] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanAll"));
562 fChanHist[1] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanSig"));
563 fChanHist[2] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanBkg"));
564 fChanHist[3] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanReflSig"));
565 fChanHistCuts[0] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanAllCuts"));
566 fChanHistCuts[1] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanSigCuts"));
567 fChanHistCuts[2] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanBkgCuts"));
568 fChanHistCuts[3] = dynamic_cast<TH1F*>(fOutput->FindObject("hChanReflSigCuts"));
574 for(Int_t iType=0; iType<4; iType++){
575 for(Int_t i=0;i<fNPtBins;i++){
578 index=GetHistoIndex(i);
581 index=GetSignalHistoIndex(i);
584 index=GetBackgroundHistoIndex(i);
587 index=GetReflSignalHistoIndex(i);
589 hisname.Form("hMass%sPt%d",htype.Data(),i);
590 fMassHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
591 hisname.Form("hMass%sPt%dCuts",htype.Data(),i);
592 fMassHistCuts[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
593 hisname.Form("hMass%sPt%dphi",htype.Data(),i);
594 fMassHistPhi[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
595 hisname.Form("hMass%sPt%dphiCuts",htype.Data(),i);
596 fMassHistCutsPhi[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
597 hisname.Form("hMass%sPt%dk0st",htype.Data(),i);
598 fMassHistK0st[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
599 hisname.Form("hMass%sPt%dk0stCuts",htype.Data(),i);
600 fMassHistCutsK0st[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
601 hisname.Form("hCosP%sPt%d",htype.Data(),i);
602 fCosPHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
603 hisname.Form("hDLen%sPt%d",htype.Data(),i);
604 fDLenHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
605 hisname.Form("hSumd02%sPt%d",htype.Data(),i);
606 fSumd02Hist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
607 hisname.Form("hSigVert%sPt%d",htype.Data(),i);
608 fSigVertHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
609 hisname.Form("hPtMax%sPt%d",htype.Data(),i);
610 fPtMaxHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
611 hisname.Form("hPtCand%sPt%d",htype.Data(),i);
612 fPtCandHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
613 hisname.Form("hDCA%sPt%d",htype.Data(),i);
614 fDCAHist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
615 hisname.Form("hPtProng0%sPt%d",htype.Data(),i);
616 fPtProng0Hist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
617 hisname.Form("hPtProng1%sPt%d",htype.Data(),i);
618 fPtProng1Hist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
619 hisname.Form("hPtProng2%sPt%d",htype.Data(),i);
620 fPtProng2Hist[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
621 hisname.Form("hDalitz%sPt%d",htype.Data(),i);
622 fDalitz[index]=dynamic_cast<TH2F*>(fOutput->FindObject(hisname.Data()));
623 hisname.Form("hDalitz%sPt%dphi",htype.Data(),i);
624 fDalitzPhi[index]=dynamic_cast<TH2F*>(fOutput->FindObject(hisname.Data()));
625 hisname.Form("hDalitz%sPt%dk0st",htype.Data(),i);
626 fDalitzK0st[index]=dynamic_cast<TH2F*>(fOutput->FindObject(hisname.Data()));