00001 #ifndef QUICK_ANA__TRIGGER_TOOL_H
00002 #define QUICK_ANA__TRIGGER_TOOL_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <QuickAna/Global.h>
00011
00012 #include <QuickAna/AnaTool.h>
00013 #include <AsgTools/AnaToolHandle.h>
00014 #include <QuickAna/xAODInclude.h>
00015 #include <AsgTools/ToolHandle.h>
00016
00017
00018
00019
00020 namespace Trig{
00021 class TrigDecisionTool;
00022 class IMatchingTool;
00023 }
00024
00025 namespace TrigConf {class ITrigConfigTool;}
00026
00027
00028 namespace CP {class IMuonTriggerScaleFactors;}
00029 class IAsgElectronEfficiencyCorrectionTool;
00030
00031 namespace ana
00032 {
00034 class TriggerTool : public AnaTool
00035 {
00036
00037
00038
00039
00040 ASG_TOOL_CLASS (TriggerTool, ana::IAnaTool)
00041
00042 public:
00043
00047 TriggerTool (const std::string& name);
00048
00049
00051 virtual StatusCode
00052 useInitialConfiguration (const InternalConfiguration& conf) override;
00053
00054
00058 StatusCode initialize() override;
00059
00060
00061 virtual StatusCode
00062 setObjectType (ObjectType type, const std::string& workingPoint) override;
00063
00064
00065
00068 virtual AnalysisStep step () const override;
00069
00070
00072 virtual unsigned inputTypes () const override;
00073
00074
00076 virtual unsigned outputTypes () const override;
00077
00078
00082 virtual StatusCode execute (IEventObjects& objects) override;
00083
00085 enum TrigYear {
00086 Only2015,
00087 Only2016,
00088 Only2015_2016
00089 };
00090
00091 protected:
00092
00094
00095 private:
00096 std::string m_trigList;
00097 std::string m_groupName;
00098 std::string m_muon_trig_str;
00099 bool m_matchEl;
00100 bool m_matchMu;
00102 bool m_isAF2;
00104 bool m_isData;
00106 std::string m_muon_wp;
00108 std::string m_ele_wp;
00110 std::string m_muon_iso_wp;
00112 std::string m_ele_iso_wp;
00114 bool m_isEleToolSetup;
00115
00117
00118 double m_TriggerPtThreshold;
00119
00120
00121
00122 int m_year;
00123
00124 asg::AnaToolHandle<Trig::TrigDecisionTool> m_trigDecTool;
00125 asg::AnaToolHandle<TrigConf::ITrigConfigTool> m_trigconfigTool;
00126
00127 asg::AnaToolHandle<Trig::IMatchingTool> m_triggerMatching;
00128
00129 asg::AnaToolHandle<CP::IMuonTriggerScaleFactors> m_mu_trig_sf2015;
00130 asg::AnaToolHandle<CP::IMuonTriggerScaleFactors> m_mu_trig_sf2016;
00131
00132 asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> m_el_trig_sf;
00133 asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> m_el_trig_eff;
00134
00135 bool isTrigMatched (std::vector<const xAOD::IParticle*> myParticles, std::string trigger);
00136
00137 asg::AnaToolHandle<CP::IMuonTriggerScaleFactors>& muonSFToolForThisYear(const int runNumber);
00138
00139 };
00140 }
00141
00142 #endif