Skip to content

Commit

Permalink
Update StETofMatchMaker.cxx
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickSoehngen authored Sep 8, 2024
1 parent abbcde3 commit 5b3f96c
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions StRoot/StETofMatchMaker/StETofMatchMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3260,9 +3260,7 @@ StETofMatchMaker::sortMatchCases( eTofHitVec inputVec , std::map< Int_t, eTofHi
std::vector< int > trackIdVec;
std::vector< int > hitIdVec;
trackIdVec.clear();
trackIdVec.resize(0);
hitIdVec.clear();
hitIdVec.resize(0);
tempIter = tempVec.begin();
storeVecTmp.push_back(tempVec.at(0));
trackIdVec.push_back(tempVec.at(0).trackId);
Expand Down Expand Up @@ -3941,14 +3939,12 @@ StETofMatchMaker::sortOutOlDoubles(eTofHitVec& finalMatchVec){

}
}
}else{
continue;
}
}

eTofHitVec tmpVec;
eTofHitVec OlVec;
std::map< Int_t, eTofHitVec > overlapHitMap;
std::map< int , eTofHitVec > overlapHitMap;

tmpVec = finalMatchVec;
finalMatchVec.clear();
Expand Down Expand Up @@ -3989,17 +3985,32 @@ StETofMatchMaker::sortOutOlDoubles(eTofHitVec& finalMatchVec){
}

//fix matchFlags
// New match-flag scheme provides information on hit-type, match case, and overlap
// 0: no valid match, otherwise 3 digits encode at first position hit type , at second position overlap info and at third position match type
// hit types : 0 = single sided hits only (time resolution about 25 ps lower than for normal hits)
// hit types : 1 = single sided and normal hits got merged into "mixed hit" for matching
// hit types : 2 = normal hits only (best quality , most common case)
// overlap info : 0 = hit has no contribution from overlap
// overlap info : 1 = hit has only contributions from overlap
// overlap info : 2 = hit has contributions from inside and outside of overlap region
// match case : 0 = no match
// match case : 1 = match from cluster of multiple hits and multiple tracks close in space ( ambiguities leave room for missmatches -> frequent case for most central events!!)
// match case : 2 = single hit could have been matched to multiple tracks
// match case : 3 = single track could have been matched to multiple hits
// match case : 4 = single track matched to single hit ( no ambiguity -> best quality)
// example :: matchFlag = 204 -> 2 = only normal hits, 0 = not in overlap, 4 = single track single hit match

for(unsigned int i =0; i< finalMatchVec.size(); i++){

char singlemixdouble = 9;
char matchcase = 9;
char isOl = 9;

switch (finalMatchVec.at(i).matchFlag / 100) {
case 1 : matchcase = 3; break;
case 2 : matchcase = 2; break;
case 3 : matchcase = 1; break;
case 4 : matchcase = 0; break;
case 1 : matchcase = 4; break;
case 2 : matchcase = 3; break;
case 3 : matchcase = 2; break;
case 4 : matchcase = 1; break;
default : { LOG_WARN << "Errant ETOF match flag for matchcase!" << endm; }
}

Expand Down

0 comments on commit 5b3f96c

Please sign in to comment.