Template class of experiment-independent interface to HitFit. This class is intended to be used inside the programming environment of a specific experiment, where each type of physics objects has its own class/type. For using HitFit with generic four-vector classes, user can't use this class and have to use the Top_Fit class directly. The reason is: this class is designed assuming electron and muon are represented by different object type, a situation which is guaranteed to happen in any experiments. The class contains some static integer constants to limit the maximum amount of jets in an event before fitting. See the description of those constants for details. The numbers of permutations for and as a function of the number of jets in the event for a few values of are. More...
#include <RunHitFit.h>
Public Member Functions | |
void | AddJet (const AJet &jet, bool useObjRes=false) |
Add one jet into the internal event. This function will do nothing if the internal event has already contained the maximally allowed number of jets. More... | |
void | AddLepton (const AElectron &electron, bool useObjRes=false) |
Add one electron into the internal event. More... | |
void | AddLepton (const AMuon &muon, bool useObjRes=false) |
Add one muon into the internal event. More... | |
void | clear () |
Clear the internal event, fit results, and jets. More... | |
std::vector< Fit_Result >::size_type | FitAllPermutation () |
Fit all permutations of the internal event. Returns the number of permutations. More... | |
std::vector< Fit_Result > | GetFitAllPermutation () |
Return the results of fitting all permutations of the internal event. More... | |
const Top_Fit & | GetTopFit () const |
Return a constant reference to the underlying Top_Fit object. More... | |
std::vector< Lepjets_Event > | GetUnfittedEvent () |
Return the unfitted events for all permutations. More... | |
RunHitFit (const LeptonTranslatorBase< AElectron > &el, const LeptonTranslatorBase< AMuon > &mu, const JetTranslatorBase< AJet > &jet, const METTranslatorBase< AMet > &met, const std::string default_file, double lepw_mass, double hadw_mass, double top_mass) | |
Constructor. More... | |
void | SetKtResolution (const Resolution &res) |
Set the resolution of the internal event. More... | |
void | SetMet (const AMet &met, bool useObjRes=false) |
Set the missing transverse energy of the internal event. More... | |
void | SetMETResolution (const Resolution &res) |
Set the resolution of the internal event. More... | |
~RunHitFit () | |
Destructor. More... | |
Static Public Attributes | |
static const unsigned int | MAX_HITFIT = 1680 |
static const unsigned int | MAX_HITFIT_JET = 8 |
static const unsigned int | MAX_HITFIT_VAR = 32 |
static const unsigned int | MIN_HITFIT_JET = 4 |
static const unsigned int | MIN_HITFIT_TTH = 6 |
Private Attributes | |
LeptonTranslatorBase< AElectron > | _ElectronTranslator |
Lepjets_Event | _event |
std::vector< Fit_Result > | _Fit_Results |
bool | _jetObjRes |
std::vector< AJet > | _jets |
JetTranslatorBase< AJet > | _JetTranslator |
METTranslatorBase< AMet > | _METTranslator |
LeptonTranslatorBase< AMuon > | _MuonTranslator |
Top_Fit | _Top_Fit |
std::vector< Lepjets_Event > | _Unfitted_Events |
Template class of experiment-independent interface to HitFit. This class is intended to be used inside the programming environment of a specific experiment, where each type of physics objects has its own class/type. For using HitFit with generic four-vector classes, user can't use this class and have to use the Top_Fit class directly. The reason is: this class is designed assuming electron and muon are represented by different object type, a situation which is guaranteed to happen in any experiments. The class contains some static integer constants to limit the maximum amount of jets in an event before fitting. See the description of those constants for details. The numbers of permutations for and as a function of the number of jets in the event for a few values of are.
| ||
---|---|---|
4 | 24 | N/A |
5 | 120 | N/A |
6 | 360 | 360 |
7 | 840 | 2520 |
8 | 1680 | 20160 |
If adjusting the limits defined by the static constants is desired, then please the following formulas.
The number for possible permutations, , as a function of number of jets, , for event is given by:
The number for possible permutations, , as a function of number of jets, , for is given by:
AElectron | The typename of the electron physics object class to be translated into HitFit's Lepjets_Event_Lep. |
AMuon | The typename of the muon physics object class to be translated into HitFit's Lepjets_Event_Lep. |
AJet | The typename of the jet physics object class to be translated into HitFit's Lepjets_Event_Jet. |
AMet | The typename of the missing transverse energy physics object class be translated into HitFit's Fourvec. |
Definition at line 153 of file RunHitFit.h.
|
inline |
Constructor.
el | The function object to translate from AElectron to Lepjets_Event_Lep. |
mu | The function object to translate from AMuon to Lepjets_Event_Lep. |
jet | The function object to translate from AJet to Lepjets_Event_Jet. |
met | The function object to translate from AMet to Fourvec. |
default_file | The path of ASCII text files which contains the parameter settings for this instance of RunHitFit. |
lepw_mass | The mass to which the leptonic boson should be constrained to. A value of zero means this constraint will be removed. |
hadw_mass | The mass to which the hadronic boson should be constrained to. A value of zero means this constraint will be removed. |
top_mass | The mass to which the top quark should be constrained to. A value of zero means this constraint will be removed. |
Definition at line 252 of file RunHitFit.h.
|
inline |
|
inline |
Add one jet into the internal event. This function will do nothing if the internal event has already contained the maximally allowed number of jets.
Explanation about this function: This function does not directly add the jet into the internal event. Rather, this function store the jet in an internal array. The reason is: jet energy correction and resolution depends on the jet type in the permutation. Therefore RunHitFit will only add jet into the event after a specific jet permutation has been determined. This is done in the FitAllPermutation function().
jet | The jet to be added into the internal event. |
useObjRes | Boolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class. |
Definition at line 332 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::MAX_HITFIT_JET.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Add one electron into the internal event.
electron | The electron to be added into the internal event. |
useObjRes | Boolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class. |
Definition at line 293 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_ElectronTranslator, hitfit::Lepjets_Event::add_lep(), and hitfit::electron_label.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Add one muon into the internal event.
muon | The muon to be added into the internal event. |
useObjRes | Boolean parameter to indicate if the user would like to use the resolution embedded in the object, and not the resolution read when instantiating the class. |
Definition at line 307 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_MuonTranslator, hitfit::Lepjets_Event::add_lep(), and hitfit::muon_label.
|
inline |
Clear the internal event, fit results, and jets.
Definition at line 276 of file RunHitFit.h.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Fit all permutations of the internal event. Returns the number of permutations.
Definition at line 385 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_event, hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_JetTranslator, hitfit::Lepjets_Event::add_jet(), hitfit::Top_Fit::args(), electrons_cff::bool, hitfit::Top_Fit_Args::do_higgs_flag(), hitfit::Top_Fit::fit_one_perm(), hitfit::hadb_label, hitfit::hadw1_label, hitfit::higgs_label, dqmiolumiharvest::j, hitfit::lepb_label, hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::MAX_HITFIT_JET, hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::MIN_HITFIT_JET, hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::MIN_HITFIT_TTH, TtSemiLepEvtBuilder_cfi::mt, hitfit::Lepjets_Event::set_jet_types(), TtSemiLepEvtBuilder_cfi::sigmt, and hitfit::unknown_label.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Return the results of fitting all permutations of the internal event.
Definition at line 475 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_Fit_Results.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Return a constant reference to the underlying Top_Fit object.
Definition at line 379 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_Top_Fit.
|
inline |
Return the unfitted events for all permutations.
Definition at line 469 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_Unfitted_Events.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Set the resolution of the internal event.
res | The resolution. |
Definition at line 360 of file RunHitFit.h.
References hitfit::Lepjets_Event::kt_res().
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetMETResolution().
|
inline |
Set the missing transverse energy of the internal event.
Definition at line 349 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::_METTranslator, hitfit::Lepjets_Event::kt_res(), hitfit::METTranslatorBase< AMet >::KtResolution(), and hitfit::Lepjets_Event::met().
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
|
inline |
Set the resolution of the internal event.
res | The resolution, same as resolution. |
Definition at line 371 of file RunHitFit.h.
References hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetKtResolution().
|
private |
The translator from AElectron to Lepjets_Event_Lep.
Definition at line 158 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::AddLepton().
|
private |
The internal event. The internal event only contains lepton and missing transverse energy.
Definition at line 180 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
|
private |
The results of the kinematic fit.
Definition at line 222 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::GetFitAllPermutation().
|
private |
Boolean flag which sets whether to use jet resolution read from file or jet resolution embedded in the physics objects.
This flag is only set when the FIRST jet is added into the event.
By default this flag is set to FALSE if user does not specify anything about which resolution to be used.
Definition at line 207 of file RunHitFit.h.
|
private |
The internal array of jets. Jets are kept in this array and not added into the internal event. The reason is: the jet energy correction applied to a jet is dependent on the assumed jet type (b or light) in the permutation. Therefore the decision is to store jets in their original format/data type.
Before a fit to a particular permutation is done, this class convert the jets in this array into Lepjets_Event_Jet format, taking into consideration the assumed jet type and applying the appropriate jet energy correction.
Definition at line 196 of file RunHitFit.h.
|
private |
The translator from AJet to Lepjets_Event_Jet.
Definition at line 168 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
|
private |
The translator from AMet to Fourvec.
Definition at line 173 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetMet().
|
private |
The translator from AMuon to Lepjets_Event_Lep.
Definition at line 163 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::AddLepton().
|
private |
The interface between the event and the fitting algorithm.
Definition at line 212 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::GetTopFit().
|
private |
The array of events with permutation information before fitting.
Definition at line 217 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::GetUnfittedEvent().
|
static |
Maximum number of HitFit permutation in each event.
Definition at line 495 of file RunHitFit.h.
|
static |
Maximum number of jet as input to HitFit in each event
Definition at line 490 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::AddJet(), and hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
|
static |
Maximum number of fitted variables in HitFit in each event
Definition at line 500 of file RunHitFit.h.
|
static |
Minimum number of jet as input to HitFit in Tt event
Definition at line 480 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
|
static |
Minimum number of jet as input to HitFit in TtH event
Definition at line 485 of file RunHitFit.h.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().