Belle II Software development
TeeggInputModule.h
1
2/**************************************************************************
3 * basf2 (Belle II Analysis Software Framework) *
4 * Author: The Belle II Collaboration *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9
10#pragma once
11
12#include <framework/core/Module.h>
13#include <framework/logging/Logger.h>
14
15#include <generators/teegg/Teegg.h>
16#include <generators/utilities/InitialParticleGeneration.h>
17
18#include <mdst/dataobjects/MCParticleGraph.h>
19
20#include <vector>
21
22namespace Belle2 {
31 class TeeggInputModule : public Module {
32
33 public:
34
40
42 virtual ~TeeggInputModule();
43
45 virtual void initialize() override;
46
48 virtual void event() override;
49
51 virtual void terminate() override;
52
53 protected:
54
56 std::string m_sVACPOL;
57 double m_cmsEnergy;
58 double m_TEVETO;
59 double m_TEMIN;
60 double m_TGMIN;
61 double m_TGVETO;
62 double m_EEMIN;
63 double m_EGMIN;
64 double m_PEGMIN;
65 double m_EEVETO;
66 double m_EGVETO;
67 double m_PHVETO;
68 double m_CUTOFF;
69 double m_EPS;
70 double m_FRAPHI;
71 double m_EPSPHI;
72 double m_WGHT1M;
73 double m_WGHTMX;
74 std::string m_sRADCOR;
75 std::string m_sCONFIG;
76 std::string m_sMATRIX;
77 std::string m_sMTRXGG;
84 template <typename T>
85 std::vector<T> make_vector(T const& t1, T const& t2);
87 template <typename T>
88 std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
89
90 private:
91
94
95 bool m_initialized{false};
100 };
102 template <typename T>
103 inline std::vector<T> TeeggInputModule::make_vector(T const& t1, T const& t2)
104 {
105 std::vector<T> v;
106 v.push_back(t1);
107 v.push_back(t2);
108 return v;
109 }
110
111 template <typename T>
112 inline std::pair<T, T> TeeggInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
113 {
114 std::pair<T, T> p;
115 if (vec.size() != 2) {
116 B2ERROR("The parameter " + name + " has to have exactly 2 elements!");
117 } else {
118 p.first = vec[0];
119 p.second = vec[1];
120 }
121 return p;
122 }
123
125} // end namespace Belle2
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
The TEEGG Generator module.vectorToPair.
double m_EGVETO
minimum energy to veto(etron/gamma config with hard rad corr)
double m_TEVETO
maximum theta of e+ in final state (in radians)
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
bool m_initialized
True if generator has been initialized.
double m_EEVETO
minimum energy to veto(gamma config with hard rad corr)
virtual void initialize() override
Initializes the module.
double m_cmsEnergy
CMS energy.
double m_WGHTMX
maximum weight for the trial events
virtual void event() override
Method is called for each event.
virtual ~TeeggInputModule()
Destructor.
double m_EGMIN
minimum energy of the gamma (egamma & gamma configurations)
int m_UNWGHT
logical variable.
virtual void terminate() override
Method is called at the end of the event processing.
std::string m_sMATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
double m_WGHT1M
maximum weight for generation of QP0, cos(theta QP)
double m_PHVETO
minimum phi sep to veto(etron/gamma config with hard rad corr
Teegg m_generator
Variables.
std::string m_sCONFIG
specifies the event configuration (EGAMMA GAMMA or ETRON)
std::string m_sMTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
MCParticleGraph m_mcGraph
The MCParticle graph object.
double m_TGVETO
maximum angle between the gamma and -z axis(etron conf.
std::string m_sRADCOR
specifies radiative correction (NONE SOFT or HARD)
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
double m_EEMIN
minimum energy of the e- (egamma & etron configurations)
double m_CUTOFF
cutoff energy for radiative corrections (in CM frame)
double m_TGMIN
minimum angle between the gamma and -z axis
std::string m_sVACPOL
Module parameters.
double m_TEMIN
minimum angle between the e- and -z axis (egamma conf.
double m_FRAPHI
fraction of time phi_ks is generated with peak(hard rad corr)
void initializeGenerator()
Method is called to initialize the generator.
double m_PEGMIN
minimum phi sep of e-gamma (egamma config with hard rad corr)
C++ Interface for the Fortran generator TEEGG.
Definition: Teegg.h:25
std::pair< T, T > vectorToPair(std::vector< T > &vec, const std::string &name="")
std::vector< T > make_vector(T const &t1, T const &t2)
make_vector.
Abstract base class for different kinds of events.