Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VITTimeStepComputer.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: G4VITTimeStepComputer.hh 100802 2016-11-02 14:55:27Z gcosmo $
28 // Author: Mathieu Karamitros
30 // The code is developed in the framework of the ESA AO7146
31 //
32 // We would be very happy hearing from you, so do not hesitate to
33 // send us your feedback!
34 //
35 // In order for Geant4-DNA to be maintained and still open-source,
36 // article citations are crucial.
37 // If you use Geant4-DNA chemistry and you publish papers about
38 // your software, in addition to the general paper on Geant4-DNA:
39 //
40 // The Geant4-DNA project, S. Incerti et al.,
41 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
42 //
43 // we ask that you please cite the following papers reference papers
44 // related to chemistry:
45 //
46 // Diffusion-controlled reactions modelling in Geant4-DNA,
47 // M. Karamitros et al., 2014 (submitted)
48 // Modeling Radiation Chemistry in the Geant4 Toolkit, M. Karamitros et al.,
49 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
50 
51 #ifndef G4VITTimeStepper_H
52 #define G4VITTimeStepper_H
53 
54 #include "G4Track.hh"
55 #include "G4ITReactionTable.hh"
57 #include "AddClone_def.hh"
58 #include "G4memory.hh"
59 
60 //typedef G4ReferenceCountedHandle< std::vector<G4Track*> > G4TrackVectorHandle;
61 typedef G4shared_ptr< std::vector<G4Track*> > G4TrackVectorHandle;
62 
71 {
72 public:
74  virtual ~G4VITTimeStepComputer();
75 
78 
81 
82  // First initialization (done once for all at the begin of the run)
83  // eg. check if the reaction table is given ...
84  inline virtual void Initialize(){;}
85 
86  // Preparation part
87  static void SetTimes(const G4double&, const G4double&);
88 // inline virtual void PrepareForAllProcessors(){;}
89  inline virtual void Prepare() ;
90 
91  virtual G4double CalculateStep(const G4Track&, const G4double&) = 0;
92 
94  inline virtual void ResetReactants()
95 // {fReactants = 0;}
96  {fReactants.reset();}
97 
98  //
100 
101  inline void SetReactionTable(const G4ITReactionTable*);
102  inline const G4ITReactionTable* GetReactionTable();
103 
104 protected :
107 
110 
112 
113 private:
114  G4int fVerbose ;
115 };
116 
118 {
119  fpReactionTable = table;
120 }
121 
123 {
124  return fpReactionTable ;
125 }
126 
128 {
129 // fReactants = 0 ;
130  fReactants.reset() ;
131 }
132 
134 {
135  return fSampledMinTimeStep ;
136 }
137 
139 {
140  return fReactants ;
141 }
142 #endif // G4VITTimeStepper_H
const G4ITReactionTable * fpReactionTable
#define inline
Definition: internal.h:71
G4TrackVectorHandle fReactants
#define G4IT_TO_BE_CLONED(parent_class)
Definition: AddClone_def.hh:50
G4shared_ptr< std::vector< G4Track * > > G4TrackVectorHandle
Definition: G4ITReaction.hh:43
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
void SetReactionTable(const G4ITReactionTable *)
static void SetTimes(const G4double &, const G4double &)
static G4ThreadLocal G4double fCurrentGlobalTime
static G4ThreadLocal G4double fUserMinTimeStep
G4VITTimeStepComputer & operator=(const G4VITTimeStepComputer &other)
virtual G4double CalculateStep(const G4Track &, const G4double &)=0
G4TrackVectorHandle GetReactants()
double G4double
Definition: G4Types.hh:76
const G4ITReactionTable * GetReactionTable()