Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PatternDBGen.h
Go to the documentation of this file.
1 
9 #ifndef _H_PatternDBGen_H_
10 #define _H_PatternDBGen_H_
11 
12 // ROOT
13 #include <TSQLServer.h>
14 #include <TSQLResult.h>
15 #include <TSQLRow.h>
16 
17 // Fun4All includes
18 #include <fun4all/SubsysReco.h>
19 
20 // STL includes
21 #include <vector>
22 #include <string>
23 #include <iostream>
24 #include <list>
25 #include <map>
26 //#include <algorithm>
27 
28 class SQRun;
29 class SQSpillMap;
30 
31 class SQEvent;
32 class SQHitMap;
33 class SQHitVector;
34 
36 
37 class SRecEvent;
38 
39 class GeomSvc;
40 
41 class TFile;
42 class TTree;
43 
44 class PatternDBGen: public SubsysReco {
45 
46 public:
47 
48  PatternDBGen(const std::string &name = "PatternDBGen");
49  virtual ~PatternDBGen() {
50  }
51 
52  int Init(PHCompositeNode *topNode);
53  int InitRun(PHCompositeNode *topNode);
54  int process_event(PHCompositeNode *topNode);
55  int End(PHCompositeNode *topNode);
56 
57  int InitEvalTree();
58  int ResetEvalVars();
59 
60  const std::string& get_hit_container_choice() const {
61  return _hit_container_type;
62  }
63 
64  void set_hit_container_choice(const std::string& hitContainerChoice) {
65  _hit_container_type = hitContainerChoice;
66  }
67 
68  const std::string& get_out_name() const {
69  return _out_name;
70  }
71 
72  void set_out_name(const std::string& outName) {
73  _out_name = outName;
74  }
75 
76 private:
77 
78  int GetNodes(PHCompositeNode *topNode);
79 
80  int TruthEval(PHCompositeNode *topNode);
81 
82  std::string _hit_container_type;
83 
84  size_t _event;
85 
86  SQEvent * _event_header;
87  SQHitMap *_hit_map;
88  SQHitVector *_hit_vector;
89 
90  PHG4TruthInfoContainer* _truth;
91 
92  SRecEvent* _recEvent;
93 
94  std::string _out_name;
95  TTree* _tout_truth;
96 
97  int run_id;
98  int spill_id;
99  float target_pos;
100  int event_id;
101 
102  int n_tracks;
103  int pid[1000];
104  float gvx[1000];
105  float gvy[1000];
106  float gvz[1000];
107  float gpx[1000];
108  float gpy[1000];
109  float gpz[1000];
110  float gx_st1[1000];
111  float gy_st1[1000];
112  float gz_st1[1000];
113  float gpx_st1[1000];
114  float gpy_st1[1000];
115  float gpz_st1[1000];
116  float gpt[1000];
117  float geta[1000];
118  float gphi[1000];
119  int gnhits[1000];
120  int gndc[1000];
121  int gnhodo[1000];
122  int gnprop[1000];
123 
124  int gelmid[1000][55];
125 
126  GeomSvc *p_geomSvc;
127 };
128 
129 
130 #endif /* _H_PatternDBGen_H_ */
User interface class about the geometry of detector planes.
Definition: GeomSvc.h:164
General purposed evaluation module.
Definition: PatternDBGen.h:44
void set_out_name(const std::string &outName)
Definition: PatternDBGen.h:72
const std::string & get_hit_container_choice() const
Definition: PatternDBGen.h:60
const std::string & get_out_name() const
Definition: PatternDBGen.h:68
int End(PHCompositeNode *topNode)
Called at the end of all processing.
virtual ~PatternDBGen()
Definition: PatternDBGen.h:49
int process_event(PHCompositeNode *topNode)
int InitRun(PHCompositeNode *topNode)
void set_hit_container_choice(const std::string &hitContainerChoice)
Definition: PatternDBGen.h:64
int Init(PHCompositeNode *topNode)
PatternDBGen(const std::string &name="PatternDBGen")
An SQ interface class to hold one event header.
Definition: SQEvent.h:17
An SQ interface class to hold a list of SQHit objects as std::map.
Definition: SQHitMap.h:23
An SQ interface class to hold a list of SQHit objects.
Definition: SQHitVector.h:32
An SQ interface class to hold the run-level info.
Definition: SQRun.h:18
An SQ interface class to hold a list of SQSpill objects.
Definition: SQSpillMap.h:19