Belle II Software  release-06-02-00
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 <TLorentzRotation.h>
13 #include <utility>
14 
15 namespace Belle2 {
31  class BHWide {
32  public:
33 
35  enum Channel {
36  CH_BOTH = 0,
37  CH_S_ONLY = 1,
38  CH_T_ONLY = 2
39  };
40 
43  RG_RANMAR = 1,
44  RG_RANECU = 2
45  };
46 
49  EC_BABAMC = 1,
50  EC_ALIBABA = 2
51  };
52 
56  HM_CALKUL = 2
57  };
58 
61  PP_OFF = 0,
62  PP_BHLUMI = 1,
64  PP_BURKHARDT = 3
65  };
66 
70  BHWide();
71 
73  ~BHWide();
74 
76  void setDefaultSettings();
77 
81  void enableZContribution(bool zContribution = true) { m_zContribution = zContribution; }
82 
86  void setChannel(Channel channel) { m_channel = channel; }
87 
91  void enableWeights(bool weighted = true) { m_weighted = weighted; }
92 
96  void setRandomGenerator(RandomGenerator randomGenerator) { m_randomGenerator = randomGenerator; }
97 
101  void enableWeakCorrections(bool weakCorrections = true) { m_weakCorrections = weakCorrections; }
102 
106  void setElectroWeakCorrectionsLib(EWCorrectionLib ewCorrectionLib) { m_ewCorrectionLib = ewCorrectionLib; }
107 
111  void setHardBremsModel(HardBremsModel hardBremsModel) { m_hardBremsModel = hardBremsModel; }
112 
116  void setPhotonVacPolarization(PhotonVacPolarization photonVacPol) { m_photonVacPol = photonVacPol; }
121  void setCMSEnergy(double cmsEnergy) { m_cmsEnergy = cmsEnergy; }
122 
126  void setScatAnglePositron(std::pair<double, double> angleRange) { m_ScatteringAngleRangePositron = angleRange; }
127 
131  void setScatAngleElectron(std::pair<double, double> angleRange) { m_ScatteringAngleRangeElectron = angleRange; }
132 
136  void setMinEnergyFinalStatePos(double minEnergyFinalStatePos) { m_minEnergyFinalStatePos = minEnergyFinalStatePos; }
137 
141  void setMinEnergyFinalStateElc(double minEnergyFinalStateElc) { m_minEnergyFinalStateElc = minEnergyFinalStateElc; }
142 
146  void setMaxAcollinearity(double maxAcollinearity) { m_maxAcollinearity = maxAcollinearity; }
147 
151  void setInfCutCMSEnergy(double infCutCMSEnergy) { m_infCutCMSEnergy = infCutCMSEnergy; }
152 
156  void setMaxRejectionWeight(double maxRejectionWeight) { m_maxRejectionWeight = maxRejectionWeight; }
157 
161  void setMassZ(double massZ) { m_massZ = massZ; }
162 
166  void setWidthZ(double widthZ) { m_widthZ = widthZ; }
167 
171  void setSinW2(double sinW2) { m_sinW2 = sinW2; }
172 
176  void setMassTop(double massTop) { m_massTop = massTop; }
177 
181  void setMassHiggs(double massHiggs) { m_massHiggs = massHiggs; }
182 
186  void init();
187 
193  void generateEvent(MCParticleGraph& mcGraph, TVector3 vertex, TLorentzRotation boost);
194 
199  void term();
200 
204  double getCrossSection() { return m_crossSection; }
205 
210 
211 
212  protected:
213 
216  bool m_weighted;
223  double m_cmsEnergy;
224  std::pair<double, double> m_ScatteringAngleRangePositron;
225  std::pair<double, double> m_ScatteringAngleRangeElectron;
233  double m_massZ;
234  double m_widthZ;
235  double m_sinW2;
236  double m_massTop;
237  double m_massHiggs;
239  double m_crossSection;
243  void applySettings();
244 
252  void storeParticle(MCParticleGraph& mcGraph, const double* mom, int pdg, TVector3 vertex, TLorentzRotation boost,
253  bool isVirtual = false, bool isInitial = false);
254 
255  private:
256 
257  int m_npar[100];
258  double m_xpar[100];
259  };
261 }
262 
263 
C++ Interface for the Fortran Bhabha scattering generator BHWide.
Definition: BHWide.h:31
EWCorrectionLib
Call electroweak correction.
Definition: BHWide.h:48
@ EC_ALIBABA
ElectroWeak Corr.
Definition: BHWide.h:50
@ EC_BABAMC
ElectroWeak Corr.
Definition: BHWide.h:49
void init()
Initializes the generator.
Definition: BHWide.cc:108
HardBremsModel
Call Brem Model.
Definition: BHWide.h:54
@ HM_HELICITY_AMP
obtained by the BHWide authors (helicity amplitudes).
Definition: BHWide.h:55
@ HM_CALKUL
from CALKUL, Nucl.
Definition: BHWide.h:56
double m_maxAcollinearity
Maximum acollinearity [deg] of final state e+e-.
Definition: BHWide.h:229
void setMaxRejectionWeight(double maxRejectionWeight)
Sets the max weight at which events are rejected.
Definition: BHWide.h:156
std::pair< double, double > m_ScatteringAngleRangePositron
Min and Max value for the scattering angle [deg] of the positron.
Definition: BHWide.h:224
Channel
Call needed channels.
Definition: BHWide.h:35
@ CH_T_ONLY
only t-channel (for tests!), with model == HM_CALKUL.
Definition: BHWide.h:38
@ CH_S_ONLY
only s-channel (for tests!), with model == HM_CALKUL.
Definition: BHWide.h:37
@ CH_BOTH
both s and t-channels + interferences.
Definition: BHWide.h:36
int m_npar[100]
Integer parameters for BHWide.
Definition: BHWide.h:257
double m_minEnergyFinalStateElc
Minimum energy [GeV] for final state electron.
Definition: BHWide.h:228
void enableWeights(bool weighted=true)
Enable the use of weighted events.
Definition: BHWide.h:91
BHWide()
Constructor.
Definition: BHWide.cc:60
void enableWeakCorrections(bool weakCorrections=true)
Enable the use of weak corrections.
Definition: BHWide.h:101
void enableZContribution(bool zContribution=true)
Enabled the Z contribution.
Definition: BHWide.h:81
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:106
double m_sinW2
sin^2(theta_W) (may be recalculated by EW library).
Definition: BHWide.h:235
Channel m_channel
Channel choice.
Definition: BHWide.h:215
void setInfCutCMSEnergy(double infCutCMSEnergy)
Sets the CMS energy on which an infrared cut is performed.
Definition: BHWide.h:151
double m_crossSection
The cross section of the generated bhabha scattering events.
Definition: BHWide.h:239
PhotonVacPolarization m_photonVacPol
Photon vacuum polarization switch.
Definition: BHWide.h:221
void setScatAnglePositron(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered positron.
Definition: BHWide.h:126
PhotonVacPolarization
Call photon polarization.
Definition: BHWide.h:60
@ PP_BURKHARDT
Burkhardt and Pietrzyk 1995 (Moriond).
Definition: BHWide.h:64
@ PP_BHLUMI
Burkhardt et.al.
Definition: BHWide.h:62
@ PP_EIDELMAN
S.
Definition: BHWide.h:63
@ PP_OFF
Photon vacuum polarization is off.
Definition: BHWide.h:61
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: BHWide.h:223
void setMassHiggs(double massHiggs)
Sets the mass for the Higgs Boson.
Definition: BHWide.h:181
RandomGenerator m_randomGenerator
Type of random number generator.
Definition: BHWide.h:217
std::pair< double, double > m_ScatteringAngleRangeElectron
Min and Max value for the scattering angle [deg] of the electron.
Definition: BHWide.h:225
EWCorrectionLib m_ewCorrectionLib
Option for ElectroWeak Corrections Library.
Definition: BHWide.h:219
void setCMSEnergy(double cmsEnergy)
Sets the CMS energy.
Definition: BHWide.h:121
void setMassTop(double massTop)
Sets the mass for the top quark.
Definition: BHWide.h:176
bool m_weighted
Switch for constant, variable weight.
Definition: BHWide.h:216
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
Definition: BHWide.h:234
void term()
Terminates the generator.
Definition: BHWide.cc:138
void setWidthZ(double widthZ)
Sets the width of the Z Boson.
Definition: BHWide.h:166
void setChannel(Channel channel)
Set the type of channel which should be used.
Definition: BHWide.h:86
bool m_weakCorrections
Switching ON/OFF weak corrections.
Definition: BHWide.h:218
void storeParticle(MCParticleGraph &mcGraph, const double *mom, int pdg, TVector3 vertex, TLorentzRotation boost, bool isVirtual=false, bool isInitial=false)
Store a single generated particle into the MonteCarlo graph.
Definition: BHWide.cc:187
void setMassZ(double massZ)
Sets the mass of the Z Boson.
Definition: BHWide.h:161
double m_maxRejectionWeight
Maximum Weight for rejection (if <= 0, it is reset inside the program).
Definition: BHWide.h:231
bool m_zContribution
Z-contribution ON/OFF.
Definition: BHWide.h:214
double m_infCutCMSEnergy
Dimensionless infrared cut on CMS energy of soft photons, ( E_phot > CMSENE*EPSCMS/2 ).
Definition: BHWide.h:230
void setPhotonVacPolarization(PhotonVacPolarization photonVacPol)
Set the model for the photon vacuum polarization.
Definition: BHWide.h:116
double m_massTop
top quark mass [GeV].
Definition: BHWide.h:236
double m_massHiggs
Higgs mass [GeV].
Definition: BHWide.h:237
void setMinEnergyFinalStateElc(double minEnergyFinalStateElc)
Sets the minimal energy for the scattered electron.
Definition: BHWide.h:141
double m_xpar[100]
Double parameters for BHWide.
Definition: BHWide.h:258
double m_crossSectionError
The error on the cross section of the generated bhabha scattering events.
Definition: BHWide.h:240
void generateEvent(MCParticleGraph &mcGraph, TVector3 vertex, TLorentzRotation boost)
Generates one single event.
Definition: BHWide.cc:116
double m_massZ
Z mass [GeV].
Definition: BHWide.h:233
double m_minEnergyFinalStatePos
Minimum energy [GeV] for final state positron.
Definition: BHWide.h:227
void setMinEnergyFinalStatePos(double minEnergyFinalStatePos)
Sets the minimal energy for the scattered positron.
Definition: BHWide.h:136
void setHardBremsModel(HardBremsModel hardBremsModel)
Set the type of the hard bremsstrahlung model.
Definition: BHWide.h:111
void setRandomGenerator(RandomGenerator randomGenerator)
Set the type of the randomN nmber generator.
Definition: BHWide.h:96
void setSinW2(double sinW2)
Sets the value for the sinW2.
Definition: BHWide.h:171
double getCrossSection()
Returns the total cross section of the generated process.
Definition: BHWide.h:204
double getCrossSectionError()
Returns the error on the total cross section of the generated process.
Definition: BHWide.h:209
void setScatAngleElectron(std::pair< double, double > angleRange)
Sets the theta scattering angle range for the scattered electron.
Definition: BHWide.h:131
~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:146
HardBremsModel m_hardBremsModel
type of MODEL subprogram and QED matrix element for hard bremsstrahlung.
Definition: BHWide.h:220
RandomGenerator
Call random generator.
Definition: BHWide.h:42
@ RG_RANECU
Ranecu generator.
Definition: BHWide.h:44
@ RG_RANMAR
Ranmar generator.
Definition: BHWide.h:43
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.