Class Reference for E1039 Core & Analysis Software
DoEmbedding.h
Go to the documentation of this file.
1 #ifndef _DO_EMBEDDING__H_
2 #define _DO_EMBEDDING__H_
3 #include <fun4all/SubsysReco.h>
4 class TFile;
5 class TTree;
6 class SQEvent;
7 class SQMCEvent;
8 class SQHitVector;
9 class SQTrackVector;
10 class SQDimuonVector;
11 
13 class DoEmbedding: public SubsysReco {
14  bool m_overwrite_rf_info;
15  int m_hit_id_shift;
16  int m_trk_id_shift;
17  int m_dim_id_shift;
18 
20  SQEvent * mi_evt;
21  SQHitVector * mi_vec_hit;
22  SQMCEvent * mi_sim_evt;
23  SQTrackVector * mi_sim_vec_trk;
24  SQDimuonVector* mi_sim_vec_dim;
25  SQEvent * mi_evt_emb;
26  SQMCEvent * mi_sim_evt_emb;
27 
29  std::vector<std::string> m_list_emb_file;
30  int m_idx_emb_file;
31  int m_idx_emb_evt;
32  bool m_emb_data_has_sim_evt;
33  bool m_emb_data_has_sim_trk;
34  bool m_emb_data_has_sim_dim;
35 
36  TFile* m_file_emb;
37  TTree* m_tree_emb;
38  SQEvent* m_emb_sqevt;
39  SQMCEvent* m_emb_sqmcevt;
40  SQHitVector* m_emb_sqvec_hit;
41  SQTrackVector* m_emb_sqvec_trk;
42  SQDimuonVector* m_emb_sqvec_dim;
43 
44  public:
45  DoEmbedding(const std::string name="DoEmbedding");
46  virtual ~DoEmbedding();
47  int Init(PHCompositeNode *topNode);
48  int InitRun(PHCompositeNode *topNode);
49  int process_event(PHCompositeNode *topNode);
50  int End(PHCompositeNode *topNode);
51 
52  void DoOverwriteRfInfo(const bool overwrite) { m_overwrite_rf_info = overwrite; }
53  bool DoOverwriteRfInfo() const { return m_overwrite_rf_info; }
54  void SetHitIdShift(const int id_shift) { m_hit_id_shift = id_shift; }
55  int GetHitIdShift() const { return m_hit_id_shift; }
56  void SetTrackIdShift(const int id_shift) { m_trk_id_shift = id_shift; }
57  int GetTrackIdShift() const { return m_trk_id_shift; }
58  void SetDimuonIdShift(const int id_shift) { m_dim_id_shift = id_shift; }
59  int GetDimuonIdShift() const { return m_dim_id_shift; }
60 
61  void AddEmbDataFile(const char* fn_root);
62  void AddEmbDataFiles(const char* fn_list);
63  int GetNumEmbEvents();
64 
65  protected:
66  void OpenEmbDataFile(const char* fn_root);
67  void CloseEmbDataFile();
68  bool GetNextEmbEvent();
69 };
70 
71 #endif // _DO_EMBEDDING__H_
An example class to analyze the simulated uDST file.
Definition: DoEmbedding.h:13
int process_event(PHCompositeNode *topNode)
Definition: DoEmbedding.cc:99
int GetNumEmbEvents()
Definition: DoEmbedding.cc:173
void SetTrackIdShift(const int id_shift)
Definition: DoEmbedding.h:56
void AddEmbDataFiles(const char *fn_list)
Definition: DoEmbedding.cc:165
int End(PHCompositeNode *topNode)
Called at the end of all processing.
Definition: DoEmbedding.cc:154
int GetHitIdShift() const
Definition: DoEmbedding.h:55
void CloseEmbDataFile()
Definition: DoEmbedding.cc:201
void SetDimuonIdShift(const int id_shift)
Definition: DoEmbedding.h:58
bool GetNextEmbEvent()
Definition: DoEmbedding.cc:209
void SetHitIdShift(const int id_shift)
Definition: DoEmbedding.h:54
void DoOverwriteRfInfo(const bool overwrite)
Definition: DoEmbedding.h:52
void OpenEmbDataFile(const char *fn_root)
Definition: DoEmbedding.cc:184
int GetDimuonIdShift() const
Definition: DoEmbedding.h:59
int Init(PHCompositeNode *topNode)
Definition: DoEmbedding.cc:48
int InitRun(PHCompositeNode *topNode)
Definition: DoEmbedding.cc:53
void AddEmbDataFile(const char *fn_root)
Definition: DoEmbedding.cc:160
bool DoOverwriteRfInfo() const
Definition: DoEmbedding.h:53
virtual ~DoEmbedding()
Definition: DoEmbedding.cc:39
int GetTrackIdShift() const
Definition: DoEmbedding.h:57
DoEmbedding(const std::string name="DoEmbedding")
Definition: DoEmbedding.cc:17
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 simulated-event header.
Definition: SQMCEvent.h:12
An SQ interface class to hold a list of SQTrack objects.
Definition: SQTrackVector.h:19