Generating and Analyzing Events within JAS

This update assumes that you have successfully set up the event generation environment.

Once you have finalized your analysis program and are ready to run over large data samples, it is sometimes convenient to internally generate the Monte Carlo events. Here is an example demonstrating how to do so within the JAS environment.

1.) Copy the Event Generator  source file to your EvtGen area. 

StdhepEventGenerator.java 

2.) You need to extend StdhepGenerator to have a class with a zero argument  constructor. For example, within JAS, choose "File" -> "New" -> "Blank Program Page" and copy and paste the following code into it. Save the file as PythiaGenerator.java to a directory in your CLASSPATH and compile it.

public class PythiaGenerator extends StdhepEventGenerator

{

public MyGenerator()

{

super("pythia");

}

}

Of course you can also create an IsajetGenerator or HerwigGenerator as well.

3) Navigate to the "EvtGen" folder.

4) Start JAS in this folder. The easiest way is to add the directory containing JAS executable to your PATH, e.g.

set PATH=c:\Program Files\Java Analysis Studio\bin;%PATH%

then type:

jas

5) Choose New Job and "A local Job for Generating Events".

6) Do not choose to open the Program Page Wizard.

7) Load PythiaGenerator

8) Load an analysis process such as MCParticleAnalysis.java

9) Choose Run

10) You will need to press Stop after some time to stop the analysis.

10) You can now analyze your histograms.