X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenBox.cxx;h=ebe0548d5e33d648092e5357b8a7e3d9ed8b17bb;hb=a29f037905164a3f45941253894d06ac4edeb815;hp=72a7259846456af0e370102923217001fd1df794;hpb=116cbefdd457541a56d5dfd1a53b09c3ccc50964;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenBox.cxx b/EVGEN/AliGenBox.cxx index 72a72598464..ebe0548d5e3 100644 --- a/EVGEN/AliGenBox.cxx +++ b/EVGEN/AliGenBox.cxx @@ -13,57 +13,15 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.7 2002/02/08 16:50:50 morsch -Add name and title in constructor. - -Revision 1.6 2001/07/27 17:09:35 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.5 2000/12/21 16:24:06 morsch -Coding convention clean-up - -Revision 1.4 2000/11/30 07:12:49 alibrary -Introducing new Rndm and QA classes - -Revision 1.3 2000/10/02 21:28:06 fca -Removal of useless dependecies via forward declarations - -Revision 1.2 2000/07/11 18:24:55 fca -Coding convention corrections + few minor bug fixes - -Revision 1.1 2000/06/09 20:22:58 morsch -Same class as previously in AliSimpleGen.cxx -All coding rule violations except RS3 corrected (AM) - -*/ - +/* $Id$ */ // Generator for particles in a preset // kinematic range (flat distribution) // Note that for a given theta pt and p are not independent // Range for only one variable (pt or p) should be given. -// // Comments and suggestions: andreas.morsch@cern.ch -// -//Begin_Html -/* - - -
- -

The responsible person for this module is -Andreas Morsch. - -

-*/
-//End_Html
-//                                                               //
-///////////////////////////////////////////////////////////////////
+
 
 #include "TPDGCode.h"
 
@@ -115,12 +73,10 @@ void AliGenBox::Generate()
   //
     for (j=0;j<3;j++) origin[j]=fOrigin[j];
     if(fVertexSmear==kPerEvent) {
-	Rndm(random,6);
-	for (j=0;j<3;j++) {
-	    origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
-		TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
-	}
+	Vertex();
+	for (j=0;j<3;j++) origin[j]=fVertex[j];
     }
+
     for(i=0;i