Skip to content

Commit

Permalink
Revert "add priority mechanism in track merger"
Browse files Browse the repository at this point in the history
This reverts commit 4fafdc6.
  • Loading branch information
cerati committed Jun 8, 2014
1 parent 6f16986 commit 4c7a4e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
cms.InputTag('tobTecStepTracks')),
hasSelector=cms.vint32(1,1,1,1,1,1,1,1),
indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09),#using 0.19 for jetCoreRegionalStep?
priorities=cms.vdouble(1,0.5,1,1,1,1,1,1),
selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStep"),
cms.InputTag("jetCoreRegionalStepSelector","jetCoreRegionalStep"),
cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
Expand Down
12 changes: 4 additions & 8 deletions RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ namespace cms
foundHitBonus_ = conf.getParameter<double>("FoundHitBonus");
lostHitPenalty_ = conf.getParameter<double>("LostHitPenalty");
indivShareFrac_=conf.getParameter<std::vector<double> >("indivShareFrac");
priority_=conf.getParameter<std::vector<double> >("priorities");
std::string qualityStr = conf.getParameter<std::string>("newQuality");

if (qualityStr != "") {
Expand Down Expand Up @@ -162,10 +161,6 @@ namespace cms
// edm::LogWarning("TrackListMerger") << "No indivShareFrac for " << trackProducersTags <<". Using default value of 1";
indivShareFrac_.push_back(1.0);
}
for (unsigned int i = priority_.size(); i < numTrkColl; i++) {
// edm::LogWarning("TrackListMerger") << "No priorty for " << trackProducersTags <<". Using default value of 1";
priority_.push_back(1.0);
}

trkQualMod_=conf.getParameter<bool>("writeOnlyTrkQuals");
if ( trkQualMod_) {
Expand Down Expand Up @@ -341,8 +336,9 @@ namespace cms

algo[i]=track->algo();
int validHits=track->numberOfValidHits();
int validPixelHits=track->hitPattern().numberOfValidPixelHits();
int lostHits=track->numberOfLostHits();
score[i] = foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2();
score[i] = foundHitBonus_*validPixelHits+foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2();


rh1[i].reserve(validHits) ;
Expand Down Expand Up @@ -454,11 +450,11 @@ namespace cms
if ( dupfound ) {
float score2 = score[k2];
constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score
if (priority_[collNum] > priority_[collNum2] || score1 - score2 > almostSame ) {
if ( score1 - score2 > almostSame ) {
selected[j]=0;
selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1
trkUpdated[i]=true;
} else if (priority_[collNum] < priority_[collNum2] || score2 - score1 > almostSame ) {
} else if ( score2 - score1 > almostSame ) {
selected[i]=0;
selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1
trkUpdated[j]=true;
Expand Down
1 change: 0 additions & 1 deletion RecoTracker/FinalTrackSelectors/src/TrackListMerger.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ namespace cms
float foundHitBonus_;
float lostHitPenalty_;
std::vector<double> indivShareFrac_;
std::vector<double> priority_;

std::vector< std::vector< int> > listsToMerge_;
std::vector<bool> promoteQuality_;
Expand Down

0 comments on commit 4c7a4e3

Please sign in to comment.