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

Constructor & Destructor Documentation

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

67  :
68  yLabsigma_func(_yLabsigma_func), yCMsigma_func(_yCMsigma_func),
69  yLab_power(_yLab_power), yCM_power(_yCM_power),
70  pTHatMin(_pTHatMin), pTHatMax(_pTHatMax)
71  {
72  // empirical parametrizations defined in configuration file
73  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
74  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
75  }
RapReweightUserHook::~RapReweightUserHook ( )
inlineoverride

Definition at line 76 of file ReweightUserHooks.h.

76 {}

Member Function Documentation

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

Definition at line 80 of file ReweightUserHooks.h.

References JetChargeProducer_cfi::exp, cmsBatch::log, funct::pow(), globals_cff::x1, and globals_cff::x2.

82  {
83  //the variable selBias of the base class should be used;
84  if ((sigmaProcessPtr->nFinal() == 2)) {
85  double x1 = phaseSpacePtr->x1();
86  double x2 = phaseSpacePtr->x2();
87  double yLab = 0.5*log(x1/x2);
88  double yCM = 0.5*log( phaseSpacePtr->tHat() / phaseSpacePtr->uHat() );
89  double pTHat = phaseSpacePtr->pTHat();
90  double sigmaLab = yLabsigma.Eval(pTHat);
91  double sigmaCM = yCMsigma.Eval(pTHat);
92  // empirical reweighting function
93  selBias = exp( pow(fabs(yLab),yLab_power)/(2*sigmaLab*sigmaLab) +
94  pow(fabs(yCM),yCM_power)/(2*sigmaCM*sigmaCM) );
95  return selBias;
96  }
97  selBias = 1.;
98  return selBias;
99  }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
bool RapReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 78 of file ReweightUserHooks.h.

78 { return true; }

Member Data Documentation

double RapReweightUserHook::pTHatMax
private

Definition at line 103 of file ReweightUserHooks.h.

double RapReweightUserHook::pTHatMin
private

Definition at line 103 of file ReweightUserHooks.h.

double RapReweightUserHook::yCM_power
private

Definition at line 103 of file ReweightUserHooks.h.

TF1 RapReweightUserHook::yCMsigma
private

Definition at line 104 of file ReweightUserHooks.h.

std::string RapReweightUserHook::yCMsigma_func
private

Definition at line 102 of file ReweightUserHooks.h.

double RapReweightUserHook::yLab_power
private

Definition at line 103 of file ReweightUserHooks.h.

TF1 RapReweightUserHook::yLabsigma
private

Definition at line 104 of file ReweightUserHooks.h.

std::string RapReweightUserHook::yLabsigma_func
private

Definition at line 102 of file ReweightUserHooks.h.