Belle II Software development
Teegg Class Reference

C++ Interface for the Fortran generator TEEGG. More...

#include <Teegg.h>

Public Member Functions

 Teegg ()
 Constructor.
 
 ~Teegg ()
 Destructor.
 
void setDefaultSettings ()
 Sets the default settings for the TEEGG Fortran generator.
 
void setVACPOL (const std::string &vacpol="HLMNT")
 specifies which vacuum polarization code (NOT IMPLEMENTED YET)
 
void setTEVETO (double teveto=666.66)
 set maximum theta of e+ in final state (in radians)
 
void setTEMIN (double temin=666.66)
 set minimum angle between the e- and -z axis (egamma conf.
 
void setTGMIN (double tgmin=666.66)
 set minimum angle between the gamma and -z axis
 
void setTGVETO (double tgveto=666.66)
 set maximum angle between the gamma and -z axis(etron conf.
 
void setEEMIN (double eemin=666.66)
 set minimum energy of the e- (egamma & etron configurations)
 
void setEGMIN (double egmin=666.66)
 set minimum energy of the gamma (egamma & gamma configurations)
 
void setPEGMIN (double pegmin=666.66)
 set minimum phi sep of e-gamma (egamma config with hard rad corr)
 
void setEEVETO (double eeveto=666.66)
 set minimum energy to veto(gamma config with hard rad corr)
 
void setEGVETO (double egveto=666.66)
 set minimum energy to veto(etron/gamma config with hard rad corr)
 
void setPHVETO (double phveto=666.66)
 set minimum phi sep to veto(etron/gamma config with hard rad corr)
 
void setCUTOFF (double cutoff=666.66)
 set cutoff energy for radiative corrections (in CM frame)
 
void setEPS (double eps=666.66)
 set param.
 
void setFRAPHI (double fraphi=666.66)
 set fraction of time phi_ks is generated with peak(hard rad corr)
 
void setEPSPHI (double epsphi=666.66)
 set param.
 
void setWGHT1M (double wght1m=666.66)
 set maximum weight for generation of QP0, cos(theta QP)
 
void setWGHTMX (double wghtmx=666.66)
 set maximum weight for the trial events
 
void setRADCOR (const std::string &radcor="NONE")
 specifies radiative correction (NONE SOFT or HARD)
 
void setCONFIG (const std::string &config="NONE")
 specifies the event configuration (EGAMMA GAMMA or ETRON)
 
void setMATRIX (const std::string &matrix="NONE")
 specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
 
void setMTRXGG (const std::string &mtrxgg="NONE")
 specifies which eegg matrix element (EPADC BEEGG or MEEGG)
 
void setUNWGHT (int unwght=1)
 set logical variable.
 
void setCMSEnergy (double cmsEnergy)
 Sets the CMS energy.
 
void init ()
 Initialize generator.
 
void initExtraInfo ()
 Initializes the extra info.
 
void generateEvent (MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
 Generates one single event.
 
double getT ()
 returns kinematic variable T.
 
double getW2 ()
 returns kinematic variable W2.
 
double getWeight ()
 returns weight.
 
void term ()
 Terminates the generator.
 

Protected Member Functions

void applySettings ()
 Apply the settings to the internal Fortran generator.
 
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.
 

Protected Attributes

double m_pi
 pi=3.1415....
 
double m_conversionFactor
 Conversion factor for hbarc to nb.
 
double m_alphaQED0
 QED coupling constant at Q=0.
 
double m_massElectron
 muon mass.
 
double m_cmsEnergy
 CMS Energy = 2*Ebeam [GeV].
 
double m_TEVETO
 maximum theta of e+ in final state (in radians)
 
double m_TEMIN
 minimum angle between the e- and -z axis (egamma conf.
 
double m_TGMIN
 minimum angle between the gamma and -z axis
 
double m_TGVETO
 maximum angle between the gamma and -z axis(etron conf.
 
double m_EEMIN
 minimum energy of the e- (egamma & etron configurations)
 
double m_EGMIN
 minimum energy of the gamma (egamma & gamma configurations)
 
double m_PEGMIN
 minimum phi sep of e-gamma (egamma config with hard rad corr)
 
double m_EEVETO
 minimum energy to veto(gamma config with hard rad corr)
 
double m_EGVETO
 minimum energy to veto(etron/gamma config with hard rad corr)
 
double m_PHVETO
 minimum phi sep to veto(etron/gamma config with hard rad corr
 
double m_CUTOFF
 cutoff energy for radiative corrections (in CM frame)
 
double m_EPS
 param.
 
double m_FRAPHI
 fraction of time phi_ks is generated with peak(hard rad corr)
 
double m_EPSPHI
 param.
 
double m_WGHT1M
 maximum weight for generation of QP0, cos(theta QP)
 
double m_WGHTMX
 maximum weight for the trial events
 
int m_VACPOL
 vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
 
int m_RADCOR
 specifies radiative correction (NONE SOFT or HARD)
 
int m_CONFIG
 specifies the event configuration (EGAMMA GAMMA or ETRON)
 
int m_MATRIX
 specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
 
int m_MTRXGG
 specifies which eegg matrix element (EPADC BEEGG or MEEGG)
 
std::string m_sVACPOL
 vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).
 
std::string m_sRADCOR
 specifies radiative correction (NONE SOFT or HARD)
 
std::string m_sCONFIG
 specifies the event configuration (EGAMMA GAMMA or ETRON)
 
std::string m_sMATRIX
 specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
 
std::string m_sMTRXGG
 specifies which eegg matrix element (EPADC BEEGG or MEEGG)
 
int m_UNWGHT
 logical variable.
 
double m_t
 T=-Q2.
 
double m_w2
 W2.
 
double m_weight
 weight per event
 
double m_vp2
 vacuum polarization squared (multiply with this to correcty for VP)
 

Private Attributes

int m_npar [100]
 Integer parameters for Teegg.
 
double m_xpar [100]
 Double parameters for Teegg.
 

Detailed Description

C++ Interface for the Fortran generator TEEGG.

Definition at line 25 of file Teegg.h.

Constructor & Destructor Documentation

◆ Teegg()

Teegg ( )

Constructor.

Sets the default settings.

Definition at line 88 of file Teegg.cc.

89{
90 for (int i = 0; i < 100; ++i) {
91 m_npar[i] = 0;
92 m_xpar[i] = 0.0;
93 }
94
96}
int m_npar[100]
Integer parameters for Teegg.
Definition: Teegg.h:246
void setDefaultSettings()
Sets the default settings for the TEEGG Fortran generator.
Definition: Teegg.cc:103
double m_xpar[100]
Double parameters for Teegg.
Definition: Teegg.h:247

◆ ~Teegg()

~Teegg ( )

Destructor.

Definition at line 98 of file Teegg.cc.

99{
100
101}

Member Function Documentation

◆ applySettings()

void applySettings ( )
protected

Apply the settings to the internal Fortran generator.

Definition at line 214 of file Teegg.cc.

215{
216 //--------------------
217 // Integer parameters
218 //--------------------
219 m_npar[0] = m_UNWGHT; //producing strange results...
220
221 if (m_sRADCOR == "NONE") m_RADCOR = 3; //DEFAULT
222 else if (m_sRADCOR == "SOFT") m_RADCOR = 2;
223 else if (m_sRADCOR == "HARD") m_RADCOR = 1;
224 else m_sRADCOR = 3;
225 m_npar[1] = m_RADCOR;
226
227 if (m_sCONFIG == "EGAMMA") m_CONFIG = 11; //DEFAULT
228 else if (m_sCONFIG == "ETRON") m_CONFIG = 12;
229 else if (m_sCONFIG == "GAMMA") m_CONFIG = 13;
230 else if (m_sCONFIG == "GAMMAE") m_CONFIG = 14;
231 else m_CONFIG = 11;
232 m_npar[2] = m_CONFIG;
233
234 if (m_sMATRIX == "BK") m_MATRIX = 21;
235 else if (m_sMATRIX == "BKM2") m_MATRIX = 22; //DEFAULT
236 else if (m_sMATRIX == "TCHAN") m_MATRIX = 23;
237 else if (m_sMATRIX == "EPA") m_MATRIX = 24;
238 else m_MATRIX = 22;
239 m_npar[3] = m_MATRIX;
240
241 if (m_sMTRXGG == "EPADC") m_MTRXGG = 31; //DEFAULT
242 else if (m_sMTRXGG == "BEEGG") m_MTRXGG = 32;
243 else if (m_sMTRXGG == "MEEGG") m_MTRXGG = 33;
244 else if (m_sMTRXGG == "HEEGG") m_MTRXGG = 34;
245 else m_MTRXGG = 31;
246 m_npar[4] = m_MTRXGG;
247
248 if (m_sVACPOL == "OFF") m_VACPOL = 41;
249 else if (m_sVACPOL == "HLMNT") m_VACPOL = 42; //DEFAULT
250 else if (m_sVACPOL == "NSK") m_VACPOL = 43;
251 else m_VACPOL = 42;
252 m_npar[5] = m_VACPOL;
253
254 //--------------------
255 // Double parameters
256 //--------------------
257 double toRad = TMath::DegToRad();
258 m_xpar[0] = m_TEVETO * toRad;
259 m_xpar[1] = m_TEMIN * toRad;
260 m_xpar[2] = m_TGMIN * toRad;
261 m_xpar[3] = m_TGVETO * toRad;
262 m_xpar[4] = m_EEMIN;
263 m_xpar[5] = m_EGMIN;
264 m_xpar[6] = m_PEGMIN * toRad;
265 m_xpar[7] = m_EEVETO;
266 m_xpar[8] = m_EGVETO;
267 m_xpar[9] = m_PHVETO * toRad;
268 m_xpar[10] = m_CUTOFF;
269 m_xpar[11] = m_EPS;
270 m_xpar[12] = m_FRAPHI;
271 m_xpar[13] = m_EPSPHI;
272 m_xpar[14] = m_WGHT1M;
273 m_xpar[15] = m_WGHTMX;
274 m_xpar[30] = m_cmsEnergy;
275
276 int mode = -1; //use mode to control init/generation/finalize in FORTRAN code
277 teeggm_(&mode, m_xpar, m_npar);
278}
int m_MTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: Teegg.h:215
double m_EGVETO
minimum energy to veto(etron/gamma config with hard rad corr)
Definition: Teegg.h:202
double m_TEVETO
maximum theta of e+ in final state (in radians)
Definition: Teegg.h:194
double m_EEVETO
minimum energy to veto(gamma config with hard rad corr)
Definition: Teegg.h:201
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
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
std::string m_sMATRIX
specifies which eeg matrix element (BK BKM2 TCHAN or EPA)
Definition: Teegg.h:219
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
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
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
std::string m_sMTRXGG
specifies which eegg matrix element (EPADC BEEGG or MEEGG)
Definition: Teegg.h:220
int m_RADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:212
double m_TGVETO
maximum angle between the gamma and -z axis(etron conf.
Definition: Teegg.h:197
std::string m_sRADCOR
specifies radiative correction (NONE SOFT or HARD)
Definition: Teegg.h:217
double m_EEMIN
minimum energy of the e- (egamma & etron configurations)
Definition: Teegg.h:198
double m_CUTOFF
cutoff energy for radiative corrections (in CM frame)
Definition: Teegg.h:204
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
double m_FRAPHI
fraction of time phi_ks is generated with peak(hard rad corr)
Definition: Teegg.h:206
double m_PEGMIN
minimum phi sep of e-gamma (egamma config with hard rad corr)
Definition: Teegg.h:200
double m_EPS
param.
Definition: Teegg.h:205

◆ generateEvent()

void generateEvent ( MCParticleGraph mcGraph,
ROOT::Math::XYZVector  vertex,
ROOT::Math::LorentzRotation  boost 
)

Generates one single event.

Parameters
mcGraphReference to the MonteCarlo graph into which the generated particles will be stored.
vertexProduction vertex.
boostLorentz boost vector.

Definition at line 159 of file Teegg.cc.

160{
161 //Generate event
162 int mode = 1;
163 teeggm_(&mode, m_xpar, m_npar);
164
165 //Store the final state fermions as real particle into the MCParticleGraph
166 storeParticle(mcGraph, momset_.tq2, 11, vertex, boost, false, false);
167 storeParticle(mcGraph, momset_.tp2, -11, vertex, boost, false, false);
168
169 //Store the real photon(s) into the MCParticleGraph
170 for (int iPhot = 0; iPhot < momset_.tnphot; ++iPhot) {
171 double photMom[4] = {momset_.tphot[0][iPhot], momset_.tphot[1][iPhot], momset_.tphot[2][iPhot], momset_.tphot[3][iPhot]};
172 storeParticle(mcGraph, photMom, 22, vertex, boost, false, false);
173 }
174
175 // Get extra information
176 m_t = teeggextra_.tt;
177 m_w2 = teeggextra_.tw2;
178 m_weight = teeggextra_.tweight;
179 m_vp2 = teeggextra_.tvp2;
180
181 // Fill event weight
182 StoreObjPtr<EventMetaData> eventMetaDataPtr("EventMetaData", DataStore::c_Event);
183 eventMetaDataPtr->setGeneratedWeight(m_weight);
184
185 // Fill vacuum polarization correction
186 StoreObjPtr<EventExtraInfo> eventExtraInfo;
187 if (not eventExtraInfo.isValid())
188 eventExtraInfo.create();
189 if (eventExtraInfo->hasExtraInfo("GeneratorVP2")) {
190 B2WARNING("EventExtraInfo with given name is already set! I won't set it again!");
191 } else {
192 eventExtraInfo->addExtraInfo("GeneratorVP2", m_vp2);
193 }
194
195}
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition: DataStore.h:59
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
double m_vp2
vacuum polarization squared (multiply with this to correcty for VP)
Definition: Teegg.h:226
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
double m_w2
W2.
Definition: Teegg.h:224
double m_weight
weight per event
Definition: Teegg.h:225

◆ getT()

double getT ( )
inline

returns kinematic variable T.

Definition at line 170 of file Teegg.h.

170{return m_t;};

◆ getW2()

double getW2 ( )
inline

returns kinematic variable W2.

Definition at line 174 of file Teegg.h.

174{return m_w2;};

◆ getWeight()

double getWeight ( )
inline

returns weight.

Definition at line 178 of file Teegg.h.

178{return m_weight;};

◆ init()

void init ( )

Initialize generator.

Definition at line 153 of file Teegg.cc.

154{
156}
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: Teegg.cc:214

◆ initExtraInfo()

void initExtraInfo ( )

Initializes the extra info.

Definition at line 147 of file Teegg.cc.

148{
149 StoreObjPtr<EventExtraInfo> eventextrainfo;
150 eventextrainfo.registerInDataStore();
151}
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.

◆ setCMSEnergy()

void setCMSEnergy ( double  cmsEnergy)
inline

Sets the CMS energy.

Parameters
cmsEnergyThe CMS energy in [GeV].

Definition at line 152 of file Teegg.h.

152{ m_cmsEnergy = cmsEnergy; }

◆ setCONFIG()

void setCONFIG ( const std::string &  config = "NONE")
inline

specifies the event configuration (EGAMMA GAMMA or ETRON)

Parameters
configevent configuration (EGAMMA GAMMA or ETRON)

Definition at line 132 of file Teegg.h.

132{m_sCONFIG = config;}

◆ setCUTOFF()

void setCUTOFF ( double  cutoff = 666.66)
inline

set cutoff energy for radiative corrections (in CM frame)

Parameters
cutoffcutoff energy for radiative corrections (in CM frame)

Definition at line 97 of file Teegg.h.

97{ m_CUTOFF = cutoff; }

◆ setDefaultSettings()

void setDefaultSettings ( )

Sets the default settings for the TEEGG Fortran generator.

Definition at line 103 of file Teegg.cc.

104{
105 m_cmsEnergy = 5.28695 * 2.0 * Unit::GeV;
106
107 m_pi = 3.1415926535897932384626433832795029;
108 m_conversionFactor = 0.389379660e6;
109 m_alphaQED0 = 1.0 / 137.0359895;
110 m_massElectron = 0.51099906 * Unit::MeV;
111
112 m_sVACPOL = "HLMNT";
113 m_sRADCOR = "NONE";
114 m_sCONFIG = "EGAMMA";
115 m_sMATRIX = "BKM2";
116 m_sMTRXGG = "EPADC";
117
118 m_TEVETO = 0.1;
119 m_TEMIN = 20.0;// TMath::ACos(0.750);
120 m_TGMIN = 20.0;// TMath::ACos(0.750);
121 m_TGVETO = 0.05;
122 m_EEMIN = 2.00;
123 m_EGMIN = 2.00;
124 m_PEGMIN = m_pi / 4.00;
125 m_EEVETO = 0.00;
126 m_EGVETO = 0.00;
127 m_PHVETO = m_pi / 4.00;
128 m_CUTOFF = 0.25;
129 m_EPS = 0.01;
130 m_FRAPHI = 0.00;
131 m_EPSPHI = 1.0e-4;
132 m_WGHT1M = 1.001;
133 m_WGHTMX = 1.000;
134
135 m_RADCOR = -1;
136 m_CONFIG = -1;
137 m_MATRIX = -1;
138 m_MTRXGG = -1;
139 m_VACPOL = -1;
140 m_UNWGHT = 1;
141 m_t = 0.0;
142 m_w2 = 1.0;
143 m_weight = 1.0;
144 m_vp2 = 1.0;
145}
double m_alphaQED0
QED coupling constant at Q=0.
Definition: Teegg.h:189
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: Teegg.h:188
double m_pi
pi=3.1415....
Definition: Teegg.h:187
double m_massElectron
muon mass.
Definition: Teegg.h:190
static const double MeV
[megaelectronvolt]
Definition: Unit.h:114
static const double GeV
Standard of [energy, momentum, mass].
Definition: Unit.h:51

◆ setEEMIN()

void setEEMIN ( double  eemin = 666.66)
inline

set minimum energy of the e- (egamma & etron configurations)

Parameters
eeminminimum energy of the e- (egamma & etron configurations)

Definition at line 67 of file Teegg.h.

67{ m_EEMIN = eemin; }

◆ setEEVETO()

void setEEVETO ( double  eeveto = 666.66)
inline

set minimum energy to veto(gamma config with hard rad corr)

Parameters
eevetominimum energy to veto(gamma config with hard rad corr)

Definition at line 82 of file Teegg.h.

82{ m_EEVETO = eeveto; }

◆ setEGMIN()

void setEGMIN ( double  egmin = 666.66)
inline

set minimum energy of the gamma (egamma & gamma configurations)

Parameters
egminminimum energy of the gamma (egamma & gamma configurations)

Definition at line 72 of file Teegg.h.

72{ m_EGMIN = egmin; }

◆ setEGVETO()

void setEGVETO ( double  egveto = 666.66)
inline

set minimum energy to veto(etron/gamma config with hard rad corr)

Parameters
egvetominimum energy to veto(etron/gamma config with hard rad corr)

Definition at line 87 of file Teegg.h.

87{ m_EGVETO = egveto; }

◆ setEPS()

void setEPS ( double  eps = 666.66)
inline

set param.

epsilon_s (smaller val. increases sampling of k_s^pbc)

Parameters
epsparam. epsilon_s (smaller val. increases sampling of k_s^pbc)

Definition at line 102 of file Teegg.h.

102{ m_EPS = eps; }

◆ setEPSPHI()

void setEPSPHI ( double  epsphi = 666.66)
inline

set param.

epsilon_phi ('cutoff' of the phi_ks peak)

Parameters
epsphiparam. epsilon_phi ('cutoff' of the phi_ks peak)

Definition at line 112 of file Teegg.h.

112{ m_EPSPHI = epsphi; }

◆ setFRAPHI()

void setFRAPHI ( double  fraphi = 666.66)
inline

set fraction of time phi_ks is generated with peak(hard rad corr)

Parameters
fraphiparfraction of time phi_ks is generated with peak(hard rad corr)

Definition at line 107 of file Teegg.h.

107{ m_FRAPHI = fraphi; }

◆ setMATRIX()

void setMATRIX ( const std::string &  matrix = "NONE")
inline

specifies which eeg matrix element (BK BKM2 TCHAN or EPA)

Parameters
matrixeeg matrix element (BK BKM2 TCHAN or EPA)

Definition at line 137 of file Teegg.h.

137{m_sMATRIX = matrix;}

◆ setMTRXGG()

void setMTRXGG ( const std::string &  mtrxgg = "NONE")
inline

specifies which eegg matrix element (EPADC BEEGG or MEEGG)

Parameters
mtrxggeegg matrix element (EPADC BEEGG or MEEGG)

Definition at line 142 of file Teegg.h.

142{m_sMTRXGG = mtrxgg;}

◆ setPEGMIN()

void setPEGMIN ( double  pegmin = 666.66)
inline

set minimum phi sep of e-gamma (egamma config with hard rad corr)

Parameters
pegminminimum phi sep of e-gamma (egamma config with hard rad corr)

Definition at line 77 of file Teegg.h.

77{ m_PEGMIN = pegmin; }

◆ setPHVETO()

void setPHVETO ( double  phveto = 666.66)
inline

set minimum phi sep to veto(etron/gamma config with hard rad corr)

Parameters
phvetominimum phi sep to veto(etron/gamma config with hard rad corr)

Definition at line 92 of file Teegg.h.

92{ m_PHVETO = phveto; }

◆ setRADCOR()

void setRADCOR ( const std::string &  radcor = "NONE")
inline

specifies radiative correction (NONE SOFT or HARD)

Parameters
radcorradiative correction (NONE SOFT or HARD)

Definition at line 127 of file Teegg.h.

127{m_sRADCOR = radcor;}

◆ setTEMIN()

void setTEMIN ( double  temin = 666.66)
inline

set minimum angle between the e- and -z axis (egamma conf.

only)

Parameters
teminminimum angle between the e- and -z axis (egamma conf. only)

Definition at line 52 of file Teegg.h.

52{ m_TEMIN = temin; }

◆ setTEVETO()

void setTEVETO ( double  teveto = 666.66)
inline

set maximum theta of e+ in final state (in radians)

Parameters
tevetomaximum theta of e+ in final state (in radians)

Definition at line 47 of file Teegg.h.

47{ m_TEVETO = teveto; }

◆ setTGMIN()

void setTGMIN ( double  tgmin = 666.66)
inline

set minimum angle between the gamma and -z axis

Parameters
tgminminimum angle between the gamma and -z axis

Definition at line 57 of file Teegg.h.

57{ m_TGMIN = tgmin; }

◆ setTGVETO()

void setTGVETO ( double  tgveto = 666.66)
inline

set maximum angle between the gamma and -z axis(etron conf.

only)

Parameters
tgvetomaximum angle between the gamma and -z axis(etron conf. only)

Definition at line 62 of file Teegg.h.

62{ m_TGVETO = tgveto; }

◆ setUNWGHT()

void setUNWGHT ( int  unwght = 1)
inline

set logical variable.

If true then generate unweighted events

Parameters
unwghtlogical variable. If true then generate unweighted events

Definition at line 147 of file Teegg.h.

147{ m_UNWGHT = unwght; }

◆ setVACPOL()

void setVACPOL ( const std::string &  vacpol = "HLMNT")
inline

specifies which vacuum polarization code (NOT IMPLEMENTED YET)

Parameters
vacpolvacuum polarization code (NOT IMPLEMENTED YET)

Definition at line 42 of file Teegg.h.

42{m_sVACPOL = vacpol;}

◆ setWGHT1M()

void setWGHT1M ( double  wght1m = 666.66)
inline

set maximum weight for generation of QP0, cos(theta QP)

Parameters
wght1mmaximum weight for generation of QP0, cos(theta QP)

Definition at line 117 of file Teegg.h.

117{ m_WGHT1M = wght1m; }

◆ setWGHTMX()

void setWGHTMX ( double  wghtmx = 666.66)
inline

set maximum weight for the trial events

Parameters
wghtmxmaximum weight for the trial events

Definition at line 122 of file Teegg.h.

122{ m_WGHTMX = wghtmx; }

◆ storeParticle()

void storeParticle ( MCParticleGraph mcGraph,
const double *  mom,
int  pdg,
ROOT::Math::XYZVector  vertex,
ROOT::Math::LorentzRotation  boost,
bool  isVirtual = false,
bool  isInitial = false 
)
protected

Store a single generated particle into the MonteCarlo graph.

Parameters
mcGraphReference to the MonteCarlo graph into which the particle should be stored.
momThe 3-momentum of the particle in [GeV].
pdgThe PDG code of the particle.
vertexProduciton vertex.
boostLorentz boost vector.
isVirtualIf the particle is a virtual particle, such as the incoming particles, set this to true.
isInitialIf the particle is a initial particle for ISR, set this to true.

Definition at line 281 of file Teegg.cc.

284{
285 // Create particle
287 if (isVirtual) {
289 } else if (isInitial) {
291 }
292
293 // All particles from a generator are primary
295
296 // All particles from TEEGG are stable
298
299 // All gammas from TEEGG are ISR or FSR (impossible to distinguish due to IFI)
300 if (pdg == 22) {
303 }
304
305 part.setPDG(pdg);
306 part.setFirstDaughter(0);
307 part.setLastDaughter(0);
308 part.setMomentum(ROOT::Math::XYZVector(mom[0], mom[1], mom[2]));
309 part.setMass(TDatabasePDG::Instance()->GetParticle(pdg)->Mass());
310 part.setEnergy(mom[3]);
311
312 //boost
313 ROOT::Math::PxPyPzEVector p4 = part.get4Vector();
314 p4.SetPz(-1.0 * p4.Pz()); //TEEGG uses other direction convention
315 p4 = boost * p4;
316 part.set4Vector(p4);
317
318 //set vertex
319 if (!isInitial) {
320 ROOT::Math::XYZVector v3 = part.getProductionVertex();
321 v3 = v3 + vertex;
322 part.setProductionVertex(v3);
323 part.setValidVertex(true);
324 }
325}
Class to represent Particle data in graph.
void setFirstDaughter(int daughter)
Set the 1-based index of the first daughter, 0 means no daughters.
void setLastDaughter(int daughter)
Set the 1-based index of the last daughter, 0 means no daughters.
@ c_IsFSRPhoton
bit 7: Particle is from finial state radiation
Definition: MCParticle.h:61
@ c_Initial
bit 5: Particle is initial such as e+ or e- and not going to Geant4
Definition: MCParticle.h:57
@ c_PrimaryParticle
bit 0: Particle is primary particle.
Definition: MCParticle.h:47
@ c_IsVirtual
bit 4: Particle is virtual and not going to Geant4.
Definition: MCParticle.h:55
@ c_StableInGenerator
bit 1: Particle is stable, i.e., not decaying in the generator.
Definition: MCParticle.h:49
@ c_IsISRPhoton
bit 6: Particle is from initial state radiation
Definition: MCParticle.h:59
void setMass(float mass)
Set particle mass.
Definition: MCParticle.h:366
void addStatus(unsigned short int bitmask)
Add bitmask to current status.
Definition: MCParticle.h:353
void setEnergy(float energy)
Set energy.
Definition: MCParticle.h:372
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
Definition: MCParticle.h:189
void setValidVertex(bool valid)
Set indication wether vertex and time information is valid or just default.
Definition: MCParticle.h:378
void setProductionVertex(const ROOT::Math::XYZVector &vertex)
Set production vertex position.
Definition: MCParticle.h:396
ROOT::Math::PxPyPzEVector get4Vector() const
Return 4Vector of particle.
Definition: MCParticle.h:207
void setPDG(int pdg)
Set PDG code of the particle.
Definition: MCParticle.h:335
void set4Vector(const ROOT::Math::PxPyPzEVector &p4)
Sets the 4Vector of particle.
Definition: MCParticle.h:438
void setMomentum(const ROOT::Math::XYZVector &momentum)
Set particle momentum.
Definition: MCParticle.h:417
GraphParticle & addParticle()
Add new particle to the graph.
const std::vector< double > v3
MATLAB generated random vector.

◆ term()

void term ( )

Terminates the generator.

Closes the internal Fortran generator.

Definition at line 197 of file Teegg.cc.

198{
199 int mode = 2;
200 teeggm_(&mode, m_xpar, m_npar);
201
202 B2RESULT("Cross-section (nb) = " << teeggresults_.rescross / 1.e3 << " +/- " << teeggresults_.rescrosserr / 1.e3 << "");
203 B2RESULT("Events (unweighted) = " << teeggresults_.resngen);
204 B2RESULT("Trials = " << teeggresults_.resntrials);
205 B2RESULT("Efficiency = " << 100.*teeggresults_.reseff << " %");
206 B2RESULT("Average Q2 = " << teeggresults_.avgq2);
207
208}

Member Data Documentation

◆ m_alphaQED0

double m_alphaQED0
protected

QED coupling constant at Q=0.

Definition at line 189 of file Teegg.h.

◆ m_cmsEnergy

double m_cmsEnergy
protected

CMS Energy = 2*Ebeam [GeV].

Definition at line 192 of file Teegg.h.

◆ m_CONFIG

int m_CONFIG
protected

specifies the event configuration (EGAMMA GAMMA or ETRON)

Definition at line 213 of file Teegg.h.

◆ m_conversionFactor

double m_conversionFactor
protected

Conversion factor for hbarc to nb.

Definition at line 188 of file Teegg.h.

◆ m_CUTOFF

double m_CUTOFF
protected

cutoff energy for radiative corrections (in CM frame)

Definition at line 204 of file Teegg.h.

◆ m_EEMIN

double m_EEMIN
protected

minimum energy of the e- (egamma & etron configurations)

Definition at line 198 of file Teegg.h.

◆ m_EEVETO

double m_EEVETO
protected

minimum energy to veto(gamma config with hard rad corr)

Definition at line 201 of file Teegg.h.

◆ m_EGMIN

double m_EGMIN
protected

minimum energy of the gamma (egamma & gamma configurations)

Definition at line 199 of file Teegg.h.

◆ m_EGVETO

double m_EGVETO
protected

minimum energy to veto(etron/gamma config with hard rad corr)

Definition at line 202 of file Teegg.h.

◆ m_EPS

double m_EPS
protected

param.

epsilon_s (smaller val. increases sampling of k_s^pbc)

Definition at line 205 of file Teegg.h.

◆ m_EPSPHI

double m_EPSPHI
protected

param.

epsilon_phi ('cutoff' of the phi_ks peak)

Definition at line 207 of file Teegg.h.

◆ m_FRAPHI

double m_FRAPHI
protected

fraction of time phi_ks is generated with peak(hard rad corr)

Definition at line 206 of file Teegg.h.

◆ m_massElectron

double m_massElectron
protected

muon mass.

Definition at line 190 of file Teegg.h.

◆ m_MATRIX

int m_MATRIX
protected

specifies which eeg matrix element (BK BKM2 TCHAN or EPA)

Definition at line 214 of file Teegg.h.

◆ m_MTRXGG

int m_MTRXGG
protected

specifies which eegg matrix element (EPADC BEEGG or MEEGG)

Definition at line 215 of file Teegg.h.

◆ m_npar

int m_npar[100]
private

Integer parameters for Teegg.

Definition at line 246 of file Teegg.h.

◆ m_PEGMIN

double m_PEGMIN
protected

minimum phi sep of e-gamma (egamma config with hard rad corr)

Definition at line 200 of file Teegg.h.

◆ m_PHVETO

double m_PHVETO
protected

minimum phi sep to veto(etron/gamma config with hard rad corr

Definition at line 203 of file Teegg.h.

◆ m_pi

double m_pi
protected

pi=3.1415....

Definition at line 187 of file Teegg.h.

◆ m_RADCOR

int m_RADCOR
protected

specifies radiative correction (NONE SOFT or HARD)

Definition at line 212 of file Teegg.h.

◆ m_sCONFIG

std::string m_sCONFIG
protected

specifies the event configuration (EGAMMA GAMMA or ETRON)

Definition at line 218 of file Teegg.h.

◆ m_sMATRIX

std::string m_sMATRIX
protected

specifies which eeg matrix element (BK BKM2 TCHAN or EPA)

Definition at line 219 of file Teegg.h.

◆ m_sMTRXGG

std::string m_sMTRXGG
protected

specifies which eegg matrix element (EPADC BEEGG or MEEGG)

Definition at line 220 of file Teegg.h.

◆ m_sRADCOR

std::string m_sRADCOR
protected

specifies radiative correction (NONE SOFT or HARD)

Definition at line 217 of file Teegg.h.

◆ m_sVACPOL

std::string m_sVACPOL
protected

vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).

Definition at line 216 of file Teegg.h.

◆ m_t

double m_t
protected

T=-Q2.

Definition at line 223 of file Teegg.h.

◆ m_TEMIN

double m_TEMIN
protected

minimum angle between the e- and -z axis (egamma conf.

only)

Definition at line 195 of file Teegg.h.

◆ m_TEVETO

double m_TEVETO
protected

maximum theta of e+ in final state (in radians)

Definition at line 194 of file Teegg.h.

◆ m_TGMIN

double m_TGMIN
protected

minimum angle between the gamma and -z axis

Definition at line 196 of file Teegg.h.

◆ m_TGVETO

double m_TGVETO
protected

maximum angle between the gamma and -z axis(etron conf.

only)

Definition at line 197 of file Teegg.h.

◆ m_UNWGHT

int m_UNWGHT
protected

logical variable.

If true then generate unweighted events.

Definition at line 221 of file Teegg.h.

◆ m_VACPOL

int m_VACPOL
protected

vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner).

Definition at line 211 of file Teegg.h.

◆ m_vp2

double m_vp2
protected

vacuum polarization squared (multiply with this to correcty for VP)

Definition at line 226 of file Teegg.h.

◆ m_w2

double m_w2
protected

W2.

Definition at line 224 of file Teegg.h.

◆ m_weight

double m_weight
protected

weight per event

Definition at line 225 of file Teegg.h.

◆ m_WGHT1M

double m_WGHT1M
protected

maximum weight for generation of QP0, cos(theta QP)

Definition at line 208 of file Teegg.h.

◆ m_WGHTMX

double m_WGHTMX
protected

maximum weight for the trial events

Definition at line 209 of file Teegg.h.

◆ m_xpar

double m_xpar[100]
private

Double parameters for Teegg.

Definition at line 247 of file Teegg.h.


The documentation for this class was generated from the following files: