00001 #ifndef QUICK_ANA__MUON_TOOL_H
00002 #define QUICK_ANA__MUON_TOOL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <QuickAna/Global.h>
00021
00022 #include <QuickAna/AnaToolCorrect.h>
00023 #include <AsgTools/AnaToolHandle.h>
00024 #include <QuickAna/AnaToolSelect.h>
00025 #include <QuickAna/AnaToolWeight.h>
00026 #include <QuickAna/SelectionCut.h>
00027
00028 namespace CP
00029 {
00030 class IMuonCalibrationAndSmearingTool;
00031 class IMuonSelectionTool;
00032 class IIsolationSelectionTool;
00033 class IMuonEfficiencyScaleFactors;
00034 class IPileupReweightingTool;
00035 }
00036
00037 namespace ana
00038 {
00039 class MuonToolCorrect : public AnaToolCorrect<xAOD::MuonContainer>
00040 {
00041
00042
00043
00044
00045 ASG_TOOL_CLASS (MuonToolCorrect, ana::IAnaTool)
00046
00047
00048
00049
00050
00051 public:
00052 MuonToolCorrect (const std::string& name);
00053
00054
00058 public:
00059 StatusCode initialize() override;
00060
00061
00066 public:
00067 virtual StatusCode
00068 correctObject (xAOD::Muon& muon) override;
00069
00070
00072 private:
00073 asg::AnaToolHandle<CP::IMuonCalibrationAndSmearingTool> m_calib_smear;
00074
00075 private:
00076 SelectionCut cut_calib_tool;
00077 };
00078
00079
00080
00081 class MuonToolSelect : public AnaToolSelect<xAOD::MuonContainer>
00082 {
00083
00084
00085
00086
00087 ASG_TOOL_CLASS (MuonToolSelect, ana::IAnaTool)
00088
00089
00090
00091
00092
00093 public:
00094 MuonToolSelect (const std::string& name);
00095
00096
00100 public:
00101 StatusCode initialize() override;
00102
00103
00107 public:
00108 virtual StatusCode
00109 selectObject (xAOD::Muon& muon) override;
00110
00111
00112 public:
00114 xAOD::Muon::Quality m_quality;
00115
00116 private:
00117
00118
00119
00121 bool m_isolationOn;
00123 std::string m_isolationWP;
00125 bool m_inclusiveMET;
00127 bool m_looseImpactCut;
00129 float m_high_pT;
00130
00131
00132
00134 asg::AnaToolHandle<CP::IMuonSelectionTool> m_selection;
00136 asg::AnaToolHandle<CP::IIsolationSelectionTool> m_isolationTool;
00137
00138 SelectionCut cut_selection;
00139 SelectionCut cut_d0;
00140 SelectionCut cut_z0;
00141 SelectionCut cut_high_pT;
00142 SelectionCut cut_isolationTool;
00143 };
00144
00145
00146
00147
00148
00149 class MuonToolWeight : public AnaToolWeight<xAOD::MuonContainer>
00150 {
00151
00152
00153
00154
00155 ASG_TOOL_CLASS (MuonToolWeight, ana::IAnaTool)
00156
00157
00158
00159
00160
00161 public:
00162 MuonToolWeight (const std::string& name);
00163
00164
00168 public:
00169 StatusCode initialize() override;
00170
00171
00176 public:
00177 virtual StatusCode
00178 objectWeight (const xAOD::Muon& muon, float& weight) override;
00179
00180
00181 private:
00182
00183
00185 asg::AnaToolHandle<CP::IMuonEfficiencyScaleFactors> m_efficiency_scale;
00186
00188 asg::AnaToolHandle<CP::IMuonEfficiencyScaleFactors> m_ttva_efficiency_scale;
00189
00191 asg::AnaToolHandle<CP::IMuonEfficiencyScaleFactors> m_isolation_scale;
00192
00193 private:
00195
00197 std::string m_isolationWP;
00198
00199 public:
00201 xAOD::Muon::Quality m_quality;
00202 };
00203
00204
00205 StatusCode makeMuonTool(DefinitionArgs& args,
00206 const xAOD::Muon::Quality& quality,
00207 const bool& isolationOn = false,
00208 const std::string& isolationWPString = "Gradient",
00209 const bool& inclusiveMET=false,
00210 const bool& looseImpactCut=false,
00211 const float& high_pT=-1.);
00212
00213 }
00214
00215 #endif