FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMCEventHeader.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
14 #ifndef FAIRMCEVENTHEADER_H
15 #define FAIRMCEVENTHEADER_H 1
16 
17 #include <Rtypes.h> // for Double_t, UInt_t, etc
18 #include <TNamed.h> // for TNamed
19 #include <TVector3.h> // for TVector3
20 
21 class FairMCEventHeader : public TNamed
22 {
23  public:
26 
35  FairMCEventHeader(Int_t iEvent, Double_t x, Double_t y, Double_t z, Double_t t, Double_t b, Int_t nPrim);
36 
38  FairMCEventHeader(UInt_t runId);
39 
41  virtual ~FairMCEventHeader();
42 
44  UInt_t GetRunID() const { return fRunId; }
45  UInt_t GetEventID() const { return fEventId; }
46  Double_t GetX() const { return fX; }
47  Double_t GetY() const { return fY; }
48  Double_t GetZ() const { return fZ; }
49  Double_t GetT() const { return fT; }
50  Double_t GetB() const { return fB; }
51  Int_t GetNPrim() const { return fNPrim; }
52  Bool_t IsSet() const { return fIsSet; }
53  Double_t GetRotX() const { return fRotX; }
54  Double_t GetRotY() const { return fRotY; }
55  Double_t GetRotZ() const { return fRotZ; }
56 
57  void GetVertex(TVector3& vertex) { vertex.SetXYZ(fX, fY, fZ); }
58 
60  void SetEventID(UInt_t eventId) { fEventId = eventId; }
61  void SetRunID(UInt_t runId) { fRunId = runId; }
62  void SetTime(Double_t t) { fT = t; }
63  void SetB(Double_t b) { fB = b; }
64  void SetNPrim(Int_t nPrim) { fNPrim = nPrim; }
65  void MarkSet(Bool_t isSet) { fIsSet = isSet; }
66  void SetVertex(Double_t x, Double_t y, Double_t z);
67  void SetVertex(const TVector3& vertex);
68  void SetRotX(Double_t rotx) { fRotX = rotx; }
69  void SetRotY(Double_t roty) { fRotY = roty; }
70  void SetRotZ(Double_t rotz) { fRotZ = rotz; }
71 
73  void Reset();
74 
76  virtual void Register();
77 
78  protected:
79  UInt_t fRunId;
80  UInt_t fEventId;
81  Double32_t fX;
82  Double32_t fY;
83  Double32_t fZ;
84  Double32_t fT;
85  Double32_t fB;
86  Int_t fNPrim;
87  Bool_t fIsSet;
88  Double32_t fRotX;
89  Double32_t fRotY;
90  Double32_t fRotZ;
91 
93 };
94 
95 inline void FairMCEventHeader::SetVertex(Double_t x, Double_t y, Double_t z)
96 {
97  fX = x;
98  fY = y;
99  fZ = z;
100 }
101 
102 inline void FairMCEventHeader::SetVertex(const TVector3& vertex)
103 {
104  fX = vertex.X();
105  fY = vertex.Y();
106  fZ = vertex.Z();
107 }
108 
109 #endif
Double_t GetB() const
event time [ns]
Double32_t fRotY
Rotation around x-axis (beam tilt) [rad].
UInt_t GetRunID() const
Double_t GetRotY() const
rot. around x-axis [rad]
Double_t GetX() const
event identifier
Double32_t fY
Primary vertex x [cm].
Double32_t fRotX
Flag whether variables are filled.
Bool_t fIsSet
Number of input tracks.
Double32_t fRotZ
Rotation around y-axis (beam tilt) [rad].
Double_t GetY() const
vertex x [cm]
Double32_t fZ
Primary vertex y [cm].
Double_t GetZ() const
vertex y [cm]
virtual void Register()
void GetVertex(TVector3 &vertex)
rot. around z-axis [rad]
void SetTime(Double_t t)
Double_t GetRotX() const
Flag.
Bool_t IsSet() const
number of input tracks
void SetRotY(Double_t roty)
Double_t GetRotZ() const
rot. around y-axis [rad]
ClassDef(FairMCEventHeader, 2)
Rotation around z-axis (event plane) [rad].
Double32_t fX
Event identifier.
Int_t GetNPrim() const
impact parameter [fm]
void SetRotX(Double_t rotx)
void SetNPrim(Int_t nPrim)
void SetRotZ(Double_t rotz)
void SetVertex(Double_t x, Double_t y, Double_t z)
void SetRunID(UInt_t runId)
void SetEventID(UInt_t eventId)
Double_t GetT() const
vertex z [cm]
UInt_t fEventId
Run identifier.
Double32_t fB
Event time [s].
void MarkSet(Bool_t isSet)
Double32_t fT
Primary vertex z [cm].
void SetB(Double_t b)
UInt_t GetEventID() const
run identifier
Int_t fNPrim
Impact parameter [fm] (if relevant)