13 static constexpr double const MeVtoGeV = 1. / 1000.;
16 std::vector<int> initializeChamberIdxOrder() {
23 const std::vector<ChIdx> orderedChIndices{
24 ChIdx::CSS, ChIdx::CSL, ChIdx::BIS, ChIdx::BIL,
25 ChIdx::BMS, ChIdx::BML, ChIdx::BOS, ChIdx::BOL,
26 ChIdx::BEE, ChIdx::EIS, ChIdx::EIL, ChIdx::EMS,
27 ChIdx::EML, ChIdx::EOS, ChIdx::EOL, ChIdx::EES,
32 std::vector<int> chamberIndexOrder(orderedChIndices.size());
34 for (
unsigned int i = 0;
i < orderedChIndices.size();
i++) {
35 chamberIndexOrder[
toInt(orderedChIndices[i])] =
i;
37 return chamberIndexOrder;
42 static const std::vector<int> chamberIndexOrder = initializeChamberIdxOrder();
43 return (chamberIndexOrder[
toInt(
first->chamberIndex())] <
69 m_geoOnTheFly ?
ATH_MSG_INFO(
"Is Run-3 geometry: On-the-fly determination. THIS OPTION IS DEPRECATED AND WILL BE REMOVED SOON. Use IsRun3Geo property instead.")
81 "Not using allAuthors variable as currently missing in many derivations; LowPtEfficiency working point will always return "
82 "false, but this is expected at the moment. Have a look here: "
83 "https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionToolR21#New_LowPtEfficiency_working_poin");
87 ATH_MSG_INFO(
"You have opted to select only 3-station muons in the high-pT selection! "
88 <<
"Please feed 'HighPt3Layers' to the 'WorkingPoint' property to retrieve the appropriate scale-factors");
92 ATH_MSG_WARNING(
"No cut-based selection is defined for segment-tagged muons in the Low-pT working point. "
93 <<
"Please set UseMVALowPt=true if you want to try the UseSegmentTaggedLowPt=true option.");
97 ATH_MSG_INFO(
"MuonSelectionTool will assume both Standard and LRT Muons are being used, and that the necessary information is available to identify the type (standard or LRT).");
98 if (
m_quality!=1)
ATH_MSG_WARNING(
"Currently, only Medium quality is supported for LRT muons. Your chosen WP will be applied (w/o ID cuts), but no recommendations are available for this quality.");
102 m_acceptInfo.addCut(
"Eta",
"Selection of muons according to their pseudorapidity");
103 m_acceptInfo.addCut(
"IDHits",
"Selection of muons according to whether they passed the MCP ID Hit cuts");
104 m_acceptInfo.addCut(
"Preselection",
"Selection of muons according to their type/author");
105 m_acceptInfo.addCut(
"Quality",
"Selection of muons according to their tightness");
109 "Invalid quality (i.e. selection WP) set: "
111 <<
" - it must be an integer between 0 and 5! (0=Tight, 1=Medium, 2=Loose, 3=Veryloose, 4=HighPt, 5=LowPtEfficiency)");
112 return StatusCode::FAILURE;
115 ATH_MSG_ERROR(
"Cannot use lowPt working point if allAuthors is not available!");
116 return StatusCode::FAILURE;
120 ATH_MSG_FATAL(
"CaloScoreWP property must be set to 1, 2, 3 or 4");
121 return StatusCode::FAILURE;
125 ATH_MSG_INFO(
"Initialising tight working point histograms...");
126 std::string tightWP_rootFile_fullPath;
131 Form(
"MuonSelectorTools/%s/muonSelection_tightWPHisto.root",
m_calibration_version.value().c_str()));
134 ATH_MSG_INFO(
"Reading muon tight working point histograms from " << tightWP_rootFile_fullPath);
136 std::unique_ptr<TFile>
file(TFile::Open(tightWP_rootFile_fullPath.c_str(),
"READ"));
138 if (!
file->IsOpen()) {
139 ATH_MSG_ERROR(
"Cannot read tight working point file from " << tightWP_rootFile_fullPath);
140 return StatusCode::FAILURE;
154 ATH_MSG_INFO(
"Reading bad muon veto cut functions from " << BMVcutFile_fullPath);
156 std::unique_ptr<TFile> BMVfile(TFile::Open(BMVcutFile_fullPath.c_str(),
"READ"));
158 if (!BMVfile->IsOpen()) {
159 ATH_MSG_ERROR(
"Cannot read bad muon veto cut function file from " << BMVcutFile_fullPath);
160 return StatusCode::FAILURE;
170 return StatusCode::FAILURE;
181 auto make_mva_reader = [](TString file_path) {
182 std::vector<std::string> mva_var_names{
"momentumBalanceSignificance",
183 "scatteringCurvatureSignificance",
184 "scatteringNeighbourSignificance",
186 "middleLargeHoles+middleSmallHoles",
187 "muonSegmentDeltaEta",
188 "muonSeg1ChamberIdx",
189 "muonSeg2ChamberIdx"};
190 std::unique_ptr<TMVA::Reader> reader = std::make_unique<TMVA::Reader>(mva_var_names);
191 reader->BookMVA(
"BDTG", file_path);
207 auto make_mva_reader_MuTagIMO = [](TString file_path,
bool useSeg2ChamberIndex) {
208 std::vector<std::string> mva_var_names;
209 if (useSeg2ChamberIndex) mva_var_names.push_back(
"muonSeg2ChamberIndex");
210 mva_var_names.push_back(
"muonSeg1ChamberIndex");
211 mva_var_names.push_back(
"muonSeg1NPrecisionHits");
212 mva_var_names.push_back(
"muonSegmentDeltaEta");
213 mva_var_names.push_back(
"muonSeg1GlobalR");
214 mva_var_names.push_back(
"muonSeg1Chi2OverDoF");
215 mva_var_names.push_back(
"muonSCS");
217 std::unique_ptr<TMVA::Reader> reader = std::make_unique<TMVA::Reader>(mva_var_names);
218 reader->BookMVA(
"BDT", file_path);
232 ATH_MSG_ERROR(
"Cannot calculate TightNNScore: ONNX tool not configured! "
233 "Please set the ORTInferenceTool property to a valid AthOnnx::OnnxRuntimeInferenceTool instance.");
234 return StatusCode::FAILURE;
239 }
else ATH_MSG_INFO(
"ONNX tool not configured — skipping retrieval.");
245 return StatusCode::SUCCESS;
251 ATH_MSG_ERROR(
" getHist(...) TFile is nullptr! Check that the Tight cut map is loaded correctly");
252 return StatusCode::FAILURE;
254 TH1* h_ptr =
nullptr;
255 file->GetObject(histName.c_str(), h_ptr);
260 return StatusCode::FAILURE;
262 hist = std::unique_ptr<TH1>{h_ptr};
263 hist->SetDirectory(
nullptr);
264 ATH_MSG_INFO(
"Successfully read tight working point histogram: " << hist->GetName());
266 return StatusCode::SUCCESS;
281 ATH_MSG_FATAL(
"accept(...) Failed to cast particle to muon");
292 static std::atomic<bool> checkDone{
false};
300 <<
" while on-the fly check for runNumber "<<
getRunNumber(
true)<<
" indicates isRun3Geo="<<
isRun3(
true));
306 ATH_MSG_WARNING(
"MuonSelectionTool currently supports Loose, Medium, Tight, HighPt, and LowPtEfficiency WPs for Run3; all other WPs can only be used in ExpertDevelopMode mode");
310 ATH_MSG_WARNING(
"For Run3, Tight WP is supported only when ExcludeNSWFromPrecisionLayers=False and RecalcPrecisionLayerswNSW=True");
323 if (mu.muonType() == xAOD::Muon::Combined)
325 else if (mu.muonType() == xAOD::Muon::MuonStandAlone)
327 else if (mu.muonType() == xAOD::Muon::SegmentTagged)
329 else if (mu.muonType() == xAOD::Muon::CaloTagged)
331 else if (mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon)
342 if (std::abs(mu.eta()) >=
m_maxEta) {
358 if (!passIDCuts || !passMuonCuts) {
return acceptData; }
361 xAOD::Muon::Quality thisMu_quality =
getQuality(mu);
362 bool thisMu_highpt =
false;
364 bool thisMu_lowptE =
false;
367 ATH_MSG_VERBOSE(
"Muon quality: " << thisMu_quality <<
" passes HighPt: " << thisMu_highpt
368 <<
" passes LowPtEfficiency: " << thisMu_lowptE);
370 if (
m_quality == 4 && !thisMu_highpt) {
return acceptData; }
371 if (
m_quality == 5 && !thisMu_lowptE) {
return acceptData; }
382 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
383 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
384 if (!idtrack || !metrack) idPt = mePt = -1.;
386 mePt = metrack->
pt();
387 idPt = idtrack->
pt();
389 if (!mePt_acc.isAvailable(mu) || !idPt_acc.isAvailable(mu)) {
390 ATH_MSG_FATAL(
"The muon with pT " << mu.pt() *
MeVtoGeV <<
" eta: " << mu.eta() <<
", phi:" << mu.phi()
391 <<
" q:" << mu.charge() <<
", author:" << mu.author()
392 <<
" is not decorated with calibrated momenta. Please fix");
393 throw std::runtime_error(
"MuonSelectionTool() - qOverP significance calculation failed");
406 <<
" Momentum dependent cuts are disabled. Return 0.");
410 const xAOD::TrackParticle* metrack =
muon.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
411 if (!idtrack || !metrack) {
412 ATH_MSG_VERBOSE(
"No ID / MS track. Return dummy large value of 1 mio");
415 float mePt{-1.}, idPt{-1.};
418 const float meP = mePt / std::sin(metrack->
theta());
419 const float idP = idPt / std::sin(idtrack->
theta());
422 return std::abs((metrack->
charge() / meP) - (idtrack->
charge() / idP)) / qOverPsigma;
427 <<
"Momentum dependent cuts are disabled. Return 0.");
430 float mePt{-1.}, idPt{-1.};
432 return std::abs(idPt - mePt) /
muon.pt();
437 if (
isRun3() && mu.isAuthor(xAOD::Muon::Author::Commissioning) && !
m_allowComm) {
439 return xAOD::Muon::VeryLoose;
443 if (mu.muonType() == xAOD::Muon::SegmentTagged) {
446 if (std::abs(mu.eta()) < 0.1) {
448 return xAOD::Muon::Loose;
450 ATH_MSG_VERBOSE(
"Do not allow segment-tagged muon at |eta| > 0.1 - return VeryLoose");
451 return xAOD::Muon::VeryLoose;
456 if (mu.muonType() == xAOD::Muon::CaloTagged) {
461 return xAOD::Muon::Loose;
469 if (mu.muonType() == xAOD::Muon::Combined) {
471 if (mu.author() == xAOD::Muon::STACO) {
473 return xAOD::Muon::VeryLoose;
481 ATH_MSG_VERBOSE(
"Muon has out-of-bounds precision hits - return VeryLoose");
482 return xAOD::Muon::VeryLoose;
486 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
487 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
491 const float reducedChi2 = mu.primaryTrackParticle()->chiSquared() / mu.primaryTrackParticle()->numberDoF();
494 ATH_MSG_VERBOSE(
"number of precision layers = " << (
int)summary.nprecisionLayers);
499 if (summary.nprecisionLayers > 1 && reducedChi2 < 8 && std::abs(qOverPsignif) < 7) {
502 return xAOD::Muon::Tight;
506 ATH_MSG_VERBOSE(
"Muon did not pass requirements for tight combined muon");
510 (summary.nprecisionLayers > 1 ||(summary.nprecisionLayers == 1 && summary.nprecisionHoleLayers < 2 && std::abs(mu.eta()) < 0.1))
514 return xAOD::Muon::Medium;
517 ATH_MSG_VERBOSE(
"Muon did not pass requirements for medium combined muon");
523 if ((summary.nprecisionLayers > 1 ||
524 (summary.nprecisionLayers == 1 && summary.nprecisionHoleLayers < 2 && std::abs(mu.eta()) < 0.1))) {
529 return xAOD::Muon::Medium;
532 return xAOD::Muon::Loose;
538 if ((
m_disablePtCuts || mu.pt() *
MeVtoGeV < 7.) && std::abs(mu.eta()) < 1.3 && summary.nprecisionLayers > 0 &&
539 (mu.author() == xAOD::Muon::MuGirl && mu.isAuthor(xAOD::Muon::MuTagIMO))) {
540 ATH_MSG_VERBOSE(
"Muon passed selection for loose working point at low pT");
541 return xAOD::Muon::Loose;
545 ATH_MSG_VERBOSE(
"Did not pass selections for combined muon - returning VeryLoose");
546 return xAOD::Muon::VeryLoose;
550 if (mu.author() == xAOD::Muon::MuidSA) {
553 if (std::abs(mu.eta()) > 2.5) {
554 ATH_MSG_VERBOSE(
"number of precision layers = " << (
int)summary.nprecisionLayers);
557 if (summary.nprecisionLayers > 2 && !
m_toroidOff) {
559 return xAOD::Muon::Medium;
564 ATH_MSG_VERBOSE(
"Muon did not pass selection for medium stand-alone muon - return VeryLoose");
565 return xAOD::Muon::VeryLoose;
569 if (mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
573 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
575 if (cbtrack && metrack) {
576 if (std::abs(cbtrack->
eta()) > 2.5) {
577 ATH_MSG_VERBOSE(
"number of precision layers = " << (
int)summary.nprecisionLayers);
579 if (summary.nprecisionLayers > 2 && !
m_toroidOff) {
580 if (mu.trackParticle(xAOD::Muon::Primary) == mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle) &&
583 "SiliconForwardAssociated muon has ID track as primary track particle. "
584 <<
"This is a bug fixed starting with xAODMuon-00-17-07, which should be present in this release. "
585 <<
"Please report this to the Muon CP group!");
588 return xAOD::Muon::Medium;
594 ATH_MSG_VERBOSE(
"Muon did not pass selection for medium silicon-associated forward muon - return VeryLoose");
595 return xAOD::Muon::VeryLoose;
598 ATH_MSG_VERBOSE(
"Muon did not pass selection for loose/medium/tight for any muon type - return VeryLoose");
599 return xAOD::Muon::VeryLoose;
608 if (isLRTmuon(mu))
return true;
612 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
615 ATH_MSG_FATAL(
"No information available to tell if the muon is LRT or standard. Either run MuonLRTMergingAlg to decorate with `isLRT` flag, or supply the patternRecoInfo for the original ID track.");
616 throw std::runtime_error(
"MuonSelectionTool() - isLRT decor and patternRecoInfo both unavailable for a muon.");
618 std::bitset<xAOD::NumberOfTrackRecoInfo> patternBitSet(patternAcc(*idtrack));
624 if (mu.author() == xAOD::Muon::MuidSA && std::abs(mu.eta()) > 2.5) {
626 }
else if (mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
628 if (cbtrack && std::abs(cbtrack->
eta()) > 2.5) {
return true; }
631 if (mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle))
632 return passedIDCuts(*mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle));
633 else if (mu.primaryTrackParticle())
640 if (mu.muonType() != xAOD::Muon::Combined)
return false;
642 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
643 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
649 bool IsBadMuon =
false;
650 if (idtrack && metrack && cbtrack) {
652 double qOverP_ID = idtrack->
qOverP();
654 double qOverP_ME = metrack->
qOverP();
656 double qOverP_CB = cbtrack->
qOverP();
669 double IdCbRatio = std::abs((qOverPerr_ID / qOverP_ID) / (qOverPerr_CB / qOverP_CB));
670 double MeCbRatio = std::abs((qOverPerr_ME / qOverP_ME) / (qOverPerr_CB / qOverP_CB));
671 IsBadMuon = (IdCbRatio < 0.8 || MeCbRatio < 0.8 || IsBadMuon);
675 double IdCbRatio = std::abs((qOverPerr_ID / qOverP_ID) / (qOverPerr_CB / qOverP_CB));
676 double MeCbRatio = std::abs((qOverPerr_ME / qOverP_ME) / (qOverPerr_CB / qOverP_CB));
677 IsBadMuon = (IdCbRatio < 0.8 || MeCbRatio < 0.8);
686 xAOD::Muon::Quality thisMu_quality =
getQuality(mu);
700 if (mu.muonType() != xAOD::Muon::Combined) {
705 if (mu.muonType() != xAOD::Muon::Combined && mu.muonType() != xAOD::Muon::SegmentTagged) {
706 ATH_MSG_VERBOSE(
"Muon is not combined or segment-tagged - fail low-pT");
713 if (mu.author() != xAOD::Muon::MuGirl && mu.author() != xAOD::Muon::MuidCo) {
718 if (mu.author() != xAOD::Muon::MuGirl && mu.author() != xAOD::Muon::MuidCo && mu.author() != xAOD::Muon::MuTagIMO) {
719 ATH_MSG_VERBOSE(
"Muon is neither MuGirl / MuidCo / MuTagIMO - fail low-pT");
727 if (thisMu_quality <= xAOD::Muon::Medium) {
737 if (!
m_useMVALowPt && std::abs(mu.eta()) > 1.55 && thisMu_quality > xAOD::Muon::Medium) {
738 ATH_MSG_VERBOSE(
"Not using MVA selection, failing low-pT selection due to medium requirement in forward region");
746 ATH_MSG_VERBOSE(
"Muon has out-of-bounds precision hits - fail low-pT");
751 if (mu.muonType() == xAOD::Muon::Combined) {
754 uint nStationsCut = (std::abs(mu.eta()) > 1.3 && std::abs(mu.eta()) < 1.55) ? 2 : 1;
755 if (summary.nprecisionLayers < nStationsCut) {
756 ATH_MSG_VERBOSE(
"number of precision layers = " << (
int)summary.nprecisionLayers <<
" is lower than cut value " << nStationsCut
757 <<
" - fail low-pT");
764 if (mu.author() == xAOD::Muon::MuGirl && !mu.isAuthor(xAOD::Muon::MuTagIMO)) {
765 ATH_MSG_VERBOSE(
"MuGirl muon is not confirmed by MuTagIMO - fail low-pT");
779 float momentumBalanceSignificance{0.}, scatteringCurvatureSignificance{0.}, scatteringNeighbourSignificance{0.};
781 retrieveParam(mu, momentumBalanceSignificance, xAOD::Muon::momentumBalanceSignificance);
782 retrieveParam(mu, scatteringCurvatureSignificance, xAOD::Muon::scatteringCurvatureSignificance);
783 retrieveParam(mu, scatteringNeighbourSignificance, xAOD::Muon::scatteringNeighbourSignificance);
785 ATH_MSG_VERBOSE(
"momentum balance significance: " << momentumBalanceSignificance);
786 ATH_MSG_VERBOSE(
"scattering curvature significance: " << scatteringCurvatureSignificance);
787 ATH_MSG_VERBOSE(
"scattering neighbour significance: " << scatteringNeighbourSignificance);
789 if (std::abs(momentumBalanceSignificance) > 3. || std::abs(scatteringCurvatureSignificance) > 3. ||
790 std::abs(scatteringNeighbourSignificance) > 3.) {
801 std::vector<const xAOD::MuonSegment*> segments_sorted;
802 segments_sorted.reserve(mu.nMuonSegments());
804 for (
unsigned int i = 0; i < mu.nMuonSegments(); i++) {
805 if (!mu.muonSegment(i))
806 ATH_MSG_WARNING(
"The muon reports more segments than are available. Please report this to the muon software community!");
808 segments_sorted.push_back(mu.muonSegment(i));
811 std::sort(segments_sorted.begin(), segments_sorted.end(), chamberIndexCompare);
813 return segments_sorted;
819 ATH_MSG_VERBOSE(
"LowPt WP currently not supported for run3 if not in expert mode");
828 float momentumBalanceSig{-1}, CurvatureSig{-1}, energyLoss{-1}, muonSegmentDeltaEta{-1}, scatteringNeigbour{-1};
829 retrieveParam(mu, momentumBalanceSig, xAOD::Muon::momentumBalanceSignificance);
830 retrieveParam(mu, CurvatureSig, xAOD::Muon::scatteringCurvatureSignificance);
831 retrieveParam(mu, scatteringNeigbour, xAOD::Muon::scatteringNeighbourSignificance);
833 retrieveParam(mu, muonSegmentDeltaEta, xAOD::Muon::segmentDeltaEta);
839 float seg1ChamberIdx{-1.}, seg2ChamberIdx{-1.}, middleHoles{-1.}, seg1NPrecisionHits{-1.}, seg1GlobalR{-1.}, seg1Chi2OverDoF{-1.};
843 if (mu.author() == xAOD::Muon::MuTagIMO && muonSegments.size() == 0)
844 ATH_MSG_WARNING(
"passedLowPtEfficiencyMVACut - found segment-tagged muon with no segments!");
847 seg1ChamberIdx = (!muonSegments.empty()) ?
toInt(muonSegments[0]->chamberIndex()) : -9;
848 seg2ChamberIdx = (muonSegments.size() > 1) ?
toInt(muonSegments[1]->chamberIndex()) : -9;
851 if (mu.author() == xAOD::Muon::MuTagIMO) {
852 seg1NPrecisionHits = (!muonSegments.empty()) ? muonSegments[0]->nPrecisionHits() : -1;
853 seg1GlobalR = (!muonSegments.empty())
854 ? std::hypot(muonSegments[0]->
x(), muonSegments[0]->
y(), muonSegments[0]->
z())
856 seg1Chi2OverDoF = (!muonSegments.empty()) ? muonSegments[0]->chiSquared() / muonSegments[0]->numberDoF() : -1;
869 std::vector<float> var_vector;
870 if (mu.author() == xAOD::Muon::MuidCo || mu.author() == xAOD::Muon::MuGirl) {
871 var_vector = {momentumBalanceSig, CurvatureSig, scatteringNeigbour, energyLoss,
872 middleHoles, muonSegmentDeltaEta, seg1ChamberIdx, seg2ChamberIdx};
874 if (std::abs(mu.eta()) >= 1.3)
875 var_vector = {seg2ChamberIdx, seg1ChamberIdx, seg1NPrecisionHits, muonSegmentDeltaEta,
876 seg1GlobalR, seg1Chi2OverDoF, std::abs(CurvatureSig)};
878 var_vector = {seg1ChamberIdx, seg1NPrecisionHits, muonSegmentDeltaEta,
879 seg1GlobalR, seg1Chi2OverDoF, std::abs(CurvatureSig)};
883 TMVA::Reader *reader_MUID, *reader_MUGIRL;
893 TMVA::Reader* reader_MUTAGIMO;
894 if (std::abs(mu.eta()) < 0.7)
896 else if (std::abs(mu.eta()) < 1.3)
902 float BDTdiscriminant;
904 if (mu.author() == xAOD::Muon::MuidCo)
905 BDTdiscriminant = reader_MUID->EvaluateMVA(var_vector,
"BDTG");
906 else if (mu.author() == xAOD::Muon::MuGirl)
907 BDTdiscriminant = reader_MUGIRL->EvaluateMVA(var_vector,
"BDTG");
909 BDTdiscriminant = reader_MUTAGIMO->EvaluateMVA(var_vector,
"BDT");
911 ATH_MSG_WARNING(
"Invalid author for low-pT MVA, failing selection...");
916 float BDTcut = (mu.author() == xAOD::Muon::MuTagIMO) ? 0.12 : -0.6;
918 if (BDTdiscriminant > BDTcut) {
931 if (mu.muonType() != xAOD::Muon::Combined) {
935 if (mu.author() == xAOD::Muon::STACO) {
944 ATH_MSG_VERBOSE(
"Muon has out-of-bounds precision hits - fail high-pT");
953 ATH_MSG_VERBOSE(
"number of precision layers: " << (
int)summary.nprecisionLayers);
962 const xAOD::TrackParticle* MS_track = mu.trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
964 ATH_MSG_VERBOSE(
"passedHighPtCuts - No MS track available for muon. Using combined track.");
965 MS_track = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
968 if (MS_track && CB_track) {
970 float phiMS = MS_track->
phi();
971 float etaCB = CB_track->
eta();
974 if (!
isRun3() && (std::abs(
etaMS) > 2.0 || std::abs(etaCB) > 2.0)) {
975 if (summary.cscUnspoiledEtaHits == 0) {
982 if (!
isRun3() && mu.eta() < -1.899 && std::abs(mu.phi()) < 0.211) {
983 ATH_MSG_VERBOSE(
"Muon is in eta/phi region vetoed due to disabled chambers in MC - fail high-pT");
988 if ((1.01 < std::abs(
etaMS) && std::abs(
etaMS) < 1.1) || (1.01 < std::abs(etaCB) && std::abs(etaCB) < 1.1)) {
989 ATH_MSG_VERBOSE(
"Muon is in barrel/endcap overlap region - fail high-pT");
1019 if (summary.nprecisionLayers < 4) {
1020 ATH_MSG_VERBOSE(
"Muon is in BEE eta/phi region and does not have 4 precision layers - fail high-pT");
1024 if (std::abs(etaCB) > 1.4) {
1028 if (summary.nprecisionLayers < 4 && (summary.extendedSmallHits > 0 || summary.extendedSmallHoles > 0)) {
1029 ATH_MSG_VERBOSE(
"Muon is in BEE eta/phi region and does not have 4 precision layers - fail high-pT");
1034 ATH_MSG_WARNING(
"passedHighPtCuts - MS or CB track missing in muon! Failing High-pT selection...");
1039 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
1040 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
1045 if (std::abs(qOverPsignif) > 7) {
1057 if (std::abs(mu.eta()) > 1.2 && summary.extendedSmallHits < 3 && summary.extendedLargeHits < 3) {
1065 if (summary.innerLargeHits == 0 && summary.middleLargeHits == 0 && summary.outerLargeHits == 0 &&
1066 summary.extendedLargeHits == 0 && summary.middleSmallHits > 2 &&
1067 (summary.outerSmallHits > 2 || summary.extendedSmallHits > 2)) {
1072 if (summary.innerSmallHits == 0 && summary.middleSmallHits == 0 && summary.outerSmallHits == 0 &&
1073 summary.extendedSmallHits == 0 && summary.middleLargeHits > 2 &&
1074 (summary.outerLargeHits > 2 || summary.extendedLargeHits > 2)) {
1081 if (summary.nprecisionLayers < 3) {
1082 ATH_MSG_VERBOSE(
"Muon has less than 3 precision layers - fail high-pT");
1087 if (summary.isSmallGoodSectors) {
1088 if (!(summary.innerSmallHits > 2 && summary.middleSmallHits > 2 &&
1089 (summary.outerSmallHits > 2 || summary.extendedSmallHits > 2))) {
1090 ATH_MSG_VERBOSE(
"Muon has small/large sectors overlap - fail high-pT");
1094 if (!(summary.innerLargeHits > 2 && summary.middleLargeHits > 2 &&
1095 (summary.outerLargeHits > 2 || summary.extendedLargeHits > 2))) {
1096 ATH_MSG_VERBOSE(
"Muon has small/large sectors overlap - fail high-pT");
1107 if (mu.muonType() != xAOD::Muon::Combined)
return false;
1109 double start_cut = 3.0;
1110 double end_cut = 1.6;
1111 double abs_eta = std::abs(mu.eta());
1114 double p0(8.0), p1(0.), p2(0.);
1121 else if (abs_eta > 1.05 && abs_eta <= 1.3) {
1124 }
else if (abs_eta > 1.3 && abs_eta <= 1.7) {
1127 }
else if (abs_eta > 1.7 && abs_eta <= 2.0) {
1130 }
else if (abs_eta > 2.0) {
1141 else if (abs_eta > 1.05 && abs_eta <= 1.3) {
1144 }
else if (abs_eta > 1.3 && abs_eta <= 1.7) {
1147 }
else if (abs_eta > 1.7 && abs_eta <= 2.0) {
1150 }
else if (abs_eta > 2.0) {
1165 if (abs_eta > 1.05 && abs_eta < 1.3) {
1168 }
else if (abs_eta >= 1.3 && abs_eta < 1.7) {
1171 }
else if (abs_eta >= 1.7 && abs_eta < 2.0) {
1174 }
else if (abs_eta >= 2.0) {
1180 bool passErrorCutCB =
false;
1185 double qOverP_CB = cbtrack->
qOverP();
1188 double sigma = std::sqrt(std::pow(p0 / pt_CB, 2) + std::pow(p1, 2) + std::pow(p2 * pt_CB, 2));
1191 double a = (end_cut - start_cut) / 4000.0;
1192 double b = end_cut -
a * 5000.0;
1193 double coefficient = (pt_CB > 1000.) ? (
a * pt_CB + b) : start_cut;
1194 if (std::abs(qOverPerr_CB / qOverP_CB) < coefficient * sigma) { passErrorCutCB =
true; }
1201 ATH_MSG_DEBUG(
"The current event is a MC event. Use bad muon veto mimic.");
1207 return passErrorCutCB;
1213 if (std::abs(mu.eta()) < 1.05) {
1223 double qOpRelResolution = std::hypot(p1, p2 * mu.primaryTrackParticle()->pt() *
MeVtoGeV);
1225 double qOverPabs_unsmeared = std::abs(mu.primaryTrackParticle()->definingParameters()[4]);
1226 double qOverPabs_smeared = 1.0 / (mu.pt() * std::cosh(mu.eta()));
1228 if ((qOverPabs_smeared - qOverPabs_unsmeared) / (qOpRelResolution * qOverPabs_unsmeared) <
1229 cutFunction->Eval(mu.primaryTrackParticle()->pt() *
MeVtoGeV))
1237 if (mu.muonType() == xAOD::Muon::Combined) {
return mu.author() != xAOD::Muon::STACO; }
1239 if (mu.muonType() == xAOD::Muon::CaloTagged && std::abs(mu.eta()) < 0.105)
1242 if (mu.muonType() == xAOD::Muon::SegmentTagged && (std::abs(mu.eta()) < 0.105 ||
m_useSegmentTaggedLowPt))
return true;
1244 if (mu.author() == xAOD::Muon::MuidSA && std::abs(mu.eta()) > 2.4)
return true;
1246 if (mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
1248 return (cbtrack && std::abs(cbtrack->
eta()) > 2.4);
1259 " !! Tool configured with some of the ID hits requirements changed... FOR DEVELOPMENT ONLY: muon efficiency SF won't be "
1264 if ((value1 + value2 == 0) && !
m_PixCutOff)
return false;
1268 if ((value1 + value2 <= 4) && !
m_SctCutOff)
return false;
1275 const float abseta = std::abs(
track.eta());
1279 if (!((0.1 < abseta && abseta <= 1.9 && totTRThits > 5 && value2 < (0.9 * totTRThits)) || (abseta <= 0.1 || abseta > 1.9)))
1290 constexpr float eta_range = 1.;
1294 int CaloMuonIDTag = -20;
1297 bool readID = mu.parameter(CaloMuonIDTag, xAOD::Muon::CaloMuonIDTag);
1299 ATH_MSG_WARNING(
"Unable to read CaloMuonIDTag Quality information! Rejecting the CALO muon!");
1304 return (CaloMuonIDTag > 10);
1313 float CaloMuonScore{-999.0};
1314 retrieveParam(mu, CaloMuonScore, xAOD::Muon::CaloMuonScore);
1324 return (CaloMuonScore >= 0.77);
1329 if(
m_caloScoreWP==3)
return (CaloMuonScore >= (-1.98e-4 * std::pow(pT, 3) +6.04e-3 * std::pow(pT, 2) -6.13e-2 * pT + 1.16));
1330 if(
m_caloScoreWP==4)
return (CaloMuonScore >= (-1.80e-4 * std::pow(pT, 3) +5.02e-3 * std::pow(pT, 2) -4.62e-2 * pT + 1.12));
1340 ATH_MSG_VERBOSE(
"for run3, Tight WP is only supported when ExcludeNSWFromPrecisionLayers=False and RecalcPrecisionLayerswNSW=True");
1343 float symmetric_eta = std::abs(mu.eta());
1348 ATH_MSG_VERBOSE(
"Muon is passing tight WP kinematic cuts with pT,eta " << mu.pt() <<
" , " << mu.eta());
1355 ATH_MSG_VERBOSE(
"Applying tight WP cuts to a low pt muon with (pt,eta) ( " <<
pt <<
" , " << mu.eta() <<
" ) ");
1356 ATH_MSG_VERBOSE(
"Rho value " << rho <<
", required to be less than " << rhoCut);
1357 ATH_MSG_VERBOSE(
"Momentum significance value " << oneOverPSig <<
", required to be less than " << qOverPCut);
1359 if (rho > rhoCut)
return false;
1362 if (oneOverPSig > qOverPCut)
return false;
1363 ATH_MSG_VERBOSE(
"Muon passed tight WP, low pT momentum significance cut");
1371 else if (
pt < 100.0) {
1374 ATH_MSG_VERBOSE(
"Applying tight WP cuts to a medium pt muon with (pt,eta) (" <<
pt <<
"," << mu.eta() <<
")");
1375 ATH_MSG_VERBOSE(
"Rho value " << rho <<
" required to be less than " << rhoCut);
1378 if (rho > rhoCut)
return false;
1386 else if (
pt < 500.0) {
1388 ATH_MSG_VERBOSE(
"Applying tight WP cuts to a high pt muon with (pt,eta) (" <<
pt <<
"," << mu.eta() <<
")");
1391 ATH_MSG_VERBOSE(
"Rho value " << rho <<
", required to be less than " << rhoCut <<
" unless -1, in which no cut is applied");
1393 if (rhoCut < 0.0)
return true;
1394 if (rho > rhoCut)
return false;
1401 ATH_MSG_VERBOSE(
"Not applying any tight WP cuts to a very high pt muon with (pt,eta) (" <<
pt <<
"," << mu.eta() <<
")");
1433 if (std::abs(
muon.eta()) > 2.0) {
1434 ATH_MSG_VERBOSE(
"Recalculating number of precision layers for combined muon");
1435 summary.nprecisionLayers = (summary.innerSmallHits > 1 || summary.innerLargeHits > 1)
1436 + (summary.middleSmallHits > 2 || summary.middleLargeHits > 2)
1437 + (summary.outerSmallHits > 2 || summary.outerLargeHits > 2);
1441 summary.nprecisionLayers = (summary.middleSmallHits > 2 || summary.middleLargeHits > 2)
1442 + (summary.outerSmallHits > 2 || summary.outerLargeHits > 2)
1443 + (summary.extendedSmallHits > 2 || summary.extendedLargeHits > 2);
1447 if (!eta1stgchits_acc.isAvailable(
muon) || !eta2stgchits_acc.isAvailable(
muon) || !mmhits_acc.isAvailable(
muon)) {
1448 ATH_MSG_FATAL(__FILE__ <<
":" << __LINE__ <<
" Failed to retrieve NSW hits!"
1449 <<
" (Please use DxAODs with p-tags >= p5834 OR set ExcludeNSWFromPrecisionLayers to True (tests only)");
1450 throw std::runtime_error(
"Failed to retrieve NSW hits");
1456 summary.nprecisionLayers += ((summary.etaLayer1STGCHits + summary.etaLayer2STGCHits) > 3 || summary.MMHits > 3);
1463 if (!
muon.parameter(value, param)) {
1464 ATH_MSG_FATAL(__FILE__ <<
":" << __LINE__ <<
" Failed to retrieve parameter " << param
1465 <<
" for muon with pT:" <<
muon.pt() *
MeVtoGeV <<
", eta:" <<
muon.eta() <<
", phi: " <<
muon.phi()
1466 <<
", q:" <<
muon.charge() <<
", author: " <<
muon.author());
1467 throw std::runtime_error(
"Failed to retrieve Parameter");
1482 if (summary.nprecisionLayers == 2)
1488 const xAOD::TrackParticle* CB_track = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
1489 const xAOD::TrackParticle* MS_track = mu.trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
1491 ATH_MSG_VERBOSE(
"getResolutionCategory - No MS track available for muon. Using combined track.");
1492 MS_track = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
1496 const float etaMS = MS_track->
eta();
1497 const float etaCB = CB_track->
eta();
1498 const float phiMS = MS_track->
phi();
1502 if ((summary.isSmallGoodSectors && summary.innerSmallHits < 3) || (!summary.isSmallGoodSectors && summary.innerLargeHits < 3))
1505 if ((summary.isSmallGoodSectors && summary.middleSmallHits < 3) || (!summary.isSmallGoodSectors && summary.middleLargeHits < 3))
1508 if ((summary.isSmallGoodSectors && summary.outerSmallHits < 3 && summary.extendedSmallHits < 3) ||
1509 (!summary.isSmallGoodSectors && summary.outerLargeHits < 3 && summary.extendedLargeHits < 3))
1512 if (!
isRun3() && (std::abs(
etaMS) > 2.0 || std::abs(etaCB) > 2.0) && summary.cscUnspoiledEtaHits == 0)
1515 if ((1.01 < std::abs(
etaMS) && std::abs(
etaMS) < 1.1) || (1.01 < std::abs(etaCB) && std::abs(etaCB) < 1.1))
1521 if (
isBEE(
etaMS, phiMS) || (std::abs(etaCB) > 1.4 && (summary.extendedSmallHits > 0 || summary.extendedSmallHoles > 0))) {
1522 if (summary.extendedSmallHits < 3 && summary.middleSmallHits >= 3 && summary.outerSmallHits >= 3)
1527 if (!summary.isSmallGoodSectors)
1544 unsigned int runNumber = 0;
1546 else runNumber = eventInfo->runNumber();
1550 ATH_MSG_DEBUG(
"The current event is a data event. Return runNumber.");
1556 static std::atomic<bool> issuedWarningPRW{
false};
1558 unsigned int rn = acc_rnd(*eventInfo);
1559 if (rn != 0)
return acc_rnd(*eventInfo);
1561 if (!issuedWarningPRW) {
1563 issuedWarningPRW =
true;
1568 if (needOnlyCorrectYear) {
1569 if (runNumber < 300000) {
1570 ATH_MSG_DEBUG(
"Random run number not available and this is mc16a or mc20a, returning dummy 2016 run number.");
1573 }
else if (runNumber < 310000) {
1574 ATH_MSG_DEBUG(
"Random run number not available and this is mc16d or mc20d, returning dummy 2017 run number.");
1577 }
else if (runNumber < 320000) {
1578 ATH_MSG_DEBUG(
"Random run number not available and this is mc16e or mc20e, returning dummy 2018 run number.");
1581 }
else if (runNumber < 600000) {
1582 ATH_MSG_DEBUG(
"Random run number not available and this is mc21/mc23, for the time being we're returing a dummy run number.");
1585 ATH_MSG_DEBUG(
"Detected some run 4 / phase II runnumber "<<runNumber<<
". ");
1589 ATH_MSG_FATAL(
"Random run number not available, fallback option of using runNumber failed since "<<runNumber<<
" cannot be recognised");
1590 throw std::runtime_error(
"MuonSelectionTool() - need RandomRunNumber decoration by the PileupReweightingTool");
1593 ATH_MSG_FATAL(
"Failed to find the RandomRunNumber decoration by the PileupReweightingTool");
1594 throw std::runtime_error(
"MuonSelectionTool() - need RandomRunNumber decoration from PileupReweightingTool");
1600 static constexpr std::array<float, 2> BIS78_eta{1.05, 1.3};
1601 static constexpr std::array<float, 8> BIS78_phi{0.21, 0.57, 1.00, 1.33, 1.78, 2.14, 2.57, 2.93};
1603 float abs_eta = std::abs(
eta);
1604 float abs_phi = std::abs(
phi);
1606 if (abs_eta >= BIS78_eta[0] && abs_eta <= BIS78_eta[1]) {
1607 if ((abs_phi >= BIS78_phi[0] && abs_phi <= BIS78_phi[1]) || (abs_phi >= BIS78_phi[2] && abs_phi <= BIS78_phi[3]) ||
1608 (abs_phi >= BIS78_phi[4] && abs_phi <= BIS78_phi[5]) || (abs_phi >= BIS78_phi[6] && abs_phi <= BIS78_phi[7])) {
1618 static constexpr std::array<float, 2> BEE_eta{1.440, 1.692};
1619 static constexpr std::array<float, 8> BEE_phi{0.301, 0.478, 1.086, 1.263, 1.872, 2.049, 2.657, 2.834};
1621 float abs_eta = std::abs(
eta);
1622 float abs_phi = std::abs(
phi);
1624 if (abs_eta >= BEE_eta[0] && abs_eta <= BEE_eta[1]) {
1625 if ((abs_phi >= BEE_phi[0] && abs_phi <= BEE_phi[1]) || (abs_phi >= BEE_phi[2] && abs_phi <= BEE_phi[3]) ||
1626 (abs_phi >= BEE_phi[4] && abs_phi <= BEE_phi[5]) || (abs_phi >= BEE_phi[6] && abs_phi <= BEE_phi[7])) {
1636 static constexpr std::array<float, 6> BMG_eta{0.35, 0.47, 0.68, 0.80, 0.925, 1.04};
1637 static constexpr std::array<float, 4> BMG_phi{-1.93, -1.765, -1.38, -1.21};
1639 float abs_eta = std::abs(
eta);
1641 if ((abs_eta >= BMG_eta[0] && abs_eta <= BMG_eta[1]) || (abs_eta >= BMG_eta[2] && abs_eta <= BMG_eta[3]) ||
1642 (abs_eta >= BMG_eta[4] && abs_eta <= BMG_eta[5])) {
1643 if ((
phi >= BMG_phi[0] &&
phi <= BMG_phi[1]) || (
phi >= BMG_phi[2] &&
phi <= BMG_phi[3])) {
return true; }
1652 ATH_MSG_ERROR(
"TightNNScore calculation is disabled. Please set the property CalculateTightNNScore to true.");
1653 throw std::runtime_error(
"cannot calculate TightNNScore");
1656 if (mu.muonType() != xAOD::Muon::Combined)
return -999;
1657 const xAOD::TrackParticle* idtrack = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
1658 const xAOD::TrackParticle* metrack = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
1659 if(!idtrack || !metrack)
return -999;
1661 if (
getQuality(mu) > xAOD::Muon::Medium)
return -999;
1663 if (std::abs(mu.eta())>2.5)
return -999;
1664 if(mu.pt()<4000.)
return -999;
1666 std::vector<float> input_features;
1668 int mu_author=mu.author();
1670 float mu_scatteringCurvatureSignificance=0.;
1671 retrieveParam(mu, mu_scatteringCurvatureSignificance, xAOD::Muon::scatteringCurvatureSignificance);
1672 float mu_scatteringNeighbourSignificance=0.;
1673 retrieveParam(mu, mu_scatteringNeighbourSignificance, xAOD::Muon::scatteringNeighbourSignificance);
1674 float mu_momentumBalanceSignificance=0.;
1675 retrieveParam(mu, mu_momentumBalanceSignificance, xAOD::Muon::momentumBalanceSignificance);
1677 float mu_reducedChi2=mu.primaryTrackParticle()->chiSquared() / mu.primaryTrackParticle()->numberDoF();
1680 float mu_spectrometerFieldIntegral=0.;
1681 retrieveParam(mu, mu_spectrometerFieldIntegral, xAOD::Muon::spectrometerFieldIntegral);
1682 float mu_segmentDeltaEta=0;
1683 retrieveParam(mu, mu_segmentDeltaEta, xAOD::Muon::segmentDeltaEta);
1684 uint8_t mu_numberOfPixelHits=0;
1686 uint8_t mu_numberOfPixelDeadSensors=0;
1703 input_features = {(
float)mu_author,
1705 mu_scatteringCurvatureSignificance,
1706 mu_scatteringNeighbourSignificance,
1707 mu_momentumBalanceSignificance,
1708 mu_qOverPSignificance,
1712 mu_spectrometerFieldIntegral,
1714 (
float)mu_numberOfPixelHits,
1715 (
float)mu_numberOfPixelDeadSensors,
1716 (
float)mu_innerLargeHits,
1717 (
float)mu_innerSmallHits,
1718 (
float)mu_middleLargeHits,
1719 (
float)mu_middleSmallHits,
1720 (
float)mu_outerLargeHits,
1721 (
float)mu_outerSmallHits};
1725 uint8_t mu_phiLayer1STGCHits=0;
1727 uint8_t mu_phiLayer2STGCHits=0;
1729 uint8_t mu_etaLayer1STGCHits=0;
1731 uint8_t mu_etaLayer2STGCHits=0;
1735 input_features = {(
float)mu_author,
1737 mu_scatteringCurvatureSignificance,
1738 mu_scatteringNeighbourSignificance,
1739 mu_momentumBalanceSignificance,
1740 mu_qOverPSignificance,
1744 mu_spectrometerFieldIntegral,
1746 (
float)mu_numberOfPixelHits,
1747 (
float)mu_numberOfPixelDeadSensors,
1748 (
float)mu_innerLargeHits,
1749 (
float)mu_innerSmallHits,
1750 (
float)mu_middleLargeHits,
1751 (
float)mu_middleSmallHits,
1752 (
float)mu_outerLargeHits,
1753 (
float)mu_outerSmallHits,
1754 (
float)mu_phiLayer1STGCHits,
1755 (
float)mu_phiLayer2STGCHits,
1756 (
float)mu_etaLayer1STGCHits,
1757 (
float)mu_etaLayer2STGCHits,
1762 std::vector<int64_t> inputShape = {1,
static_cast<int64_t
>(input_features.size())};
1765 inputData[
"flatten_input"] = std::make_pair(
1766 inputShape, std::move(input_features)
1770 outputData[
"sequential"] = std::make_pair(
1771 std::vector<int64_t>{1, 1}, std::vector<float>{}
1774 if (!
m_onnxTool->inference(inputData, outputData).isSuccess()) {
1778 const auto& variant = outputData[
"sequential"].second;
1779 if (std::holds_alternative<std::vector<float>>(variant)) {
1780 const auto&
vec = std::get<std::vector<float>>(variant);
1791 ATH_MSG_DEBUG(
"TightNNScore for muon with pT " << mu.pt() <<
" GeV, eta " << mu.eta() <<
" is " <<
score);
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::vector< size_t > vec
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
SG::ConstAccessor< T, ALLOC > ConstAccessor
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
@ IS_SIMULATION
true: simulation, false: data
Class providing the definition of the 4-vector interface.
float theta() const
Returns the parameter, which has range 0 to .
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
float qOverP() const
Returns the parameter.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
float chiSquared() const
Returns the of the overall track fit.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float charge() const
Returns the charge.
std::map< std::string, InferenceData > OutputDataMap
std::map< std::string, InferenceData > InputDataMap
Select isolated Photons, Electrons and Muons.
Muon::MuonStationIndex::ChIndex ChIdx
constexpr int toInt(const EnumType enumVal)
ChIndex
enum to classify the different chamber layers in the muon spectrometer
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
@ Muon
The object is a muon.
setRcore setEtHad setFside pt
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
MuonSegment_v1 MuonSegment
Reference the current persistent version:
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfGoodPrecisionLayers
layers with at least 3 hits that are not deweighted [uint8_t]
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].
@ SiSpacePointsSeedMaker_LargeD0
@ middleSmallHoles
number of precision holes in the middle small layer
@ outerSmallHits
number of precision hits in the outer small layer
@ middleSmallHits
number of precision hits in the middle small layer
@ outerLargeHits
number of precision hits in the outer large layer
@ middleLargeHits
number of precision hits in the middle large layer
@ isSmallGoodSectors
if non-deweighted track chambers are small
@ extendedSmallHits
number of precision hits in the extended small layer
@ extendedLargeHits
number of precision hits in the extended large layer
@ phiLayer1STGCHits
number of phi hits in the first STGC trigger layer (STGC1)
@ extendedSmallHoles
number of precision holes in the extended small layer
@ innerLargeHits
number of precision hits in the inner large layer
@ middleLargeHoles
number of precision holes in the middle large layer
@ etaLayer2STGCHits
number of eta hits in the second STGC trigger layer (STGC2)
@ etaLayer1STGCHits
number of eta hits in the first STGC trigger layer (STGC1)
@ phiLayer2STGCHits
number of phi hits in the second STGC trigger layer (STGC2)
@ combinedTrackOutBoundsPrecisionHits
total out-of-bounds hits on the combined track
@ cscUnspoiledEtaHits
number of unspoiled CSC eta clusters on track
@ innerSmallHits
number of precision hits in the inner small layer
Tell the compiler to optimize assuming that FP may trap.
#define CXXUTILS_TRAPPING_FP