ATLAS Offline Software
MuonSelectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSELECTORTOOLS_MUONSELECTIONTOOL_H
6 #define MUONSELECTORTOOLS_MUONSELECTIONTOOL_H
7 
9 #include "AsgTools/AsgTool.h"
13 #include "TF1.h"
14 #include "TFile.h"
15 #include "TH2D.h"
16 #include "TMVA/Reader.h"
17 #include "TSystem.h" // Replace with PathResolver
19 namespace CP {
20 
31  class MuonSelectionTool : public virtual IAsgSelectionTool, public virtual IMuonSelectionTool, public asg::AsgTool {
34 
35  public:
37  MuonSelectionTool(const std::string& name = "MuonSelection");
38 
39  virtual ~MuonSelectionTool();
40 
43 
45  virtual StatusCode initialize() override;
46 
48 
51 
53  virtual const asg::AcceptInfo& getAcceptInfo() const override;
54 
56  virtual asg::AcceptData accept(const xAOD::IParticle* p) const override;
57 
59 
62 
64  virtual asg::AcceptData accept(const xAOD::Muon& mu) const override;
65 
67  virtual void setPassesIDCuts(xAOD::Muon&) const override;
68 
70  // void setPassesLowPtEfficiencyCuts( xAOD::Muon& mu ) const;
71 
73  virtual void setQuality(xAOD::Muon& mu) const override;
74 
76  virtual bool passedIDCuts(const xAOD::Muon&) const override;
77 
79  virtual bool passedMuonCuts(const xAOD::Muon&) const override;
80 
82  virtual bool passedIDCuts(const xAOD::TrackParticle&) const override;
83 
85  virtual bool passedHighPtCuts(const xAOD::Muon&) const override;
86 
89  virtual bool passedLowPtEfficiencyCuts(const xAOD::Muon&) const override;
90  virtual bool passedLowPtEfficiencyCuts(const xAOD::Muon&, xAOD::Muon::Quality thisMu_quality) const override;
91 
93  virtual bool passedErrorCutCB(const xAOD::Muon&) const override;
94 
96  virtual bool isBadMuon(const xAOD::Muon&) const override;
97 
99  virtual xAOD::Muon::Quality getQuality(const xAOD::Muon& mu) const override;
100 
102  virtual bool passedCaloTagQuality(const xAOD::Muon& mu) const override;
103 
105  virtual bool passedCaloScore(const xAOD::Muon& mu) const override;
106 
108  virtual int getResolutionCategory(const xAOD::Muon&) const override;
110 
112  std::vector<const xAOD::MuonSegment*> getSegmentsSorted(const xAOD::Muon& mu) const;
113 
115  bool isBIS78(const float eta, const float phi) const;
117  bool isBEE(const float eta, const float phi) const;
119  bool isBMG(const float eta, const float phi) const;
120 
122  float qOverPsignificance(const xAOD::Muon& muon) const;
124  float rhoPrime(const xAOD::Muon& muon) const;
125 
127  struct hitSummary {
145  };
146 
148  template <class P, class T, class S> inline void retrieveSummaryValue(const P& muon, T& value, const S type, bool ignoreMissing = false) const {
149  if (!muon.summaryValue(value, type) && !ignoreMissing) {
150  ATH_MSG_FATAL(__FILE__ << ":" << __LINE__ << " Failed to retrieve summary value " << type);
151  throw std::runtime_error("MuonSelectorTool summary retrieval failed");
152  }
153  }
154 
156  void fillSummary(const xAOD::Muon& muon, hitSummary& summary) const;
157 
158  private:
159  bool passedLowPtEfficiencyMVACut(const xAOD::Muon&) const;
160 
162  bool passTight(const xAOD::Muon& mu, float rho, float oneOverPSig) const;
163 
166  bool passedBMVmimicCut(const xAOD::Muon&) const;
167 
170 
171  Gaudi::Property<double> m_maxEta{this, "MaxEta", 2.7, "Maximum eta range to select the muons"};
172  Gaudi::Property<int> m_quality{this, "MuQuality", 1,"Quality to select. Values correspond to 0=Tight, 1=Medium, 2=Loose, 3=VeryLoose (only for debug, not supported), 4=HighPt, 5=LowPtEfficiency"};
173  Gaudi::Property<bool> m_toroidOff{this, "ToroidOff", false, "Run the tool in Toroid off setup"};
174  Gaudi::Property<bool> m_isRun3{this, "IsRun3Geo", false, "Switch to toggle the run 2 & run 3 geometry cuts. The tool will throw an exception if the run number does not match the expectations later"};
175  Gaudi::Property<bool> m_excludeNSWFromPrecisionLayers{this, "ExcludeNSWFromPrecisionLayers", false, "Cut on the nprecisionlayers ignoring the NSW"};
176  Gaudi::Property<bool> m_recalcPrecisionLayerswNSW{this, "RecalcPrecisionLayerswNSW", true, "Recalculate nprecisionlayers with internal criteria for NSW"};
177  Gaudi::Property<bool> m_useCaloScore{this, "UseCaloScore", true, "Use CaloScore for calo-tags in the Loose working point. False will revert back to CaloMuonIDTag (not recommended in Rel.22)"};
178  Gaudi::Property<int> m_caloScoreWP{this, "CaloScoreWP", 4,"Currently there are 4 CaloScore WPs for testing; WP4 is the recommended one"};
179  Gaudi::Property<bool> m_useLRT{this, "UseLRT", false, "Enable support for LRT muons"};
180 
181  // Expert development options
182  Gaudi::Property<bool> m_turnOffMomCorr{this, "TurnOffMomCorr", false};
183  Gaudi::Property<bool> m_disablePtCuts{this, "DisablePtCuts", false};
184  Gaudi::Property<bool> m_developMode{this, "ExpertDevelopMode", false};
185  Gaudi::Property<bool> m_TrtCutOff{this, "TrtCutOff", true};
186  Gaudi::Property<bool> m_SctCutOff{this, "SctCutOff", false};
187  Gaudi::Property<bool> m_PixCutOff{this, "PixCutOff", false};
188  Gaudi::Property<bool> m_SiHolesCutOff{this, "SiHolesCutOff", false};
189  Gaudi::Property<bool> m_useAllAuthors{this, "UseAllAuthors", true};
190  Gaudi::Property<bool> m_use2stationMuonsHighPt{this, "Use2stationMuonsHighPt", true, "for users of high-pT working point to choose whether to include 'safe' 2-station muons"};
191  Gaudi::Property<bool> m_useMVALowPt{this, "UseMVALowPt", false, "for users of low-pT working point to choose whether to use MVA and whether to include MuTagIMO muons. Not yet supported in release 22, crrently only for development studies."};
192  Gaudi::Property<bool> m_useSegmentTaggedLowPt{this, "UseSegmentTaggedLowPt", false, "Use MVA low-pt WP. In development phase"};
193  Gaudi::Property<bool> m_geoOnTheFly{this, "AllowSettingGeometryOnTheFly", false,"avoids crash if run2/run3 geo is wrongly set"};
194  Gaudi::Property<bool> m_doBadMuonVetoMimic{this, "DoBadMuonVetoMimic", false}; // switch to cut away the tail of very large smearing in MC to mimic the effect of the bad muon veto for 2-station muons in the high-pT selection
195  Gaudi::Property<bool> m_allowComm{this, "AcceptCommChain", true, "Accepts muons from the EMEO chain if set to true"};
196  Gaudi::Property<bool> m_useBEEBISInHighPtRun3{this, "UseBEEBISInHighPtRun3", false, "Include BEE and BIS7/8 in high-pT WP in Run3"};
197 
198  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this, "EventInfoContName", "EventInfo", "event info key"};
199 
200  // MVA configs for low-pT working point. Expert use only!
201  Gaudi::Property<std::string> m_MVAreaderFile_EVEN_MuidCB{
202  this, "MVAreaderFile_EVEN_MuidCB",
203  "MuonSelectorTools/190118_PrelimLowPtMVA/LowPtMVA_Weights/BDTG_9JAN2019_MuidCB_EVEN.weights.xml"};
204  Gaudi::Property<std::string> m_MVAreaderFile_ODD_MuidCB{
205  this, "MVAreaderFile_ODD_MuidCB",
206  "MuonSelectorTools/190118_PrelimLowPtMVA/LowPtMVA_Weights/BDTG_9JAN2019_MuidCB_ODD.weights.xml"};
207 
208  Gaudi::Property<std::string> m_MVAreaderFile_EVEN_MuGirl{
209  this, "MVAreaderFile_EVEN_MuGirl",
210  "MuonSelectorTools/190118_PrelimLowPtMVA/LowPtMVA_Weights/BDTG_9JAN2019_MuGirl_EVEN.weights.xml"};
211  Gaudi::Property<std::string> m_MVAreaderFile_ODD_MuGirl{
212  this, "MVAreaderFile_ODD_MuGirl",
213  "MuonSelectorTools/190118_PrelimLowPtMVA/LowPtMVA_Weights/BDTG_9JAN2019_MuGirl_ODD.weights.xml"};
214 
215  Gaudi::Property<std::string> m_MVAreaderFile_MuTagIMO_etaBin1{
216  this, "MVAreaderFile_MuTagIMO_etaBin1", "dev/MuonSelectorTools/181121_MuTagIMO_BDT/BDT_NOV2021_MuTagIMO_etaBin1.weights.xml"};
217  Gaudi::Property<std::string> m_MVAreaderFile_MuTagIMO_etaBin2{
218  this, "MVAreaderFile_MuTagIMO_etaBin2", "dev/MuonSelectorTools/181121_MuTagIMO_BDT/BDT_NOV2021_MuTagIMO_etaBin2.weights.xml"};
219  Gaudi::Property<std::string> m_MVAreaderFile_MuTagIMO_etaBin3{
220  this, "MVAreaderFile_MuTagIMO_etaBin3", "dev/MuonSelectorTools/181121_MuTagIMO_BDT/BDT_NOV2021_MuTagIMO_etaBin3.weights.xml"};
221 
222  // subfolder to load from the calibration db
223  Gaudi::Property<std::string> m_calibration_version{this, "CalibrationRelease", "PreRec2016_2016-04-13"};
224 
225  // possible override for the calibration version
226  Gaudi::Property<std::string> m_custom_dir{this, "CustomInputFolder", ""};
227 
229  Gaudi::Property<std::string> m_BMVcutFile{this, "BMVcutFile",
230  "MuonSelectorTools/180620_BMVmimicCutFunctions/BMVmimicCutFunctions.root"};
231 
233  StatusCode getHist(TFile* file, const std::string& histName, std::unique_ptr<TH1>& hist) const;
234  //
235  std::unique_ptr<TH1> m_tightWP_lowPt_rhoCuts;
236  std::unique_ptr<TH1> m_tightWP_lowPt_qOverPCuts;
237  std::unique_ptr<TH1> m_tightWP_mediumPt_rhoCuts;
238  std::unique_ptr<TH1> m_tightWP_highPt_rhoCuts;
239  //
240  std::unique_ptr<TF1> m_BMVcutFunction_barrel;
241  std::unique_ptr<TF1> m_BMVcutFunction_endcap;
242 
243  // Need run number (or random run number) to apply period-dependent selections.
244  // If selection depends only on data taking year, this can be specified by passing
245  // argument needOnlyCorrectYear=true, in which case the random run number decoration
246  // from the pile-up reweighting tool is not needed.
247  unsigned int getRunNumber(bool needOnlyCorrectYear = false) const;
248 
249  // TMVA readers for low-pT working point
250  std::unique_ptr<TMVA::Reader> m_readerE_MUID{nullptr};
251  std::unique_ptr<TMVA::Reader> m_readerO_MUID{nullptr};
252  std::unique_ptr<TMVA::Reader> m_readerE_MUGIRL{nullptr};
253  std::unique_ptr<TMVA::Reader> m_readerO_MUGIRL{nullptr};
254 
255  std::unique_ptr<TMVA::Reader> m_reader_MUTAGIMO_etaBin1{nullptr};
256  std::unique_ptr<TMVA::Reader> m_reader_MUTAGIMO_etaBin2{nullptr};
257  std::unique_ptr<TMVA::Reader> m_reader_MUTAGIMO_etaBin3{nullptr};
258 
259  // variables for the TMVA readers
261 
262  void IdMsPt(const xAOD::Muon& muon, float& idPt, float& msPt) const;
263 
264  void checkSanity() const;
265 
266  bool isRun3(bool forceOnTheFly = false) const {
267  if (!m_geoOnTheFly && !forceOnTheFly) return m_isRun3;
268  int rn = getRunNumber(true);
269  return rn>=399999;
270  }
271 
272  void retrieveParam(const xAOD::Muon& muon, float& value, const xAOD::Muon::ParamDef param) const;
273  }; // class MuonSelectionTool
274 
275 } // namespace CP
276 
277 #endif // CPTOOLTESTS_MUONSELECTIONTOOL_H
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
CP::MuonSelectionTool::m_MVAreaderFile_MuTagIMO_etaBin2
Gaudi::Property< std::string > m_MVAreaderFile_MuTagIMO_etaBin2
Definition: MuonSelectionTool.h:217
CP::MuonSelectionTool
Implementation of the muon selector tool.
Definition: MuonSelectionTool.h:31
CP::MuonSelectionTool::passTight
bool passTight(const xAOD::Muon &mu, float rho, float oneOverPSig) const
Returns true if the muon passed the tight working point cuts.
Definition: MuonSelectionTool.cxx:1326
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CP::MuonSelectionTool::m_acceptInfo
asg::AcceptInfo m_acceptInfo
Store selection information.
Definition: MuonSelectionTool.h:169
CP::MuonSelectionTool::hitSummary::extendedLargeHits
uint8_t extendedLargeHits
Definition: MuonSelectionTool.h:138
CP::MuonSelectionTool::m_use2stationMuonsHighPt
Gaudi::Property< bool > m_use2stationMuonsHighPt
Definition: MuonSelectionTool.h:190
CP::MuonSelectionTool::m_quality
Gaudi::Property< int > m_quality
Definition: MuonSelectionTool.h:172
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
CP::MuonSelectionTool::m_custom_dir
Gaudi::Property< std::string > m_custom_dir
Definition: MuonSelectionTool.h:226
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
CP::MuonSelectionTool::passedCaloTagQuality
virtual bool passedCaloTagQuality(const xAOD::Muon &mu) const override
Returns true if the muon passed additional calo-tag quality cuts.
Definition: MuonSelectionTool.cxx:1276
CP::MuonSelectionTool::m_MVAreaderFile_MuTagIMO_etaBin3
Gaudi::Property< std::string > m_MVAreaderFile_MuTagIMO_etaBin3
Definition: MuonSelectionTool.h:219
CP::MuonSelectionTool::getQuality
virtual xAOD::Muon::Quality getQuality(const xAOD::Muon &mu) const override
Returns the quality of the muon. To set the value on the muon, instead call setQuality(xAOD::Muon&) c...
Definition: MuonSelectionTool.cxx:415
CP::MuonSelectionTool::m_MVAreaderFile_EVEN_MuidCB
Gaudi::Property< std::string > m_MVAreaderFile_EVEN_MuidCB
Definition: MuonSelectionTool.h:201
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
CP::MuonSelectionTool::m_useAllAuthors
Gaudi::Property< bool > m_useAllAuthors
Definition: MuonSelectionTool.h:189
CP::MuonSelectionTool::m_reader_MUTAGIMO_etaBin3
std::unique_ptr< TMVA::Reader > m_reader_MUTAGIMO_etaBin3
Definition: MuonSelectionTool.h:257
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
CP::MuonSelectionTool::m_disablePtCuts
Gaudi::Property< bool > m_disablePtCuts
Definition: MuonSelectionTool.h:183
DMTest::P
P_v1 P
Definition: P.h:23
CP::MuonSelectionTool::m_readerE_MUID
std::unique_ptr< TMVA::Reader > m_readerE_MUID
Definition: MuonSelectionTool.h:250
plotmaker.hist
hist
Definition: plotmaker.py:148
CP::MuonSelectionTool::passedIDCuts
virtual bool passedIDCuts(const xAOD::Muon &) const override
Returns true if the muon passes the standard MCP ID cuts.
Definition: MuonSelectionTool.cxx:594
CP::MuonSelectionTool::m_BMVcutFunction_barrel
std::unique_ptr< TF1 > m_BMVcutFunction_barrel
Definition: MuonSelectionTool.h:240
CP::MuonSelectionTool::isBEE
bool isBEE(const float eta, const float phi) const
Check if muon eta/phi falls in BEE chambers.
Definition: MuonSelectionTool.cxx:1602
CP::MuonSelectionTool::m_readerE_MUGIRL
std::unique_ptr< TMVA::Reader > m_readerE_MUGIRL
Definition: MuonSelectionTool.h:252
CP::MuonSelectionTool::m_turnOffMomCorr
Gaudi::Property< bool > m_turnOffMomCorr
Definition: MuonSelectionTool.h:182
CP::MuonSelectionTool::m_tightWP_highPt_rhoCuts
std::unique_ptr< TH1 > m_tightWP_highPt_rhoCuts
Definition: MuonSelectionTool.h:238
CP::MuonSelectionTool::getHist
StatusCode getHist(TFile *file, const std::string &histName, std::unique_ptr< TH1 > &hist) const
Checks for each histogram.
Definition: MuonSelectionTool.cxx:228
egammaParameters::ParamDef
ParamDef
Definition: egammaParamDefs.h:99
athena.value
value
Definition: athena.py:124
CP::MuonSelectionTool::passedLowPtEfficiencyCuts
virtual bool passedLowPtEfficiencyCuts(const xAOD::Muon &) const override
Returns true if the muon passes the standard MCP low pt cuts.
Definition: MuonSelectionTool.cxx:675
CP::MuonSelectionTool::m_PixCutOff
Gaudi::Property< bool > m_PixCutOff
Definition: MuonSelectionTool.h:187
CP::MuonSelectionTool::setPassesIDCuts
virtual void setPassesIDCuts(xAOD::Muon &) const override
set the passes ID cuts variable of the muon
Definition: MuonSelectionTool.cxx:592
CP::MuonSelectionTool::m_readerO_MUGIRL
std::unique_ptr< TMVA::Reader > m_readerO_MUGIRL
Definition: MuonSelectionTool.h:253
CP::MuonSelectionTool::hitSummary::middleSmallHits
uint8_t middleSmallHits
Definition: MuonSelectionTool.h:133
SG::ReadHandleKey< xAOD::EventInfo >
CP::MuonSelectionTool::retrieveParam
void retrieveParam(const xAOD::Muon &muon, float &value, const xAOD::Muon::ParamDef param) const
Definition: MuonSelectionTool.cxx:1451
CP::MuonSelectionTool::passedCaloScore
virtual bool passedCaloScore(const xAOD::Muon &mu) const override
Returns true if the muon passed the CaloScore calo-tag working point.
Definition: MuonSelectionTool.cxx:1297
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
IAsgSelectionTool.h
CP::MuonSelectionTool::m_isRun3
Gaudi::Property< bool > m_isRun3
Definition: MuonSelectionTool.h:174
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
CP::MuonSelectionTool::m_MVAreaderFile_ODD_MuGirl
Gaudi::Property< std::string > m_MVAreaderFile_ODD_MuGirl
Definition: MuonSelectionTool.h:211
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::MuonSelectionTool::m_toroidOff
Gaudi::Property< bool > m_toroidOff
Definition: MuonSelectionTool.h:173
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
CP::MuonSelectionTool::passedHighPtCuts
virtual bool passedHighPtCuts(const xAOD::Muon &) const override
Returns true if the muon passes the standard MCP High Pt cuts.
Definition: MuonSelectionTool.cxx:917
CP::MuonSelectionTool::m_BMVcutFile
Gaudi::Property< std::string > m_BMVcutFile
file for bad muon veto mimic cut functions
Definition: MuonSelectionTool.h:229
CP::MuonSelectionTool::m_useMVALowPt
Gaudi::Property< bool > m_useMVALowPt
Definition: MuonSelectionTool.h:191
CP::MuonSelectionTool::m_BMVcutFunction_endcap
std::unique_ptr< TF1 > m_BMVcutFunction_endcap
Definition: MuonSelectionTool.h:241
CP::MuonSelectionTool::hitSummary::innerSmallHits
uint8_t innerSmallHits
Definition: MuonSelectionTool.h:131
CP::MuonSelectionTool::m_recalcPrecisionLayerswNSW
Gaudi::Property< bool > m_recalcPrecisionLayerswNSW
Definition: MuonSelectionTool.h:176
CP::MuonSelectionTool::m_developMode
Gaudi::Property< bool > m_developMode
Definition: MuonSelectionTool.h:184
CP::MuonSelectionTool::passedErrorCutCB
virtual bool passedErrorCutCB(const xAOD::Muon &) const override
Returns true if a CB muon passes a pt- and eta-dependent cut on the relative CB q/p error.
Definition: MuonSelectionTool.cxx:1095
IMuonSelectionTool.h
CP::MuonSelectionTool::hitSummary::nprecisionLayers
uint8_t nprecisionLayers
Definition: MuonSelectionTool.h:128
CP::MuonSelectionTool::setQuality
virtual void setQuality(xAOD::Muon &mu) const override
set the passes low pT cuts variable of the muon
Definition: MuonSelectionTool.cxx:357
CP::MuonSelectionTool::m_doBadMuonVetoMimic
Gaudi::Property< bool > m_doBadMuonVetoMimic
Definition: MuonSelectionTool.h:194
CP::MuonSelectionTool::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MuonSelectionTool.h:198
CP::MuonSelectionTool::passedBMVmimicCut
bool passedBMVmimicCut(const xAOD::Muon &) const
Returns true if the muon passes a cut which mimics the effect of the combined error cut This is neces...
Definition: MuonSelectionTool.cxx:1200
CP::MuonSelectionTool::qOverPsignificance
float qOverPsignificance(const xAOD::Muon &muon) const
Returns q/p significance of the muon (see definition in https://cds.cern.ch/record/2665711 )
Definition: MuonSelectionTool.cxx:380
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CP::MuonSelectionTool::passedMuonCuts
virtual bool passedMuonCuts(const xAOD::Muon &) const override
Returns true if the muon passes a standardized loose preselection.
Definition: MuonSelectionTool.cxx:1225
CP::MuonSelectionTool::hitSummary::nprecisionHoleLayers
uint8_t nprecisionHoleLayers
Definition: MuonSelectionTool.h:129
CP::MuonSelectionTool::hitSummary::outerSmallHits
uint8_t outerSmallHits
Definition: MuonSelectionTool.h:135
asg::AcceptInfo
Definition: AcceptInfo.h:28
CP::MuonSelectionTool::hitSummary
struct to handle easily number of hits in different parts of the MS
Definition: MuonSelectionTool.h:127
CP::MuonSelectionTool::hitSummary::etaLayer2STGCHits
uint8_t etaLayer2STGCHits
Definition: MuonSelectionTool.h:143
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CP::MuonSelectionTool::isBMG
bool isBMG(const float eta, const float phi) const
Check if muon eta/phi falls in BMG chambers.
Definition: MuonSelectionTool.cxx:1620
CP::MuonSelectionTool::isBIS78
bool isBIS78(const float eta, const float phi) const
Check if muon eta/phi falls in BIS7/8 chambers.
Definition: MuonSelectionTool.cxx:1584
CP::MuonSelectionTool::m_useLRT
Gaudi::Property< bool > m_useLRT
Definition: MuonSelectionTool.h:179
CP::MuonSelectionTool::m_caloScoreWP
Gaudi::Property< int > m_caloScoreWP
Definition: MuonSelectionTool.h:178
CP::MuonSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Get an object describing the "selection steps" of the tool.
Definition: MuonSelectionTool.cxx:249
file
TFile * file
Definition: tile_monitor.h:29
python.BunchSpacingUtils.rn
rn
Definition: BunchSpacingUtils.py:87
CP::MuonSelectionTool::m_useSegmentTaggedLowPt
Gaudi::Property< bool > m_useSegmentTaggedLowPt
Definition: MuonSelectionTool.h:192
CP::MuonSelectionTool::hitSummary::nGoodPrecLayers
uint8_t nGoodPrecLayers
Definition: MuonSelectionTool.h:130
CP::MuonSelectionTool::getSegmentsSorted
std::vector< const xAOD::MuonSegment * > getSegmentsSorted(const xAOD::Muon &mu) const
Returns a vector of the muon's segments, sorted according to chamber index.
Definition: MuonSelectionTool.cxx:795
CP::MuonSelectionTool::m_calibration_version
Gaudi::Property< std::string > m_calibration_version
Definition: MuonSelectionTool.h:223
CP::MuonSelectionTool::m_excludeNSWFromPrecisionLayers
Gaudi::Property< bool > m_excludeNSWFromPrecisionLayers
Definition: MuonSelectionTool.h:175
CP::MuonSelectionTool::getRunNumber
unsigned int getRunNumber(bool needOnlyCorrectYear=false) const
Definition: MuonSelectionTool.cxx:1527
CP::MuonSelectionTool::hitSummary::etaLayer1STGCHits
uint8_t etaLayer1STGCHits
Definition: MuonSelectionTool.h:142
CP::MuonSelectionTool::m_low_pt_mva_mutex
std::mutex m_low_pt_mva_mutex
Definition: MuonSelectionTool.h:260
CP::MuonSelectionTool::hitSummary::outerLargeHits
uint8_t outerLargeHits
Definition: MuonSelectionTool.h:136
CP::MuonSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *p) const override
Get the decision using a generic IParticle pointer.
Definition: MuonSelectionTool.cxx:251
CP::MuonSelectionTool::m_useBEEBISInHighPtRun3
Gaudi::Property< bool > m_useBEEBISInHighPtRun3
Definition: MuonSelectionTool.h:196
CP::IMuonSelectionTool
Interface for (a) muon selector tool(s)
Definition: IMuonSelectionTool.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CP::MuonSelectionTool::m_reader_MUTAGIMO_etaBin1
std::unique_ptr< TMVA::Reader > m_reader_MUTAGIMO_etaBin1
Definition: MuonSelectionTool.h:255
CP::MuonSelectionTool::m_tightWP_mediumPt_rhoCuts
std::unique_ptr< TH1 > m_tightWP_mediumPt_rhoCuts
Definition: MuonSelectionTool.h:237
CP::MuonSelectionTool::m_readerO_MUID
std::unique_ptr< TMVA::Reader > m_readerO_MUID
Definition: MuonSelectionTool.h:251
CP::MuonSelectionTool::m_useCaloScore
Gaudi::Property< bool > m_useCaloScore
Definition: MuonSelectionTool.h:177
CP::MuonSelectionTool::checkSanity
void checkSanity() const
Definition: MuonSelectionTool.cxx:270
CP::MuonSelectionTool::m_SiHolesCutOff
Gaudi::Property< bool > m_SiHolesCutOff
Definition: MuonSelectionTool.h:188
CP::MuonSelectionTool::m_MVAreaderFile_MuTagIMO_etaBin1
Gaudi::Property< std::string > m_MVAreaderFile_MuTagIMO_etaBin1
Definition: MuonSelectionTool.h:215
EventInfo.h
CP::MuonSelectionTool::m_tightWP_lowPt_qOverPCuts
std::unique_ptr< TH1 > m_tightWP_lowPt_qOverPCuts
Definition: MuonSelectionTool.h:236
CP::MuonSelectionTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: MuonSelectionTool.cxx:59
CP::MuonSelectionTool::isBadMuon
virtual bool isBadMuon(const xAOD::Muon &) const override
Returns true if a CB muon fails some loose quaility requirements designed to remove pathological trac...
Definition: MuonSelectionTool.cxx:629
CP::MuonSelectionTool::m_reader_MUTAGIMO_etaBin2
std::unique_ptr< TMVA::Reader > m_reader_MUTAGIMO_etaBin2
Definition: MuonSelectionTool.h:256
CP::MuonSelectionTool::m_tightWP_lowPt_rhoCuts
std::unique_ptr< TH1 > m_tightWP_lowPt_rhoCuts
Definition: MuonSelectionTool.h:235
CP::MuonSelectionTool::MuonSelectionTool
MuonSelectionTool(const std::string &name="MuonSelection")
Create a proper constructor for Athena.
Definition: MuonSelectionTool.cxx:55
CP::MuonSelectionTool::hitSummary::extendedSmallHits
uint8_t extendedSmallHits
Definition: MuonSelectionTool.h:137
CP::MuonSelectionTool::isRun3
bool isRun3(bool forceOnTheFly=false) const
Definition: MuonSelectionTool.h:266
CP::MuonSelectionTool::m_maxEta
Gaudi::Property< double > m_maxEta
Definition: MuonSelectionTool.h:171
CP::MuonSelectionTool::hitSummary::MMHits
uint8_t MMHits
Definition: MuonSelectionTool.h:144
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CP::MuonSelectionTool::m_TrtCutOff
Gaudi::Property< bool > m_TrtCutOff
Definition: MuonSelectionTool.h:185
CP::MuonSelectionTool::hitSummary::innerLargeHits
uint8_t innerLargeHits
Definition: MuonSelectionTool.h:132
CP::MuonSelectionTool::hitSummary::extendedSmallHoles
uint8_t extendedSmallHoles
Definition: MuonSelectionTool.h:139
CP::MuonSelectionTool::IdMsPt
void IdMsPt(const xAOD::Muon &muon, float &idPt, float &msPt) const
Definition: MuonSelectionTool.cxx:361
CP::MuonSelectionTool::retrieveSummaryValue
void retrieveSummaryValue(const P &muon, T &value, const S type, bool ignoreMissing=false) const
helper function to retrieve a hitSummary value
Definition: MuonSelectionTool.h:148
CP::MuonSelectionTool::m_geoOnTheFly
Gaudi::Property< bool > m_geoOnTheFly
Definition: MuonSelectionTool.h:193
CP::MuonSelectionTool::~MuonSelectionTool
virtual ~MuonSelectionTool()
CP::MuonSelectionTool::m_allowComm
Gaudi::Property< bool > m_allowComm
Definition: MuonSelectionTool.h:195
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
CP::MuonSelectionTool::m_MVAreaderFile_ODD_MuidCB
Gaudi::Property< std::string > m_MVAreaderFile_ODD_MuidCB
Definition: MuonSelectionTool.h:204
CP::MuonSelectionTool::hitSummary::isSmallGoodSectors
uint8_t isSmallGoodSectors
Definition: MuonSelectionTool.h:140
AsgTool.h
CP::MuonSelectionTool::passedLowPtEfficiencyMVACut
bool passedLowPtEfficiencyMVACut(const xAOD::Muon &) const
Definition: MuonSelectionTool.cxx:811
asg::AcceptData
Definition: AcceptData.h:30
CP::MuonSelectionTool::fillSummary
void fillSummary(const xAOD::Muon &muon, hitSummary &summary) const
functions that fills a hitSummary for a muon
Definition: MuonSelectionTool.cxx:1399
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
CP::MuonSelectionTool::getResolutionCategory
virtual int getResolutionCategory(const xAOD::Muon &) const override
Returns an integer corresponding to categorization of muons with different resolutions.
Definition: MuonSelectionTool.cxx:1461
CP::MuonSelectionTool::m_SctCutOff
Gaudi::Property< bool > m_SctCutOff
Definition: MuonSelectionTool.h:186
CP::MuonSelectionTool::hitSummary::middleLargeHits
uint8_t middleLargeHits
Definition: MuonSelectionTool.h:134
CP::MuonSelectionTool::m_MVAreaderFile_EVEN_MuGirl
Gaudi::Property< std::string > m_MVAreaderFile_EVEN_MuGirl
Definition: MuonSelectionTool.h:208
fitman.rho
rho
Definition: fitman.py:532
CP::MuonSelectionTool::rhoPrime
float rhoPrime(const xAOD::Muon &muon) const
Returns rhoPrime of the muon (see definition in https://cds.cern.ch/record/2665711 )
Definition: MuonSelectionTool.cxx:404
CP::MuonSelectionTool::hitSummary::cscUnspoiledEtaHits
uint8_t cscUnspoiledEtaHits
Definition: MuonSelectionTool.h:141
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65