9#include <generators/modules/bbbreminput/BBBremInputModule.h>
11#include <framework/logging/Logger.h>
12#include <framework/datastore/DataStore.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/dataobjects/EventMetaData.h>
17#include <Math/Vector3D.h>
35 setDescription(
"Generates low scattering angle radiative Bhabha events (Beam-Beam Bremsstrahlung).");
38 addParam(
"MinPhotonEnergyFraction",
m_photonEFrac,
"Fraction of the minimum photon energy.", 0.000001);
72 B2FATAL(
"BBBremInputModule::event(): BeamParameters have changed within a job, this is not supported for BBBREM!");
82 ROOT::Math::LorentzRotation boost = initial.
getCMSToLab();
85 ROOT::Math::XYZVector vertex = initial.
getVertex();
93 evtMetaData->setGeneratedWeight(weight);
112 double centerOfMassEnergy = nominal.getMass();
double getCrossSectionErrorOver()
Returns the error on the total overweight bias cross section of the generated process in millibarn.
void term()
Terminates the generator.
double generateEvent(MCParticleGraph &mcGraph, ROOT::Math::XYZVector vertex, ROOT::Math::LorentzRotation boost)
Generates one single event.
void init(double cmsEnergy, double minPhotonEFrac, bool unweighted=true, double maxWeight=2000.0, int densitymode=1, double densityparameter=1.68e-17)
Initializes the generator.
double getCrossSectionOver()
Returns the total overweight bias cross section of the generated process in millibarn.
double getCrossSection()
Returns the total cross section of the generated process in millibarn.
double getCrossSectionError()
Returns the error on the total cross section of the generated process in millibarn.
double getMaxWeightDelivered()
Returns the maximum weight given by the BBBrem generation.
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
const BeamParameters & getBeamParameters() const
Return reference to nominal beam parameters.
This class contains the initial state for the given event.
const ROOT::Math::LorentzRotation & getCMSToLab() const
Return the LorentzRotation to convert from CMS to lab frame.
const ROOT::Math::XYZVector & getVertex() const
Get the position of the collision.
@ c_checkCyclic
Check for cyclic dependencies.
@ c_setDecayInfo
Set decay time and vertex.
void generateList(const std::string &name="", int options=c_setNothing)
Generates the MCParticle list and stores it in the StoreArray with the given name.
void setDescription(const std::string &description)
Sets the description of the module.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
void initialize()
function to be executed on initialize()
MCInitialParticles & generate()
Generate a new event.
void clear()
Reset particles and decay information to make the class reusable.
Abstract base class for different kinds of events.