message: use versions of IsPhysicalPrimary et al that work also for MCs with pileup
diff: @@ -441,8 +441,8 @@ bool AliMultDepSpecAnalysisTask::InitEvent()
  // event info for random seeds
  fRunNumber = fEvent->GetRunNumber();
  - fTimeStamp = fEvent->GetTimeStamp(); // FIXME: multiple events have same time stamp... use fMCEvent->GenEventHeader()->InteractionTime()
  - fEventNumber = fEvent->GetHeader()->GetEventIdAsLong(); // FIXME: in MC this is always zero and therefore has no effect on the random seed...
  + fTimeStamp = fEvent->GetTimeStamp();
  + fEventNumber = fEvent->GetEventNumberInFile();
  // check if event is accepted (dataset dependent)
  fAcceptEvent = fEventCuts->AcceptEvent(fEvent);
  @@ -550,7 +550,7 @@ void AliMultDepSpecAnalysisTask::LoopTrue(bool count)
  }
  for (int i = 0; i < fMCEvent->GetNumberOfTracks(); ++i) {
  - // Sets fMCPt, fMCEta, ... and checks if particle in kin range
  + // sets fMCPt, fMCEta, ... and checks if particle in kin range
  if (fIsESD) {
  if (!InitParticle((AliMCParticle*)fMCEvent->GetTrack(i))) continue;
  } else {
  @@ -629,16 +629,17 @@ bool AliMultDepSpecAnalysisTask::InitParticle(Particle_t* particle)
  return false;
  }
  fMCLabel = particle->GetLabel();
  + fMCIsPileupParticle = false;
  // reject all particles and tracks that come from simulated out-of-bunch pileup
  if (fIsNewReco && AliAnalysisUtils::IsParticleFromOutOfBunchPileupCollision(fMCLabel, fMCEvent)) {
  - fMCIsPileupParticle = true; // store this info as it is relevant for track loop as well
  + fMCIsPileupParticle = true; // store this info as it is relevant for track loop as well FIXME: we may actually not want to reject those particles on track level
  return false;
  }
  if (!(TMath::Abs(particle->Charge()) > 0.01)) return false; // reject all neutral particles
  - fMCIsChargedPrimary = particle->IsPhysicalPrimary();
  - fMCIsChargedSecondary = (fMCIsChargedPrimary) ? false : (particle->IsSecondaryFromWeakDecay() || particle->IsSecondaryFromMaterial());
  + fMCIsChargedPrimary = fMCEvent->IsPhysicalPrimary(fMCLabel);
  + fMCIsChargedSecondary = (fMCIsChargedPrimary) ? false : (fMCEvent->IsSecondaryFromWeakDecay(fMCLabel) || fMCEvent->IsSecondaryFromMaterial(fMCLabel));
  // not interested in anything non-final
  if (!(fMCIsChargedPrimary || fMCIsChargedSecondary)) return false;
  