StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjMCKinWriter.h
1 // -*- mode: c++;-*-
2 // $Id: StjMCKinWriter.h,v 1.1 2008/08/22 22:10:27 tai Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJMCKINWRITER_H
5 #define STJMCKINWRITER_H
6 
7 #include <TObject.h>
8 
9 #include <Rtypes.h>
10 
11 #include <string>
12 
13 class TDirectory;
14 class TTree;
15 
16 class StjMCKin;
17 
18 class StjMCKinWriter : public TObject {
19 
20 public:
21  StjMCKinWriter(const char *treeName, const char* treeTitle,
22  TDirectory* file, StjMCKin* mckin)
23  : _treeName(treeName), _treeTitle(treeName)
24  , _file(file), _mckin(mckin)
25  { }
26  virtual ~StjMCKinWriter() { }
27 
28  void Init();
29  void Make();
30  void Finish();
31 
32 private:
33 
34  std::string _treeName;
35  std::string _treeTitle;
36 
37  TDirectory* _file;
38  TTree* _tree;
39 
40  StjMCKin* _mckin;
41 
42  Int_t _runNumber;
43  Int_t _eventId;
44  Double_t _s;
45  Double_t _t;
46  Double_t _u;
47  Double_t _pt;
48  Double_t _costh;
49  Double_t _x1;
50  Double_t _x2;
51  Int_t _pid;
52  Double_t _vertexZ;
53 
54  ClassDef(StjMCKinWriter, 1)
55 
56 };
57 
58 #endif // STJMCKINWRITER_H