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$ 00027 // 00028 //--------------------------------------------------------------------- 00029 // 00030 // GEANT4 Class header file 00031 // 00032 // File name: G4HadronStoppingProcess 00033 // 00034 // Author V.Ivanchenko 21 April 2012 on base of G4MuonMinusCaptureAtRest 00035 // 00036 // 00037 // Class Description: 00038 // 00039 // Base process class for nuclear capture of negatively charged particles 00040 // 00041 // Modifications: 00042 // 20120928 M. Kelsey -- Add GetMeanLifeTime() here, instead of in base. 00043 // 20121004 K. Genser -- defined two argument constructor with defaults 00044 // 20121016 K. Genser -- Reverting to use one argument c'tor 00045 // 00046 //------------------------------------------------------------------------ 00047 00048 #ifndef G4HadronStoppingProcess_h 00049 #define G4HadronStoppingProcess_h 1 00050 00051 #include "globals.hh" 00052 #include "G4HadronicProcess.hh" 00053 #include "G4ParticleDefinition.hh" 00054 #include "G4ElementSelector.hh" 00055 #include "G4HadronicInteraction.hh" 00056 #include "G4Track.hh" 00057 #include "G4Step.hh" 00058 #include "G4ForceCondition.hh" 00059 #include "G4HadronicProcessType.hh" 00060 #include "G4HadFinalState.hh" 00061 00062 class G4HadronStoppingProcess : public G4HadronicProcess 00063 { 00064 public: 00065 00066 explicit G4HadronStoppingProcess(const G4String& name = "hadronCaptureAtRest"); 00067 00068 virtual ~G4HadronStoppingProcess(); 00069 00070 virtual G4bool IsApplicable(const G4ParticleDefinition&); 00071 00072 virtual void PreparePhysicsTable(const G4ParticleDefinition&); 00073 00074 virtual void BuildPhysicsTable(const G4ParticleDefinition&); 00075 00076 virtual G4double 00077 AtRestGetPhysicalInteractionLength(const G4Track& track, 00078 G4ForceCondition* condition); 00079 00080 virtual G4double 00081 PostStepGetPhysicalInteractionLength(const G4Track& track, 00082 G4double previousStepSize, 00083 G4ForceCondition* condition); 00084 00085 virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); 00086 00087 virtual void ProcessDescription(std::ostream& outFile) const; 00088 00089 inline void SetElementSelector(G4ElementSelector* ptr); 00090 00091 inline void SetEmCascade(G4HadronicInteraction* ptr); 00092 00093 inline void SetBoundDecay(G4HadronicInteraction* ptr); 00094 00095 protected: 00096 // set effective lifetime for at-rest process (default is forced action) 00097 // FIXME: This should be computed by subprocesses via cross-section analogue 00098 G4double GetMeanLifeTime(const G4Track& /*aTrack*/, 00099 G4ForceCondition* /*condition*/) { return -1.0; } 00100 00101 private: 00102 00103 // hide assignment operator as private 00104 G4HadronStoppingProcess& operator=(const G4HadronStoppingProcess &right); 00105 G4HadronStoppingProcess(const G4HadronStoppingProcess& ); 00106 00107 G4ElementSelector* fElementSelector; 00108 00109 G4HadronicInteraction* fEmCascade; 00110 G4HadronicInteraction* fBoundDecay; 00111 00112 // This is shadowing "result" in the cc file and 00113 // looks to be unnecessary. Removed by DHW, 12 June 2012 00114 // G4HadFinalState result; 00115 }; 00116 00117 inline void 00118 G4HadronStoppingProcess::SetElementSelector(G4ElementSelector* ptr) 00119 { 00120 if(fElementSelector != ptr) { 00121 delete fElementSelector; 00122 fElementSelector = ptr; 00123 } 00124 } 00125 00126 inline void 00127 G4HadronStoppingProcess::SetEmCascade(G4HadronicInteraction* ptr) 00128 { 00129 fEmCascade = ptr; 00130 } 00131 00132 inline void 00133 G4HadronStoppingProcess::SetBoundDecay(G4HadronicInteraction* ptr) 00134 { 00135 fBoundDecay = ptr; 00136 } 00137 00138 #endif 00139 00140 00141 00142 00143 00144