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: G4FastSimulationManagerProcess.hh 69889 2013-05-17 08:32:02Z gcosmo $ 00028 // 00029 // 00030 //--------------------------------------------------------------- 00031 // 00032 // G4FastSimulationManagerProcess.hh 00033 // 00034 // Description: 00035 // The process that triggers parameterised simulations if any. 00036 // 00037 // History: 00038 // Feb 98: Parallel geometry sensitivity. MoraDeFreitas. 00039 // Oct 97: "Fast" replaces "Parameterisation" in class/method names. 00040 // (release B.00 for parameterisation). MoraDeFreitas. 00041 // Aug 97: First implementation. Verderi && MoraDeFreitas. 00042 // Apr 98: modified for new particle change. H.Kurashige 00043 // Oct 06: Move to parallel geometry scheme. M. Verderi 00044 // Nov 06: name xxx81 is given for this release. "81" will be 00045 // removed @ next maj. rel. so that this process becomes 00046 // the standard one. 00047 // May 07: remove "81" tags, to migrate to 9.0. 00048 // 00049 //--------------------------------------------------------------- 00050 00051 00052 #ifndef G4FastSimulationManagerProcess_hh 00053 #define G4FastSimulationManagerProcess_hh 00054 00055 #include "globals.hh" 00056 #include "G4VProcess.hh" 00057 #include "G4FastSimulationManager.hh" 00058 #include "G4FastSimulationProcessType.hh" 00059 #include "G4Step.hh" 00060 #include "G4Navigator.hh" 00061 #include "G4VPhysicalVolume.hh" 00062 #include "G4VParticleChange.hh" 00063 #include "G4FieldTrack.hh" 00064 class G4PathFinder; 00065 class G4TransportationManager; 00066 00067 // --------------------------------------------------------------------- 00068 // 00069 // G4FastSimulationManagerProcess class 00070 // 00071 // --------------------------------------------------------------------- 00072 00073 00074 // Class Description: 00075 // -- G4VProcess providing the interface between the tracking and the fast simulation. 00076 // 00077 00078 class G4FastSimulationManagerProcess : public G4VProcess 00079 { 00080 public: 00081 00082 // ------------------------- 00083 // Constructor/Destructor: 00084 // ------------------------- 00085 // -- Constructor for parameterisation in mass geometry 00086 G4FastSimulationManagerProcess(const G4String& processName = "G4FastSimulationManagerProcess", 00087 G4ProcessType theType = fParameterisation); 00088 00089 // -- Contructors for parameterisation attached a parallel geometry. 00090 // -- Can also be used for the mass geometry, providing world volume name. 00091 // -- World volume specified by name or pointer. 00092 G4FastSimulationManagerProcess(const G4String& processName, 00093 const G4String& worldVolumeName, 00094 G4ProcessType theType = fParameterisation); 00095 G4FastSimulationManagerProcess(const G4String& processName, 00096 G4VPhysicalVolume* worldVolume, 00097 G4ProcessType theType = fParameterisation); 00098 00099 virtual ~G4FastSimulationManagerProcess(); 00100 00101 // ----------------------- 00102 // User access methods: 00103 // ----------------------- 00104 G4VPhysicalVolume* GetWorldVolume() const {return fWorldVolume;} 00105 00106 // -- Set new world volume to the process 00107 void SetWorldVolume(G4String ); 00108 void SetWorldVolume(G4VPhysicalVolume*); 00109 00110 00111 // -------------------------------------------------------------- 00112 // Process interface 00113 // -------------------------------------------------------------- 00114 00115 // -- Start/End tracking: 00116 void StartTracking(G4Track*); 00117 void EndTracking(); 00118 00119 00120 // -- PostStep methods: 00121 G4double PostStepGetPhysicalInteractionLength(const G4Track& track, 00122 G4double previousStepSize, 00123 G4ForceCondition* condition); 00124 00125 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& ); 00126 00127 // -- Responsible for limiting the step on ghost boundaries: 00128 G4double AlongStepGetPhysicalInteractionLength(const G4Track& track, 00129 G4double previousStepSize, 00130 G4double currentMinimumStep, 00131 G4double& proposedSafety, 00132 G4GPILSelection* selection); 00133 G4VParticleChange* AlongStepDoIt(const G4Track& track, 00134 const G4Step& step); 00135 00136 00137 00138 // -- AtRest methods (still there after many years of no use...): 00139 G4double AtRestGetPhysicalInteractionLength(const G4Track&, 00140 G4ForceCondition*); 00141 00142 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); 00143 00144 00145 00146 00147 00148 // -- debug: 00149 void Verbose() const; 00150 00151 00152 private: 00153 //-- would be better to my taste to have "const G4VPhysicalVolume* fWorldVolume;", but clashes at compilation 00154 G4VPhysicalVolume* fWorldVolume; 00155 00156 G4bool fIsTrackingTime; 00157 G4bool fIsFirstStep; 00158 G4Navigator* fGhostNavigator; 00159 G4int fGhostNavigatorIndex; 00160 G4bool fIsGhostGeometry; 00161 G4double fGhostSafety; 00162 G4FieldTrack fFieldTrack; 00163 00164 00165 G4FastSimulationManager* fFastSimulationManager; 00166 G4bool fFastSimulationTrigger; 00167 G4VParticleChange fDummyParticleChange; 00168 G4PathFinder* fPathFinder; 00169 G4TransportationManager* fTransportationManager; 00170 }; 00171 00172 #endif