StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPythiaEventMaker.h
1 // -*- mode:c++ -*-
2 //
3 // Pibero Djawotho <pibero@tamu.edu>
4 // Texas A&M University
5 // 4 May 2010
6 //
7 // Saves Pythia record for every event into a designated file.
8 // This maker must run after St_geant_Maker which builds the
9 // g2t tables needed.
10 
11 #ifndef ST_PYTHIA_EVENT_MAKER_H
12 #define ST_PYTHIA_EVENT_MAKER_H
13 
14 // ROOT
15 class TFile;
16 class TTree;
17 class TVector3;
18 class TParticle;
19 
20 // STAR
21 class StPythiaEvent;
22 
23 // ROOT
24 #include "StMaker.h"
25 
26 class StPythiaEventMaker : public StMaker {
27 public:
28  StPythiaEventMaker(const char* name = "PythiaEvent")
29  : StMaker(name)
30  , mFileName("pythia.root")
31  , mFile(0)
32  , mTree(0)
33  , mPythiaEvent(0)
34  {
35  }
36 
37  void Clear(Option_t* option = "");
38  int Init();
39  int Make();
40  int Finish();
41  void SetPythiaFile(const char* filename) { mFileName = filename; }
42 
43 private:
44  void getEvent();
45  void getPythia();
46  void getVertex();
47  void getParticles();
48  void getAsymmetries();
49 
50  TString mFileName;
51  TFile* mFile;
52  TTree* mTree;
53  StPythiaEvent* mPythiaEvent;
54 
55  ClassDef(StPythiaEventMaker,0);
56 };
57 
58 ostream& operator<<(ostream&, const TVector3&);
59 ostream& operator<<(ostream&, const TParticle&);
60 ostream& operator<<(ostream&, const StPythiaEvent&);
61 
62 #endif // ST_PYTHIA_EVENT_MAKER_H
void Clear(Option_t *option="")
User defined functions.
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188