61 #ifdef VERBOSE_ENERSPLIT
77 if( aStep == 0 )
return FALSE;
84 G4double kinEnergyPre = kinEnergyPreOrig;
89 for( ii = 0; ii < rnsl.size(); ii++ ){
92 #ifdef VERBOSE_ENERSPLIT
93 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter1 step length geom " << sl <<
G4endl;
97 #ifdef VERBOSE_ENERSPLIT
99 G4cout <<
"G4EnergySplitter RN: step length geom TOTAL " << slSum
100 <<
" true TOTAL " << stepLength
101 <<
" ratio " << stepLength/slSum
104 <<
" Number of geom steps " << rnsl.size() <<
G4endl;
108 for( ii = 0; ii < rnsl.size(); ii++ ){
110 G4double edepStep = edep * sl/slSum;
111 #ifdef VERBOSE_ENERSPLIT
112 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii
113 <<
" edep " << edepStep <<
G4endl;
121 #ifdef VERBOSE_ENERSPLIT
125 for( ii = 0; ii < rnsl.size(); ii++ ){
129 for( ii = 0; ii < rnsl.size(); ii++ ){
130 G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes "<< ii
131 <<
" RN: iter0 corrected energy lost " << edep*rnsl[ii].second/slSum
137 G4double slRatio = stepLength/slSum;
138 #ifdef VERBOSE_ENERSPLIT
139 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes RN: iter 0, step ratio " << slRatio <<
G4endl;
145 std::vector<G4double> stepLengths;
149 for( ii = 0; ii < rnsl.size(); ii++ ){
151 stepLengths.push_back( sl * slRatio );
152 #ifdef VERBOSE_ENERSPLIT
153 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter" << iiter <<
" corrected step length " << sl*slRatio <<
G4endl;
157 for( ii = 0; ii < rnsl.size(); ii++ ){
160 if( kinEnergyPre > 0. ) {
161 dEdx = emcalc.
GetDEDX(kinEnergyPre, part, mate);
163 G4double elost = stepLengths[ii] * dEdx;
165 #ifdef VERBOSE_ENERSPLIT
166 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter1 energy lost " << elost
167 <<
" energy at interaction " << kinEnergyPre
168 <<
" = stepLength " << stepLengths[ii]
169 <<
" * dEdx " << dEdx <<
G4endl;
171 kinEnergyPre -= elost;
181 kinEnergyPre = kinEnergyPreOrig;
182 for( ii = 0; ii < rnsl.size(); ii++ ){
187 #ifdef VERBOSE_ENERSPLIT
188 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes" << ii
189 <<
" RN: iter" << iiter <<
" step length geom " << stepLengths[ii]
190 <<
" geom2true " << rnsl[ii].second / stepLengths[ii] <<
G4endl;
193 slSum += stepLengths[ii];
198 #ifdef VERBOSE_ENERSPLIT
199 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes" << ii <<
" RN: iter" << iiter <<
" step ratio " << slRatio <<
G4endl;
201 for( ii = 0; ii < rnsl.size(); ii++ ){
202 stepLengths[ii] *= slratio;
203 #ifdef VERBOSE_ENERSPLIT
204 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter" << iiter <<
" corrected step length " << stepLengths[ii] <<
G4endl;
211 for( ii = 0; ii < rnsl.size(); ii++ ){
214 if( kinEnergyPre > 0. ) {
215 dEdx = emcalc.
GetDEDX(kinEnergyPre, part, mate);
217 G4double elost = stepLengths[ii] * dEdx;
218 #ifdef VERBOSE_ENERSPLIT
219 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter" << iiter <<
" energy lost " << elost
220 <<
" energy at interaction " << kinEnergyPre
221 <<
" = stepLength " << stepLengths[ii]
222 <<
" * dEdx " << dEdx <<
G4endl;
224 kinEnergyPre -= elost;
232 G4double enerRatio = (edep/totalELost);
234 #ifdef VERBOSE_ENERSPLIT
235 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes"<< ii <<
" RN: iter" << iiter <<
" energy ratio " << enerRatio <<
G4endl;
238 #ifdef VERBOSE_ENERSPLIT
243 #ifdef VERBOSE_ENERSPLIT
245 if(verbose)
G4cout <<
"G4EnergySplitter::SplitEnergyInVolumes "<< ii <<
" RN: iter" << iiter <<
" corrected energy lost " <<
theEnergies[ii]
247 <<
" energy before interaction " << kinEnergyPreOrig-elostTot+
theEnergies[ii]
248 <<
" energy after interaction " << kinEnergyPreOrig-elostTot
264 std::vector<G4VPhysicalVolume*>::iterator cite;
265 for( cite = pvs->begin(); cite != pvs->end(); cite++ ) {
280 "No G4PhantomParameterisation found !");
318 "Invalid stepNo, smaller than 0 or bigger or equal to number of voxels traversed",
323 advance( ite, stepNo );
324 voxelID = (*ite).first;
333 advance( ite, stepNo );
334 stepLength = (*ite).second;