82 if (
this == &rhs)
return *
this;
101 exceptionDescription <<
"No G4ITModelHandler was passed to the modelProcessor.";
102 G4Exception(
"G4ITModelProcessor::InitializeStepper",
"ITModelProcessor002",
105 const std::vector<std::vector<G4ITModelManager*> >* modelManager =
fpModelHandler
111 exceptionDescription <<
"No G4ITModelManager was register to G4ITModelHandler.";
112 G4Exception(
"G4ITModelProcessor::InitializeStepper",
"ITModelProcessor003",
116 int nbModels1 = modelManager->size() ;
127 for(
int i = 0 ; i < nbModels1 ; i++)
129 nbModels2 = (*modelManager)[i].size();
131 for(
int j = 0 ; j <= i ; j++)
133 modman = (*modelManager)[i][j];
135 if(modman == 0) continue ;
137 model = modman -> GetModel(currentGlobalTime);
141 stepper -> Prepare() ;
146 if(nbModels1 == 1 && nbModels2 ==1)
163 exceptionDescription <<
"No track was passed to the method (track == 0).";
164 G4Exception(
"G4ITModelProcessor::CalculateStep",
"ITModelProcessor004",
184 for(
int i =0 ; i < (
int) model.size() ; i++)
186 if(model[i] == 0)
continue;
194 const double currentStepTime,
195 const double previousStepTime,
196 const bool reachedUserStepTimeLimit)
200 if(tracks == 0) return ;
204 std::map<G4Track*, G4TrackVectorHandle>::iterator tracks_i = tracks->begin();;
206 for(tracks_i = tracks->begin() ; tracks_i != tracks-> end() ; tracks_i ++)
209 G4Track* trackA = tracks_i->first;
211 if(trackA == 0)
continue;
213 std::map<const G4Track*, G4bool>::iterator it_hasReacted =
fHasReacted.find(trackA);
218 G4ITType ITypeA = ITA -> GetITType();
223 std::vector<G4Track*>::iterator trackB_i = trackB_vector->begin();
230 for(; trackB_i != trackB_vector->end() ; trackB_i++)
234 if(trackB == 0)
continue;
249 exceptionDescription <<
"The IT reaction process sent back a reaction between trackA and trackB. ";
250 exceptionDescription <<
"The problem is trackA == trackB";
251 G4Exception(
"G4ITModelProcessor::FindReaction",
"ITModelProcessor005",
256 G4ITType ITypeBtmp = ITB -> GetITType();
258 if(ITypeB != ITypeBtmp)
263 process = model[ITypeB]->GetReactionProcess();
266 if(process && process -> TestReactibility(*trackA, *trackB,
267 currentStepTime, previousStepTime,
268 reachedUserStepTimeLimit))
277 changes -> GetTrackA();
278 changes -> GetTrackB();