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