1 /**************************************************************************
2 * Copyright(c) 1998-2008, 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 **************************************************************************/
16 /////////////////////////////////////////////////////////////
18 // AliAnalysisTaskSESignificane to calculate effects on
19 // significance of D mesons cut
20 // Authors: G. Ortona, ortona@to.infn.it
21 // F. Prino, prino@to.infn.it
22 // Renu Bala, bala@to.infn.it
23 // Chiara Bianchin, cbianchi@pd.infn.it
24 /////////////////////////////////////////////////////////////
26 #include <Riostream.h>
27 #include <TClonesArray.h>
33 #include <TDatabasePDG.h>
36 #include "AliAnalysisManager.h"
37 #include "AliAODHandler.h"
38 #include "AliAODEvent.h"
39 #include "AliAODVertex.h"
40 #include "AliAODTrack.h"
41 #include "AliAODMCHeader.h"
42 #include "AliAODMCParticle.h"
43 #include "AliAODRecoDecayHF3Prong.h"
44 #include "AliAODRecoDecayHF.h"
45 #include "AliAODRecoDecayHF2Prong.h"
46 #include "AliAODRecoDecayHF4Prong.h"
47 #include "AliAODRecoCascadeHF.h"
49 #include "AliAnalysisTaskSE.h"
50 #include "AliRDHFCutsDplustoKpipi.h"
51 #include "AliRDHFCutsD0toKpipipi.h"
52 #include "AliRDHFCutsDstoKKpi.h"
53 #include "AliRDHFCutsDStartoKpipi.h"
54 #include "AliRDHFCutsD0toKpi.h"
55 #include "AliRDHFCutsLctopKpi.h"
56 #include "AliMultiDimVector.h"
58 #include "AliAnalysisTaskSESignificance.h"
60 ClassImp(AliAnalysisTaskSESignificance)
63 //________________________________________________________________________
64 AliAnalysisTaskSESignificance::AliAnalysisTaskSESignificance():
79 // Default constructor
82 //________________________________________________________________________
83 AliAnalysisTaskSESignificance::AliAnalysisTaskSESignificance(const char *name, TList* listMDV,AliRDHFCuts *rdCuts,Int_t decaychannel,Int_t selectionlevel):
84 AliAnalysisTaskSE(name),
93 fDecChannel(decaychannel),
94 fSelectionlevel(selectionlevel),
121 SetMassLimits(0.15,pdg); //check range
122 fNPtBins=fRDCuts->GetNPtBins();
124 if(fDebug>1)fRDCuts->PrintAll();
125 // Output slot #1 writes into a TList container
126 DefineOutput(1,TList::Class()); //My private output
127 DefineOutput(2,TList::Class());
131 //________________________________________________________________________
132 AliAnalysisTaskSESignificance::~AliAnalysisTaskSESignificance()
156 //_________________________________________________________________
157 Bool_t AliAnalysisTaskSESignificance::CheckConsistency(){
159 Bool_t result = kTRUE;
161 const Int_t nvars=fRDCuts->GetNVars();//ForOpt();
162 //Float_t *vars = new Float_t[nvars];
163 Bool_t *varsforopt = fRDCuts->GetVarsForOpt();
164 Bool_t *uppervars = fRDCuts->GetIsUpperCut();
165 TString *names = fRDCuts->GetVarNames();
167 for(Int_t i=0;i<fNPtBins;i++){
168 TString mdvname=Form("multiDimVectorPtBin%d",i);
171 for(Int_t ivar=0;ivar<nvars;ivar++){
172 if(varsforopt[ivar]){
173 Float_t min = ((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetMinLimit(ic);
174 Float_t max = ((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetMaxLimit(ic);
176 AliFatal(Form("tight and loose cut for optimization variable number %d are the same in ptbin %d\n",ic,i));
179 Bool_t lowermdv = ((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetGreaterThan(ic);
180 if(uppervars[ivar]&&lowermdv){
181 AliFatal(Form("%s is declared as uppercut, but as been given tighter cut larger then loose cut in ptbin %d \n ---please check your cuts \n ",names[ivar].Data(),i));
184 if(!uppervars[ivar]&&!lowermdv){
185 AliFatal(Form("%s is declared as lower cut, but as been given tighter cut smaller then loose cut in ptbin %d \n ---please check your cuts \n",names[ivar].Data(),i));
194 //_________________________________________________________________
195 void AliAnalysisTaskSESignificance::SetMassLimits(Float_t range, Int_t pdg){
197 Int_t abspdg=TMath::Abs(pdg);
198 mass=TDatabasePDG::Instance()->GetParticle(abspdg)->Mass();
199 fUpmasslimit = mass+range;
200 fLowmasslimit = mass-range;
202 //_________________________________________________________________
203 void AliAnalysisTaskSESignificance::SetMassLimits(Float_t lowlimit, Float_t uplimit){
206 fUpmasslimit = uplimit;
207 fLowmasslimit = lowlimit;
213 //________________________________________________________________________
214 void AliAnalysisTaskSESignificance::LocalInit()
218 if(fDebug > 1) printf("AnalysisTaskSESignificance::Init() \n");
220 TList *mdvList = new TList();
228 //________________________________________________________________________
229 void AliAnalysisTaskSESignificance::UserCreateOutputObjects()
231 // Create the output container
233 if(fDebug > 1) printf("AnalysisTaskSESignificance::UserCreateOutputObjects() \n");
235 // Several histograms are more conveniently managed in a TList
236 fOutput = new TList();
238 fOutput->SetName("OutputHistos");
240 //same number of steps in each multiDimVectorPtBin%d !
241 Int_t nHist=((AliMultiDimVector*)fCutList->FindObject("multiDimVectorPtBin0"))->GetNTotCells();
242 cout<<"ncells = "<<nHist<<" n ptbins = "<<fNPtBins<<endl;
243 nHist=nHist*fNPtBins;
244 cout<<"Total = "<<nHist<<endl;
245 for(Int_t i=0;i<nHist;i++){
253 hisname.Form("hMass_%d",i);
254 signame.Form("hSig_%d",i);
255 bkgname.Form("hBkg_%d",i);
256 rflname.Form("hRfl_%d",i);
258 title.Form("Invariant mass;M[GeV/c^{2}];Entries");
260 fMassHist[i]=new TH1F(hisname.Data(),title.Data(),fNBins,fLowmasslimit,fUpmasslimit);
261 fMassHist[i]->Sumw2();
262 fOutput->Add(fMassHist[i]);
265 fSigHist[i]=new TH1F(signame.Data(),title.Data(),fNBins,fLowmasslimit,fUpmasslimit);
266 fSigHist[i]->Sumw2();
267 fOutput->Add(fSigHist[i]);
269 fBkgHist[i]=new TH1F(bkgname.Data(),title.Data(),fNBins,fLowmasslimit,fUpmasslimit);
270 fBkgHist[i]->Sumw2();
271 fOutput->Add(fBkgHist[i]);
273 if(fDecChannel != AliAnalysisTaskSESignificance::kDplustoKpipi){
274 fRflHist[i]=new TH1F(rflname.Data(),title.Data(),fNBins,fLowmasslimit,fUpmasslimit);
275 fRflHist[i]->Sumw2();
276 fOutput->Add(fRflHist[i]);
281 fHistNEvents=new TH1F("fHistNEvents","Number of AODs scanned",5,0,5.);
282 fHistNEvents->GetXaxis()->SetBinLabel(1,"nEventsAnal");
283 fHistNEvents->GetXaxis()->SetBinLabel(2,"nEvNotSelected");
284 fHistNEvents->GetXaxis()->SetBinLabel(3,"nCandidatesSelected");
285 fHistNEvents->GetXaxis()->SetBinLabel(4,"nTotEntries Mass hists");
286 fHistNEvents->GetXaxis()->SetBinLabel(5,"Pile-up Rej");
287 fHistNEvents->GetXaxis()->SetNdivisions(1,kFALSE);
288 fOutput->Add(fHistNEvents);
294 //________________________________________________________________________
295 void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
297 // Execute analysis for current event:
298 // heavy flavor candidates association to MC truth
300 AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
301 if(fDebug>2) printf("Analysing decay %d\n",fDecChannel);
302 // Post the data already here
304 TClonesArray *arrayProng =0;
306 if(!aod && AODEvent() && IsStandardAOD()) {
307 // In case there is an AOD handler writing a standard AOD, use the AOD
308 // event in memory rather than the input (ESD) event.
309 aod = dynamic_cast<AliAODEvent*> (AODEvent());
310 // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
311 // have to taken from the AOD event hold by the AliAODExtension
312 AliAODHandler* aodHandler = (AliAODHandler*)
313 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
314 if(aodHandler->GetExtensions()) {
316 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
317 AliAODEvent *aodFromExt = ext->GetAOD();
322 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
325 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi");
328 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Dstar");
331 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
334 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong");
337 arrayProng=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
344 arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
347 arrayProng=(TClonesArray*)aod->GetList()->FindObject("D0toKpi");
350 arrayProng=(TClonesArray*)aod->GetList()->FindObject("Dstar");
353 arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
356 arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm4Prong");
359 arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
364 AliError("AliAnalysisTaskSESignificance::UserExec:Branch not found!\n");
368 // fix for temporary bug in ESDfilter
369 // the AODs with null vertex pointer didn't pass the PhysSel
370 if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001) return;
371 TClonesArray *arrayMC=0;
372 AliAODMCHeader *mcHeader=0;
377 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
379 AliWarning("AliAnalysisTaskSESignificance::UserExec:MC particles branch not found!\n");
384 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
386 AliError("AliAnalysisTaskSESignificance::UserExec:MC header branch not found!\n");
391 fHistNEvents->Fill(0); // count event
393 AliAODRecoDecayHF *d=0;
395 Int_t *pdgdaughters=0x0;
402 pdgdaughters =new Int_t[3];
403 pdgdaughters[0]=211;//pi
404 pdgdaughters[1]=321;//K
405 pdgdaughters[2]=211;//pi
411 pdgdaughters =new Int_t[2];
412 pdgdaughters[0]=211;//pi
413 pdgdaughters[1]=321;//K
419 pdgdaughters =new Int_t[3];
420 pdgdaughters[1]=211;//pi
421 pdgdaughters[0]=321;//K
422 pdgdaughters[2]=211;//pi (soft?)
428 pdgdaughters =new Int_t[3];
429 pdgdaughters[0]=321;//K
430 pdgdaughters[1]=321;//K
431 pdgdaughters[2]=211;//pi
437 pdgdaughters =new Int_t[4];
447 pdgdaughters =new Int_t[3];
448 pdgdaughters[0]=2212;//p
449 pdgdaughters[1]=321;//K
450 pdgdaughters[2]=211;//pi
456 Int_t nHistpermv=((AliMultiDimVector*)fCutList->FindObject("multiDimVectorPtBin0"))->GetNTotCells();
457 Int_t nProng = arrayProng->GetEntriesFast();
458 if(fDebug>1) printf("Number of D2H: %d\n",nProng);
460 if(!fRDCuts->IsEventSelected(aod)){
461 fHistNEvents->Fill(1);
462 if(fRDCuts->GetWhyRejection()==1) // rejected for pileup
463 fHistNEvents->Fill(4);
467 for (Int_t iProng = 0; iProng < nProng; iProng++) {
469 d=(AliAODRecoDecayHF*)arrayProng->UncheckedAt(iProng);
471 Bool_t isFidAcc = fRDCuts->IsInFiducialAcceptance(d->Pt(),d->Y(absPdgMom));
472 Int_t isSelected=fRDCuts->IsSelected(d,fSelectionlevel,aod);
474 if(isSelected&&isFidAcc) {
475 fHistNEvents->Fill(2); // count selected with loosest cuts
476 if(fDebug>1) printf("+++++++Is Selected\n");
478 Double_t* invMass=0x0;
480 CalculateInvMasses(d,invMass,nmasses);
482 const Int_t nvars=fRDCuts->GetNVarsForOpt();
483 Float_t *vars = new Float_t[nvars];
486 fRDCuts->GetCutVarsForOpt(d,vars,nvars,pdgdaughters);
487 Int_t ptbin=fRDCuts->PtBin(d->Pt());
488 if(ptbin==-1) continue;
489 TString mdvname=Form("multiDimVectorPtBin%d",ptbin);
490 ULong64_t *addresses = ((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetGlobalAddressesAboveCuts(vars,(Float_t)d->Pt(),nVals);
491 if(fDebug>1)printf("nvals = %d\n",nVals);
492 for(Int_t ivals=0;ivals<nVals;ivals++){
493 if(addresses[ivals]>=((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetNTotCells()){
494 if (fDebug>1) printf("Overflow!!\n");
498 fHistNEvents->Fill(3);
500 //fill the histograms with the appropriate method
501 switch (fDecChannel){
503 FillDplus(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
506 FillD02p(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
509 FillDstar(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
512 FillDs(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
515 FillD04p(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
518 FillLambdac(d,arrayMC,(Int_t)(ptbin*nHistpermv+addresses[ivals]),invMass,isSelected);
533 //***************************************************************************
535 // Methods used in the UserExec
537 void AliAnalysisTaskSESignificance::CalculateInvMasses(AliAODRecoDecayHF* d,Double_t*& masses,Int_t& nmasses){
538 //Calculates all the possible invariant masses for each candidate
539 //NB: the implementation for each candidate is responsibility of the corresponding developer
543 //D+ -- Giacomo, Renu ?
546 masses=new Double_t[nmasses];
547 Int_t pdgdaughters[3] = {211,321,211};
548 masses[0]=d->InvMass(3,(UInt_t*)pdgdaughters);
556 masses=new Double_t[nmasses];
557 Int_t pdgdaughtersD0[ndght]={211,321};//pi,K
558 masses[0]=d->InvMass(ndght,(UInt_t*)pdgdaughtersD0); //D0
559 Int_t pdgdaughtersD0bar[ndght]={321,211};//K,pi
560 masses[1]=d->InvMass(ndght,(UInt_t*)pdgdaughtersD0bar); //D0bar
564 //D* -- ? Yifei, Alessandro
570 //Ds -- Sergey, Sahdana
574 masses=new Double_t[nmasses];
575 Int_t pdgdaughtersDsKKpi[ndght]={321,321,211};//K,K,pi
576 masses[0]=d->InvMass(ndght,(UInt_t*)pdgdaughtersDsKKpi); //Ds
577 Int_t pdgdaughtersDspiKK[ndght]={211,321,321};//pi,K,K
578 masses[1]=d->InvMass(ndght,(UInt_t*)pdgdaughtersDspiKK); //Dsbar
584 //D0 (Kpipipi) -- ? Rossella, Fabio ???
590 //Lambda_c -- Rossella
600 //********************************************************************************************
602 //Methods to fill the istograms with MC information, one for each candidate
603 //NB: the implementation for each candidate is responsibility of the corresponding developer
605 void AliAnalysisTaskSESignificance::FillDplus(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Double_t* masses,Int_t isSel){
608 AliError("Candidate not selected\n");
612 if(fPartOrAndAntiPart*d->GetCharge()<0)return;
614 fMassHist[index]->Fill(masses[0]);
616 Int_t pdgdaughters[3] = {211,321,211};
620 lab = d->MatchToMC(411,arrayMC,3,pdgdaughters);
622 fSigHist[index]->Fill(masses[0]);
624 fBkgHist[index]->Fill(masses[0]);
630 void AliAnalysisTaskSESignificance::FillD02p(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Double_t* masses,Int_t isSel){
636 AliError("Masses not calculated\n");
639 if((isSel==1 || isSel==3) && fPartOrAndAntiPart>=0) fMassHist[index]->Fill(masses[0]);
640 if(isSel>=2 && fPartOrAndAntiPart<=0) fMassHist[index]->Fill(masses[1]);
650 Int_t pdgdaughters[2];
651 pdgdaughters[0]=211;//pi
652 pdgdaughters[1]=321;//K
656 matchtoMC = d->MatchToMC(absPdgMom,arrayMC,nprongs,pdgdaughters);
658 Int_t prongPdgPlus=421,prongPdgMinus=(-1)*421;
659 if((isSel==1 || isSel==3) && fPartOrAndAntiPart>=0){ //D0
661 AliAODMCParticle *dMC = (AliAODMCParticle*)arrayMC->At(matchtoMC);
662 Int_t pdgMC = dMC->GetPdgCode();
664 if(pdgMC==prongPdgPlus) fSigHist[index]->Fill(masses[0]);
665 else fRflHist[index]->Fill(masses[0]);
667 } else fBkgHist[index]->Fill(masses[0]);
670 if(isSel>=2 && fPartOrAndAntiPart<=0){ //D0bar
672 AliAODMCParticle *dMC = (AliAODMCParticle*)arrayMC->At(matchtoMC);
673 Int_t pdgMC = dMC->GetPdgCode();
675 if(pdgMC==prongPdgMinus) fSigHist[index]->Fill(masses[1]);
676 else fRflHist[index]->Fill(masses[1]);
677 } else fBkgHist[index]->Fill(masses[1]);
682 void AliAnalysisTaskSESignificance::FillDstar(AliAODRecoDecayHF* /*d*/,TClonesArray */*arrayMC*/,Int_t /*index*/,Double_t* /*masses*/,Int_t /*matchtoMC*/){
685 AliInfo("Dstar channel not implemented\n");
690 void AliAnalysisTaskSESignificance::FillDs(AliAODRecoDecayHF* d,TClonesArray *arrayMC,Int_t index,Double_t* masses,Int_t isSel){
692 //AliInfo("Ds channel not implemented\n");
696 AliError("Masses not calculated\n");
700 Int_t pdgDstoKKpi[3]={321,321,211};
703 labDs = d->MatchToMC(431,arrayMC,3,pdgDstoKKpi);
707 if(isSel&1 && fPartOrAndAntiPart*d->GetCharge()>=0) {
709 fMassHist[index]->Fill(masses[0]);
714 Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
715 AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
716 Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
720 fSigHist[index]->Fill(masses[0]); //signal
722 fRflHist[index]->Fill(masses[0]); //Reflected signal
725 fBkgHist[index]->Fill(masses[0]); // Background
730 if(isSel&2 && fPartOrAndAntiPart*d->GetCharge()>=0){
731 fMassHist[index]->Fill(masses[1]);
734 Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
735 AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
736 Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
740 fSigHist[index]->Fill(masses[1]);
742 fRflHist[index]->Fill(masses[1]);
745 fBkgHist[index]->Fill(masses[1]);
756 // isKKpi=isSelected&1;
757 // ispiKK=isSelected&2;
759 // Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
760 // AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
761 // Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
764 // if(pdgCode0==321){
765 // fSigHist[index]->Fill(masses[0]);
767 // fRflHist[index]->Fill(masses[0]);
771 // if(pdgCode0==211){
772 // fSigHist[index]->Fill(masses[1]);
774 // fRflHist[index]->Fill(masses[1]);
780 void AliAnalysisTaskSESignificance::FillD04p(AliAODRecoDecayHF* /*d*/,TClonesArray */*arrayMC*/,Int_t /*index*/,Double_t* /*masses*/,Int_t /*matchtoMC*/){
781 //D0->Kpipipi channel
782 AliInfo("D0 in 4 prongs channel not implemented\n");
786 void AliAnalysisTaskSESignificance::FillLambdac(AliAODRecoDecayHF* /*d*/,TClonesArray */*arrayMC*/,Int_t /*index*/,Double_t* /*masses*/,Int_t /*matchtoMC*/){
787 AliInfo("Lambdac channel not implemented\n");
793 // ispKpi=isSelected&1;
794 // ispiKp=isSelected&2;
796 // Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
797 // AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(labDau0);
798 // Int_t pdgCode0=TMath::Abs(p->GetPdgCode());
800 // if(pdgCode0==2212){
801 // fSigHist[index]->Fill(invMass[0]);
803 // fRflHist[index]->Fill(invMass[0]);
807 // if(pdgCode0==211){
808 // fSigHist[index]->Fill(invMass[1]);
810 // fRflHist[index]->Fill(invMass[1]);
821 //________________________________________________________________________
822 void AliAnalysisTaskSESignificance::Terminate(Option_t */*option*/)
824 // Terminate analysis
826 if(fDebug > 1) printf("AnalysisTaskSESignificance: Terminate() \n");
829 fOutput = dynamic_cast<TList*> (GetOutputData(1));
831 printf("ERROR: fOutput not available\n");
835 fCutList = dynamic_cast<TList*> (GetOutputData(2));
837 printf("ERROR: fCutList not available\n");
841 AliMultiDimVector* mdvtmp=(AliMultiDimVector*)fCutList->FindObject("multiDimVectorPtBin0");
843 cout<<"multidimvec not found in TList"<<endl;
847 Int_t nHist=mdvtmp->GetNTotCells();
848 TCanvas *c1=new TCanvas("c1","Invariant mass distribution - loose cuts",500,500);
850 for(Int_t i=0;i<nHist;i++){
857 hisname.Form("hMass_%d",i);
858 signame.Form("hSig_%d",i);
859 bkgname.Form("hBkg_%d",i);
860 rflname.Form("hRfl_%d",i);
862 fMassHist[i]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data()));
864 if (!drawn && fMassHist[i]->GetEntries() > 0){
866 fMassHist[i]->Draw();
871 fSigHist[i]=dynamic_cast<TH1F*>(fOutput->FindObject(signame.Data()));
872 fBkgHist[i]=dynamic_cast<TH1F*>(fOutput->FindObject(bkgname.Data()));
873 if(fDecChannel != AliAnalysisTaskSESignificance::kDplustoKpipi) fRflHist[i]=dynamic_cast<TH1F*>(fOutput->FindObject(rflname.Data()));
883 //-------------------------------------------