Belle II Software development
BHWide Class Reference

C++ Interface for the Fortran Bhabha scattering generator BHWide. More...

#include <BHWide.h>

Public Types

enum  Channel {
  CH_BOTH = 0 ,
  CH_S_ONLY = 1 ,
  CH_T_ONLY = 2
}
 Call needed channels. More...
 
enum  RandomGenerator {
  RG_RANMAR = 1 ,
  RG_RANECU = 2
}
 Call random generator. More...
 
enum  EWCorrectionLib {
  EC_BABAMC = 1 ,
  EC_ALIBABA = 2
}
 Call electroweak correction. More...
 
enum  HardBremsModel {
  HM_HELICITY_AMP = 1 ,
  HM_CALKUL = 2
}
 Call Brem Model. More...
 
enum  PhotonVacPolarization {
  PP_OFF = 0 ,
  PP_BHLUMI = 1 ,
  PP_EIDELMAN = 2 ,
  PP_BURKHARDT = 3
}
 Call photon polarization. More...
 

Public Member Functions

 BHWide ()
 Constructor.
 
 ~BHWide ()
 Destrucotr.
 
void setDefaultSettings ()
 Sets the default settings for the BhWide Fortran generator.
 
void enableZContribution (bool zContribution=true)
 Enabled the Z contribution.
 
void setChannel (Channel channel)
 Set the type of channel which should be used.
 
void enableWeights (bool weighted=true)
 Enable the use of weighted events.
 
void setRandomGenerator (RandomGenerator randomGenerator)
 Set the type of the randomN nmber generator.
 
void enableWeakCorrections (bool weakCorrections=true)
 Enable the use of weak corrections.
 
void setElectroWeakCorrectionsLib (EWCorrectionLib ewCorrectionLib)
 Set the type of the electro weak correction library.
 
void setHardBremsModel (HardBremsModel hardBremsModel)
 Set the type of the hard bremsstrahlung model.
 
void setPhotonVacPolarization (PhotonVacPolarization photonVacPol)
 Set the model for the photon vacuum polarization.
 
void setCMSEnergy (double cmsEnergy)
 Sets the CMS energy.
 
void setScatAnglePositron (std::pair< double, double > angleRange)
 Sets the theta scattering angle range for the scattered positron.
 
void setScatAngleElectron (std::pair< double, double > angleRange)
 Sets the theta scattering angle range for the scattered electron.
 
void setMinEnergyFinalStatePos (double minEnergyFinalStatePos)
 Sets the minimal energy for the scattered positron.
 
void setMinEnergyFinalStateElc (double minEnergyFinalStateElc)
 Sets the minimal energy for the scattered electron.
 
void setMaxAcollinearity (double maxAcollinearity)
 Sets the max acollinearity angle.
 
void setInfCutCMSEnergy (double infCutCMSEnergy)
 Sets the CMS energy on which an infrared cut is performed.
 
void setMaxRejectionWeight (double maxRejectionWeight)
 Sets the max weight at which events are rejected.
 
void setMassZ (double massZ)
 Sets the mass of the Z Boson.
 
void setWidthZ (double widthZ)
 Sets the width of the Z Boson.
 
void setSinW2 (double sinW2)
 Sets the value for the sinW2.
 
void setMassTop (double massTop)
 Sets the mass for the top quark.
 
void setMassHiggs (double massHiggs)
 Sets the mass for the Higgs Boson.
 
void init ()
 Initializes the generator.
 
void generateEvent (MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
 Generates one single event.
 
void term ()
 Terminates the generator.
 
double getCrossSection ()
 Returns the total cross section of the generated process.
 
double getCrossSectionError ()
 Returns the error on the total cross section of the generated process.
 

Protected Member Functions

void applySettings ()
 Apply the settings to the internal Fortran generator.
 
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.
 

Protected Attributes

bool m_zContribution
 Z-contribution ON/OFF.
 
Channel m_channel
 Channel choice.
 
bool m_weighted
 Switch for constant, variable weight.
 
RandomGenerator m_randomGenerator
 Type of random number generator.
 
bool m_weakCorrections
 Switching ON/OFF weak corrections.
 
EWCorrectionLib m_ewCorrectionLib
 Option for ElectroWeak Corrections Library.
 
HardBremsModel m_hardBremsModel
 type of MODEL subprogram and QED matrix element for hard bremsstrahlung.
 
PhotonVacPolarization m_photonVacPol
 Photon vacuum polarization switch.
 
double m_cmsEnergy
 CMS Energy = 2*Ebeam [GeV].
 
std::pair< double, double > m_ScatteringAngleRangePositron
 Min and Max value for the scattering angle [deg] of the positron.
 
std::pair< double, double > m_ScatteringAngleRangeElectron
 Min and Max value for the scattering angle [deg] of the electron.
 
double m_minEnergyFinalStatePos
 Minimum energy [GeV] for final state positron.
 
double m_minEnergyFinalStateElc
 Minimum energy [GeV] for final state electron.
 
double m_maxAcollinearity
 Maximum acollinearity [deg] of final state e+e-.
 
double m_infCutCMSEnergy
 Dimensionless infrared cut on CMS energy of soft photons, ( E_phot > CMSENE*EPSCMS/2 ).
 
double m_maxRejectionWeight
 Maximum Weight for rejection (if <= 0, it is reset inside the program).
 
double m_massZ
 Z mass [GeV].
 
double m_widthZ
 Z width [GeV] (may be recalculated by EW library).
 
double m_sinW2
 sin^2(theta_W) (may be recalculated by EW library).
 
double m_massTop
 top quark mass [GeV].
 
double m_massHiggs
 Higgs mass [GeV].
 
double m_crossSection
 The cross section of the generated bhabha scattering events.
 
double m_crossSectionError
 The error on the cross section of the generated bhabha scattering events.
 

Private Attributes

int m_npar [100]
 Integer parameters for BHWide.
 
double m_xpar [100]
 Double parameters for BHWide.
 

Detailed Description

C++ Interface for the Fortran Bhabha scattering generator BHWide.

IMPOTRANT NOTE: In the case of generating UNWEIGHTED events, the user should check in the OUTPUT if the number of OVERWEIGHTED events and/or the fraction of the corresponding cross section is ACCEPTABLE for his/her desired PRECISION. If not, the value of WTMAX has to be adjusted (increased) accordingly (making a histogram of the weight might be helpful).

Definition at line 32 of file BHWide.h.

Member Enumeration Documentation

◆ Channel

enum Channel

Call needed channels.

Enumerator
CH_BOTH 

both s and t-channels + interferences.

CH_S_ONLY 

only s-channel (for tests!), with model == HM_CALKUL.

CH_T_ONLY 

only t-channel (for tests!), with model == HM_CALKUL.

Definition at line 36 of file BHWide.h.

36 {
37 CH_BOTH = 0,
38 CH_S_ONLY = 1,
39 CH_T_ONLY = 2
40 };
@ 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

◆ EWCorrectionLib

Call electroweak correction.

Enumerator
EC_BABAMC 

ElectroWeak Corr.

from BABAMC (obsolete).

EC_ALIBABA 

ElectroWeak Corr.

from ALIBABA, RECOMMENDED.

Definition at line 49 of file BHWide.h.

49 {
50 EC_BABAMC = 1,
51 EC_ALIBABA = 2
52 };
@ EC_ALIBABA
ElectroWeak Corr.
Definition: BHWide.h:51
@ EC_BABAMC
ElectroWeak Corr.
Definition: BHWide.h:50

◆ HardBremsModel

Call Brem Model.

Enumerator
HM_HELICITY_AMP 

obtained by the BHWide authors (helicity amplitudes).

HM_CALKUL 

from CALKUL, Nucl.

Phys. B206 (1982) 61.

Definition at line 55 of file BHWide.h.

55 {
56 HM_HELICITY_AMP = 1,
57 HM_CALKUL = 2
58 };
@ HM_HELICITY_AMP
obtained by the BHWide authors (helicity amplitudes).
Definition: BHWide.h:56
@ HM_CALKUL
from CALKUL, Nucl.
Definition: BHWide.h:57

◆ PhotonVacPolarization

Call photon polarization.

Enumerator
PP_OFF 

Photon vacuum polarization is off.

PP_BHLUMI 

Burkhardt et.al.

1989, as in BHLUMI 2.0x.

PP_EIDELMAN 

S.

Eidelman, F. Jegerlehner, Z.Phys.C(1995)

PP_BURKHARDT 

Burkhardt and Pietrzyk 1995 (Moriond).

Definition at line 61 of file BHWide.h.

61 {
62 PP_OFF = 0,
63 PP_BHLUMI = 1,
64 PP_EIDELMAN = 2,
65 PP_BURKHARDT = 3
66 };
@ 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

◆ RandomGenerator

Call random generator.

Enumerator
RG_RANMAR 

Ranmar generator.

RG_RANECU 

Ranecu generator.

Definition at line 43 of file BHWide.h.

43 {
44 RG_RANMAR = 1,
45 RG_RANECU = 2
46 };
@ RG_RANECU
Ranecu generator.
Definition: BHWide.h:45
@ RG_RANMAR
Ranmar generator.
Definition: BHWide.h:44

Constructor & Destructor Documentation

◆ BHWide()

BHWide ( )

Constructor.

Sets the default settings.

Definition at line 60 of file BHWide.cc.

61{
62 for (int i = 0; i < 100; ++i) {
63 m_npar[i] = 0;
64 m_xpar[i] = 0.0;
65 }
66
67 m_crossSection = 0.;
69
71}
int m_npar[100]
Integer parameters for BHWide.
Definition: BHWide.h:261
void setDefaultSettings()
Sets the default settings for the BhWide Fortran generator.
Definition: BHWide.cc:80
double m_crossSection
The cross section of the generated bhabha scattering events.
Definition: BHWide.h:240
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

◆ ~BHWide()

~BHWide ( )

Destrucotr.

Definition at line 74 of file BHWide.cc.

75{
76
77}

Member Function Documentation

◆ applySettings()

void applySettings ( )
protected

Apply the settings to the internal Fortran generator.

Definition at line 152 of file BHWide.cc.

153{
154 //--------------------
155 // Integer parameters
156 //--------------------
157 int keyZof;
158 if (m_zContribution) keyZof = 0;
159 else keyZof = 1;
160 m_npar[0] = (1000 * keyZof) + (100 * m_channel) + (10 * m_weighted) + m_randomGenerator;
162
163 //--------------------
164 // Double parameters
165 //--------------------
166 m_xpar[0] = m_cmsEnergy;
176 m_xpar[10] = m_massZ;
177 m_xpar[11] = m_widthZ;
178 m_xpar[12] = m_sinW2;
179 m_xpar[13] = m_massTop;
180 m_xpar[14] = m_massHiggs;
181
182 int mode = -1;
183 bhwide_(&mode, m_xpar, m_npar);
184}
double m_maxAcollinearity
Maximum acollinearity [deg] of final state e+e-.
Definition: BHWide.h:230
std::pair< double, double > m_ScatteringAngleRangePositron
Min and Max value for the scattering angle [deg] of the positron.
Definition: BHWide.h:225
double m_minEnergyFinalStateElc
Minimum energy [GeV] for final state electron.
Definition: BHWide.h:229
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
PhotonVacPolarization m_photonVacPol
Photon vacuum polarization switch.
Definition: BHWide.h:222
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: BHWide.h:224
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
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
bool m_weakCorrections
Switching ON/OFF weak corrections.
Definition: BHWide.h:219
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
double m_massTop
top quark mass [GeV].
Definition: BHWide.h:237
double m_massHiggs
Higgs mass [GeV].
Definition: BHWide.h:238
double m_massZ
Z mass [GeV].
Definition: BHWide.h:234
double m_minEnergyFinalStatePos
Minimum energy [GeV] for final state positron.
Definition: BHWide.h:228
HardBremsModel m_hardBremsModel
type of MODEL subprogram and QED matrix element for hard bremsstrahlung.
Definition: BHWide.h:221

◆ enableWeakCorrections()

void enableWeakCorrections ( bool  weakCorrections = true)
inline

Enable the use of weak corrections.

Parameters
weakCorrectionsSet to true to use weak corrections.

Definition at line 102 of file BHWide.h.

102{ m_weakCorrections = weakCorrections; }

◆ enableWeights()

void enableWeights ( bool  weighted = true)
inline

Enable the use of weighted events.

Parameters
weightedSet to false to generate events for an unweighted MonteCarlo detector simulation.

Definition at line 92 of file BHWide.h.

92{ m_weighted = weighted; }

◆ enableZContribution()

void enableZContribution ( bool  zContribution = true)
inline

Enabled the Z contribution.

Parameters
zContributionSet to true to enabled the Z contribution.

Definition at line 82 of file BHWide.h.

82{ m_zContribution = zContribution; }

◆ generateEvent()

void generateEvent ( MCParticleGraph mcGraph,
ROOT::Math::XYZVector  vertex,
ROOT::Math::LorentzRotation  boost 
)

Generates one single event.

Parameters
mcGraphReference to the MonteCarlo graph into which the generated particles will be stored.
vertexgenerated vertex.
boostgenerated boost.

Definition at line 116 of file BHWide.cc.

117{
118 //Generate event
119 int mode = 0;
120 bhwide_(&mode, m_xpar, m_npar);
121
122 //Store the initial particles as virtual particles into the MCParticleGraph
123 storeParticle(mcGraph, momset_.q1, 11, vertex, boost, true);
124 storeParticle(mcGraph, momset_.p1, -11, vertex, boost, true);
125
126 //Store the final state positron and electron into the MCParticleGraph
127 storeParticle(mcGraph, momset_.q2, 11, vertex, boost);
128 storeParticle(mcGraph, momset_.p2, -11, vertex, boost);
129
130 //Store the real photons into the MCParticleGraph
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]};
133 storeParticle(mcGraph, photMom, 22, vertex, boost);
134 }
135}
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

◆ getCrossSection()

double getCrossSection ( )
inline

Returns the total cross section of the generated process.

Returns
The total cross section.

Definition at line 205 of file BHWide.h.

205{ return m_crossSection; }

◆ getCrossSectionError()

double getCrossSectionError ( )
inline

Returns the error on the total cross section of the generated process.

Returns
The error on the total cross section.

Definition at line 210 of file BHWide.h.

210{ return m_crossSectionError; }

◆ init()

void init ( )

Initializes the generator.

Sets the default values for the internal Fortran generator.

Definition at line 108 of file BHWide.cc.

109{
110 int number = 50000;
111 glimit_(&number);
113}
void applySettings()
Apply the settings to the internal Fortran generator.
Definition: BHWide.cc:152

◆ setChannel()

void setChannel ( Channel  channel)
inline

Set the type of channel which should be used.

Parameters
channelThe type of channel: s, t or both.

Definition at line 87 of file BHWide.h.

87{ m_channel = channel; }

◆ setCMSEnergy()

void setCMSEnergy ( double  cmsEnergy)
inline

Sets the CMS energy.

Parameters
cmsEnergyThe CMS energy in [GeV].

Definition at line 122 of file BHWide.h.

122{ m_cmsEnergy = cmsEnergy; }

◆ setDefaultSettings()

void setDefaultSettings ( )

Sets the default settings for the BhWide Fortran generator.

Definition at line 80 of file BHWide.cc.

81{
82
83 m_zContribution = true;
85 m_weighted = false;
87 m_weakCorrections = true;
91
92 m_cmsEnergy = 10.58 * Unit::GeV;
93 m_ScatteringAngleRangePositron = make_pair(17.0, 150.0); //in [deg]
94 m_ScatteringAngleRangeElectron = make_pair(17.0, 150.0); //in [deg]
97 m_maxAcollinearity = 10.0;
98 m_infCutCMSEnergy = 1e-5;
100 m_massZ = 91.1882 * Unit::GeV;
101 m_widthZ = 2.4952;
102 m_sinW2 = 0.22225;
103 m_massTop = 174.3 * Unit::GeV;
104 m_massHiggs = 115.0 * Unit::GeV;
105}
static const double GeV
Standard of [energy, momentum, mass].
Definition: Unit.h:51

◆ setElectroWeakCorrectionsLib()

void setElectroWeakCorrectionsLib ( EWCorrectionLib  ewCorrectionLib)
inline

Set the type of the electro weak correction library.

Parameters
ewCorrectionLibThe electro weak correction library which is used: BABAMC or ALIBABA.

Definition at line 107 of file BHWide.h.

107{ m_ewCorrectionLib = ewCorrectionLib; }

◆ setHardBremsModel()

void setHardBremsModel ( HardBremsModel  hardBremsModel)
inline

Set the type of the hard bremsstrahlung model.

Parameters
hardBremsModelThe model which is used for the hard bremsstrahlung: helicity amplitudes or CALKUL.

Definition at line 112 of file BHWide.h.

112{ m_hardBremsModel = hardBremsModel; }

◆ setInfCutCMSEnergy()

void setInfCutCMSEnergy ( double  infCutCMSEnergy)
inline

Sets the CMS energy on which an infrared cut is performed.

Parameters
infCutCMSEnergyThe CMS energy in [Gev] at which an infrared cut is performed.

Definition at line 152 of file BHWide.h.

152{ m_infCutCMSEnergy = infCutCMSEnergy; }

◆ setMassHiggs()

void setMassHiggs ( double  massHiggs)
inline

Sets the mass for the Higgs Boson.

Parameters
massHiggsThe mass for the Higgs Boson in [GeV].

Definition at line 182 of file BHWide.h.

182{ m_massHiggs = massHiggs; }

◆ setMassTop()

void setMassTop ( double  massTop)
inline

Sets the mass for the top quark.

Parameters
massTopThe mass for the top quark in [GeV].

Definition at line 177 of file BHWide.h.

177{ m_massTop = massTop; }

◆ setMassZ()

void setMassZ ( double  massZ)
inline

Sets the mass of the Z Boson.

Parameters
massZThe mass of the Z Boson in [Gev].

Definition at line 162 of file BHWide.h.

162{ m_massZ = massZ; }

◆ setMaxAcollinearity()

void setMaxAcollinearity ( double  maxAcollinearity)
inline

Sets the max acollinearity angle.

Parameters
maxAcollinearityThe max acollinearity angle in [deg].

Definition at line 147 of file BHWide.h.

147{ m_maxAcollinearity = maxAcollinearity; }

◆ setMaxRejectionWeight()

void setMaxRejectionWeight ( double  maxRejectionWeight)
inline

Sets the max weight at which events are rejected.

Parameters
maxRejectionWeightThe weight at which events are rejected.

Definition at line 157 of file BHWide.h.

157{ m_maxRejectionWeight = maxRejectionWeight; }

◆ setMinEnergyFinalStateElc()

void setMinEnergyFinalStateElc ( double  minEnergyFinalStateElc)
inline

Sets the minimal energy for the scattered electron.

Parameters
minEnergyFinalStateElcThe minimal energy for the scattered electron in [GeV].

Definition at line 142 of file BHWide.h.

142{ m_minEnergyFinalStateElc = minEnergyFinalStateElc; }

◆ setMinEnergyFinalStatePos()

void setMinEnergyFinalStatePos ( double  minEnergyFinalStatePos)
inline

Sets the minimal energy for the scattered positron.

Parameters
minEnergyFinalStatePosThe minimal energy for the scattered positron in [GeV].

Definition at line 137 of file BHWide.h.

137{ m_minEnergyFinalStatePos = minEnergyFinalStatePos; }

◆ setPhotonVacPolarization()

void setPhotonVacPolarization ( PhotonVacPolarization  photonVacPol)
inline

Set the model for the photon vacuum polarization.

Parameters
photonVacPolThe model for the photon vacuum polarization: Off, BHLUMI, Eidelman or Burkhardt. photonVacPol.

Definition at line 117 of file BHWide.h.

◆ setRandomGenerator()

void setRandomGenerator ( RandomGenerator  randomGenerator)
inline

Set the type of the randomN nmber generator.

Parameters
randomGeneratorThe type of the random number generator: Ranmar or Ranecu.

Definition at line 97 of file BHWide.h.

97{ m_randomGenerator = randomGenerator; }

◆ setScatAngleElectron()

void setScatAngleElectron ( std::pair< double, double >  angleRange)
inline

Sets the theta scattering angle range for the scattered electron.

Parameters
angleRangeA pair of values, representing the min and max theta angle of the scattered electron in [deg].

Definition at line 132 of file BHWide.h.

132{ m_ScatteringAngleRangeElectron = angleRange; }

◆ setScatAnglePositron()

void setScatAnglePositron ( std::pair< double, double >  angleRange)
inline

Sets the theta scattering angle range for the scattered positron.

Parameters
angleRangeA pair of values, representing the min and max theta angle of the scattered positron in [deg].

Definition at line 127 of file BHWide.h.

127{ m_ScatteringAngleRangePositron = angleRange; }

◆ setSinW2()

void setSinW2 ( double  sinW2)
inline

Sets the value for the sinW2.

Parameters
sinW2The value for the sinW2.

Definition at line 172 of file BHWide.h.

172{ m_sinW2 = sinW2; }

◆ setWidthZ()

void setWidthZ ( double  widthZ)
inline

Sets the width of the Z Boson.

Parameters
widthZThe width of the Z Boson in [GeV].

Definition at line 167 of file BHWide.h.

167{ m_widthZ = widthZ; }

◆ storeParticle()

void storeParticle ( MCParticleGraph mcGraph,
const double *  mom,
int  pdg,
ROOT::Math::XYZVector  vertex,
ROOT::Math::LorentzRotation  boost,
bool  isVirtual = false,
bool  isInitial = false 
)
protected

Store a single generated particle into the MonteCarlo graph.

Parameters
mcGraphReference to the MonteCarlo graph into which the particle should be stored.
momThe 3-momentum of the particle in [GeV].
pdgThe PDG code of the particle.
vertexProduction vertex.
boostLorentz boost vector.
isVirtualIf the particle is a virtual particle, such as the incoming particles, set this to true.
isInitialIf the particle is a initial particle for ISR, set this to true.

Definition at line 187 of file BHWide.cc.

190{
191 // //Create particle
192 //MCParticleGraph::GraphParticle& part = mcGraph.addParticle();
193 //if (!isVirtual) {
194 // part.setStatus(MCParticle::c_PrimaryParticle);
195 //} else {
196 // part.setStatus(MCParticle::c_IsVirtual);
197 //}
198 //Create particle
199 // RG 6/25/14 Add new flag for ISR "c_Initial"
201 if (isVirtual) {
203 } else if (isInitial) {
205 }
206
207 // every particle from a generator is primary
209
210 // all particles produced by BHWIDE are stable
212
213 // all photons from BHWIDE are ISR or FSR
214 if (pdg == 22 && !isVirtual) {
217 }
218
219 part.setPDG(pdg);
220 part.setFirstDaughter(0);
221 part.setLastDaughter(0);
222 part.setMomentum(ROOT::Math::XYZVector(mom[0], mom[1], mom[2]));
223 part.setMass(TDatabasePDG::Instance()->GetParticle(pdg)->Mass());
224 part.setEnergy(mom[3]);
225
226 //boost
227 ROOT::Math::PxPyPzEVector p4 = part.get4Vector();
228 p4.SetPz(-1.0 * p4.Pz()); //BHWIDE uses other direction convention
229 p4 = boost * p4;
230 part.set4Vector(p4);
231
232 //set vertex
233 if (!isInitial) {
234 ROOT::Math::XYZVector v3 = part.getProductionVertex();
235 v3 = v3 + vertex;
236 part.setProductionVertex(v3);
237 part.setValidVertex(true);
238 }
239}
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.
@ c_IsFSRPhoton
bit 7: Particle is from finial state radiation
Definition: MCParticle.h:61
@ c_Initial
bit 5: Particle is initial such as e+ or e- and not going to Geant4
Definition: MCParticle.h:57
@ c_PrimaryParticle
bit 0: Particle is primary particle.
Definition: MCParticle.h:47
@ c_IsVirtual
bit 4: Particle is virtual and not going to Geant4.
Definition: MCParticle.h:55
@ c_StableInGenerator
bit 1: Particle is stable, i.e., not decaying in the generator.
Definition: MCParticle.h:49
@ c_IsISRPhoton
bit 6: Particle is from initial state radiation
Definition: MCParticle.h:59
void setMass(float mass)
Set particle mass.
Definition: MCParticle.h:366
void addStatus(unsigned short int bitmask)
Add bitmask to current status.
Definition: MCParticle.h:353
void setEnergy(float energy)
Set energy.
Definition: MCParticle.h:372
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
Definition: MCParticle.h:189
void setValidVertex(bool valid)
Set indication wether vertex and time information is valid or just default.
Definition: MCParticle.h:378
void setProductionVertex(const ROOT::Math::XYZVector &vertex)
Set production vertex position.
Definition: MCParticle.h:396
ROOT::Math::PxPyPzEVector get4Vector() const
Return 4Vector of particle.
Definition: MCParticle.h:207
void setPDG(int pdg)
Set PDG code of the particle.
Definition: MCParticle.h:335
void set4Vector(const ROOT::Math::PxPyPzEVector &p4)
Sets the 4Vector of particle.
Definition: MCParticle.h:438
void setMomentum(const ROOT::Math::XYZVector &momentum)
Set particle momentum.
Definition: MCParticle.h:417
void setStatus(unsigned short int status)
Set Status code for the particle.
Definition: MCParticle.h:346
GraphParticle & addParticle()
Add new particle to the graph.
const std::vector< double > v3
MATLAB generated random vector.

◆ term()

void term ( )

Terminates the generator.

Closes the internal Fortran generator and retrieves the total cross section.

Definition at line 138 of file BHWide.cc.

139{
140 int mode = 2;
141 bhwide_(&mode, m_xpar, m_npar);
142
143 //Get the cross section
146}

Member Data Documentation

◆ m_channel

Channel m_channel
protected

Channel choice.

Definition at line 216 of file BHWide.h.

◆ m_cmsEnergy

double m_cmsEnergy
protected

CMS Energy = 2*Ebeam [GeV].

Definition at line 224 of file BHWide.h.

◆ m_crossSection

double m_crossSection
protected

The cross section of the generated bhabha scattering events.

Definition at line 240 of file BHWide.h.

◆ m_crossSectionError

double m_crossSectionError
protected

The error on the cross section of the generated bhabha scattering events.

Definition at line 241 of file BHWide.h.

◆ m_ewCorrectionLib

EWCorrectionLib m_ewCorrectionLib
protected

Option for ElectroWeak Corrections Library.

Definition at line 220 of file BHWide.h.

◆ m_hardBremsModel

HardBremsModel m_hardBremsModel
protected

type of MODEL subprogram and QED matrix element for hard bremsstrahlung.

Definition at line 221 of file BHWide.h.

◆ m_infCutCMSEnergy

double m_infCutCMSEnergy
protected

Dimensionless infrared cut on CMS energy of soft photons, ( E_phot > CMSENE*EPSCMS/2 ).

Definition at line 231 of file BHWide.h.

◆ m_massHiggs

double m_massHiggs
protected

Higgs mass [GeV].

Definition at line 238 of file BHWide.h.

◆ m_massTop

double m_massTop
protected

top quark mass [GeV].

Definition at line 237 of file BHWide.h.

◆ m_massZ

double m_massZ
protected

Z mass [GeV].

Definition at line 234 of file BHWide.h.

◆ m_maxAcollinearity

double m_maxAcollinearity
protected

Maximum acollinearity [deg] of final state e+e-.

Definition at line 230 of file BHWide.h.

◆ m_maxRejectionWeight

double m_maxRejectionWeight
protected

Maximum Weight for rejection (if <= 0, it is reset inside the program).

Definition at line 232 of file BHWide.h.

◆ m_minEnergyFinalStateElc

double m_minEnergyFinalStateElc
protected

Minimum energy [GeV] for final state electron.

Definition at line 229 of file BHWide.h.

◆ m_minEnergyFinalStatePos

double m_minEnergyFinalStatePos
protected

Minimum energy [GeV] for final state positron.

Definition at line 228 of file BHWide.h.

◆ m_npar

int m_npar[100]
private

Integer parameters for BHWide.

Definition at line 261 of file BHWide.h.

◆ m_photonVacPol

PhotonVacPolarization m_photonVacPol
protected

Photon vacuum polarization switch.

Definition at line 222 of file BHWide.h.

◆ m_randomGenerator

RandomGenerator m_randomGenerator
protected

Type of random number generator.

Definition at line 218 of file BHWide.h.

◆ m_ScatteringAngleRangeElectron

std::pair<double, double> m_ScatteringAngleRangeElectron
protected

Min and Max value for the scattering angle [deg] of the electron.

Definition at line 226 of file BHWide.h.

◆ m_ScatteringAngleRangePositron

std::pair<double, double> m_ScatteringAngleRangePositron
protected

Min and Max value for the scattering angle [deg] of the positron.

Definition at line 225 of file BHWide.h.

◆ m_sinW2

double m_sinW2
protected

sin^2(theta_W) (may be recalculated by EW library).

Definition at line 236 of file BHWide.h.

◆ m_weakCorrections

bool m_weakCorrections
protected

Switching ON/OFF weak corrections.

true = all ElectroWeak Corrections included, false = only QED corrections included.

Definition at line 219 of file BHWide.h.

◆ m_weighted

bool m_weighted
protected

Switch for constant, variable weight.

Unweighted events for detector simulation, or weighted events.

Definition at line 217 of file BHWide.h.

◆ m_widthZ

double m_widthZ
protected

Z width [GeV] (may be recalculated by EW library).

Definition at line 235 of file BHWide.h.

◆ m_xpar

double m_xpar[100]
private

Double parameters for BHWide.

Definition at line 262 of file BHWide.h.

◆ m_zContribution

bool m_zContribution
protected

Z-contribution ON/OFF.

Definition at line 215 of file BHWide.h.


The documentation for this class was generated from the following files: