/************************************************************************** * 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$ */ // // Wrapper for ISAJET generator. // It is using ISAJET to comunicate with fortarn code // // // // #include //#include "TSystem.h" //#include "TUnixSystem.h" #include #include "TIsajet.h" #include "AliMC.h" #include "AliIsajetRndm.h" #include "AliGenIsajet.h" #include "AliRun.h" ClassImp(AliGenIsajet) AliGenIsajet::AliGenIsajet() : AliGenMC(), fKineBias(1), fTrials(0) { } //____________________________________________________________________________ AliGenIsajet::AliGenIsajet(Int_t npart) :AliGenMC(npart), fKineBias(1), fTrials(0) { fIsajet = new TIsajet(); AliIsajetRndm::SetIsajetRandom(GetRandom()); } AliGenIsajet::AliGenIsajet(const AliGenIsajet & Isajet) :AliGenMC(Isajet), fKineBias(1), fTrials(0) { Isajet.Copy(*this); } //____________________________________________________________________________ AliGenIsajet::~AliGenIsajet() { // // Standard destructor // if (fIsajet) delete fIsajet; } //____________________________________________________________________________ void AliGenIsajet::Init() { // // Generator initialisation method // cout<<"isajet4"<SetECM(2000); cout<<"isajet5"<SetJobtype("MINBIAS"); cout<<"isajet6"<SetIDIN(0,1); cout<<"isajet7"<SetIDIN(1,1); cout<<"isajet8"<Initialise(); cout<<"isajet9"<GenerateEvent(); //cout<<"generate3"<ImportParticles(particles,"All"); //cout<<"generate4"<GetEntriesFast()-1; //cout<<"generate51"<At(i); //cout<<"generate6"<GetFirstMother(); kf = iparticle->GetPdgCode(); ks = iparticle->GetStatusCode(); if (ks != 3 && KinematicSelection(iparticle,0)) { nc++; p[0]=iparticle->Px(); p[1]=iparticle->Py(); p[2]=iparticle->Pz(); p[3]=iparticle->Energy(); Float_t tof = kconv*iparticle->T(); Int_t iparent = (imo > -1) ? newPos[imo] : -1; Int_t trackIt = (ks == 1) && fTrackIt; PushTrack(trackIt, iparent, kf, p[0], p[1], p[2], p[3], origin[0], origin[1], origin[2], tof, polar[0], polar[1], polar[2], kPPrimary, nt,1.,ks); KeepTrack(nt); newPos[i]=nt; } }// end of for: particle loop if (newPos) delete[] newPos; // MakeHeader(); if (nc > 0) { jev+=nc; if (jev >= fNpart || fNpart == -1) { fKineBias=Float_t(fNpart)/Float_t(fTrials); break; }} } SetHighWaterMark(nt); } AliGenIsajet& AliGenIsajet::operator=(const AliGenIsajet& rhs) { // Assignment operator rhs.Copy(*this); return (*this); } //____________________________________________________________________________ //____________________________________________________________________________