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 // 00031 // ------------------------------------------------------------ 00032 // GEANT 4 class header file 00033 // 00034 // 00035 // ------------------------------------------------------------ 00036 // Implemented for the new scheme 23 Mar. 1998 H.Kurahige 00037 // 00038 // Class Description 00039 // This class is a concrete class for ParticleChange which 00040 // has functionality for G4Decay. 00041 // 00042 // This class contains the results after invocation of the decay process. 00043 // This includes secondary particles generated by the interaction. 00044 // ------------------------------------------------------------ 00045 #ifndef G4ParticleChangeForDecay_h 00046 #define G4ParticleChangeForDecay_h 1 00047 00048 #include "globals.hh" 00049 #include "G4ios.hh" 00050 #include "G4ThreeVector.hh" 00051 class G4DynamicParticle; 00052 #include "G4VParticleChange.hh" 00053 00054 class G4ParticleChangeForDecay: public G4VParticleChange 00055 { 00056 public: 00057 // default constructor 00058 G4ParticleChangeForDecay(); 00059 00060 // destructor 00061 virtual ~G4ParticleChangeForDecay(); 00062 00063 protected: 00064 // hide copy constructor and assignment operaor as protected 00065 G4ParticleChangeForDecay(const G4ParticleChangeForDecay &right); 00066 G4ParticleChangeForDecay & operator=(const G4ParticleChangeForDecay &right); 00067 00068 public: 00069 // equal/unequal operator 00070 G4bool operator==(const G4ParticleChangeForDecay &right) const; 00071 G4bool operator!=(const G4ParticleChangeForDecay &right) const; 00072 00073 public: // with description 00074 // ---------------------------------------------------- 00075 // --- the following methods are for updating G4Step ----- 00076 // Return the pointer to the G4Step after updating the Step information 00077 // by using final state information of the track given by a physics 00078 // process 00079 00080 // !!! No effect for AlongSteyp 00081 // virtual G4Step* UpdateStepForAlongStep(G4Step* Step); 00082 00083 virtual G4Step* UpdateStepForAtRest(G4Step* Step); 00084 virtual G4Step* UpdateStepForPostStep(G4Step* Step); 00085 00086 virtual void Initialize(const G4Track&); 00087 // Initialize all propoerties by using G4Track information 00088 00089 void ProposeGlobalTime(G4double t); 00090 void ProposeLocalTime(G4double t); 00091 // Get/Propose the final global/local Time 00092 // NOTE: DO NOT INVOKE both methods in a step 00093 // Each method affects both local and global time 00094 00095 G4double GetGlobalTime(G4double timeDelay=0.0) const; 00096 G4double GetLocalTime(G4double timeDelay=0.0) const; 00097 // Convert the time delay to the glocbal/local time. 00098 // Can get the final global/local Time without argument 00099 00100 const G4ThreeVector* GetPolarization() const; 00101 void ProposePolarization(G4double Px, G4double Py, G4double Pz); 00102 void ProposePolarization(const G4ThreeVector& finalPoralization); 00103 // Get/Propose the final Polarization vector. 00104 00105 public: 00106 virtual void DumpInfo() const; 00107 00108 protected: 00109 G4double theGlobalTime0; 00110 // The global time at Initial. 00111 G4double theLocalTime0; 00112 // The local time at Initial. 00113 00114 G4double theTimeChange; 00115 // The change of local time of a given particle. 00116 00117 G4ThreeVector thePolarizationChange; 00118 // The changed (final) polarization of a given track 00119 00120 public: 00121 // for Debug 00122 virtual G4bool CheckIt(const G4Track&); 00123 }; 00124 00125 inline 00126 void G4ParticleChangeForDecay::ProposeGlobalTime(G4double t) 00127 { 00128 theTimeChange = (t-theGlobalTime0) + theLocalTime0; 00129 } 00130 00131 inline 00132 G4double G4ParticleChangeForDecay::GetGlobalTime(G4double timeDelay) const 00133 { 00134 // Convert the time delay to the global time. 00135 return theGlobalTime0 + (theTimeChange-theLocalTime0) + timeDelay; 00136 } 00137 00138 inline 00139 void G4ParticleChangeForDecay::ProposeLocalTime(G4double t) 00140 { 00141 theTimeChange = t; 00142 } 00143 00144 inline 00145 G4double G4ParticleChangeForDecay::GetLocalTime(G4double timeDelay) const 00146 { 00147 // Convert the time delay to the local time. 00148 return theTimeChange + timeDelay; 00149 } 00150 00151 inline 00152 const G4ThreeVector* G4ParticleChangeForDecay::GetPolarization() const 00153 { 00154 return &thePolarizationChange; 00155 } 00156 00157 inline 00158 void G4ParticleChangeForDecay::ProposePolarization(const G4ThreeVector& finalPoralization) 00159 { 00160 thePolarizationChange = finalPoralization; 00161 } 00162 00163 inline 00164 void G4ParticleChangeForDecay::ProposePolarization( 00165 G4double Px, 00166 G4double Py, 00167 G4double Pz ) 00168 { 00169 thePolarizationChange.setX(Px); 00170 thePolarizationChange.setY(Py); 00171 thePolarizationChange.setZ(Pz); 00172 } 00173 00174 #endif