CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PtHatRapReweightUserHook Class Reference

#include <ReweightUserHooks.h>

Inheritance diagram for PtHatRapReweightUserHook:

Public Member Functions

double biasSelectionBy (const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
 
bool canBiasSelection () override
 
 PtHatRapReweightUserHook (const std::string &_yLabsigma_func, double _yLab_power, const std::string &_yCMsigma_func, double _yCM_power, double _pTHatMin, double _pTHatMax, double _pt=15, double _power=4.5)
 
 ~PtHatRapReweightUserHook () override
 

Private Attributes

double power
 
double pt
 
double pTHatMax
 
double pTHatMin
 
double yCM_power
 
TF1 yCMsigma
 
std::string yCMsigma_func
 
double yLab_power
 
TF1 yLabsigma
 
std::string yLabsigma_func
 

Detailed Description

Definition at line 117 of file ReweightUserHooks.h.

Constructor & Destructor Documentation

◆ PtHatRapReweightUserHook()

PtHatRapReweightUserHook::PtHatRapReweightUserHook ( const std::string &  _yLabsigma_func,
double  _yLab_power,
const std::string &  _yCMsigma_func,
double  _yCM_power,
double  _pTHatMin,
double  _pTHatMax,
double  _pt = 15,
double  _power = 4.5 
)
inline

Definition at line 119 of file ReweightUserHooks.h.

References pTHatMax, pTHatMin, yCMsigma, yLabsigma, and yLabsigma_func.

127  : yLabsigma_func(_yLabsigma_func),
128  yCMsigma_func(_yCMsigma_func),
129  yLab_power(_yLab_power),
130  yCM_power(_yCM_power),
131  pTHatMin(_pTHatMin),
132  pTHatMax(_pTHatMax),
133  pt(_pt),
134  power(_power) {
135  // empirical parametrizations defined in configuration file
136  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
137  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
138  }

◆ ~PtHatRapReweightUserHook()

PtHatRapReweightUserHook::~PtHatRapReweightUserHook ( )
inlineoverride

Definition at line 139 of file ReweightUserHooks.h.

139 {}

Member Function Documentation

◆ biasSelectionBy()

double PtHatRapReweightUserHook::biasSelectionBy ( const Pythia8::SigmaProcess *  sigmaProcessPtr,
const Pythia8::PhaseSpace *  phaseSpacePtr,
bool  inEvent 
)
inlineoverride

Definition at line 143 of file ReweightUserHooks.h.

References JetChargeProducer_cfi::exp, dqm-mbProfile::log, conifer::pow(), power, pt, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, yCM_power, yCMsigma, yLab_power, and yLabsigma.

145  {
146  //the variable selBias of the base class should be used;
147  if ((sigmaProcessPtr->nFinal() == 2)) {
148  double x1 = phaseSpacePtr->x1();
149  double x2 = phaseSpacePtr->x2();
150  double yLab = 0.5 * log(x1 / x2);
151  double yCM = 0.5 * log(phaseSpacePtr->tHat() / phaseSpacePtr->uHat());
152  double pTHat = phaseSpacePtr->pTHat();
153  double sigmaLab = yLabsigma.Eval(pTHat);
154  double sigmaCM = yCMsigma.Eval(pTHat);
155  // empirical reweighting function
156  selBias = pow(pTHat / pt, power) * exp(pow(fabs(yLab), yLab_power) / (2 * sigmaLab * sigmaLab) +
157  pow(fabs(yCM), yCM_power) / (2 * sigmaCM * sigmaCM));
158  return selBias;
159  }
160  selBias = 1.;
161  return selBias;
162  }
constexpr int pow(int x)
Definition: conifer.h:24

◆ canBiasSelection()

bool PtHatRapReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 141 of file ReweightUserHooks.h.

141 { return true; }

Member Data Documentation

◆ power

double PtHatRapReweightUserHook::power
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ pt

double PtHatRapReweightUserHook::pt
private

◆ pTHatMax

double PtHatRapReweightUserHook::pTHatMax
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

◆ pTHatMin

double PtHatRapReweightUserHook::pTHatMin
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

◆ yCM_power

double PtHatRapReweightUserHook::yCM_power
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yCMsigma

TF1 PtHatRapReweightUserHook::yCMsigma
private

Definition at line 167 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

◆ yCMsigma_func

std::string PtHatRapReweightUserHook::yCMsigma_func
private

Definition at line 165 of file ReweightUserHooks.h.

◆ yLab_power

double PtHatRapReweightUserHook::yLab_power
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yLabsigma

TF1 PtHatRapReweightUserHook::yLabsigma
private

Definition at line 167 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

◆ yLabsigma_func

std::string PtHatRapReweightUserHook::yLabsigma_func
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().