Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
tool to match segments using a curved trajectory.
More...
#include <MuonSegmentMatchingTool.h>
|
bool | straightLineMatch (const MuonSegment &seg1, const MuonSegment &seg2) const |
| perform straight line matching using SL extrapolation More...
|
|
bool | curvedMatch (const MuonSegment &seg1, const MuonSegment &seg2) const |
| perform curved matching More...
|
|
bool | overlapMatch (const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2) const |
| perform overlap matching More...
|
|
bool | initializeField () const |
| setup field More...
|
|
bool | hasStereoAngle (const Identifier &id1, const Identifier &id2) const |
| check whether the two segments have a stereo angle More...
|
|
bool | isSLMatch (const Identifier &chid1, const Identifier &chid2) const |
| check whether we should perform a straight line match More...
|
|
bool | suppressNoise (const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const |
| Suppress noise from cavern background/pile up using basic cuts
More...
|
|
bool | suppressNoisePhi (const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const |
| Suppress noise from cavern background/pile up using basic cuts in phi. More...
|
|
void | simpleEndcapExtrapolate (double x_segment, double y_segment, double z_segment, double theta_segment, double z_extrapolated, double &r_expected, double &theta_expected, double &rhoInv) const |
| extrapolate segment in middle or outer endcap station to inner layer assuming the particle came from the IP More...
|
|
bool | endcapExtrapolationMatch (const MuonSegment &seg1, const MuonSegment &seg2, bool useTightCuts) const |
| match an endcap middle or outer segment with an inner segment using a simple analytic extrapolation model More...
|
|
tool to match segments using a curved trajectory.
The tool decides whether the matching should be performed with curvature or with a straight line. Cases in which a straight line will be used:
- no magnetic field in the muon spectrometer
- endcap middle/outer combination
- small/large overlap in one station layer
Definition at line 33 of file MuonSegmentMatchingTool.h.
◆ MuonSegmentMatchingTool()
Muon::MuonSegmentMatchingTool::MuonSegmentMatchingTool |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
constructor
Definition at line 16 of file MuonSegmentMatchingTool.cxx.
17 : base_class(ty, na, pa) {
18 declareProperty(
"UseCosmicsSettings",
m_isCosmics =
false,
"Pick up settings for cosmics");
20 "Perform matching for segments in a small/large overlap");
22 "Perform matching for segments in regions without field");
23 declareProperty(
"DoCurvedMatch",
m_doCurvedMatch =
true,
"Perform matching for segments in a field regions");
24 declareProperty(
"doThetaMatching",
m_thetaMatch =
false,
"Pre-matching in theta");
25 declareProperty(
"doPhiMatching",
m_phiMatch =
false,
"Pre-matching in phi");
29 "Cut on the angular difference between the best phi and the one consistent with the chamber bounds");
32 "Cut on the angular difference between the best phi and the one consistent with the chamber bounds");
34 "Cut on the distance of recalculated position to the tube edge");
36 "Cut on the segment position residual after recalculation of the paramters");
38 "Cut on the average pull of the phi hits with the new segment parameters");
41 "Cut on the angular difference between the extrapolated segment angle and reference");
43 "Cut on the distance of extrapolated segment position and reference");
45 "If the two segments are further apart than this distance, they are considered to not match");
48 "Accept only segments that are in the same sector for tight matching");
50 "Use tight selection for busy event to suppress combinatorics and improve CPU");
53 "Cut on sumDeltaYZ, segments in BI and BM, small phi sec");
55 "Cut on sumDeltaYZ, segments in BI and BO, small phi sec");
57 "Cut on sumDeltaYZ, segments in BM and BO, small phi sec");
59 "Cut on sumDeltaYZ, segments in EI and EM, small phi sec");
61 "Cut on sumDeltaYZ, segments in EI and EO, small phi sec");
63 "Cut on sumDeltaYZ, segments in EM and EO, small phi sec");
65 "Cut on sumDeltaYZ, segments in BI and BM, large phi sec");
67 "Cut on sumDeltaYZ, segments in BI and BO, large phi sec");
69 "Cut on sumDeltaYZ, segments in BM and BO, large phi sec");
71 "Cut on sumDeltaYZ, segments in EI and EM, large phi sec");
73 "Cut on sumDeltaYZ, segments in EI and EO, large phi sec");
75 "Cut on sumDeltaYZ, segments in EM and EO, large phi sec");
◆ ~MuonSegmentMatchingTool()
virtual Muon::MuonSegmentMatchingTool::~MuonSegmentMatchingTool |
( |
| ) |
|
|
virtualdefault |
◆ curvedMatch()
◆ endcapExtrapolationMatch()
match an endcap middle or outer segment with an inner segment using a simple analytic extrapolation model
Definition at line 762 of file MuonSegmentMatchingTool.cxx.
770 if (chid1 == chid2)
return false;
774 if (stIndex1 == stIndex2)
return false;
784 if (!segInner || !segOuter) {
793 double r_expected{0.}, theta_expected{0.}, rhoInv{0.};
794 simpleEndcapExtrapolate(pos1.x(), pos1.y(), pos1.z(), dir1.theta(), pos2.z(), r_expected, theta_expected, rhoInv);
796 if (rhoInv < 0) rhoInv *= -1.;
797 double dr = pos2.perp() - r_expected;
798 double dtheta = dir2.theta() - theta_expected;
822 <<
" " <<
m_printer->print(seg2) << std::endl
823 <<
" dr " <<
dr <<
" cut " << drCut <<
" dtheta " << dtheta <<
" cut " << dthetaCut
824 <<
" rhoInv " << 1e6 * rhoInv);
826 if (std::abs(
dr) > drCut)
return false;
827 if (std::abs(dtheta) > dthetaCut)
return false;
◆ finalize()
StatusCode Muon::MuonSegmentMatchingTool::finalize |
( |
| ) |
|
AlgTool finalize.
Definition at line 95 of file MuonSegmentMatchingTool.cxx.
97 double goodOverlapMatchFraction =
102 double goodStraightLineMatchFraction =
106 << goodStraightLineMatchFraction);
108 double goodCurvedMatchFraction =
116 return StatusCode::SUCCESS;
◆ hasStereoAngle()
check whether the two segments have a stereo angle
Definition at line 303 of file MuonSegmentMatchingTool.cxx.
310 if (phi1 != phi2)
return true;
316 return isSmallChamber1 != isSmallChamber2;
◆ initialize()
StatusCode Muon::MuonSegmentMatchingTool::initialize |
( |
| ) |
|
◆ initializeField()
bool Muon::MuonSegmentMatchingTool::initializeField |
( |
| ) |
const |
|
private |
◆ isSLMatch()
check whether we should perform a straight line match
Definition at line 281 of file MuonSegmentMatchingTool.cxx.
291 if (stIndex1 == stIndex2)
return true;
◆ match()
match two segments
Definition at line 119 of file MuonSegmentMatchingTool.cxx.
126 if (chid1 == chid2)
return false;
135 if (stIndex1 == stIndex2) {
145 && ( std::abs(phi1 - phi2) == 1 || (phi1 == 1 && phi2 == 16)
146 || (phi1 == 16 && phi2 == 1)))
155 if (stIndex1 == stIndex2)
return false;
162 if (stIndex1 == stIndex2)
return false;
◆ overlapMatch()
perform overlap matching
Definition at line 213 of file MuonSegmentMatchingTool.cxx.
222 const float segDist = (seg1.globalPosition() - seg2.globalPosition()).
mag();
239 if (!
result.goodMatch()) {
249 <<
result.phiResult.deltaYZ);
256 ATH_MSG_DEBUG(
" failed phi hit pull cut: seg1 " <<
result.averagePhiHitPullSegment1 <<
" seg2 "
257 <<
result.averagePhiHitPullSegment2);
271 ATH_MSG_DEBUG(
" failed position residual cut: seg1 " <<
result.segmentResult1.positionResidual <<
" seg2 "
272 <<
result.segmentResult2.positionResidual);
◆ simpleEndcapExtrapolate()
void Muon::MuonSegmentMatchingTool::simpleEndcapExtrapolate |
( |
double |
x_segment, |
|
|
double |
y_segment, |
|
|
double |
z_segment, |
|
|
double |
theta_segment, |
|
|
double |
z_extrapolated, |
|
|
double & |
r_expected, |
|
|
double & |
theta_expected, |
|
|
double & |
rhoInv |
|
) |
| const |
|
private |
extrapolate segment in middle or outer endcap station to inner layer assuming the particle came from the IP
Definition at line 833 of file MuonSegmentMatchingTool.cxx.
848 double z_start = 7000.;
849 double z_end = 12000.;
851 if (z_extrapolated < 0) z_start = -z_start;
854 double r_segment = std::hypot(x_segment , y_segment);
856 if (std::abs(z_extrapolated) > std::abs(z_segment)) {
857 ATH_MSG_WARNING(
" extrapolate outwards is not implemented for z " << z_extrapolated);
862 if (std::abs(z_segment) < std::abs(
z_end)) {
863 ATH_MSG_WARNING(
" segment before end of Toroid: SL extrapolation is used implemented " << z_segment);
867 const double tan_seg =
std::tan(theta_segment);
869 double r_end = r_segment + (
z_end - z_segment) * tan_seg;
872 rhoInv = (r_end -
z_end * tan_seg) / zgeo;
873 double tantheta = tan_seg - 2 * (
z_end - z_start) * rhoInv;
874 r_expected = z_extrapolated * tantheta + (z_extrapolated - z_start) * (z_extrapolated - z_start) * rhoInv;
878 double r_SL = r_segment + (z_extrapolated - z_segment) * tan_seg;
879 r_expected = r_expected + 0.3 * (r_expected - r_SL);
880 theta_expected =
std::atan(tantheta + 2 * (z_extrapolated - z_start) * rhoInv);
882 if (tan_seg < 0 && theta_expected < 0) theta_expected +=
M_PI;
883 if (tan_seg > 0 && theta_expected < 0) theta_expected = -theta_expected;
◆ straightLineMatch()
◆ suppressNoise()
Suppress noise from cavern background/pile up using basic cuts
Definition at line 324 of file MuonSegmentMatchingTool.cxx.
347 <<
result.phiSector_b <<
" " <<
result.deltaTheta_a <<
" " <<
result.deltaTheta_b <<
" "
353 <<
" " <<
result.phiSector_b <<
" thetas " <<
result.deltaTheta_a <<
" "
354 <<
result.deltaTheta_b <<
" thetaSum " <<
result.deltaTheta <<
" tight cuts "
358 if (
result.angleAB > 1.0)
return false;
363 if (isCSC_a || isCSC_b) {
368 if ((isCSC_a && !isEndcap_b) || (isCSC_b && !isEndcap_a))
return false;
372 else if (isBEE_a || isBEE_b)
375 return result.deltaTheta <= 0.300;
378 else if (isEndcap_a != isEndcap_b)
381 return result.deltaTheta <= 0.300;
387 if (
result.deltaTheta > 0.300) {
398 if (
result.phiSector_a % 2 == 0) {
400 }
else if (
result.phiSector_a % 2 == 1) {
408 if (
result.phiSector_a % 2 == 0) {
410 }
else if (
result.phiSector_a % 2 == 1) {
419 if (
result.phiSector_a % 2 == 0) {
421 }
else if (
result.phiSector_a % 2 == 1) {
429 if (
result.phiSector_a % 2 == 0) {
436 }
else if (
result.phiSector_a % 2 == 1) {
449 if (
result.phiSector_a % 2 == 0) {
456 }
else if (
result.phiSector_a % 2 == 1) {
470 if (
result.phiSector_a % 2 == 0) {
472 }
else if (
result.phiSector_a % 2 == 1) {
484 ATH_MSG_VERBOSE(
" rejection pair as in different sector and using tight cuts");
487 if (isCSC_a || isCSC_b) {
491 if (
result.deltaTheta > 0.100) {
494 if ((isCSC_a && !isEndcap_b) || (isCSC_b && !isEndcap_a))
return false;
502 else if (isBEE_a || isBEE_b)
504 return result.deltaTheta <= 0.200;
509 return result.deltaTheta <= 0.150;
512 else if (isEndcap_a != isEndcap_b)
514 return result.deltaTheta <= 0.150;
519 if (
result.phiSector_a % 2 == 0) {
521 }
else if (
result.phiSector_a % 2 == 1) {
528 if (
result.phiSector_a % 2 == 0) {
530 }
else if (
result.phiSector_a % 2 == 1) {
537 if (
result.phiSector_a % 2 == 0) {
539 }
else if (
result.phiSector_a % 2 == 1) {
547 if (
result.phiSector_a % 2 == 0) {
553 }
else if (
result.phiSector_a % 2 == 1) {
564 if (
result.phiSector_a % 2 == 0) {
570 }
else if (
result.phiSector_a % 2 == 1) {
581 if (
result.phiSector_a % 2 == 0) {
583 }
else if (
result.phiSector_a % 2 == 1) {
◆ suppressNoisePhi()
Suppress noise from cavern background/pile up using basic cuts in phi.
Definition at line 592 of file MuonSegmentMatchingTool.cxx.
609 <<
" deltaPhidir " <<
result.deltaPhidir <<
" phiposerr_a " <<
result.phiposerr_a <<
" phiposerr_b "
610 <<
result.phiposerr_b <<
" phidirerr_a " <<
result.phidirerr_a <<
" phidirerr_b "
611 <<
result.phidirerr_b <<
" shorttube_a " <<
result.shorttube_a <<
" shorttube_b "
616 && ((
result.phiSector_a != 16 &&
result.phiSector_b != 1)
617 && (
result.phiSector_a != 1 &&
result.phiSector_b != 16))
625 if (
result.phiposerr_a < 10001.000 &&
result.phiposerr_b < 10001.000) {
627 if (!isEndcap_a && !isEndcap_b) {
628 return result.deltaPhipos <= 0.1;
630 if (isEndcap_a && isEndcap_b) {
632 if (
result.phiSector_a % 2 == 0) {
633 return result.deltaPhipos <= 0.1;
636 if (
result.phiSector_a % 2 == 1) {
637 return result.deltaPhipos <= 0.2;
644 if (
result.phiposerr_a < 10001.000 &&
result.phiposerr_b < 10001.000) {
645 if (!isEndcap_a && !isEndcap_b) {
646 return result.deltaPhipos <= 0.1;
648 if (isEndcap_a && isEndcap_b) {
649 return result.deltaPhipos <= 0.2;
658 if (
result.phiposerr_a < 10001.000) {
660 return result.shorttube_a <= 800;
664 return result.shorttube_a <= 3500 ||
result.shorttube_a == 99999.;
667 return result.shorttube_a <= 3500 ||
result.shorttube_a == 99999.;
670 return result.shorttube_a <= 800;
674 if (
result.phiposerr_b < 10001.000) {
676 return result.shorttube_b <= 800;
679 return result.shorttube_b <= 800;
682 return result.shorttube_b <= 800;
685 return result.shorttube_b <= 1400;
696 if (
result.phiposerr_a < 10001.000 &&
result.phiposerr_b < 10001.000) {
697 if (!isEndcap_a && !isEndcap_b) {
698 return result.deltaPhipos <= 0.1;
700 if (isEndcap_a && isEndcap_b) {
702 if (
result.phiSector_a % 2 == 0) {
703 return result.deltaPhipos <= 0.08;
706 if (
result.phiSector_a % 2 == 1) {
707 return result.deltaPhipos <= 0.1;
715 if (
result.phiposerr_a < 10001.000 &&
result.phiposerr_b < 10001.000) {
716 if (!isEndcap_a && !isEndcap_b) {
717 return result.deltaPhipos <= 0.05;
719 if (isEndcap_a && isEndcap_b) {
720 return result.deltaPhipos <= 0.1;
726 if (
result.phiposerr_a < 10001.000) {
728 return result.shorttube_a <= 600;
731 return result.shorttube_a <= 3500 ||
result.shorttube_a == 99999.;
734 return result.shorttube_a <= 3500 ||
result.shorttube_a == 99999.;
737 return result.shorttube_a <= 500;
741 if (
result.phiposerr_b < 10001.000) {
743 return result.shorttube_b <= 600;
746 return result.shorttube_b <= 700;
749 return result.shorttube_b <= 700;
752 return result.shorttube_b <= 700;
◆ m_angleABCut
double Muon::MuonSegmentMatchingTool::m_angleABCut {} |
|
private |
◆ m_curvedMatches
std::atomic_uint Muon::MuonSegmentMatchingTool::m_curvedMatches {0} |
|
mutableprivate |
◆ m_curvedMatchesGood
std::atomic_uint Muon::MuonSegmentMatchingTool::m_curvedMatchesGood {0} |
|
mutableprivate |
◆ m_doCurvedMatch
bool Muon::MuonSegmentMatchingTool::m_doCurvedMatch |
|
private |
◆ m_doOverlapMatch
bool Muon::MuonSegmentMatchingTool::m_doOverlapMatch |
|
private |
◆ m_doStraightLineMatch
bool Muon::MuonSegmentMatchingTool::m_doStraightLineMatch |
|
private |
◆ m_drExtrapAlignmentOffset
double Muon::MuonSegmentMatchingTool::m_drExtrapAlignmentOffset {} |
|
private |
◆ m_drExtrapRMS
double Muon::MuonSegmentMatchingTool::m_drExtrapRMS {} |
|
private |
◆ m_dthetaExtrapRMS
double Muon::MuonSegmentMatchingTool::m_dthetaExtrapRMS {} |
|
private |
◆ m_duplicateHitUses
std::atomic_uint Muon::MuonSegmentMatchingTool::m_duplicateHitUses {0} |
|
mutableprivate |
◆ m_edmHelperSvc
Initial value:{
this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface",
}
EDM Helper tool.
Definition at line 91 of file MuonSegmentMatchingTool.h.
◆ m_idHelperSvc
Initial value:{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}
Definition at line 86 of file MuonSegmentMatchingTool.h.
◆ m_isCosmics
bool Muon::MuonSegmentMatchingTool::m_isCosmics |
|
private |
◆ m_matchingbee_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingbee_sphisec {} |
|
private |
◆ m_matchingbibm_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingbibm_lphisec {} |
|
private |
◆ m_matchingbibm_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingbibm_sphisec {} |
|
private |
◆ m_matchingbibo_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingbibo_lphisec {} |
|
private |
◆ m_matchingbibo_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingbibo_sphisec {} |
|
private |
◆ m_matchingbmbo_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingbmbo_lphisec {} |
|
private |
◆ m_matchingbmbo_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingbmbo_sphisec {} |
|
private |
◆ m_matchingeiem_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingeiem_lphisec {} |
|
private |
◆ m_matchingeiem_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingeiem_sphisec {} |
|
private |
◆ m_matchingeieo_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingeieo_lphisec {} |
|
private |
◆ m_matchingeieo_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingeieo_sphisec {} |
|
private |
◆ m_matchingemeo_lphisec
double Muon::MuonSegmentMatchingTool::m_matchingemeo_lphisec {} |
|
private |
◆ m_matchingemeo_sphisec
double Muon::MuonSegmentMatchingTool::m_matchingemeo_sphisec {} |
|
private |
◆ m_maxDistSegments
double Muon::MuonSegmentMatchingTool::m_maxDistSegments {} |
|
private |
◆ m_minDistSegmentsCosmics
double Muon::MuonSegmentMatchingTool::m_minDistSegmentsCosmics {} |
|
private |
cut on the minimum distance between the segments, if the distance is larger
than the cut the segments are always matched (for cosmics)
Definition at line 148 of file MuonSegmentMatchingTool.h.
◆ m_onlySameSectorIfTight
bool Muon::MuonSegmentMatchingTool::m_onlySameSectorIfTight {} |
|
private |
◆ m_overlapMatchAngleDPhiCut
double Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDPhiCut |
|
private |
◆ m_overlapMatchAngleDYZCut
double Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDYZCut |
|
private |
◆ m_overlapMatches
std::atomic_uint Muon::MuonSegmentMatchingTool::m_overlapMatches {0} |
|
mutableprivate |
◆ m_overlapMatchesGood
std::atomic_uint Muon::MuonSegmentMatchingTool::m_overlapMatchesGood {0} |
|
mutableprivate |
◆ m_overlapMatchPhiHitPullCut
double Muon::MuonSegmentMatchingTool::m_overlapMatchPhiHitPullCut |
|
private |
◆ m_overlapMatchPositionCut
double Muon::MuonSegmentMatchingTool::m_overlapMatchPositionCut |
|
private |
◆ m_overlapMatchPositionResidualCut
double Muon::MuonSegmentMatchingTool::m_overlapMatchPositionResidualCut |
|
private |
◆ m_overlapResolvingTool
Initial value:{
this,
"MuonSegmentInOverlapResolvingTool",
"Muon::MuonSegmentInOverlapResolvingTool/MuonSegmentInOverlapResolvingTool",
}
matching tool to handle the overlaps
Definition at line 103 of file MuonSegmentMatchingTool.h.
◆ m_pairMatchingTool
Initial value:{
this,
"MuonSegmentPairMatchingTool",
"Muon::MuonSegmentPairMatchingTool/MuonSegmentPairMatchingTool",
}
matching tool to handle the pairs of segments
Definition at line 108 of file MuonSegmentMatchingTool.h.
◆ m_phiMatch
bool Muon::MuonSegmentMatchingTool::m_phiMatch |
|
private |
◆ m_printer
Initial value:{
this,
"Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}
EDM printer tool.
Definition at line 98 of file MuonSegmentMatchingTool.h.
◆ m_straightLineMatchAngleCut
double Muon::MuonSegmentMatchingTool::m_straightLineMatchAngleCut |
|
private |
◆ m_straightLineMatches
std::atomic_uint Muon::MuonSegmentMatchingTool::m_straightLineMatches {0} |
|
mutableprivate |
◆ m_straightLineMatchesGood
std::atomic_uint Muon::MuonSegmentMatchingTool::m_straightLineMatchesGood {0} |
|
mutableprivate |
◆ m_straightLineMatchPositionCut
double Muon::MuonSegmentMatchingTool::m_straightLineMatchPositionCut |
|
private |
◆ m_thetaMatch
bool Muon::MuonSegmentMatchingTool::m_thetaMatch |
|
private |
◆ m_toroidOn
Gaudi::Property<bool> Muon::MuonSegmentMatchingTool::m_toroidOn {this, "ToroidOn", true, "Status of toroidal B-Field"} |
|
private |
◆ m_useEndcapExtrapolationMatching
bool Muon::MuonSegmentMatchingTool::m_useEndcapExtrapolationMatching {} |
|
private |
◆ m_useLocalAngles
bool Muon::MuonSegmentMatchingTool::m_useLocalAngles {} |
|
private |
◆ m_useTightCuts
bool Muon::MuonSegmentMatchingTool::m_useTightCuts {} |
|
private |
The documentation for this class was generated from the following files:
const float EO[NO]
Energy levels for Oxygen.
setEt setPhi setE277 setWeta2 eta1
#define ATH_MSG_VERBOSE(x)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
constexpr double z_end
z value whereafter no magnetic field / curvature
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
MuonStationIndex::StIndex StIndex
Scalar mag() const
mag method