G4AdjointStackingAction.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00029 //      Class Name:     G4AdjointStackingAction
00030 //      Author:         L. Desorgher
00031 //      Organisation:   SpaceIT GmbH
00032 //      Contract:       ESA contract 21435/08/NL/AT
00033 //      Customer:       ESA/ESTEC
00035 //
00036 // CHANGE HISTORY
00037 // --------------
00038 //      ChangeHistory: 
00039 //               -April  2008 First implementation  by L. Desorgher 
00040 //               -4-11-2009 Adding the possibility to use user adjoint stacking  action,  L. Desorgher
00041 //               
00042 //
00043 //-------------------------------------------------------------
00044 //      Documentation:
00045 //              Stacking action used in the adjoint simulation. It is responsible to kill a primary forward particle before it is traked  in the forwrad phase 
00046 //              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
00047 //              of the G4RunManager. If the primary particles is not killed before being tracked in the sensitive geometry, the User Stacking action 
00048 //              can be used duiring the forward phase if specified by the method  G4AdjointSimManager::UseUserStackingAction(Bool). 
00049 //      
00050 //
00051 //
00052 //      
00053 //
00054 //              
00055 //
00056 #ifndef G4AdjointStackingAction_h
00057 #define G4AdjointStackingAction_h 1
00058 
00059 #include "globals.hh"
00060 #include "G4UserStackingAction.hh"
00061 
00062 class G4Track;
00063 class G4ParticleDefinition;
00064 
00065 class G4AdjointStackingAction : public G4UserStackingAction
00066 {
00067   public:
00068     G4AdjointStackingAction();
00069     virtual ~G4AdjointStackingAction();
00070 
00071   public:
00072     virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
00073     virtual void NewStage();
00074     virtual void PrepareNewEvent();
00075     inline void SetUserFwdStackingAction(G4UserStackingAction* anAction){theFwdStackingAction = anAction;}
00076     inline void SetUserAdjointStackingAction(G4UserStackingAction* anAction){theUserAdjointStackingAction = anAction;}
00077     
00078     inline void SetKillTracks(G4bool aBool){kill_tracks =aBool;}
00079     inline void SetAdjointMode(G4bool aBool){adjoint_mode=aBool;}
00080   
00081   private:
00082     G4UserStackingAction* theFwdStackingAction;
00083     G4UserStackingAction* theUserAdjointStackingAction;
00084     G4bool kill_tracks, adjoint_mode;
00085 };
00086 
00087 #endif
00088 

Generated on Mon May 27 17:47:38 2013 for Geant4 by  doxygen 1.4.7