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 backgound studies
30 */
31 class TOPBackgroundModule : public Module {
32
33 public:
34
35
38
40 virtual ~TOPBackgroundModule();
41
47 virtual void initialize() override;
48
54 virtual void beginRun() override;
55
61 virtual void event() override;
62
68 virtual void endRun() override;
69
75 virtual void terminate() override;
76
80 void printModuleParams() const;
81
85 void myprint(TH1F* histo, const char* path, const char* xtit, const char* ytit, double tresh);
86
87
88
89 private:
90
91 std::string m_BkgType;
92 std::string m_OutputFileName;
95 TFile* m_rootFile;
96 TTree* origingamma;
97 TTree* originpe;
99 TH1F* peflux;
100 TH1F* nflux;
101 TH1F* rdose;
102 TH1F* zdist;
103 TH1F* genergy;
104 TH1F* genergy2;
106 TH1F* zdistg;
107 TH1F* originpt;
109 TH2F* nflux_bar;
110 TH2F* gflux_bar;
111 TH2F* cflux_bar;
113 TH1F* norigin;
114 TH1F* gorigin;
115 TH1F* corigin;
117 TH1F* nprim;
118 TH1F* gprim;
119 TH1F* cprim;
121 TGraph* origin_zx;
122 TGraph* origin_zy;
124 TGraph* prim_zx;
125 TGraph* prim_zy;
128 double PCBmass;
129 double PCBarea;
130 double yearns;
131 double evtoJ;
132 double mtoc;
133 int count;
138 double originpe_x;
139 double originpe_y;
140 double originpe_z;
141 };
142
144} // Belle2 namespace
Base class for Modules.
Definition: Module.h:72
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 ~TOPBackgroundModule()
Destructor.
virtual void beginRun() override
Called when entering a new run.
void printModuleParams() const
Prints module parameters.
Abstract base class for different kinds of events.