AliRoot Core  ee782a0 (ee782a0)
AliGenEventHeader.h
Go to the documentation of this file.
1 #ifndef ALIGENEVENTHEADER_H
2 #define ALIGENEVENTHEADER_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //---------------------------------------------------------------------
10 // Event header base class for generator.
11 // Stores generated event information
12 // Author: andreas.morsch@cern.ch
13 //---------------------------------------------------------------------
14 
15 #include <map>
16 #include <string>
17 #include <TNamed.h>
18 #include <TArrayF.h>
19 
20 class AliGenEventHeader : public TNamed
21 {
22  public:
23 
24  AliGenEventHeader(const char* name);
26  virtual ~AliGenEventHeader() {}
27  // Getters
28  virtual Int_t NProduced() const {return fNProduced;}
29  virtual Float_t InteractionTime() const {return fInteractionTime;}
30  virtual Float_t EventWeight() const {return fEventWeight;}
31  virtual void PrimaryVertex(TArrayF &o) const;
32  // Setters
33  virtual void SetNProduced(Int_t nprod) {fNProduced = nprod;}
34  virtual void SetPrimaryVertex(const TArrayF &o);
35  virtual void SetInteractionTime(Float_t t) {fInteractionTime = t;}
37 
38  // named event weights
39  virtual void AddEventWeight(const TString &name, Float_t w);
40  virtual Float_t GetEventWeight(const TString &name);
41  virtual const std::map<std::string, Float_t>& GetEventWeights() const
42  { return fEventWeights; }
43 
44 protected:
45  Int_t fNProduced; // Number stable or undecayed particles
46  TArrayF fVertex; // Primary Vertex Position
47  Float_t fInteractionTime; // Time of the interaction
48  Float_t fEventWeight; // Event weight
49 
50  std::map<std::string, Float_t> fEventWeights; // named event weights
51  const TString fEventWeightNameGenerator;
52 
53  ClassDef(AliGenEventHeader, 5) // Event header for primary event
54 };
55 
56 #endif
virtual void SetInteractionTime(Float_t t)
virtual void PrimaryVertex(TArrayF &o) const
virtual ~AliGenEventHeader()
virtual void SetNProduced(Int_t nprod)
virtual Float_t GetEventWeight(const TString &name)
virtual Float_t InteractionTime() const
virtual Int_t NProduced() const
virtual void SetEventWeight(Float_t w)
virtual void SetPrimaryVertex(const TArrayF &o)
virtual Float_t EventWeight() const
virtual void AddEventWeight(const TString &name, Float_t w)
virtual const std::map< std::string, Float_t > & GetEventWeights() const
std::map< std::string, Float_t > fEventWeights
const TString fEventWeightNameGenerator