G4IVContinuousDiscreteProcess.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 // $Id: 
00030 // ------------------------------------------------------------
00031 //      GEANT 4 class header file 
00032 //
00033 // 
00034 // Class Description 
00035 //  Abstract class which defines the public behavior of
00036 //  discrete physics interactions using integral approach
00037 //
00038 // ------------------------------------------------------------
00039 //   New Physics scheme            8  Mar. 1997  H.Kurahige
00040 // ------------------------------------------------------------
00041 //   modified                     26 Mar. 1997 H.Kurashige
00042 //   modified                     16 Apr. 1997 L.Urban     
00043 //   modified AlongStepGPIL etc.  17 Dec. 1997 H.Kurashige
00044 //   fix bugs in GetGPILSelection() 24 Jan. 1998 H.Kurashige
00045 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
00046 
00047 #ifndef G4IVContinuousDiscreteProcess_h
00048 #define G4IVContinuousDiscreteProcess_h 1
00049 
00050 #include <CLHEP/Units/SystemOfUnits.h>
00051 
00052 #include "globals.hh"
00053 #include "G4ios.hh"
00054 
00055 #include "G4VProcess.hh"
00056 #include "G4Track.hh"
00057 #include "G4Step.hh"
00058 #include "G4MaterialTable.hh"
00059 
00060 class G4IVContinuousDiscreteProcess : public G4VProcess 
00061 {
00062   //  Abstract class which defines the public behavior of
00063   //  discrete physics interactions.
00064   public:     
00065 
00066       G4IVContinuousDiscreteProcess(const G4String& ,
00067                                    G4ProcessType   aType = fNotDefined );
00068       G4IVContinuousDiscreteProcess(G4IVContinuousDiscreteProcess &);
00069 
00070       virtual ~G4IVContinuousDiscreteProcess();
00071 
00072   public:   //  with description
00073      virtual G4double PostStepGetPhysicalInteractionLength(
00074                              const G4Track& track,
00075                              G4double   previousStepSize,
00076                              G4ForceCondition* condition
00077                             );
00078 
00079       virtual G4VParticleChange* PostStepDoIt(
00080                              const G4Track& ,
00081                              const G4Step& 
00082                             );
00083 
00084       virtual G4double AlongStepGetPhysicalInteractionLength(
00085                              const G4Track&,
00086                              G4double  previousStepSize,
00087                              G4double  currentMinimumStep,
00088                              G4double& currentSafety,
00089                              G4GPILSelection* selection
00090                             )  ;
00091 
00092       virtual G4VParticleChange* AlongStepDoIt(
00093                              const G4Track& ,
00094                              const G4Step& 
00095                             );
00096  
00097      //  no operation in  AtRestDoIt
00098       virtual G4double AtRestGetPhysicalInteractionLength(
00099                              const G4Track& ,
00100                              G4ForceCondition* 
00101                             ) { return -1.0; };
00102 
00103      //  no operation in  AtRestDoIt
00104       virtual G4VParticleChange* AtRestDoIt(
00105                              const G4Track& ,
00106                              const G4Step&
00107                             ) {return 0;};
00108 
00109   protected: //  with description
00110     virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
00111                              G4double  previousStepSize,
00112                              G4double  currentMinimumStep,
00113                              G4double& currentSafety
00114                                                              )=0;
00115   private:
00116     // this is the returnd value of  G4GPILSelection in 
00117     // the arguments of AlongStepGPIL()
00118     G4GPILSelection  valueGPILSelection;
00119 
00120   protected: //  with description
00121     //------------------------------------------------------
00122     virtual void SubtractNumberOfInteractionLengthLeft(
00123                                    G4double previousStepSize) ;  
00124 
00125     // these two methods are set/get methods for valueGPILSelection
00126     void SetGPILSelection(G4GPILSelection selection)
00127     { valueGPILSelection = selection;};
00128 
00129     G4GPILSelection GetGPILSelection() const{return valueGPILSelection;};
00130 
00131    private:
00132   // hide default constructor and assignment operator as private 
00133       G4IVContinuousDiscreteProcess();
00134       G4IVContinuousDiscreteProcess & operator=(const G4IVContinuousDiscreteProcess &right);
00135 
00136    protected:
00137       G4PhysicsTable* theNlambdaTable ; 
00138       G4PhysicsTable* theInverseNlambdaTable ; 
00139       const G4double BIGSTEP ;
00140 };
00141 
00142 // -----------------------------------------
00143 //  inlined function members implementation
00144 // -----------------------------------------
00145 
00146 inline void G4IVContinuousDiscreteProcess::
00147                              SubtractNumberOfInteractionLengthLeft(
00148                              G4double 
00149                             )
00150 {
00151  // dummy routine
00152   ;
00153 }  
00154 
00155 
00156 inline G4VParticleChange* G4IVContinuousDiscreteProcess::PostStepDoIt(
00157                              const G4Track& ,
00158                              const G4Step&
00159                             )
00160 { 
00161 //  clear  NumberOfInteractionLengthLeft
00162     ClearNumberOfInteractionLengthLeft();
00163     return pParticleChange;
00164 }
00165 
00166 inline G4VParticleChange* G4IVContinuousDiscreteProcess::AlongStepDoIt(
00167                              const G4Track& ,
00168                              const G4Step&
00169                             )
00170 { 
00171 //  clear  NumberOfInteractionLengthLeft
00172     ClearNumberOfInteractionLengthLeft();
00173     return pParticleChange;
00174 }
00175 
00176 inline G4double G4IVContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
00177                              const G4Track& track,
00178                              G4double previousStepSize,
00179                              G4double currentMinimumStep,
00180                              G4double& currentSafety,
00181                              G4GPILSelection* selection
00182                             )
00183 {
00184   // GPILSelection is set to defaule value of CandidateForSelection
00185   valueGPILSelection = CandidateForSelection;
00186 
00187   // get Step limit proposed by the process
00188   G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
00189 
00190   // set return value for G4GPILSelection
00191   *selection = valueGPILSelection;
00192 
00193   if (verboseLevel>1){
00194     G4cout << "G4IVContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
00195     G4cout << "[ " << GetProcessName() << "]" <<G4endl;
00196     track.GetDynamicParticle()->DumpInfo();
00197     G4cout << " in Material  " <<  track.GetMaterial()->GetName() <<G4endl;
00198     G4cout << "IntractionLength= " << steplength/CLHEP::cm <<"[cm] " <<G4endl;
00199   }
00200   return  steplength ;
00201 }
00202 
00203 #endif

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