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: G4GeometryCellStep.hh,v 1.2 2006/06/29 18:15:57 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
29 | // |
---|
30 | // ---------------------------------------------------------------------- |
---|
31 | // Class G4GeometryCellStep |
---|
32 | // |
---|
33 | // Class description: |
---|
34 | // |
---|
35 | // This class serves to address the "cell" a track previously |
---|
36 | // touched and a "cell" a track is currently in. It is used |
---|
37 | // for scoring and importance sampling in the "mass" geometry as well |
---|
38 | // as in a "parallel" geometry. |
---|
39 | // The "cell" information is available with the GetPreGeometryCell and |
---|
40 | // the GetPostGeometryCell functions. |
---|
41 | // The GetCrossBoundary finction returns true in case the step |
---|
42 | // crosses a boundary in the geometry this G4GeometryCellStep |
---|
43 | // refers to. |
---|
44 | |
---|
45 | // Author: Michael Dressel (Michael.Dressel@cern.ch) |
---|
46 | // ---------------------------------------------------------------------- |
---|
47 | #ifndef G4GeometryCellStep_hh |
---|
48 | #define G4GeometryCellStep_hh G4GeometryCellStep_hh |
---|
49 | |
---|
50 | #include "G4GeometryCell.hh" |
---|
51 | |
---|
52 | class G4GeometryCellStep |
---|
53 | { |
---|
54 | public: // with description |
---|
55 | G4GeometryCellStep(const G4GeometryCell &preCell, |
---|
56 | const G4GeometryCell &postCell); |
---|
57 | // initialise pre and post G4GeometryCell |
---|
58 | |
---|
59 | ~G4GeometryCellStep(); |
---|
60 | |
---|
61 | const G4GeometryCell &GetPreGeometryCell() const; |
---|
62 | // addressing the "cell" the track previously touched |
---|
63 | |
---|
64 | const G4GeometryCell &GetPostGeometryCell() const; |
---|
65 | // addressing the current "cell" |
---|
66 | |
---|
67 | G4bool GetCrossBoundary() const; |
---|
68 | // returns true if step crosses boundary of the geometry it refers to |
---|
69 | |
---|
70 | // the following functions are used by the scoring and importance |
---|
71 | // system to set the cell information. |
---|
72 | void SetPreGeometryCell(const G4GeometryCell &preCell); |
---|
73 | |
---|
74 | void SetPostGeometryCell(const G4GeometryCell &postCell); |
---|
75 | |
---|
76 | void SetCrossBoundary(G4bool b); |
---|
77 | |
---|
78 | private: |
---|
79 | G4GeometryCell fPreGeometryCell; |
---|
80 | G4GeometryCell fPostGeometryCell; |
---|
81 | G4bool fCrossBoundary; |
---|
82 | |
---|
83 | }; |
---|
84 | |
---|
85 | |
---|
86 | |
---|
87 | inline void G4GeometryCellStep::SetPreGeometryCell(const G4GeometryCell &preCell) |
---|
88 | { |
---|
89 | fPreGeometryCell = preCell; |
---|
90 | } |
---|
91 | |
---|
92 | inline void G4GeometryCellStep::SetPostGeometryCell(const G4GeometryCell &postCell) |
---|
93 | { |
---|
94 | fPostGeometryCell = postCell; |
---|
95 | } |
---|
96 | |
---|
97 | inline void G4GeometryCellStep::SetCrossBoundary(G4bool b) |
---|
98 | { |
---|
99 | fCrossBoundary = b; |
---|
100 | } |
---|
101 | |
---|
102 | inline const G4GeometryCell &G4GeometryCellStep::GetPreGeometryCell() const |
---|
103 | { |
---|
104 | return fPreGeometryCell; |
---|
105 | } |
---|
106 | |
---|
107 | inline const G4GeometryCell &G4GeometryCellStep::GetPostGeometryCell() const |
---|
108 | { |
---|
109 | return fPostGeometryCell; |
---|
110 | } |
---|
111 | |
---|
112 | inline G4bool G4GeometryCellStep::GetCrossBoundary() const |
---|
113 | { |
---|
114 | return fCrossBoundary; |
---|
115 | } |
---|
116 | |
---|
117 | |
---|
118 | #endif |
---|