00001 #ifndef QUICK_ANA__PHOTON_TOOL_H
00002 #define QUICK_ANA__PHOTON_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
00017 namespace CP{
00018 class IEgammaCalibrationAndSmearingTool;
00019 class IIsolationSelectionTool;
00020 class IIsolationCorrectionTool;
00021 }
00022 class IAsgPhotonEfficiencyCorrectionTool;
00023 class IAsgPhotonIsEMSelector;
00024 class IElectronPhotonShowerShapeFudgeTool;
00025 class IIsolationSelectionTool;
00026
00027 namespace ana
00028 {
00029
00034 class PhotonToolCorrect : public AnaToolCorrect<xAOD::PhotonContainer>
00035 {
00036
00038 ASG_TOOL_CLASS (PhotonToolCorrect, ana::IAnaTool)
00039
00040 public:
00041
00042
00044 PhotonToolCorrect (const std::string& name);
00045
00048 StatusCode initialize() override;
00049
00052 virtual StatusCode
00053 correctObject (xAOD::Photon& photon) override;
00054
00055 private:
00056
00058
00060 bool m_isAF2;
00061
00063 bool m_isData;
00064
00065
00066
00068 asg::AnaToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_calibration;
00070 asg::AnaToolHandle<IElectronPhotonShowerShapeFudgeTool> m_fudgeMCTool;
00072 asg::AnaToolHandle<CP::IIsolationCorrectionTool> m_isoCorrTool;
00073
00074 SelectionCut cut_fudge_tool;
00075 SelectionCut cut_calibration_tool;
00076 SelectionCut cut_isoCorr_tool;
00077
00078 };
00079
00080
00081
00086 class PhotonToolSelect : public AnaToolSelect<xAOD::PhotonContainer>
00087 {
00088
00090 ASG_TOOL_CLASS (PhotonToolSelect, ana::IAnaTool)
00091
00092 public:
00093
00094
00095 unsigned int quality;
00096
00097
00098
00100 PhotonToolSelect (const std::string& name);
00101
00104 StatusCode initialize() override;
00105
00107 virtual StatusCode
00108 selectObject (xAOD::Photon& photon) override;
00109
00110 private:
00112 asg::AnaToolHandle<IAsgPhotonIsEMSelector> m_selection;
00113 asg::AnaToolHandle<CP::IIsolationSelectionTool> m_isolationTool;
00114
00115 SelectionCut cut_OQ;
00116 SelectionCut cut_author;
00117 SelectionCut cut_cleaning;
00118 SelectionCut cut_selection;
00119 SelectionCut cut_isolationTool;
00120
00122
00124 std::string m_isolationWP;
00125
00127 bool m_isolationOn;
00128
00129 };
00130
00131
00132
00137 class PhotonToolWeight : public AnaToolWeight<xAOD::PhotonContainer>
00138 {
00139
00141 ASG_TOOL_CLASS (PhotonToolWeight, ana::IAnaTool)
00142
00143 public:
00144
00145
00147 PhotonToolWeight (const std::string& name);
00148
00151 StatusCode initialize() override;
00152
00154 virtual StatusCode
00155 objectWeight (const xAOD::Photon& photon, float& weight) override;
00156
00157 private:
00158
00159
00161 asg::AnaToolHandle<IAsgPhotonEfficiencyCorrectionTool> m_efficiencyTool;
00162 asg::AnaToolHandle<IAsgPhotonEfficiencyCorrectionTool> m_isoSFTool;
00163
00165
00167 bool m_isAF2;
00168
00170 std::string m_isolationWP;
00172 bool m_doIsolation;
00173
00174 };
00175
00176 }
00177
00178 #endif
00179