00001 #ifndef QUICK_ANA__ELECTRON_TOOL_H
00002 #define QUICK_ANA__ELECTRON_TOOL_H
00003
00004
00005
00006
00007
00008 #include <QuickAna/Global.h>
00009
00010 #include <QuickAna/AnaToolCorrect.h>
00011 #include <AsgTools/AnaToolHandle.h>
00012 #include <QuickAna/AnaToolSelect.h>
00013 #include <QuickAna/AnaToolWeight.h>
00014 #include <QuickAna/SelectionCut.h>
00015 #include <QuickAna/xAODInclude.h>
00016
00018 class IAsgElectronIsEMSelector;
00019 class IAsgElectronLikelihoodTool;
00020 namespace CP{
00021 class IEgammaCalibrationAndSmearingTool;
00022 class IIsolationSelectionTool;
00023 class IIsolationCorrectionTool;
00024 }
00025 class IAsgElectronEfficiencyCorrectionTool;
00026
00027 namespace ana
00028 {
00033 class ElectronToolPreCorrect : virtual public AnaToolCorrect<xAOD::ElectronContainer>
00034 {
00035
00037 ASG_TOOL_CLASS (ElectronToolPreCorrect, ana::IAnaTool)
00038
00039 public:
00040
00041
00043 ElectronToolPreCorrect (const std::string& name);
00044
00046 public:
00047 virtual AnalysisStep step () const override;
00048
00050 StatusCode initialize() override;
00051
00053 virtual StatusCode
00054 correctObject (xAOD::Electron& electron) override;
00055
00056 private:
00057
00058
00060 asg::AnaToolHandle<IAsgElectronLikelihoodTool> m_likelihoodTool_loose;
00061 asg::AnaToolHandle<IAsgElectronLikelihoodTool> m_likelihoodTool_medium;
00062 asg::AnaToolHandle<IAsgElectronLikelihoodTool> m_likelihoodTool_tight;
00063 };
00064
00065
00066
00071 class ElectronToolCorrect : virtual public AnaToolCorrect<xAOD::ElectronContainer>
00072 {
00073
00075 ASG_TOOL_CLASS (ElectronToolCorrect, ana::IAnaTool)
00076
00077 public:
00078
00079
00081 ElectronToolCorrect (const std::string& name);
00082
00084 StatusCode initialize() override;
00085
00087 virtual StatusCode
00088 correctObject (xAOD::Electron& electron) override;
00089
00090 private:
00091
00092
00094 bool m_isAF2;
00096 bool m_isData;
00097
00098
00099
00101 asg::AnaToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_calibration;
00103 asg::AnaToolHandle<CP::IIsolationCorrectionTool> m_isoCorrTool;
00104
00105 SelectionCut cut_correction;
00106 SelectionCut cut_isoCorr_tool;
00107 };
00108
00109
00110
00115 class ElectronToolSelect : virtual public AnaToolSelect<xAOD::ElectronContainer>
00116 {
00117
00119 ASG_TOOL_CLASS (ElectronToolSelect, ana::IAnaTool)
00120
00121 public:
00122
00123
00125 ElectronToolSelect (const std::string& name);
00126
00128 StatusCode initialize() override;
00129
00131 virtual StatusCode
00132 selectObject (xAOD::Electron& electron) override;
00133
00134 private:
00135
00136
00137
00139 std::string m_idStr;
00141 float m_ptMin;
00143 float m_etaMax;
00144
00146 bool m_isolationOn;
00148 std::string m_isolationWP;
00149
00151 std::string m_idAna;
00153 bool m_looseImpactCut;
00154
00155
00156
00157
00159 asg::AnaToolHandle<CP::IIsolationSelectionTool> m_isolationTool;
00160
00161
00162 SelectionCut cut_id;
00163 SelectionCut cut_OQ;
00164 SelectionCut cut_ptMin;
00165 SelectionCut cut_clusEta;
00166 SelectionCut cut_d0;
00167 SelectionCut cut_z0;
00168 SelectionCut cut_isolationTool;
00169 SelectionCut cut_idAna;
00170 };
00171
00172
00173
00178 class ElectronToolWeight : virtual public AnaToolWeight<xAOD::ElectronContainer>
00179 {
00180
00182 ASG_TOOL_CLASS (ElectronToolWeight, ana::IAnaTool)
00183
00184 public:
00185
00186
00188 ElectronToolWeight (const std::string& name);
00189
00191 StatusCode initialize() override;
00192
00194 virtual StatusCode
00195 objectWeight (const xAOD::Electron& elecron, float& weight) override;
00196
00197 public:
00198
00199
00202 asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> m_efficiencyTool_reco;
00203 asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> m_efficiencyTool_id;
00204 asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> m_efficiencyTool_iso;
00205
00206 private:
00207
00208
00210 std::string m_idStr;
00212 std::string m_isoStr;
00214 std::string m_idAna;
00216 bool m_isAF2;
00217 };
00218
00219
00220 StatusCode makeElectronTool(DefinitionArgs& args,
00221 const std::string& id,
00222 const bool isolationOn = false,
00223 const std::string& isolationWP = "Gradient",
00224 const std::string& idAna = "",
00225 const bool looseImpactCut=false);
00226
00227 }
00228
00229 #endif