X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenScan.cxx;h=c55f4ccb4d12b7ff009fd1d5c102b2037a5774b4;hb=1a468a3b24d18b41a25bc96975c834da2091b77b;hp=90c9a66f1d052baa566432953ba4d2698a618605;hpb=38f1bd58dec1fa929bb9d2571e06d90879208771;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenScan.cxx b/EVGEN/AliGenScan.cxx index 90c9a66f1d0..c55f4ccb4d1 100644 --- a/EVGEN/AliGenScan.cxx +++ b/EVGEN/AliGenScan.cxx @@ -13,61 +13,53 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.7 2000/11/30 07:12:50 alibrary -Introducing new Rndm and QA classes +/* $Id$ */ -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 - -*/ +// Realisation of AliGenerator that generates particles with +// vertices on a user defined grid. +// The vertex positions can be smeared. +// Momentum vectors are defined through the methods provided by AliGenerator. +// Author: andreas.morsch@cern.ch #include "AliGenScan.h" -#include "AliRun.h" ClassImp(AliGenScan) AliGenScan::AliGenScan() - :AliGenerator(-1) + :AliGenerator(-1), + fXCmin(0), + fXCmax(0), + fNx(1), + fYCmin(0), + fYCmax(0), + fNy(1), + fZmin(0), + fZmax(0), + fNz(1), + fIpart(0) { // 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) + :AliGenerator(npart), + fXCmin(0), + fXCmax(0), + fNx(1), + fYCmin(0), + fYCmax(0), + fNy(1), + fZmin(0), + fZmax(0), + fNz(1), + fIpart(0) { // Constructor - fXCmin=0; - fXCmax=0; - fNx=1; - fYCmin=0; - fYCmax=0; - fNy=1; - fZmin=0; - fZmax=0; - fNz=1; + fName = "Scan"; + fTitle = "Generator for particles on a grid"; } //____________________________________________________________ @@ -110,7 +102,7 @@ void AliGenScan::Generate() Float_t dx,dy,dz; // - if (fNy > 0) { + if (fNx > 0) { dx=(fXCmax-fXCmin)/fNx; } else { dx=1e10; @@ -140,7 +132,7 @@ void AliGenScan::Generate() p[0] = pmom*TMath::Cos(phi)*TMath::Sin(theta); p[1] = pmom*TMath::Sin(phi)*TMath::Sin(theta); p[2] = pmom*TMath::Cos(theta); - gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt); + PushTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt); } } }