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 116 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 118 of file ReweightUserHooks.h.

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

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

◆ ~PtHatRapReweightUserHook()

PtHatRapReweightUserHook::~PtHatRapReweightUserHook ( )
inlineoverride

Definition at line 138 of file ReweightUserHooks.h.

138 {}

Member Function Documentation

◆ biasSelectionBy()

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

Definition at line 142 of file ReweightUserHooks.h.

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

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

◆ canBiasSelection()

bool PtHatRapReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 140 of file ReweightUserHooks.h.

140 { return true; }

Member Data Documentation

◆ power

double PtHatRapReweightUserHook::power
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ pt

double PtHatRapReweightUserHook::pt
private

◆ pTHatMax

double PtHatRapReweightUserHook::pTHatMax
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

◆ pTHatMin

double PtHatRapReweightUserHook::pTHatMin
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

◆ yCM_power

double PtHatRapReweightUserHook::yCM_power
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yCMsigma

TF1 PtHatRapReweightUserHook::yCMsigma
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

◆ yCMsigma_func

std::string PtHatRapReweightUserHook::yCMsigma_func
private

Definition at line 164 of file ReweightUserHooks.h.

◆ yLab_power

double PtHatRapReweightUserHook::yLab_power
private

Definition at line 165 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yLabsigma

TF1 PtHatRapReweightUserHook::yLabsigma
private

Definition at line 166 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

◆ yLabsigma_func

std::string PtHatRapReweightUserHook::yLabsigma_func
private

Definition at line 164 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
PtHatRapReweightUserHook::yCM_power
double yCM_power
Definition: ReweightUserHooks.h:165
PtHatRapReweightUserHook::pt
double pt
Definition: ReweightUserHooks.h:165
PtHatRapReweightUserHook::power
double power
Definition: ReweightUserHooks.h:165
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
PtHatRapReweightUserHook::yLabsigma_func
std::string yLabsigma_func
Definition: ReweightUserHooks.h:164
PtHatRapReweightUserHook::yLabsigma
TF1 yLabsigma
Definition: ReweightUserHooks.h:166
PtHatRapReweightUserHook::pTHatMax
double pTHatMax
Definition: ReweightUserHooks.h:165
PtHatRapReweightUserHook::yLab_power
double yLab_power
Definition: ReweightUserHooks.h:165
PtHatRapReweightUserHook::pTHatMin
double pTHatMin
Definition: ReweightUserHooks.h:165
PtHatRapReweightUserHook::yCMsigma
TF1 yCMsigma
Definition: ReweightUserHooks.h:166
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
PtHatRapReweightUserHook::yCMsigma_func
std::string yCMsigma_func
Definition: ReweightUserHooks.h:164
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6