Belle II Software development
BHWide.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
16namespace Belle2 {
32 class BHWide {
33 public:
34
36 enum Channel {
37 CH_BOTH = 0,
39 CH_T_ONLY = 2
40 };
41
45 RG_RANECU = 2
46 };
47
51 EC_ALIBABA = 2
52 };
53
57 HM_CALKUL = 2
58 };
59
62 PP_OFF = 0,
65 PP_BURKHARDT = 3
66 };
67
71 BHWide();
72
74 ~BHWide();
75
77 void setDefaultSettings();
78
82 void enableZContribution(bool zContribution = true) { m_zContribution = zContribution; }
83
87 void setChannel(Channel channel) { m_channel = channel; }
88
92 void enableWeights(bool weighted = true) { m_weighted = weighted; }
93
97 void setRandomGenerator(RandomGenerator randomGenerator) { m_randomGenerator = randomGenerator; }
98
102 void enableWeakCorrections(bool weakCorrections = true) { m_weakCorrections = weakCorrections; }
103
107 void setElectroWeakCorrectionsLib(EWCorrectionLib ewCorrectionLib) { m_ewCorrectionLib = ewCorrectionLib; }
108
112 void setHardBremsModel(HardBremsModel hardBremsModel) { m_hardBremsModel = hardBremsModel; }
113
117 void setPhotonVacPolarization(PhotonVacPolarization photonVacPol) { m_photonVacPol = photonVacPol; }
122 void setCMSEnergy(double cmsEnergy) { m_cmsEnergy = cmsEnergy; }
123
127 void setScatAnglePositron(std::pair<double, double> angleRange) { m_ScatteringAngleRangePositron = angleRange; }
128
132 void setScatAngleElectron(std::pair<double, double> angleRange) { m_ScatteringAngleRangeElectron = angleRange; }
133
137 void setMinEnergyFinalStatePos(double minEnergyFinalStatePos) { m_minEnergyFinalStatePos = minEnergyFinalStatePos; }
138
142 void setMinEnergyFinalStateElc(double minEnergyFinalStateElc) { m_minEnergyFinalStateElc = minEnergyFinalStateElc; }
143
147 void setMaxAcollinearity(double maxAcollinearity) { m_maxAcollinearity = maxAcollinearity; }
148
152 void setInfCutCMSEnergy(double infCutCMSEnergy) { m_infCutCMSEnergy = infCutCMSEnergy; }
153
157 void setMaxRejectionWeight(double maxRejectionWeight) { m_maxRejectionWeight = maxRejectionWeight; }
158
162 void setMassZ(double massZ) { m_massZ = massZ; }
163
167 void setWidthZ(double widthZ) { m_widthZ = widthZ; }
168
172 void setSinW2(double sinW2) { m_sinW2 = sinW2; }
173
177 void setMassTop(double massTop) { m_massTop = massTop; }
178
182 void setMassHiggs(double massHiggs) { m_massHiggs = massHiggs; }
183
187 void init();
188
194 void generateEvent(MCParticleGraph& mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost);
195
200 void term();
201
205 double getCrossSection() { return m_crossSection; }
206
211
212
213 protected:
214
224 double m_cmsEnergy;
225 std::pair<double, double> m_ScatteringAngleRangePositron;
226 std::pair<double, double> m_ScatteringAngleRangeElectron;
234 double m_massZ;
235 double m_widthZ;
236 double m_sinW2;
237 double m_massTop;
238 double m_massHiggs;
244 void applySettings();
245
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);
258
259 private:
260
261 int m_npar[100];
262 double m_xpar[100];
263 };
265}
266
267
C++ Interface for the Fortran Bhabha scattering generator BHWide.
Definition: BHWide.h:32
EWCorrectionLib
Call electroweak correction.
Definition: BHWide.h:49
@ EC_ALIBABA
ElectroWeak Corr.
Definition: BHWide.h:51
@ EC_BABAMC
ElectroWeak Corr.
Definition: BHWide.h:50
void init()
Initializes the generator.
Definition: BHWide.cc:108
void generateEvent(MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
Definition: BHWide.cc:116
HardBremsModel
Call Brem Model.
Definition: BHWide.h:55
@ HM_HELICITY_AMP
obtained by the BHWide authors (helicity amplitudes).
Definition: BHWide.h:56
@ HM_CALKUL
from CALKUL, Nucl.
Definition: BHWide.h:57
double m_maxAcollinearity
Maximum acollinearity [deg] of final state e+e-.
Definition: BHWide.h:230
void setMaxRejectionWeight(double maxRejectionWeight)
Sets the max weight at which events are rejected.
Definition: BHWide.h:157
std::pair< double, double > m_ScatteringAngleRangePositron
Min and Max value for the scattering angle [deg] of the positron.
Definition: BHWide.h:225
Channel
Call needed channels.
Definition: BHWide.h:36
@ CH_T_ONLY
only t-channel (for tests!), with model == HM_CALKUL.
Definition: BHWide.h:39
@ CH_S_ONLY
only s-channel (for tests!), with model == HM_CALKUL.
Definition: BHWide.h:38
@ CH_BOTH
both s and t-channels + interferences.
Definition: BHWide.h:37
int m_npar[100]
Integer parameters for BHWide.
Definition: BHWide.h:261
double m_minEnergyFinalStateElc
Minimum energy [GeV] for final state electron.
Definition: BHWide.h:229
void enableWeights(bool weighted=true)
Enable the use of weighted events.
Definition: BHWide.h:92
BHWide()
Constructor.
Definition: BHWide.cc:60
void enableWeakCorrections(bool weakCorrections=true)
Enable the use of weak corrections.
Definition: BHWide.h:102
void enableZContribution(bool zContribution=true)
Enabled the Z contribution.
Definition: BHWide.h:82
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: BHWide.cc:187
void setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
Definition: BHWide.cc:80
void setElectroWeakCorrectionsLib(EWCorrectionLib ewCorrectionLib)
Set the type of the electro weak correction library.
Definition: BHWide.h:107
double m_sinW2
sin^2(theta_W) (may be recalculated by EW library).
Definition: BHWide.h:236
Channel m_channel
Channel choice.
Definition: BHWide.h:216
void setInfCutCMSEnergy(double infCutCMSEnergy)
Sets the CMS energy on which an infrared cut is performed.
Definition: BHWide.h:152
double m_crossSection
The cross section of the generated bhabha scattering events.
Definition: BHWide.h:240
PhotonVacPolarization m_photonVacPol
Photon vacuum polarization switch.
Definition: BHWide.h:222
void setScatAnglePositron(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered positron.
Definition: BHWide.h:127
PhotonVacPolarization
Call photon polarization.
Definition: BHWide.h:61
@ PP_BURKHARDT
Burkhardt and Pietrzyk 1995 (Moriond).
Definition: BHWide.h:65
@ PP_BHLUMI
Burkhardt et.al.
Definition: BHWide.h:63
@ PP_EIDELMAN
S.
Definition: BHWide.h:64
@ PP_OFF
Photon vacuum polarization is off.
Definition: BHWide.h:62
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: BHWide.h:224
void setMassHiggs(double massHiggs)
Sets the mass for the Higgs Boson.
Definition: BHWide.h:182
RandomGenerator m_randomGenerator
Type of random number generator.
Definition: BHWide.h:218
std::pair< double, double > m_ScatteringAngleRangeElectron
Min and Max value for the scattering angle [deg] of the electron.
Definition: BHWide.h:226
EWCorrectionLib m_ewCorrectionLib
Option for ElectroWeak Corrections Library.
Definition: BHWide.h:220
void setCMSEnergy(double cmsEnergy)
Sets the CMS energy.
Definition: BHWide.h:122
void setMassTop(double massTop)
Sets the mass for the top quark.
Definition: BHWide.h:177
bool m_weighted
Switch for constant, variable weight.
Definition: BHWide.h:217
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: BHWide.h:235
void term()
Terminates the generator.
Definition: BHWide.cc:138
void setWidthZ(double widthZ)
Sets the width of the Z Boson.
Definition: BHWide.h:167
void setChannel(Channel channel)
Set the type of channel which should be used.
Definition: BHWide.h:87
bool m_weakCorrections
Switching ON/OFF weak corrections.
Definition: BHWide.h:219
void setMassZ(double massZ)
Sets the mass of the Z Boson.
Definition: BHWide.h:162
double m_maxRejectionWeight
Maximum Weight for rejection (if <= 0, it is reset inside the program).
Definition: BHWide.h:232
bool m_zContribution
Z-contribution ON/OFF.
Definition: BHWide.h:215
double m_infCutCMSEnergy
Dimensionless infrared cut on CMS energy of soft photons, ( E_phot > CMSENE*EPSCMS/2 ).
Definition: BHWide.h:231
void setPhotonVacPolarization(PhotonVacPolarization photonVacPol)
Set the model for the photon vacuum polarization.
Definition: BHWide.h:117
double m_massTop
top quark mass [GeV].
Definition: BHWide.h:237
double m_massHiggs
Higgs mass [GeV].
Definition: BHWide.h:238
void setMinEnergyFinalStateElc(double minEnergyFinalStateElc)
Sets the minimal energy for the scattered electron.
Definition: BHWide.h:142
double m_xpar[100]
Double parameters for BHWide.
Definition: BHWide.h:262
double m_crossSectionError
The error on the cross section of the generated bhabha scattering events.
Definition: BHWide.h:241
double m_massZ
Z mass [GeV].
Definition: BHWide.h:234
double m_minEnergyFinalStatePos
Minimum energy [GeV] for final state positron.
Definition: BHWide.h:228
void setMinEnergyFinalStatePos(double minEnergyFinalStatePos)
Sets the minimal energy for the scattered positron.
Definition: BHWide.h:137
void setHardBremsModel(HardBremsModel hardBremsModel)
Set the type of the hard bremsstrahlung model.
Definition: BHWide.h:112
void setRandomGenerator(RandomGenerator randomGenerator)
Set the type of the randomN nmber generator.
Definition: BHWide.h:97
void setSinW2(double sinW2)
Sets the value for the sinW2.
Definition: BHWide.h:172
double getCrossSection()
Returns the total cross section of the generated process.
Definition: BHWide.h:205
double getCrossSectionError()
Returns the error on the total cross section of the generated process.
Definition: BHWide.h:210
void setScatAngleElectron(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered electron.
Definition: BHWide.h:132
~BHWide()
Destrucotr.
Definition: BHWide.cc:74
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: BHWide.cc:152
void setMaxAcollinearity(double maxAcollinearity)
Sets the max acollinearity angle.
Definition: BHWide.h:147
HardBremsModel m_hardBremsModel
type of MODEL subprogram and QED matrix element for hard bremsstrahlung.
Definition: BHWide.h:221
RandomGenerator
Call random generator.
Definition: BHWide.h:43
@ RG_RANECU
Ranecu generator.
Definition: BHWide.h:45
@ RG_RANMAR
Ranmar generator.
Definition: BHWide.h:44
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.