diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx index 5584f0222f58681a9419494a27f58bc8293b7206..d17d201e6205444fd6c4884a15f2c48d24062654 100755 --- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx @@ -115,11 +115,11 @@ namespace { } //========================================================================== -void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, +void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, const Trk::PRDtoTrackMap *prd_to_track_map, - const Trk::RIO_OnTrack* rot, + const Trk::RIO_OnTrack* rot, const Trk::TrackStateOnSurface* tsos, - std::vector<int>& information, + std::vector<int>& information, std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const { const Identifier& id = rot->identify(); @@ -172,20 +172,20 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, } } - if ( ( m_pixelId->is_barrel(id) ) ) { + if ( ( m_pixelId->is_barrel(id) ) ) { int offset = m_pixelId->layer_disk(id); if (not hitPattern.test(offset)) information[Trk::numberOfContribPixelLayers]++; - hitPattern.set(offset); // assumes numbered consecutively - } else { - int offset = static_cast<int> (Trk::pixelEndCap0); //get int value of first pixel endcap disc + hitPattern.set(offset); // assumes numbered consecutively + } else { + int offset = static_cast<int> (Trk::pixelEndCap0); //get int value of first pixel endcap disc offset += m_pixelId->layer_disk(id); if (not hitPattern.test(offset)) information[Trk::numberOfContribPixelLayers]++; - hitPattern.set(offset); // assumes numbered consecutively + hitPattern.set(offset); // assumes numbered consecutively } - } + } if (m_doSharedHits) { - // If we are running the TIDE ambi don't count split hits as shared + // If we are running the TIDE ambi don't count split hits as shared if ( not (m_runningTIDE_Ambi and hitIsSplit) ) { // used in more than one track ? if ( isShared(prd_to_track_map, m_assoTool, *(rot->prepRawData())) ) { @@ -198,7 +198,7 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, if ( (m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==0) ) { ATH_MSG_DEBUG("--> shared Pixel hit is in innermost layer"); information[Trk::numberOfInnermostPixelLayerSharedHits]++; - } + } if ( (m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==1) ) { ATH_MSG_DEBUG("--> shared Pixel hit is in next to innermost layer"); information[Trk::numberOfNextToInnermostPixelLayerSharedHits]++; @@ -209,7 +209,7 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, } } else if (m_useSCT and m_sctId->is_sct(id) ) { - if (isOutlier and not ispatterntrack ) { // ME: outliers on pattern tracks may be reintegrated by fitter, so count them as hits + if (isOutlier and not ispatterntrack ) { // ME: outliers on pattern tracks may be reintegrated by fitter, so count them as hits information[Trk::numberOfSCTOutliers]++; } else { @@ -298,7 +298,7 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, if (m_doSharedHitsTRT) { // used in more than one track ? - assert(nformation[Trk::numberOfTRTSharedHits]>=0); + assert(information[Trk::numberOfTRTSharedHits]>=0); if ( isShared(prd_to_track_map, m_assoTool, *(rot->prepRawData())) ) { ATH_MSG_DEBUG("shared TRT hit found"); information[Trk::numberOfTRTSharedHits]++; @@ -310,22 +310,22 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, const Trk::PRDtoTrackMap *prd_to_track_map, - const Trk::CompetingRIOsOnTrack* crot, + const Trk::CompetingRIOsOnTrack* crot, const Trk::TrackStateOnSurface* tsos, - std::vector<int>& information, + std::vector<int>& information, std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const { // re-produce prior behaviour (i.e. just take most probable ROT) analyse(track, prd_to_track_map, &crot->rioOnTrack(crot->indexOfMaxAssignProb() ), tsos, information, hitPattern); } -void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track, +void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track, std::vector<int>& information, - const Trk::ParticleHypothesis partHyp) const + const Trk::ParticleHypothesis partHyp) const { ATH_MSG_DEBUG("Do hole search within HELPER, PLEASE FIX THIS AFTER 16.0.X"); m_holeSearchTool->countHoles(track, information, partHyp); - + // this is a hack, we need to run the TestBLayer Tool somewhere if (m_usePixel and not m_testBLayerTool.empty()) { @@ -345,9 +345,9 @@ void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track, } else { ATH_MSG_DEBUG("do not expect Pixel Layer 0 hit !"); information[Trk::expectInnermostPixelLayerHit] = 0; - } + } } - + //next to innermost block if (information[Trk::numberOfNextToInnermostPixelLayerHits] > 0){ information[Trk::expectNextToInnermostPixelLayerHit] = 1; @@ -358,7 +358,7 @@ void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track, } else { ATH_MSG_DEBUG("do not expect Pixel Layer 1 hit !"); information[Trk::expectNextToInnermostPixelLayerHit] = 0; - } + } } } } @@ -393,7 +393,7 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & if (rot){ const Identifier& id = rot->identify(); if ( m_doSharedHits and m_usePixel and m_pixelId->is_pixel(id) ) { - // check if shared + // check if shared bool hitIsSplit(false); if (m_runningTIDE_Ambi) { const PixelClusterOnTrack* pix =nullptr; @@ -402,7 +402,7 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & } if (pix) { const InDet::PixelCluster* pixPrd = pix->prepRawData(); - if (pixPrd and pixPrd->isSplit()) { + if (pixPrd and pixPrd->isSplit()) { summary.m_information[Trk::numberOfPixelSplitHits]++; hitIsSplit=true; if ( m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==0) summary.m_information[Trk::numberOfInnermostLayerSplitHits]++; @@ -410,7 +410,7 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & } } } - // If we are running the TIDE ambi don't count split hits as shared + // If we are running the TIDE ambi don't count split hits as shared if ( not (m_runningTIDE_Ambi and hitIsSplit) ){ if (isShared(prd_to_track_map, m_assoTool, *(rot->prepRawData()))) { ATH_MSG_DEBUG("shared Pixel hit found"); @@ -447,7 +447,7 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & void InDet::InDetTrackSummaryHelperTool::updateExpectedHitInfo(const Trk::Track &track, Trk::TrackSummary& summary) const{ if (m_usePixel and not m_testBLayerTool.empty() ) { - + if ( summary.m_information[Trk::numberOfContribPixelLayers] == 0 ) { ATH_MSG_DEBUG("No pxiels on track, so wo do not expect a B-Layer hit !"); summary.m_information[Trk::expectInnermostPixelLayerHit] = 0; @@ -464,9 +464,9 @@ void InDet::InDetTrackSummaryHelperTool::updateExpectedHitInfo(const Trk::Track } else { ATH_MSG_DEBUG("do not expect Pixel Layer 0 hit !"); summary.m_information[Trk::expectInnermostPixelLayerHit] = 0; - } + } } - + //next to innermost block if (summary.m_information[Trk::numberOfNextToInnermostPixelLayerHits] > 0){ summary.m_information[Trk::expectNextToInnermostPixelLayerHit] = 1; @@ -481,7 +481,7 @@ void InDet::InDetTrackSummaryHelperTool::updateExpectedHitInfo(const Trk::Track } } } - + return; }