Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions TrkReco/src/RobustHelixFinderData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ namespace mu2e {
_nXYSh = 0;
_nZPhiSh = 0;

_nStrawHits = 0;
_nComboHits = 0;

_nFiltComboHits = 0;
_nFiltStrawHits = 0;

//clear the panel-based structure
for (int f=0; f<StrawId::_ntotalfaces; ++f) {
FaceZ_t* facez = &_oTracker[f];
Expand Down
2 changes: 1 addition & 1 deletion TrkReco/src/RobustHelixFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ bool RobustHelixFit::initFZ_2(RobustHelixFinderData& HelixData) {
for (int n=nmin; n<=nmax; n++) { //
double x = dphidz + n*2*M_PI/dz;
int bin = (x-minX)/stepX;
hist[bin] += weight;
if(bin >= 0 && bin < int(nbinsX)) hist[bin] += weight;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions TrkReco/src/SelectReflections_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace mu2e {
}
}
// if no intersections found, skip testing for a match with this track
if(uptrkiinter == upks.intersections().end())break;
if(uptrkiinter == upks.intersections().end())continue;
// otherwise, search for a matching downstream track
for(size_t idown = 0; idown <downksc.size(); ++idown){
auto const& downks = downksc[idown];
Expand Down Expand Up @@ -130,7 +130,7 @@ namespace mu2e {
ibest = 0;
if(matches.size()>1){
if(debug_ > 1) std::cout << "Selecting best reflection pair from " << matches.size() << " candidates " << std::endl;
double value = std::numeric_limits<float>::max();
double value = std::numeric_limits<double>::max();
for (size_t imatch = 0; imatch < matches.size(); ++imatch) {
auto const& match = matches[imatch];
if(selbest_ == mom && -std::get<2>(match) < value){
Expand Down
5 changes: 3 additions & 2 deletions TrkReco/src/SelectSameTrack_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace mu2e {
}
}
// if no intersections found, skip testing for a match with this track
if(pritrkiinter == priks.intersections().end())break;
if(pritrkiinter == priks.intersections().end())continue;
// otherwise, search for a matching secondary track
for(size_t isec = 0; isec <secksc.size(); ++isec){
auto const& secks = secksc[isec];
Expand All @@ -140,6 +140,7 @@ namespace mu2e {
for(auto const& hit: priks.hits()){
if(hit._ambig > WireHitState::inactive)prihits.insert(hit._index);
}
if(prihits.empty()) continue;
unsigned nover(0);
for(auto const& hit: secks.hits()){
if(hit._ambig > WireHitState::inactive && prihits.find(hit._index) != prihits.end())++nover;
Expand All @@ -162,7 +163,7 @@ namespace mu2e {
ibest = 0;
if(matches.size()>1){
if(debug_ > 1) std::cout << "Selecting best reflection pair from " << matches.size() << " candidates " << std::endl;
double value = std::numeric_limits<float>::max();
double value = std::numeric_limits<double>::max();
for (size_t imatch = 0; imatch < matches.size(); ++imatch) {
auto const& match = matches[imatch];
if(selbest_ == mom && -match.primom_ < value){
Expand Down
1 change: 1 addition & 0 deletions TrkReco/src/SimpleKalSeedSelector_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace mu2e {
if (hit.strawHitState() > WireHitState::inactive) ++ntest;
}

if(ntest + ncurrent == 0) return test.fitConsistency() > current.fitConsistency();
float nhitfrac = 2*float(ntest - ncurrent)/float(ntest + ncurrent);
if(fabs(nhitfrac) > minsignhit_){
// hit difference is significant;
Expand Down
4 changes: 2 additions & 2 deletions TrkReco/src/TrackMatching_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ namespace mu2e

std::vector<KalSeedCluster> clusters;
for(auto& handle : handles) {
const size_t ntrks = handle->size();
for(size_t itrk = 0; itrk < ntrks; ++itrk) {
const size_t ntrks_handle = handle->size();
for(size_t itrk = 0; itrk < ntrks_handle; ++itrk) {
KalSeedPtr ptr(handle, itrk);
clusters.push_back(KalSeedCluster({ptr}));
}
Expand Down
1 change: 1 addition & 0 deletions TrkReco/src/TrkUtilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace mu2e {
}
// compute the overlap between 2 clusters
double overlap(SHIV const& shiv1, SHIV const& shiv2) {
if(shiv1.empty() || shiv2.empty()) return 0.0;
double over(0.0);
double norm = std::min(shiv1.size(),shiv2.size());
// count the overlapping hits
Expand Down