Add fast merging option (Diego)
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliAnalysisTaskDielectronEfficiency.cxx
index 97ed8d0..6d669a8 100644 (file)
@@ -220,19 +220,19 @@ void AliAnalysisTaskDielectronEfficiency::FillPlots(AliVEvent *event)
   // Fill histograms
   //
   AliESDEvent *esd=dynamic_cast<AliESDEvent*>(event);
-
+  if (!esd) return;
   Int_t ntrack=esd->GetNumberOfTracks();
 
   // Fetch Stack 
   AliMCEventHandler *mcH = (AliMCEventHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
   if(!mcH) {
-    AliError("No MC handler found\n")
+    AliError("No MC handler found\n");
     return;
   }
   
   AliMCEvent *mcev=mcH->MCEvent();
   if (!mcev){
-    AliError("No MC event found\n")
+    AliError("No MC event found\n");
     return;
   }
   AliStack*  pStack = mcev->Stack();
@@ -284,10 +284,10 @@ void AliAnalysisTaskDielectronEfficiency::FillPlots(AliVEvent *event)
 
       //MC mother
       Int_t idMotherP=pP->GetFirstMother();
-      TParticle *motherP=0;
+//       TParticle *motherP=0;
       //       Int_t pdgMotherP=0;
       if (idMotherP>-1){
-        motherP=pStack->Particle(idMotherP);
+//         motherP=pStack->Particle(idMotherP);
       //       pdgMotherP=motherP->GetPdgCode();
       }
       //===============
@@ -403,7 +403,7 @@ void AliAnalysisTaskDielectronEfficiency::FillPlots(AliVEvent *event)
 // }
 
 
-void AliAnalysisTaskDielectronEfficiency::FillMCInfo(AliStack *pStack)
+void AliAnalysisTaskDielectronEfficiency::FillMCInfo(AliStack * const pStack)
 {
   //
   // fill pure MC histograms