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
990 if ( trackHitDetails.m_numSCT_Unused != trackHitDetails.m_numSCTHits &&
993 if ( tsosDetails.m_detType[index]==2 && tsosDetails.m_type[index] ==
SharedHit){
997 }
998 }
999 }
1000 }
1001
1002
1003
1004 if ( !trackHitDetails.m_isPatternTrack && trackHitDetails.m_numShared > 0) {
1005 double trackchi2 = 0;
1008 }
1009
1010
1012 ATH_MSG_DEBUG (
"Shared hits, we have a bad chi2 track, mark it as bad !");
1013
1015 if ( tsosDetails.m_type[index] !=
SharedHit ) {
continue; }
1019 }
1020 }
1021 }
1022 }
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034 int newNumWeightedShared = 0;
1035 bool firstMeasurement(true);
1036 trackHitDetails.m_firstPixIsShared = false;
1037
1038 trackHitDetails.m_thisHasIBLHit = false;
1040
1041
1044 tsosDetails.m_type[index] ==
RejectedHit ){
continue; }
1045
1046
1047
1048
1049 if (tsosDetails.m_type[index] ==
SharedHit) {
1050
1051 int maxiShared = -1;
1052 int maxOtherNPixel = 0;
1053 bool maxOtherHasIBL = false;
1055 splitProbContainer, prd_to_track_map, maxiShared, maxOtherNPixel,
1056 maxOtherHasIBL, ent);
1057
1058 if (!otherPassMinUniqueHits) {
1059 ATH_MSG_DEBUG (
"reject track; Tracks shared hits does not leave enough unique hits on accepted track");
1063 }
1064 continue;
1065 }
1066
1067
1068
1069
1070
1071
1072 if( maxiShared >= ent->m_maxSharedModules ){
1073
1074
1075 if( (tsosDetails.m_detType[index] % 10 == 1) && firstMeasurement ) {
1076 ATH_MSG_DEBUG (
"reject track; Tracks shared hits pushes accepted track above shared module limit");
1080 }
1081 continue;
1082 }
1083
1084 if( trackHitDetails.m_firstPixIsShared ) {
1085 ATH_MSG_DEBUG (
"reject track; Tracks shared hits pushes accepted track above shared module limit");
1089 }
1090 continue;
1091 }
1092
1093
1094
1099 }
1100 continue;
1101 }
1102
1103 }
1104
1105
1106
1107
1108
1109 if( tsosDetails.m_detType[index] == 11 && !maxOtherHasIBL ) {
1110 ATH_MSG_VERBOSE (
"---> Remove shared IBL as MaxShared accepted does not have an IBL hit");
1114 }
1115 continue;
1116 }
1117
1118 if(tsosDetails.m_detType[index] == 1 && (trackHitDetails.m_thisHasIBLHit != maxOtherHasIBL) ) {
1119 ATH_MSG_VERBOSE (
"---> Only allow shared pixel if candidate and accepted have same IBL hit content");
1123 }
1124 continue;
1125 }
1126
1127
1128
1129 newNumWeightedShared += (tsosDetails.m_detType[
index]%10== 1 ? 2 : 1);
1130
1131 if (newNumWeightedShared >= ent->m_maxSharedModules) {
1133 << newNumWeightedShared << "\t" << ent->m_maxSharedModules);
1134 newNumWeightedShared -= (tsosDetails.m_detType[
index]%10== 1 ? 2 : 1);
1138 }
1139 continue;
1140 }
1141
1142
1143
1144 if( tsosDetails.m_detType[index] % 10 == 1 ) {
1145 if (firstMeasurement) {
1146 trackHitDetails.m_firstPixIsShared = true;
1147 }
1148 if (tsosDetails.m_detType[index] == 11 ){
1149 trackHitDetails.m_hasSharedIBLHit = true;
1150 } else if ( tsosDetails.m_detType[index] == 1 ){
1151 trackHitDetails.m_hasSharedPixel = true;
1152 }
1153 }
1154
1155 }
1156
1157 if (tsosDetails.m_detType[index] == 11 ){
1158 trackHitDetails.m_thisHasIBLHit = true;
1159 }
1160 if (firstMeasurement && tsosDetails.m_type[index] !=
OtherTsos){ firstMeasurement =
false; }
1161
1162 }
1163
1164
1165 if (msgLvl(MSG::VERBOSE)){
1166 trackHitDetails.dumpInfo();
1167 }
1168
1170
1171 float splitProbAvg1 = -2;
1172 if (!tsosDetails.m_splitProb1.empty()){
1173 splitProbAvg1 = std::accumulate(tsosDetails.m_splitProb1.begin(), tsosDetails.m_splitProb1.end(), 0.0) / tsosDetails.m_splitProb1.size();
1174 }
1175 float splitProbAvg2 = -2;
1176 if (!tsosDetails.m_splitProb2.empty()){
1177 splitProbAvg2 = std::accumulate(tsosDetails.m_splitProb2.begin(), tsosDetails.m_splitProb2.end(), 0.0) / tsosDetails.m_splitProb2.size();
1178 }
1180 trackHitDetails.m_numPixelHoles,
1181 trackHitDetails.m_numSCTHoles,
1182 trackHitDetails.m_numSplitSharedPix,
1183 trackHitDetails.m_numSplitSharedSCT,
1184 -2,
1185 -2,
1186 trackHitDetails.m_numShared,
1187 trackHitDetails.m_isPatternTrack,
1188 trackHitDetails.totalSiHits(),
1189 trackHitDetails.m_passHadronicROI,
1190 trackHitDetails.m_thisHasIBLHit,
1191 trackHitDetails.m_hasSharedIBLHit,
1192 trackHitDetails.m_hasSharedPixel,
1193 trackHitDetails.m_firstPixIsShared,
1194 trackHitDetails.m_numPixelDeadSensor,
1195 trackHitDetails.m_numSCTDeadSensor,
1196 trackHitDetails.m_numPixelHits,
1197 trackHitDetails.m_numSCTHits,
1198 trackHitDetails.m_numUnused,
1199 trackHitDetails.m_numTRT_Unused,
1200 trackHitDetails.m_numSCT_Unused,
1201 trackHitDetails.m_numPseudo,
1202 splitProbAvg1,
1203 splitProbAvg2,
1204 trackHitDetails.m_numWeightedShared);
1205 }
1206
1207 }
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
@ pixelSplitButTooManyShared3Ptc
@ pixelSplitButTooManyShared2Ptc
@ tooManySharedNonRecoverable
@ firstHitSharedAndPixIBL
@ sharedHitsNotEnoughUniqueHits
@ firstHitSharedAndExtraShared
@ sharedIBLSharedWithNoIBLTrack
@ sharedPixelSharedWithDifferentIBLTrack
@ tooManySharedAfterIncreasingShared
@ tooManySharedRecoverable
@ sharedHitsNotEnoughUniqueSiHits