/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ #include #include #include #include #include #include #include #include #include //____________________________________________________________________ ClassImp(AliPWG0depHelper) //____________________________________________________________________ Int_t AliPWG0depHelper::GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug) { // // get the process type of the event. // // can only read pythia headers, either directly or from cocktalil header AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast(aHeader->GenEventHeader()); if (!pythiaGenHeader) { AliGenCocktailEventHeader* genCocktailHeader = dynamic_cast(aHeader->GenEventHeader()); if (!genCocktailHeader) { printf("AliPWG0depHelper::GetProcessType : Unknown header type (not Pythia or Cocktail). \n"); return -1; } TList* headerList = genCocktailHeader->GetHeaders(); if (!headerList) { return -1; } for (Int_t i=0; iGetEntries(); i++) { pythiaGenHeader = dynamic_cast(headerList->At(i)); if (pythiaGenHeader) break; } if (!pythiaGenHeader) { printf("AliPWG0depHelper::GetProcessType : Could not find Pythia header. \n"); return -1; } } if (adebug) { printf("AliPWG0depHelper::GetProcessType : Pythia process type found: %d \n",pythiaGenHeader->ProcessType()); } return pythiaGenHeader->ProcessType(); } //____________________________________________________________________ TParticle* AliPWG0depHelper::FindPrimaryMother(AliStack* stack, Int_t label) { // // Finds the first mother among the primary particles of the particle identified by