Class Reference for E1039 Core & Analysis Software
AnaPileup.h
Go to the documentation of this file.
1 
9 #ifndef __ANAPILEUP_H__
10 #define __ANAPILEUP_H__
11 
12 // ROOT
13 #include <TSQLServer.h>
14 #include <TSQLResult.h>
15 #include <TSQLRow.h>
16 #include <TMatrixD.h>
17 #include <TVector3.h>
18 
19 // Fun4All includes
20 #include <fun4all/SubsysReco.h>
21 
22 // STL includes
23 #include <vector>
24 #include <string>
25 #include <iostream>
26 #include <list>
27 #include <map>
28 
29 class TVector3;
30 class TLorentzVector;
31 class TClonesArray;
32 
33 class SQEvent;
34 class SQHitVector;
35 class SQHit;
36 class SQMCEvent;
37 class SQTrackVector;
38 class SQDimuonVector;
39 
40 //class PHG4TruthInfoContainer;
41 //class PHG4HitContainer;
42 class SRecEvent;
43 class SRecTrack;
44 class GeomSvc;
45 
46 class TFile;
47 class TTree;
48 
49 class AnaPileup: public SubsysReco {
50 
51  public:
52 
53  AnaPileup(const std::string &name = "AnaPileup.root");
54  virtual ~AnaPileup();
55 
56  int Init(PHCompositeNode *topNode);
57  int InitRun(PHCompositeNode *topNode);
58  int process_event(PHCompositeNode *topNode);
59  int End(PHCompositeNode *topNode);
60 
61  int InitEvalTree();
62  int ResetEvalVars();
63 
64 
65  const std::string& get_out_name() const {
66  return _out_name;
67  }
68 
69  void set_out_name(const std::string& outName) {
70  _out_name = outName;
71  }
72  void set_legacy_rec_container(bool b) { legacyContainer = b; }
73 
74  private:
75 
76  int GetNodes(PHCompositeNode *topNode);
77 
78  int Eval_sqhit(PHCompositeNode *topNode);
79  int Eval_trkdim(PHCompositeNode *topNode);
80 
81  bool legacyContainer;
82 
83  GeomSvc *p_geomSvc;
84  size_t _event;
85 
86  SQEvent * _event_header;
87  SQMCEvent * mi_evt_true;
88  SQHitVector *_hit_vector;
89 
90  SQTrackVector* trackVector;
91  SQDimuonVector* dimuonVector;
92 
93  SRecEvent* _recEvent;
94  SQTrackVector* recTrackVector;
95  SQDimuonVector* recDimuonVector;
96 
97  std::string _out_name;
98 
99  TTree* evt_tree;
100  TTree* _sqhits_tree;
101  TFile *file;
102 
103  int n_bucketsize;
104  int run_id;
105  int spill_id;
106  int event_id;
107  int eventID;
108  unsigned short emu_trigger;
109 
111  int fpga1;
112  int fpga2;
113  int fpga3;
114  int fpga4;
115  int fpga5;
116 
117  int nim1;
118  int nim2;
119 
121  int n_tracks;
122  //hodoscope sqhit info
123  TClonesArray* pos_H1T;
124  TClonesArray* pos_H1B;
125  TClonesArray* mom_H1T;
126  TClonesArray* mom_H1B;
127 
128  TClonesArray* pos_H1L;
129  TClonesArray* pos_H1R;
130  TClonesArray* mom_H1L;
131  TClonesArray* mom_H1R;
132 
133 
134  //Hodoscope element ID
135  int h1Bhit;
136  int h1Thit;
137  int eID_H1T[9999];
138  int eID_H1B[9999];
139 
140  int h1Rhit;
141  int h1Lhit;
142  int eID_H1R[9999];
143  int eID_H1L[9999];
144 
145 
146  //DC sqhit info
147  TClonesArray* pos_D0X;
148  TClonesArray* mom_D0X;
149  int D0Xhit;
150  int eID_D0X[9999];
151 
153  TTree* trkTree;
154  int charge1;
155  TVector3* pos1;
156  TVector3* pos2;
157  TVector3* pos3;
158  TVector3* posvtx;
159  TVector3* mom1;
160  TVector3* mom2;
161  TVector3* mom3;
162  TVector3* momvtx;
163  TVector3* rec_mom1;
164  TVector3* rec_momvtx;
165  TVector3* rec_posvtx;
166  TVector3* rec_momtgt;
167  TVector3* rec_postgt;
168 
169  TTree* dimTree;
170  TVector3* rec_pmom;
171  TVector3* rec_nmom;
172  TVector3* rec_ppos;
173  TVector3* rec_npos;
174  TVector3* rec_vtx;
175  double rec_mass;
176 
177 
178 };
179 
180 
181 #endif /* __ANAPILEUP_H__ */
AnaPileup(const std::string &name="AnaPileup.root")
Definition: AnaPileup.cc:39
void set_legacy_rec_container(bool b)
Definition: AnaPileup.h:72
void set_out_name(const std::string &outName)
Definition: AnaPileup.h:69
int InitRun(PHCompositeNode *topNode)
Definition: AnaPileup.cc:100
int End(PHCompositeNode *topNode)
===========================
Definition: AnaPileup.cc:139
virtual ~AnaPileup()
Definition: AnaPileup.cc:49
int process_event(PHCompositeNode *topNode)
Definition: AnaPileup.cc:113
int Init(PHCompositeNode *topNode)
Definition: AnaPileup.cc:75
int ResetEvalVars()
Definition: AnaPileup.cc:394
int InitEvalTree()
Definition: AnaPileup.cc:281
const std::string & get_out_name() const
Definition: AnaPileup.h:65
User interface class about the geometry of detector planes.
Definition: GeomSvc.h:164
An SQ interface class to hold a list of SQDimuon objects.
An SQ interface class to hold one event header.
Definition: SQEvent.h:17
An SQ interface class to hold a list of SQHit objects.
Definition: SQHitVector.h:32
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
An SQ interface class to hold one simulated-event header.
Definition: SQMCEvent.h:12
An SQ interface class to hold a list of SQTrack objects.
Definition: SQTrackVector.h:19