32 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >*
prd2handles =
nullptr;
34 std::map< const Trk::Track*, const SoMaterial* >
tracks2mat;
67 const unsigned n(
v.size());
68 for (
unsigned i(0);
i<
n;++
i) {
104 if (tracks.empty()) {
121 std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator
it(tracks.begin()),
itE(tracks.end());
132 messageVerbose(
"normal case - neither old, nor new, track lists are empty");
136 std::set<const Trk::Track*> newtracksset;
137 std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator
it(tracks.begin()),
itE(tracks.end());
139 newtracksset.insert(
it->first);
140 std::set<const Trk::Track*>::const_iterator newtrackssetEnd(newtracksset.end());
145 if (newtracksset.find(it2->first)==newtrackssetEnd) {
167 if (
it->second!=it2->second) {
185 if (segments.empty()) {
201 std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator
it(segments.begin()),
itE(segments.end());
211 messageVerbose(
"normal case - neither old, nor new, segment lists are empty");
215 std::set<const Trk::Segment*> newsegmentsset;
216 std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator
it(segments.begin()),
itE(segments.end());
218 newsegmentsset.insert(
it->first);
219 std::set<const Trk::Segment*>::const_iterator newsegmentssetEnd(newsegmentsset.end());
224 if (newsegmentsset.find(it2->first)==newsegmentssetEnd) {
244 if (
it->second!=it2->second) {
263 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(
prd2handles->end());
264 std::vector<const Trk::MeasurementBase*>::const_iterator
269 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
270 for (;itPrd!=itEnd;++itPrd){
276 std::vector<const Trk::Track*>(),
277 std::vector< const Trk::Segment* >(1,seg))));
280 itInfo->second.segments.push_back(seg);
283 if (itHandle!=itHandleEnd) {
284 QList<PRDHandleBase*> handles = itHandle->second;
286 if (handle->collHandle()->colourBySegments())
287 handle->updateMaterial();
301 theclass->message(
"ERROR: Received null segment pointer!");
305 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
306 std::vector<const Trk::MeasurementBase*>::const_iterator
311 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
312 for (;itPrd!=itEnd;++itPrd){
314 itInfo = prdsOnTracksAndSegments.find(prd);
315 if (itInfo!=prdsOnTracksAndSegments.end()) {
316 removeEntryFromVector(itInfo->second.segments,seg);
317 itHandle = prd2handles->find(prd);
318 if (itHandle!=itHandleEnd) {
319 QList<PRDHandleBase*> handles = itHandle->second;
321 if (handle->collHandle()->colourBySegments())
322 handle->updateMaterial();
338 theclass->message(
"ERROR: Received null segment pointer!");
341 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
342 std::vector<const Trk::MeasurementBase*>::const_iterator
347 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
348 for (;itPrd!=itEnd;++itPrd){
350 itHandle = prd2handles->find(prd);
351 if (itHandle!=itHandleEnd) {
352 QList<PRDHandleBase*> handles = itHandle->second;
354 if (handle->collHandle()->colourByTracks())
355 handle->updateMaterial();
370 theclass->message(
"ERROR: Received null track pointer!");
374 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
381 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
382 for (;itPrd!=itEnd;++itPrd){
385 itInfo = prdsOnTracksAndSegments.find(prd);
386 if (itInfo==prdsOnTracksAndSegments.end()) {
387 prdsOnTracksAndSegments.insert(std::pair<const Trk::PrepRawData*,TracksAndSegments>(prd,
388 TracksAndSegments((outliers?std::vector<const Trk::Track*>():std::vector<const Trk::Track*>(1,trk)),
389 (outliers?std::vector<const Trk::Track*>(1,trk):std::vector<const Trk::Track*>()),
390 std::vector< const Trk::Segment* >())));
393 itInfo->second.tracks_outliers.push_back(trk);
395 itInfo->second.tracks.push_back(trk);
397 itHandle = prd2handles->find(prd);
398 if (itHandle!=itHandleEnd) {
399 QList<PRDHandleBase*> handles = itHandle->second;
401 if (handle->collHandle()->colourByTracks())
402 handle->updateMaterial();
417 theclass->message(
"ERROR: Received null track pointer!");
421 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
428 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
429 for (;itPrd!=itEnd;++itPrd){
431 itInfo = prdsOnTracksAndSegments.find(prd);
432 if (itInfo!=prdsOnTracksAndSegments.end()) {
433 removeEntryFromVector((outliers?itInfo->second.tracks_outliers:itInfo->second.tracks),trk);
434 itHandle = prd2handles->find(prd);
435 if (itHandle!=itHandleEnd) {
436 QList<PRDHandleBase*> handles = itHandle->second;
438 if (handle->collHandle()->colourByTracks())
439 handle->updateMaterial();
455 theclass->message(
"ERROR: Received null track pointer!");
458 std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
465 std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
466 for (;itPrd!=itEnd;++itPrd){
468 itHandle = prd2handles->find(prd);
469 if (itHandle!=itHandleEnd) {
470 QList<PRDHandleBase*> handles = itHandle->second;
472 if (handle->collHandle()->colourByTracks())
473 handle->updateMaterial();
493 std::vector<const Trk::PrepRawData *>prds;
514 const std::vector<const Trk::Track*>&
to,
515 const std::vector< const Trk::Segment* >&
s )
516 : tracks(
t), tracks_outliers(
to), segments(
s)
523 std::map< const Trk::Track*, const SoMaterial* >::const_iterator
it =
m_d->
tracks2mat.find(
t);
530 std::map< const Trk::Segment*, const SoMaterial* >::const_iterator
it =
m_d->
segments2mat.find(
s);