Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #255 from SegmentLinking/fix_dr
Browse files Browse the repository at this point in the history
Fix duplicate rate bug
  • Loading branch information
VourMa authored Mar 21, 2023
2 parents 579b9d0 + 21e0f25 commit ff3e086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions code/core/write_sdl_ntuple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ void setOutputBranches(SDL::Event* event)
// Intermediate variables to keep track of matched track candidates for a given sim track
std::vector<int> sim_TC_matched(n_accepted_simtrk);
std::vector<int> sim_TC_matched_mask(n_accepted_simtrk);
std::vector<int> sim_TC_matched_for_duplicate(trk.sim_pt().size());

// Intermediate variables to keep track of matched sim tracks for a given track candidate
std::vector<std::vector<int>> tc_matched_simIdx;
Expand Down Expand Up @@ -258,6 +259,7 @@ void setOutputBranches(SDL::Event* event)
sim_TC_matched.at(idx) += 1;
sim_TC_matched_mask.at(idx) |= (1 << type);
}
sim_TC_matched_for_duplicate.at(idx) += 1;
}
}

Expand All @@ -272,12 +274,9 @@ void setOutputBranches(SDL::Event* event)
{
// Using the sim_TC_matched to see whether this track candidate is matched to a sim track that is matched to more than one
int simidx = tc_matched_simIdx[i][isim];
if (simidx < n_accepted_simtrk)
if (sim_TC_matched_for_duplicate[simidx] > 1)
{
if (sim_TC_matched[simidx] > 1)
{
isDuplicate = true;
}
isDuplicate = true;
}
}
tc_isDuplicate[i] = isDuplicate;
Expand Down
2 changes: 1 addition & 1 deletion setup_hpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export TRACKLOOPERDIR=$DIR
export TRACKINGNTUPLEDIR=/blue/p.chang/p.chang/data/lst/CMSSW_12_2_0_pre2
export PIXELMAPDIR=/blue/p.chang/p.chang/data/lst/pixelmap_neta20_nphi72_nz24_ipt2
export LSTOUTPUTDIR=.
export LSTPERFORMANCEWEBDIR=/blue/p.chang/users/phchang/public_html/LSTPerformanceWeb
export LSTPERFORMANCEWEBDIR=/home/users/phchang/public_html/LSTPerformanceWeb

###########################################################################################################
# Validation scripts
Expand Down

0 comments on commit ff3e086

Please sign in to comment.