5 #ifndef SORTSEGMENTSBYNUMBEROFHITS_H
6 #define SORTSEGMENTSBYNUMBEROFHITS_H
15 bool operator()(
const std::unique_ptr<MuonSegment>& seg1,
const std::unique_ptr<MuonSegment>& seg2) {
16 unsigned int nhits1 = seg1->containedMeasurements().size();
17 unsigned int nhits2 = seg2->containedMeasurements().size();
18 if (nhits1 > nhits2)
return true;
19 if (nhits1 < nhits2)
return false;
24 if (!fq1 && fq2)
return false;
25 if (fq1 && !fq2)
return true;
26 if (!fq1 && !fq2) {
return true; }
34 return chi2Ndof1 < chi2Ndof2;