]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliGenEventHeader.cxx
c7ac7638442fd43176db34ede3c184fd074581a7
[u/mrichter/AliRoot.git] / STEER / AliGenEventHeader.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Header$ */
17
18 // Event header base class for generator. 
19 // Stores as a minimum the date, run number, event number,
20 // number of particles produced  
21 // and the impact parameter.
22 // 
23 // Author: andreas.morsch@cern.ch
24
25 #include "AliGenEventHeader.h"
26 ClassImp(AliGenEventHeader)
27
28
29 //_______________________________________________________________________
30 AliGenEventHeader::AliGenEventHeader():
31   fNProduced(-1),
32   fVertex(3)
33 {
34   //
35   // Constructor
36   //
37 }
38
39 //_______________________________________________________________________
40 AliGenEventHeader::AliGenEventHeader(const char * name):
41   TNamed(name, "Event Header"),
42   fNProduced(-1),
43   fVertex(3)
44 {
45   //
46   // Constructor
47   //
48 }
49
50 //_______________________________________________________________________
51 void AliGenEventHeader::SetPrimaryVertex(const TArrayF &o)
52 {
53     //
54     // Set the primary vertex for the event
55     //
56     fVertex[0]=o.At(0);
57     fVertex[1]=o.At(1);
58     fVertex[2]=o.At(2);
59 }
60
61 //_______________________________________________________________________
62 void  AliGenEventHeader::PrimaryVertex(TArrayF &o) const
63 {
64     //
65     // Return the primary vertex for the event
66     //
67     o[0] = fVertex.At(0);
68     o[1] = fVertex.At(1);
69     o[2] = fVertex.At(2);    
70 }
71