Simulations in Windows 7

GenieHad

GenieHad is the event generator systems written specifically for simulating in great details the hadronic interactions occurring inside REDTOP target systems. Please refer to the GenieHad web page for instructions regarding installing and running the event generator.

 

Slic

Slic  is an interface between Geant4 and the geometry of your detector. It was developed at SLAC for the ILC and HPS projects. Please refer to the documentation on the official slic web site for any further insight on the program. The variant of slic for REDTOP uses only two configuration files to describe your experiment:

  • A macro file identical to those used for Geant4. Refer to the geant4 documentation on how to setup physics lists, number of events, beam specs or an pre-generate stdhep event file, etc.;
  • A .lcdd file which is, essentially an extended .gdml file, which includes some extra information like the sensors size and the magnetic field.

All that one has to do to run it is to edit the above two files according to the physics process you want to simulate and to your detector and, then, run slic from a cmd window. The output is a .slcio file which you can look at with jas3 or that you can further analyze with lcsim.

Prerequisite for running slic on a Windows 7 computer are Visual C++ 2010 Runtime Libraries and Microsoft .net4 libraries. If they are not already installed on the system, the setup process will prompt you accordingly.

 

In order to set up and run slic with the REDTOP configuration, please follow the instructions below.

  1. Download the zipped slic setup file from REDTOP’s ftprepository and extract it in any temporary directory on the hard disk;
  2. Double-click on the file exe to launch the installation;
  3. If the setup prompts to install the .NET Framework 4, accept the installation and let it finish;
  4. If the setup prompts to install or repair the Visual C++ 2010 Runtime Libraries, accept the installation (repair) and let it finish;
  5. When the slicsetup wizard starts, keep pressing next until the installation is complete. It is safer to leave all options and paths unchanged;
  6. When the GenieHadsetup wizard informs you that the installation is complete, close the Whizard

 

Examples

The distribution has three examples which can be run out of the box:

  • Example_LFV_stdhep.bat

This example run the macro file macros/Example_LFV_stdhep.mac which uses as input the file redtop.1800mev.be.urqmdLFV.1001.stdhep generated with GenieHad. The events correspond to the lepton flavor violating process p + Be η  X μ e X. The output file is LCIO/example.lfv.slcio. The Geant4 physics list used is Shielding while the detector geometry and the sensitive detectors are described in the REDTOP\redtop.lcdd redtop file. You can open the .slcio file with jas3, according to the instructions given below.

  • Example_stdhep-vis.bat

This example run the macro file macros/Example_stdhep-vis.mac which uses as input the file redtop.1800mev.be.urqmdLFV.1001.stdhep generated with GenieHad (same as the previous example). In addition to the output example.vis.slcio file, one .heprep file is generated per each event processed. That contains visual information regarding the detector geometry and the hits in the detector. In order to visualize those files, you need to install the heprap application (see instructions below) or any other .heprep visualizer.

  • Example_beam.bat

This example run the macro file macros/Example_beam.mac which generates the event internally using the Geant4 “gun” systems. The generator sends a 1.8 GeV proton onto REDTOP’s target systems. Please, be aware that the probability that such a proton makes an inelastic scattering inside one of the ten beryllium foils comprising REDTOP targets is about 0.5%. Therefore, most of the events processed by Geant4 will be empty. The output file is named example.proton.slcio.

  • Example_eta.bat

This example run the macro file macros/Example_eta.mac which, again, generates the event internally using the Geant4 “gun” systems. In this case a h meson almost at rest is generated inside the detector. The h meson is decays by Geant4 according to the internally tabulated branching ratios.. The output file is named example.eta.slcio.

 

In order to run the above examples, open a cmd window, cd into the slic directory and execute the batch file. For example, for the example.proton case, in the cmd window, type the following:

  • user> cd C:\slic_3_1_6-VC10
  • user> example.proton.bat

The output file example.proton.slcio will be located in the C:\slic_3_1_6-VC10\LCIO directory. You can browse through the event using Jas3, as described in the paragraph below.

 

Jas3

Jas3 is a nice tools that  will allow you to browse through the events you have generated with Slic or to display those events in the detector. In order to set up and run jas3, please follow the instructions below.

  1. Download and install a Java Runtime Environment (JRE) for your Operating System (OS) from the official java web site. For convenience, a 64-bit java setup file for Windows 7 is available for download from REDTOP’s ftp repository (not necessarily the last version, but it works fine).
  2. Download jas3 from REDTOP’s ftp repository and unzip it on your main (c:\) disk. This distribution already comes pre-packaged with all plugins needed for immediate use with the simulation output from Slic. Alternatively, you can download the latest version from the official web site. If this is the case, you need to add the plugins manually (refer to the official documentation for each plugin you will need).
  3. Download the file with the detector description and unzip it into your home directory (usually, C:\Users\your_user_name).
  4. Edit the file C:\jas3.1.4\jas3_win.bat and make sure that the  path to javaw.exe corresponds to the java runtime which you have installed (for example: C:\Program Files\Java\jre1.8.0_45\bin\javaw).
  5. From the Windows start menu, open a cmd window with administrator right. Launch jas3 from there using the following commands:
    • user> cd C:\jas3.1.4\
    • user> jas3_win.bat
  6. A jas3 windows will pop up.
  7. Next, it is a good procedure to update the installed pluging the following menu
    • View -> Plugin Manager … -> Update the installed plugins

If you receive an error regarding the connection, please check your firewall and/or the security setting in the java manager. In case you want to added more plugins from the list of the available ones, please make sure to have the option “install in system directory extensions” checked. This will assure consistency with the already installed plugins.

  1. To browse through the events generated with Slic, use the following menus:
    • File -> Open Data Source -> Lcio files -> browse through your disk to point at an existing file -> finish
    • New -> LCsim Event Browser -> then click the right arrow to load the first event (and repeat that for the next events). The Event Browser allows to see the collections available in the event. The following table gives a description of the most important collections:
      • MCParticle: this is the list of the Montecarlo particles outputted by Geant4. It includes also the primary particles as generated with GenieHad;
      • OpticalTPCBarrelHits: this is the list of hits in the O-Tpc. One hit corresponds to a SiPM in the barrel;
      • OpticalTPCBarrelHits: this is the list of hits in the O-Tpc. One hit corresponds to a SiPM in the barrel;
      • OpticalTPCEndcapHits: this is the list of hits in the O-Tpc. One hit corresponds to a SiPM in the endcaps;
      • HCalBarrelEdepHits: this is the list of hits in the scintillator of ADRIANO (the scintillating component of dual-readout). One hit corresponds to a cell in the barrel;
      • HCalBarrelOptiHits: this is the list of hits in the leadglass of ADRIANO (the Cerenkov component of dual-readout). One hit corresponds to a cell in the barrel;
      • HCalEndcapEdepHits: this is the list of hits in the scintillator of ADRIANO (the scintillating component of dual-readout). One hit corresponds to a cell in the endaps;
      • HCalEndcapOptiHits: this is the list of hits in the leadglass of ADRIANO (the Cerenkov component of dual-readout). One hit corresponds to a cell in the endcap;
      • MUPOLBarrelHits: this is the list of hits in the Muon Polarimeter (this sub-detector is present only in the barrelof REDTOP). One hit corresponds to a cell in the barrel;
    • New -> Wired4 View (to see an event display of the event currently loaded). Again, you need to click the right arrow on menu bar of the window to load the first event or to browse trough the events in the file. Use the button in the left panel to rotate, enlarge and move the display.

Again, refer to the official documentation for more advanced uses of jas3.

 

Heprapp

heprapp is a tool which allow to visualize the .hprep files generated by slic when it is run in visual mode.  A tutorial for its advanced use can be found on the Slac pages. It requires the Java jre already installed on you system. If you do not have it, please follow the instructions in point 1. Of the jas3 installation. In order to set up and run heprapp, please follow the instructions below.

  1. Download the .jar file from official HepRapp page. For convenience, the file is available for download from REDTOP’s ftp repository (not necessarily the last version, but it works fine). The latter comes with a .bat file which configure the java VM to run with more memory (useful for visioning large .heprep files).
  2. If you downloaded the .rar file from REhttps://cdcvs.fnal.gov/redmine/attachments/download/32999/HepRapp.rarDTOP’s repository, unzip it and edit the bat file to reflect the current path of Java on your machine.
  3. To launch the application, double click on either the bat or heprapp.jar icon.
  4. In order to visualize a .heprep file, use the following menus available in the application:
  5. File->Open Data… -> browse to your .heprep file -> Open Heprep file…