Belle II Software  release-08-01-10
AAFHInterface Class Reference

Class to inferface AAFH/DIAG36 Generator written in Fortran. More...

#include <AAFHInterface.h>

Collaboration diagram for AAFHInterface:

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. More...
 
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 More...
 

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()
 

Detailed Description

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.

Member Enumeration Documentation

◆ EMode

enum EMode

Generation mode.

Enumerator
c_MuonParticle 

E+E- -> Mu+Mu-L+L- where L can be anything, defaults to tau.

c_MuonMuon 

E+E- -> Mu+Mu-Mu+Mu-.

c_ElectonMuon 

E+E- -> E+E-Mu+Mu-.

c_ElectronParticle 

E+E- -> E+E-L+L- where L can be anything, defaults to tau.

c_ElectonElectron 

E+E- -> E+E-E+E-.

Definition at line 32 of file AAFHInterface.h.

32  {
34  c_MuonParticle = 1,
36  c_MuonMuon = 2,
38  c_ElectonMuon = 3,
43  };
@ c_ElectonElectron
E+E- -> E+E-E+E-.
Definition: AAFHInterface.h:42
@ c_ElectonMuon
E+E- -> E+E-Mu+Mu-.
Definition: AAFHInterface.h:38
@ c_MuonParticle
E+E- -> Mu+Mu-L+L- where L can be anything, defaults to tau.
Definition: AAFHInterface.h:34
@ c_MuonMuon
E+E- -> Mu+Mu-Mu+Mu-.
Definition: AAFHInterface.h:36
@ c_ElectronParticle
E+E- -> E+E-L+L- where L can be anything, defaults to tau.
Definition: AAFHInterface.h:40

◆ ERejection

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.

Member Function Documentation

◆ setMaxWeights()

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.

169 {
170  input_.eswe = subgeneratorWeight;
171  input_.esft = finalWeight;
172 }

◆ updateParticle()

void updateParticle ( MCParticleGraph::GraphParticle p,
double *  q,
int  pdg,
bool  isInitial = false 
)
private

update particle with generated values

Parameters
pMCParticle to be updated
q4-Vector + mass from the generator
pdgpdgcode of the particle
isInitialincoming beam particles

Definition at line 255 of file AAFHInterface.cc.


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