72 #ifdef G4MULTITHREADED
84 #ifdef G4MULTITHREADED
91 theFlag =
new std::vector<G4bool>;
94 #ifdef G4MULTITHREADED
134 return (idx < theFlag->size()) ? (*theFlag)[
idx] :
false;
141 const std::vector<G4PhysicsTable*>& list)
144 size_t n_processes = list.size();
147 if(1 >= n_processes) {
return; }
149 size_t nCouples = dedxTable->size();
150 if(0 >= nCouples) {
return; }
152 for (
size_t i=0; i<nCouples; ++i) {
158 for (
size_t j=0; j<npoints; ++j) {
160 for (
size_t k=0;
k<n_processes; ++
k) {
179 size_t nCouples = dedxTable->size();
180 if(0 >= nCouples) {
return; }
185 for (
size_t i=0; i<nCouples; ++i) {
187 if((pv ==
nullptr) || (useBM && !(*theFlag)[i])) {
continue; }
199 for (
size_t k=1;
k<npoints; ++
k) {
203 if(dedx1 > 0.0) {
break; }
212 if(npoints < 2) { npoints = 2; }
214 delete (*rangeTable)[i];
234 for (
size_t j=1; j<npoints; ++j) {
237 G4double de = (energy2 - energy1) * del;
242 for (
size_t k=0;
k<
n; ++
k) {
244 dedx1 = pv->
Value(energy);
245 if(dedx1 > 0.0) { sum += de/dedx1; }
264 size_t nCouples = rangeTable->size();
265 if(0 >= nCouples) {
return; }
267 for (
size_t i=0; i<nCouples; ++i) {
269 if((pv ==
nullptr) || (useBM && !(*
theFlag)[i])) {
continue; }
274 delete (*invRangeTable)[i];
278 for (
size_t j=0; j<npoints; ++j) {
297 size_t nFlags =
theFlag->size();
306 for(
size_t i=0; i<nFlags; ++i) {
307 (*theFlag)[i] = (table) ? table->
GetFlag(i) :
true;
309 for(
size_t i=nFlags; i<nCouples; ++i) {
316 for(
size_t i=0; i<nCouples; ++i) {
321 auto mat = couple->GetMaterial();
322 auto bmat =
mat->GetBaseMaterial();
326 for(
size_t j=0; j<nCouples; ++j) {
327 if(j == i) {
continue; }
330 if(bcouple->GetMaterial() == bmat &&
331 bcouple->GetProductionCuts() == pcuts) {
334 (*theDensityFactor)[i] =
mat->GetDensity()/bmat->GetDensity();
335 (*theDensityIdx)[i] = j;
336 (*theFlag)[i] =
false;
339 (*theDensityFactor)[j] = 1.0;
340 (*theDensityIdx)[j] = j;
341 (*theFlag)[j] =
true;
368 if(!table) {
return table; }
386 for(
size_t i=0; i<numOfCouples; ++i) {
404 n *= (
G4int)(std::log10(emax/tmin) + 0.5);
413 for(
G4int j=0; j<=
n; ++j) {