LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
UserAction.h File Reference

see below More...

#include "Geant4/G4ClassificationOfNewTrack.hh"
#include <string>
#include "fhiclcpp/ParameterSet.h"

Go to the source code of this file.

Classes

class  g4b::UserAction
 

Namespaces

 g4b
 basic interface to Geant4 for ART-based software
 

Detailed Description

see below

Version
Id
UserAction.h,v 1.4 2012-09-20 21:47:05 greenc Exp
Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu, brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v, rhatc.nosp@m.her@.nosp@m.fnal..nosp@m.gov

G4Base::UserAction.h 1-Sep-1999 Bill Seligman

27-Jan-2009 selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu Revised for LArSoft.

2012-08-17 rhatc.nosp@m.her@.nosp@m.fnal..nosp@m.gov Add G4UserStackingAction-like interfaces

This is an abstract base class to be used with Geant 4.0.1 (and possibly higher, if the User classes don't change).

Why is this interface useful? Answer: Geant4 provides several classes that are meant to be "user hooks" in G4 processing. A couple of examples are G4UserRunAction and G4EventAction. The user is meant to publically inherit from these classes in order to perform tasks at the beginning and ending of run or event processing.

However, typical tasks that physicists perform generally involve more than one user-hook class. For example, to make histograms, a physicist might define the histograms at the beginning of a run, fill the histograms after each event, and write the histograms at the end of a run.

It's handy to have all the code for such tasks (making histograms, studying G4 tracking, event persistency) all in one class, rather than split between two or three different classes. That's where UserAction comes in. It gathers all the G4 user-hook or user-action classes into one place.

Definition in file UserAction.h.