StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetMaker2009.h
1 // -*- mode:c++ -*-
2 //
3 // Pibero Djawotho <pibero@tamu.edu>
4 // Texas A&M University
5 // 27 May 2010
6 //
7 
8 #ifndef ST_JET_MAKER_2009_H
9 #define ST_JET_MAKER_2009_H
10 
11 class TTree;
12 class StAnaPars;
13 class StJetEvent;
14 class StJetFinder;
15 class StjPrimaryVertex;
16 class StJetVertex;
17 class StProtoJet;
18 class StJetCandidate;
19 class StMuTrackEmu;
20 class StJetTrack;
21 class StMuTowerEmu;
22 class StJetTower;
23 class StMcTrackEmu;
24 class StJetParticle;
25 
26 #include <vector>
27 #include "StMaker.h"
28 #include "StJetFinder/StJetPars.h"
29 #include "StSpinPool/StJetEvent/StJetEvent.h"
30 
31 class StJetMaker2009 : public StMaker {
32 public:
33  StJetMaker2009(const char* name = "StJetMaker2009")
34  : StMaker(name)
35  , mFile(0)
36  , mTree(0)
37  {
38  }
39 
40  void Clear(Option_t* option = "");
41  int Init();
42  int Make();
43  int Finish();
44 
45  // Setters
46  void addBranch(const char* name, StAnaPars* anapars, StJetPars* jetpars);
47  void setJetFile(const char* filename);
48 
49  // Getters
50  TTree* tree();
51  StJetEvent* event(const char* branchname);
52 
53 protected:
54  void addJet(const StProtoJet& protojet, StJetEvent* event, StJetVertex* vertex);
55  void copyVertex(const StjPrimaryVertex& vertex, StJetVertex* jetvertex);
56  void copyTrack(const StMuTrackEmu*, StJetTrack*);
57  void copyTower(const StMuTowerEmu*, StJetTower*);
58  void copyParticle(const StMcTrackEmu*, StJetParticle*);
59 
60 struct StJetBranch {
61  StJetBranch(const char* name, StAnaPars* anapars, StJetPars* jetpars)
62  : name(name)
63  , anapars(anapars)
64  , jetpars(jetpars)
65  , jetfinder(jetpars->constructJetFinder())
66  , event(new StJetEvent)
67  {
68  }
69 
70  TString name;
71  StAnaPars* anapars;
72  StJetPars* jetpars;
73  StJetFinder* jetfinder;
74  StJetEvent* event;
75  };
76 
77  vector<StJetBranch*> mJetBranches;
78  TString mFileName;
79  TFile* mFile;
80  TTree* mTree;
81 
82  ClassDef(StJetMaker2009,0);
83 };
84 #endif
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188
void Clear(Option_t *option="")
User defined functions.