G4ImportanceProcess.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 G4ImportanceProcess
00031 //
00032 // Class description:
00033 //
00034 // Used internally by importance sampling in the "mass" geometry.
00035 // This process is a forced post step process. I will apply
00036 // importance sampling if the particle crosses a boundary in the 
00037 // "mass" geometry.
00038 
00039 // Author: Michael Dressel (Michael.Dressel@cern.ch)
00040 // ----------------------------------------------------------------------
00041 #ifndef G4ImportanceProcess_hh
00042 #define G4ImportanceProcess_hh G4ImportanceProcess_hh
00043 
00044 #include "G4VProcess.hh"
00045 #include "G4VTrackTerminator.hh"
00046 
00047 class G4SamplingPostStepAction;
00048 class G4VImportanceAlgorithm;
00049 class G4VIStore;
00050 
00051 class G4Step;
00052 class G4Navigator;
00053 class G4TransportationManager;
00054 class G4PathFinder;
00055 class G4VTouchable;
00056 
00057 #include "G4FieldTrack.hh"
00058 #include "G4TouchableHandle.hh"
00059 
00060 
00061 class G4ImportanceProcess : public G4VProcess, public G4VTrackTerminator
00062 {
00063 
00064 public:  // with description
00065 
00066   G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
00067                           const G4VIStore &aIstore,
00068                           const G4VTrackTerminator *TrackTerminator,
00069                           const G4String &aName = "ImportanceProcess", G4bool para = false);
00070     // creates a G4ParticleChange
00071 
00072   virtual ~G4ImportanceProcess();
00073     // delete the G4ParticleChange
00074 
00075 
00076   //--------------------------------------------------------------
00077   // Set Paralle World
00078   //--------------------------------------------------------------
00079 
00080   void SetParallelWorld(G4String parallelWorldName);
00081   void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
00082 
00083   //--------------------------------------------------------------
00084   //     Process interface
00085   //--------------------------------------------------------------
00086 
00087   void StartTracking(G4Track*);
00088   
00089 
00090   virtual G4double 
00091   PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
00092                                        G4double   previousStepSize,
00093                                        G4ForceCondition* condition);
00094     // make process beeing forced
00095   virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
00096     // manage the importance sampling in the "mass" geometry
00097 
00098   virtual void KillTrack() const;
00099     // used in case no scoring process follows that does the killing
00100 
00101   virtual const G4String &GetName() const;
00102 
00103 
00104 public:  // without description
00105 
00106   //  no operation in  AtRestDoIt and  AlongStepDoIt
00107 
00108   virtual G4double 
00109   AlongStepGetPhysicalInteractionLength(const G4Track&,
00110                                         G4double  ,
00111                                         G4double  ,
00112                                         G4double& ,
00113                                         G4GPILSelection*);
00114   virtual G4double 
00115   AtRestGetPhysicalInteractionLength(const G4Track& ,
00116                                      G4ForceCondition*);
00117   
00118   virtual G4VParticleChange* 
00119   AtRestDoIt(const G4Track&, const G4Step&);
00120 
00121 
00122   virtual G4VParticleChange* 
00123   AlongStepDoIt(const G4Track&, const G4Step&);
00124   
00125 private:
00126   
00127   G4ImportanceProcess(const G4ImportanceProcess &);
00128   G4ImportanceProcess &operator=(const G4ImportanceProcess &);
00129   
00130 private:
00131 
00132   void CopyStep(const G4Step & step);
00133 
00134   G4Step * fGhostStep;
00135   G4StepPoint * fGhostPreStepPoint;
00136   G4StepPoint * fGhostPostStepPoint;
00137 
00138   G4ParticleChange *fParticleChange;
00139   const G4VImportanceAlgorithm &fImportanceAlgorithm;
00140   const G4VIStore &fIStore;
00141   G4SamplingPostStepAction *fPostStepAction;
00142 
00143   G4TransportationManager* fTransportationManager;
00144   G4PathFinder*        fPathFinder;
00145 
00146   // -------------------------------
00147   // Navigation in the Ghost World:
00148   // -------------------------------
00149   G4String             fGhostWorldName;
00150   G4VPhysicalVolume*   fGhostWorld;
00151   G4Navigator*         fGhostNavigator;
00152   G4int                fNavigatorID;
00153   G4TouchableHandle    fOldGhostTouchable;
00154   G4TouchableHandle    fNewGhostTouchable;
00155   G4FieldTrack         fFieldTrack;
00156   G4double             fGhostSafety;
00157   G4bool               fOnBoundary;
00158 
00159   G4bool               paraflag;
00160 
00161 };
00162 
00163 #endif

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