Make sure basf2 is not set up when running evtgen and gsim. Please note: Official MC campaing and signal MC naming differ.
## Preps
Source the `setupBelle.sh` script.
Please note: Exisiting MC is overwritten. If you produce more, you have to adapt the directories.
## Event simulation - evtgen
* e.g. `./runEvtgen nBB-Y4S.txt BtoENuGamma.dec Y4S.conf 10000000 50000`
*`bbsview /path/to/evtgen/file/*.evt` to view the generated files.
*`./makeSummaryEvtGen /path/to/evtgen_*_Bu_munu*.log` shows the number of generated events. Take care that you only input these log files and not all log files in the directory. As they are additional ones and not of interest here.
* Hints: Paths have to be adapted in the following files: `runEvtgen.csh` and `makeSummaryEvtGen`. These jobs can run on the short queue.
### Arguments
---
* nbb-Y4S.txt (Distribution of the events per experiment. Needed to distribute the MC events according to the data sets for correct scaling of the beamparameters. Reference: http://belle.kek.jp/secured/nbb/nbb.html)
* dec (Evtgen .dec file for you decay.)
* Y4S.conf (A config file, can stay empty.)
* Total number of events
* Maximum number of events per job
### Detector simulation - gsim
---
* e.g. `./runGsimReco.csh /group/belle2/users/gelb/MC/signal_mc/evtgen/gen/KstarGamma/ KstarGamma`
* The files`basf/*.basf`(for beam energies), `sim/*.dat` and `.addbgrc` files are not generated automatically. Copy them from somewhere!
*`./makeSummaryGsim -MC /path/to/*.log` shows the number of reconstructed events. This number can be smaller than the generated one and should be noted to reweight your samples correctly. If the number is significant smaller, check why the reconstruction fails.
The `.generror.log` and `.genlog.log` files are additional and produce warning which can be ignored (I moved them to another folder).
* Hint: Paths have to be adapted in the following files:` runGsimReco.csh`, `rec.csh` and `makeSummaryGsim`. These jobs can run on the long queue.
After simulation the detector response has to be simulated, using the gsim.csh script with the following arguments:
### Arguments
---
* output directory of the evtgen files
* name of the MC production
## More on Evtgen
---
### General
General aliases, parameters, branching parameters, ... are set in `DECAY.DEC` . These values might be deprecated. The values can be overwritten in the private .DEC file!
Special particles etc. are defined in the `evt.pdl` file.