Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
cuts
include
G4MaterialCutsCouple.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
// $Id$
28
//
29
//
30
// ------------------------------------------------------------
31
// GEANT 4 class header file
32
//
33
//
34
// Class Description
35
// This class is
36
//
37
// ------------------------------------------------------------
38
// First Implementation 17 Sep. 2002 H.Kurahige
39
// ------------------------------------------------------------
40
41
#ifndef G4MaterialCutsCouple_h
42
#define G4MaterialCutsCouple_h 1
43
44
#include "
globals.hh
"
45
#include "
G4ios.hh
"
46
47
class
G4Material
;
48
#include "
G4ProductionCuts.hh
"
49
50
class
G4MaterialCutsCouple
51
{
52
public
:
// with description
53
// constructor
54
G4MaterialCutsCouple
();
55
G4MaterialCutsCouple
(
const
G4Material
*,
G4ProductionCuts
* cut=0);
56
57
// copy constructor
58
G4MaterialCutsCouple
(
const
G4MaterialCutsCouple
&
right
);
59
60
G4MaterialCutsCouple
&
operator=
(
const
G4MaterialCutsCouple
&right);
61
62
public
:
63
// destructor
64
virtual
~G4MaterialCutsCouple
();
65
66
// equal opperators
67
G4int
operator==
(
const
G4MaterialCutsCouple
&right)
const
;
68
G4int
operator!=
(
const
G4MaterialCutsCouple
&right)
const
;
69
70
public
:
// with description
71
void
SetMaterial
(
const
G4Material
*);
72
// Set pointer to material
73
74
const
G4Material
*
GetMaterial
()
const
;
75
// Get pointer to material
76
77
void
SetProductionCuts
(
G4ProductionCuts
*);
78
// Set pointer to production cuts
79
80
G4ProductionCuts
*
GetProductionCuts
()
const
;
81
// Get pointer to production cuts
82
83
G4bool
IsRecalcNeeded
()
const
;
84
// return true if cut and/or material has been modified
85
// after last calculation of PhysicsTable
86
87
void
PhysicsTableUpdated
();
88
// inform end of calculation of PhysicsTable
89
90
void
SetIndex
(
G4int
idx);
91
G4int
GetIndex
()
const
;
92
// Set/Get the index number in G4ProductionCutsTable
93
94
void
SetUseFlag
(
G4bool
flg=
true
);
95
G4bool
IsUsed
()
const
;
96
97
private
:
98
G4bool
isMaterialModified;
99
const
G4Material
* fMaterial;
100
G4ProductionCuts
* fCuts;
101
G4int
indexNumber;
102
G4bool
isUsedInGeometry;
103
};
104
105
#include "
G4ProductionCuts.hh
"
106
inline
107
void
G4MaterialCutsCouple::SetIndex
(
G4int
idx)
108
{ indexNumber = idx; }
109
110
inline
111
G4int
G4MaterialCutsCouple::GetIndex
()
const
112
{
return
indexNumber; }
113
114
inline
115
void
G4MaterialCutsCouple::SetUseFlag
(
G4bool
flg)
116
{ isUsedInGeometry = flg; }
117
118
inline
119
G4bool
G4MaterialCutsCouple::IsUsed
()
const
120
{
return
isUsedInGeometry; }
121
122
inline
123
void
G4MaterialCutsCouple::SetProductionCuts
(
G4ProductionCuts
* aCut)
124
{ fCuts = aCut; }
125
126
inline
127
G4ProductionCuts
*
G4MaterialCutsCouple::GetProductionCuts
()
const
128
{
return
fCuts; }
129
130
inline
131
G4int
G4MaterialCutsCouple::operator==
(
const
G4MaterialCutsCouple
&
right
)
const
132
{
133
return
(
this
== &right);
134
}
135
136
inline
137
G4int
G4MaterialCutsCouple::operator!=
(
const
G4MaterialCutsCouple
&
right
)
const
138
{
139
return
(
this
!= &right);
140
}
141
142
inline
143
void
G4MaterialCutsCouple::SetMaterial
(
const
G4Material
*
material
)
144
{
145
fMaterial =
material
;
146
isMaterialModified =
true
;
147
}
148
149
inline
150
const
G4Material
*
G4MaterialCutsCouple::GetMaterial
()
const
151
{
152
return
fMaterial;
153
}
154
155
inline
156
G4bool
G4MaterialCutsCouple::IsRecalcNeeded
()
const
157
{
158
G4bool
isCutModified =
false
;
159
if
(fCuts !=0 ) isCutModified = fCuts->
IsModified
();
160
return
(isMaterialModified || isCutModified);
161
}
162
163
inline
164
void
G4MaterialCutsCouple::PhysicsTableUpdated
()
165
{
166
if
(fCuts !=0 ) fCuts->
PhysicsTableUpdated
();
167
isMaterialModified =
false
;
168
}
169
170
171
#endif
172
173
174
175
176
177
Generated on Sat May 25 2013 14:33:29 for Geant4 by
1.8.4