Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /tutorials/IonGun/README.md is written in an unsupported language. File is not indexed.

0001 Small example of an Ion Gun shooting at a block of material
0002 Usage:
0003 // set up the environment:
0004 source /opt/sphenix/core/bin/phenix_setup.csh -n
0005 
0006 // start root
0007 root.exe
0008 
0009 // Run the default macro (10 events by default, argument is number of events)
0010 .x Fun4All_G4_IonGun.C
0011 
0012 the energy deposition is saved in an ntuple in G4EdepNtuple.root which contains the summed up 
0013 energy deposited in the volume (separated by layers if implemented) as well as the sum over the
0014 layers (layer = -1 for this).
0015 
0016 Use the Display:
0017 
0018 .x Fun4All_G4_IonGun.C(0)
0019 .L DisplayOn.C
0020 PHG4Reco *g4 = DisplayOn()
0021 
0022 // get pointer to framework
0023 Fun4AllServer *se = Fun4AllServer::instance();
0024 // run one event
0025 se->run(1);
0026 
0027 displaycmd() gives some useful drawing commands
0028 
0029 Modifying the Ion Gun:
0030 
0031 // get a pointer to the ion gun
0032 PHG4IonGun *gun = getgun()
0033 
0034 // print current setting:
0035 gun->Print()