Class Reference for E1039 Core & Analysis Software
AnaBG.h
Go to the documentation of this file.
1 #ifndef _ANA_BG__H_
2 #define _ANA_BG__H_
3 #include <map>
4 #include "RoadMap.h"
5 #include "RoadList.h"
6 #include "TreeData.h"
7 #include "AnaBase.h"
8 class TFile;
9 class TH1;
10 class AnaSignal;
11 
12 class AnaBG : public AnaBase {
13  protected:
15 
18  static constexpr double N_RF_PER_SPILL = 186e6;
19  typedef std::vector<int> EleList;
20 
24 
29 
34 
38  TFile* m_file_out;
40  TH1* m_h1_inte;
41 
46 
47  public:
48  AnaBG(const std::string label="ana_bg");
49  virtual ~AnaBG();
50  virtual void Init();
51  virtual void End();
52  virtual void ReadEvents(const char* fname);
53  virtual void Analyze();
54 
55  void SetInteCut(const int inte_cut) { m_inte_cut = inte_cut; }
56  int GetInteCut() { return m_inte_cut; }
57 
58  void SetRoads(AnaSignal* ana_signal);
59  void SetRoads(RoadMap* pos_top, RoadMap* pos_bot, RoadMap* neg_top, RoadMap* neg_bot);
60 
61  protected:
62  virtual void ProcessOneEvent();
63  void FindAllRoads(const EleList* h1, const EleList* h2, const EleList* h3, const EleList* h4, const int tb, RoadMap* road_map);
64  void DrawInteMax();
65 };
66 
67 #endif // _ANA_BG__H_
Definition: AnaBG.h:12
TH1 * m_h1_inte_max
Definition: AnaBG.h:39
virtual void ProcessOneEvent()
Definition: AnaBG.cc:96
virtual void Init()
Definition: AnaBG.cc:42
int m_n_evt_used
Definition: AnaBG.h:21
void SetRoads(AnaSignal *ana_signal)
Definition: AnaBG.cc:197
RoadMap * m_road_map_pos_bot
Definition: AnaBG.h:26
std::vector< int > EleList
Definition: AnaBG.h:19
int GetInteCut()
Definition: AnaBG.h:56
int m_n_evt_fired
Definition: AnaBG.h:23
RoadMap * m_road_map_neg_bot
Definition: AnaBG.h:28
RoadMap * m_road_map_neg_top
Definition: AnaBG.h:27
virtual ~AnaBG()
Definition: AnaBG.cc:38
static constexpr double N_RF_PER_SPILL
N of RFs per spill.
Definition: AnaBG.h:18
AnaBG(const std::string label="ana_bg")
Definition: AnaBG.cc:23
virtual void ReadEvents(const char *fname)
Definition: AnaBG.cc:71
BgData * m_bg_data
Definition: AnaBG.h:33
void DrawInteMax()
Definition: AnaBG.cc:233
int m_n_evt_tb
Definition: AnaBG.h:22
RoadMap * m_road_map_pos_top
Definition: AnaBG.h:25
TH1 * m_h1_inte
Definition: AnaBG.h:40
virtual void End()
Definition: AnaBG.cc:64
int m_inte_cut
Definition: AnaBG.h:45
virtual void Analyze()
Definition: AnaBG.cc:159
void SetInteCut(const int inte_cut)
Definition: AnaBG.h:55
void FindAllRoads(const EleList *h1, const EleList *h2, const EleList *h3, const EleList *h4, const int tb, RoadMap *road_map)
Definition: AnaBG.cc:217
TFile * m_file_out
Definition: AnaBG.h:38
Definition: AnaBase.h:6
Class to hold a non-ordered set (i.e. map) of roads.
Definition: RoadMap.h:8