/************************************************************************** * 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. * **************************************************************************/ /* $Log$ Revision 1.10.6.1 2002/07/30 11:30:48 alibrary Updating VirtualMC Revision 1.11 2002/07/30 09:09:59 morsch Correction in initialization. Revision 1.10 2002/02/08 16:50:50 morsch Add name and title in constructor. Revision 1.9 2001/07/27 17:09:36 morsch Use local SetTrack, KeepTrack and SetHighWaterMark methods to delegate either to local stack or to stack owned by AliRun. (Piotr Skowronski, A.M.) Revision 1.8 2000/12/06 15:11:38 morsch Correct double declared data members. Revision 1.7 2000/11/30 07:12:50 alibrary Introducing new Rndm and QA classes Revision 1.6 2000/10/02 21:28:06 fca Removal of useless dependecies via forward declarations Revision 1.5 2000/06/09 20:37:20 morsch All coding rule violations except RS3 corrected Revision 1.4 1999/11/03 17:43:20 fca New version from G.Martinez & A.Morsch Revision 1.3 1999/09/29 09:24:14 fca Introduction of the Copyright and cvs Log */ #include "AliGenScan.h" #include "AliRun.h" ClassImp(AliGenScan) AliGenScan::AliGenScan() :AliGenerator(-1) { // Constructor fXCmin=0; fXCmax=0; fNx=1; fYCmin=0; fYCmax=0; fNy=1; fZmin=0; fZmax=0; fNz=1; // // Read all particles fNpart=-1; } AliGenScan::AliGenScan(Int_t npart) :AliGenerator(npart) { // Constructor fName = "Scan"; fTitle = "Generator for particles on a grid"; fXCmin=0; fXCmax=0; fNx=1; fYCmin=0; fYCmax=0; fNy=1; fZmin=0; fZmax=0; fNz=1; } //____________________________________________________________ AliGenScan::~AliGenScan() { // Destructor } void AliGenScan::SetRange(Int_t nx, Float_t xmin, Float_t xmax, Int_t ny, Float_t ymin, Float_t ymax, Int_t nz, Float_t zmin, Float_t zmax) { // Define the grid fXCmin=xmin; fXCmax=xmax; fNx=nx; fYCmin=ymin; fYCmax=ymax; fNy=ny; fZmin=zmin; fZmax=zmax; fNz=nz; } //____________________________________________________________ void AliGenScan::Generate() { // // Generate one trigger // Float_t polar[3]= {0,0,0}; // Float_t origin[3]; Float_t p[3]; Int_t nt; Float_t pmom, theta, phi; // Float_t random[6]; Float_t dx,dy,dz; // if (fNx > 0) { dx=(fXCmax-fXCmin)/fNx; } else { dx=1e10; } if (fNy > 0) { dy=(fYCmax-fYCmin)/fNy; } else { dy=1e10; } if (fNz > 0) { dz=(fZmax-fZmin)/fNz; } else { dz=1e10; } for (Int_t ix=0; ix