9#include <generators/bhwide/BHWide.h>
10#include <framework/gearbox/Unit.h>
12#include <TDatabasePDG.h>
13#include <Math/Vector4D.h>
31 void bhwide_(
int* mode,
double* xpar,
int* npar);
32 void glimit_(
int* number);
39 void varran_(
double* drvec,
const int* lengt)
41 for (
int i = 0; i < *lengt; ++i) {
45 drvec[i] = gRandom->Rndm();
46 }
while (drvec[i] >= 1.0);
53 void ranmar_(
double* rvec)
55 *rvec = gRandom->Rndm();
62 for (
int i = 0; i < 100; ++i) {
124 storeParticle(mcGraph, momset_.p1, -11, vertex, boost,
true);
131 for (
int iPhot = 0; iPhot < momset_.nphot; ++iPhot) {
132 double photMom[4] = {momset_.phit[0][iPhot], momset_.phit[1][iPhot], momset_.phit[2][iPhot], momset_.phit[3][iPhot]};
188 ROOT::Math::LorentzRotation boost,
189 bool isVirtual,
bool isInitial)
203 }
else if (isInitial) {
214 if (pdg == 22 && !isVirtual) {
222 part.
setMomentum(ROOT::Math::XYZVector(mom[0], mom[1], mom[2]));
223 part.
setMass(TDatabasePDG::Instance()->GetParticle(pdg)->Mass());
227 ROOT::Math::PxPyPzEVector p4 = part.
get4Vector();
228 p4.SetPz(-1.0 * p4.Pz());
@ EC_ALIBABA
ElectroWeak Corr.
void init()
Initializes the generator.
void generateEvent(MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
@ HM_CALKUL
from CALKUL, Nucl.
double m_maxAcollinearity
Maximum acollinearity [deg] of final state e+e-.
std::pair< double, double > m_ScatteringAngleRangePositron
Min and Max value for the scattering angle [deg] of the positron.
@ CH_BOTH
both s and t-channels + interferences.
int m_npar[100]
Integer parameters for BHWide.
double m_minEnergyFinalStateElc
Minimum energy [GeV] for final state electron.
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.
void setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
double m_sinW2
sin^2(theta_W) (may be recalculated by EW library).
Channel m_channel
Channel choice.
double m_crossSection
The cross section of the generated bhabha scattering events.
PhotonVacPolarization m_photonVacPol
Photon vacuum polarization switch.
@ PP_BURKHARDT
Burkhardt and Pietrzyk 1995 (Moriond).
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
RandomGenerator m_randomGenerator
Type of random number generator.
std::pair< double, double > m_ScatteringAngleRangeElectron
Min and Max value for the scattering angle [deg] of the electron.
EWCorrectionLib m_ewCorrectionLib
Option for ElectroWeak Corrections Library.
bool m_weighted
Switch for constant, variable weight.
double m_widthZ
Z width [GeV] (may be recalculated by EW library).
void term()
Terminates the generator.
bool m_weakCorrections
Switching ON/OFF weak corrections.
double m_maxRejectionWeight
Maximum Weight for rejection (if <= 0, it is reset inside the program).
bool m_zContribution
Z-contribution ON/OFF.
double m_infCutCMSEnergy
Dimensionless infrared cut on CMS energy of soft photons, ( E_phot > CMSENE*EPSCMS/2 ).
double m_massTop
top quark mass [GeV].
double m_massHiggs
Higgs mass [GeV].
double m_xpar[100]
Double parameters for BHWide.
double m_crossSectionError
The error on the cross section of the generated bhabha scattering events.
double m_massZ
Z mass [GeV].
double m_minEnergyFinalStatePos
Minimum energy [GeV] for final state positron.
void applySettings()
Apply the settings to the internal Fortran generator.
HardBremsModel m_hardBremsModel
type of MODEL subprogram and QED matrix element for hard bremsstrahlung.
@ RG_RANMAR
Ranmar generator.
Class to represent Particle data in graph.
void setFirstDaughter(int daughter)
Set the 1-based index of the first daughter, 0 means no daughters.
void setLastDaughter(int daughter)
Set the 1-based index of the last daughter, 0 means no daughters.
Class to build, validate and sort a particle decay chain.
@ c_IsFSRPhoton
bit 7: Particle is from finial state radiation
@ c_Initial
bit 5: Particle is initial such as e+ or e- and not going to Geant4
@ c_PrimaryParticle
bit 0: Particle is primary particle.
@ c_IsVirtual
bit 4: Particle is virtual and not going to Geant4.
@ c_StableInGenerator
bit 1: Particle is stable, i.e., not decaying in the generator.
@ c_IsISRPhoton
bit 6: Particle is from initial state radiation
void setMass(float mass)
Set particle mass.
void addStatus(unsigned short int bitmask)
Add bitmask to current status.
void setEnergy(float energy)
Set energy.
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
void setValidVertex(bool valid)
Set indication wether vertex and time information is valid or just default.
void setProductionVertex(const ROOT::Math::XYZVector &vertex)
Set production vertex position.
ROOT::Math::PxPyPzEVector get4Vector() const
Return 4Vector of particle.
void setPDG(int pdg)
Set PDG code of the particle.
void set4Vector(const ROOT::Math::PxPyPzEVector &p4)
Sets the 4Vector of particle.
void setMomentum(const ROOT::Math::XYZVector &momentum)
Set particle momentum.
void setStatus(unsigned short int status)
Set Status code for the particle.
static const double GeV
Standard of [energy, momentum, mass].
GraphParticle & addParticle()
Add new particle to the graph.
Abstract base class for different kinds of events.