399{
400 double hlw =
colhandle->highLightWeight();
401
402
404 std::map<SoMaterial*,double> materials;
405
408
410 for (
unsigned i = 0;
i <
ts->tracks.size(); ++
i) {
412 if (mat)
414 else
415 std::cout<< "PRDHandleBase ERROR: Did not find track material!"<<std::endl;
416 }
417 }
418
420 for (
unsigned i = 0;
i <
ts->segments.size(); ++
i) {
422 if (mat)
424 else
425 std::cout<< "PRDHandleBase ERROR: Did not find segment material (2)!"<<std::endl;
426 }
427 }
428 if (hlw>0.0&&
colhandle->highLightOutliers()) {
429
430 if (
colhandle->colourByTracks()&&!
ts->tracks_outliers.empty()) {
431 if (hlw>999.0) {
432 materials[
colhandle->highLightMaterial()] =
ts->tracks_outliers.size();
433 } else {
434 for (
unsigned i = 0;
i <
ts->tracks_outliers.size(); ++
i) {
436 if (mat)
437 materials[
mat]=1.0/(hlw+1.0);
438 else
439 std::cout<< "PRDHandleBase ERROR: Did not find track material (3)!"<<std::endl;
440 }
441 materials[
colhandle->highLightMaterial()] =
ts->tracks_outliers.size()*hlw/(hlw+1.0);
442 }
443 }
444 } else {
445
447 for (
unsigned i = 0;
i <
ts->tracks_outliers.size(); ++
i) {
449 if (mat)
451 else
452 std::cout<< "PRDHandleBase ERROR: Did not find track material (4)!"<<std::endl;
453 }
454 }
456 unsigned ntrackssegments= (
colhandle->colourByTracks()?
ts->tracks.size()+
ts->tracks_outliers.size():0)
457 +(
colhandle->colourBySegments()?
ts->segments.size():0);
458 if (ntrackssegments)
459 materials[
colhandle->highLightMaterial()] = hlw*ntrackssegments;
460 }
461 }
462 if (!materials.empty())
464 }
465 }
466
467
468
470 if (hlw>999.0)
473 } else {
475 }
476}
virtual const Trk::PrepRawData * getPRD() const =0
PRDSysCommonData * common() const
virtual bool highLight() const
PRDTrackSegmentHelper * trackAndSegmentHelper() const
VP1SoMaterialMixer * materialMixer() const
SoMaterial * trackMaterial(const Trk::Track *) const
const TracksAndSegments * tracksAndSegments(const Trk::PrepRawData *)
SoMaterial * segmentMaterial(const Trk::Segment *) const
SoMaterial * getMixedMaterial(const std::set< SoMaterial * > &)