Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleParticle trajectories in Geant4

In the event display above you will only see the trajectory of the initial particle fired by the GPS gun into the calorimeter. It will stop somewhere near the entrance to the calorimeter, as it interacts and forms secondary particles. Since a shower consists of many secondary particles we do not normally keep the trajectories of all these particles, as they increase the size of the output file, and slow down Geant4. You can change this behaviour by setting store_secondaries=true in the DetectorRegion in your ecal.lcdd file, in which case you would see something like this:
Image Removed Image Added
Make sure to set store_secondaries=false when generating the data files below.

...

Now you should be able to select "File", "New", "WIRED4 View" in JAS3 and view the event. You should be able to step through different events to see how they look.

Image RemovedImage Added

Analyzing the Data Files using JAS3

...

  1. Open the file using the "File", "Open File" menu item. The file will open in the JAS built-in editor (but you can use a different editor if you like to edit the file).
  2. Compile the file using the JAS compiler. The easiest way is to right-click on the JAS built-in editor and choose "Compile" from the popup menu.
  3. Load the program into memory using the "Load" item on the JAS popup menu.
  4. If you have not already done so, open the ecal_e-.slcio file using the "File", "Open File" menu item. If you have already opened the file make sure you are at the beginning of the file by choosing the "Rewind" item from the "Loop" menu.
  5. Now analyze the data by choosing "Go" from the "Loop" menu. The data will be read, and each event in turn will be passed to the recordSupplied() method of your analysis code. As histograms are created and filled they will appear in the JAS3 tree. You can double-click on the icons corresponding to histograms in the tree to view them, or use the popup-menu on the JAS3 tree to arrange multiple plots on the page.

Image RemovedImage Added

After you have analyzed all of the events you should have one histogram of total energy deposited in the calorimeter for each electron energy you generated with Geant4. Your plots should look something like this:

...

You should produce plots which look something like the following plots:

Image AddedImage Removed
Image Removed Image Added

Additional Exercises

...