]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AOD/AliAODMCHeader.h
Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODMCHeader.h
1 // -*- mode: C++ -*- 
2 #ifndef ALIAODMCHEADER_H
3 #define ALIAODMCHEADER_H
4
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 //-------------------------------------------------------------------------
9 //                      Class AliAODMCHeader
10 //   Some MC specific inforamtion for filtering KINE infomration to the AOD   
11 //   Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch 
12 //-------------------------------------------------------------------------
13
14 class AliGenEventHeader;
15
16 #include "AliVHeader.h"
17 #include "TList.h"
18
19 class AliAODMCHeader: public AliVHeader {
20 public:
21   AliAODMCHeader();
22   virtual ~AliAODMCHeader();
23   AliAODMCHeader(const AliAODMCHeader& header);
24   AliAODMCHeader& operator=(const AliAODMCHeader& header);
25   virtual void Copy(TObject &obj) const;
26
27   virtual void      SetGeneratorName(const char* c){fGenerator = c;}
28   virtual void      AddGeneratorName(const char* c);
29   virtual const char* GetGeneratorName() const {return fGenerator.Data();}
30
31   virtual void SetVertex(Double_t *vtx){
32     fVertex[0] = vtx[0]; fVertex[1] = vtx[1]; fVertex[2] = vtx[2];
33   }
34   virtual void SetVertex(Double_t x,Double_t y,Double_t z){
35     fVertex[0] = x; fVertex[1] = y; fVertex[2] = z;
36   }
37   virtual void GetVertex(Double_t *vtx) const {
38     vtx[0] = fVertex[0]; vtx[1] = fVertex[1]; vtx[2] = fVertex[2];
39   }
40
41   virtual Double_t GetVtxX() const { return fVertex[0]; }
42   virtual Double_t GetVtxY() const { return fVertex[1]; }
43   virtual Double_t GetVtxZ() const { return fVertex[2]; }
44
45   
46   virtual void      SetImpactParameter(Double_t b){fImpactPar = b;}
47   virtual Double_t  GetImpactParameter() const {return fImpactPar;}
48
49   virtual void      SetPtHard(Double_t f){fPtHard = f;}
50   virtual Double_t  GetPtHard() const {return fPtHard;}
51
52   virtual void      SetCrossSection(Double_t f){fXsection = f;}
53   virtual Double_t  GetCrossSection() const {return fXsection;}
54
55   virtual void      AddTrial(Int_t i) {fTrials+=i;}
56   virtual void      SetTrials(Int_t f){fTrials = f;}
57   virtual Int_t     GetTrials() const {return fTrials;}
58
59   virtual void      SetReactionPlaneAngle(Double_t b){fReactionPlaneAngle = b;}
60   virtual Double_t  GetReactionPlaneAngle() const {return fReactionPlaneAngle;}
61
62   virtual void      SetEventType(UInt_t eventType){fEventType = eventType;}
63   virtual UInt_t    GetEventType() const {return fEventType;}
64
65   virtual void      Reset();
66   virtual void      Print(const Option_t *opt=0) const;
67
68   // needed to make class non virtual
69   virtual UShort_t  GetBunchCrossNumber()   const {return 0;}
70   virtual UInt_t    GetOrbitNumber()        const {return 0;}
71   virtual UInt_t    GetPeriodNumber()       const {return 0;}
72   virtual ULong64_t GetTriggerMask()        const {return 0;}
73   virtual UChar_t   GetTriggerCluster()     const {return 0;}
74   // 
75   
76   // Access to header informations
77
78   virtual void AddCocktailHeader(const AliGenEventHeader* header);
79   virtual void AddCocktailHeaders(AliGenEventHeader* header);
80   virtual AliGenEventHeader* GetCocktailHeader(Int_t i);
81   virtual TList* GetCocktailHeaders(){return fHeaders;}
82   virtual UInt_t GetNCocktailHeaders(){
83     if(fHeaders)return fHeaders->GetEntries();
84     return 0;
85   }
86
87   static const char* StdBranchName(){return fgkStdBranchName.Data();}
88
89 private:
90
91   static TString fgkStdBranchName;      // Standard branch name
92
93   // General event information
94
95   TString      fGenerator;         // Name of the generator, combination of names in case of gen cocktail 
96   Double32_t   fVertex[3];         // MC vertex
97   Double32_t   fImpactPar;         // Impact parameter in case of Pb+Pb
98   Double32_t   fPtHard;            // [0,0,12] Pt hard for jet events
99   Double32_t   fXsection;          // Cross section for particlar process
100   UInt_t       fTrials;            // Number of trials
101   UInt_t       fEventType;         // MC Process Type of Event
102   Double32_t   fReactionPlaneAngle;// MC Reaction Plane Angle
103
104   // more details in the headers
105   TList  *fHeaders;                // List of all MC Headers 
106
107   ClassDef(AliAODMCHeader,6)
108
109 };
110
111 #endif