]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliHeader.cxx
Example for vertex finder starting from reconstructed tracks
[u/mrichter/AliRoot.git] / STEER / AliHeader.cxx
CommitLineData
4c039060 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
acd84897 16/* $Id$ */
e2afb3b6 17
116cbefd 18//-----------------------------------------------------------------------
116cbefd 19// Simulation event header class
5d8718b8 20// Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes
21// Many other classes depend on it
22// Author:
116cbefd 23//-----------------------------------------------------------------------
24
fb17acd4 25#include <stdio.h>
4c039060 26
fe4da5cc 27#include "AliHeader.h"
fe4da5cc 28
29ClassImp(AliHeader)
30
e2afb3b6 31//_______________________________________________________________________
32AliHeader::AliHeader():
33 fRun(0),
34 fNvertex(0),
35 fNprimary(0),
36 fNtrack(0),
37 fEvent(0),
38 fEventNrInRun(0),
39 fStack(0),
40 fGenHeader(0)
fe4da5cc 41{
8918e700 42 //
43 // Default constructor
44 //
fe4da5cc 45}
46
e2afb3b6 47//_______________________________________________________________________
48AliHeader::AliHeader(const AliHeader& head):
49 TObject(head),
50 fRun(0),
51 fNvertex(0),
52 fNprimary(0),
53 fNtrack(0),
54 fEvent(0),
55 fEventNrInRun(0),
56 fStack(0),
57 fGenHeader(0)
fe4da5cc 58{
8918e700 59 //
e2afb3b6 60 // Copy constructor
8918e700 61 //
e2afb3b6 62 head.Copy(*this);
fe4da5cc 63}
64
e2afb3b6 65//_______________________________________________________________________
66AliHeader::AliHeader(Int_t run, Int_t event):
67 fRun(run),
68 fNvertex(0),
69 fNprimary(0),
70 fNtrack(0),
71 fEvent(event),
72 fEventNrInRun(0),
73 fStack(0),
74 fGenHeader(0)
eef4b160 75{
76 //
77 // Standard constructor
78 //
eef4b160 79}
80
e2afb3b6 81//_______________________________________________________________________
82AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber):
83 fRun(run),
84 fNvertex(0),
85 fNprimary(0),
86 fNtrack(0),
87 fEvent(event),
88 fEventNrInRun(evNumber),
89 fStack(0),
90 fGenHeader(0)
91{
92 //
93 // Standard constructor
94 //
95}
eef4b160 96
e2afb3b6 97//_______________________________________________________________________
fe4da5cc 98void AliHeader::Reset(Int_t run, Int_t event)
99{
8918e700 100 //
101 // Resets the header with new run and event number
102 //
fe4da5cc 103 fRun=run;
104 fNvertex=0;
105 fNprimary=0;
106 fNtrack=0;
107 fEvent=event;
108}
109
e2afb3b6 110//_______________________________________________________________________
eef4b160 111void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber)
112{
113 //
114 // Resets the header with new run and event number
115 //
116 fRun=run;
117 fNvertex=0;
118 fNprimary=0;
119 fNtrack=0;
120 fEvent=event;
121 fEventNrInRun=evNumber;
122}
123
e2afb3b6 124//_______________________________________________________________________
125void AliHeader::Print(const char*) const
fe4da5cc 126{
8918e700 127 //
128 // Dumps header content
129 //
fe4da5cc 130 printf(
131"\n=========== Header for run %d Event %d = beginning ======================================\n",
132 fRun,fEvent);
133 printf(" Number of Vertex %d\n",fNvertex);
134 printf(" Number of Primary %d\n",fNprimary);
135 printf(" Number of Tracks %d\n",fNtrack);
136 printf(
137 "=========== Header for run %d Event %d = end ============================================\n\n",
138 fRun,fEvent);
9e1a0ddb 139
140}
141
e2afb3b6 142//_______________________________________________________________________
bdbd0f7a 143AliStack* AliHeader::Stack() const
9e1a0ddb 144{
145// Return pointer to stack
146 return fStack;
147}
148
e2afb3b6 149//_______________________________________________________________________
bdbd0f7a 150void AliHeader::SetStack(AliStack* stack)
9e1a0ddb 151{
152// Set pointer to stack
153 fStack = stack;
154}
155
e2afb3b6 156//_______________________________________________________________________
bdbd0f7a 157void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
9e1a0ddb 158{
159// Set pointer to header for generated event
160 fGenHeader = header;
161}
162
e2afb3b6 163//_______________________________________________________________________
5d34b719 164AliGenEventHeader* AliHeader::GenEventHeader() const
9e1a0ddb 165{
166// Get pointer to header for generated event
167 return fGenHeader;
fe4da5cc 168}
bdbd0f7a 169
e2afb3b6 170//_______________________________________________________________________
6c4904c2 171void AliHeader::Copy(TObject&) const
e2afb3b6 172{
173 Fatal("Copy","Not implemented\n");
174}
bdbd0f7a 175
176
177