The meson is a doubly heavy quark–antiquark bound state and carries flavors explicitly, which provides a fruitful laboratory for testing potential models and understanding the weak decay mechanisms for heavy flavors. In view of the prospects in physics at the hadronic colliders such as Tevatron and LHC, physics is attracting more and more attention. It has been shown that a high luminosity collider running around the -peak is also helpful for studying the properties of meson and has its own advantages. For this purpose, we write down an event generator for simulating meson production through annihilation according to relevant publications. We name it BEEC, in which the color-singlet -wave and -wave -quarkonium states together with the color-octet -wave -quarkonium states can be generated. BEEC can also be adopted to generate the similar charmonium and bottomonium states via the semi-exclusive channels with and respectively. To increase the simulation efficiency, we simplify the amplitude as compact as possible by using the improved trace technology. BEEC is a Fortran program written in a PYTHIA-compatible format and is written in a modular structure, one may apply it to various situations or experimental environments conveniently by using the GNU C compiler make. A method to improve the efficiency of generating unweighted events within PYTHIA environment is proposed. Moreover, BEEC will generate a standard Les Houches Event data file that contains useful information of the meson and its accompanying partons, which can be conveniently imported into PYTHIA to do further hadronization and decay simulation. Program summary: Program title: BEEC Catalogue identifier: AEQC_v1_0 Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEQC_v1_0.html Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.html No. of lines in distributed program, including test data, etc.: 114868 No. of bytes in distributed program, including test data, etc.: 963939 Distribution format: tar.gz Programming language: FORTRAN 77/90. Computer: Any computer with Fortran compiler, the program is tested with GNU Fortran compiler and Intel Fortran compiler. Operating system: UNIX, Linux and Windows. RAM: About 2.0 MB. Classification: 11.2. Nature of problem: Production of charmonium, -quarkonium and bottomonium via annihilation channel around the peak. Solution method: The production of heavy -quarkonium via annihilation are estimated by using the improved trace technology. The -quarkonium in color-singlet -wave state, -wave state, and the color-octet -wave states have been studied within the framework of non-relativistic QCD. The code with option can generate weighted and unweighted events conveniently, in particular, the unweighted events are generated by using an improved hit-and-miss approach so as to improve the generating efficiency. Restrictions: The generator is aimed at the production of double heavy quarkonium through annihilation at the peak. The considered processes are those that are associated with two heavy quark jets, which could provide sizable quarkonium events around the peak. Running time: It depends on which option one chooses to match PYTHIA when generating the heavy quarkonium events. Typically, for the production of the -wave quarkonium states, if setting (unweighted events), then it takes about 2 h on a 2.9 GHz AMD Athlon (tm) II×4 635 Processor machine to generate 105 events; if setting (weighted events), it takes only ∼16 min to generate 105 events. For the production of the -wave quarkonium states, the time will be almost one hundred times longer than the case of the -wave quarkonium. [ABSTRACT FROM AUTHOR]