9 #include <generators/modules/bhwideinput/BHWideInputModule.h>
11 #include <framework/datastore/StoreArray.h>
28 setDescription(
"Generates radiative BhaBha scattering events with BHWide.");
31 addParam(
"ScatteringAngleRangePositron", m_ScatteringAngleRangePositron,
32 "Min [0] and Max [1] value for the scattering angle [deg] of the positron.", make_vector(15.0, 165.0));
33 addParam(
"ScatteringAngleRangeElectron", m_ScatteringAngleRangeElectron,
34 "Min [0] and Max [1] value for the scattering angle [deg] of the electron.", make_vector(15.0, 165.0));
35 addParam(
"MaxAcollinearity", m_maxAcollinearity,
"Maximum acollinearity angle between finale state leptons/photons [degree]",
37 addParam(
"MinEnergy", m_eMin,
"Minimum energy for electrons in the final state [GeV] (default: 0.2 GeV)", 0.2);
38 addParam(
"VacuumPolarization", m_vacPolString,
39 "Vacuum polarization: off (off - EW off, too), Burkhardt89 (bhlumi), Eidelman/Jegerlehner95 (eidelman) or Burkhardt/Pietrzyk95 (burkhardt)",
40 std::string(
"burkhardt"));
41 addParam(
"WtMax", m_wtMax,
"Maximum of weight (wtmax, default: 3.0), if <0: internal maximum search", 3.);
42 addParam(
"WeakCorrections", m_weakCorrections,
"EW correction ON/OFF",
true);
45 m_vacPol = BHWide::PhotonVacPolarization::PP_BURKHARDT;
50 BHWideInputModule::~BHWideInputModule()
56 void BHWideInputModule::initialize()
62 m_initial.initialize();
67 void BHWideInputModule::event()
70 if (m_beamParams.hasChanged()) {
72 initializeGenerator();
74 B2FATAL(
"BHWideInputModule::event(): BeamParameters have changed within a job, this is not supported for BHWide!");
88 m_generator.generateEvent(m_mcGraph, vertex, boost);
89 m_mcGraph.generateList(
"", MCParticleGraph::c_setDecayInfo | MCParticleGraph::c_checkCyclic);
94 void BHWideInputModule::terminate()
98 B2RESULT(
"BHWideInputModule: Total cross section: " << m_generator.getCrossSection() * 0.001 <<
" nb +- " <<
99 m_generator.getCrossSection() *
100 m_generator.getCrossSectionError() * 0.001 <<
" nb");
103 void BHWideInputModule::initializeGenerator()
106 double ecm = nominal.getMass();
108 m_generator.setScatAnglePositron(vectorToPair(m_ScatteringAngleRangePositron,
"ScatteringAngleRangePositron"));
109 m_generator.setScatAngleElectron(vectorToPair(m_ScatteringAngleRangeElectron,
"ScatteringAngleRangeElectron"));
111 m_generator.setMinEnergyFinalStatePos(m_eMin);
112 m_generator.setMinEnergyFinalStateElc(m_eMin);
113 m_generator.setMaxAcollinearity(m_maxAcollinearity);
114 m_generator.setMaxRejectionWeight(m_wtMax);
116 if (m_weakCorrections == 0) {
117 m_generator.enableWeakCorrections(0);
119 m_generator.enableWeakCorrections(1);
123 if (m_vacPolString ==
"off") {
124 m_vacPol = BHWide::PhotonVacPolarization::PP_OFF;
126 if (m_weakCorrections == 1) {
127 B2INFO(
"BHWideInputModule: Switching OFF EW corrections");
129 m_generator.enableWeakCorrections(0);
130 }
else if (m_vacPolString ==
"bhlumi") m_vacPol = BHWide::PhotonVacPolarization::PP_BHLUMI;
131 else if (m_vacPolString ==
"burkhardt") m_vacPol = BHWide::PhotonVacPolarization::PP_BURKHARDT;
132 else if (m_vacPolString ==
"eidelman") m_vacPol = BHWide::PhotonVacPolarization::PP_EIDELMAN;
133 else B2FATAL(
"BHWideInputModule: Vacuum Polarization option does not exist: " << m_vacPolString);
134 m_generator.setPhotonVacPolarization(m_vacPol);
136 m_generator.setCMSEnergy(ecm);
140 m_initialized =
true;
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
This class contains the initial state for the given event.
const TLorentzRotation & getCMSToLab() const
Return the LorentzRotation to convert from CMS to lab frame.
const TVector3 & getVertex() const
Get the position of the collision.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.