Skip to content

Commit

Permalink
add check direct hit in BTL
Browse files Browse the repository at this point in the history
  • Loading branch information
martinamalberti committed Dec 12, 2024
1 parent 48600da commit 4e0326b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Validation/MtdValidation/plugins/MtdTracksValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,8 @@ void MtdTracksValidation::analyze(const edm::Event& iEvent, const edm::EventSetu
});
// Find the first direct hit in time
directSimClusIt = std::find_if(simClustersRefs.begin(), simClustersRefs.end(), [](const auto& simCluster) {
return simCluster->trackIdOffset() == 0;
MTDDetId mtddetid = simCluster->detIds_and_rows().front().first;
return (mtddetid.mtdSubDetector() == 1 && simCluster->trackIdOffset() == 0);
});
// Check if TP has direct or other sim cluster for BTL
for (const auto& simClusterRef : simClustersRefs) {
Expand Down

0 comments on commit 4e0326b

Please sign in to comment.