Determine which hits to keep on this track Look at the hits on track and decided if they should be kept on the track or rejected.
The decision focuses on the track in question and how often clusters are used Within getCleanedOutTrack (from which this is called), accepted tracks are checked to see if they are pushed over limits
674{
675
676
677 trackHitDetails.m_trkCouldBeAccepted = true;
678
679
680 trackHitDetails.m_passHadronicROI = false;
682 trackHitDetails.m_passHadronicROI = true;
683 }
684
685
686
687
688
689
690
691
692
693 bool recoverSharedHits(true);
694
695
697
699
700
702 recoverSharedHits = false;
703 }
704
705 if(trackHitDetails.m_numPixelHoles>1) { recoverSharedHits = false; }
706
707
708
709
710
711
712
714
715 if (tsosDetails.m_type[index] ==
OtherTsos) {
continue; }
716
717
718
720 trackHitDetails.m_trkCouldBeAccepted = false;
723 }
724 continue;
725 }
726
727
728 if (tsosDetails.m_type[index] ==
UnusedHit ){
729 if ( tsosDetails.m_detType[index] == 3 ) {
730 ++trackHitDetails.m_numTRT_Unused;
731 } else {
732 ++trackHitDetails.m_numUnused;
733 if ( tsosDetails.m_detType[index] == 2 ) { ++trackHitDetails.m_numSCT_Unused; }
734 }
735 continue;
736 }
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751 if( tsosDetails.m_type[index] ==
Outlier ) {
752
753
754
755 if( tsosDetails.m_hitIsShared[index]>0 ) {
756 ATH_MSG_VERBOSE( Form(
"---> Prd is outlier and shared, reject it. %d", index) );
757 rejectHit(trackHitDetails, tsosDetails, index);
760 }
761 continue;
762 }
763
764 if(trackHitDetails.m_isPatternTrack) {
765
766
767
768
769 ATH_MSG_VERBOSE ( Form(
"---> Prd is outlier on a pattern track and is unused, %d", index) );
770
772 ++trackHitDetails.m_numUnused;
773 if( tsosDetails.m_detType[index]%10 == 2 ) { ++trackHitDetails.m_numSCT_Unused; }
774 continue;
775 }
776 else {
777
778
779 ATH_MSG_DEBUG( Form(
"---> Prd is outlier on a fitted track and is unused, %d", index) );
780 continue;
781 }
782 }
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801 if( tsosDetails.m_type[index] !=
SharedHit ) {
803 }
804
805
806
807
808
809
811
812
813 int indexPreviousMeasurement = tsosDetails.findIndexOfPreviousMeasurement(index);
814 if (indexPreviousMeasurement > 0 ) {
815 ATH_MSG_VERBOSE (
"--> Previous Measurement was at : " << indexPreviousMeasurement
816 << " and was a: " << tsosDetails.m_type[indexPreviousMeasurement]
817 << " with splitprob1 " << tsosDetails.m_splitProb1[indexPreviousMeasurement]
818 << " and splitprob2 " << tsosDetails.m_splitProb2[indexPreviousMeasurement]);
819 }
820
821
822
823
824
825 if ( indexPreviousMeasurement >= 0 &&
826 tsosDetails.m_type[indexPreviousMeasurement] ==
SharedHit &&
828 clusCanBeSplit(tsosDetails.m_splitProb1[index],tsosDetails.m_splitProb2[index]) ) {
829
830
831 bool sharedbetweenthesametracks = false;
832 auto previousHitsSharedTracks = tsosDetails.m_tracksSharingHit.equal_range(indexPreviousMeasurement);
833 auto currentHitsSharedTracks = tsosDetails.m_tracksSharingHit.equal_range(index);
834 for (auto iteratorP = previousHitsSharedTracks.first;
835 iteratorP != previousHitsSharedTracks.second; ++iteratorP) {
836 for (auto iteratorC = currentHitsSharedTracks.first;
837 iteratorC != currentHitsSharedTracks.second; ++iteratorC) {
838 if ( iteratorC->second == iteratorP->second){
839 sharedbetweenthesametracks = true;
840 break;
841 }
842 }
843 if (sharedbetweenthesametracks) break;
844 }
845 if (sharedbetweenthesametracks){
847 }
848 }
849
850
851
852
853
854
855
856 if (
isTwoPartClus(tsosDetails.m_splitProb1[index],tsosDetails.m_splitProb2[index]) ) {
857
858
859
861 ATH_MSG_VERBOSE (
"---> Pixel cluster is to be split shared with another track: Split Prob1 " << tsosDetails.m_splitProb1[index] );
863 ++trackHitDetails.m_numSplitSharedPix;
864 continue;
866
867
868
869 ATH_MSG_VERBOSE (
"---> Pixel cluster is split, but must be called shared to stay on this track!");
871 continue;
872 } else {
873 ATH_MSG_VERBOSE (
"---> Pixel split but shared between too many tracks -- will be removed from the track!!!");
877 }
878 continue;
879 }
880
881
883
884
885
887 ATH_MSG_VERBOSE (
"---> Pixel cluster is to be split shared with another track: Split Prob2 " << tsosDetails.m_splitProb2[index] );
889 ++trackHitDetails.m_numSplitSharedPix;
890 continue;
892
893
894
895 ATH_MSG_VERBOSE (
"---> Pixel cluster is split, but must be called shared to stay on this track!");
897 continue;
898 } else {
899 ATH_MSG_VERBOSE (
"---> Pixel split but shared between too many tracks -- will be removed from the track!!!");
903 }
904 continue;
905 }
906
907 }
908
909 ATH_MSG_VERBOSE(
"---> Pixel cluster is not compatible with being shared (splitProb1 = "
910 << tsosDetails.m_splitProb1[index] << "), (splitProb2 = "
911 << tsosDetails.m_splitProb2[index] << ") , reject shared hit !!!");
913
915 continue;
916 } else {
917 ATH_MSG_DEBUG (
"reject track; Too many hits shared - we have to remove at least one PRD");
921 }
922 continue;
923 }
924 }
925
926
927 if( tsosDetails.m_hitIsShared[index] == 0 ) {
928 ATH_MSG_ERROR(
"A hit is not shared but is where only shared hits should be");
929 }
930
931
933 ATH_MSG_VERBOSE (
"---> Shared hit, but good track, let's enter hit in the list and try to keep it !");
934 ATH_MSG_VERBOSE (
"----- Index: "<< index <<
" Type: " << tsosDetails.m_detType[index] <<
" splitprob1 " << tsosDetails.m_splitProb1[index]);
936 continue;
937 } else {
938 ATH_MSG_DEBUG (
"reject track; Too many hits shared - we have to remove at least one PRD");
942 }
943 continue;
944 }
945 ATH_MSG_ERROR(
"Reached end of TSOS loop without a decision." );
946 }
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963 trackHitDetails.m_passConversionSel = false;
966 prd_to_track_map, trackHitDetails, tsosDetails);
967 }
968
969
970
971
972
973
974
975
976 if (
m_useHClusSeed && !trackHitDetails.m_passConversionSel && trackHitDetails.m_passHadronicROI &&
979 prd_to_track_map, trackHitDetails, tsosDetails);
980 }
981
982
983
984
985
986
987
988
989
991 if ( trackHitDetails.m_numSCT_Unused != trackHitDetails.m_numSCTHits &&
994 if ( tsosDetails.m_detType[index]==2 && tsosDetails.m_type[index] ==
SharedHit){
998 }
999 }
1000 }
1001 }
1002 }
1003
1004
1005
1006 if ( !trackHitDetails.m_isPatternTrack && trackHitDetails.m_numShared > 0) {
1007 double trackchi2 = 0;
1010 }
1011
1012
1015 ATH_MSG_DEBUG (
"Shared hits, we have a bad chi2 track, mark it as bad !");
1016
1017 for (
unsigned int index( 0 );
index != tsosDetails.m_nTSoS; ++
index ){
1018 if ( tsosDetails.m_type[index] !=
SharedHit ) {
continue; }
1022 }
1023 }
1024 }
1025 }
1026 }
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038 int newNumWeightedShared = 0;
1040 trackHitDetails.m_firstPixIsShared = false;
1041
1042 trackHitDetails.m_thisHasIBLHit = false;
1044
1045
1048 tsosDetails.m_type[index] ==
RejectedHit ){
continue; }
1049
1050
1051
1052
1053 if (tsosDetails.m_type[index] ==
SharedHit) {
1054
1055 int maxiShared = -1;
1056 int maxOtherNPixel = 0;
1057 bool maxOtherHasIBL = false;
1059 splitProbContainer, prd_to_track_map, maxiShared, maxOtherNPixel,
1060 maxOtherHasIBL, ent);
1061
1062 if (!otherPassMinUniqueHits) {
1063 ATH_MSG_DEBUG (
"reject track; Tracks shared hits does not leave enough unique hits on accepted track");
1067 }
1068 continue;
1069 }
1070
1071
1072
1073
1074
1075
1076 if( maxiShared >= ent->m_maxSharedModules ){
1077
1078
1079 if( (tsosDetails.m_detType[index] % 10 == 1) && firstMeasurement ) {
1080 ATH_MSG_DEBUG (
"reject track; Tracks shared hits pushes accepted track above shared module limit");
1084 }
1085 continue;
1086 }
1087
1088 if( trackHitDetails.m_firstPixIsShared ) {
1089 ATH_MSG_DEBUG (
"reject track; Tracks shared hits pushes accepted track above shared module limit");
1093 }
1094 continue;
1095 }
1096
1097
1098
1103 }
1104 continue;
1105 }
1106
1107 }
1108
1109
1110
1111
1112
1113 if( tsosDetails.m_detType[index] == 11 && !maxOtherHasIBL ) {
1114 ATH_MSG_VERBOSE (
"---> Remove shared IBL as MaxShared accepted does not have an IBL hit");
1118 }
1119 continue;
1120 }
1121
1122 if(tsosDetails.m_detType[index] == 1 && (trackHitDetails.m_thisHasIBLHit != maxOtherHasIBL) ) {
1123 ATH_MSG_VERBOSE (
"---> Only allow shared pixel if candidate and accepted have same IBL hit content");
1127 }
1128 continue;
1129 }
1130
1131
1132
1133 newNumWeightedShared += (tsosDetails.m_detType[
index]%10== 1 ? 2 : 1);
1134
1135 if (newNumWeightedShared >= ent->m_maxSharedModules) {
1137 << newNumWeightedShared << "\t" << ent->m_maxSharedModules);
1138 newNumWeightedShared -= (tsosDetails.m_detType[
index]%10== 1 ? 2 : 1);
1142 }
1143 continue;
1144 }
1145
1146
1147
1148 if( tsosDetails.m_detType[index] % 10 == 1 ) {
1149 if (firstMeasurement) {
1150 trackHitDetails.m_firstPixIsShared = true;
1151 }
1152 if (tsosDetails.m_detType[index] == 11 ){
1153 trackHitDetails.m_hasSharedIBLHit = true;
1154 } else if ( tsosDetails.m_detType[index] == 1 ){
1155 trackHitDetails.m_hasSharedPixel = true;
1156 }
1157 }
1158
1159 }
1160
1161 if (tsosDetails.m_detType[index] == 11 ){
1162 trackHitDetails.m_thisHasIBLHit = true;
1163 }
1165
1166 }
1167
1168
1169 if (msgLvl(MSG::VERBOSE)){
1170 trackHitDetails.dumpInfo();
1171 }
1172
1174
1175 float splitProbAvg1 = -2;
1176 if (!tsosDetails.m_splitProb1.empty()){
1177 splitProbAvg1 = std::accumulate(tsosDetails.m_splitProb1.begin(), tsosDetails.m_splitProb1.end(), 0.0) / tsosDetails.m_splitProb1.size();
1178 }
1179 float splitProbAvg2 = -2;
1180 if (!tsosDetails.m_splitProb2.empty()){
1181 splitProbAvg2 = std::accumulate(tsosDetails.m_splitProb2.begin(), tsosDetails.m_splitProb2.end(), 0.0) / tsosDetails.m_splitProb2.size();
1182 }
1184 trackHitDetails.m_numPixelHoles,
1185 trackHitDetails.m_numSCTHoles,
1186 trackHitDetails.m_numSplitSharedPix,
1187 trackHitDetails.m_numSplitSharedSCT,
1188 -2,
1189 -2,
1190 trackHitDetails.m_numShared,
1191 trackHitDetails.m_isPatternTrack,
1192 trackHitDetails.totalSiHits(),
1193 trackHitDetails.m_passHadronicROI,
1194 trackHitDetails.m_thisHasIBLHit,
1195 trackHitDetails.m_hasSharedIBLHit,
1196 trackHitDetails.m_hasSharedPixel,
1197 trackHitDetails.m_firstPixIsShared,
1198 trackHitDetails.m_numPixelDeadSensor,
1199 trackHitDetails.m_numSCTDeadSensor,
1200 trackHitDetails.m_numPixelHits,
1201 trackHitDetails.m_numSCTHits,
1202 trackHitDetails.m_numUnused,
1203 trackHitDetails.m_numTRT_Unused,
1204 trackHitDetails.m_numSCT_Unused,
1205 trackHitDetails.m_numPseudo,
1206 splitProbAvg1,
1207 splitProbAvg2,
1208 trackHitDetails.m_numWeightedShared);
1209 }
1210
1211 }
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
double chiSquared() const
returns the of the overall track fit
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
const xAOD::UncalibratedMeasurement * firstMeasurement(const xAOD::MuonSegment &segment, const bool skipOutlier=true)
Retrieves the first measurement associated with the segment.
@ pixelSplitButTooManyShared3Ptc
@ pixelSplitButTooManyShared2Ptc
@ tooManySharedNonRecoverable
@ firstHitSharedAndPixIBL
@ sharedHitsNotEnoughUniqueHits
@ firstHitSharedAndExtraShared
@ sharedIBLSharedWithNoIBLTrack
@ sharedPixelSharedWithDifferentIBLTrack
@ tooManySharedAfterIncreasingShared
@ tooManySharedRecoverable
@ sharedHitsNotEnoughUniqueSiHits