ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4DNAChemistryManager.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4DNAChemistryManager.hh
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
28
// Author: Mathieu Karamitros
29
//
30
// The code is developed in the framework of the ESA AO7146
31
//
32
// We would be very happy hearing from you, send us your feedback! :)
33
//
34
// In order for Geant4-DNA to be maintained and still open-source,
35
// article citations are crucial.
36
// If you use Geant4-DNA chemistry and you publish papers about your software,
37
// in addition to the general paper on Geant4-DNA:
38
//
39
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
40
//
41
// we would be very happy if you could please also cite the following
42
// reference papers on chemistry:
43
//
44
// J. Comput. Phys. 274 (2014) 841-882
45
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
46
47
#pragma once
48
49
#include "
globals.hh
"
50
#include "
G4ThreeVector.hh
"
51
#include <fstream>
52
#include <memory>
53
#include "
G4UImessenger.hh
"
54
#include "
G4VStateDependent.hh
"
55
56
class
G4Track
;
57
class
G4DNAWaterExcitationStructure
;
58
class
G4DNAWaterIonisationStructure
;
59
class
G4Molecule
;
60
class
G4VUserChemistryList
;
61
class
G4UIcmdWithABool
;
62
class
G4UIcmdWithADoubleAndUnit
;
63
class
G4UIcmdWithoutParameter
;
64
class
G4UIcmdWithAnInteger
;
65
class
G4ITGun
;
66
class
G4VPhysChemIO
;
67
68
enum
ElectronicModification
69
{
70
eIonizedMolecule
,
71
eExcitedMolecule
,
72
eDissociativeAttachment
73
};
74
87
class
G4DNAChemistryManager
:
public
G4UImessenger
,
88
public
G4VStateDependent
89
{
90
protected
:
91
~G4DNAChemistryManager
()
override
;
92
93
public
:
94
//============================================================================
95
// STATIC METHODS
96
//============================================================================
97
static
G4DNAChemistryManager
*
Instance
();
98
static
G4DNAChemistryManager
*
GetInstanceIfExists
();
99
100
static
void
DeleteInstance
();
101
static
G4bool
IsActivated
();
102
103
//============================================================================
104
// VIRTUAL METHODS
105
//============================================================================
106
// G4VStateDependent
107
G4bool
Notify
(
G4ApplicationState
requestedState)
override
;
108
// G4UImessenger
109
void
SetNewValue
(
G4UIcommand
*,
G4String
)
override
;
110
G4String
GetCurrentValue
(
G4UIcommand
* pCommand)
override
;
111
112
//============================================================================
113
// INITIALIZATION AND FINALIZATION METHODS
114
//============================================================================
115
G4bool
IsChemistryActivated
();
116
void
SetChemistryActivation
(
G4bool
);
117
119
void
SetChemistryList
(
G4VUserChemistryList
&);
120
122
void
SetChemistryList
(std::unique_ptr<G4VUserChemistryList>);
123
124
// [[deprecated]] : chemistry list should never be nullptr
125
void
SetChemistryList
(
G4VUserChemistryList
*);
126
127
void
Deregister
(
G4VUserChemistryList
&);
128
129
void
Initialize
();
130
void
Run
();
131
void
Clear
();
132
140
void
SetGun
(
G4ITGun
* pChemSpeciesGun);
141
142
void
SetPhysChemIO
(std::unique_ptr<G4VPhysChemIO> pPhysChemIO);
143
144
void
SetVerbose
(
G4int
verbose);
145
152
void
UseAsStandalone
(
G4bool
flag);
153
G4bool
IsCounterResetWhenRunEnds
()
const
;
154
155
void
ResetCounterWhenRunEnds
(
G4bool
resetCounterWhenRunEnds);
156
157
void
ForceMasterReinitialization
();
158
void
TagThreadForReinitialization
();
159
void
ForceThreadReinitialization
();
160
void
ForceRebuildingPhysicsTable
();
161
162
//============================================================================
163
// FILE OPERATIONS
164
//============================================================================
170
void
WriteInto
(
const
G4String
&, std::ios_base::openmode mode =
171
std::ios_base::out);
172
void
AddEmptyLineInOutputFile
();
173
177
void
CloseFile
();
178
179
//============================================================================
180
// PUSH MOLECULES
181
//============================================================================
189
void
CreateWaterMolecule
(
ElectronicModification
,
190
G4int
/*electronicLevel*/
,
191
const
G4Track
*
/*pIncomingTrack*/
);
192
197
void
CreateSolvatedElectron
(
const
G4Track
*
/*pIncomingTrack*/
,
198
G4ThreeVector
* pFinalPosition =
nullptr
);
199
200
void
PushMolecule
(std::unique_ptr<G4Molecule> pMolecule,
201
G4double
time
,
202
const
G4ThreeVector
&
position
,
203
G4int
parentID);
204
205
protected
:
206
void
HandleStandaloneInitialization
();
207
void
PushTrack
(
G4Track
*);
208
void
SetGlobalTemperature
(
G4double
temperatureKelvin);
209
210
G4DNAWaterExcitationStructure
*
GetExcitationLevel
();
211
G4DNAWaterIonisationStructure
*
GetIonisationLevel
();
212
void
InitializeFile
();
213
void
InitializeMaster
();
214
void
InitializeThread
();
215
void
InitializeThreadSharedData
();
216
217
G4DNAChemistryManager
();
218
219
private
:
220
std::unique_ptr<G4UIdirectory>
fpChemDNADirectory
;
221
std::unique_ptr<G4UIcmdWithABool>
fpActivateChem
;
222
std::unique_ptr<G4UIcmdWithAnInteger>
fpRunChem
;
223
std::unique_ptr<G4UIcmdWithoutParameter>
fpSkipReactionsFromChemList
;
224
std::unique_ptr<G4UIcmdWithADoubleAndUnit>
fpScaleForNewTemperature
;
225
std::unique_ptr<G4UIcmdWithoutParameter>
fpInitChem
;
226
227
static
G4DNAChemistryManager
*
fgInstance
;
228
G4bool
fActiveChemistry
;
229
230
struct
ThreadLocalData
{
231
ThreadLocalData
();
232
~ThreadLocalData
();
233
std::unique_ptr<G4VPhysChemIO>
fpPhysChemIO
;
234
G4bool
fThreadInitialized
=
false
;
235
};
236
237
static
G4ThreadLocal
ThreadLocalData
*
fpThreadData
;
238
239
G4bool
fMasterInitialized
;
240
G4bool
fForceThreadReinitialization
;
241
242
std::unique_ptr<G4DNAWaterExcitationStructure>
fpExcitationLevel
;
243
std::unique_ptr<G4DNAWaterIonisationStructure>
fpIonisationLevel
;
244
245
std::unique_ptr<G4VUserChemistryList>
fpUserChemistryList
;
246
G4bool
fOwnChemistryList
;
247
G4bool
fUseInStandalone
;
248
G4bool
fPhysicsTableBuilt
;
249
G4bool
fSkipReactions
;
250
251
G4bool
fGeometryClosed
;
252
253
G4int
fVerbose
;
254
G4bool
fResetCounterWhenRunEnds
;
255
};
geant4
tree
geant4-10.6-release
source
processes
electromagnetic
dna
utils
include
G4DNAChemistryManager.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:30
using
1.8.2 with
ECCE GitHub integration