Belle II Software development
|
Class to inferface AAFH/DIAG36 Generator written in Fortran. More...
#include <AAFHInterface.h>
Public Types | |
enum | EMode { c_MuonParticle = 1 , c_MuonMuon = 2 , c_ElectonMuon = 3 , c_ElectronParticle = 4 , c_ElectonElectron = 5 } |
Generation mode. More... | |
enum | ERejection { c_Once = 1 , c_Twice = 2 } |
Rejection mode. More... | |
Public Member Functions | |
AAFHInterface ()=default | |
Default Constructor. | |
void | setMaxTries (int tries) |
Set the maximum number of tries to generate an event. | |
void | setGeneratorWeights (const std::vector< double > &weights) |
Set the relative weights for the sub generators. | |
void | setMaxWeights (double subgeneratorWeight, double finalWeight) |
Set the maximum expected weights for the rejection method. | |
void | setSupressionLimits (std::vector< double > limits) |
Set the suppression limits when calculation the matrix elements. | |
void | setMinimumMass (double minMass) |
Set the minimum invariant mass for the generated event. | |
void | setParticle (const std::string &particle) |
Set the particle type for modes c_MuonParticle and c_ElectronParticle. | |
int | getMaxTries () const |
Get the maximum number of tries to generate an event. | |
std::vector< double > | getGeneratorWeights () const |
Get the relative weights for the sub generators. | |
double | getMaxSubGeneratorWeight () const |
Get the maximum expected final weight for the rejection method. | |
double | getMaxFinalWeight () const |
Get the maximum expected subgenerator weight for the rejection method. | |
std::vector< double > | getSuppressionLimits () const |
Get suppression limits. | |
double | getMinimumMass () const |
Get the minimum invariant mass for the generated event. | |
std::string | getParticle () const |
Get the particle type for modes c_MuonParticle and c_ElectronParticle. | |
double | getTotalCrossSection () const |
Return total cross section. | |
double | getTotalCrossSectionError () const |
Return error on the total cross section. | |
void | initialize (double beamEnergy, EMode mode, ERejection rejection) |
initialize the generator | |
void | generateEvent (MCParticleGraph &mpg) |
generate one event and add it to the graph in CMS | |
void | finish () |
calculate total cross section | |
Private Member Functions | |
void | updateParticle (MCParticleGraph::GraphParticle &p, double *q, int pdg, bool isInitial=false) |
update particle with generated values | |
Private Attributes | |
double | m_minMass {0} |
minimum invariant mass | |
std::string | m_particle {"tau-"} |
name of the particle for modes c_MuonParticle and c_ElectronParticle | |
int | m_particlePDG {0} |
pdg of the particle for modes c_MuonParticle and c_ElectronParticle, gets set in initialize() | |
Class to inferface AAFH/DIAG36 Generator written in Fortran.
Almost all parameters can be set using this class. First all parameters should be set, then call initialize(), an arbitary number of generateEvent() and then finish(). After finish(), the total cross section can be obained using getTotalCrossSection()
Definition at line 29 of file AAFHInterface.h.
enum EMode |
Generation mode.
Definition at line 32 of file AAFHInterface.h.
enum ERejection |
Rejection mode.
Enumerator | |
---|---|
c_Once | Apply rejection only once for the final event. |
c_Twice | Apply rejection first for each sub generator and then for the final event. |
Definition at line 46 of file AAFHInterface.h.
void finish | ( | ) |
calculate total cross section
Definition at line 319 of file AAFHInterface.cc.
void generateEvent | ( | MCParticleGraph & | mpg | ) |
generate one event and add it to the graph in CMS
Definition at line 272 of file AAFHInterface.cc.
std::vector< double > getGeneratorWeights | ( | ) | const |
Get the relative weights for the sub generators.
Definition at line 197 of file AAFHInterface.cc.
double getMaxFinalWeight | ( | ) | const |
Get the maximum expected subgenerator weight for the rejection method.
Definition at line 210 of file AAFHInterface.cc.
double getMaxSubGeneratorWeight | ( | ) | const |
Get the maximum expected final weight for the rejection method.
Definition at line 205 of file AAFHInterface.cc.
int getMaxTries | ( | ) | const |
Get the maximum number of tries to generate an event.
Definition at line 192 of file AAFHInterface.cc.
|
inline |
Get the minimum invariant mass for the generated event.
Definition at line 85 of file AAFHInterface.h.
|
inline |
Get the particle type for modes c_MuonParticle and c_ElectronParticle.
Definition at line 87 of file AAFHInterface.h.
std::vector< double > getSuppressionLimits | ( | ) | const |
Get suppression limits.
Definition at line 215 of file AAFHInterface.cc.
double getTotalCrossSection | ( | ) | const |
double getTotalCrossSectionError | ( | ) | const |
Return error on the total cross section.
Definition at line 225 of file AAFHInterface.cc.
void initialize | ( | double | beamEnergy, |
EMode | mode, | ||
ERejection | rejection | ||
) |
initialize the generator
Definition at line 230 of file AAFHInterface.cc.
void setGeneratorWeights | ( | const std::vector< double > & | weights | ) |
Set the relative weights for the sub generators.
Definition at line 151 of file AAFHInterface.cc.
void setMaxTries | ( | int | tries | ) |
Set the maximum number of tries to generate an event.
Definition at line 146 of file AAFHInterface.cc.
void setMaxWeights | ( | double | subgeneratorWeight, |
double | finalWeight | ||
) |
Set the maximum expected weights for the rejection method.
If the weights are to large generation will be ineffective, if they are to small it will generate Error messages
Definition at line 168 of file AAFHInterface.cc.
|
inline |
Set the minimum invariant mass for the generated event.
Definition at line 67 of file AAFHInterface.h.
|
inline |
Set the particle type for modes c_MuonParticle and c_ElectronParticle.
Definition at line 69 of file AAFHInterface.h.
void setSupressionLimits | ( | std::vector< double > | limits | ) |
Set the suppression limits when calculation the matrix elements.
Definition at line 174 of file AAFHInterface.cc.
|
private |
update particle with generated values
p | MCParticle to be updated |
q | 4-Vector + mass from the generator |
pdg | pdgcode of the particle |
isInitial | incoming beam particles |
Definition at line 255 of file AAFHInterface.cc.
|
private |
minimum invariant mass
Definition at line 108 of file AAFHInterface.h.
|
private |
name of the particle for modes c_MuonParticle and c_ElectronParticle
Definition at line 110 of file AAFHInterface.h.
|
private |
pdg of the particle for modes c_MuonParticle and c_ElectronParticle, gets set in initialize()
Definition at line 113 of file AAFHInterface.h.