StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjeJetEventTreeWriter.h
1 // -*- mode: c++ -*-
2 
3 //
4 // Pibero Djawotho <pibero@tamu.edu>
5 // Texas A&M University
6 // 1 September 2009
7 //
8 
9 #ifndef ST_JE_JET_EVENT_TREE_WRITER_H
10 #define ST_JE_JET_EVENT_TREE_WRITER_H
11 
12 #include "StjeTreeWriter.h"
13 
14 class StJets;
15 class StProtoJet;
16 class StFourPMaker;
17 class StJetEvent;
18 class StJetVertex;
19 class StJetCandidate;
20 class StMuPrimaryVertex;
21 
22 class TTree;
23 class TFile;
24 
25 #include <string>
26 #include <vector>
27 #include <list>
28 
29 using namespace std;
30 
32 
33 public:
34 
35  StjeJetEventTreeWriter(const char* outFileName);
36  virtual ~StjeJetEventTreeWriter() {}
37 
38  void Init();
39  void Finish();
40 
41  void addJetFinder(StFourPMaker* fourPMaker, const vector<const AbstractFourVec*>* particleList, list<StProtoJet>* protoJetList, const char* name, StJets* = 0);
42 
43  TTree* jetTree() const { return _jetTree; }
44 
45  void fillJetTreeHeader(int iAnalyzer);
46  void fillJetTree(int iAnalyzer, int iVertex);
47 
48  struct AnalyzerCtl {
49  string _branchName;
50  StFourPMaker* _fourPMaker;
51  list<StProtoJet>* _protoJetList;
52  StJetEvent* _jetEvent;
53  };
54 
55 private:
56 
57  void fillJetTreeForOneVertex(StJetEvent* jetEvent, list<StProtoJet>* protoJetList, StFourPMaker* fourPMaker, int iVertex);
58  StJetCandidate* fillJet(StJetEvent* jetEvent, StJetVertex* jetVertex, StProtoJet& protojet);
59  void copyVertex(const StMuPrimaryVertex* muVertex, StJetVertex* jetVertex);
60 
61  vector<AnalyzerCtl> _analyzerCtlList;
62 
63  TString _OutFileName;
64  TTree* _jetTree;
65  TFile* _outFile;
66 
67  ClassDef(StjeJetEventTreeWriter, 1);
68 };
69 
70 #endif // ST_JE_JET_EVENT_TREE_WRITER_H
Definition: StJets.h:24