Coverity
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 6 Feb 2011 23:31:32 +0000 (23:31 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 6 Feb 2011 23:31:32 +0000 (23:31 +0000)
16 files changed:
PWG3/vertexingHF/AliAnalysisTaskMEVertexingHF.cxx
PWG3/vertexingHF/AliAnalysisTaskSEBkgLikeSignD0.cxx
PWG3/vertexingHF/AliAnalysisTaskSECompareHF.cxx
PWG3/vertexingHF/AliAnalysisTaskSED0Mass.cxx
PWG3/vertexingHF/AliAnalysisTaskSEDplus.cxx
PWG3/vertexingHF/AliAnalysisTaskSEDs.cxx
PWG3/vertexingHF/AliAnalysisTaskSEHFQA.cxx
PWG3/vertexingHF/AliAnalysisTaskSELambdac.cxx
PWG3/vertexingHF/AliAnalysisTaskSEMonitNorm.cxx
PWG3/vertexingHF/AliAnalysisTaskSESelectHF.cxx
PWG3/vertexingHF/AliAnalysisTaskSESignificance.cxx
PWG3/vertexingHF/AliAnalysisVertexingHF.cxx
PWG3/vertexingHF/AliHFMassFitter.cxx
PWG3/vertexingHF/AliRDHFCuts.cxx
PWG3/vertexingHF/AliRDHFCutsLctopKpi.cxx
PWG3/vertexingHF/macros/ReadAODVertexingHF.C

index acc3f75..ee9e379 100644 (file)
@@ -199,7 +199,8 @@ void AliAnalysisTaskMEVertexingHF::UserExec(Option_t *)
     return;
   }
   Int_t contribCopy=nContributors[0];
-  AliVVertex* newVertex=new AliESDVertex(vtxPos,vtxSigma,chi2,contribCopy);
+  Double_t vtxCov[6]={vtxSigma[0]*vtxSigma[0],0,vtxSigma[1]*vtxSigma[1],0,0,vtxSigma[2]*vtxSigma[2]};
+  AliVVertex* newVertex=new AliESDVertex(vtxPos,vtxCov,chi2,contribCopy);
   newVertex->SetTitle(primTitleFirst.Data());
   fMixedEvent->SetPrimaryVertex(newVertex);
 
index 3f4fa5f..31282c4 100644 (file)
@@ -237,7 +237,7 @@ void AliAnalysisTaskSEBkgLikeSignD0::UserExec(Option_t */*option*/)
       // load like sign candidates
       arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign2Prong");
     }
-  } else {
+  } else if(aod) {
     // load D0 candidates                                                   
     arrayD0toKpi=(TClonesArray*)aod->GetList()->FindObject("D0toKpi");
     // load like sign candidates
index 8ee6cca..8e297c5 100644 (file)
@@ -163,7 +163,7 @@ void AliAnalysisTaskSECompareHF::UserExec(Option_t */*option*/)
       // load D*+ candidates                                                   
       inputArrayDstar = (TClonesArray*)aodFromExt->GetList()->FindObject("Dstar");
     }
-  } else {
+  } else if(aod) {
     // load HF vertices                
     inputArrayVertices = (TClonesArray*)aod->GetList()->FindObject("VerticesHF");
     // load D0->Kpi candidates                                                 
index 2e7377b..99b5c35 100644 (file)
@@ -580,12 +580,12 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
       AliAODEvent* aodFromExt = ext->GetAOD();
       inputArray=(TClonesArray*)aodFromExt->GetList()->FindObject(bname.Data());
     }
-  } else {
+  } else if(aod) {
     inputArray=(TClonesArray*)aod->GetList()->FindObject(bname.Data());
   }
 
 
-  if(!inputArray) {
+  if(!inputArray || !aod) {
     printf("AliAnalysisTaskSED0Mass::UserExec: input branch not found!\n");
     return;
   }
index bb72e94..beac987 100644 (file)
@@ -781,7 +781,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
       array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
       arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign3Prong");
     }
-  } else {
+  } else if(aod) {
     array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
     arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong");
   }
index 451a189..1d17833 100644 (file)
@@ -411,7 +411,7 @@ void AliAnalysisTaskSEDs::UserExec(Option_t */*option*/)
       AliAODEvent *aodFromExt = ext->GetAOD();
       array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
     }
-  } else {
+  } else if(aod) {
     array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
   }
 
index 768fcf0..60ad193 100644 (file)
@@ -384,7 +384,7 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
        break; 
       }
     }
-  } else {
+  } else if(aod) {
     switch(fDecayChannel){
     case 0:
       arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
@@ -419,6 +419,7 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
     fNEntries->Fill(2);
   }
   
+  if(!aod) return;
   // fix for temporary bug in ESDfilter 
   // the AODs with null vertex pointer didn't pass the PhysSel
   if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001) return;
index 37af1de..d76e0ba 100644 (file)
@@ -195,15 +195,10 @@ void AliAnalysisTaskSELambdac::Init()
   if(fDebug > 1) printf("AnalysisTaskSELambdac::Init() \n");
 
   fListCuts=new TList();
-  AliRDHFCutsLctopKpi *production = new AliRDHFCutsLctopKpi();
-    production=fRDCutsProduction;
 
-  AliRDHFCutsLctopKpi *analysis = new AliRDHFCutsLctopKpi();
-  analysis=fRDCutsAnalysis;
-
-   fListCuts->Add(analysis);
-   fListCuts->Add(production);
-   PostData(2,fListCuts);
+  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsAnalysis));
+  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsProduction));
+  PostData(2,fListCuts);
   return;
 }
 
@@ -494,12 +489,12 @@ void AliAnalysisTaskSELambdac::UserExec(Option_t */*option*/)
       array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
       arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign3Prong");
     }
-  } else {
+  } else if(aod) {
     array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
     arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong");
   }
 
-  if(!array3Prong) {
+  if(!array3Prong || !aod) {
     printf("AliAnalysisTaskSELambdac::UserExec: Charm3Prong branch not found!\n");
     return;
   }
index 61840e8..2122ed9 100644 (file)
@@ -154,7 +154,11 @@ void AliAnalysisTaskSEMonitNorm::UserExec(Option_t *)
     return;
   }
   AliESDEvent* esdE = (AliESDEvent*) InputEvent();
-  
+  if (!esdE) {
+    Printf("ERROR: fESD not available");
+    return;
+  }
+
   // Select PHYSICS events (type=7, for data) and MC events (type=0)
   // fCheckEventType is kFALSE if fReadMC is kTRUE, hence check is skipped
   if(esdE->GetEventType()!=7 ) return;
index 68984de..e854461 100644 (file)
@@ -125,7 +125,7 @@ void AliAnalysisTaskSESelectHF::UserExec(Option_t */*option*/)
       // load D0 candidates                                                   
       inputArrayD0toKpi=(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi");
     }
-  } else {
+  } else if(aodIn) {
     // load D0 candidates                                                   
     inputArrayD0toKpi=(TClonesArray*)aodIn->GetList()->FindObject("D0toKpi");
   }
index d3a4615..8c66aae 100644 (file)
@@ -404,7 +404,7 @@ void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
        break; 
       }
     }
-  } else {
+  } else if(aod) {
     switch(fDecChannel){
     case 0:
       arrayProng=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
@@ -426,7 +426,7 @@ void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
       break; 
     }
   }
-  if(!arrayProng) {
+  if(!aod || !arrayProng) {
     AliError("AliAnalysisTaskSESignificance::UserExec:Branch not found!\n");
     return;
   }
@@ -442,8 +442,8 @@ void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
     
     arrayMC =  (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
     if(!arrayMC) {
-      AliWarning("AliAnalysisTaskSESignificance::UserExec:MC particles branch not found!\n");
-      //    return;
+      AliError("AliAnalysisTaskSESignificance::UserExec:MC particles branch not found!\n");
+      return;
     }
     
     // load MC header
@@ -586,7 +586,7 @@ void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
       for(Int_t ivals=0;ivals<nVals;ivals++){
        if(addresses[ivals]>=((AliMultiDimVector*)fCutList->FindObject(mdvname.Data()))->GetNTotCells()){
          if (fDebug>1) printf("Overflow!!\n");
-         delete addresses;
+         delete [] addresses;
          return;
        }
 
@@ -617,6 +617,7 @@ void AliAnalysisTaskSESignificance::UserExec(Option_t */*option*/)
        }
        
       }
+      delete [] addresses;
     }// end if selected
     
   }
index 1db45fc..2bf5ae3 100644 (file)
@@ -205,7 +205,7 @@ AliAnalysisVertexingHF::~AliAnalysisVertexingHF() {
   if(fCutsLctoV0) { delete fCutsLctoV0; fCutsLctoV0=0; }
   if(fCutsD0toKpipipi) { delete fCutsD0toKpipipi; fCutsD0toKpipipi=0; }
   if(fCutsDStartoKpipi) { delete fCutsDStartoKpipi; fCutsDStartoKpipi=0; }
-  if(fAODMap) { delete fAODMap; fAODMap=0; }
+  if(fAODMap) { delete [] fAODMap; fAODMap=0; }
   if(fMassCalc2) { delete fMassCalc2; fMassCalc2=0; }
   if(fMassCalc3) { delete fMassCalc3; fMassCalc3=0; }
   if(fMassCalc4) { delete fMassCalc4; fMassCalc4=0; }
@@ -2250,8 +2250,8 @@ AliAODv0* AliAnalysisVertexingHF::TransformESDv0toAODv0(AliESDv0 *esdV0, TObjArr
   AliAODv0 *aodV0 = new AliAODv0(vertexV0,dcaV0Daughters,dcaV0ToPrimVertex,pmom,nmom,dcaV0DaughterToPrimVertex);
   aodV0->SetOnFlyStatus(esdV0->GetOnFlyStatus());
 
-  if(trackesdV0) {delete trackesdV0; trackesdV0=NULL;}
-  if(primVertexAOD) {delete primVertexAOD; primVertexAOD=NULL;}
+  delete trackesdV0;
+  delete primVertexAOD;
 
   return aodV0;
 }
index b011f58..cd12aa5 100644 (file)
@@ -1301,13 +1301,16 @@ void  AliHFMassFitter::GetFitPars(Float_t *vector) const {
 void AliHFMassFitter::IntS(Float_t *valuewitherror) const {
 
   //gives the integral of signal obtained from fit parameters
-  if(!valuewitherror)valuewitherror=new Float_t[2];
+  if(!valuewitherror) {
+    printf("AliHFMassFitter::IntS: got a null pointer\n");
+    return;
+  }
 
   Int_t index=fParsSize/2 - 3;
   valuewitherror[0]=fFitPars[index];
   index=fParsSize - 3;
   valuewitherror[1]=fFitPars[index];
-  }
+}
 
 
 //_________________________________________________________________________
index 0278c7c..c2f5eec 100644 (file)
@@ -258,16 +258,16 @@ Bool_t AliRDHFCuts::AreDaughtersSelected(AliAODRecoDecayHF *d) const {
   // Daughter tracks selection
   // 
   if(!fTrackCuts) return kTRUE;
-
   Int_t ndaughters = d->GetNDaughters();
   AliAODVertex *vAOD = d->GetPrimaryVtx();
   Double_t pos[3],cov[6];
   vAOD->GetXYZ(pos);
   vAOD->GetCovarianceMatrix(cov);
   const AliESDVertex vESD(pos,cov,100.,100);
-
+  
   Bool_t retval=kTRUE;
-
+  
   for(Int_t idg=0; idg<ndaughters; idg++) {
     AliAODTrack *dgTrack = (AliAODTrack*)d->GetDaughter(idg);
     if(!dgTrack) {retval = kFALSE; continue;}
@@ -276,7 +276,7 @@ Bool_t AliRDHFCuts::AreDaughtersSelected(AliAODRecoDecayHF *d) const {
 
     if(!IsDaughterSelected(dgTrack,&vESD,fTrackCuts)) retval = kFALSE;
   }
-
+  
   return retval;
 }
 //---------------------------------------------------------------------------
index d64d4ca..dbe6249 100644 (file)
@@ -310,7 +310,6 @@ Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEv
     if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
     if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
    
-    if(!returnvalue) return 0;
   }
 
   if(fUsePID || selectionLevel==AliRDHFCuts::kPID) returnvaluePID = IsSelectedPID(d);
index be79b26..afb7f46 100644 (file)
@@ -7,6 +7,9 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
   // Origin: A.Dainese
   //
 
+  TStopwatch t;
+  t.Start();
+
   Bool_t useParFiles=kFALSE;
   gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/macros/LoadLibraries.C");
   LoadLibraries(useParFiles);
@@ -58,54 +61,25 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
     (TClonesArray*)aod->GetList()->FindObject("CascadesHF"); 
     
 
-  Double_t cutsD0[9]=
-  // cutsD0[0] = inv. mass half width [GeV]
-  // cutsD0[1] = dca [cm]
-  // cutsD0[2] = cosThetaStar
-  // cutsD0[3] = pTK [GeV/c]
-  // cutsD0[4] = pTPi [GeV/c]
-  // cutsD0[5] = d0K [cm]   upper limit!
-  // cutsD0[6] = d0Pi [cm]  upper limit!
-  // cutsD0[7] = d0d0 [cm^2]
-  // cutsD0[8] = cosThetaPoint
-                     {1000.,
-                     100000.,
-                     1.1,
-                     0.,
-                     0.,
-                     100000.,
-                     100000.,
-                     100000000.,
-                     -1.1}; 
-  Double_t cutsDstar[5]=
-    // (to be passed to AliAODRecoCascadeHF::SelectDstar())
-    // 0 = inv. mass half width of D* [GeV]
-    // 1 = half width of (M_Kpipi-M_Kpi) [GeV]
-    // 2 = PtMin of pi_s [GeV/c]
-    // 3 = PtMax of pi_s [GeV/c]
-    // 4 = theta, angle between the trace of pi_s and D0 decay plane [rad]
-                     {999999.,
-                     999999.,
-                     0.1, 
-                     1.0, 
-                     0.5};
-
-  Double_t cutsLctoV0[9]=// cuts on Lambdac candidates to V0+bachelor
-                        // (to be passed to AliAODRecoDecayHF3Prong::SelectLctoV0())
-                        // 0 = inv. mass half width in K0s hypothesis [GeV]   
-                        // 1 = inv. mass half width in Lambda hypothesis [GeV]   
-                        // 2 = inv. mass V0 in K0s hypothesis half width [GeV]   
-                        // 3 = inv. mass V0 in Lambda hypothesis half width [GeV]   
-                        // 4 = pT min Bachelor track [GeV/c]
-                        // 5 = pT min V0-Positive track [GeV/c]
-                        // 6 = pT min V0-Negative track [GeV/c]
-                        // 7 = dca cut on the V0 (cm)
-                        // 8 = dca cut on the cascade (cm)
-    {2.0,2.0,1.0,1.0,0.0,0.0,0.0,1000.,1000.};
 
   Int_t nTotHF=0,nTotD0toKpi=0,nTotDstar=0,nTot3Prong=0,nTotCasc=0;
   AliAODVertex *vtx1=0;
 
+  AliRDHFCutsD0toKpi *cutsD0toKpi = new AliRDHFCutsD0toKpi("CutsD0toKpi");
+  cutsD0toKpi->SetStandardCutsPP2010();
+  cutsD0toKpi->SetRemoveDaughtersFromPrim(kFALSE);
+
+  AliRDHFCutsDStartoKpipi *cutsDStar = new AliRDHFCutsDStartoKpipi("CutsDStartoKpipi");
+  cutsDStar->SetStandardCutsPP2010();
+
+  AliRDHFCutsDplustoKpipi *cutsDplustoKpipi = new AliRDHFCutsDplustoKpipi("CutsDplustoKpipi");
+  cutsDplustoKpipi->SetStandardCutsPP2010();
+  cutsDplustoKpipi->SetRemoveDaughtersFromPrim(kFALSE);
+  
+  Int_t nTot3ProngSele=0;
+  Int_t nTotD0toKpiSele=0;
+  Int_t nTotDStarSele=0;
+
   // loop over events
   Int_t nEvents = aodTree->GetEntries();
   for (Int_t nEv = 0; nEv < nEvents; nEv++) {
@@ -122,13 +96,14 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
     vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
     vtx1->Print();
 
+    /*
     // make trkIDtoEntry register (temporary)
     Int_t trkIDtoEntry[100000];
     for(Int_t it=0;it<aod->GetNumberOfTracks();it++) {
       AliAODTrack *track = aod->GetTrack(it);
       trkIDtoEntry[track->GetID()]=it;
     }
-    
+    */
 
     // Fix references to daughter tracks
     //AliAnalysisVertexingHF *fixer = new AliAnalysisVertexingHF();
@@ -147,11 +122,18 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
     for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
       AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
 
+      d->SetOwnPrimaryVtx(vtx1);
+
+      /*
        // get daughter AOD tracks
        AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
        AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
 
        if(trk0->GetStatus()) printf("ok %d\n",iD0toKpi);
+      */
+      printf("D0 %d\n",iD0toKpi);
+      if(cutsD0toKpi->IsSelected(d,AliRDHFCuts::kAll)) {printf("D0 %d passed\n",iD0toKpi); nTotD0toKpiSele++;}
+
     }
 
 
@@ -160,50 +142,30 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
     nTotDstar += nDstar;
     cout<<"Number of D*->D0pi: "<<nDstar<<endl;
     
-  AliRDHFCutsDStartoKpipi *cuts = new AliRDHFCutsDStartoKpipi("CutsDStartoKpipi");
-
-
- AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
- //esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
-  //default
- esdTrackCuts->SetRequireTPCRefit(kTRUE);
-  //esdTrackCuts->SetRequireITSRefit(kTRUE);
-  //esdTrackCuts->SetMinNClustersTPC(70);
-  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
-              AliESDtrackCuts::kAny);
- // default is kBoth, otherwise kAny
-  esdTrackCuts->SetMinDCAToVertexXY(0.);
-  esdTrackCuts->SetPtRange(0.3,1.e10);
-
- // soft pion pre-selections
-  AliESDtrackCuts* esdSoftPicuts=new AliESDtrackCuts();
-  //esdSoftPicuts->SetRequireSigmaToVertex(kFALSE);
-  //default
-  //esdSoftPicuts->SetRequireTPCRefit(kFALSE);
-  //esdSoftPicuts->SetRequireITSRefit(kFALSE);
-  //esdSoftPicuts->SetMinNClustersITS(4); // default is 5
-  //esdSoftPicuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
-  //                  AliESDtrackCuts::kAny); //test d0 asimmetry
-  //esdSoftPicuts->SetPtRange(0.0,15.0); 
-
-  cuts->AddTrackCuts(esdTrackCuts);
-  cuts->AddTrackCutsSoftPi(esdSoftPicuts);
-  Float_t cutsArrayDStartoKpipi[14]={0.15,0.07.,0.85,0.8,0.8,0.06.,0.06.,0.001,0.6,0.15, 0.03, 0.2, 5, 0.5}; // first 9 for D0 from D*, last 5 for D*
-  cuts->SetCuts(14,cutsArrayDStartoKpipi);
 
+  
     for (Int_t iDstar = 0; iDstar < nDstar; iDstar++) {
       AliAODRecoCascadeHF *c = (AliAODRecoCascadeHF*)arrayDstar->UncheckedAt(iDstar);
-
-      if(cuts->IsSelected(c,AliRDHFCuts::kTracks)) printf("passed\n");
+      printf("D* %d\n",iDstar);
+      if(cutsDStar->IsSelected(c,AliRDHFCuts::kCandidate)) {printf("D* %d passed\n",iDstar); nTotDStarSele++;}
 
     }
 
-    
+  
+
     // count 3prong candidates
     Int_t n3Prong = array3Prong->GetEntriesFast();
     nTot3Prong += n3Prong;
     cout<<"Number of Charm->3Prong: "<<n3Prong<<endl;
-    
+
+    for (Int_t i3p = 0; i3p < n3Prong; i3p++) {
+      AliAODRecoDecayHF3Prong *ccc = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3p);
+      printf("3p %d\n",i3p);
+      //if(cutsDplustoKpipi->IsSelected(ccc,AliRDHFCuts::kCandidate)) {printf("3p %d passed\n",i3p); nTot3ProngSele++;}
+
+    }
+
+    /*
     // loop over HF vertices
     Int_t nVtxsHF = arrayVerticesHF->GetEntriesFast();
     nTotHF += nVtxsHF;
@@ -221,15 +183,16 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
       nTotCasc+=nCasc;
       cout << "Number of Cascades: "<<nCasc<<endl;
     }
-    
+    */
   }
   
   printf("\n Total HF vertices: %d\n",nTotHF);
-  printf("\n Total D0->Kpi: %d\n",nTotD0toKpi);
-  printf("\n Total D*->D0pi: %d\n",nTotDstar);
-  printf("\n Total Charm->3Prong: %d\n",nTot3Prong);
+  printf("\n Total D0->Kpi: %d; selected %d\n",nTotD0toKpi,nTotD0toKpiSele);
+  printf("\n Total D*->D0pi: %d; selected %d\n",nTotDstar,nTotDStarSele);
+  printf("\n Total Charm->3Prong: %d; selected %d\n",nTot3Prong,nTot3ProngSele);
   if (arrayCascades) printf("\n Total Cascades: %d\n",nTotCasc);
 
+  /*
   TCanvas *c1 = new TCanvas("c1","c1",0,0,800,700);
   c1->Divide(2,2);
   c1->cd(1);
@@ -243,6 +206,10 @@ void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
   c1->cd(4);
   hDeltaMassDstar->SetFillColor(3);
   hDeltaMassDstar->Draw();
+  */
+
+  t.Stop();
+  t.Print();
 
   return;
 }