41 double highestPID = -2.0;
42 double bestTrackLength = 0.0;
48 for(
size_t c = 0;
c < sliceTracks.size(); ++
c){
57 if(tracksToMuonID.isValid()){
61 if(trackMuonID->
Value() < highestPID)
64 if(trackMuonID->
Value() == highestPID)
66 if (sliceTracks[
c]->TotalLength() < bestTrackLength)
continue;
69 if (sliceTracks[
c]->TotalLength() == bestTrackLength){
72 if (sliceTracks[
c]->Start().Z() > bestStartZ)
continue;
76 if (sliceTracks[
c]->Start().Z() == bestStartZ){
78 if(sliceTracks[
c]->TotalADC() > bestADC)
continue;
80 if(sliceTracks[
c]->TotalADC() == bestADC)
82 <<
"Can't break a tie between two MuonID/tracks. " 83 <<
"This should have never happened, but it did. " <<
std::endl;
88 highestPID = trackMuonID->
Value();
89 bestTrackLength = sliceTracks[
c]->TotalLength();
90 bestStartZ = sliceTracks[
c]->Start().Z();
91 bestADC = sliceTracks[
c]->TotalADC();
101 return (
unsigned int)bestTrack;
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
::xsd::cxx::tree::exception< char > exception
Perform a "2 point" Hough transform on a collection of hits.
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
unsigned int HighestPIDTrack(const std::vector< art::Ptr< rb::Track > > &sliceTracks, const std::string &muonidModuleLabel, const art::Event &e)