G4DNAMeltonAttachmentModel Class Reference

#include <G4DNAMeltonAttachmentModel.hh>

Inheritance diagram for G4DNAMeltonAttachmentModel:

G4VEmModel

Public Member Functions

 G4DNAMeltonAttachmentModel (const G4ParticleDefinition *p=0, const G4String &nam="DNAMeltonAttachmentModel")
virtual ~G4DNAMeltonAttachmentModel ()
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)
void SetDissociationFlag (G4bool)
G4bool GetDissociationFlag ()

Protected Attributes

G4ParticleChangeForGammafParticleChangeForGamma

Detailed Description

Definition at line 44 of file G4DNAMeltonAttachmentModel.hh.


Constructor & Destructor Documentation

G4DNAMeltonAttachmentModel::G4DNAMeltonAttachmentModel ( const G4ParticleDefinition p = 0,
const G4String nam = "DNAMeltonAttachmentModel" 
)

Definition at line 42 of file G4DNAMeltonAttachmentModel.cc.

References fParticleChangeForGamma, G4cout, G4endl, G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().

00044     :G4VEmModel(nam),isInitialised(false)
00045 {
00046 //    nistwater = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER");
00047     fpWaterDensity = 0;
00048 
00049     lowEnergyLimit = 4 * eV;
00050     lowEnergyLimitOfModel = 4 * eV;
00051     highEnergyLimit = 13 * eV;
00052     SetLowEnergyLimit(lowEnergyLimit);
00053     SetHighEnergyLimit(highEnergyLimit);
00054 
00055     verboseLevel= 0;
00056     // Verbosity scale:
00057     // 0 = nothing
00058     // 1 = warning for energy non-conservation
00059     // 2 = details of energy budget
00060     // 3 = calculation of cross sections, file openings, sampling of atoms
00061     // 4 = entering in methods
00062 
00063     if( verboseLevel>0 )
00064     {
00065         G4cout << "Melton Attachment model is constructed " << G4endl
00066                << "Energy range: "
00067                << lowEnergyLimit / eV << " eV - "
00068                << highEnergyLimit / eV << " eV"
00069                << G4endl;
00070     }
00071     fParticleChangeForGamma = 0;
00072     fDissociationFlag = true;
00073 }

G4DNAMeltonAttachmentModel::~G4DNAMeltonAttachmentModel (  )  [virtual]

Definition at line 77 of file G4DNAMeltonAttachmentModel.cc.

00078 {  
00079     // For total cross section
00080 
00081     std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
00082 
00083     for (pos = tableData.begin(); pos != tableData.end(); ++pos)
00084     {
00085         G4DNACrossSectionDataSet* table = pos->second;
00086         delete table;
00087     }
00088 
00089     // For final state
00090 
00091 }


Member Function Documentation

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

Reimplemented from G4VEmModel.

Definition at line 163 of file G4DNAMeltonAttachmentModel.cc.

References FatalException, G4cout, G4endl, G4Exception(), G4Material::GetIndex(), and G4ParticleDefinition::GetParticleName().

00168 {
00169     if (verboseLevel > 3)
00170         G4cout << "Calling CrossSectionPerVolume() of G4DNAMeltonAttachmentModel" << G4endl;
00171 
00172     // Calculate total cross section for model
00173 
00174     G4double sigma=0;
00175 
00176     G4double waterDensity = (*fpWaterDensity)[material->GetIndex()];
00177 
00178     if(waterDensity!= 0.0)
00179    //  if (material == nistwater || material->GetBaseMaterial() == nistwater)
00180     {
00181         const G4String& particleName = particleDefinition->GetParticleName();
00182 
00183         if (ekin >= lowEnergyLimit && ekin < highEnergyLimit)
00184         {
00185 
00186             std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
00187             pos = tableData.find(particleName);
00188 
00189             if (pos != tableData.end())
00190             {
00191                 G4DNACrossSectionDataSet* table = pos->second;
00192                 if (table != 0)
00193                 {
00194                     sigma = table->FindValue(ekin);
00195                 }
00196             }
00197             else
00198             {
00199                 G4Exception("G4DNAMeltonAttachmentModel::ComputeCrossSectionPerVolume","em0002",
00200                             FatalException,"Model not applicable to particle type.");
00201             }
00202         }
00203 
00204         if (verboseLevel > 2)
00205         {
00206             G4cout << "__________________________________" << G4endl;
00207             G4cout << "°°° G4DNAMeltonAttachmentModel - XS INFO START" << G4endl;
00208             G4cout << "°°° Kinetic energy(eV)=" << ekin/eV << " particle : " << particleDefinition->GetParticleName() << G4endl;
00209             G4cout << "°°° Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl;
00210             G4cout << "°°° Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./cm) << G4endl;
00211             //      G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl;
00212             G4cout << "°°° G4DNAMeltonAttachmentModel - XS INFO END" << G4endl;
00213         }
00214 
00215     } // if water
00216 
00217     return sigma*waterDensity;
00218 //    return sigma*material->GetAtomicNumDensityVector()[1];
00219 }

G4bool G4DNAMeltonAttachmentModel::GetDissociationFlag (  )  [inline]

Definition at line 106 of file G4DNAMeltonAttachmentModel.hh.

00107 {
00108     return fDissociationFlag;
00109 }

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

Implements G4VEmModel.

Definition at line 95 of file G4DNAMeltonAttachmentModel.cc.

References G4Electron::ElectronDefinition(), fParticleChangeForGamma, G4cout, G4endl, G4Material::GetMaterial(), G4DNAMolecularMaterial::GetNumMolPerVolTableFor(), G4VEmModel::GetParticleChangeForGamma(), G4ParticleDefinition::GetParticleName(), G4VEmModel::HighEnergyLimit(), G4DNAMolecularMaterial::Instance(), G4DNACrossSectionDataSet::LoadData(), G4VEmModel::LowEnergyLimit(), G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().

00097 {
00098 
00099     if (verboseLevel > 3)
00100         G4cout << "Calling G4DNAMeltonAttachmentModel::Initialise()" << G4endl;
00101 
00102     // Energy limits
00103 
00104     if (LowEnergyLimit() < lowEnergyLimit)
00105     {
00106         G4cout << "G4DNAMeltonAttachmentModel: low energy limit increased from " <<
00107                   LowEnergyLimit()/eV << " eV to " << lowEnergyLimit/eV << " eV" << G4endl;
00108         SetLowEnergyLimit(lowEnergyLimit);
00109     }
00110 
00111     if (HighEnergyLimit() > highEnergyLimit)
00112     {
00113         G4cout << "G4DNAMeltonAttachmentModel: high energy limit decreased from " <<
00114                   HighEnergyLimit()/eV << " eV to " << highEnergyLimit/eV << " eV" << G4endl;
00115         SetHighEnergyLimit(highEnergyLimit);
00116     }
00117 
00118     // Reading of data files
00119 
00120     G4double scaleFactor = 1e-18*cm*cm;
00121 
00122     G4String fileElectron("dna/sigma_attachment_e_melton");
00123 
00124     G4ParticleDefinition* electronDef = G4Electron::ElectronDefinition();
00125     G4String electron;
00126 
00127     // ELECTRON
00128 
00129     // For total cross section
00130     
00131     electron = electronDef->GetParticleName();
00132 
00133     tableFile[electron] = fileElectron;
00134 
00135     G4DNACrossSectionDataSet* tableE = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor );
00136     tableE->LoadData(fileElectron);
00137     tableData[electron] = tableE;
00138     
00139     //
00140     
00141     if (verboseLevel > 2)
00142         G4cout << "Loaded cross section data for Melton Attachment model" << G4endl;
00143 
00144     if( verboseLevel>0 )
00145     {
00146         G4cout << "Melton Attachment model is initialized " << G4endl
00147                << "Energy range: "
00148                << LowEnergyLimit() / eV << " eV - "
00149                << HighEnergyLimit() / eV << " eV"
00150                << G4endl;
00151     }
00152     // Initialize water density pointer
00153     fpWaterDensity = G4DNAMolecularMaterial::Instance()->GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
00154 
00155     if (isInitialised) { return; }
00156     fParticleChangeForGamma = GetParticleChangeForGamma();
00157     isInitialised = true;
00158 
00159 }

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

Implements G4VEmModel.

Definition at line 223 of file G4DNAMeltonAttachmentModel.cc.

References G4DNAChemistryManager::CreateWaterMolecule(), eDissociativeAttachment, fParticleChangeForGamma, fStopAndKill, G4cout, G4endl, G4ParticleChangeForGamma::GetCurrentTrack(), G4DynamicParticle::GetKineticEnergy(), G4DNAChemistryManager::Instance(), G4VParticleChange::ProposeLocalEnergyDeposit(), G4VParticleChange::ProposeTrackStatus(), and G4ParticleChangeForGamma::SetProposedKineticEnergy().

00228 {
00229 
00230     if (verboseLevel > 3)
00231         G4cout << "Calling SampleSecondaries() of G4DNAMeltonAttachmentModel" << G4endl;
00232 
00233     // Electron is killed
00234 
00235     G4double electronEnergy0 = aDynamicElectron->GetKineticEnergy();
00236     fParticleChangeForGamma->SetProposedKineticEnergy(0.);
00237     fParticleChangeForGamma->ProposeTrackStatus(fStopAndKill);
00238     fParticleChangeForGamma->ProposeLocalEnergyDeposit(electronEnergy0);
00239 
00240     if(fDissociationFlag)
00241     {
00242         G4DNAChemistryManager::Instance()->CreateWaterMolecule(eDissociativeAttachment,-1,
00243                                                                fParticleChangeForGamma->GetCurrentTrack());
00244     }
00245     return ;
00246 }

void G4DNAMeltonAttachmentModel::SetDissociationFlag ( G4bool   )  [inline]

Definition at line 101 of file G4DNAMeltonAttachmentModel.hh.

00102 {
00103     fDissociationFlag = flag;
00104 }


Field Documentation

G4ParticleChangeForGamma* G4DNAMeltonAttachmentModel::fParticleChangeForGamma [protected]

Definition at line 73 of file G4DNAMeltonAttachmentModel.hh.

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


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