G4DNADingfelderChargeDecreaseModel Class Reference

#include <G4DNADingfelderChargeDecreaseModel.hh>

Inheritance diagram for G4DNADingfelderChargeDecreaseModel:

G4VEmModel

Public Member Functions

 G4DNADingfelderChargeDecreaseModel (const G4ParticleDefinition *p=0, const G4String &nam="DNADingfelderChargeDecreaseModel")
virtual ~G4DNADingfelderChargeDecreaseModel ()
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
virtual G4double CrossSectionPerVolume (const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)

Protected Attributes

G4ParticleChangeForGammafParticleChangeForGamma

Detailed Description

Definition at line 40 of file G4DNADingfelderChargeDecreaseModel.hh.


Constructor & Destructor Documentation

G4DNADingfelderChargeDecreaseModel::G4DNADingfelderChargeDecreaseModel ( const G4ParticleDefinition p = 0,
const G4String nam = "DNADingfelderChargeDecreaseModel" 
)

Definition at line 40 of file G4DNADingfelderChargeDecreaseModel.cc.

References fParticleChangeForGamma, G4cout, and G4endl.

00042     :G4VEmModel(nam),isInitialised(false)
00043 {
00044     //  nistwater = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER");
00045     fpMolWaterDensity = 0;
00046     numberOfPartialCrossSections[0] = 0;
00047     numberOfPartialCrossSections[1] = 0;
00048     numberOfPartialCrossSections[2] = 0;
00049 
00050     verboseLevel= 0;
00051     // Verbosity scale:
00052     // 0 = nothing
00053     // 1 = warning for energy non-conservation
00054     // 2 = details of energy budget
00055     // 3 = calculation of cross sections, file openings, sampling of atoms
00056     // 4 = entering in methods
00057 
00058     if( verboseLevel>0 )
00059     {
00060         G4cout << "Dingfelder charge decrease model is constructed " << G4endl;
00061     }
00062     fParticleChangeForGamma = 0;
00063 }

G4DNADingfelderChargeDecreaseModel::~G4DNADingfelderChargeDecreaseModel (  )  [virtual]

Definition at line 67 of file G4DNADingfelderChargeDecreaseModel.cc.

00068 {}


Member Function Documentation

G4double G4DNADingfelderChargeDecreaseModel::CrossSectionPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  ekin,
G4double  emin,
G4double  emax 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 201 of file G4DNADingfelderChargeDecreaseModel.cc.

References G4cout, G4endl, G4Material::GetIndex(), G4DNAGenericIonsManager::GetIon(), G4ParticleDefinition::GetParticleName(), G4DNAGenericIonsManager::Instance(), and G4Proton::ProtonDefinition().

00206 {
00207     if (verboseLevel > 3)
00208         G4cout << "Calling CrossSectionPerVolume() of G4DNADingfelderChargeDecreaseModel" << G4endl;
00209 
00210     // Calculate total cross section for model
00211 
00212     G4DNAGenericIonsManager *instance;
00213     instance = G4DNAGenericIonsManager::Instance();
00214 
00215     if (
00216             particleDefinition != G4Proton::ProtonDefinition()
00217             &&
00218             particleDefinition != instance->GetIon("alpha++")
00219             &&
00220             particleDefinition != instance->GetIon("alpha+")
00221             )
00222 
00223         return 0;
00224 
00225     G4double lowLim = 0;
00226     G4double highLim = 0;
00227     G4double crossSection = 0.;
00228 
00229     G4double waterDensity = (*fpMolWaterDensity)[material->GetIndex()];
00230 
00231     if(waterDensity!= 0.0)
00232   //  if (material == nistwater || material->GetBaseMaterial() == nistwater)
00233     {
00234         const G4String& particleName = particleDefinition->GetParticleName();
00235 
00236         std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
00237         pos1 = lowEnergyLimit.find(particleName);
00238 
00239         if (pos1 != lowEnergyLimit.end())
00240         {
00241             lowLim = pos1->second;
00242         }
00243 
00244         std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
00245         pos2 = highEnergyLimit.find(particleName);
00246 
00247         if (pos2 != highEnergyLimit.end())
00248         {
00249             highLim = pos2->second;
00250         }
00251 
00252         if (k >= lowLim && k < highLim)
00253         {
00254             crossSection = Sum(k,particleDefinition);
00255         }
00256 
00257         if (verboseLevel > 2)
00258         {
00259             G4cout << "_______________________________________" << G4endl;
00260             G4cout << "°°° G4DNADingfelderChargeDecreaeModel" << G4endl;
00261             G4cout << "---> Kinetic energy(eV)=" << k/eV << "particle :" << particleName << G4endl;
00262             G4cout << " - Cross section per water molecule (cm^2)=" << crossSection/cm/cm << G4endl;
00263             G4cout << " - Cross section per water molecule (cm^-1)=" << crossSection*
00264                       waterDensity/(1./cm) << G4endl;
00265 //            material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl;
00266         }
00267     }
00268 
00269     return crossSection*waterDensity;
00270 //    return crossSection*material->GetAtomicNumDensityVector()[1];
00271 
00272 }

void G4DNADingfelderChargeDecreaseModel::Initialise ( const G4ParticleDefinition ,
const G4DataVector  
) [virtual]

Implements G4VEmModel.

Definition at line 72 of file G4DNADingfelderChargeDecreaseModel.cc.

References fParticleChangeForGamma, G4cout, G4endl, G4DNAGenericIonsManager::GetIon(), G4Material::GetMaterial(), G4DNAMolecularMaterial::GetNumMolPerVolTableFor(), G4VEmModel::GetParticleChangeForGamma(), G4ParticleDefinition::GetParticleName(), G4VEmModel::HighEnergyLimit(), G4DNAMolecularMaterial::Instance(), G4DNAGenericIonsManager::Instance(), G4VEmModel::LowEnergyLimit(), G4InuclParticleNames::proton, G4Proton::ProtonDefinition(), G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().

00074 {
00075 
00076     if (verboseLevel > 3)
00077         G4cout << "Calling G4DNADingfelderChargeDecreaseModel::Initialise()" << G4endl;
00078 
00079     // Energy limits
00080 
00081     G4DNAGenericIonsManager *instance;
00082     instance = G4DNAGenericIonsManager::Instance();
00083     G4ParticleDefinition* protonDef = G4Proton::ProtonDefinition();
00084     G4ParticleDefinition* alphaPlusPlusDef = instance->GetIon("alpha++");
00085     G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+");
00086 
00087     G4String proton;
00088     G4String alphaPlusPlus;
00089     G4String alphaPlus;
00090 
00091     // LIMITS
00092 
00093     proton = protonDef->GetParticleName();
00094     lowEnergyLimit[proton] = 100. * eV;
00095     highEnergyLimit[proton] = 100. * MeV;
00096 
00097     alphaPlusPlus = alphaPlusPlusDef->GetParticleName();
00098     lowEnergyLimit[alphaPlusPlus] = 1. * keV;
00099     highEnergyLimit[alphaPlusPlus] = 400. * MeV;
00100 
00101     alphaPlus = alphaPlusDef->GetParticleName();
00102     lowEnergyLimit[alphaPlus] = 1. * keV;
00103     highEnergyLimit[alphaPlus] = 400. * MeV;
00104 
00105     //
00106 
00107     if (particle==protonDef)
00108     {
00109         SetLowEnergyLimit(lowEnergyLimit[proton]);
00110         SetHighEnergyLimit(highEnergyLimit[proton]);
00111     }
00112 
00113     if (particle==alphaPlusPlusDef)
00114     {
00115         SetLowEnergyLimit(lowEnergyLimit[alphaPlusPlus]);
00116         SetHighEnergyLimit(highEnergyLimit[alphaPlusPlus]);
00117     }
00118 
00119     if (particle==alphaPlusDef)
00120     {
00121         SetLowEnergyLimit(lowEnergyLimit[alphaPlus]);
00122         SetHighEnergyLimit(highEnergyLimit[alphaPlus]);
00123     }
00124 
00125     // Final state
00126 
00127     //PROTON
00128     f0[0][0]=1.;
00129     a0[0][0]=-0.180;
00130     a1[0][0]=-3.600;
00131     b0[0][0]=-18.22;
00132     b1[0][0]=-1.997;
00133     c0[0][0]=0.215;
00134     d0[0][0]=3.550;
00135     x0[0][0]=3.450;
00136     x1[0][0]=5.251;
00137 
00138     numberOfPartialCrossSections[0] = 1;
00139 
00140     //ALPHA++
00141     f0[0][1]=1.;  a0[0][1]=0.95;
00142     a1[0][1]=-2.75;
00143     b0[0][1]=-23.00;
00144     c0[0][1]=0.215;
00145     d0[0][1]=2.95;
00146     x0[0][1]=3.50;
00147 
00148     f0[1][1]=1.;
00149     a0[1][1]=0.95;
00150     a1[1][1]=-2.75;
00151     b0[1][1]=-23.73;
00152     c0[1][1]=0.250;
00153     d0[1][1]=3.55;
00154     x0[1][1]=3.72;
00155 
00156     x1[0][1]=-1.;
00157     b1[0][1]=-1.;
00158 
00159     x1[1][1]=-1.;
00160     b1[1][1]=-1.;
00161 
00162     numberOfPartialCrossSections[1] = 2;
00163 
00164     // ALPHA+
00165     f0[0][2]=1.;
00166     a0[0][2]=0.65;
00167     a1[0][2]=-2.75;
00168     b0[0][2]=-21.81;
00169     c0[0][2]=0.232;
00170     d0[0][2]=2.95;
00171     x0[0][2]=3.53;
00172 
00173     x1[0][2]=-1.;
00174     b1[0][2]=-1.;
00175 
00176     numberOfPartialCrossSections[2] = 1;
00177 
00178     //
00179 
00180     if( verboseLevel>0 )
00181     {
00182         G4cout << "Dingfelder charge decrease model is initialized " << G4endl
00183                << "Energy range: "
00184                << LowEnergyLimit() / keV << " keV - "
00185                << HighEnergyLimit() / MeV << " MeV for "
00186                << particle->GetParticleName()
00187                << G4endl;
00188     }
00189 
00190     // Initialize water density pointer
00191     fpMolWaterDensity = G4DNAMolecularMaterial::Instance()->GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
00192 
00193     if (isInitialised) { return; }
00194     fParticleChangeForGamma = GetParticleChangeForGamma();
00195     isInitialised = true;
00196 
00197 }

void G4DNADingfelderChargeDecreaseModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
const G4MaterialCutsCouple ,
const G4DynamicParticle ,
G4double  tmin,
G4double  maxEnergy 
) [virtual]

Implements G4VEmModel.

Definition at line 276 of file G4DNADingfelderChargeDecreaseModel.cc.

References FatalException, fParticleChangeForGamma, fStopAndKill, G4cout, G4endl, G4Exception(), G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4ParticleDefinition::GetPDGMass(), CLHEP::detail::n, G4VParticleChange::ProposeLocalEnergyDeposit(), G4VParticleChange::ProposeTrackStatus(), and G4Proton::Proton().

00281 {
00282     if (verboseLevel > 3)
00283         G4cout << "Calling SampleSecondaries() of G4DNADingfelderChargeDecreaseModel" << G4endl;
00284 
00285     G4double inK = aDynamicParticle->GetKineticEnergy();
00286 
00287     G4ParticleDefinition* definition = aDynamicParticle->GetDefinition();
00288 
00289     G4double particleMass = definition->GetPDGMass();
00290 
00291     G4int finalStateIndex = RandomSelect(inK,definition);
00292 
00293     G4int n = NumberOfFinalStates(definition, finalStateIndex);
00294     G4double waterBindingEnergy = WaterBindingEnergyConstant(definition, finalStateIndex);
00295     G4double outgoingParticleBindingEnergy = OutgoingParticleBindingEnergyConstant(definition, finalStateIndex);
00296 
00297     G4double outK = 0.;
00298     if (definition==G4Proton::Proton())
00299         outK = inK - n*(inK*electron_mass_c2/proton_mass_c2) - waterBindingEnergy + outgoingParticleBindingEnergy;
00300     else
00301         outK = inK - n*(inK*electron_mass_c2/particleMass) - waterBindingEnergy + outgoingParticleBindingEnergy;
00302 
00303     if (outK<0)
00304     {
00305         G4Exception("G4DNADingfelderChargeDecreaseModel::SampleSecondaries","em0004",
00306                     FatalException,"Final kinetic energy is negative.");
00307     }
00308 
00309     fParticleChangeForGamma->ProposeTrackStatus(fStopAndKill);
00310     fParticleChangeForGamma->ProposeLocalEnergyDeposit(waterBindingEnergy);
00311 
00312     G4DynamicParticle* dp = new G4DynamicParticle (OutgoingParticleDefinition(definition, finalStateIndex),
00313                                                    aDynamicParticle->GetMomentumDirection(),
00314                                                    outK) ;
00315     fvect->push_back(dp);
00316 
00317 }


Field Documentation

G4ParticleChangeForGamma* G4DNADingfelderChargeDecreaseModel::fParticleChangeForGamma [protected]

Definition at line 66 of file G4DNADingfelderChargeDecreaseModel.hh.

Referenced by G4DNADingfelderChargeDecreaseModel(), Initialise(), and SampleSecondaries().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:47 2013 for Geant4 by  doxygen 1.4.7