Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AnaTrack.h
Go to the documentation of this file.
1 #ifndef _ANA_TRACK_H_
2 #define _ANA_TRACK_H_
3 #include <fstream>
4 #include <map>
5 #include <fun4all/SubsysReco.h>
6 class TFile;
7 class TH1;
8 class SQEvent;
9 class SQHitVector;
10 class SRecEvent;
11 class SQTrackVector;
12 class TrackletVector;
13 
14 class AnaTrack: public SubsysReco {
15  static const int N_PL = 30; // N of all chamber planes
16 
17  SQEvent* m_evt;
18  SRecEvent* m_srec;
19  SQHitVector* m_vec_hit;
20  SQTrackVector* m_vec_trk_true;
21  TrackletVector* m_vec_trklet;
22 
23  TFile* m_file_out;
24 
25  TH1* m_h1_ntrk;
26  TH1* m_h1_nhit; // N of hits/tracklet
27  TH1* m_h1_mom;
28  TH1* m_h1_rchi2;
29  TH1* m_h1_x0;
30  TH1* m_h1_y0;
31  TH1* m_h1_tx;
32  TH1* m_h1_ty;
33 
34  TH1* m_h1_ele [N_PL+1];
35  TH1* m_h1_pos [N_PL+1];
36  TH1* m_h1_time[N_PL+1]; // TDC (not drift) time
37  TH1* m_h1_dd [N_PL+1]; // drift distance
38  TH1* m_h1_td [N_PL+1]; // track distance = track position - wire position
39 
40  public:
41  AnaTrack(const std::string& name="AnaTrack");
42  virtual ~AnaTrack() {;}
43  int Init(PHCompositeNode *topNode);
44  int InitRun(PHCompositeNode *topNode);
45  int process_event(PHCompositeNode *topNode);
46  int End(PHCompositeNode *topNode);
47 
48  private:
49  typedef std::map<int, int> IdMap_t; // For now the key is not ID but index.
50  void FindTrackRelation (IdMap_t& id_map);
51 
52  void DrawTrackPar();
53  void DrawOneGroup(const std::string name, TH1* h1[], const int i_pl0, const int i_pl1);
54 };
55 
56 #endif // _ANA_TRACK_H_
An example class to analyze hodoscope hits in E1039 DST file.
Definition: AnaTrack.h:14
AnaTrack(const std::string &name="AnaTrack")
Definition: AnaTrack.cc:24
int InitRun(PHCompositeNode *topNode)
Definition: AnaTrack.cc:46
int Init(PHCompositeNode *topNode)
Definition: AnaTrack.cc:41
virtual ~AnaTrack()
Definition: AnaTrack.h:42
int End(PHCompositeNode *topNode)
Called at the end of all processing.
Definition: AnaTrack.cc:195
int process_event(PHCompositeNode *topNode)
Definition: AnaTrack.cc:104
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 a list of SQTrack objects.
Definition: SQTrackVector.h:19