One has to cast between the types
authorhristov <Peter.Hristov@cern.ch>
Mon, 15 Dec 2014 09:03:55 +0000 (10:03 +0100)
committerhristov <Peter.Hristov@cern.ch>
Mon, 15 Dec 2014 09:04:49 +0000 (10:04 +0100)
PWGUD/UPC/AliAnalysisTaskUpcFilterSemiforward.cxx

index ee58bc9..6adaf6c 100644 (file)
@@ -343,7 +343,7 @@ Bool_t AliAnalysisTaskUpcFilterSemiforward::RunAOD()
   Int_t nmun=0, ncen=0;
   // AOD tracks loop
   for(Int_t itr=0; itr<aodEvent->GetNumberOfTracks(); itr++) {
-    AliAODTrack *trk = aodEvent->GetTrack(itr);
+    AliAODTrack *trk = dynamic_cast<AliAODTrack*>(aodEvent->GetTrack(itr));
     if( !trk ) continue;
 
     //muon track