2#ifndef RIVET_RIVETHTT_HH
3#define RIVET_RIVETHTT_HH
6#include "HEPTopTagger/HEPTopTagger.hh"
13 EARLY_MASSRATIO_SORT_MASS,
14 LATE_MASSRATIO_SORT_MASS,
15 EARLY_MASSRATIO_SORT_MODDJADE,
16 LATE_MASSRATIO_SORT_MODDJADE,
28 Mode
mode = HTTMode::EARLY_MASSRATIO_SORT_MASS;
33 bool do_optimalR =
true;
34 double optimalR_min = 0.5;
35 double optimalR_step = 0.1;
36 double optimalR_threshold = 0.2;
41 double mass_drop = 0.8;
42 double max_subjet_mass = 30 * GeV;
47 unsigned int filt_N = 5;
48 double filtering_R = 0.3;
49 double filtering_minpt = 0.;
61 double top_mass = 172.3 * GeV;
64 double Mtop_min = 150 * GeV;
65 double Mtop_max = 200 * GeV;
71 double mass_ratio_range_min = (1. - fw) *
W_mass / top_mass;
72 double mass_ratio_range_max = (1. + fw) *
W_mass / top_mass;
78 double m13cutmin = 0.2;
79 double m13cutmax = 1.3;
84 double prune_zcut = 0.1;
85 double prune_rcut = 0.5;
141 double unfilteredMass()
const;
158 fastjet::HEPTopTagger::HEPTopTagger _tagger;
165 _tagger = fastjet::HEPTopTagger::HEPTopTagger();
168 _tagger.do_optimalR(params.do_optimalR);
169 _tagger.set_optimalR_min(params.optimalR_min);
170 _tagger.set_optimalR_step(params.optimalR_step);
171 _tagger.set_optimalR_threshold(params.optimalR_threshold);
174 fastjet::HEPTopTagger::Mode mode;
175 if (params.
mode == HTTMode::EARLY_MASSRATIO_SORT_MASS) {
176 mode = fastjet::HEPTopTagger::EARLY_MASSRATIO_SORT_MASS;
178 else if (params.
mode == HTTMode::LATE_MASSRATIO_SORT_MASS) {
179 mode = fastjet::HEPTopTagger::LATE_MASSRATIO_SORT_MASS;
181 else if (params.
mode == HTTMode::EARLY_MASSRATIO_SORT_MODDJADE) {
182 mode = fastjet::HEPTopTagger::EARLY_MASSRATIO_SORT_MODDJADE;
184 else if (params.
mode == HTTMode::LATE_MASSRATIO_SORT_MODDJADE) {
185 mode = fastjet::HEPTopTagger::LATE_MASSRATIO_SORT_MODDJADE;
188 mode = fastjet::HEPTopTagger::TWO_STEP_FILTER;
190 _tagger.set_mode(mode);
191 _tagger.set_mt(params.top_mass);
192 _tagger.set_mw(params.
W_mass);
193 _tagger.set_top_mass_range(params.Mtop_min, params.Mtop_max);
194 _tagger.set_fw(params.fw);
195 _tagger.set_mass_ratio_range(params.mass_ratio_range_min, params.mass_ratio_range_max);
196 _tagger.set_mass_ratio_cut(params.m23cut, params.m13cutmin, params.m13cutmax);
199 _tagger.set_filtering_n(params.filt_N);
200 _tagger.set_filtering_R(params.filtering_R);
201 _tagger.set_filtering_minpt_subjet(params.filtering_minpt);
203 fastjet::JetAlgorithm algo = fastjet::antikt_algorithm;
205 algo = fastjet::cambridge_algorithm;
207 algo = fastjet::kt_algorithm;
208 _tagger.set_filtering_jetalgorithm(algo);
211 algo = fastjet::antikt_algorithm;
213 algo = fastjet::cambridge_algorithm;
215 algo = fastjet::kt_algorithm;
216 _tagger.set_reclustering_jetalgorithm(algo);
219 _tagger.set_mass_drop_threshold(params.mass_drop);
220 _tagger.set_mass_drop_threshold(params.mass_drop);
223 _tagger.set_pruning_rcut_factor(params.prune_rcut);
224 _tagger.set_pruning_zcut(params.prune_zcut);
234 return Jet(topPjet());
243 return Jet(w1Pjet());
246 return Jet(w2Pjet());
250 const PseudoJet& HTT::topPjet()
const {
253 const PseudoJet& HTT::bPjet()
const {
256 const PseudoJet& HTT::wPjet()
const {
259 const PseudoJet& HTT::w1Pjet()
const {
262 const PseudoJet& HTT::w2Pjet()
const {
270 rtn.emplace_back(_tagger.j1());
271 rtn.emplace_back(_tagger.j2());
272 rtn.emplace_back(_tagger.j3());
281 return _tagger.pruned_mass();
284 double HTT::unfilteredMass()
const {
285 return _tagger.unfiltered_mass();
289 return _tagger.delta_top();
293 return _tagger.is_tagged();
297 return _tagger.is_maybe_top();
301 return _tagger.is_masscut_passed();
void calc(Jet &jet)
Run the top tagger on a given jet.
Definition RivetHTT.hh:228
bool passedMassCut2D() const
2D mass plane requirements passed?
Definition RivetHTT.hh:300
const PseudoJet & topJet() const
Top jet, as a pseudojet.
HTT(HTT::InputParameters ¶ms)
Constructor with arguments.
Definition RivetHTT.hh:94
const Jet bJet() const
The bottom jet inside the top.
Definition RivetHTT.hh:236
const PseudoJet & w1Jet() const
Leading subjet from W, as a pseudojet.
const Jet w2Jet() const
Second leading subjet from W.
Definition RivetHTT.hh:245
const Jet wJet() const
The W jet inside the top.
Definition RivetHTT.hh:239
bool isTopTagged() const
Is the jet tagged?
Definition RivetHTT.hh:292
double deltaTopMass() const
Difference between the reco top mass and the true top mass.
Definition RivetHTT.hh:288
const PseudoJet & bJet() const
The bottom jet inside the top, as a pseudojet.
const Jet topJet() const
Top jet.
Definition RivetHTT.hh:233
bool passedMassCutTop() const
Was the top-mass window requirement passed?
Definition RivetHTT.hh:296
const Jets & subjets() const
pT-ordered subjets
Definition RivetHTT.hh:267
const PseudoJet & w2Jet() const
Second leading subjet from W, as a pseudojet.
HTT()
Constructor without arguments.
Definition RivetHTT.hh:91
const PseudoJet & wJet() const
The W jet inside the top, as a pseudojet.
const Jet w1Jet() const
Leading subjet from W.
Definition RivetHTT.hh:242
void setParams(HTT::InputParameters ¶ms)
Set the tagging parameters.
Definition RivetHTT.hh:164
double prunedMass() const
The pruned mass.
Definition RivetHTT.hh:280
Representation of a clustered jet of particles.
Definition Jet.hh:47
const fastjet::PseudoJet & pseudojet() const
Access the internal FastJet3 PseudoJet (as a const reference).
Definition Jet.hh:292
Specialised vector of Jet objects.
Definition Jet.hh:21
Definition LHCbCommon.hh:9
HTTMode
HTT operating mode.
Definition RivetHTT.hh:12