G4AdjointCrossSurfChecker.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 // $Id: G4AdjointCrossSurfChecker.hh 67009 2013-01-29 16:00:21Z gcosmo $
00027 //
00029 //      Class Name:     G4AdjointCrossSurfChecker
00030 //      Author:         L. Desorgher
00031 //      Organisation:   SpaceIT GmbH
00032 //      Contract:       ESA contract 21435/08/NL/AT
00033 //      Customer:       ESA/ESTEC
00035 //
00036 // CHANGE HISTORY
00037 // --------------
00038 //      ChangeHistory: 
00039 //              15 January 2007 creation by L. Desorgher 
00040 //              - 01/11/2009 Some cleaning and adding of documentation for the
00041 //                           first Release in the Geant4 toolkit, L. Desorgher                  
00042 //
00043 //-------------------------------------------------------------
00044 //      Documentation:
00045 //              This class is responsible for checking the crossing of a surface
00046 //              that could be the  external boundary of a volume  or the external
00047 //              surface of a sphere.
00048 //              It is used to check if an adjoint particle reaches the external
00049 //              surface or reenter the sensitive region delimited by the adjoint
00050 //              source.   
00051 //
00052 
00053 #ifndef G4AdjointCrossSurfChecker_h
00054 #define G4AdjointCrossSurfChecker_h 1
00055 
00056 #include "globals.hh"
00057 #include "G4ThreeVector.hh"
00058 #include <vector>
00059 
00060 class G4Step;
00061 
00062 
00063 class G4AdjointCrossSurfChecker 
00064 { 
00065  public:
00066   
00067    static G4AdjointCrossSurfChecker* GetInstance();
00068   
00069  public:
00070    
00071    G4bool CrossingASphere(const G4Step* aStep,G4double sphere_radius, G4ThreeVector sphere_center,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00072    G4bool GoingInOrOutOfaVolume(const G4Step* aStep,const G4String& volume_name, G4double& cos_to_surface, G4bool& GoingIn);
00073    G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step* aStep,const G4String& volume_name,const G4String& mother_log_vol_name, G4double& cos_to_surface, G4bool& GoingIn);
00074 
00075    G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,const G4String& surface_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00076    G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep, int ind,G4ThreeVector& crossing_pos,   G4double& cos_to_surface, G4bool& GoingIn);
00077    G4bool CrossingOneOfTheRegisteredSurface(const G4Step* aStep,G4String& surface_name,G4ThreeVector& crossing_pos,G4double& cos_to_surface, G4bool& GoingIn);
00078    G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step* aStep,const G4String& vol1_name,const G4String& vol2_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00079    
00080    G4bool AddaSphericalSurface(const G4String& SurfaceName, G4double radius, G4ThreeVector pos,G4double& area);
00081    G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String& SurfaceName, G4double radius, const G4String& volume_name, G4ThreeVector& center,  G4double& area);
00082    G4bool AddanExtSurfaceOfAvolume(const G4String& SurfaceName,const G4String& volume_name,G4double& area);
00083    G4bool AddanInterfaceBetweenTwoVolumes(const G4String& SurfaceName, const G4String& volume_name1, const G4String& volume_name2,G4double& area);
00084    void ClearListOfSelectedSurface();
00085                        
00086  private: 
00087    
00088    G4AdjointCrossSurfChecker();
00089   ~G4AdjointCrossSurfChecker();
00090    
00091    G4int FindRegisteredSurface(const G4String& name);
00092    
00093  private: 
00094    static G4AdjointCrossSurfChecker* instance;
00095   
00096    std::vector<G4String> ListOfSurfaceName;
00097    std::vector<G4String> ListOfSurfaceType;
00098    std::vector<G4double> ListOfSphereRadius;
00099    std::vector<G4ThreeVector> ListOfSphereCenter;
00100    std::vector<G4String> ListOfVol1Name;
00101    std::vector<G4String> ListOfVol2Name;
00102    std::vector<G4double> AreaOfSurface;
00103 
00104 };
00105 
00106 #endif
00107 

Generated on Mon May 27 17:47:37 2013 for Geant4 by  doxygen 1.4.7