36 : fStringOfMaterials(applyToMaterial),
fName(nam)
44 std::map<G4String, std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > >::iterator posOuter;
45 std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator posInner;
50 for(posInner = posOuter->second.begin(); posInner != posOuter->second.end(); ++posInner)
53 if(table != 0)
delete table;
77 G4String fileElectron, fileDiffElectron;
78 G4String materialName, modelParticleName;
85 for(
unsigned int i=0;i<applyToMatVect.size();++i)
97 if(applyToMatVect[i] ==
fModelMaterials[j] || applyToMatVect[i] ==
"all")
116 std::ostringstream oss;
117 oss << applyToMatVect[i] <<
" material was not found. It means the material specified in the UserPhysicsList is not a model material for ";
119 G4Exception(
"G4VDNAModel::LoadCrossSectionData",
"em0003",
128 G4String text(
"ReadDiffCSFile must be implemented in the model class using a differential cross section data file");
130 G4Exception(
"G4VDNAModel::ReadDiffCSFile",
"em0003",
142 std::vector<G4String> materialVect;
145 if(materials.find(
"/")==std::string::npos)
148 materialVect.push_back(materials);
155 while(materialsNonIdentified.find_first_of(
"/") != std::string::npos)
158 G4String mat = materialsNonIdentified.substr(0, materialsNonIdentified.find_first_of(
"/"));
159 materialVect.push_back(mat);
162 materialsNonIdentified = materialsNonIdentified.substr(materialsNonIdentified.find_first_of(
"/")+1,
163 materialsNonIdentified.size()-materialsNonIdentified.find_first_of(
"/"));
168 materialVect.push_back(materialsNonIdentified);
179 fTableData[materialName][particleName]->LoadData(file);
188 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
189 pos = (*tableData)[materialName].find(particle);
191 if (pos != (*tableData)[materialName].end())
206 value += valuesBuffer[i];
217 if (valuesBuffer[i] > value)
219 delete[] valuesBuffer;
222 value -= valuesBuffer[i];
225 if (valuesBuffer)
delete[] valuesBuffer;
231 G4Exception(
"G4VDNAModel::RandomSelectShell",
"em0002",
245 for(
int i=0;i<matTableSize;i++)