Belle II Software  release-05-01-25
BabayagaNLO.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Torben Ferber *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef BABAYAGANLO_H
12 #define BABAYAGANLO_H
13 
14 #include <mdst/dataobjects/MCParticleGraph.h>
15 #include <TLorentzRotation.h>
16 #include <utility>
17 
18 namespace Belle2 {
29  class BabayagaNLO {
30  public:
31 
35  BabayagaNLO();
36 
38  ~BabayagaNLO();
39 
41  void setDefaultSettings();
42 
46  void setScatAngle(std::pair<double, double> angleRange) { m_ScatteringAngleRange = angleRange; }
47 
51  void setNSearchMax(int nSearchMax) { m_nSearchMax = nSearchMax; }
52 
56  void setFMax(double fMax) { m_fMax = fMax; }
57 
61  void setMaxAcollinearity(double maxAcollinearity) { m_maxAcollinearity = maxAcollinearity; }
62 
66  void setCmsEnergyNominal(double cmsEnergyNominal) { m_cmsEnergyNominal = cmsEnergyNominal; }
67 
71  void setMinEnergy(double minEnergy) { m_eMin = minEnergy; }
72 
76  void setEpsilon(double epsilon) { m_epsilon = epsilon; }
77 
81  void setVacPol(const std::string& vacPol) { m_vacPol = vacPol; }
82 
86  void setModel(const std::string& model) { m_model = model; }
87 
91  void setMode(const std::string& mode) { m_mode = mode; }
92 
96  void setOrder(const std::string& order) { m_order = order; }
97 
101  void setFinalState(const std::string& finalState) { m_finalState = finalState; }
102 
106  void setEnergySpread(double spread) { m_EnergySpread = spread; }
107 
111  void setVPUncertainty(bool vpuncertainty) { m_VPUncertainty = vpuncertainty; }
112 
116  void setNPhotons(int nPhot) { m_nPhot = nPhot; }
117 
121  void setUserMode(const std::string& usermode) { m_userMode = usermode; }
122 
126  void setNSKDataFile(const std::string& NSKDataFile) { m_NSKDataFile = NSKDataFile; }
127 
131  void setEEMIN(double eemin) { m_eemin = eemin; }
132 
136  void setTEMIN(double temin) { m_temin = temin; }
137 
141  void setEGMIN(double egmin) { m_egmin = egmin; }
142 
146  void setTGMIN(double tgmin) { m_tgmin = tgmin; }
147 
151  void setEEVETO(double eeveto) { m_eeveto = eeveto; }
152 
156  void setTEVETO(double teveto) { m_teveto = teveto; }
157 
161  void setEGVETO(double egveto) { m_egveto = egveto; }
162 
166  void setTGVETO(double tgveto) { m_tgveto = tgveto; }
167 
171  void setMaxPrescale(double maxprescale) { m_maxprescale = maxprescale; }
172 
176  void init();
177 
181  void initExtraInfo();
182 
186  void generateEvent(MCParticleGraph& mcGraph, double ecm, TVector3 vertex, TLorentzRotation boost);
187 
191  double getSDif() {return m_sDif;};
192 
197  void term();
198 
199  protected:
200  bool m_applyBoost;
201  double m_pi;
202  double m_conversionFactor;
203  double m_alphaQED0;
204  double m_massElectron;
205  double m_massMuon;
206  double m_massW;
207  double m_massZ;
208  double m_widthZ;
210  std::string m_vacPol;
211  std::string m_finalState;
212  std::string m_model;
213  std::string m_mode;
214  std::string m_order;
215  double m_EnergySpread;
217  std::pair<double, double> m_ScatteringAngleRange;
218  std::pair<double, double> m_ScatteringAngleRangePhoton;
219  double m_epsilon;
220  double m_eMin;
223  int m_nPhot;
225  std::string m_NSKDataFile;
227  std::string m_userMode;
228  double m_eemin;
229  double m_temin;
230  double m_egmin;
231  double m_tgmin;
232  double m_eeveto;
233  double m_teveto;
234  double m_egveto;
235  double m_tgveto;
236  double m_maxprescale;
238  double m_fMax;
239  double m_sDif;
241  TLorentzRotation m_boostVector;
245 
253  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, TVector3 vertex, TLorentzRotation boost,
254  bool isVirtual = false, bool isInitial = false, bool isISRFSR = false);
255 
256  private:
257 
258  int m_npar[100];
259  double m_xpar[100];
260  };
262 }
263 
264 
265 #endif /* BABAYAGANLO_H */
Belle2::BabayagaNLO::m_temin
double m_temin
Minimum CMS angle between the tagged e-/e+ and -z axis (deg).
Definition: BabayagaNLO.h:237
Belle2::BabayagaNLO::m_applyBoost
bool m_applyBoost
Apply a boost to the MCParticles.
Definition: BabayagaNLO.h:208
Belle2::BabayagaNLO::setMaxAcollinearity
void setMaxAcollinearity(double maxAcollinearity)
Sets maximum acollinearity angle between finale state leptons/photons in degrees.
Definition: BabayagaNLO.h:69
Belle2::BabayagaNLO::setVacPol
void setVacPol(const std::string &vacPol)
Sets vacuum polarization.
Definition: BabayagaNLO.h:89
Belle2::BabayagaNLO::m_boostVector
TLorentzRotation m_boostVector
The Lorentz boost vector for the transformation CMS to LAB frame.
Definition: BabayagaNLO.h:249
Belle2::BabayagaNLO::setEGMIN
void setEGMIN(double egmin)
Sets the minimum CMS energy of the gamma.
Definition: BabayagaNLO.h:149
Belle2::BabayagaNLO::setEEVETO
void setEEVETO(double eeveto)
Sets the minimum CMS energy to veto e-/e+.
Definition: BabayagaNLO.h:159
Belle2::BabayagaNLO::m_pi
double m_pi
pi=3.1415....
Definition: BabayagaNLO.h:209
Belle2::BabayagaNLO::m_sDif
double m_sDif
Differential xsec/weight used for event.
Definition: BabayagaNLO.h:247
Belle2::BabayagaNLO::m_teveto
double m_teveto
Maximum CMS theta of e-/e+ in final state (deg).
Definition: BabayagaNLO.h:241
Belle2::BabayagaNLO::setTGVETO
void setTGVETO(double tgveto)
Sets the maximum CMS angle between the gamma and -z axis.
Definition: BabayagaNLO.h:174
Belle2::BabayagaNLO::setMode
void setMode(const std::string &mode)
Sets mode: weighted or unweighted.
Definition: BabayagaNLO.h:99
Belle2::BabayagaNLO::setModel
void setModel(const std::string &model)
Sets model: matched or ps.
Definition: BabayagaNLO.h:94
Belle2::BabayagaNLO::m_conversionFactor
double m_conversionFactor
Conversion factor for hbarc to nb.
Definition: BabayagaNLO.h:210
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::BabayagaNLO::BabayagaNLO
BabayagaNLO()
Constructor.
Definition: BabayagaNLO.cc:260
Belle2::BabayagaNLO::m_finalState
std::string m_finalState
final state: ee, gg or mm.
Definition: BabayagaNLO.h:219
Belle2::BabayagaNLO::setScatAngle
void setScatAngle(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered particles.
Definition: BabayagaNLO.h:54
Belle2::BabayagaNLO::setEpsilon
void setEpsilon(double epsilon)
Sets soft/hard photon energy separator.
Definition: BabayagaNLO.h:84
Belle2::BabayagaNLO::m_NSKDataFile
std::string m_NSKDataFile
data file for NSK VP.
Definition: BabayagaNLO.h:233
Belle2::BabayagaNLO::setEGVETO
void setEGVETO(double egveto)
Sets the minimum CMS energy to veto gamma.
Definition: BabayagaNLO.h:169
Belle2::BabayagaNLO::m_nSearchMax
int m_nSearchMax
Events used to search maximum of differential cross section.
Definition: BabayagaNLO.h:230
Belle2::BabayagaNLO::m_EnergySpread
double m_EnergySpread
TEMPORARY SOLUTION! Approximate energy spread per beam (CMS).
Definition: BabayagaNLO.h:223
Belle2::BabayagaNLO::m_mode
std::string m_mode
mode: weighted or unweighted.
Definition: BabayagaNLO.h:221
Belle2::BabayagaNLO::m_userMode
std::string m_userMode
User mode similar to TEEGG: ETRON, EGAMMA, GAMMA or PRESCALE.
Definition: BabayagaNLO.h:235
Belle2::BabayagaNLO::m_maxAcollinearity
double m_maxAcollinearity
Maximum acollinearity of the electron-positron pair.
Definition: BabayagaNLO.h:229
Belle2::BabayagaNLO::setVPUncertainty
void setVPUncertainty(bool vpuncertainty)
Calculate VP uncertainty by internal reweighting (on/off)
Definition: BabayagaNLO.h:119
Belle2::BabayagaNLO::m_egmin
double m_egmin
Minimum CMS energy of the gamma (GeV).
Definition: BabayagaNLO.h:238
Belle2::BabayagaNLO::setDefaultSettings
void setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
Definition: BabayagaNLO.cc:277
Belle2::BabayagaNLO::m_vacPol
std::string m_vacPol
vacuum polarization: off, hadr5 (Jegerlehner) or hmnt (Teubner).
Definition: BabayagaNLO.h:218
Belle2::BabayagaNLO::storeParticle
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:490
Belle2::BabayagaNLO::generateEvent
void generateEvent(MCParticleGraph &mcGraph, double ecm, TVector3 vertex, TLorentzRotation boost)
Generates one single event.
Definition: BabayagaNLO.cc:334
Belle2::BabayagaNLO::setMinEnergy
void setMinEnergy(double minEnergy)
Sets minimum energy for leptons/photons in the final state, in GeV.
Definition: BabayagaNLO.h:79
Belle2::BabayagaNLO::m_nPhot
int m_nPhot
fixed number of nphot (hard) photons are generated.
Definition: BabayagaNLO.h:231
Belle2::BabayagaNLO::setTGMIN
void setTGMIN(double tgmin)
Sets the minimum CMS angle between the gamma and -z axis.
Definition: BabayagaNLO.h:154
Belle2::BabayagaNLO::m_npar
int m_npar[100]
Integer parameters for BabayagaNLO.
Definition: BabayagaNLO.h:266
Belle2::BabayagaNLO::m_egveto
double m_egveto
Minimum CMS energy to veto gamma (GeV).
Definition: BabayagaNLO.h:242
Belle2::BabayagaNLO::m_xpar
double m_xpar[100]
Double parameters for BabayagaNLO.
Definition: BabayagaNLO.h:267
Belle2::BabayagaNLO::m_order
std::string m_order
order: born, alpha or exp.
Definition: BabayagaNLO.h:222
Belle2::BabayagaNLO::m_massElectron
double m_massElectron
muon mass.
Definition: BabayagaNLO.h:212
Belle2::BabayagaNLO::m_widthZ
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: BabayagaNLO.h:216
Belle2::BabayagaNLO::term
void term()
Terminates the generator.
Definition: BabayagaNLO.cc:383
Belle2::BabayagaNLO::m_alphaQED0
double m_alphaQED0
QED coupling constant at Q=0.
Definition: BabayagaNLO.h:211
Belle2::BabayagaNLO::setEEMIN
void setEEMIN(double eemin)
Sets the minimum CMS energy of the tagged e-/e+.
Definition: BabayagaNLO.h:139
Belle2::BabayagaNLO::initExtraInfo
void initExtraInfo()
Initializes the extra info.
Definition: BabayagaNLO.cc:322
Belle2::BabayagaNLO::setFinalState
void setFinalState(const std::string &finalState)
Sets final state minimum energy.
Definition: BabayagaNLO.h:109
Belle2::BabayagaNLO::setUserMode
void setUserMode(const std::string &usermode)
Sets User mode similar to TEEGG: ETRON, EGAMMA, GAMMA or PRESCALE or NONE (default)
Definition: BabayagaNLO.h:129
Belle2::BabayagaNLO::m_eMin
double m_eMin
[GeV].
Definition: BabayagaNLO.h:228
Belle2::BabayagaNLO::setCmsEnergyNominal
void setCmsEnergyNominal(double cmsEnergyNominal)
Sets nominal ECM.
Definition: BabayagaNLO.h:74
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BabayagaNLO::~BabayagaNLO
~BabayagaNLO()
Destrucotr.
Definition: BabayagaNLO.cc:272
Belle2::BabayagaNLO::m_massMuon
double m_massMuon
electron mass.
Definition: BabayagaNLO.h:213
Belle2::BabayagaNLO::m_model
std::string m_model
model: matched or ps.
Definition: BabayagaNLO.h:220
Belle2::BabayagaNLO::m_maxprescale
double m_maxprescale
Maximum prescale value.
Definition: BabayagaNLO.h:244
Belle2::BabayagaNLO::setNPhotons
void setNPhotons(int nPhot)
Sets the fixed number of nphot (hard) photons.
Definition: BabayagaNLO.h:124
Belle2::BabayagaNLO::m_ScatteringAngleRangePhoton
std::pair< double, double > m_ScatteringAngleRangePhoton
Min and Max val.
Definition: BabayagaNLO.h:226
Belle2::BabayagaNLO::setFMax
void setFMax(double fMax)
Maximum differential cross section.
Definition: BabayagaNLO.h:64
Belle2::BabayagaNLO::m_tgveto
double m_tgveto
Maximum CMS angle between the gamma and -z axis (deg).
Definition: BabayagaNLO.h:243
Belle2::BabayagaNLO::setEnergySpread
void setEnergySpread(double spread)
TEMPORARY SOLUTION! Approximate energy spread per beam (CMS)
Definition: BabayagaNLO.h:114
Belle2::BabayagaNLO::m_eemin
double m_eemin
Minimum CMS energy of the tagged e-/e+ (GeV).
Definition: BabayagaNLO.h:236
Belle2::BabayagaNLO::m_cmsEnergyNominal
double m_cmsEnergyNominal
Nominal CMS Energy = 2*Ebeam [GeV].
Definition: BabayagaNLO.h:224
Belle2::BabayagaNLO::setOrder
void setOrder(const std::string &order)
Sets Order: born, alpha or exp.
Definition: BabayagaNLO.h:104
Belle2::BabayagaNLO::m_eeveto
double m_eeveto
Minimum CMS energy to veto e-/e+ (GeV).
Definition: BabayagaNLO.h:240
Belle2::BabayagaNLO::m_ScatteringAngleRange
std::pair< double, double > m_ScatteringAngleRange
Min and Max val.
Definition: BabayagaNLO.h:225
Belle2::BabayagaNLO::m_epsilon
double m_epsilon
Soft/hard photon separator in units of CMS/2.
Definition: BabayagaNLO.h:227
Belle2::BabayagaNLO::getSDif
double getSDif()
Returns weight.
Definition: BabayagaNLO.h:199
Belle2::BabayagaNLO::setNSearchMax
void setNSearchMax(int nSearchMax)
Sets the number of events used to search maximum.
Definition: BabayagaNLO.h:59
Belle2::BabayagaNLO::m_VPUncertainty
bool m_VPUncertainty
vary all VP related parameters and extracted total uncertainty.
Definition: BabayagaNLO.h:232
Belle2::BabayagaNLO::setTEVETO
void setTEVETO(double teveto)
Sets the maximum CMS theta of e-/e+ in final state.
Definition: BabayagaNLO.h:164
Belle2::BabayagaNLO::setNSKDataFile
void setNSKDataFile(const std::string &NSKDataFile)
Sets NSK VP data file.
Definition: BabayagaNLO.h:134
Belle2::BabayagaNLO::m_tgmin
double m_tgmin
Minimum CMS angle between the gamma and -z axis (deg).
Definition: BabayagaNLO.h:239
Belle2::BabayagaNLO::m_massZ
double m_massZ
Z mass [GeV].
Definition: BabayagaNLO.h:215
Belle2::BabayagaNLO::m_fMax
double m_fMax
Maximum of differential cross section.
Definition: BabayagaNLO.h:246
Belle2::BabayagaNLO::setTEMIN
void setTEMIN(double temin)
Sets the minimum CMS angle between the tagged e-/e+ and -z axis.
Definition: BabayagaNLO.h:144
Belle2::BabayagaNLO::applySettings
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: BabayagaNLO.cc:405
Belle2::BabayagaNLO::init
void init()
Initializes the generator.
Definition: BabayagaNLO.cc:328
Belle2::BabayagaNLO::m_massW
double m_massW
W mass [GeV] for on shell sin2theta and GF.
Definition: BabayagaNLO.h:214
Belle2::BabayagaNLO::setMaxPrescale
void setMaxPrescale(double maxprescale)
Sets the maximum prescale value.
Definition: BabayagaNLO.h:179