Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AdjointStackingAction.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 // $Id: G4AdjointStackingAction.hh 98744 2016-08-09 13:21:26Z gcosmo $
27 //
29 // Class Name: G4AdjointStackingAction
30 // Author: L. Desorgher
31 // Organisation: SpaceIT GmbH
32 // Contract: ESA contract 21435/08/NL/AT
33 // Customer: ESA/ESTEC
35 //
36 // CHANGE HISTORY
37 // --------------
38 // ChangeHistory:
39 // -April 2008 First implementation by L. Desorgher
40 // -4-11-2009 Adding the possibility to use user adjoint stacking action, L. Desorgher
41 //
42 //
43 //-------------------------------------------------------------
44 // Documentation:
45 // Stacking action used in the adjoint simulation. It is responsible to kill a primary forward particle before it is traked in the forwrad phase
46 // if the last adjoint particle did not reach the adjoint surface. Was needed for the new design where the G4AdjointSimManager is no more an extension
47 // of the G4RunManager. If the primary particles is not killed before being tracked in the sensitive geometry, the User Stacking action
48 // can be used duiring the forward phase if specified by the method G4AdjointSimManager::UseUserStackingAction(Bool).
49 //
50 //
51 //
52 //
53 //
54 //
55 //
56 #ifndef G4AdjointStackingAction_h
57 #define G4AdjointStackingAction_h 1
58 
59 #include "globals.hh"
60 #include "G4UserStackingAction.hh"
61 
62 class G4Track;
65 
67 {
68  public:
70  virtual ~G4AdjointStackingAction();
71 
72  public:
74  virtual void NewStage();
75  virtual void PrepareNewEvent();
76  inline void SetUserFwdStackingAction(G4UserStackingAction* anAction){theFwdStackingAction = anAction;}
77  inline void SetUserAdjointStackingAction(G4UserStackingAction* anAction){theUserAdjointStackingAction = anAction;}
78  inline void SetKillTracks(G4bool aBool){kill_tracks =aBool;}
79  inline void SetAdjointMode(G4bool aBool){adjoint_mode=aBool;}
80 
81 
82 
83  private:
84  G4UserStackingAction* theFwdStackingAction;
85  G4UserStackingAction* theUserAdjointStackingAction;
86  G4bool reclassification_stage,first_reclassification_stage,kill_tracks,adjoint_mode;
87  G4AdjointTrackingAction* theAdjointTrackingAction;
88 };
89 
90 #endif
91 
void SetUserAdjointStackingAction(G4UserStackingAction *anAction)
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
bool G4bool
Definition: G4Types.hh:79
void SetUserFwdStackingAction(G4UserStackingAction *anAction)
G4AdjointStackingAction(G4AdjointTrackingAction *anAction)