ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MaterialCutsCouple.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4MaterialCutsCouple.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 //
29 // ------------------------------------------------------------
30 // GEANT 4 class header file
31 //
32 //
33 // Class Description
34 // This class is
35 //
36 // ------------------------------------------------------------
37 // First Implementation 17 Sep. 2002 H.Kurahige
38 // ------------------------------------------------------------
39 
40 #ifndef G4MaterialCutsCouple_h
41 #define G4MaterialCutsCouple_h 1
42 
43 #include "globals.hh"
44 #include "G4ios.hh"
45 
46 class G4Material;
47 #include "G4ProductionCuts.hh"
48 
50 {
51  public: // with description
52  // constructor
55 
56  // copy constructor
58 
60 
61  public:
62  // destructor
63  virtual ~G4MaterialCutsCouple();
64 
65  // equal opperators
66  G4bool operator==(const G4MaterialCutsCouple &right) const;
67  G4bool operator!=(const G4MaterialCutsCouple &right) const;
68 
69  public: // with description
70  void SetMaterial(const G4Material*);
71  // Set pointer to material
72 
73  const G4Material* GetMaterial() const;
74  // Get pointer to material
75 
77  // Set pointer to production cuts
78 
80  // Get pointer to production cuts
81 
82  G4bool IsRecalcNeeded() const;
83  // return true if cut and/or material has been modified
84  // after last calculation of PhysicsTable
85 
86  void PhysicsTableUpdated();
87  // inform end of calculation of PhysicsTable
88 
89  void SetIndex(G4int idx);
90  G4int GetIndex() const;
91  // Set/Get the index number in G4ProductionCutsTable
92 
93  void SetUseFlag(G4bool flg=true);
94  G4bool IsUsed() const;
95 
96  private:
102 };
103 
104 #include "G4ProductionCuts.hh"
105 inline
107 { indexNumber = idx; }
108 
109 inline
111 { return indexNumber; }
112 
113 inline
115 { isUsedInGeometry = flg; }
116 
117 inline
119 { return isUsedInGeometry; }
120 
121 inline
123 { fCuts = aCut; }
124 
125 inline
127 { return fCuts; }
128 
129 inline
131 {
132  return (this == &right);
133 }
134 
135 inline
137 {
138  return (this != &right);
139 }
140 
141 inline
143 {
145  isMaterialModified = true;
146 }
147 
148 inline
150 {
151  return fMaterial;
152 }
153 
154 inline
156 {
157  G4bool isCutModified = false;
158  if (fCuts !=0 ) isCutModified = fCuts->IsModified();
159  return (isMaterialModified || isCutModified);
160 }
161 
162 inline
164 {
165  if (fCuts !=0 ) fCuts->PhysicsTableUpdated();
166  isMaterialModified = false;
167 }
168 
169 
170 #endif
171 
172 
173 
174 
175 
176