135{
136 std::vector<std::unique_ptr<G4ITReactionChange>> fReactionInfo;
137 fReactionInfo.clear();
138
139 if (pReactionSet == nullptr)
140 {
141 return fReactionInfo;
142 }
143
145 for (auto tracks_i = reactionPerTrackMap.begin();
146 tracks_i != reactionPerTrackMap.end();
147 tracks_i = reactionPerTrackMap.begin())
148 {
149 G4Track* pTrackA = tracks_i->first;
151 {
152 continue;
153 }
154
157
158 assert(reactionList.begin() != reactionList.end());
159
160 for (auto it = reactionList.begin(); it != reactionList.end(); it = reactionList.begin())
161 {
163 G4Track* pTrackB = reaction->GetReactant(pTrackA);
165 {
166 continue;
167 }
168
169 if (pTrackB == pTrackA)
170 {
172 exceptionDescription
173 << "The IT reaction process sent back a reaction between trackA and trackB. ";
174 exceptionDescription << "The problem is trackA == trackB";
176 "ITModelProcessor005",
178 exceptionDescription);
179 }
180
182
183 if (
TestReactibility(*pTrackA, *pTrackB, currentStepTime, reachedUserStepTimeLimit))
184 {
185 auto pReactionChange =
MakeReaction(*pTrackA, *pTrackB);
186
187 if (pReactionChange)
188 {
189 fReactionInfo.push_back(std::move(pReactionChange));
190 break;
191 }
192 }
193 }
194 }
195
197 return fReactionInfo;
198}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::map< G4Track *, G4ITReactionPerTrackPtr, compTrackPerID > G4ITReactionPerTrackMap
G4shared_ptr< G4ITReaction > G4ITReactionPtr
std::list< G4ITReactionPtr > G4ITReactionList
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
std::unique_ptr< G4ITReactionChange > MakeReaction(const G4Track &, const G4Track &) override
G4bool TestReactibility(const G4Track &, const G4Track &, double currentStepTime, bool userStepTimeLimit) override
void SelectThisReaction(G4ITReactionPtr reaction)
G4ITReactionPerTrackMap & GetReactionMap()
G4TrackStatus GetTrackStatus() const