SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ParisUserAction.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 
27 #ifndef ParisUserAction_h
28 #define ParisUserAction_h 1
29 
30 #include "SToGS_BaseROOT.hh"
31 #include "ParisEvents.h"
32 
34 
37 {
38 protected:
39  TTree *fTree;
40 protected:
41  // Events to be filled from G4 to ROOT
44 
45 public:
46  ParisEventRun(TTree *tree);
47  virtual ~ParisEventRun()
48  {;}
49 
50  virtual void RecordEvent(const G4Event* evt);
51 };
52 
54 
57 {
58 protected:
60  G4int fisOptical;
65 
66 public:
67  ParisUserAction(G4String conffile = "setup/paris_actions.conf");
68  virtual ~ParisUserAction()
69  {;}
70 
71  virtual G4Run* GenerateRun();
72 
73 // virtual void BeginOfRunAction(const G4Run * /*therun*/);
74  virtual void EndOfRunAction(const G4Run * /*therun*/);
75  virtual void BeginOfEventAction(const G4Event * /*event*/);
76 // virtual void EndOfEventAction(const G4Event * /*event*/);
77  virtual void PreUserTrackingAction(const G4Track * /*atrack*/);
78  virtual void PostUserTrackingAction(const G4Track * /*atrack*/);
79 };
80 
82 
85 {
86 public:
87  ParisUserActionInitialization(G4String conf = "setup/paris_actions.conf", G4String which_gene = "GPS", G4String which_gene_opt = "G4Macros/GPSPointLike.mac"):
88  AllInOneUserActionInitialization<ParisUserAction>(conf,which_gene,which_gene_opt)
89  {;}
91  {;}
92 };
93 
94 
95 #endif
96 
virtual void PostUserTrackingAction(const G4Track *)
virtual void EndOfRunAction(const G4Run *)
a G4 user's action manage by a single AllAction class
POpticalEvent * fOpticalEventBeg
emitted optical photons
POpticalEvent * fOpticalEventEnd
end of optical photons
G4int fisOptical
true if one has also photons from scintillations
ParisEventRun(TTree *tree)
virtual void BeginOfEventAction(const G4Event *)
The ParisUserActionInitialization is use to init G4 kernel with the actions defined in ParisUserActio...
virtual G4Run * GenerateRun()
AllInOneUserActionInitialization(G4String which_user_action_opt, G4String which_gene, G4String which_gene_opt)
virtual void RecordEvent(const G4Event *evt)
virtual ~ParisUserAction()
The ParisEventRun has the charge to fill Paris Event from the SToGS G4 hit collections.
ParisUserAction(G4String conffile="setup/paris_actions.conf")
ParisUserActionInitialization(G4String conf="setup/paris_actions.conf", G4String which_gene="GPS", G4String which_gene_opt="G4Macros/GPSPointLike.mac")
The ParisUserAction defines the run,event,track and step actions.
virtual ~ParisEventRun()
virtual void PreUserTrackingAction(const G4Track *)