StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjeDefaultJetTreeWriter.h
1 // -*- mode: c++;-*-
2 // $Id: StjeDefaultJetTreeWriter.h,v 1.6 2010/04/24 04:15:35 pibero Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJEDEFAULTJETTREEWRITER_H
5 #define STJEDEFAULTJETTREEWRITER_H
6 
7 #include "StjeTreeWriter.h"
8 
9 class StMuDstMaker;
10 class StJets;
11 class StProtoJet;
12 class StFourPMaker;
13 
14 class TTree;
15 class TFile;
16 
17 #include <string>
18 #include <vector>
19 #include <list>
20 
22 
23 public:
24  StjeDefaultJetTreeWriter(StMuDstMaker& uDstMaker, std::string outFileName);
25  virtual ~StjeDefaultJetTreeWriter();
26 
27  void Init();
28  void Finish();
29 
30  void addJetFinder(StFourPMaker* fourPMaker, const std::vector<const AbstractFourVec*>* particleList, std::list<StProtoJet>* protoJetList, const char* name, StJets* stjets = 0);
31 
32  TTree* jetTree() const { return _jetTree; }
33 
34  StJets *getLastStJets() { return _analyzerCtlList[_analyzerCtlList.size() - 1]._jets; }
35 
36 private:
37 
38  void fillJetTreeHeader(int iAnalyzer);
39  void fillJetTree(int iAnalyzer, int iVertex);
40  void fillJetTreeForOneJetFindingAlgorithm(StJets& stjets, std::list<StProtoJet>* protoJetList, StFourPMaker* fourPMaker);
41  void fillJet(StJets& stjets, StProtoJet& pj);
42 
43  struct AnalyzerCtl {
44  std::string _branchName;
45  StFourPMaker* _fourPMaker;
46  std::list<StProtoJet>* _protoJetList;
47  StJets *_jets;
48  };
49 
50  StMuDstMaker& _uDstMaker;
51  std::string _OutFileName;
52  TTree *_jetTree;
53  TFile *_outFile;
54 
55  std::vector<AnalyzerCtl> _analyzerCtlList;
56 };
57 
58 #endif // STJEDEFAULTJETTREEWRITER_H
59 
60 
Definition: StJets.h:24