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

virtual double biasSelectionBy (const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent)
 
virtual bool canBiasSelection ()
 
 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)
 
virtual ~PtHatRapReweightUserHook ()
 

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

Constructor & Destructor Documentation

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

110  :
111  yLabsigma_func(_yLabsigma_func), yCMsigma_func(_yCMsigma_func),
112  yLab_power(_yLab_power), yCM_power(_yCM_power),
113  pTHatMin(_pTHatMin), pTHatMax(_pTHatMax), pt(_pt), power(_power)
114  {
115  // empirical parametrizations defined in configuration file
116  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
117  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
118  }
virtual PtHatRapReweightUserHook::~PtHatRapReweightUserHook ( )
inlinevirtual

Definition at line 119 of file ReweightUserHooks.h.

119 {}

Member Function Documentation

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

Definition at line 123 of file ReweightUserHooks.h.

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

125  {
126  //the variable selBias of the base class should be used;
127  if ((sigmaProcessPtr->nFinal() == 2)) {
128  double x1 = phaseSpacePtr->x1();
129  double x2 = phaseSpacePtr->x2();
130  double yLab = 0.5*log(x1/x2);
131  double yCM = 0.5*log( phaseSpacePtr->tHat() / phaseSpacePtr->uHat() );
132  double pTHat = phaseSpacePtr->pTHat();
133  double sigmaLab = yLabsigma.Eval(pTHat);
134  double sigmaCM = yCMsigma.Eval(pTHat);
135  // empirical reweighting function
136  selBias = pow(pTHat / pt, power) * exp( pow(fabs(yLab),yLab_power)/(2*sigmaLab*sigmaLab) +
137  pow(fabs(yCM),yCM_power)/(2*sigmaCM*sigmaCM) );
138  return selBias;
139  }
140  selBias = 1.;
141  return selBias;
142  }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual bool PtHatRapReweightUserHook::canBiasSelection ( )
inlinevirtual

Definition at line 121 of file ReweightUserHooks.h.

121 { return true; }

Member Data Documentation

double PtHatRapReweightUserHook::power
private

Definition at line 146 of file ReweightUserHooks.h.

double PtHatRapReweightUserHook::pt
private
double PtHatRapReweightUserHook::pTHatMax
private

Definition at line 146 of file ReweightUserHooks.h.

double PtHatRapReweightUserHook::pTHatMin
private

Definition at line 146 of file ReweightUserHooks.h.

double PtHatRapReweightUserHook::yCM_power
private

Definition at line 146 of file ReweightUserHooks.h.

TF1 PtHatRapReweightUserHook::yCMsigma
private

Definition at line 147 of file ReweightUserHooks.h.

std::string PtHatRapReweightUserHook::yCMsigma_func
private

Definition at line 145 of file ReweightUserHooks.h.

double PtHatRapReweightUserHook::yLab_power
private

Definition at line 146 of file ReweightUserHooks.h.

TF1 PtHatRapReweightUserHook::yLabsigma
private

Definition at line 147 of file ReweightUserHooks.h.

std::string PtHatRapReweightUserHook::yLabsigma_func
private

Definition at line 145 of file ReweightUserHooks.h.