All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisualizationAction.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file VisualizationAction.h
3 //
4 /// \author seligman@nevis.columbia.edu
5 ////////////////////////////////////////////////////////////////////////
6 /// VisualizationAction
7 /// 19-Mar-2002 Bill Seligman
8 ///
9 /// Use UserAction to implement the standard visualization control for
10 /// a typical Geant4 job. Everything in this class comes from the
11 /// Geant4 examples; the only difference is that it's put into an
12 /// UserAction class.
13 ///
14 /// It uses multiple inheritance: it inherits from LArG4::UserAction,
15 /// in order to take advantage of Geant4's user hooks; it also
16 /// inherits from cfg::Observer, because it accesses a parameter from
17 /// an XML configuration file.
18 ///
19 /// 04-Oct-2007 WGS: Accept a flag that controls the level of detail on
20 /// the event display.
21 ///
22 /// 25-Feb-2009 WGS: Revised for FMWK/LArSoft
23 
24 #ifndef LArG4_VisualizationAction_H
25 #define LArG4_VisualizationAction_H
26 
27 #include "nug4/G4Base/UserAction.h"
28 #include "Geant4/G4Types.hh"
29 
30 // Forward declarations of G4 classes that are arguments to
31 // UserAction methods.
32 class G4Run;
33 class G4Event;
34 
35 namespace larg4 {
36 
37  class VisualizationAction : public g4b::UserAction
38  {
39  public:
41  virtual ~VisualizationAction();
42 
43  virtual void BeginOfRunAction(const G4Run*);
44  virtual void EndOfRunAction(const G4Run*);
45  virtual void BeginOfEventAction(const G4Event*);
46  virtual void EndOfEventAction(const G4Event*);
47 
48  /// Acessors, if we need them:
49  G4double GetTrackEnergyCutoff() const {return m_energyCutoff;}
50  void SetTrackEnergyCutoff(const G4double e) {m_energyCutoff = e;}
51 
52  private:
53  /// Don't draw particles with energies less than this cut.
54  G4double m_energyCutoff;
55 
56  /// Whether or not to draw neutral tracks (default is no).
58  };
59 
60 } // namespace LArG4
61 
62 #endif // LArG4_VisualizationAction_H
G4bool m_drawNeutrals
Whether or not to draw neutral tracks (default is no).
virtual void BeginOfEventAction(const G4Event *)
virtual void BeginOfRunAction(const G4Run *)
virtual void EndOfEventAction(const G4Event *)
void SetTrackEnergyCutoff(const G4double e)
virtual void EndOfRunAction(const G4Run *)
do i e
G4double m_energyCutoff
Don't draw particles with energies less than this cut.
G4double GetTrackEnergyCutoff() const
Acessors, if we need them: