Belle II Software  release-06-01-15
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 #ifndef BABAYAGANLO_H
10 #define BABAYAGANLO_H
11 
12 #include <mdst/dataobjects/MCParticleGraph.h>
13 #include <TLorentzRotation.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 
184  void generateEvent(MCParticleGraph& mcGraph, double ecm, TVector3 vertex, TLorentzRotation boost);
185 
189  double getSDif() {return m_sDif;};
190 
195  void term();
196 
197  protected:
199  double m_pi;
201  double m_alphaQED0;
202  double m_massElectron;
203  double m_massMuon;
204  double m_massW;
205  double m_massZ;
206  double m_widthZ;
208  std::string m_vacPol;
209  std::string m_finalState;
210  std::string m_model;
211  std::string m_mode;
212  std::string m_order;
213  double m_EnergySpread;
215  std::pair<double, double> m_ScatteringAngleRange;
216  std::pair<double, double> m_ScatteringAngleRangePhoton;
217  double m_epsilon;
218  double m_eMin;
221  int m_nPhot;
223  std::string m_NSKDataFile;
225  std::string m_userMode;
226  double m_eemin;
227  double m_temin;
228  double m_egmin;
229  double m_tgmin;
230  double m_eeveto;
231  double m_teveto;
232  double m_egveto;
233  double m_tgveto;
234  double m_maxprescale;
236  double m_fMax;
237  double m_sDif;
239  TLorentzRotation m_boostVector;
242  void applySettings();
243 
251  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, TVector3 vertex, TLorentzRotation boost,
252  bool isVirtual = false, bool isInitial = false, bool isISRFSR = false);
253 
254  private:
255 
256  int m_npar[100];
257  double m_xpar[100];
258  };
260 }
261 
262 
263 #endif /* BABAYAGANLO_H */
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:230
void init()
Initializes the generator.
Definition: BabayagaNLO.cc:326
std::string m_NSKDataFile
data file for NSK VP.
Definition: BabayagaNLO.h:223
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:237
double m_tgveto
Maximum CMS angle between the gamma and -z axis (deg).
Definition: BabayagaNLO.h:233
std::pair< double, double > m_ScatteringAngleRange
Min and Max val.
Definition: BabayagaNLO.h:215
double m_maxAcollinearity
Maximum acollinearity of the electron-positron pair.
Definition: BabayagaNLO.h:219
TLorentzRotation m_boostVector
The Lorentz boost vector for the transformation CMS to LAB frame.
Definition: BabayagaNLO.h:239
~BabayagaNLO()
Destrucotr.
Definition: BabayagaNLO.cc:270
double m_alphaQED0
QED coupling constant at Q=0.
Definition: BabayagaNLO.h:201
double m_EnergySpread
TEMPORARY SOLUTION! Approximate energy spread per beam (CMS).
Definition: BabayagaNLO.h:213
double m_maxprescale
Maximum prescale value.
Definition: BabayagaNLO.h:234
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:256
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: BabayagaNLO.h:200
void generateEvent(MCParticleGraph &mcGraph, double ecm, TVector3 vertex, TLorentzRotation boost)
Generates one single event.
Definition: BabayagaNLO.cc:332
bool m_applyBoost
Apply a boost to the MCParticles.
Definition: BabayagaNLO.h:198
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 setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
Definition: BabayagaNLO.cc:275
void setMinEnergy(double minEnergy)
Sets minimum energy for leptons/photons in the final state, in GeV.
Definition: BabayagaNLO.h:69
void setScatAngle(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered particles.
Definition: BabayagaNLO.h:44
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, TVector3 vertex, TLorentzRotation boost, bool isVirtual=false, bool isInitial=false, bool isISRFSR=false)
Store a single generated particle into the MonteCarlo graph.
Definition: BabayagaNLO.cc:488
std::string m_order
order: born, alpha or exp.
Definition: BabayagaNLO.h:212
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:229
double m_epsilon
Soft/hard photon separator in units of CMS/2.
Definition: BabayagaNLO.h:217
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:203
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:231
BabayagaNLO()
Constructor.
Definition: BabayagaNLO.cc:258
double m_massW
W mass [GeV] for on shell sin2theta and GF.
Definition: BabayagaNLO.h:204
double m_temin
Minimum CMS angle between the tagged e-/e+ and -z axis (deg).
Definition: BabayagaNLO.h:227
std::string m_userMode
User mode similar to TEEGG: ETRON, EGAMMA, GAMMA or PRESCALE.
Definition: BabayagaNLO.h:225
std::pair< double, double > m_ScatteringAngleRangePhoton
Min and Max val.
Definition: BabayagaNLO.h:216
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: BabayagaNLO.h:206
void term()
Terminates the generator.
Definition: BabayagaNLO.cc:381
int m_nSearchMax
Events used to search maximum of differential cross section.
Definition: BabayagaNLO.h:220
int m_nPhot
fixed number of nphot (hard) photons are generated.
Definition: BabayagaNLO.h:221
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:208
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:222
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:228
double getSDif()
Returns weight.
Definition: BabayagaNLO.h:189
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:226
double m_xpar[100]
Double parameters for BabayagaNLO.
Definition: BabayagaNLO.h:257
std::string m_finalState
final state: ee, gg or mm.
Definition: BabayagaNLO.h:209
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:205
double m_cmsEnergyNominal
Nominal CMS Energy = 2*Ebeam [GeV].
Definition: BabayagaNLO.h:214
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:199
double m_egveto
Minimum CMS energy to veto gamma (GeV).
Definition: BabayagaNLO.h:232
double m_eMin
[GeV].
Definition: BabayagaNLO.h:218
double m_massElectron
muon mass.
Definition: BabayagaNLO.h:202
void initExtraInfo()
Initializes the extra info.
Definition: BabayagaNLO.cc:320
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:210
std::string m_mode
mode: weighted or unweighted.
Definition: BabayagaNLO.h:211
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:236
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.