Belle II Software development
TOPBackgroundModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/core/Module.h>
12
13#include <string>
14
15#include <TFile.h>
16#include <TH1F.h>
17#include <TH2F.h>
18#include <TTree.h>
19#include <TGraph.h>
20
21
22namespace Belle2 {
28 /*
29 * This module analyses the data for beam background studies
30 */
31 class TOPBackgroundModule : public Module {
32
33 public:
34
35
38
44 virtual void initialize() override;
45
51 virtual void beginRun() override;
52
58 virtual void event() override;
59
65 virtual void endRun() override;
66
72 virtual void terminate() override;
73
77 void myprint(TH1F* histo, const char* path, const char* xtit, const char* ytit, double tresh);
78
79
80
81 private:
82
83 std::string m_BkgType;
84 std::string m_OutputFileName;
86
87 TFile* m_rootFile;
88 TTree* origingamma;
89 TTree* originpe;
90
91 TH1F* peflux;
92 TH1F* nflux;
93 TH1F* rdose;
94 TH1F* zdist;
95 TH1F* genergy;
96 TH1F* genergy2;
97
98 TH1F* zdistg;
99 TH1F* originpt;
100
101 TH2F* nflux_bar;
102 TH2F* gflux_bar;
103 TH2F* cflux_bar;
104
105 TH1F* norigin;
106 TH1F* gorigin;
107 TH1F* corigin;
108
109 TH1F* nprim;
110 TH1F* gprim;
111 TH1F* cprim;
112
113 TGraph* origin_zx;
114 TGraph* origin_zy;
115
116 TGraph* prim_zx;
117 TGraph* prim_zy;
119
120 double PCBmass;
121 double PCBarea;
122 double yearns;
123 double evtoJ;
124 double mtoc;
125 int count;
130 double originpe_x;
131 double originpe_y;
132 double originpe_z;
133 };
134
136} // Belle2 namespace
Module()
Constructor.
Definition Module.cc:30
double origingamma_z
points from origin_zx and _zy graphs: z
TTree * originpe
tree for saving originpe points
TH1F * originpt
pt of electrons
TFile * m_rootFile
root file for saving histograms
TH2F * cflux_bar
charged flux on bar
double origingamma_y
points from origin_zx and _zy graphs: y
double originpe_x
points for origin of mother of photoelectrons: x
TH1F * zdistg
z distribution of the photoelectron flux
TH2F * gflux_bar
gamma flux on bar
TH1F * genergy2
energy of gamma that hits the bar
TH2F * nflux_bar
neutron flux on bar
double origingamma_x
points from origin_zx and _zy graphs: x
double originpe_z
points for origin of mother of photoelectrons: z (=zdist)
std::string m_BkgType
Type of background.
std::string m_OutputFileName
Output filename.
double originpe_y
points for origin of mother of photoelectrons: y
TTree * origingamma
tree for saving origingamma points
double m_TimeOfSimulation
Time of the simulation of the input file.
TH1F * zdist
z distribution of primaries
TH1F * genergy
energy of gamma that hits the bar
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
void myprint(TH1F *histo, const char *path, const char *xtit, const char *ytit, double tresh)
Print histogram 1D, helper function.
virtual void endRun() override
End-of-run action.
virtual void terminate() override
Termination action.
virtual void beginRun() override
Called when entering a new run.
Abstract base class for different kinds of events.