00001 #ifndef QUICK_ANA__JET_TOOL_H
00002 #define QUICK_ANA__JET_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
00029 class IJetCalibrationTool;
00030 class ICPJetUncertaintiesTool;
00031 class IJERTool;
00032 class IJERSmearingTool;
00033 class IJetSelector;
00034 class IBTaggingEfficiencyTool;
00035 class IBTaggingSelectionTool;
00036 class IJetUpdateJvt;
00037
00038 namespace CP {
00039 class IJetJvtEfficiency;
00040 }
00041
00042 namespace ana
00043 {
00044
00048 class JetToolCorrect : public AnaToolCorrect<xAOD::JetContainer>
00049 {
00050
00051 ASG_TOOL_CLASS (JetToolCorrect, ana::IAnaTool)
00052
00053 public:
00054
00055
00056
00057
00061 JetToolCorrect (const std::string& name);
00062
00064 virtual StatusCode
00065 useInitialConfiguration (const InternalConfiguration& conf) override;
00066
00070 StatusCode initialize() override;
00071
00076 virtual StatusCode
00077 correctObject (xAOD::Jet& jet) override;
00078
00079 private:
00082
00084 asg::AnaToolHandle<IJetCalibrationTool> m_calibration_tool;
00085
00087 asg::AnaToolHandle<ICPJetUncertaintiesTool> m_uncertainties_tool;
00088
00090 asg::AnaToolHandle<IJERTool> m_resolution_tool;
00091
00093 asg::AnaToolHandle<IJERSmearingTool> m_smearing_tool;
00094
00096 asg::AnaToolHandle<IJetUpdateJvt> m_jvt_tool;
00097
00099 asg::AnaToolHandle<CP::IJetJvtEfficiency> m_jvtEffTool;
00100
00102 asg::AnaToolHandle<IBTaggingSelectionTool> m_bsel_tool;
00103 asg::AnaToolHandle<IBTaggingSelectionTool> m_bsel_OR_tool;
00104
00106 asg::AnaToolHandle<IJetSelector> m_cleaning_tool;
00107
00109
00110 private:
00113
00115 bool m_isData = false;
00117 bool m_isAFII = false;
00119 std::string m_jetContainer;
00120
00122
00123 private:
00126
00128 bool m_enableBTagging;
00130 std::string m_btagger;
00132 std::string m_btagWP;
00134 std::string m_btagWP_OR;
00135
00137
00138 private:
00141 SelectionCut cut_calibration_tool;
00142 SelectionCut cut_uncertainties_tool;
00143 SelectionCut cut_smearing_tool;
00144 SelectionCut cut_cleaning_tool;
00146 };
00147
00148
00149
00153 class JetToolSelect : public AnaToolSelect<xAOD::JetContainer>
00154 {
00155
00156 ASG_TOOL_CLASS (JetToolSelect, ana::IAnaTool)
00157
00158 public:
00159
00160
00161
00162
00166 JetToolSelect (const std::string& name);
00167
00171 StatusCode initialize() override;
00172
00176 virtual StatusCode
00177 selectObject (xAOD::Jet& jet) override;
00178
00179 public:
00183
00185 SelectionStep m_jvt_cut_step;
00186
00188
00189 private:
00192 SelectionCut cut_jvt;
00194 };
00195
00196
00197
00201 class JetToolWeight : public AnaToolWeight<xAOD::JetContainer>
00202 {
00203
00204 ASG_TOOL_CLASS (JetToolWeight, ana::IAnaTool)
00205
00206 public:
00207
00208
00209
00210
00214 JetToolWeight (const std::string& name);
00215
00217 virtual unsigned inputTypes () const override;
00218
00220 virtual unsigned outputTypes () const override;
00221
00225 StatusCode initialize() override;
00226
00229 virtual StatusCode execute (IEventObjects& objects) override;
00230
00235 virtual StatusCode
00236 objectWeight (const xAOD::Jet& jet, float& weight) override;
00237
00238 private:
00241
00243 asg::AnaToolHandle<IBTaggingEfficiencyTool> m_btagging_eff_tool;
00244
00246 asg::AnaToolHandle<CP::IJetJvtEfficiency> m_jvtEffTool;
00247
00249
00250 private:
00253 SG::AuxElement::ConstAccessor<SelectType> m_anaSelect;
00254 SG::AuxElement::Accessor<float> m_anaWeight;
00255
00257 std::string m_btagger;
00258 std::string m_btagWP;
00259
00261 };
00262
00263
00264
00265
00266 StatusCode makeJetTool (DefinitionArgs& args,
00267 const std::string& collection,
00268 const SelectionStep& jvt_step=SelectionStep::MET,
00269 const std::string& btagWP="");
00270 }
00271
00272 #endif