EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairMCEventHeader.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairMCEventHeader.cxx
1 
2 // ------------------------------------------------------------------------
3 // ----- FairMCEventHeader source file -----
4 // ----- -----
5 // ----- Created 08/12/05 V. Friese -----
6 // ------------------------------------------------------------------------
7 
8 
9 #include "FairMCEventHeader.h"
10 #include "FairRootManager.h"
11 
12 // ----- Default constructor ------------------------------------------
14  : TNamed("MCEvent", "MC"),
15  fRunId(0),
16  fEventId(-1),
17  fX (0.),
18  fY (0.),
19  fZ (0.),
20  fT (0.),
21  fB (0.),
22  fNPrim(0),
23  fIsSet(kFALSE)
24 
25 {
26 }
27 // ------------------------------------------------------------------------
28 
29 
30 
31 // ----- Constructor with run identifier ------------------------------
33  : TNamed("MCEvent", "MC"),
34  fRunId(runId),
35  fEventId(-1),
36  fX (0.),
37  fY (0.),
38  fZ (0.),
39  fT (0.),
40  fB (0.),
41  fNPrim(0),
42  fIsSet(kFALSE)
43 
44 {
45 }
46 // ------------------------------------------------------------------------
47 
48 
49 
50 // ----- Standard constructor -----------------------------------------
51 FairMCEventHeader::FairMCEventHeader(Int_t iEvent, Double_t x, Double_t y,
52  Double_t z, Double_t t,Double_t b,
53  Int_t nPrim)
54  : TNamed("MCEvent", "MC"),
55  fRunId(0),
56  fEventId(iEvent),
57  fX (x),
58  fY (y),
59  fZ (z),
60  fT (t),
61  fB (b),
62  fNPrim(nPrim),
63  fIsSet(kFALSE)
64 
65 {
66 }
67 // ------------------------------------------------------------------------
68 
69 
70 
71 // ----- Destructor ---------------------------------------------------
73 {
74 }
75 // ------------------------------------------------------------------------
76 
77 
78 
79 // ----- Public method Reset ------------------------------------------
81 {
82  fEventId = -1;
83  fNPrim = 0;
84  fX = fY = fZ = fT = fB = 0.;
85  fIsSet = kFALSE;
86 }
87 // ------------------------------------------------------------------------
88 
90 {
91  // Dot at the end of the name is needed for splitting!!
92  FairRootManager::Instance()->Register("MCEventHeader.", "Event", this, kTRUE);
93 }
94