Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: G4MaterialCutsCouple.hh 70369 2013-05-29 14:59:24Z gcosmo $
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 
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 
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
108 { indexNumber = idx; }
109 
110 inline
112 { return indexNumber; }
113 
114 inline
116 { isUsedInGeometry = flg; }
117 
118 inline
120 { return isUsedInGeometry; }
121 
122 inline
124 { fCuts = aCut; }
125 
126 inline
128 { return fCuts; }
129 
130 inline
132 {
133  return (this == &right);
134 }
135 
136 inline
138 {
139  return (this != &right);
140 }
141 
142 inline
144 {
145  fMaterial = material;
146  isMaterialModified = true;
147 }
148 
149 inline
151 {
152  return fMaterial;
153 }
154 
155 inline
157 {
158  G4bool isCutModified = false;
159  if (fCuts !=0 ) isCutModified = fCuts->IsModified();
160  return (isMaterialModified || isCutModified);
161 }
162 
163 inline
165 {
166  if (fCuts !=0 ) fCuts->PhysicsTableUpdated();
167  isMaterialModified = false;
168 }
169 
170 
171 #endif
172 
173 
174 
175 
176 
177 
G4bool IsRecalcNeeded() const
G4bool IsModified() const
G4int operator!=(const G4MaterialCutsCouple &right) const
int G4int
Definition: G4Types.hh:78
string material
Definition: eplot.py:19
void SetProductionCuts(G4ProductionCuts *)
bool G4bool
Definition: G4Types.hh:79
G4MaterialCutsCouple & operator=(const G4MaterialCutsCouple &right)
void SetUseFlag(G4bool flg=true)
G4int operator==(const G4MaterialCutsCouple &right) const
G4ProductionCuts * GetProductionCuts() const
const G4Material * GetMaterial() const
void SetMaterial(const G4Material *)