Belle II Software  release-05-02-19
TeeggInputModule.h
1 
2 /**************************************************************************
3  * BASF2 (Belle Analysis Framework 2) *
4  * Copyright(C) 2015 Belle II Collaboration *
5  * *
6  * Author: The Belle II Collaboration *
7  * Contributors: Torben Ferber *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef TEEGGINPUTMODULE_H
13 #define TEEGGINPUTMODULE_H
14 
15 #include <framework/core/Module.h>
16 #include <framework/logging/Logger.h>
17 
18 #include <generators/teegg/Teegg.h>
19 #include <generators/utilities/InitialParticleGeneration.h>
20 
21 #include <mdst/dataobjects/MCParticleGraph.h>
22 
23 #include <vector>
24 
25 namespace Belle2 {
37  class TeeggInputModule : public Module {
38 
39  public:
40 
46 
48  virtual ~TeeggInputModule();
49 
51  virtual void initialize() override;
52 
54  virtual void event() override;
55 
57  virtual void terminate() override;
58 
59  protected:
60 
62  std::string m_sVACPOL;
63  double m_cmsEnergy;
64  double m_TEVETO;
65  double m_TEMIN;
66  double m_TGMIN;
67  double m_TGVETO;
68  double m_EEMIN;
69  double m_EGMIN;
70  double m_PEGMIN;
71  double m_EEVETO;
72  double m_EGVETO;
73  double m_PHVETO;
74  double m_CUTOFF;
75  double m_EPS;
76  double m_FRAPHI;
77  double m_EPSPHI;
78  double m_WGHT1M;
79  double m_WGHTMX;
80  std::string m_sRADCOR;
81  std::string m_sCONFIG;
82  std::string m_sMATRIX;
83  std::string m_sMTRXGG;
84  int m_UNWGHT;
90  template <typename T>
91  std::vector<T> make_vector(T const& t1, T const& t2);
93  template <typename T>
94  std::pair<T, T> vectorToPair(std::vector<T>& vec, const std::string& name = "");
95 
96  private:
97 
99  void initializeGenerator();
100 
101  bool m_initialized{false};
106  };
108  template <typename T>
109  inline std::vector<T> TeeggInputModule::make_vector(T const& t1, T const& t2)
110  {
111  std::vector<T> v;
112  v.push_back(t1);
113  v.push_back(t2);
114  return v;
115  }
116 
117  template <typename T>
118  inline std::pair<T, T> TeeggInputModule::vectorToPair(std::vector<T>& vec, const std::string& name)
119  {
120  std::pair<T, T> p;
121  if (vec.size() != 2) {
122  B2ERROR("The parameter " + name + " has to have exactly 2 elements!");
123  } else {
124  p.first = vec[0];
125  p.second = vec[1];
126  }
127  return p;
128  }
129 
131 } // end namespace Belle2
132 
133 #endif /* TEEGGINPUTMODULE_H */
Belle2::TeeggInputModule::~TeeggInputModule
virtual ~TeeggInputModule()
Destructor.
Definition: TeeggInputModule.cc:59
Belle2::TeeggInputModule::m_TGVETO
double m_TGVETO
maximum angle between the gamma and -z axis(etron conf.
Definition: TeeggInputModule.h:75
Belle2::TeeggInputModule::TeeggInputModule
TeeggInputModule()
Constructor.
Definition: TeeggInputModule.cc:27
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::TeeggInputModule::m_sVACPOL
std::string m_sVACPOL
Module parameters.
Definition: TeeggInputModule.h:70
Belle2::TeeggInputModule::m_sCONFIG
std::string m_sCONFIG
specifies the event configuration (EGAMMA GAMMA or ETRON)
Definition: TeeggInputModule.h:89
Belle2::TeeggInputModule::m_TGMIN
double m_TGMIN
minimum angle between the gamma and -z axis
Definition: TeeggInputModule.h:74
Belle2::TeeggInputModule::m_beamParams
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
Definition: TeeggInputModule.h:110
Belle2::TeeggInputModule::event
virtual void event() override
Method is called for each event.
Definition: TeeggInputModule.cc:80
Belle2::TeeggInputModule::m_TEVETO
double m_TEVETO
maximum theta of e+ in final state (in radians)
Definition: TeeggInputModule.h:72
Belle2::InitialParticleGeneration
Generate Collision.
Definition: InitialParticleGeneration.h:35
Belle2::TeeggInputModule::m_EPS
double m_EPS
param.
Definition: TeeggInputModule.h:83
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::TeeggInputModule::m_WGHTMX
double m_WGHTMX
maximum weight for the trial events
Definition: TeeggInputModule.h:87
Belle2::TeeggInputModule::m_EGMIN
double m_EGMIN
minimum energy of the gamma (egamma & gamma configurations)
Definition: TeeggInputModule.h:77
Belle2::TeeggInputModule::initialize
virtual void initialize() override
Initializes the module.
Definition: TeeggInputModule.cc:65
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TeeggInputModule::m_EPSPHI
double m_EPSPHI
param.
Definition: TeeggInputModule.h:85
Belle2::TeeggInputModule::m_TEMIN
double m_TEMIN
minimum angle between the e- and -z axis (egamma conf.
Definition: TeeggInputModule.h:73
Belle2::TeeggInputModule::m_cmsEnergy
double m_cmsEnergy
CMS energy.
Definition: TeeggInputModule.h:71
Belle2::TeeggInputModule::m_FRAPHI
double m_FRAPHI
fraction of time phi_ks is generated with peak(hard rad corr)
Definition: TeeggInputModule.h:84
Belle2::TeeggInputModule::make_vector
std::vector< T > make_vector(T const &t1, T const &t2)
make_vector.
Definition: TeeggInputModule.h:117
Belle2::TeeggInputModule::m_WGHT1M
double m_WGHT1M
maximum weight for generation of QP0, cos(theta QP)
Definition: TeeggInputModule.h:86
Belle2::TeeggInputModule::m_generator
Teegg m_generator
Variables.
Definition: TeeggInputModule.h:95
Belle2::TeeggInputModule::m_EEVETO
double m_EEVETO
minimum energy to veto(gamma config with hard rad corr)
Definition: TeeggInputModule.h:79
Belle2::TeeggInputModule::m_mcGraph
MCParticleGraph m_mcGraph
The MCParticle graph object.
Definition: TeeggInputModule.h:96
Belle2::TeeggInputModule::m_initial
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
Definition: TeeggInputModule.h:112
Belle2::TeeggInputModule::m_sMTRXGG
std::string m_sMTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: TeeggInputModule.h:91
Belle2::TeeggInputModule::m_initialized
bool m_initialized
True if generator has been initialized.
Definition: TeeggInputModule.h:109
Belle2::TeeggInputModule::vectorToPair
std::pair< T, T > vectorToPair(std::vector< T > &vec, const std::string &name="")
Definition: TeeggInputModule.h:126
Belle2::TeeggInputModule::m_EGVETO
double m_EGVETO
minimum energy to veto(etron/gamma config with hard rad corr)
Definition: TeeggInputModule.h:80
Belle2::TeeggInputModule::initializeGenerator
void initializeGenerator()
Method is called to initialize the generator.
Definition: TeeggInputModule.cc:113
Belle2::TeeggInputModule::m_PHVETO
double m_PHVETO
minimum phi sep to veto(etron/gamma config with hard rad corr
Definition: TeeggInputModule.h:81
Belle2::TeeggInputModule::m_PEGMIN
double m_PEGMIN
minimum phi sep of e-gamma (egamma config with hard rad corr)
Definition: TeeggInputModule.h:78
Belle2::TeeggInputModule::m_sRADCOR
std::string m_sRADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: TeeggInputModule.h:88
Belle2::TeeggInputModule::m_EEMIN
double m_EEMIN
minimum energy of the e- (egamma & etron configurations)
Definition: TeeggInputModule.h:76
Belle2::TeeggInputModule::terminate
virtual void terminate() override
Method is called at the end of the event processing.
Definition: TeeggInputModule.cc:108
Belle2::TeeggInputModule::m_UNWGHT
int m_UNWGHT
logical variable.
Definition: TeeggInputModule.h:92
Belle2::Teegg
C++ Interface for the Fortran generator TEEGG.
Definition: Teegg.h:35
Belle2::TeeggInputModule::m_CUTOFF
double m_CUTOFF
cutoff energy for radiative corrections (in CM frame)
Definition: TeeggInputModule.h:82
Belle2::TeeggInputModule::m_sMATRIX
std::string m_sMATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: TeeggInputModule.h:90