ATLAS Offline Software
Loading...
Searching...
No Matches
CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass Class Reference
Collaboration diagram for CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass:

Public Member Functions

 nFMethodPileupBasedLinearFitClass (const nlohmann::json &jsonConfig)
double getPFake (const double muactual, const int N_fake) const

Private Attributes

double m_slopeUnscaled = -999.
double m_interceptUnscaled = -999.
double m_slopeScaled = -999.
double m_interceptScaled = -999.

Detailed Description

Definition at line 70 of file SSVWeightsAlg.h.

Constructor & Destructor Documentation

◆ nFMethodPileupBasedLinearFitClass()

CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::nFMethodPileupBasedLinearFitClass ( const nlohmann::json & jsonConfig)

Definition at line 694 of file SSVWeightsAlg.cxx.

694 {
695 // Extract information from JSON file for nFMethodPileupBasedLinearFit
696 m_slopeUnscaled = jsonConfig["nF_pileup_based_linearfit"]["unscaled"]["slope"];
697 m_interceptUnscaled = jsonConfig["nF_pileup_based_linearfit"]["unscaled"]["intercept"];
698 m_slopeScaled = jsonConfig["nF_pileup_based_linearfit"]["scaled"]["slope"];
699 m_interceptScaled = jsonConfig["nF_pileup_based_linearfit"]["scaled"]["intercept"];
700 }

Member Function Documentation

◆ getPFake()

double CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::getPFake ( const double muactual,
const int N_fake ) const

Definition at line 703 of file SSVWeightsAlg.cxx.

705 {
706 // Calculate expected counts
707 double n_F = m_slopeUnscaled * muactual + m_interceptUnscaled;
708 double n_F_scaled = m_slopeScaled * muactual + m_interceptScaled;
709
710 // Calculate P_fake
711 double P_fake = poisson_pmf(N_fake, n_F_scaled) / poisson_pmf(N_fake, n_F);
712
713 return P_fake;
714 }
static double poisson_pmf(const int k, const double lambda)

Member Data Documentation

◆ m_interceptScaled

double CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::m_interceptScaled = -999.
private

Definition at line 80 of file SSVWeightsAlg.h.

◆ m_interceptUnscaled

double CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::m_interceptUnscaled = -999.
private

Definition at line 78 of file SSVWeightsAlg.h.

◆ m_slopeScaled

double CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::m_slopeScaled = -999.
private

Definition at line 79 of file SSVWeightsAlg.h.

◆ m_slopeUnscaled

double CP::SSVWeightsAlg::nFMethodPileupBasedLinearFitClass::m_slopeUnscaled = -999.
private

Definition at line 77 of file SSVWeightsAlg.h.


The documentation for this class was generated from the following files: