G4EnergySplitter.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 #ifndef G4EnergySplitter_h
00027 #define G4EnergySplitter_h 1
00028 
00030 // (Description)
00031 // 
00032 // Class to calculate the split of energy in voxels when G4RegularNavigation is used
00033 // It takes into account energy loss and multiple scattering corrections as the particles loses energies from voxel to voxel
00034 //
00035 // Created: 2010-11-09 Pedro Arce
00036 // 
00038 #include "globals.hh"
00039 class G4PhantomParameterisation;
00040 class G4EnergyLossForExtrapolator;
00041 class G4VPhysicalVolume;
00042 class G4Material;
00043 class G4Step;
00044 #include <vector>
00045 
00046 class G4EnergySplitter 
00047 {
00048 public: // with description
00049   G4EnergySplitter();
00050   virtual ~G4EnergySplitter();
00051   
00052   G4int SplitEnergyInVolumes(const G4Step* aStep );    // Calculates the energy spliting, and dumps it into theEnergies. Returns number of steps
00053 
00054   void GetLastVoxelID( G4int& voxelID);
00055   void GetFirstVoxelID( G4int& voxelID);
00056   void GetVoxelID( G4int stepNo, G4int& voxelID );
00057   inline void GetVoxelIDAndLength( G4int stepNo, G4int& voxelID, G4double& stepLength ); 
00058   inline void GetLengthAndEnergyDeposited( G4int stepNo, G4int& voxelID, G4double& stepLength, G4double &energyLoss);
00059   inline void GetLengthAndInitialEnergy( G4double &preStepEnergy, G4int stepNo, G4int& voxelID, G4double& stepLength, G4double &initialEnergy);
00060 
00061   inline void SetNIterations( G4int niter );
00062 
00063   inline G4Material* GetVoxelMaterial( G4int stepNo );
00064 
00065 private:
00066   void GetStepLength( G4int stepNo, G4double& stepLength );
00067 
00068   void GetPhantomParam(G4bool mustExist);
00069   G4bool IsPhantomVolume( G4VPhysicalVolume* pv );
00070 
00071   G4EnergyLossForExtrapolator* theElossExt;
00072   
00073   G4int theNIterations;
00074 
00075   std::vector<G4double> theEnergies;
00076 
00077   G4PhantomParameterisation* thePhantomParam;
00078 
00079 };
00080 
00081 #include "G4EnergySplitter.icc"
00082 
00083 #endif

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