Belle II Software  release-05-02-19
TOPBackgroundModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef TOPBACKGROUND_H
12 #define TOPBACKGROUND_H
13 
14 #include <framework/core/Module.h>
15 
16 #include <string>
17 
18 #include <TFile.h>
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TTree.h>
22 #include <TGraph.h>
23 
24 
25 namespace Belle2 {
30  /*
32  * This module analyses the data for beam backgound studies
33  */
34  class TOPBackgroundModule : public Module {
35 
36  public:
37 
38 
41 
43  virtual ~TOPBackgroundModule();
44 
50  virtual void initialize() override;
51 
57  virtual void beginRun() override;
58 
64  virtual void event() override;
65 
71  virtual void endRun() override;
72 
78  virtual void terminate() override;
79 
83  void printModuleParams() const;
84 
88  void myprint(TH1F* histo, const char* path, const char* xtit, const char* ytit, double tresh);
89 
90 
91 
92  private:
93 
94  std::string m_BkgType;
95  std::string m_OutputFileName;
96  double m_TimeOfSimulation;
98  TFile* m_rootFile;
99  TTree* origingamma;
100  TTree* originpe;
102  TH1F* peflux;
103  TH1F* nflux;
104  TH1F* rdose;
105  TH1F* zdist;
106  TH1F* genergy;
107  TH1F* genergy2;
109  TH1F* zdistg;
110  TH1F* originpt;
112  TH2F* nflux_bar;
113  TH2F* gflux_bar;
114  TH2F* cflux_bar;
116  TH1F* norigin;
117  TH1F* gorigin;
118  TH1F* corigin;
120  TH1F* nprim;
121  TH1F* gprim;
122  TH1F* cprim;
124  TGraph* origin_zx;
125  TGraph* origin_zy;
127  TGraph* prim_zx;
128  TGraph* prim_zy;
131  double PCBmass;
132  double PCBarea;
133  double yearns;
134  double evtoJ;
135  double mtoc;
136  int count;
137  int count_occ;
138  double origingamma_x;
139  double origingamma_y;
140  double origingamma_z;
141  double originpe_x;
142  double originpe_y;
143  double originpe_z;
144  };
145 
147 } // Belle2 namespace
148 
149 #endif // TOPBACKGROUND_H
Belle2::TOPBackgroundModule::count
int count
counter
Definition: TOPBackgroundModule.h:144
Belle2::TOPBackgroundModule::zdistg
TH1F * zdistg
z distribution of the photoelectron flux
Definition: TOPBackgroundModule.h:117
Belle2::TOPBackgroundModule::originpe
TTree * originpe
tree for saving originpe points
Definition: TOPBackgroundModule.h:108
Belle2::TOPBackgroundModule::module_occupancy
TGraph * module_occupancy
graph zy
Definition: TOPBackgroundModule.h:137
Belle2::TOPBackgroundModule::genergy
TH1F * genergy
energy of gamma that hits the bar
Definition: TOPBackgroundModule.h:114
Belle2::TOPBackgroundModule::zdist
TH1F * zdist
z distribution of primaries
Definition: TOPBackgroundModule.h:113
Belle2::TOPBackgroundModule::mtoc
double mtoc
constant
Definition: TOPBackgroundModule.h:143
Belle2::TOPBackgroundModule::nflux_bar
TH2F * nflux_bar
neutron flux on bar
Definition: TOPBackgroundModule.h:120
Belle2::TOPBackgroundModule::cprim
TH1F * cprim
charged primary
Definition: TOPBackgroundModule.h:130
Belle2::TOPBackgroundModule::origin_zx
TGraph * origin_zx
grapch zx
Definition: TOPBackgroundModule.h:132
Belle2::TOPBackgroundModule::event
virtual void event() override
Event processor.
Definition: TOPBackgroundModule.cc:200
Belle2::TOPBackgroundModule::terminate
virtual void terminate() override
Termination action.
Definition: TOPBackgroundModule.cc:405
Belle2::TOPBackgroundModule::myprint
void myprint(TH1F *histo, const char *path, const char *xtit, const char *ytit, double tresh)
Print histogram 1D, helper function.
Definition: TOPBackgroundModule.cc:323
Belle2::TOPBackgroundModule::nprim
TH1F * nprim
neutron primery
Definition: TOPBackgroundModule.h:128
Belle2::TOPBackgroundModule::origingamma_y
double origingamma_y
points from origin_zx and _zy graphs: y
Definition: TOPBackgroundModule.h:147
Belle2::TOPBackgroundModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: TOPBackgroundModule.cc:193
Belle2::TOPBackgroundModule::origingamma_z
double origingamma_z
points from origin_zx and _zy graphs: z
Definition: TOPBackgroundModule.h:148
Belle2::TOPBackgroundModule::gorigin
TH1F * gorigin
gamma origin
Definition: TOPBackgroundModule.h:125
Belle2::TOPBackgroundModule::PCBarea
double PCBarea
constant
Definition: TOPBackgroundModule.h:140
Belle2::TOPBackgroundModule::corigin
TH1F * corigin
charged origin
Definition: TOPBackgroundModule.h:126
Belle2::TOPBackgroundModule::yearns
double yearns
constant
Definition: TOPBackgroundModule.h:141
Belle2::TOPBackgroundModule::m_rootFile
TFile * m_rootFile
root file for saving histograms
Definition: TOPBackgroundModule.h:106
Belle2::TOPBackgroundModule::printModuleParams
void printModuleParams() const
Prints module parameters.
Definition: TOPBackgroundModule.cc:440
Belle2::TOPBackgroundModule::origin_zy
TGraph * origin_zy
graph zy
Definition: TOPBackgroundModule.h:133
Belle2::TOPBackgroundModule::originpe_z
double originpe_z
points for origin of mother of photoelectrons: z (=zdist)
Definition: TOPBackgroundModule.h:151
Belle2::TOPBackgroundModule::m_OutputFileName
std::string m_OutputFileName
Output filename.
Definition: TOPBackgroundModule.h:103
Belle2::TOPBackgroundModule::prim_zx
TGraph * prim_zx
grapch zx
Definition: TOPBackgroundModule.h:135
Belle2::TOPBackgroundModule::endRun
virtual void endRun() override
End-of-run action.
Definition: TOPBackgroundModule.cc:400
Belle2::TOPBackgroundModule::gflux_bar
TH2F * gflux_bar
gamma flux on bar
Definition: TOPBackgroundModule.h:121
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPBackgroundModule::genergy2
TH1F * genergy2
energy of gamma that hits the bar
Definition: TOPBackgroundModule.h:115
Belle2::TOPBackgroundModule::PCBmass
double PCBmass
constant
Definition: TOPBackgroundModule.h:139
Belle2::TOPBackgroundModule::nflux
TH1F * nflux
neutron flux
Definition: TOPBackgroundModule.h:111
Belle2::TOPBackgroundModule::m_TimeOfSimulation
double m_TimeOfSimulation
Time of the simulation of the input file.
Definition: TOPBackgroundModule.h:104
Belle2::TOPBackgroundModule::peflux
TH1F * peflux
pe flux
Definition: TOPBackgroundModule.h:110
Belle2::TOPBackgroundModule::originpe_y
double originpe_y
points for origin of mother of photoelectrons: y
Definition: TOPBackgroundModule.h:150
Belle2::TOPBackgroundModule::gprim
TH1F * gprim
gamma primery
Definition: TOPBackgroundModule.h:129
Belle2::TOPBackgroundModule::prim_zy
TGraph * prim_zy
graph zy
Definition: TOPBackgroundModule.h:136
Belle2::TOPBackgroundModule::origingamma
TTree * origingamma
tree for saving origingamma points
Definition: TOPBackgroundModule.h:107
Belle2::TOPBackgroundModule::originpt
TH1F * originpt
pt of electrons
Definition: TOPBackgroundModule.h:118
Belle2::TOPBackgroundModule::evtoJ
double evtoJ
constant
Definition: TOPBackgroundModule.h:142
Belle2::TOPBackgroundModule::cflux_bar
TH2F * cflux_bar
charged flux on bar
Definition: TOPBackgroundModule.h:122
Belle2::TOPBackgroundModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: TOPBackgroundModule.cc:114
Belle2::TOPBackgroundModule::rdose
TH1F * rdose
radiation dose
Definition: TOPBackgroundModule.h:112
Belle2::TOPBackgroundModule::count_occ
int count_occ
counter
Definition: TOPBackgroundModule.h:145
Belle2::TOPBackgroundModule::norigin
TH1F * norigin
nutron origin
Definition: TOPBackgroundModule.h:124
Belle2::TOPBackgroundModule::~TOPBackgroundModule
virtual ~TOPBackgroundModule()
Destructor.
Definition: TOPBackgroundModule.cc:109
Belle2::TOPBackgroundModule::TOPBackgroundModule
TOPBackgroundModule()
Constructor.
Definition: TOPBackgroundModule.cc:58
Belle2::TOPBackgroundModule::origingamma_x
double origingamma_x
points from origin_zx and _zy graphs: x
Definition: TOPBackgroundModule.h:146
Belle2::TOPBackgroundModule::originpe_x
double originpe_x
points for origin of mother of photoelectrons: x
Definition: TOPBackgroundModule.h:149
Belle2::TOPBackgroundModule::m_BkgType
std::string m_BkgType
Type of background.
Definition: TOPBackgroundModule.h:102