Belle II Software  release-08-01-10
BabayagaNLO.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 #include <Math/Vector3D.h>
14 #include <utility>
15 
16 namespace Belle2 {
27  class BabayagaNLO {
28  public:
29 
33  BabayagaNLO();
34 
36  ~BabayagaNLO();
37 
39  void setDefaultSettings();
40 
44  void setScatAngle(std::pair<double, double> angleRange) { m_ScatteringAngleRange = angleRange; }
45 
49  void setNSearchMax(int nSearchMax) { m_nSearchMax = nSearchMax; }
50 
54  void setFMax(double fMax) { m_fMax = fMax; }
55 
59  void setMaxAcollinearity(double maxAcollinearity) { m_maxAcollinearity = maxAcollinearity; }
60 
64  void setCmsEnergyNominal(double cmsEnergyNominal) { m_cmsEnergyNominal = cmsEnergyNominal; }
65 
69  void setMinEnergy(double minEnergy) { m_eMin = minEnergy; }
70 
74  void setEpsilon(double epsilon) { m_epsilon = epsilon; }
75 
79  void setVacPol(const std::string& vacPol) { m_vacPol = vacPol; }
80 
84  void setModel(const std::string& model) { m_model = model; }
85 
89  void setMode(const std::string& mode) { m_mode = mode; }
90 
94  void setOrder(const std::string& order) { m_order = order; }
95 
99  void setFinalState(const std::string& finalState) { m_finalState = finalState; }
100 
104  void setEnergySpread(double spread) { m_EnergySpread = spread; }
105 
109  void setVPUncertainty(bool vpuncertainty) { m_VPUncertainty = vpuncertainty; }
110 
114  void setNPhotons(int nPhot) { m_nPhot = nPhot; }
115 
119  void setUserMode(const std::string& usermode) { m_userMode = usermode; }
120 
124  void setNSKDataFile(const std::string& NSKDataFile) { m_NSKDataFile = NSKDataFile; }
125 
129  void setEEMIN(double eemin) { m_eemin = eemin; }
130 
134  void setTEMIN(double temin) { m_temin = temin; }
135 
139  void setEGMIN(double egmin) { m_egmin = egmin; }
140 
144  void setTGMIN(double tgmin) { m_tgmin = tgmin; }
145 
149  void setEEVETO(double eeveto) { m_eeveto = eeveto; }
150 
154  void setTEVETO(double teveto) { m_teveto = teveto; }
155 
159  void setEGVETO(double egveto) { m_egveto = egveto; }
160 
164  void setTGVETO(double tgveto) { m_tgveto = tgveto; }
165 
169  void setMaxPrescale(double maxprescale) { m_maxprescale = maxprescale; }
170 
174  void init();
175 
179  void initExtraInfo();
180 
187  void generateEvent(MCParticleGraph& mcGraph, double ecm, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost);
188 
190  double getSDif() {return m_sDif;};
191 
196  void term();
197 
198  protected:
200  double m_pi;
202  double m_alphaQED0;
203  double m_massElectron;
204  double m_massMuon;
205  double m_massW;
206  double m_massZ;
207  double m_widthZ;
209  std::string m_vacPol;
210  std::string m_finalState;
211  std::string m_model;
212  std::string m_mode;
213  std::string m_order;
214  double m_EnergySpread;
216  std::pair<double, double> m_ScatteringAngleRange;
217  std::pair<double, double> m_ScatteringAngleRangePhoton;
218  double m_epsilon;
219  double m_eMin;
222  int m_nPhot;
224  std::string m_NSKDataFile;
226  std::string m_userMode;
227  double m_eemin;
228  double m_temin;
229  double m_egmin;
230  double m_tgmin;
231  double m_eeveto;
232  double m_teveto;
233  double m_egveto;
234  double m_tgveto;
235  double m_maxprescale;
237  double m_fMax;
238  double m_sDif;
240  ROOT::Math::LorentzRotation m_boostVector;
243  void applySettings();
244 
255  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, ROOT::Math::XYZVector vertex,
256  ROOT::Math::LorentzRotation boost,
257  bool isVirtual = false, bool isInitial = false, bool isISRFSR = false);
258 
259  private:
260 
261  int m_npar[100];
262  double m_xpar[100];
263  };
265 }
C++ Interface for the Fortran Bhabha and exclusive two photon generator BABAYAGA.NLO.
Definition: BabayagaNLO.h:27
void setVPUncertainty(bool vpuncertainty)
Calculate VP uncertainty by internal reweighting (on/off)
Definition: BabayagaNLO.h:109
double m_eeveto
Minimum CMS energy to veto e-/e+ (GeV).
Definition: BabayagaNLO.h:231
void init()
Initializes the generator.
Definition: BabayagaNLO.cc:325
std::string m_NSKDataFile
data file for NSK VP.
Definition: BabayagaNLO.h:224
void setEGMIN(double egmin)
Sets the minimum CMS energy of the gamma.
Definition: BabayagaNLO.h:139
double m_sDif
Differential xsec/weight used for event.
Definition: BabayagaNLO.h:238
double m_tgveto
Maximum CMS angle between the gamma and -z axis (deg).
Definition: BabayagaNLO.h:234
std::pair< double, double > m_ScatteringAngleRange
Min and Max val.
Definition: BabayagaNLO.h:216
double m_maxAcollinearity
Maximum acollinearity of the electron-positron pair.
Definition: BabayagaNLO.h:220
~BabayagaNLO()
Destrucotr.
Definition: BabayagaNLO.cc:269
double m_alphaQED0
QED coupling constant at Q=0.
Definition: BabayagaNLO.h:202
void generateEvent(MCParticleGraph &mcGraph, double ecm, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
Definition: BabayagaNLO.cc:331
double m_EnergySpread
TEMPORARY SOLUTION! Approximate energy spread per beam (CMS).
Definition: BabayagaNLO.h:214
double m_maxprescale
Maximum prescale value.
Definition: BabayagaNLO.h:235
void setModel(const std::string &model)
Sets model: matched or ps.
Definition: BabayagaNLO.h:84
int m_npar[100]
Integer parameters for BabayagaNLO.
Definition: BabayagaNLO.h:261
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: BabayagaNLO.h:201
bool m_applyBoost
Apply a boost to the MCParticles.
Definition: BabayagaNLO.h:199
void setMaxPrescale(double maxprescale)
Sets the maximum prescale value.
Definition: BabayagaNLO.h:169
void setFinalState(const std::string &finalState)
Sets final state minimum energy.
Definition: BabayagaNLO.h:99
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost, bool isVirtual=false, bool isInitial=false, bool isISRFSR=false)
Store a single generated particle into the MonteCarlo graph.
Definition: BabayagaNLO.cc:488
void setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
Definition: BabayagaNLO.cc:274
void setMinEnergy(double minEnergy)
Sets minimum energy for leptons/photons in the final state, in GeV.
Definition: BabayagaNLO.h:69
ROOT::Math::LorentzRotation m_boostVector
The Lorentz boost vector for the transformation CMS to LAB frame.
Definition: BabayagaNLO.h:240
void setScatAngle(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered particles.
Definition: BabayagaNLO.h:44
std::string m_order
order: born, alpha or exp.
Definition: BabayagaNLO.h:213
void setCmsEnergyNominal(double cmsEnergyNominal)
Sets nominal ECM.
Definition: BabayagaNLO.h:64
double m_tgmin
Minimum CMS angle between the gamma and -z axis (deg).
Definition: BabayagaNLO.h:230
double m_epsilon
Soft/hard photon separator in units of CMS/2.
Definition: BabayagaNLO.h:218
void setTEMIN(double temin)
Sets the minimum CMS angle between the tagged e-/e+ and -z axis.
Definition: BabayagaNLO.h:134
void setNPhotons(int nPhot)
Sets the fixed number of nphot (hard) photons.
Definition: BabayagaNLO.h:114
double m_massMuon
electron mass.
Definition: BabayagaNLO.h:204
void setEEVETO(double eeveto)
Sets the minimum CMS energy to veto e-/e+.
Definition: BabayagaNLO.h:149
void setEpsilon(double epsilon)
Sets soft/hard photon energy separator.
Definition: BabayagaNLO.h:74
double m_teveto
Maximum CMS theta of e-/e+ in final state (deg).
Definition: BabayagaNLO.h:232
BabayagaNLO()
Constructor.
Definition: BabayagaNLO.cc:257
double m_massW
W mass [GeV] for on shell sin2theta and GF.
Definition: BabayagaNLO.h:205
double m_temin
Minimum CMS angle between the tagged e-/e+ and -z axis (deg).
Definition: BabayagaNLO.h:228
std::string m_userMode
User mode similar to TEEGG: ETRON, EGAMMA, GAMMA or PRESCALE.
Definition: BabayagaNLO.h:226
std::pair< double, double > m_ScatteringAngleRangePhoton
Min and Max val.
Definition: BabayagaNLO.h:217
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: BabayagaNLO.h:207
void term()
Terminates the generator.
Definition: BabayagaNLO.cc:381
int m_nSearchMax
Events used to search maximum of differential cross section.
Definition: BabayagaNLO.h:221
int m_nPhot
fixed number of nphot (hard) photons are generated.
Definition: BabayagaNLO.h:222
void setTEVETO(double teveto)
Sets the maximum CMS theta of e-/e+ in final state.
Definition: BabayagaNLO.h:154
void setFMax(double fMax)
Maximum differential cross section.
Definition: BabayagaNLO.h:54
std::string m_vacPol
vacuum polarization: off, hadr5 (Jegerlehner) or hmnt (Teubner).
Definition: BabayagaNLO.h:209
void setMode(const std::string &mode)
Sets mode: weighted or unweighted.
Definition: BabayagaNLO.h:89
bool m_VPUncertainty
vary all VP related parameters and extracted total uncertainty.
Definition: BabayagaNLO.h:223
void setEnergySpread(double spread)
TEMPORARY SOLUTION! Approximate energy spread per beam (CMS)
Definition: BabayagaNLO.h:104
double m_egmin
Minimum CMS energy of the gamma (GeV).
Definition: BabayagaNLO.h:229
double getSDif()
Returns weight.
Definition: BabayagaNLO.h:190
void setEGVETO(double egveto)
Sets the minimum CMS energy to veto gamma.
Definition: BabayagaNLO.h:159
void setTGMIN(double tgmin)
Sets the minimum CMS angle between the gamma and -z axis.
Definition: BabayagaNLO.h:144
void setVacPol(const std::string &vacPol)
Sets vacuum polarization.
Definition: BabayagaNLO.h:79
double m_eemin
Minimum CMS energy of the tagged e-/e+ (GeV).
Definition: BabayagaNLO.h:227
double m_xpar[100]
Double parameters for BabayagaNLO.
Definition: BabayagaNLO.h:262
std::string m_finalState
final state: ee, gg or mm.
Definition: BabayagaNLO.h:210
void setOrder(const std::string &order)
Sets Order: born, alpha or exp.
Definition: BabayagaNLO.h:94
void setNSearchMax(int nSearchMax)
Sets the number of events used to search maximum.
Definition: BabayagaNLO.h:49
void setNSKDataFile(const std::string &NSKDataFile)
Sets NSK VP data file.
Definition: BabayagaNLO.h:124
double m_massZ
Z mass [GeV].
Definition: BabayagaNLO.h:206
double m_cmsEnergyNominal
Nominal CMS Energy = 2*Ebeam [GeV].
Definition: BabayagaNLO.h:215
void setEEMIN(double eemin)
Sets the minimum CMS energy of the tagged e-/e+.
Definition: BabayagaNLO.h:129
double m_pi
pi=3.1415....
Definition: BabayagaNLO.h:200
double m_egveto
Minimum CMS energy to veto gamma (GeV).
Definition: BabayagaNLO.h:233
double m_eMin
[GeV].
Definition: BabayagaNLO.h:219
double m_massElectron
muon mass.
Definition: BabayagaNLO.h:203
void initExtraInfo()
Initializes the extra info.
Definition: BabayagaNLO.cc:319
void setTGVETO(double tgveto)
Sets the maximum CMS angle between the gamma and -z axis.
Definition: BabayagaNLO.h:164
std::string m_model
model: matched or ps.
Definition: BabayagaNLO.h:211
std::string m_mode
mode: weighted or unweighted.
Definition: BabayagaNLO.h:212
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: BabayagaNLO.cc:403
void setUserMode(const std::string &usermode)
Sets User mode similar to TEEGG: ETRON, EGAMMA, GAMMA or PRESCALE or NONE (default)
Definition: BabayagaNLO.h:119
void setMaxAcollinearity(double maxAcollinearity)
Sets maximum acollinearity angle between finale state leptons/photons in degrees.
Definition: BabayagaNLO.h:59
double m_fMax
Maximum of differential cross section.
Definition: BabayagaNLO.h:237
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.