]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenBox.cxx
Add the number of local boards
[u/mrichter/AliRoot.git] / EVGEN / AliGenBox.cxx
index 60a93346d5ac572e98ce0d006cfda086d92d5277..46c3b9781fa25196e75983f1b4013a32fa02c83f 100644 (file)
 // 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
-/*
-<img src="picts/AliGeneratorClass.gif">
-</pre>
-<br clear=left>
-<font size=+2 color=red>
-<p>The responsible person for this module is
-<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
-</font>
-<pre>
-*/
-//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)
 {
   //
   // Default constructor
   //
-  fIpart=0;
 }
 
 //_____________________________________________________________________________
 AliGenBox::AliGenBox(Int_t npart)
-  :AliGenerator(npart)
+    :AliGenerator(npart),
+     fIpart(kProton)
 {
   //
   // Standard constructor
   //
   fName  = "Box";
   fTitle = "Box particle generator";
-  // Generate Proton by default
-  fIpart=kProton;
 }
 
 //_____________________________________________________________________________
@@ -117,6 +102,10 @@ void AliGenBox::Generate()
        }
        PushTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
     }
+
+    AliGenEventHeader* header = new AliGenEventHeader("BOX");
+    header->SetPrimaryVertex(fVertex);
+    gAlice->SetGenEventHeader(header); 
 }
 
 //_____________________________________________________________________________