G4GeometryCellStep.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // ----------------------------------------------------------------------
00030 // Class G4GeometryCellStep
00031 //
00032 // Class description:
00033 //
00034 // This class serves to address the "cell" a track previously 
00035 // touched and a "cell" a track is currently in. It is used 
00036 // for scoring and importance sampling in the "mass" geometry as well 
00037 // as in a "parallel" geometry. 
00038 // The "cell" information is available with the GetPreGeometryCell and 
00039 // the GetPostGeometryCell functions.
00040 // The GetCrossBoundary finction returns true in case the step
00041 // crosses a boundary in the geometry this G4GeometryCellStep 
00042 // refers to.
00043 
00044 // Author: Michael Dressel (Michael.Dressel@cern.ch)
00045 // ----------------------------------------------------------------------
00046 #ifndef G4GeometryCellStep_hh
00047 #define G4GeometryCellStep_hh G4GeometryCellStep_hh
00048 
00049 #include "G4GeometryCell.hh"
00050 
00051 class G4GeometryCellStep
00052 {
00053 public: // with description
00054   G4GeometryCellStep(const G4GeometryCell &preCell, 
00055           const G4GeometryCell &postCell);
00056     // initialise pre and post G4GeometryCell 
00057 
00058   ~G4GeometryCellStep();
00059 
00060   const G4GeometryCell &GetPreGeometryCell() const; 
00061     // addressing the  "cell" the track previously touched 
00062 
00063   const G4GeometryCell &GetPostGeometryCell() const; 
00064     // addressing the current "cell"  
00065 
00066   G4bool GetCrossBoundary() const; 
00067     // returns true if step crosses boundary of the geometry it refers to
00068 
00069   // the following functions are used by the scoring and importance
00070   // system to set the cell information.
00071   void SetPreGeometryCell(const G4GeometryCell &preCell); 
00072     
00073   void SetPostGeometryCell(const G4GeometryCell &postCell);
00074   
00075   void SetCrossBoundary(G4bool b);
00076 
00077 private:
00078   G4GeometryCell fPreGeometryCell;
00079   G4GeometryCell fPostGeometryCell;  
00080   G4bool fCrossBoundary;
00081 
00082 };
00083 
00084 
00085 
00086 inline void G4GeometryCellStep::SetPreGeometryCell(const G4GeometryCell &preCell) 
00087 {
00088   fPreGeometryCell = preCell;
00089 }
00090 
00091 inline void G4GeometryCellStep::SetPostGeometryCell(const G4GeometryCell &postCell)  
00092 {
00093   fPostGeometryCell = postCell;
00094 }
00095   
00096 inline void G4GeometryCellStep::SetCrossBoundary(G4bool b) 
00097 {
00098   fCrossBoundary = b;
00099 }
00100 
00101 inline const G4GeometryCell &G4GeometryCellStep::GetPreGeometryCell() const 
00102 {
00103   return fPreGeometryCell;
00104 }
00105 
00106 inline const G4GeometryCell &G4GeometryCellStep::GetPostGeometryCell() const 
00107 {
00108   return fPostGeometryCell;
00109 }
00110   
00111 inline G4bool G4GeometryCellStep::GetCrossBoundary() const 
00112 {
00113   return fCrossBoundary;
00114 }
00115 
00116 
00117 #endif

Generated on Mon May 27 17:48:22 2013 for Geant4 by  doxygen 1.4.7