All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BadIdeaAction.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file G4BadIdeaAction.h
3 /// \brief this UserAction derived class is to implement catches to known bugs
4 /// in Geant4 that require grabbing const G4 objects and altering them -
5 /// a very bad idea in general. Please do not add to this class without
6 /// discussing with the LArSoft Conveners
7 ///
8 /// \author brebel@fnal.gov
9 ////////////////////////////////////////////////////////////////////////
10 
11 /// This class implements the LArG4::UserAction interface in order to
12 /// try to side step known bugs in version 4.9.4.p02 of Geant4
13 //
14 /// It uses multiple inheritance: it inherits from G4Base::UserAction,
15 /// in order to take advantage of Geant4's user hooks
16 
17 #ifndef LArG4_G4BADIDEAACTION_H
18 #define LArG4_G4BADIDEAACTION_H
19 
20 #include "art/Framework/Services/Registry/ServiceHandle.h"
21 #include "nug4/G4Base/UserAction.h"
23 
24 // Forward declarations.
25 class G4Step;
26 
27 namespace larg4 {
28 
29  class G4BadIdeaAction : public g4b::UserAction
30  {
31  public:
32  // Standard constructors and destructors;
33  G4BadIdeaAction(int );
34  virtual ~G4BadIdeaAction();
35 
36  // UserActions method that we'll override, to obtain access to
37  // Geant4's steps
38  virtual void SteppingAction (const G4Step*);
39 
40  private:
41 
42  art::ServiceHandle<geo::Geometry const> fGeo; //< handle to geometry service
44 
45  };
46 
47 } // namespace LArG4
48 
49 #endif // LArG4_G4BADIDEAACTION_H
art::ServiceHandle< geo::Geometry const > fGeo
virtual void SteppingAction(const G4Step *)
art framework interface to geometry description