00001 #ifndef jetsubstructureutils_boostedxbbtag_header
00002 #define jetsubstructureutils_boostedxbbtag_header
00003
00004
00005
00006
00007
00008 #include <set>
00009 #include <string>
00010 #include<memory>
00011
00012
00013 #include <xAODJet/JetContainer.h>
00014 #include <xAODMuon/MuonContainer.h>
00015 #include "MuonSelectorTools/MuonSelectionTool.h"
00016
00017
00018 class TFile;
00019 class TH2;
00020
00021 namespace JetSubStructureUtils {
00022 class BoostedXbbTag {
00023 public:
00024
00025 BoostedXbbTag(std::string working_point = "medium",
00026 #ifdef ROOTCORE
00027 std::string recommendations_file = "$ROOTCOREBIN/data/JetSubStructureUtils/config_13TeV_Htagging_MC15c_77WP_20160522.dat",
00028 #else
00029 std::string recommendations_file = "JetSubStructureUtils/data/config_13TeV_Htagging_MC15c_77WP_20160522.dat",
00030 #endif
00031 std::string boson_type = "Higgs",
00032 std::string algorithm_name = "AK10LCTRIMF5R20",
00033 int num_bTags = 2,
00034 std::string decor_prefix = "",
00035 bool debug = false,
00036 bool verbose = false);
00037
00038
00039 int result(const xAOD::Jet& jet, const xAOD::MuonContainer* muons) const;
00040
00041
00042 int result(const xAOD::Jet& jet, std::string algorithm_name, const xAOD::MuonContainer* muons) const;
00043
00044
00045
00046 std::pair<bool, std::string> get_algorithm_name(const xAOD::Jet& jet,
00047 const xAOD::JetAlgorithmType::ID jet_algorithm,
00048 const float size_parameter,
00049 const xAOD::JetInput::Type jet_input,
00050 const xAOD::JetTransform::Type jet_transform) const;
00051
00052
00053 std::vector<const xAOD::Jet*> get_bTagged_trackJets(const xAOD::Jet& jet) const;
00054
00055 std::vector<const xAOD::Muon*> get_matched_muons(const xAOD::Jet& jet) const;
00056 TLorentzVector get_correctedJet_TLV(const xAOD::Jet& jet) const;
00057 std::pair<float, float> get_mass_window(const xAOD::Jet& jet) const;
00058 std::pair<float, std::string> get_D2_pivot(const xAOD::Jet& jet) const;
00059
00060 private:
00061 std::string m_working_point;
00062 std::string m_recommendations_file;
00063 std::string m_boson_type;
00064 std::string m_algorithm_name;
00065 int m_num_bTags;
00066 std::string m_decor_prefix;
00067 bool m_debug,
00068 m_verbose;
00069
00070 float m_bTagCut,
00071 m_bTagCutCharm,
00072 m_massMin,
00073 m_massMax;
00074 std::vector<float> m_D2_params;
00075 std::string m_D2_cut_direction;
00076 std::unique_ptr<CP::MuonSelectionTool> m_muonSelectionTool;
00077
00078
00079 bool m_bad_configuration;
00080
00081
00082 static SG::AuxElement::ConstAccessor<int> AlgorithmType;
00083 static SG::AuxElement::ConstAccessor<float> SizeParameter;
00084 static SG::AuxElement::ConstAccessor<int> InputType;
00085 static SG::AuxElement::ConstAccessor<int> TransformType;
00086
00087
00088 static SG::AuxElement::ConstAccessor<float> RClus;
00089 static SG::AuxElement::ConstAccessor<float> PtFrac;
00090
00091
00092 static SG::AuxElement::ConstAccessor<float> RCut;
00093 static SG::AuxElement::ConstAccessor<float> ZCut;
00094
00095
00096
00097 static SG::AuxElement::ConstAccessor<char> BDRS;
00098
00099
00100 static SG::AuxElement::ConstAccessor<float> YMin;
00101 static SG::AuxElement::ConstAccessor<float> MuMax;
00102
00103
00104 static SG::AuxElement::ConstAccessor<float> D2;
00105 static SG::AuxElement::ConstAccessor<float> ECF1;
00106 static SG::AuxElement::ConstAccessor<float> ECF2;
00107 static SG::AuxElement::ConstAccessor<float> ECF3;
00108
00109
00110 static SG::AuxElement::ConstAccessor<ElementLink<xAOD::JetContainer>> parent;
00111
00112
00113 const SG::AuxElement::Decorator<int> isB;
00114 const SG::AuxElement::Decorator<std::vector<ElementLink<xAOD::IParticleContainer> > > matchedMuonsLink;
00115 const SG::AuxElement::Decorator<TLorentzVector> correctedJetDecor;
00116 const SG::AuxElement::Decorator<std::pair<float, float>> massWindow;
00117 const SG::AuxElement::Decorator<std::pair<float, std::string>> D2Pivot;
00118 };
00119 }
00120
00121 #endif