[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // ------------------------------------------------------------------- |
---|
| 28 | // GEANT 4 class file |
---|
| 29 | // |
---|
| 30 | // CERN, Geneva, Switzerland |
---|
| 31 | // |
---|
| 32 | // File name: G4ContinuumGammaTransition |
---|
| 33 | // |
---|
| 34 | // Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu) |
---|
| 35 | // Maria Grazia Pia (pia@genova.infn.it) |
---|
| 36 | // |
---|
| 37 | // Creation date: 23 October 1998 |
---|
| 38 | // |
---|
| 39 | // Modifications: |
---|
| 40 | // |
---|
| 41 | // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) |
---|
| 42 | // Added creation time evaluation for products of evaporation |
---|
| 43 | // 02 May 2003, Vladimir Ivanchenko change interface to G4NuclearlevelManager |
---|
| 44 | // |
---|
| 45 | // ------------------------------------------------------------------- |
---|
| 46 | // |
---|
| 47 | // Class G4ContinuumGammaTransition.cc |
---|
| 48 | // |
---|
| 49 | |
---|
| 50 | #include "G4ContinuumGammaTransition.hh" |
---|
| 51 | #include "G4VLevelDensityParameter.hh" |
---|
| 52 | #include "G4ConstantLevelDensityParameter.hh" |
---|
| 53 | #include "G4RandGeneralTmp.hh" |
---|
| 54 | // |
---|
| 55 | // Constructor |
---|
| 56 | // |
---|
| 57 | |
---|
| 58 | G4ContinuumGammaTransition::G4ContinuumGammaTransition( |
---|
| 59 | const G4NuclearLevelManager* levelManager, |
---|
| 60 | G4int Z, G4int A, |
---|
| 61 | G4double excitation, |
---|
| 62 | G4int verbose): |
---|
| 63 | _nucleusA(A), _nucleusZ(Z), _excitation(excitation), _levelManager(levelManager) |
---|
| 64 | { |
---|
| 65 | const G4PtrLevelVector* levels = _levelManager->GetLevels(); |
---|
| 66 | G4double eTolerance = 0.; |
---|
| 67 | if (levels != 0) |
---|
| 68 | { |
---|
| 69 | G4int lastButOne = _levelManager->NumberOfLevels() - 2; |
---|
| 70 | if (lastButOne >= 0) |
---|
| 71 | { |
---|
| 72 | eTolerance = _levelManager->MaxLevelEnergy() - levels->operator[](lastButOne)->Energy(); |
---|
| 73 | if (eTolerance < 0.) eTolerance = 0.; |
---|
| 74 | } |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | _verbose = verbose; |
---|
| 78 | _eGamma = 0.; |
---|
| 79 | _gammaCreationTime = 0.; |
---|
| 80 | |
---|
| 81 | _maxLevelE = _levelManager->MaxLevelEnergy() + eTolerance; |
---|
| 82 | _minLevelE = _levelManager->MinLevelEnergy(); |
---|
| 83 | |
---|
| 84 | // Energy range for photon generation; upper limit is defined 5*Gamma(GDR) from GDR peak |
---|
| 85 | _eMin = 0.001 * MeV; |
---|
| 86 | // Giant Dipole Resonance energy |
---|
| 87 | G4double energyGDR = (40.3 / std::pow(G4double(_nucleusA),0.2) ) * MeV; |
---|
| 88 | // Giant Dipole Resonance width |
---|
| 89 | G4double widthGDR = 0.30 * energyGDR; |
---|
| 90 | // Extend |
---|
| 91 | G4double factor = 5; |
---|
| 92 | _eMax = energyGDR + factor * widthGDR; |
---|
| 93 | if (_eMax > excitation) _eMax = _excitation; |
---|
| 94 | |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | // |
---|
| 98 | // Destructor |
---|
| 99 | // |
---|
| 100 | |
---|
| 101 | G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {} |
---|
| 102 | |
---|
| 103 | // |
---|
| 104 | // Override GammaEnergy function from G4VGammaTransition |
---|
| 105 | // |
---|
| 106 | |
---|
| 107 | void G4ContinuumGammaTransition::SelectGamma() |
---|
| 108 | { |
---|
| 109 | |
---|
| 110 | _eGamma = 0.; |
---|
| 111 | |
---|
| 112 | G4int nBins = 200; |
---|
| 113 | G4double sampleArray[200]; |
---|
| 114 | G4int i; |
---|
| 115 | for (i=0; i<nBins; i++) |
---|
| 116 | { |
---|
| 117 | G4double e = _eMin + ( (_eMax - _eMin) / nBins) * i; |
---|
| 118 | sampleArray[i] = E1Pdf(e); |
---|
| 119 | |
---|
| 120 | if(_verbose > 10) |
---|
| 121 | G4cout << "*---* G4ContinuumTransition: e = " << e |
---|
| 122 | << " pdf = " << sampleArray[i] << G4endl; |
---|
| 123 | } |
---|
| 124 | G4RandGeneralTmp randGeneral(sampleArray, nBins); |
---|
| 125 | G4double random = randGeneral.shoot(); |
---|
| 126 | |
---|
| 127 | _eGamma = _eMin + (_eMax - _eMin) * random; |
---|
| 128 | |
---|
| 129 | G4double finalExcitation = _excitation - _eGamma; |
---|
| 130 | |
---|
| 131 | if(_verbose > 10) |
---|
| 132 | G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma |
---|
| 133 | << " finalExcitation = " << finalExcitation |
---|
| 134 | << " random = " << random << G4endl; |
---|
| 135 | |
---|
| 136 | // if (finalExcitation < 0) |
---|
| 137 | if(finalExcitation < _minLevelE/2.) |
---|
| 138 | { |
---|
| 139 | _eGamma = _excitation; |
---|
| 140 | finalExcitation = 0.; |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | if (finalExcitation < _maxLevelE && finalExcitation > 0.) |
---|
| 144 | { |
---|
| 145 | G4double levelE = _levelManager->NearestLevel(finalExcitation)->Energy(); |
---|
| 146 | G4double diff = finalExcitation - levelE; |
---|
| 147 | _eGamma = _eGamma + diff; |
---|
| 148 | } |
---|
| 149 | |
---|
| 150 | _gammaCreationTime = GammaTime(); |
---|
| 151 | |
---|
| 152 | if(_verbose > 10) |
---|
| 153 | G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = " |
---|
| 154 | << _gammaCreationTime/second << G4endl; |
---|
| 155 | |
---|
| 156 | return; |
---|
| 157 | } |
---|
| 158 | |
---|
| 159 | G4double G4ContinuumGammaTransition::GetGammaEnergy() |
---|
| 160 | { |
---|
| 161 | return _eGamma; |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | G4double G4ContinuumGammaTransition::GetGammaCreationTime() |
---|
| 165 | { |
---|
| 166 | return _gammaCreationTime; |
---|
| 167 | } |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | void G4ContinuumGammaTransition::SetEnergyFrom(const G4double energy) |
---|
| 171 | { |
---|
| 172 | |
---|
| 173 | if (energy > 0.) _excitation = energy; |
---|
| 174 | return; |
---|
| 175 | |
---|
| 176 | } |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | G4double G4ContinuumGammaTransition::E1Pdf(G4double e) |
---|
| 180 | { |
---|
| 181 | G4double theProb = 0.0; |
---|
| 182 | |
---|
| 183 | if( (_excitation - e) < 0.0 || e < 0 || _excitation < 0) return theProb; |
---|
| 184 | |
---|
| 185 | G4ConstantLevelDensityParameter ldPar; |
---|
| 186 | G4double aLevelDensityParam = ldPar.LevelDensityParameter(_nucleusA,_nucleusZ,_excitation); |
---|
| 187 | |
---|
| 188 | G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*_excitation)); |
---|
| 189 | G4double levelDensAft = std::exp(2.0*std::sqrt(aLevelDensityParam*(_excitation - e))); |
---|
| 190 | |
---|
| 191 | if(_verbose > 20) |
---|
| 192 | G4cout << _nucleusA << " LevelDensityParameter = " << aLevelDensityParam |
---|
| 193 | << " Bef Aft " << levelDensBef << " " << levelDensAft << G4endl; |
---|
| 194 | |
---|
| 195 | // Now form the probability density |
---|
| 196 | |
---|
| 197 | // Define constants for the photoabsorption cross-section (the reverse |
---|
| 198 | // process of our de-excitation) |
---|
| 199 | |
---|
| 200 | // G4double sigma0 = 2.5 * _nucleusA * millibarn; |
---|
| 201 | G4double sigma0 = 2.5 * _nucleusA; |
---|
| 202 | |
---|
| 203 | G4double Egdp = (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV; |
---|
| 204 | G4double GammaR = 0.30 * Egdp; |
---|
| 205 | |
---|
| 206 | G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc); |
---|
| 207 | |
---|
| 208 | G4double numerator = sigma0 * e*e * GammaR*GammaR; |
---|
| 209 | G4double denominator = (e*e - Egdp*Egdp)* (e*e - Egdp*Egdp) + GammaR*GammaR*e*e; |
---|
| 210 | // if (denominator < 1.0e-9) denominator = 1.0e-9; |
---|
| 211 | |
---|
| 212 | G4double sigmaAbs = numerator/denominator ; |
---|
| 213 | |
---|
| 214 | if(_verbose > 20) |
---|
| 215 | G4cout << ".. " << Egdp << " .. " << GammaR |
---|
| 216 | << " .. " << normC << " .. " << sigmaAbs |
---|
| 217 | << " .. " << e*e << " .. " << levelDensAft/levelDensBef |
---|
| 218 | << G4endl; |
---|
| 219 | |
---|
| 220 | // theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef; |
---|
| 221 | theProb = sigmaAbs * e*e * levelDensAft/levelDensBef; |
---|
| 222 | |
---|
| 223 | return theProb; |
---|
| 224 | } |
---|
| 225 | |
---|
| 226 | |
---|
| 227 | G4double G4ContinuumGammaTransition::GammaTime() |
---|
| 228 | { |
---|
| 229 | |
---|
| 230 | G4double GammaR = 0.30 * (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV; |
---|
| 231 | G4double tau = hbar_Planck/GammaR; |
---|
| 232 | |
---|
| 233 | G4double tMin = 0; |
---|
| 234 | G4double tMax = 10.0 * tau; |
---|
| 235 | G4int nBins = 200; |
---|
| 236 | G4double sampleArray[200]; |
---|
| 237 | |
---|
| 238 | for(G4int i = 0;i<nBins;i++) |
---|
| 239 | { |
---|
| 240 | G4double t = tMin + ((tMax-tMin)/nBins)*i; |
---|
| 241 | sampleArray[i] = (std::exp(-t/tau))/tau; |
---|
| 242 | } |
---|
| 243 | |
---|
| 244 | G4RandGeneralTmp randGeneral(sampleArray, nBins); |
---|
| 245 | G4double random = randGeneral.shoot(); |
---|
| 246 | |
---|
| 247 | G4double creationTime = tMin + (tMax - tMin) * random; |
---|
| 248 | |
---|
| 249 | return creationTime; |
---|
| 250 | } |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|