Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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
47class G4Material;
48#include "G4ProductionCuts.hh"
49
51{
52 public: // with description
53 // constructor
56
57 // copy constructor
59
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
78 // Set pointer to production cuts
79
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
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"
106inline
108{ indexNumber = idx; }
109
110inline
112{ return indexNumber; }
113
114inline
116{ isUsedInGeometry = flg; }
117
118inline
120{ return isUsedInGeometry; }
121
122inline
124{ fCuts = aCut; }
125
126inline
128{ return fCuts; }
129
130inline
132{
133 return (this == &right);
134}
135
136inline
138{
139 return (this != &right);
140}
141
142inline
144{
145 fMaterial = material;
146 isMaterialModified = true;
147}
148
149inline
151{
152 return fMaterial;
153}
154
155inline
157{
158 G4bool isCutModified = false;
159 if (fCuts !=0 ) isCutModified = fCuts->IsModified();
160 return (isMaterialModified || isCutModified);
161}
162
163inline
165{
166 if (fCuts !=0 ) fCuts->PhysicsTableUpdated();
167 isMaterialModified = false;
168}
169
170
171#endif
172
173
174
175
176
177
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
void SetProductionCuts(G4ProductionCuts *)
G4MaterialCutsCouple & operator=(const G4MaterialCutsCouple &right)
G4int operator==(const G4MaterialCutsCouple &right) const
const G4Material * GetMaterial() const
void SetUseFlag(G4bool flg=true)
G4int operator!=(const G4MaterialCutsCouple &right) const
void SetMaterial(const G4Material *)
G4ProductionCuts * GetProductionCuts() const
G4bool IsModified() const