How to run FedraVMC Version 1.6

From AstroNuWiki
Jump to: navigation, search

Running

When you compile the code for the first time you will be asked to configure your environment for extra packages (Geant4, VMC, CLHEP, ROOT, VGM). At the end of configuration a script source_me.sh (for bash) or source_me.csh (tcsh, csh) will be created. Please do

source source_me.csh

to setup the environment properly.

Running from the root command line

  • Edit macros/test1.C (set up the number of events to generate and generator to use
appl->SetGenerator(TString name)
  • run root:
root[].x run_g4.C // to run with Geant4
root[].x run_g3.C // to run with Geant3 

By default a file "fedravmc.root" will be created. You could visualize the results of the simulation from a new root session:

root[].x testViewer.C("fedravmc.root")

A bar with buttons will appear. Please click buttons and learn the output.

  • It is possible to convert the obtained root files into fedra format (currently the format of "couples" is supported). This can be done as follows:
root[].x vmc2couples.C("fedra_vmc.root")

Click "Process All Entries". A directory VMC_to_fedra_couples will be created. Each event is stored in its subdirectory and could be processed by fedra reconstruction scripts.

  • It is possible to convert and run the FEDRA reconstruction code on the fly using the macro:
root[].x v2c.C