Geant4-11
G4DNAEventScheduler.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 G4DNAEventScheduler_hh
28#define G4DNAEventScheduler_hh 1
29
30#include <G4VScheduler.hh>
31#include <vector>
32#include <map>
33#include <memory>
34#include "globals.hh"
35#include "G4ITModelHandler.hh"
36#include "G4ITStepStatus.hh"
37#include "G4ITTrackHolder.hh"
38#include "G4VStateDependent.hh"
39#include "G4ITReaction.hh"
40#include "G4DNAEventSet.hh"
42class G4VITStepModel;
46{
47 public:
48 IEventScheduler() = default;
49 virtual ~IEventScheduler() = default;
50};
51
53{
54 public:
56 using MapList = std::map<MolType, size_t>;
57 using MapCounter = std::map<MolType, G4int>;
58 G4DNAEventScheduler(const G4DNABoundingBox& boundingBox, G4int pixel);
62 void Initialize();
63 void InitializeInMesh();
64 void Voxelizing();
65 void ReVoxelizing(G4int);
66 void SetEndTime(const G4double&);
67 G4double GetStartTime() const;
68 G4double GetEndTime() const;
69 [[maybe_unused]] G4double GetTimeStep() const;
70 [[maybe_unused]] void SetStartTime(G4double time);
71
72 inline void SetVerbose(G4int verbose) { fVerbose = verbose; }
73 inline G4int GetVerbose() const;
74 void Stepping();
75 void SetChangeMesh(G4bool change) { fSetChangeMesh = change; }
76
77 void Reset();
78 void ResetInMesh();
79 void RunInMesh();
80 void Run();
81
82 [[maybe_unused]] void AddTimeToRecord(const G4double& time);
83
84 void RecordTime();
86 void PrintRecordTime();
87 void Stop();
88 [[maybe_unused]] void SetMaxNbSteps(G4int);
89 std::map<G4double /*time*/, MapCounter> GetCounterMap() const;
90 G4DNAMesh* GetMesh() const;
91 G4int GetPixels() const;
92 void SetUserMeshAction(std::unique_ptr<G4UserMeshAction>);
93 static G4bool CheckingReactionRadius(G4double resolution);
94
95 private:
112
113 std::unique_ptr<G4DNAMesh> fpMesh;
114 std::unique_ptr<G4DNAGillespieDirectMethod> fpGillespieReaction;
115 std::unique_ptr<G4DNAEventSet> fpEventSet;
116 std::unique_ptr<G4DNAUpdateSystemModel> fpUpdateSystem;
117 std::unique_ptr<G4UserMeshAction> fpUserMeshAction;
118 // an aternative Counter
119
121 std::set<G4double> fTimeToRecord;
122 std::set<G4double>::iterator fLastRecoredTime;
123};
124#endif
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
std::unique_ptr< G4DNAMesh > fpMesh
std::unique_ptr< G4DNAGillespieDirectMethod > fpGillespieReaction
static G4bool CheckingReactionRadius(G4double resolution)
G4DNAEventScheduler & operator=(const G4DNAEventScheduler &right)=delete
std::unique_ptr< G4DNAUpdateSystemModel > fpUpdateSystem
G4DNAEventScheduler(const G4DNABoundingBox &boundingBox, G4int pixel)
void SetUserMeshAction(std::unique_ptr< G4UserMeshAction >)
std::map< G4double, MapCounter > GetCounterMap() const
std::map< MolType, size_t > MapList
void SetEndTime(const G4double &)
std::map< G4double, MapCounter > fCounterMap
std::unique_ptr< G4DNAEventSet > fpEventSet
void SetVerbose(G4int verbose)
void SetChangeMesh(G4bool change)
G4double GetTimeStep() const
G4double GetEndTime() const
~G4DNAEventScheduler() override
std::set< G4double > fTimeToRecord
G4DNAMesh * GetMesh() const
G4DNAEventScheduler(const G4DNAEventScheduler &)=delete
G4double GetStartTime() const
void SetStartTime(G4double time)
std::map< MolType, G4int > MapCounter
void AddTimeToRecord(const G4double &time)
std::set< G4double >::iterator fLastRecoredTime
std::unique_ptr< G4UserMeshAction > fpUserMeshAction
virtual ~IEventScheduler()=default
IEventScheduler()=default