751{
752
754
756
757
760 shape_simple->addChild(mat);
761 shape_detailed->addChild(mat);
764 shape_simple->addChild(mat);
765 shape_detailed->addChild(mat);
766 }
767
768 if (
common()->controller()->drawMeasGlobalPositions()){
769
770
771
772
773
774 SoTranslation * theTransform = new SoTranslation;
776
777
778
779
780
781
783 theTransform->translation.setValue( locPos.x(), locPos.y(), locPos.z());
784
785
786
787
788
789
790
791
792
793
794 SoSeparator * gpSep = new SoSeparator;
795
796 gpSep->addChild(theTransform);
797 gpSep->addChild(
common()->nodeManager().getShapeNode_Cross(50));
798 shape_detailed->addChild(gpSep);
799 }
800
801
804
805 if (showcRioOnTrack){
806
807
808 SoSeparator * rotSepSimple = new SoSeparator;
809 SoSeparator * rotSepDetailed = new SoSeparator;
810
811
813
815 shape_detailed->addChild(rotSepDetailed);
816 shape_simple->addChild(rotSepSimple);
817
818
819
820 SoTransparency * transparent = new SoTransparency;
822 shape_detailed->addChild( transparent );
823
824 const Trk::RIO_OnTrack* rot = &(crio->
rioOnTrack(maxProb));
825
826 if (!rot) {
VP1Msg::message(
"WARNING: cROT has empty max prob ROT. Aborting.");
return;}
827
829
830 const MuonGM::TgcReadoutElement* tgcDetEl =
831 dynamic_cast<const MuonGM::TgcReadoutElement*
>(rot->
detectorElement());
832 const MuonGM::RpcReadoutElement* rpcDetEl =
833 dynamic_cast<const MuonGM::RpcReadoutElement*
>(rot->
detectorElement());
834
835
836 if ( (!tgcDetEl) && (!rpcDetEl)) {
VP1Msg::message(
"WARNING: most prob ROT from cROT has Unknown DE type. Aborting."); std::cout<<*rot<<std::endl;
return;}
837
838
839
840
841
842
843
844
845 const Trk::Surface* lastSurf=&(crio->
rioOnTrack(maxProb).associatedSurface());
846
847
849 for (
unsigned int n = 0;
n < nrio;
n++)
850 {
851 if (n==maxProb) continue;
852
853 const Trk::RIO_OnTrack* rot = &(crio->
rioOnTrack(n));
854
855
856 if (!rot) {
VP1Msg::message(
"WARNING: cROT has empty ROT. Skipping.");
continue;}
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877 SoSeparator * rotSepSimple = new SoSeparator;
878 SoSeparator * rotSepDetailed = new SoSeparator;
879
881
882
883
884
886
887
888
890
891
892 SoTranslation * theTransform = new SoTranslation;
893 theTransform->translation.setValue( locPos.x(), locPos.y(), locPos.z());
894 rotSepDetailed->addChild(theTransform);
895 rotSepSimple->addChild(theTransform);
896 }
897
898
899
900
901
902
904 shape_simple->addChild(rotSepSimple);
905 shape_detailed->addChild(rotSepDetailed);
906
907
908
909
910 }
911 }
912}
void addRIO_OnTrackInfoToShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed, const Trk::RIO_OnTrack *rio, bool blockDrawingOfGP=false)
HitToSoNode m_hitToSoNode
static void ensureInitSeps(SoSeparator *&shape_simple, SoSeparator *&shape_detailed)
TrackSysCommonData * common() const
TrackHandleBase * trackHandle() const
TrackSystemController * controller() const
SoMaterial * customMatMeasurementsOutliers() const
SoMaterial * customMatMeasurements() const
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
virtual const Surface & associatedSurface() const override=0
returns the surface for the local to global transformation
const Amg::Vector3D & center() const
Returns the center position of the Surface.
static void message(const QString &, IVP1System *sys=0)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Eigen::Matrix< double, 3, 1 > Vector3D