|
ATLAS Offline Software
|
#include <SegmentFinder.h>
|
| SegmentFinder () |
|
| SegmentFinder (const SegmentFinder &)=delete |
| copy c'tor deleted to prevent ownership/leak issues More...
|
|
SegmentFinder & | operator= (const SegmentFinder &)=delete |
| assignment deleted to prevent ownership/leak issues More...
|
|
| SegmentFinder (double roadWidth, double deltaCut, bool fullScan) |
|
| ~SegmentFinder () |
|
void | handleHits (const DCVec &dcs, const CLVec &clusters, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const |
|
SegVec | findSegments (const DCVec &dcs) const |
|
SegVec | findSegments (const DCVec &dcs, const CLVec &clusters) const |
|
SegVec | cleanSegments (const SegVec &segments) const |
|
SegVec | refitSegments (const SegVec &segs) const |
|
bool | dropHits (Segment &segment, bool &hasDroppedHit, unsigned int &dropDepth) const |
|
void | setTGCPullCut (double cut) |
|
void | setRPCPullCut (double cut) |
|
void | setRecoverMDT (bool doRecover) |
|
void | setDropHits (bool doDrop) |
|
void | setSeedCleaning (bool doCleanup) |
|
void | setSingleMultiLayerScan (bool doScan) |
|
void | setChi2DropCut (double chi2) |
|
void | setDeltaCut (double cut) |
|
void | setRatioEmptyTubesCut (double ratioEmptyTubesCut) |
|
void | setMdtGeometry (const ChamberGeometry *mdtGeo) |
|
void | setPhiRoad (double phiRoad, double phiChamber, double sinPhiCut=0.2, bool useRoadPhi=true, bool useChamberPhi=true) |
|
void | setSortSegmentsUsingAllHits (bool doAllHitsSort) |
|
void | setUseChamberPhi (bool useChamberPhi) |
|
void | setRemoveSingleOutliers (bool removeSingleOutliers) |
|
void | setCurvedSegmentFinder (bool doCurvedSegmentFinder) |
|
void | setFitter (std::shared_ptr< const DCSLFitter > fitter) |
|
void | setMaxDropDepth (int max) |
|
void | setResidualCutT0 (double resCut) |
|
void | setDeltaCutT0 (double deltaCut) |
|
void | setUseSegmentQuality (bool useQ) |
|
void | debugLevel (int debugLevel) |
|
|
unsigned int | emptyCrossedTubes (const Line &line, const DCVec &closeEmptyTubes) const |
|
DCVec | emptyNeighbours (const DCVec &dcs) const |
|
void | handleSeedPair (const DriftCircle &seed1, const DriftCircle &seeds2, const DCVec &dcs, const CLVec &cls, MatchDCWithLine &matchWithLine, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const |
|
void | fullScan (const DCVec &seeds, const DCVec &dcs, const CLVec &cls, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const |
|
void | twoMultiLayerScan (const DCVec &seeds_ml1, const DCVec &seeds_ml2, const DCVec &dcs, const CLVec &cls, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const |
|
bool | directionCheck (const LocVec2D &LocVec2D) const |
|
void | associateClusters (SegVec &segs, const CLVec &cls) const |
|
void | associateClusters (Segment &seg, const CLVec &cls) const |
|
void | crossedTubes (Segment &seg) const |
|
bool | goodHitRatio (Segment &seg) const |
|
void | updateDirections () |
| update the cached values for the phi road and chamber road More...
|
|
void | printSettings () const |
| print settings More...
|
|
double | tubeRadius () const |
|
Definition at line 32 of file SegmentFinder.h.
◆ SegmentFinder() [1/3]
TrkDriftCircleMath::SegmentFinder::SegmentFinder |
( |
| ) |
|
◆ SegmentFinder() [2/3]
copy c'tor deleted to prevent ownership/leak issues
◆ SegmentFinder() [3/3]
TrkDriftCircleMath::SegmentFinder::SegmentFinder |
( |
double |
roadWidth, |
|
|
double |
deltaCut, |
|
|
bool |
fullScan |
|
) |
| |
◆ ~SegmentFinder()
TrkDriftCircleMath::SegmentFinder::~SegmentFinder |
( |
| ) |
|
Definition at line 37 of file SegmentFinder.cxx.
39 std::lock_guard<std::mutex> lock(
m_mutex);
40 std::cout <<
" drop summary " << std::endl;
41 for (
unsigned int i = 0;
i <
m_dropDepthMax + 1; ++
i) { std::cout <<
" Accepted " << m_dropDepthAcceptCounts[
i] << std::endl; }
42 for (
unsigned int i = 0;
i <
m_dropDepthMax; ++
i) { std::cout <<
" Rejected " << m_dropDepthRejectCounts[
i] << std::endl; }
◆ associateClusters() [1/2]
void TrkDriftCircleMath::SegmentFinder::associateClusters |
( |
Segment & |
seg, |
|
|
const CLVec & |
cls |
|
) |
| const |
|
protected |
Definition at line 919 of file SegmentFinder.cxx.
921 ResidualWithSegment resSeg(seg);
926 bool hasClustersBefore =
false;
927 bool hasClustersAfter =
false;
931 for (; cit != cit_end; ++cit) {
933 if (cit->id().measuresPhi() == 1) {
935 std::cout <<
" phi hit, not associated: id " << cit->id().id() <<
" pos " << cit->position() << std::endl;
940 double res = resSeg.residual(*cit);
941 double error = std::sqrt(cit->err() * cit->err() + resSeg.trackError2(*cit));
945 std::cout <<
" handling cluster " << cit->id() <<
" res " <<
res <<
" pull " <<
pull <<
" hit error " << cit->err()
946 <<
" track error " << sqrt(resSeg.trackError2(*cit)) <<
" pos " << cit->position();
951 if (std::abs(
pull) < pullCut) {
952 assCls.push_back(*cit);
953 if (cit->position().y() < 0.) hasClustersBefore =
true;
954 if (cit->position().y() > 0.) hasClustersAfter =
true;
955 if (
m_debugLevel >= 4) std::cout <<
" associated" << std::endl;
957 if (
m_debugLevel >= 4) std::cout <<
" dropped" << std::endl;
961 if (assCls.empty())
return;
963 seg.clusters(assCls);
964 unsigned int ncl = 0;
965 if (hasClustersBefore) ++ncl;
966 if (hasClustersAfter) ++ncl;
967 seg.clusterLayers(ncl);
◆ associateClusters() [2/2]
void TrkDriftCircleMath::SegmentFinder::associateClusters |
( |
SegVec & |
segs, |
|
|
const CLVec & |
cls |
|
) |
| const |
|
protected |
◆ cleanSegments()
SegVec TrkDriftCircleMath::SegmentFinder::cleanSegments |
( |
const SegVec & |
segments | ) |
const |
Definition at line 616 of file SegmentFinder.cxx.
621 if (segments.size() <= 1)
return segments;
628 std::stable_sort(segments.begin(), segments.end(), SortSegByNumberOfHitsAndChi2());
630 std::stable_sort(segments.begin(), segments.end(), SortSegByNumberOfMDTHitsAndChi2());
633 std::cout <<
" sorting segments " << std::endl;
634 for (
auto &
segment : segments) { std::cout <<
segment << std::endl; }
637 selectedSegments.push_back(segments.front());
640 SharedHitsSegments sharedHits(
false);
643 SegIt it = segments.begin() + 1;
644 SegIt it_end = segments.end();
645 for (;
it != it_end; ++
it) {
646 unsigned int shareHits(0);
648 for (
auto & selectedSegment : selectedSegments) {
650 shareHits = sharedHits(*
it, selectedSegment);
651 if (shareHits != 0) {
652 unsigned int nmdtHitsIt =
it->hitsOnTrack();
653 unsigned int nmdtHitsSit = selectedSegment.hitsOnTrack();
656 if (
it->hasCurvatureParameters()) {
657 if (selectedSegment.hasCurvatureParameters())
continue;
658 if (shareHits ==
it->hitsOnTrack()) {
659 if ((selectedSegment.chi2() <
it->chi2()) || (std::abs(
it->deltaAlpha()) < 0.01)) {
663 }
else if (selectedSegment.hasCurvatureParameters()) {
664 if (std::abs(
it->line().phi() - selectedSegment.line().phi()) < 0.05 &&
665 std::abs(
it->deltaAlpha() - selectedSegment.deltaAlpha()) < 0.01) {
666 ResidualWithLine resWithLine(
it->line());
667 if (std::abs(resWithLine.residual(selectedSegment.line().position())) < 0.1) {
674 selectedSegment.ambigue(2);
680 if (nmdtHitsSit > nmdtHitsIt) {
686 if (!selectedSegment.clusters().empty() &&
it->clusters().empty()) {
690 if (std::abs(
it->chi2() - selectedSegment.chi2()) > selectedSegment.hitsOnTrack()) {
696 if (std::abs(
it->line().phi() - selectedSegment.line().phi()) < 0.05) {
697 ResidualWithLine resWithLine(
it->line());
698 if (std::abs(resWithLine.residual(selectedSegment.line().position())) < 0.1) {
705 selectedSegment.ambigue(2);
709 selectedSegments.push_back(*
it);
711 if (shareHits != 0) selectedSegments.back().ambigue(2);
715 return selectedSegments;
◆ crossedTubes()
void TrkDriftCircleMath::SegmentFinder::crossedTubes |
( |
Segment & |
seg | ) |
const |
|
protected |
Definition at line 793 of file SegmentFinder.cxx.
799 unsigned int tubesMl1 {0}, tubesMl2 {0};
802 for (; doit != doit_end; ++doit) {
805 if (doit->id().ml() == 0)
813 for (; dcit != dcit_end; ++dcit) {
814 if (dcit->id().ml() == 0)
820 if (tubesMl1 + tubesMl2 !=
ct.size() +
result.first.size()) {
822 std::cout <<
" ERROR in empty tube calculation: ml1 " << tubesMl1 <<
" ml2 " << tubesMl2 <<
" tot "
823 <<
ct.size() +
result.first.size() << std::endl;
826 seg.crossedTubes(tubesMl1, tubesMl2);
828 seg.emptyTubes(
result.second);
830 if (seg.crossedTubes() != seg.hitsOnTrack() + seg.deltas() + seg.hitsOutOfTime() + seg.emptyTubes().size()) {
831 std::cout <<
" ---- mismatch!!! " << std::endl;
834 for (; eit != eit_end; ++eit) { std::cout <<
" match result " << *eit << std::endl; }
835 std::cout << seg << std::endl;
◆ debugLevel()
void TrkDriftCircleMath::SegmentFinder::debugLevel |
( |
int |
debugLevel | ) |
|
|
inline |
◆ directionCheck()
bool TrkDriftCircleMath::SegmentFinder::directionCheck |
( |
const LocVec2D & |
LocVec2D | ) |
const |
|
inlineprotected |
Definition at line 145 of file SegmentFinder.h.
149 if (prodRoad < 0.) prodRoad *= -1.;
154 if (prodChamber < 0.) prodChamber *= -1.;
◆ dropHits()
bool TrkDriftCircleMath::SegmentFinder::dropHits |
( |
Segment & |
segment, |
|
|
bool & |
hasDroppedHit, |
|
|
unsigned int & |
dropDepth |
|
) |
| const |
Definition at line 409 of file SegmentFinder.cxx.
412 std::cout <<
" dropDepth too large keeping segment " <<
segment << std::endl;
413 std::cout <<
" dropDepth " << dropDepth << std::endl;
414 for (
const DCOnTrack& hit :
segment.dcs()) {
416 std::cout <<
" t0 fit residual " << hit.residual() << std::endl;
418 std::cout <<
" NO t0 fit residual " << hit.residual() << std::endl;
423 std::lock_guard<std::mutex> lock(
m_mutex);
424 ++m_dropDepthAcceptCounts[dropDepth];
430 if (
m_debugLevel >= 5) std::cout <<
" dropDepth " << dropDepth <<
" " <<
segment << std::endl;
436 std::lock_guard<std::mutex> lock(
m_mutex);
437 ++m_dropDepthRejectCounts[dropDepth];
446 bool hasBadHit =
false;
448 for (
const DCOnTrack& hit :
segment.dcs()) {
450 double res = std::abs(hit.residual());
468 std::lock_guard<std::mutex> lock(
m_mutex);
469 ++m_dropDepthAcceptCounts[dropDepth];
478 if (
segment.hitsOnTrack() <= 3) {
481 std::lock_guard<std::mutex> lock(
m_mutex);
482 ++m_dropDepthRejectCounts[dropDepth];
492 segs.reserve(
segment.hitsOnTrack());
494 double bestChi2(1e9);
497 MatchDCWithLine matchWithLine;
509 if (
m_debugLevel >= 5) std::cout <<
" failed fit (dropHits) " << std::endl;
514 segs.push_back(std::move(
result));
515 Segment& newSegment = segs.back();
519 bool usePrecise = newSegment.hasT0Shift();
523 if (matchWithLine.hitsOnTrack() <= 2) {
531 newSegment.dcs(hitsOnLine);
534 if (matchWithLine.matchDifference() > 0) {
536 std::cout <<
" Hits on track content changed after match, redoing fit " << matchWithLine.hitsOnTrack()
538 std::cout <<
" fit result " << newSegment << std::endl;
543 if (
m_debugLevel >= 5) std::cout <<
" failed fit (dropHits2) " << std::endl;
550 usePrecise =
result.hasT0Shift();
554 newSegment.dcs(hitsOnLine);
555 if (
m_debugLevel >= 5) std::cout <<
" redid refit " << newSegment << std::endl;
563 segs.back().showerHits(
segment.showerHits());
566 segs.back().clusters(
segment.clusters());
567 segs.back().clusterLayers(
segment.clusterLayers());
580 double chi2 = segs.back().chi2();
582 if (segs.empty() || bestChi2 >
chi2) {
584 indexBest = segs.size() - 1;
587 if (
m_debugLevel >= 5) std::cout <<
" fit result " << segs.back() << std::endl;
596 hasDroppedHit =
true;
598 if (indexBest == -1) {
599 if (
m_debugLevel >= 5) std::cout <<
" not good candidate found " << std::endl;
602 std::lock_guard<std::mutex> lock(
m_mutex);
603 ++m_dropDepthRejectCounts[dropDepth];
◆ emptyCrossedTubes()
unsigned int TrkDriftCircleMath::SegmentFinder::emptyCrossedTubes |
( |
const Line & |
line, |
|
|
const DCVec & |
closeEmptyTubes |
|
) |
| const |
|
protected |
◆ emptyNeighbours()
DCVec TrkDriftCircleMath::SegmentFinder::emptyNeighbours |
( |
const DCVec & |
dcs | ) |
const |
|
protected |
◆ findSegments() [1/2]
SegVec TrkDriftCircleMath::SegmentFinder::findSegments |
( |
const DCVec & |
dcs | ) |
const |
◆ findSegments() [2/2]
Definition at line 225 of file SegmentFinder.cxx.
227 ResolvedCollection<Segment, IsSubsetSegment<SortDcsByY>> segments;
235 CurvedSegFinder.curvedSegments(*
m_mdtGeometry, segments.data());
237 std::cout <<
"CurvedSegmentFinder was passed a NULL pointer to the ChamberGeometry" << std::endl;
248 std::cout <<
" final segments " << std::endl;
249 for (
auto & selectedSegment : selectedSegments) { std::cout << selectedSegment << std::endl; }
252 return selectedSegments;
◆ fullScan()
Definition at line 865 of file SegmentFinder.cxx.
867 MatchDCWithLine matchWithLine;
872 if (seeds.size() > 50)
return;
874 for (
DCCit it = seeds.begin();
it != seeds.end(); ++
it) {
875 for (DCVec::const_reverse_iterator rit = seeds.rbegin(); rit != seeds.rend(); ++rit) {
880 if (std::abs(
it->position().y() - rit->position().y()) < 1.)
break;
◆ goodHitRatio()
bool TrkDriftCircleMath::SegmentFinder::goodHitRatio |
( |
Segment & |
seg | ) |
const |
|
protected |
Definition at line 970 of file SegmentFinder.cxx.
974 if (seg.hitsMl1() == 0) {
976 }
else if (seg.hitsMl2() == 0) {
◆ handleHits()
Definition at line 150 of file SegmentFinder.cxx.
155 std::cout <<
"In handleHits: dcs " << dcsIn.size() <<
" clusters " << clsIn.size() << std::endl;
174 seedsMl1 = dcsPerMl.first;
175 seedsMl2 = dcsPerMl.second;
182 std::cout <<
" two layer scan " << std::endl;
183 for (
const auto &
it : segments.data()) { std::cout <<
" " <<
it << std::endl; }
188 segments.set(preSelSegs);
191 std::cout <<
" after cleaning " << std::endl;
192 for (
const auto &
it : segments.data()) { std::cout <<
" " <<
it << std::endl; }
195 unsigned int usedHits(0);
196 for (
const auto &
it : segments.data()) { usedHits +=
it.hitsOnTrack(); }
203 fullScan(seedsMl1, dcsPerMl.first, clsIn, segments);
206 std::cout <<
" segments after scan multilayer 1 " << std::endl;
207 for (
const auto &
it : segments.data()) { std::cout <<
" " <<
it << std::endl; }
210 fullScan(seedsMl2, dcsPerMl.second, clsIn, segments);
213 std::cout <<
" segments after scan multilayer 2 " << std::endl;
214 for (
const auto &
it : segments.data()) { std::cout <<
" " <<
it << std::endl; }
221 fullScan(seeds, dcs, clsIn, segments);
◆ handleSeedPair()
Definition at line 718 of file SegmentFinder.cxx.
729 std::cout <<
" failed direction cut " <<
line.direction() *
m_roadDir <<
" line: " <<
line.phi() <<
" road "
736 const DCOnTrackVec& hitsOnLine = matchWithLine.match(dcs);
738 if (matchWithLine.hitsOnTrack() <= 2) {
739 if (
m_debugLevel >= 19) { std::cout <<
" too few hits associated " << matchWithLine.hitsOnTrack() << std::endl; }
742 if (matchWithLine.hitsOutOfTime() + matchWithLine.deltas() >= matchWithLine.hitsOnTrack()) {
744 std::cout <<
" too many outliers: hoo " << matchWithLine.hitsOutOfTime() <<
" delta " << matchWithLine.deltas()
745 <<
" hot " << matchWithLine.hitsOnTrack() << std::endl;
752 if (
m_debugLevel >= 3) std::cout <<
" failed fit " << std::endl;
759 std::cout <<
" failed direction cut (2) " <<
result.line().direction() *
m_roadDir <<
" line: " <<
result.line().phi()
771 seg.showerHits(matchWithLine.showerHits());
782 if (
m_debugLevel >= 3) std::cout <<
" candidate dropped due to hit ratio " << seg << std::endl;
786 if (
m_debugLevel >= 3) { std::cout <<
" new segment candidate " << seg << std::endl; }
789 segments.insert(seg);
◆ operator=()
assignment deleted to prevent ownership/leak issues
◆ printSettings()
void TrkDriftCircleMath::SegmentFinder::printSettings |
( |
| ) |
const |
|
protected |
print settings
Definition at line 127 of file SegmentFinder.cxx.
128 std::cout <<
" SegmentFinder::setting: " << std::endl
139 std::cout <<
" Options: ";
140 if (
m_fullScan) std::cout <<
" -- full scan ";
143 if (
m_doDrop) std::cout <<
" -- drop hits ";
147 std::cout << std::endl;
◆ refitSegments()
Copy the segment due to dropHits in line 324
Make a copy of the segment
Definition at line 305 of file SegmentFinder.cxx.
307 if (segs.empty())
return segs;
309 MatchDCWithLine matchWithLine;
312 segments.reserve(segs.size());
314 if (
m_debugLevel >= 3) { std::cout <<
" refitting segments " << std::endl; }
317 for (
const Segment& inSegment : segs) {
319 if (inSegment.hasCurvatureParameters()) {
320 segments.emplace_back(inSegment);
327 bool goodSeg{
true}, hasDroppedHit{
false};
328 unsigned int dropDepth = 0;
337 bool usePrecise = resultSeg.hasT0Shift();
340 if (matchWithLine.matchDifference() > 0) {
342 std::cout <<
" -- " << inSegment;
343 std::cout <<
" -- new DCS " << hitsOnLine.size() << std::endl;
344 for (
const DCOnTrack& cit : hitsOnLine) { std::cout <<
" " << cit << std::endl; }
348 if (matchWithLine.hitsOnTrack() <= 2) {
continue; }
352 if (inSegment.hasT0Shift()) {
354 inSegment.t0Shift())) {
355 if (
m_debugLevel >= 4) std::cout <<
" failed fit " << std::endl;
360 if (
m_debugLevel >= 4) std::cout <<
" failed fit " << std::endl;
365 std::cout <<
" after fit " << std::endl;
366 std::cout <<
result << std::endl;
374 resultSeg.showerHits(inSegment.showerHits());
377 resultSeg.clusters(inSegment.clusters());
389 if (
m_debugLevel >= 2) { std::cout <<
" segment lossed after refit and dropping " << resultSeg << std::endl; }
396 segments.emplace_back(std::move(resultSeg));
398 std::cout <<
" new segment added " << segments.size() << std::endl;
399 std::cout << segments.back() << std::endl;
402 if (
m_debugLevel >= 2) std::cout <<
" segment lost during hit dropping " << std::endl;
◆ removeDCOnSegments()
Definition at line 888 of file SegmentFinder.cxx.
889 if (segs.empty())
return dcs;
895 DCCit dit = dcs.begin();
896 DCCit dit_end = dcs.end();
898 for (; dit != dit_end; ++dit) {
900 for (
const auto & seg : segs) {
901 DCOnTrackCit pos = std::lower_bound(seg.dcs().begin(), seg.dcs().end(), *dit, SortDcsByY());
907 if (!
found) { newdcs.push_back(*dit); }
◆ selectSeeds()
DCVec TrkDriftCircleMath::SegmentFinder::selectSeeds |
( |
const DCVec & |
dcs, |
|
|
int |
maxSerie |
|
) |
| |
|
staticprotected |
Definition at line 268 of file SegmentFinder.cxx.
270 if (dcs.size() <= 2)
return dcs;
274 NeighbourTube isNeighbour;
276 DCCit it_start_serie;
278 DCCit it_end = dcs.end() - 1;
280 while (
it <= it_end) {
285 while (
it != it_end && isNeighbour(*
it, *(
it + 1))) { ++
it; }
290 for (; it_start_serie !=
it + 1; ++it_start_serie) {
292 if (it_start_serie->driftState() ==
DriftCircle::InTime) { seeds.push_back(*it_start_serie); }
298 if (
it == dcs.end())
break;
◆ setChi2DropCut()
void TrkDriftCircleMath::SegmentFinder::setChi2DropCut |
( |
double |
chi2 | ) |
|
◆ setCurvedSegmentFinder()
void TrkDriftCircleMath::SegmentFinder::setCurvedSegmentFinder |
( |
bool |
doCurvedSegmentFinder | ) |
|
◆ setDeltaCut()
void TrkDriftCircleMath::SegmentFinder::setDeltaCut |
( |
double |
cut | ) |
|
◆ setDeltaCutT0()
void TrkDriftCircleMath::SegmentFinder::setDeltaCutT0 |
( |
double |
deltaCut | ) |
|
◆ setDropHits()
void TrkDriftCircleMath::SegmentFinder::setDropHits |
( |
bool |
doDrop | ) |
|
◆ setFitter()
void TrkDriftCircleMath::SegmentFinder::setFitter |
( |
std::shared_ptr< const DCSLFitter > |
fitter | ) |
|
|
inline |
◆ setMaxDropDepth()
void TrkDriftCircleMath::SegmentFinder::setMaxDropDepth |
( |
int |
max | ) |
|
Definition at line 46 of file SegmentFinder.cxx.
48 std::lock_guard<std::mutex> lock(
m_mutex);
49 m_dropDepthAcceptCounts.clear();
50 m_dropDepthAcceptCounts.resize(
max + 1, 0);
51 m_dropDepthRejectCounts.clear();
52 m_dropDepthRejectCounts.resize(
max + 1, 0);
◆ setMdtGeometry()
◆ setPhiRoad()
void TrkDriftCircleMath::SegmentFinder::setPhiRoad |
( |
double |
phiRoad, |
|
|
double |
phiChamber, |
|
|
double |
sinPhiCut = 0.2 , |
|
|
bool |
useRoadPhi = true , |
|
|
bool |
useChamberPhi = true |
|
) |
| |
◆ setRatioEmptyTubesCut()
void TrkDriftCircleMath::SegmentFinder::setRatioEmptyTubesCut |
( |
double |
ratioEmptyTubesCut | ) |
|
◆ setRecoverMDT()
void TrkDriftCircleMath::SegmentFinder::setRecoverMDT |
( |
bool |
doRecover | ) |
|
◆ setRemoveSingleOutliers()
void TrkDriftCircleMath::SegmentFinder::setRemoveSingleOutliers |
( |
bool |
removeSingleOutliers | ) |
|
◆ setResidualCutT0()
void TrkDriftCircleMath::SegmentFinder::setResidualCutT0 |
( |
double |
resCut | ) |
|
◆ setRPCPullCut()
void TrkDriftCircleMath::SegmentFinder::setRPCPullCut |
( |
double |
cut | ) |
|
◆ setSeedCleaning()
void TrkDriftCircleMath::SegmentFinder::setSeedCleaning |
( |
bool |
doCleanup | ) |
|
◆ setSingleMultiLayerScan()
void TrkDriftCircleMath::SegmentFinder::setSingleMultiLayerScan |
( |
bool |
doScan | ) |
|
◆ setSortSegmentsUsingAllHits()
void TrkDriftCircleMath::SegmentFinder::setSortSegmentsUsingAllHits |
( |
bool |
doAllHitsSort | ) |
|
◆ setTGCPullCut()
void TrkDriftCircleMath::SegmentFinder::setTGCPullCut |
( |
double |
cut | ) |
|
◆ setUseChamberPhi()
void TrkDriftCircleMath::SegmentFinder::setUseChamberPhi |
( |
bool |
useChamberPhi | ) |
|
◆ setUseSegmentQuality()
void TrkDriftCircleMath::SegmentFinder::setUseSegmentQuality |
( |
bool |
useQ | ) |
|
◆ splitInMulitlayers()
std::pair< DCVec, DCVec > TrkDriftCircleMath::SegmentFinder::splitInMulitlayers |
( |
const DCVec & |
dcs | ) |
|
|
staticprotected |
Definition at line 255 of file SegmentFinder.cxx.
257 ml1.reserve(dcs.size());
258 ml2.reserve(dcs.size());
259 for (
const DriftCircle& circ : dcs) {
260 if (circ.id().ml() == 0)
261 ml1.emplace_back(circ);
263 ml2.emplace_back(circ);
265 return std::make_pair(std::move(ml1), std::move(ml2));
◆ tubeRadius()
double TrkDriftCircleMath::SegmentFinder::tubeRadius |
( |
| ) |
const |
|
inlineprotected |
◆ twoMultiLayerScan()
Definition at line 849 of file SegmentFinder.cxx.
851 MatchDCWithLine matchWithLine;
854 if (seeds_ml1.size() * seeds_ml2.size() > 2500)
return;
857 for (
const auto &
it1 : seeds_ml1) {
858 for (DCVec::const_reverse_iterator it2 = seeds_ml2.rbegin(); it2 != seeds_ml2.rend(); ++it2) {
◆ updateDirections()
void TrkDriftCircleMath::SegmentFinder::updateDirections |
( |
| ) |
|
|
protected |
update the cached values for the phi road and chamber road
Definition at line 104 of file SegmentFinder.cxx.
113 if (
m_debugLevel >= 1) std::cout <<
" bad phi for road: road " <<
m_phiRoad <<
" dir phi " << roadLine.phi() << std::endl;
118 std::cout <<
" bad phi for chamber: chamber " <<
m_phiChamber <<
" dir phi " << chamberLine.phi() << std::endl;
◆ updateMatch()
Definition at line 841 of file SegmentFinder.cxx.
842 seg.deltas(matchWithLine.deltas());
843 seg.hitsOutOfTime(matchWithLine.hitsOutOfTime());
844 seg.hitsOnTrack(matchWithLine.hitsOnTrack());
845 seg.hitsPerMl(matchWithLine.hitsMl1(), matchWithLine.hitsMl2());
846 seg.closeHits(matchWithLine.closeHits());
◆ ATLAS_THREAD_SAFE [1/2]
std::vector<int> m_dropDepthAcceptCounts TrkDriftCircleMath::SegmentFinder::ATLAS_THREAD_SAFE {(int)m_dropDepthMax + 2, 0} |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [2/2]
std::vector<int> m_dropDepthRejectCounts TrkDriftCircleMath::SegmentFinder::ATLAS_THREAD_SAFE {(int)m_dropDepthMax + 1, 0} |
|
mutableprotected |
◆ m_chamberDir
LocVec2D TrkDriftCircleMath::SegmentFinder::m_chamberDir {0., 0.} |
|
protected |
◆ m_chi2Cut
double TrkDriftCircleMath::SegmentFinder::m_chi2Cut {10} |
|
protected |
◆ m_debugLevel
int TrkDriftCircleMath::SegmentFinder::m_debugLevel {0} |
|
protected |
◆ m_deltaCut
double TrkDriftCircleMath::SegmentFinder::m_deltaCut {5.} |
|
protected |
◆ m_deltaCutT0
double TrkDriftCircleMath::SegmentFinder::m_deltaCutT0 {5.} |
|
protected |
◆ m_doAllHitSort
bool TrkDriftCircleMath::SegmentFinder::m_doAllHitSort {false} |
|
protected |
◆ m_doCurvedSegmentFinder
bool TrkDriftCircleMath::SegmentFinder::m_doCurvedSegmentFinder {false} |
|
protected |
◆ m_doDrop
bool TrkDriftCircleMath::SegmentFinder::m_doDrop {true} |
|
protected |
◆ m_dropDepthMax
unsigned int TrkDriftCircleMath::SegmentFinder::m_dropDepthMax {4} |
|
protected |
◆ m_fitter
std::shared_ptr<const DCSLFitter> TrkDriftCircleMath::SegmentFinder::m_fitter |
|
protected |
◆ m_fullScan
bool TrkDriftCircleMath::SegmentFinder::m_fullScan {false} |
|
protected |
◆ m_hitSelector
◆ m_matchCrossed
◆ m_mdtGeometry
◆ m_mutex
std::mutex TrkDriftCircleMath::SegmentFinder::m_mutex |
|
mutableprotected |
◆ m_phiChamber
double TrkDriftCircleMath::SegmentFinder::m_phiChamber {M_PI_2} |
|
protected |
◆ m_phiDifCut
double TrkDriftCircleMath::SegmentFinder::m_phiDifCut {0.5} |
|
protected |
◆ m_phiRoad
double TrkDriftCircleMath::SegmentFinder::m_phiRoad {M_PI_2} |
|
protected |
◆ m_ratioEmptyTubesCut
double TrkDriftCircleMath::SegmentFinder::m_ratioEmptyTubesCut {1.} |
|
protected |
◆ m_recoverMdtHits
bool TrkDriftCircleMath::SegmentFinder::m_recoverMdtHits {true} |
|
protected |
◆ m_removeSingleOutliers
bool TrkDriftCircleMath::SegmentFinder::m_removeSingleOutliers {true} |
|
protected |
◆ m_resCutT0
double TrkDriftCircleMath::SegmentFinder::m_resCutT0 {1.} |
|
protected |
◆ m_roadDir
LocVec2D TrkDriftCircleMath::SegmentFinder::m_roadDir {0., 0.} |
|
protected |
◆ m_roadWidth
double TrkDriftCircleMath::SegmentFinder::m_roadWidth {1.5} |
|
protected |
◆ m_rpcPullCut
double TrkDriftCircleMath::SegmentFinder::m_rpcPullCut {5} |
|
protected |
◆ m_seedCleaning
bool TrkDriftCircleMath::SegmentFinder::m_seedCleaning {false} |
|
protected |
◆ m_singleMultiLayerScan
bool TrkDriftCircleMath::SegmentFinder::m_singleMultiLayerScan {true} |
|
protected |
◆ m_tgcPullCut
double TrkDriftCircleMath::SegmentFinder::m_tgcPullCut {5} |
|
protected |
◆ m_useChamberPhi
bool TrkDriftCircleMath::SegmentFinder::m_useChamberPhi {true} |
|
protected |
◆ m_useRoadPhi
bool TrkDriftCircleMath::SegmentFinder::m_useRoadPhi {true} |
|
protected |
◆ m_useSegmentQuality
bool TrkDriftCircleMath::SegmentFinder::m_useSegmentQuality {false} |
|
protected |
The documentation for this class was generated from the following files:
const ShapeFitter * fitter
SegVec findSegments(const DCVec &dcs) const
std::vector< DCOnTrack > DCOnTrackVec
void handleSeedPair(const DriftCircle &seed1, const DriftCircle &seeds2, const DCVec &dcs, const CLVec &cls, MatchDCWithLine &matchWithLine, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const
std::shared_ptr< const DCSLFitter > m_fitter
double m_ratioEmptyTubesCut
std::vector< Cluster > CLVec
std::vector< bool > HitSelection
std::pair< DCOnTrackVec, DCVec > MatchResult
counts the number of hits shared by the two segments
SegVec refitSegments(const SegVec &segs) const
static LineVec tangentLines(const DriftCircle &dc1, const DriftCircle &dc2)
SegVec cleanSegments(const SegVec &segments) const
double x() const
Returns the x coordinate of the vector.
virtual double tubeRadius() const =0
bool m_removeSingleOutliers
MatchCrossedTubes m_matchCrossed
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
std::vector< DriftCircle > DCVec
void updateDirections()
update the cached values for the phi road and chamber road
static DCVec selectSeeds(const DCVec &dcs, int maxSerie)
bool m_singleMultiLayerScan
static void updateMatch(Segment &seg, MatchDCWithLine &matchWithLine)
std::vector< HWIdentifier >::iterator it1
void crossedTubes(Segment &seg) const
static std::pair< DCVec, DCVec > splitInMulitlayers(const DCVec &dcs)
std::pair< std::vector< unsigned int >, bool > res
double chi2(TH1 *h0, TH1 *h1)
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
double y() const
Returns the y coordinate of the vector.
virtual DCVec tubesPassedByLine(const Line &line) const =0
Retrieves the vector of drift circles traveresed by the line.
DCOnTrackVec::const_iterator DCOnTrackCit
CLVec::const_iterator CLCit
DCSLHitSelector m_hitSelector
bool goodHitRatio(Segment &seg) const
void handleHits(const DCVec &dcs, const CLVec &clusters, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const
void associateClusters(SegVec &segs, const CLVec &cls) const
bool directionCheck(const LocVec2D &LocVec2D) const
void twoMultiLayerScan(const DCVec &seeds_ml1, const DCVec &seeds_ml2, const DCVec &dcs, const CLVec &cls, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const
DCVec::const_iterator DCCit
double tubeRadius() const
void printSettings() const
print settings
void fullScan(const DCVec &seeds, const DCVec &dcs, const CLVec &cls, ResolvedCollection< Segment, IsSubsetSegment< SortDcsByY >> &segments) const
const HitSelection selectHitsOnTrack(const DCOnTrackVec &dcs) const
bool dropHits(Segment &segment, bool &hasDroppedHit, unsigned int &dropDepth) const
std::vector< Segment > SegVec
bool m_doCurvedSegmentFinder
const ChamberGeometry * m_mdtGeometry
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
unsigned int m_dropDepthMax
void debugLevel(int debugLevel)
@ CloseDC
too large drift time
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
std::vector< Line > LineVec
@ InTime
drift time too small to be compatible with drift spectrum