|
KLFitter
v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
|
This class is a variation of LikelihoodTopLeptonJets. More...
#include <LikelihoodTopLeptonJetsUDSep.h>
Public Types | |
| enum | LJetSeparationMethod { kNone, kPermReweight, kPermReweight2D } |
| Enumerate for light-jet reweighting methods. More... | |
Public Types inherited from KLFitter::LikelihoodTopLeptonJets | |
| enum | LeptonType { kElectron, kMuon } |
| Enumerator for the lepton type. More... | |
| enum | Parameters { parBhadE, parBlepE, parLQ1E, parLQ2E, parLepE, parNuPx, parNuPy, parNuPz, parTopM } |
| Enumerator for the fitted parameters of this likelihood. More... | |
Public Types inherited from KLFitter::LikelihoodBase | |
| enum | BtaggingMethod { kNotag, kVeto, kVetoNoFit, kVetoNoFitLight, kVetoNoFitBoth, kVetoHybridNoFit, kWorkingPoint, kVetoLight, kVetoBoth } |
| Enumerate for b-tagging possibilities. | |
Public Member Functions | |
Constructors and destructors | |
| LikelihoodTopLeptonJetsUDSep () | |
| The default constructor. More... | |
| ~LikelihoodTopLeptonJetsUDSep () | |
| The (defaulted) destructor. | |
Member functions (Get) | |
| double | BJetProb (double tagweight, double pt) |
| Probability of a jet to have the tag weight and pT of a b jet. | |
| double | BJetPt (double pt) |
| Probability of a jet to have the pT of a b jet. | |
| double | BJetTagWeight (double tagweight) |
| Probability of a jet to have the tag weight of a b jet. | |
| double | DownJetProb (double tagweight, double pt) |
| Probability of a jet to have the tag weight and pT of a down-type jet. | |
| double | DownJetPt (double pt) |
| Probability of a jet to have the pT of a down-type jet. | |
| double | DownJetTagWeight (double tagweight) |
| Probability of a jet to have the tag weight of a down-type jet. | |
| double | UpJetProb (double tagweight, double pt) |
| Probability of a jet to have the tag weight and pT of an up-type jet. | |
| double | UpJetPt (double pt) |
| Probability of a jet to have the pT of an up-type jet. | |
| double | UpJetTagWeight (double tagweight) |
| Probability of a jet to have the tag weight of an up-type jet. | |
Member functions (Set) | |
| void | SetLJetSeparationMethod (LJetSeparationMethod flag) |
| Set a flag. More... | |
| int | SetBJet2DWeightHisto (TH2F *hist) |
| Set histogram for tag weight distribution of b jets. More... | |
| int | SetBJetPtHisto (TH1F *hist) |
| Set histogram for pT distribution of b jets (reco level). More... | |
| int | SetBJetTagWeightHisto (TH1F *hist) |
| Set histogram for tag weight distribution of b jets. More... | |
| int | SetDownJet2DWeightHisto (TH2F *hist) |
| Set histogram for tag weight distribution of down type jets. More... | |
| int | SetDownJetPtHisto (TH1F *hist) |
| Set histogram for pT distribution of down jets (reco level). More... | |
| int | SetDownJetTagWeightHisto (TH1F *hist) |
| Set histogram for tag weight distribution of down type jets. More... | |
| int | SetUpJet2DWeightHisto (TH2F *hist) |
| Set histogram for tag weight distribution of up type jets. More... | |
| int | SetUpJetPtHisto (TH1F *hist) |
| Set histogram for pT distribution of up jets (reco level). More... | |
| int | SetUpJetTagWeightHisto (TH1F *hist) |
| Set histogram for tag weight distribution of up type jets. More... | |
Member functions (BAT) | |
| void | DefineParameters () override |
| Define the parameters of the fit. More... | |
| double | LogEventProbability () override |
| Return the log of the event probability for the current combination. More... | |
| double | LogEventProbabilityBTag () override |
| Return the contribution from b tagging to the log of the event probability for the current combination. More... | |
Member functions (misc) | |
| int | LHInvariantPermutationPartner (int iperm, int nperms, int *switchpar1, int *switchpar2) override |
| Check if the permutation is LH invariant. More... | |
| double | LogEventProbabilityLJetReweight () |
| Return the contribution from pT and b tag weight probability (by LJetSeparationMethod) to the log of the event probability for the current combination. More... | |
Public Member Functions inherited from KLFitter::LikelihoodTopLeptonJets | |
| LikelihoodTopLeptonJets () | |
| The default constructor. More... | |
| ~LikelihoodTopLeptonJets () | |
| The (defaulted) destructor. | |
| void | SetFlagTopMassFixed (bool flag) |
| Set a flag. More... | |
| void | SetFlagGetParSigmasFromTFs (bool flag) |
| Set a flag. More... | |
| void | SetLeptonType (LeptonType leptontype) |
| Set the type of lepton. More... | |
| void | SetLeptonType (int leptontype) |
| Set the type of lepton. More... | |
| std::vector< double > | GetInitialParameters () override |
| Get initial values for the parameters. More... | |
| virtual std::vector< double > | GetInitialParametersWoNeutrinoPz () |
| Get initial values for the parameters with a dummy of "0.0" for the neutrino pz. More... | |
| double | LogLikelihood (const std::vector< double > ¶meters) override |
| The posterior probability definition, overloaded from BCModel. More... | |
| std::vector< double > | LogLikelihoodComponents (std::vector< double > parameters) override |
| The posterior probability definition, overloaded from BCModel. More... | |
| int | SetET_miss_XY_SumET (double etx, double ety, double sumet) override |
| Set the values for the missing ET x and y components and the m_et_miss_sum. More... | |
| void | RequestResolutionFunctions () override |
| Request the necessary resolution functions from the detector. | |
Public Member Functions inherited from KLFitter::LikelihoodBase | |
| LikelihoodBase (Particles **particles=0) | |
| The default constructor. More... | |
| virtual | ~LikelihoodBase () |
| The default destructor. | |
| KLFitter::PhysicsConstants * | PhysicsConstants () |
| Return the table of physics constants. More... | |
| KLFitter::DetectorBase * | Detector () |
| Return the detector. More... | |
| KLFitter::Particles ** | PParticlesPermuted () |
| Return the set of measured particles. More... | |
| KLFitter::Particles * | ParticlesModel () |
| Return the set of model particles. More... | |
| int | NParticlesModel () |
| Return the number of model particles. More... | |
| int | NParameters () |
| Return the number of parameters. More... | |
| double | ParMin (int index) |
| Return the lower boundary of a parameter. More... | |
| double | ParMax (int index) |
| Return the upper boundary of a parameter. More... | |
| BtaggingMethod | GetBTagging () |
| Get flag to use b-tagging or not. More... | |
| bool | FlagIntegrate () |
| int | SetPhysicsConstants (KLFitter::PhysicsConstants *physicsconstants) |
| Set the physics constants. More... | |
| virtual int | SetDetector (KLFitter::DetectorBase **detector) |
| Set the detector. More... | |
| int | SetParticlesPermuted (KLFitter::Particles **particles) |
| Set the measured particles. More... | |
| int | SetPermutations (std::unique_ptr< KLFitter::Permutations > *permutations) |
| Set the permutation object. More... | |
| int | SetParameterRange (int index, double parmin, double parmax) |
| Set the range of a model parameter. More... | |
| int | SetInitialParameters (std::vector< double > const ¶meters) |
| Set the initial values for the minimization, etc. More... | |
| int | SetInitialParametersNChains (std::vector< double > const ¶meters, unsigned int nchains) |
| Set the initial values for the minimization, etc. More... | |
| int | SetBTagging (BtaggingMethod btagmethod) |
| Set which b-tagging you wish to use. More... | |
| int | SetFlagBTagging (bool flag) |
| THIS IS AN OUTDATED METHOD - JUST HERE FOR BACKWARD COMPATIBILITY. More... | |
| int | SetFlagIsNan (bool flag) |
| Set flag FlagIsNan. More... | |
| bool | GetFlagIsNan (void) |
| Get flag FlagIsNan. More... | |
| int | SetFlagIntegrate (bool flag) |
| Set flag to integrate or not. More... | |
| void | SetFlagUseJetMass (bool flag) |
| Set flag to use measured jet masses (true) instead of parton masses (false);. | |
| virtual int | Initialize () |
| Initialize the likelihood for the event. More... | |
| void | PropagateBTaggingInformation () |
| Propagate the b-tagging information from the permuted (measured) particles to the model particles. | |
| virtual double | LogAPrioriProbability (const std::vector< double > &) override |
| The prior probability definition, overloaded from BCModel. More... | |
| virtual bool | NoTFProblem (std::vector< double > parameters) |
| Check if there are TF problems. More... | |
| std::vector< double > | GetBestFitParameters () |
| Returns the best fit parameters, overloaded from BCModel. More... | |
| std::vector< double > | GetBestFitParameterErrors () |
| Returns the errors of the best fit parameters, overloaded from BCModel. More... | |
| double | GetBestFitParameter (unsigned int index) |
| Returns the best fit parameters, overloaded from BCModel. More... | |
| double | GetBestFitParameterError (unsigned int index) |
| Returns the errors of the best fit parameter i, overloaded from BCModel. More... | |
| int | GetParametersFromCache (int iperm) |
| Write parameters from fCachedParametersVector.at(iperm) to fCachedParameters. More... | |
| int | SetParametersToCache (int iperm, int nperms) |
| Write parameters to fCachedParametersVector.at(iperm) from GetBestFitParameter() More... | |
| double | GetIntegral () |
| int | ResetCache () |
| Resets the values of all parameter cache vectors. More... | |
Protected Member Functions | |
| int | DefineModelParticles () override |
| Define the model particles. More... | |
| int | RemoveForbiddenParticlePermutations () override |
| Remove forbidden particle permutations. More... | |
| int | RemoveInvariantParticlePermutations () override |
| Remove invariant particle permutations. More... | |
Protected Member Functions inherited from KLFitter::LikelihoodTopLeptonJets | |
| int | AdjustParameterRanges () override |
| Adjust ranges of the parameters. More... | |
| int | BuildModelParticles () override |
| Build the model particles from the best fit parameters. More... | |
| int | CalculateLorentzVectors (std::vector< double > const ¶meters) override |
| Update 4-vector values of the model particles. More... | |
| std::vector< double > | CalculateNeutrinoPzSolutions (TLorentzVector *additionalParticle=nullptr) |
| Calculates the neutrino pz solutions from the measured values and the W mass. More... | |
| std::vector< double > | GetNeutrinoPzSolutions () |
| Return the neutrino pz solutions from the measured values and the W mass. More... | |
| int | SavePermutedParticles () override |
| Save permuted particles. More... | |
| int | SaveResolutionFunctions () override |
| Save the resolution functions from the detector to the internal pointers. More... | |
Protected Member Functions inherited from KLFitter::LikelihoodBase | |
| double | SetPartonMass (double jetmass, double quarkmass, double *px, double *py, double *pz, double e) |
| Set model parton mass according to fFlagUseJetMass. More... | |
Protected Attributes | |
Member attributes | |
| LJetSeparationMethod | m_ljet_separation_method |
| A flag for using an additional reweighting of the permutations with the pT and tag weight probability (default: false);. | |
| TH2F * | m_bjet_2d_weight_histo |
| A pointer to the 2d histogram "tag weight vs. pT for bQuarks". | |
| TH1F * | m_bjet_pt_histo |
| A pointer to the histogram of the down b jet pT distribution. | |
| TH1F * | m_bjet_tag_weight_histo |
| A pointer to the histogram of the up b tag weight distribution. | |
| TH2F * | m_down_jet_2d_weight_histo |
| A pointer to the 2d histogram "tag weight vs. pT for downQuarks". | |
| TH1F * | m_down_jet_pt_histo |
| A pointer to the histogram of the down type jet pT distribution. | |
| TH1F * | m_down_jet_tag_weight_histo |
| A pointer to the histogram of the down quark tag weight distribution. | |
| TH2F * | m_up_jet_2d_weight_histo |
| A pointer to the 2d histogram "tag weight vs. pT for upQuarks". | |
| TH1F * | m_up_jet_pt_histo |
| A pointer to the histogram of the up type jet pT distribution. | |
| TH1F * | m_up_jet_tag_weight_histo |
| A pointer to the histogram of the up quark tag weight distribution. | |
Protected Attributes inherited from KLFitter::LikelihoodTopLeptonJets | |
| bool | m_flag_top_mass_fixed |
| A flag for using a fixed top mass (true) or not (false). | |
| bool | m_flag_get_par_sigmas_from_TFs |
| Flag for using ResolutionBase::GetSigma() to retrieve the parameter ranges. | |
| double | m_et_miss_x |
| The values of the x component of the missing ET. | |
| double | m_et_miss_y |
| The values of the y component of the missing ET. | |
| double | m_et_miss_sum |
| The values of the total scalar ET. | |
| LeptonType | m_lepton_type |
| An index deciding if the event is electron (1) or muon (2) plus jets. | |
| ResolutionBase * | m_res_energy_bhad |
| Pointer to resolution function for hadronic b quark. | |
| ResolutionBase * | m_res_energy_blep |
| Pointer to resolution function for leptonic b quark. | |
| ResolutionBase * | m_res_energy_lq1 |
| Pointer to resolution function for first light quark jet. | |
| ResolutionBase * | m_res_energy_lq2 |
| Pointer to resolution function for second light quark jet. | |
| ResolutionBase * | m_res_lepton |
| Pointer to resolution function for the lepton. | |
| ResolutionBase * | m_res_met |
| Pointer to resolution function for MET. | |
| double | m_bhad_meas_e |
| double | m_bhad_meas_p |
| double | m_bhad_meas_m |
| double | m_bhad_meas_deteta |
| double | m_bhad_meas_eta |
| double | m_bhad_meas_phi |
| double | m_bhad_meas_px |
| double | m_bhad_meas_py |
| double | m_bhad_meas_pz |
| double | m_blep_meas_e |
| double | m_blep_meas_p |
| double | m_blep_meas_m |
| double | m_blep_meas_deteta |
| double | m_blep_meas_eta |
| double | m_blep_meas_phi |
| double | m_blep_meas_px |
| double | m_blep_meas_py |
| double | m_blep_meas_pz |
| double | m_lq1_meas_e |
| double | m_lq1_meas_p |
| double | m_lq1_meas_m |
| double | m_lq1_meas_deteta |
| double | m_lq1_meas_eta |
| double | m_lq1_meas_phi |
| double | m_lq1_meas_px |
| double | m_lq1_meas_py |
| double | m_lq1_meas_pz |
| double | m_lq2_meas_e |
| double | m_lq2_meas_p |
| double | m_lq2_meas_m |
| double | m_lq2_meas_deteta |
| double | m_lq2_meas_eta |
| double | m_lq2_meas_phi |
| double | m_lq2_meas_px |
| double | m_lq2_meas_py |
| double | m_lq2_meas_pz |
| double | m_lep_meas_e |
| double | m_lep_meas_deteta |
| double | m_lep_meas_sintheta |
| double | m_lep_meas_pt |
| double | m_lep_meas_px |
| double | m_lep_meas_py |
| double | m_lep_meas_pz |
| double | m_bhad_fit_e |
| double | m_bhad_fit_px |
| double | m_bhad_fit_py |
| double | m_bhad_fit_pz |
| double | m_blep_fit_e |
| double | m_blep_fit_px |
| double | m_blep_fit_py |
| double | m_blep_fit_pz |
| double | m_lq1_fit_e |
| double | m_lq1_fit_px |
| double | m_lq1_fit_py |
| double | m_lq1_fit_pz |
| double | m_lq2_fit_e |
| double | m_lq2_fit_px |
| double | m_lq2_fit_py |
| double | m_lq2_fit_pz |
| double | m_lep_fit_e |
| double | m_lep_fit_px |
| double | m_lep_fit_py |
| double | m_lep_fit_pz |
| double | m_nu_fit_e |
| double | m_nu_fit_px |
| double | m_nu_fit_py |
| double | m_nu_fit_pz |
| double | m_wlep_fit_e |
| double | m_wlep_fit_px |
| double | m_wlep_fit_py |
| double | m_wlep_fit_pz |
| double | m_whad_fit_e |
| double | m_whad_fit_px |
| double | m_whad_fit_py |
| double | m_whad_fit_pz |
| double | m_whad_fit_m |
| double | m_wlep_fit_m |
| double | m_thad_fit_m |
| double | m_tlep_fit_m |
Protected Attributes inherited from KLFitter::LikelihoodBase | |
| KLFitter::Particles ** | fParticlesPermuted |
| A pointer to the measured particles. | |
| std::unique_ptr< KLFitter::Permutations > * | fPermutations |
| A pointer to the permutation object. | |
| std::unique_ptr< KLFitter::Particles > | fParticlesModel |
| A pointer to the model particles. | |
| KLFitter::PhysicsConstants | fPhysicsConstants |
| A pointer to the table of physics constants. | |
| KLFitter::DetectorBase ** | fDetector |
| A pointer to the detector. | |
| std::vector< double > | fEventProbability |
| The event probabilities for the different permutations. | |
| bool | fFlagIntegrate |
| A flag to integrate over the likelihood or not. | |
| bool | fFlagIsNan |
| A flag for knowing that Minuit gave parameters with NaN values to LogLikelihood. | |
| bool | fFlagUseJetMass |
| A flag for using the measured jet masses (true) instead of parton masses (false);. | |
| bool | fTFgood |
| Global variable for TF problems. | |
| BtaggingMethod | fBTagMethod |
| Name of btagging enum. | |
| std::vector< double > | fCachedParameters |
| The cached parameters used for the current permutation. | |
| std::vector< double > | fCachedParameterErrors |
| The cached parameter errors used for the current permutation. | |
| std::vector< std::vector< double > > | fCachedParametersVector |
| A vector of cached parameters, one for each permutation. More... | |
| std::vector< std::vector< double > > | fCachedParameterErrorsVector |
| A vector of cached parameter errors, one for each permutation. More... | |
| double | fCachedNormalization |
| The cached normalization, needed for the overloaded BCIntegrate::GetIntegral. | |
| std::vector< double > | fCachedNormalizationVector |
| A vector of cached parameters, one for each permutation. More... | |
This class is a variation of LikelihoodTopLeptonJets.
It adds methods to distinguish up-type and down-type quarks, i.e. their permutations are not invariant in this likelihood.
| KLFitter::LikelihoodTopLeptonJetsUDSep::LikelihoodTopLeptonJetsUDSep | ( | ) |
The default constructor.
In addition to LikelihoodTopLeptonJets(), this initializes m_ljet_separation_method to kNone.
|
overrideprotectedvirtual |
Define the model particles.
Reimplemented from KLFitter::LikelihoodTopLeptonJets.
|
overridevirtual |
Define the parameters of the fit.
In addition to LikelihoodTopLeptonJets::DefineParameters(), this renames the two energy parameters of the light quarks to "up-type" and "down-type".
Reimplemented from KLFitter::LikelihoodTopLeptonJets.
|
overridevirtual |
Check if the permutation is LH invariant.
A documentation, as to why this needs to be reimplemented, needs to be added.
| iperm | Current permutation |
| nperms | Total number of permutations |
| switchpar1 | ??? |
| switchpar2 | ??? |
Reimplemented from KLFitter::LikelihoodBase.
|
overridevirtual |
Return the log of the event probability for the current combination.
Basically identical to LikelihoodBase::LogEventProbability(), but adds an additional term for the light jets to the probability calculation.
Reimplemented from KLFitter::LikelihoodBase.
|
overridevirtual |
Return the contribution from b tagging to the log of the event probability for the current combination.
Basically identical to LikelihoodBase::LogEventProbabilityBTag(), but corrections were made to use kLightUp and kLightDown from KLFitter::Particles::TrueFlavorType instead of just kLight.
Reimplemented from KLFitter::LikelihoodBase.
| double KLFitter::LikelihoodTopLeptonJetsUDSep::LogEventProbabilityLJetReweight | ( | ) |
Return the contribution from pT and b tag weight probability (by LJetSeparationMethod) to the log of the event probability for the current combination.
|
inlineoverrideprotectedvirtual |
Remove forbidden particle permutations.
Reimplemented, because there are no forbidden particle permutations, if up-type and down-type quarks are distinguished, i.e. this function doesn't do anything.
Reimplemented from KLFitter::LikelihoodBase.
|
overrideprotectedvirtual |
Remove invariant particle permutations.
Reimplemented, because particle permutations with the two light jets swapped are not invariant in this likelihood.
Reimplemented from KLFitter::LikelihoodTopLeptonJets.
|
inline |
Set histogram for tag weight distribution of b jets.
| hist | Pointer to histogram. |
|
inline |
Set histogram for pT distribution of b jets (reco level).
| hist | Pointer to histogram. |
|
inline |
Set histogram for tag weight distribution of b jets.
| hist | Pointer to histogram. |
|
inline |
Set histogram for tag weight distribution of down type jets.
| hist | Pointer to histogram. |
|
inline |
Set histogram for pT distribution of down jets (reco level).
| hist | Pointer to histogram. |
|
inline |
Set histogram for tag weight distribution of down type jets.
| hist | Pointer to histogram. |
|
inline |
Set a flag.
If flag is true the permutations are reweighted with the pT and tag weight probabilities.
|
inline |
Set histogram for tag weight distribution of up type jets.
| hist | Pointer to histogram. |
|
inline |
Set histogram for pT distribution of up jets (reco level).
| hist | Pointer to histogram. |
|
inline |
Set histogram for tag weight distribution of up type jets.
| hist | Pointer to histogram. |
1.8.11