X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenBox.cxx;h=5869d034441d56608529b2ec843d05da36b44480;hb=851da2930f42db590a5d64797e67de20ea45ec42;hp=fbc1e15f0c57d78766cbdaf985b2bf2c6281f721;hpb=c8f7f6f998ce8749eccbbe3a2178d0f1fc582f30;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenBox.cxx b/EVGEN/AliGenBox.cxx index fbc1e15f0c5..5869d034441 100644 --- a/EVGEN/AliGenBox.cxx +++ b/EVGEN/AliGenBox.cxx @@ -13,90 +13,49 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.8 2003/01/14 10:50:18 alibrary -Cleanup of STEER coding conventions - -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"
 
 #include "AliConst.h"
 #include "AliGenBox.h"
 #include "AliRun.h"
+#include "AliGenEventHeader.h"
 
 ClassImp(AliGenBox)
 
 //_____________________________________________________________________________
 AliGenBox::AliGenBox()
-    :AliGenerator()
+    :AliGenerator(), 
+     fIpart(0),
+     fEtaMin(0),
+     fEtaMax(0)
 {
   //
   // Default constructor
   //
-  fIpart=0;
 }
 
 //_____________________________________________________________________________
 AliGenBox::AliGenBox(Int_t npart)
-  :AliGenerator(npart)
+    :AliGenerator(npart),
+     fIpart(kProton),
+     fEtaMin(0),
+     fEtaMax(0)
 {
   //
   // Standard constructor
   //
   fName  = "Box";
   fTitle = "Box particle generator";
-  // Generate Proton by default
-  fIpart=kProton;
 }
 
 //_____________________________________________________________________________
@@ -124,7 +83,15 @@ void AliGenBox::Generate()
 
     for(i=0;iSetPrimaryVertex(fVertex);
+    header->SetNProduced(fNpart);
+    
+ // Passes header either to the container or to gAlice
+    if (fContainer) {
+	fContainer->AddHeader(header);
+    } else {
+	gAlice->SetGenEventHeader(header);	
     }
 }