Belle II Software  release-06-02-00
Teegg.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 <mdst/dataobjects/MCParticleGraph.h>
12 #include <TLorentzRotation.h>
13 
14 namespace Belle2 {
25  class Teegg {
26  public:
27 
31  Teegg();
32 
34  ~Teegg();
35 
37  void setDefaultSettings();
38 
42  void setVACPOL(const std::string& vacpol = "HLMNT") {m_sVACPOL = vacpol;}
43 
47  void setTEVETO(double teveto = 666.66) { m_TEVETO = teveto; }
48 
52  void setTEMIN(double temin = 666.66) { m_TEMIN = temin; }
53 
57  void setTGMIN(double tgmin = 666.66) { m_TGMIN = tgmin; }
58 
62  void setTGVETO(double tgveto = 666.66) { m_TGVETO = tgveto; }
63 
67  void setEEMIN(double eemin = 666.66) { m_EEMIN = eemin; }
68 
72  void setEGMIN(double egmin = 666.66) { m_EGMIN = egmin; }
73 
77  void setPEGMIN(double pegmin = 666.66) { m_PEGMIN = pegmin; }
78 
82  void setEEVETO(double eeveto = 666.66) { m_EEVETO = eeveto; }
83 
87  void setEGVETO(double egveto = 666.66) { m_EGVETO = egveto; }
88 
92  void setPHVETO(double phveto = 666.66) { m_PHVETO = phveto; }
93 
97  void setCUTOFF(double cutoff = 666.66) { m_CUTOFF = cutoff; }
98 
102  void setEPS(double eps = 666.66) { m_EPS = eps; }
103 
107  void setFRAPHI(double fraphi = 666.66) { m_FRAPHI = fraphi; }
108 
112  void setEPSPHI(double epsphi = 666.66) { m_EPSPHI = epsphi; }
113 
117  void setWGHT1M(double wght1m = 666.66) { m_WGHT1M = wght1m; }
118 
122  void setWGHTMX(double wghtmx = 666.66) { m_WGHTMX = wghtmx; }
123 
127  void setRADCOR(const std::string& radcor = "NONE") {m_sRADCOR = radcor;}
128 
132  void setCONFIG(const std::string& config = "NONE") {m_sCONFIG = config;}
133 
137  void setMATRIX(const std::string& matrix = "NONE") {m_sMATRIX = matrix;}
138 
142  void setMTRXGG(const std::string& mtrxgg = "NONE") {m_sMTRXGG = mtrxgg;}
143 
147  void setUNWGHT(int unwght = 1) { m_UNWGHT = unwght; }
148 
152  void setCMSEnergy(double cmsEnergy) { m_cmsEnergy = cmsEnergy; }
153 
154  void init();
159  void initExtraInfo();
160 
164  void generateEvent(MCParticleGraph& mcGraph, TVector3 vertex, TLorentzRotation boost);
165 
168  double getT() {return m_t;};
169 
172  double getW2() {return m_w2;};
173 
176  double getWeight() {return m_weight;};
177 
182  void term();
183 
184  protected:
185  double m_pi;
187  double m_alphaQED0;
188  double m_massElectron;
190  double m_cmsEnergy;
192  double m_TEVETO;
193  double m_TEMIN;
194  double m_TGMIN;
195  double m_TGVETO;
196  double m_EEMIN;
197  double m_EGMIN;
198  double m_PEGMIN;
199  double m_EEVETO;
200  double m_EGVETO;
201  double m_PHVETO;
202  double m_CUTOFF;
203  double m_EPS;
204  double m_FRAPHI;
205  double m_EPSPHI;
206  double m_WGHT1M;
207  double m_WGHTMX;
209  int m_VACPOL;
210  int m_RADCOR;
211  int m_CONFIG;
212  int m_MATRIX;
213  int m_MTRXGG;
214  std::string m_sVACPOL;
215  std::string m_sRADCOR;
216  std::string m_sCONFIG;
217  std::string m_sMATRIX;
218  std::string m_sMTRXGG;
219  int m_UNWGHT;
221  double m_t;
222  double m_w2;
223  double m_weight;
224  double m_vp2;
227  void applySettings();
228 
236  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, TVector3 vertex, TLorentzRotation boost,
237  bool isVirtual = false, bool isInitial = false);
238 
239  private:
240 
241  int m_npar[100];
242  double m_xpar[100];
243  };
245 }
246 
247 
Class to build, validate and sort a particle decay chain.
C++ Interface for the Fortran generator TEEGG.
Definition: Teegg.h:25
int m_MTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: Teegg.h:213
void init()
Initialize generator.
Definition: Teegg.cc:152
double getT()
returns kinematic variable T.
Definition: Teegg.h:168
double m_EGVETO
minimum energy to veto(etron/gamma config with hard rad corr)
Definition: Teegg.h:200
double m_vp2
vacuum polarization squared (multiply with this to correcty for VP)
Definition: Teegg.h:224
~Teegg()
Destructor.
Definition: Teegg.cc:97
double m_alphaQED0
QED coupling constant at Q=0.
Definition: Teegg.h:187
void setTGMIN(double tgmin=666.66)
set minimum angle between the gamma and -z axis
Definition: Teegg.h:57
double m_TEVETO
maximum theta of e+ in final state (in radians)
Definition: Teegg.h:192
int m_npar[100]
Integer parameters for Teegg.
Definition: Teegg.h:241
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: Teegg.h:186
void setMTRXGG(const std::string &mtrxgg="NONE")
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: Teegg.h:142
Teegg()
Constructor.
Definition: Teegg.cc:87
void setPEGMIN(double pegmin=666.66)
set minimum phi sep of e-gamma (egamma config with hard rad corr)
Definition: Teegg.h:77
double m_EEVETO
minimum energy to veto(gamma config with hard rad corr)
Definition: Teegg.h:199
double m_t
T=-Q2.
Definition: Teegg.h:221
void setEPSPHI(double epsphi=666.66)
set param.
Definition: Teegg.h:112
void setDefaultSettings()
Sets the default settings for the TEEGG Fortran generator.
Definition: Teegg.cc:102
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: Teegg.h:190
double m_WGHTMX
maximum weight for the trial events
Definition: Teegg.h:207
void setEEMIN(double eemin=666.66)
set minimum energy of the e- (egamma & etron configurations)
Definition: Teegg.h:67
void setWGHTMX(double wghtmx=666.66)
set maximum weight for the trial events
Definition: Teegg.h:122
int m_CONFIG
specifies the event configuration (EGAMMA GAMMA or ETRON)
Definition: Teegg.h:211
double m_EGMIN
minimum energy of the gamma (egamma & gamma configurations)
Definition: Teegg.h:197
int m_UNWGHT
logical variable.
Definition: Teegg.h:219
void setEGVETO(double egveto=666.66)
set minimum energy to veto(etron/gamma config with hard rad corr)
Definition: Teegg.h:87
void setCMSEnergy(double cmsEnergy)
Sets the CMS energy.
Definition: Teegg.h:152
std::string m_sMATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: Teegg.h:217
void term()
Terminates the generator.
Definition: Teegg.cc:196
double m_w2
W2.
Definition: Teegg.h:222
double getW2()
returns kinematic variable W2.
Definition: Teegg.h:172
double m_weight
weight per event
Definition: Teegg.h:223
int m_MATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: Teegg.h:212
double m_WGHT1M
maximum weight for generation of QP0, cos(theta QP)
Definition: Teegg.h:206
void setFRAPHI(double fraphi=666.66)
set fraction of time phi_ks is generated with peak(hard rad corr)
Definition: Teegg.h:107
double m_PHVETO
minimum phi sep to veto(etron/gamma config with hard rad corr
Definition: Teegg.h:201
double m_EPSPHI
param.
Definition: Teegg.h:205
void setTGVETO(double tgveto=666.66)
set maximum angle between the gamma and -z axis(etron conf.
Definition: Teegg.h:62
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, TVector3 vertex, TLorentzRotation boost, bool isVirtual=false, bool isInitial=false)
Store a single generated particle into the MonteCarlo graph.
Definition: Teegg.cc:280
void setCONFIG(const std::string &config="NONE")
specifies the event configuration (EGAMMA GAMMA or ETRON)
Definition: Teegg.h:132
std::string m_sCONFIG
specifies the event configuration (EGAMMA GAMMA or ETRON)
Definition: Teegg.h:216
int m_VACPOL
vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
Definition: Teegg.h:209
void setRADCOR(const std::string &radcor="NONE")
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:127
std::string m_sMTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: Teegg.h:218
void setPHVETO(double phveto=666.66)
set minimum phi sep to veto(etron/gamma config with hard rad corr)
Definition: Teegg.h:92
double m_xpar[100]
Double parameters for Teegg.
Definition: Teegg.h:242
void setVACPOL(const std::string &vacpol="HLMNT")
specifies which vacuum polarization code (NOT IMPLEMENTED YET)
Definition: Teegg.h:42
void generateEvent(MCParticleGraph &mcGraph, TVector3 vertex, TLorentzRotation boost)
Generates one single event.
Definition: Teegg.cc:158
int m_RADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:210
void setWGHT1M(double wght1m=666.66)
set maximum weight for generation of QP0, cos(theta QP)
Definition: Teegg.h:117
double m_TGVETO
maximum angle between the gamma and -z axis(etron conf.
Definition: Teegg.h:195
void setEGMIN(double egmin=666.66)
set minimum energy of the gamma (egamma & gamma configurations)
Definition: Teegg.h:72
std::string m_sRADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:215
double m_pi
pi=3.1415....
Definition: Teegg.h:185
void setMATRIX(const std::string &matrix="NONE")
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: Teegg.h:137
double m_massElectron
muon mass.
Definition: Teegg.h:188
double m_EEMIN
minimum energy of the e- (egamma & etron configurations)
Definition: Teegg.h:196
void setTEMIN(double temin=666.66)
set minimum angle between the e- and -z axis (egamma conf.
Definition: Teegg.h:52
double m_CUTOFF
cutoff energy for radiative corrections (in CM frame)
Definition: Teegg.h:202
void setUNWGHT(int unwght=1)
set logical variable.
Definition: Teegg.h:147
double getWeight()
returns weight.
Definition: Teegg.h:176
double m_TGMIN
minimum angle between the gamma and -z axis
Definition: Teegg.h:194
std::string m_sVACPOL
vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
Definition: Teegg.h:214
double m_TEMIN
minimum angle between the e- and -z axis (egamma conf.
Definition: Teegg.h:193
void initExtraInfo()
Initializes the extra info.
Definition: Teegg.cc:146
void setTEVETO(double teveto=666.66)
set maximum theta of e+ in final state (in radians)
Definition: Teegg.h:47
void setEEVETO(double eeveto=666.66)
set minimum energy to veto(gamma config with hard rad corr)
Definition: Teegg.h:82
double m_FRAPHI
fraction of time phi_ks is generated with peak(hard rad corr)
Definition: Teegg.h:204
void setCUTOFF(double cutoff=666.66)
set cutoff energy for radiative corrections (in CM frame)
Definition: Teegg.h:97
void setEPS(double eps=666.66)
set param.
Definition: Teegg.h:102
double m_PEGMIN
minimum phi sep of e-gamma (egamma config with hard rad corr)
Definition: Teegg.h:198
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: Teegg.cc:213
double m_EPS
param.
Definition: Teegg.h:203
Abstract base class for different kinds of events.