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
G4DNAMolecularReactionTable.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4DNAMolecularReactionTable.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
// Author: Mathieu Karamitros
28
29
// The code is developed in the framework of the ESA AO7146
30
//
31
// We would be very happy hearing from you, send us your feedback! :)
32
//
33
// In order for Geant4-DNA to be maintained and still open-source,
34
// article citations are crucial.
35
// If you use Geant4-DNA chemistry and you publish papers about your software,
36
// in addition to the general paper on Geant4-DNA:
37
//
38
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
39
//
40
// we would be very happy if you could please also cite the following
41
// reference papers on chemistry:
42
//
43
// J. Comput. Phys. 274 (2014) 841-882
44
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
45
46
#pragma once
47
48
#include "
G4ITReactionTable.hh
"
49
#include "
G4MolecularConfiguration.hh
"
50
#include "
G4ReferenceCast.hh
"
51
#include <vector>
52
#include <map>
53
#include <functional>
54
#include <memory>
55
56
class
G4VDNAReactionModel
;
57
class
G4DNAMolecularReactionTable
;
58
class
G4ReactionTableMessenger
;
59
64
class
G4DNAMolecularReactionData
65
{
66
public
:
67
//----------------------------------------------------------------------------
68
69
G4DNAMolecularReactionData
(
G4double
reactionRate,
70
const
G4MolecularConfiguration
* reactive1,
71
const
G4MolecularConfiguration
* reactive2);
72
73
G4DNAMolecularReactionData
(
G4double
reactionRate,
74
const
G4String
& reactive1,
75
const
G4String
& reactive2);
76
~G4DNAMolecularReactionData
();
77
78
using
Reactant
=
const
G4MolecularConfiguration
;
79
using
ReactantPair
= std::pair<Reactant*, Reactant*>;
80
using
ReactionProducts
= std::vector<Reactant*>;
81
82
int
GetReactionID
()
const
;
83
void
SetReactionID
(
int
ID);
84
85
ReactantPair
GetReactants
();
86
87
Reactant
*
GetReactant1
()
const
;
88
Reactant
*
GetReactant2
()
const
;
89
90
void
SetObservedReactionRateConstant
(
G4double
rate);
91
G4double
GetObservedReactionRateConstant
()
const
;
92
93
G4double
GetEffectiveReactionRadius
()
const
;
94
void
SetEffectiveReactionRadius
(
G4double
radius
);
95
96
void
SetReactant1
(
Reactant
* reactive);
97
void
SetReactant2
(
Reactant
* reactive);
98
99
void
SetReactants
(
Reactant
* reactive1,
100
Reactant
* reactive2);
101
102
void
AddProduct
(
Reactant
*
molecule
);
103
104
void
SetReactant1
(
const
G4String
& reactive);
105
void
SetReactant2
(
const
G4String
& reactive);
106
void
SetReactants
(
const
G4String
& reactive1,
const
G4String
& reactive2);
107
void
AddProduct
(
const
G4String
&
molecule
);
108
109
G4int
GetNbProducts
()
const
;
110
Reactant
*
GetProduct
(
G4int
i)
const
;
111
112
const
ReactionProducts
*
GetProducts
()
const
;
113
void
RemoveProducts
();
114
115
//----------------------------------------------------------------------------
116
// Temperature scaling
117
typedef
std::function<double(double)>
RateParam
;
118
119
static
double
PolynomialParam
(
double
temp_K, std::vector<double>
P
);
120
static
double
ArrehniusParam
(
double
temp_K, std::vector<double>
P
);
121
static
double
ScaledParameterization
(
double
temp_K,
122
double
temp_init,
123
double
rateCste_init);
124
125
void
SetPolynomialParameterization
(
const
std::vector<double>&
P
);
126
127
void
SetArrehniusParameterization
(
double
A0,
double
E_R);
128
void
SetScaledParameterization
(
double
temperature_K,
129
double
rateCste);
130
131
void
ScaleForNewTemperature
(
double
temp_K);
132
133
private
:
134
void
ComputeEffectiveRadius
();
135
136
protected
:
137
G4DNAMolecularReactionData
();
138
Reactant
*
fpReactant1
;
139
Reactant
*
fpReactant2
;
140
G4double
fObservedReactionRate
;
141
G4double
fEffectiveReactionRadius
;
142
143
ReactionProducts
fProducts
;
144
RateParam
fRateParam
;
145
int
fReactionID
;
146
};
147
152
class
G4DNAMolecularReactionTable
:
public
G4ITReactionTable
153
{
154
protected
:
155
G4DNAMolecularReactionTable
();
156
static
G4DNAMolecularReactionTable
*
fpInstance
;
157
158
public
:
159
static
G4DNAMolecularReactionTable
*
GetReactionTable
();
160
static
G4DNAMolecularReactionTable
*
Instance
();
161
static
void
DeleteInstance
();
162
virtual
~G4DNAMolecularReactionTable
();
163
164
using
Reactant
=
const
G4MolecularConfiguration
;
165
using
Data
=
const
G4DNAMolecularReactionData
;
166
using
ReactantList
= std::vector<Reactant*>;
167
using
DataList
= std::vector<Data*>;
168
using
SpecificDataList
= std::map<Reactant*, Data*>;
169
170
using
ReactionDataMap
= std::map<Reactant*, SpecificDataList>;
171
using
ReactivesMV
= std::map<Reactant*, ReactantList>;
172
using
ReactionDataMV
= std::map<Reactant*, DataList>;
173
183
void
SetReaction
(
G4double
observedReactionRate,
184
Reactant
* reactive1,
185
Reactant
* reactive2);
186
187
void
SetReaction
(
G4DNAMolecularReactionData
*);
188
189
Data
*
GetReactionData
(
Reactant
*,
Reactant
*)
const
;
190
191
Data
*
GetReactionData
(
const
G4String
&,
const
G4String
&)
const
;
192
193
Data
*
GetReaction
(
int
reactionID)
const
;
194
195
size_t
GetNReactions
()
const
;
196
197
//_________________________________________________________________
201
const
ReactantList
*
CanReactWith
(
Reactant
*)
const
;
202
203
const
SpecificDataList
*
GetReativesNData
(
const
G4MolecularConfiguration
*)
const
;
204
205
const
DataList
*
GetReactionData
(
const
G4MolecularConfiguration
*)
const
;
206
207
const
ReactionDataMap
&
GetAllReactionData
();
208
209
DataList
GetVectorOfReactionData
();
210
211
void
ScaleReactionRateForNewTemperature
(
double
temp_K);
212
213
//_________________________________________________________________
214
void
PrintTable
(
G4VDNAReactionModel
* = 0);
215
216
protected
:
217
G4bool
fVerbose
;
218
219
ReactionDataMap
fReactionData
;
220
ReactivesMV
fReactantsMV
;
221
ReactionDataMV
fReactionDataMV
;
222
std::vector<std::unique_ptr<Data>>
fVectorOfReactionData
;
223
std::unique_ptr<G4ReactionTableMessenger>
fpMessenger
;
224
};
geant4
tree
geant4-10.6-release
source
processes
electromagnetic
dna
utils
include
G4DNAMolecularReactionTable.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:30
using
1.8.2 with
ECCE GitHub integration