Belle II Software  release-08-01-10
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 <Math/LorentzRotation.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 
166  void generateEvent(MCParticleGraph& mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost);
167 
170  double getT() {return m_t;};
171 
174  double getW2() {return m_w2;};
175 
178  double getWeight() {return m_weight;};
179 
184  void term();
185 
186  protected:
187  double m_pi;
189  double m_alphaQED0;
190  double m_massElectron;
192  double m_cmsEnergy;
194  double m_TEVETO;
195  double m_TEMIN;
196  double m_TGMIN;
197  double m_TGVETO;
198  double m_EEMIN;
199  double m_EGMIN;
200  double m_PEGMIN;
201  double m_EEVETO;
202  double m_EGVETO;
203  double m_PHVETO;
204  double m_CUTOFF;
205  double m_EPS;
206  double m_FRAPHI;
207  double m_EPSPHI;
208  double m_WGHT1M;
209  double m_WGHTMX;
211  int m_VACPOL;
212  int m_RADCOR;
213  int m_CONFIG;
214  int m_MATRIX;
215  int m_MTRXGG;
216  std::string m_sVACPOL;
217  std::string m_sRADCOR;
218  std::string m_sCONFIG;
219  std::string m_sMATRIX;
220  std::string m_sMTRXGG;
221  int m_UNWGHT;
223  double m_t;
224  double m_w2;
225  double m_weight;
226  double m_vp2;
229  void applySettings();
230 
240  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, ROOT::Math::XYZVector vertex,
241  ROOT::Math::LorentzRotation boost,
242  bool isVirtual = false, bool isInitial = false);
243 
244  private:
245 
246  int m_npar[100];
247  double m_xpar[100];
248  };
250 }
251 
252 
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:215
void init()
Initialize generator.
Definition: Teegg.cc:153
void generateEvent(MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
Definition: Teegg.cc:159
double getT()
returns kinematic variable T.
Definition: Teegg.h:170
double m_EGVETO
minimum energy to veto(etron/gamma config with hard rad corr)
Definition: Teegg.h:202
double m_vp2
vacuum polarization squared (multiply with this to correcty for VP)
Definition: Teegg.h:226
~Teegg()
Destructor.
Definition: Teegg.cc:98
double m_alphaQED0
QED coupling constant at Q=0.
Definition: Teegg.h:189
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:194
int m_npar[100]
Integer parameters for Teegg.
Definition: Teegg.h:246
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: Teegg.h:188
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:88
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:201
double m_t
T=-Q2.
Definition: Teegg.h:223
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost, bool isVirtual=false, bool isInitial=false)
Store a single generated particle into the MonteCarlo graph.
Definition: Teegg.cc:281
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:103
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: Teegg.h:192
double m_WGHTMX
maximum weight for the trial events
Definition: Teegg.h:209
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:213
double m_EGMIN
minimum energy of the gamma (egamma & gamma configurations)
Definition: Teegg.h:199
int m_UNWGHT
logical variable.
Definition: Teegg.h:221
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:219
void term()
Terminates the generator.
Definition: Teegg.cc:197
double m_w2
W2.
Definition: Teegg.h:224
double getW2()
returns kinematic variable W2.
Definition: Teegg.h:174
double m_weight
weight per event
Definition: Teegg.h:225
int m_MATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: Teegg.h:214
double m_WGHT1M
maximum weight for generation of QP0, cos(theta QP)
Definition: Teegg.h:208
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:203
double m_EPSPHI
param.
Definition: Teegg.h:207
void setTGVETO(double tgveto=666.66)
set maximum angle between the gamma and -z axis(etron conf.
Definition: Teegg.h:62
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:218
int m_VACPOL
vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
Definition: Teegg.h:211
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:220
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:247
void setVACPOL(const std::string &vacpol="HLMNT")
specifies which vacuum polarization code (NOT IMPLEMENTED YET)
Definition: Teegg.h:42
int m_RADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:212
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:197
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:217
double m_pi
pi=3.1415....
Definition: Teegg.h:187
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:190
double m_EEMIN
minimum energy of the e- (egamma & etron configurations)
Definition: Teegg.h:198
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:204
void setUNWGHT(int unwght=1)
set logical variable.
Definition: Teegg.h:147
double getWeight()
returns weight.
Definition: Teegg.h:178
double m_TGMIN
minimum angle between the gamma and -z axis
Definition: Teegg.h:196
std::string m_sVACPOL
vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
Definition: Teegg.h:216
double m_TEMIN
minimum angle between the e- and -z axis (egamma conf.
Definition: Teegg.h:195
void initExtraInfo()
Initializes the extra info.
Definition: Teegg.cc:147
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:206
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:200
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: Teegg.cc:214
double m_EPS
param.
Definition: Teegg.h:205
Abstract base class for different kinds of events.