CMS 3D CMS Logo

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

#include <ReweightUserHooks.h>

Inheritance diagram for RapReweightUserHook:

Public Member Functions

double biasSelectionBy (const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
 
bool canBiasSelection () override
 
 RapReweightUserHook (const std::string &_yLabsigma_func, double _yLab_power, const std::string &_yCMsigma_func, double _yCM_power, double _pTHatMin, double _pTHatMax)
 
 ~RapReweightUserHook () override
 

Private Attributes

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

Constructor & Destructor Documentation

◆ RapReweightUserHook()

RapReweightUserHook::RapReweightUserHook ( const std::string &  _yLabsigma_func,
double  _yLab_power,
const std::string &  _yCMsigma_func,
double  _yCM_power,
double  _pTHatMin,
double  _pTHatMax 
)
inline

Definition at line 69 of file ReweightUserHooks.h.

75  : yLabsigma_func(_yLabsigma_func),
76  yCMsigma_func(_yCMsigma_func),
77  yLab_power(_yLab_power),
78  yCM_power(_yCM_power),
79  pTHatMin(_pTHatMin),
80  pTHatMax(_pTHatMax) {
81  // empirical parametrizations defined in configuration file
82  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
83  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
84  }

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

◆ ~RapReweightUserHook()

RapReweightUserHook::~RapReweightUserHook ( )
inlineoverride

Definition at line 85 of file ReweightUserHooks.h.

85 {}

Member Function Documentation

◆ biasSelectionBy()

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

Definition at line 89 of file ReweightUserHooks.h.

91  {
92  //the variable selBias of the base class should be used;
93  if ((sigmaProcessPtr->nFinal() == 2)) {
94  double x1 = phaseSpacePtr->x1();
95  double x2 = phaseSpacePtr->x2();
96  double yLab = 0.5 * log(x1 / x2);
97  double yCM = 0.5 * log(phaseSpacePtr->tHat() / phaseSpacePtr->uHat());
98  double pTHat = phaseSpacePtr->pTHat();
99  double sigmaLab = yLabsigma.Eval(pTHat);
100  double sigmaCM = yCMsigma.Eval(pTHat);
101  // empirical reweighting function
102  selBias = exp(pow(fabs(yLab), yLab_power) / (2 * sigmaLab * sigmaLab) +
103  pow(fabs(yCM), yCM_power) / (2 * sigmaCM * sigmaCM));
104  return selBias;
105  }
106  selBias = 1.;
107  return selBias;
108  }

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

◆ canBiasSelection()

bool RapReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 87 of file ReweightUserHooks.h.

87 { return true; }

Member Data Documentation

◆ pTHatMax

double RapReweightUserHook::pTHatMax
private

Definition at line 112 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().

◆ pTHatMin

double RapReweightUserHook::pTHatMin
private

Definition at line 112 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().

◆ yCM_power

double RapReweightUserHook::yCM_power
private

Definition at line 112 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yCMsigma

TF1 RapReweightUserHook::yCMsigma
private

Definition at line 113 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and RapReweightUserHook().

◆ yCMsigma_func

std::string RapReweightUserHook::yCMsigma_func
private

Definition at line 111 of file ReweightUserHooks.h.

◆ yLab_power

double RapReweightUserHook::yLab_power
private

Definition at line 112 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

◆ yLabsigma

TF1 RapReweightUserHook::yLabsigma
private

Definition at line 113 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and RapReweightUserHook().

◆ yLabsigma_func

std::string RapReweightUserHook::yLabsigma_func
private

Definition at line 111 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().

RapReweightUserHook::yCMsigma_func
std::string yCMsigma_func
Definition: ReweightUserHooks.h:111
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
RapReweightUserHook::yCMsigma
TF1 yCMsigma
Definition: ReweightUserHooks.h:113
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
RapReweightUserHook::yCM_power
double yCM_power
Definition: ReweightUserHooks.h:112
RapReweightUserHook::yLabsigma_func
std::string yLabsigma_func
Definition: ReweightUserHooks.h:111
RapReweightUserHook::pTHatMax
double pTHatMax
Definition: ReweightUserHooks.h:112
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
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
RapReweightUserHook::pTHatMin
double pTHatMin
Definition: ReweightUserHooks.h:112
RapReweightUserHook::yLabsigma
TF1 yLabsigma
Definition: ReweightUserHooks.h:113
RapReweightUserHook::yLab_power
double yLab_power
Definition: ReweightUserHooks.h:112