G4VITTimeStepper.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: G4VITTimeStepper.hh 64057 2012-10-30 15:04:49Z gcosmo $
00027 //
00028 // Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr) 
00029 //
00030 // WARNING : This class is released as a prototype.
00031 // It might strongly evolve or even disapear in the next releases.
00032 //
00033 // History:
00034 // -----------
00035 // 10 Oct 2011 M.Karamitros created
00036 //
00037 // -------------------------------------------------------------------
00038 #ifndef G4VITTimeStepper_H
00039 #define G4VITTimeStepper_H
00040 
00041 #include "G4Track.hh"
00042 #include "G4ITReactionTable.hh"
00043 #include "G4ReferenceCountedHandle.hh"
00044 #include "AddClone_def.hh"
00045 
00046 typedef G4ReferenceCountedHandle< std::vector<G4Track*> > G4TrackVectorHandle;
00047 
00055 class G4VITTimeStepper
00056 {
00057 public:
00058     G4VITTimeStepper();
00059     virtual ~G4VITTimeStepper();
00060 
00061     G4VITTimeStepper(const G4VITTimeStepper&);
00062     G4VITTimeStepper& operator=(const G4VITTimeStepper& other);
00063 
00065     G4IT_TO_BE_CLONED(G4VITTimeStepper)
00066 
00067     // First initialization (done once for all at the begin of the run)
00068     // eg. check if the reaction table is given ...
00069     inline virtual void Initialize(){;}
00070 
00071     // Preparation part
00072     static void SetTimes(const G4double&, const G4double&);
00073 //    inline virtual void PrepareForAllProcessors(){;}
00074     inline virtual void Prepare() ;
00075 
00076     virtual G4double CalculateStep(const G4Track&, const G4double&) = 0;
00077 
00078     inline G4TrackVectorHandle GetReactants();
00079     inline virtual void ResetReactants(){fReactants = 0;}
00080 
00081     //
00082     inline G4double GetSampledMinTimeStep() ;
00083     
00084     inline void SetReactionTable(const G4ITReactionTable*);
00085     inline const G4ITReactionTable* GetReactionTable();
00086 
00087 protected :
00088     static G4double fCurrentGlobalTime ;
00089     static G4double fUserMinTimeStep   ;
00090 
00091     G4double fSampledMinTimeStep ;
00092     G4TrackVectorHandle fReactants;
00093 
00094     const G4ITReactionTable* fpReactionTable;
00095 
00096 private:
00097     G4int fVerbose ;
00098 };
00099 
00100 inline void G4VITTimeStepper::SetReactionTable(const G4ITReactionTable* table)
00101 {
00102     fpReactionTable = table;
00103 }
00104 
00105 inline const G4ITReactionTable* G4VITTimeStepper::GetReactionTable()
00106 {
00107     return fpReactionTable ;
00108 }
00109 
00110 inline void G4VITTimeStepper::Prepare()
00111 {
00112     fReactants = 0 ;
00113 }
00114 
00115 inline G4double G4VITTimeStepper::GetSampledMinTimeStep()
00116 {
00117     return fSampledMinTimeStep ;
00118 }
00119 
00120 inline G4TrackVectorHandle G4VITTimeStepper::GetReactants()
00121 {
00122     return  fReactants ;
00123 }
00124 #endif // G4VITTimeStepper_H

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