 |
Belle II Software
release-05-02-19
|
11 #include <generators/modules/aafhinput/AafhInputModule.h>
12 #include <framework/logging/Logger.h>
28 setDescription(
"AAFH Generator to generate non-radiative two-photon events like e+e- -> e+e-e+e-");
31 addParam(
"mode", m_mode,
32 "decay mode to generate."
33 " 1: e+e- -> mu+mu-L+L-,"
34 " 2: e+e- -> mu+mu-mu+mu-,"
35 " 3: e+e- -> e+e-mu+mu-,"
36 " 4: e+e- -> e+e-L+L-,"
37 " 5: e+e- -> e+e-e+e-. "
38 "L is a user defined particle (default: tau)",
40 addParam(
"rejection", m_rejection,
42 " 1: apply once for the final event weight,"
43 " 2: apply for the subgenerator weight and for the final weight",
45 addParam(
"maxTries", m_maxTries,
46 "Maximum tries for event generation (ITOT)",
47 m_generator.getMaxTries());
48 addParam(
"maxFinalWeight", m_maxFinalWeight,
49 "maximum expected final weight for rejection scheme (ESFT)",
50 m_generator.getMaxFinalWeight());
51 addParam(
"maxSubgeneratorWeight", m_maxSubgeneratorWeight,
52 "maximum expected subgenerator weight for rejection scheme (ESWE)",
53 m_generator.getMaxSubGeneratorWeight());
54 addParam(
"subgeneratorWeights", m_subgeneratorWeights,
55 "relative weights of the subgenerators: this must be a list of four "
56 "or eight values (first four are interpreted as WAP, rest as WBP) "
57 "which specify the relativ weights for each of the "
58 "four sub generators. The orginial code states that it the program "
59 "run most efficient when the maximum weight is equal in all sub "
60 "generators and that if one wants to be sure that all peaks in the "
61 "differential cross section are accounted the chance to enter each "
62 "sub generator should be equal. Values which try to fullfill both "
63 "conditions are printed at after generation when the output level "
65 m_generator.getGeneratorWeights());
66 addParam(
"suppressionLimits", m_suppressionLimits,
67 "suppression limits for the matrix element calculations. This must "
68 "be a list of four values, [FACE, FACM, FACL, PROC]. For FACE, FACM "
69 "and FACL these specify the size of the propagator for which the "
70 "corresponding spin configurations will be omitted. A value of 1e3 "
71 "will calculate the dominat part correctly and a very large value "
72 "compared to the mass (i.e. 1e50) will calculate it exactly. PROC "
73 "specifies that feynman diagrams which contribute less than 1/PROC "
74 "of the biggest contribution are omitted. For exact calculation it "
75 "should be very big but 1e9 should be considerably faster without "
76 "affecting the result very much",
77 m_generator.getSuppressionLimits());
78 addParam(
"minMass", m_minMass,
79 "minimum invariant mass of generated fermion pair. Will "
80 "automatically be set to at least 2 times the generated particle "
83 addParam(
"particle", m_particle,
84 "name of the generated particle for mode 1 and 4",
85 m_generator.getParticle());
104 B2FATAL(
"AafhInputModule::event(): BeamParameters have changed within a job, this is not supported for AAFH!");
123 for (
size_t i = 0; i < mpg.
size(); ++i) {
124 mpg[i].set4Vector(boost * mpg[i].get4Vector());
126 TVector3 v3 = mpg[i].getProductionVertex();
128 mpg[i].setProductionVertex(v3);
129 mpg[i].setValidVertex(
true);
144 const double beamEnergy = nominal.getMass() / 2.;
147 if (m_mode < 1 || m_mode > 5) {
148 B2ERROR(
"AafhInputModule::initializeGenerator: 'mode' must be a value between 1 and 5");
150 if (m_rejection < 1 || m_rejection > 2) {
151 B2ERROR(
"AafhInputModule::initializeGenerator: 'rejection' must be a value between 1 and 2");
void generateList(const std::string &name="", int options=c_setNothing)
Generates the MCParticle list and stores it in the StoreArray with the given name.
size_t size() const
Return the number of particles in the graph.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Class to build, validate and sort a particle decay chain.
const BeamParameters & getBeamParameters() const
Return reference to nominal beam parameters.
void setSupressionLimits(std::vector< double > limits)
Set the suppression limits when calculation the matrix elements.
void setMaxTries(int tries)
Set the maximum number of tries to generate an event.
void finish()
calculate total cross section
void setParticle(const std::string &particle)
Set the particle type for modes c_MuonParticle and c_ElectronParticle.
@ c_setDecayInfo
Set decay time and vertex.
This class contains the initial state for the given event.
void setGeneratorWeights(const std::vector< double > &weights)
Set the relative weights for the sub generators.
Abstract base class for different kinds of events.
void initialize(double beamEnergy, EMode mode, ERejection rejection)
initialize the generator
ERejection
Rejection mode.
const TVector3 & getVertex() const
Get the position of the collision.
void generateEvent(MCParticleGraph &mpg)
generate one event and add it to the graph in CMS
void setMinimumMass(double minMass)
Set the minimum invariant mass for the generated event.
void setMaxWeights(double subgeneratorWeight, double finalWeight)
Set the maximum expected weights for the rejection method.
void initialize()
function to be executed on initialize()
const TLorentzRotation & getCMSToLab() const
Return the LorentzRotation to convert from CMS to lab frame.
MCInitialParticles & generate()
Generate a new event.
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...