CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 76 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 79 of file ReweightUserHooks.h.

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

82  :
83  yLabsigma_func(_yLabsigma_func), yCMsigma_func(_yCMsigma_func),
84  yLab_power(_yLab_power), yCM_power(_yCM_power),
85  pTHatMin(_pTHatMin), pTHatMax(_pTHatMax), pt(_pt), power(_power)
86  {
87  // empirical parametrizations defined in configuration file
88  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
89  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
90  }
virtual PtHatRapReweightUserHook::~PtHatRapReweightUserHook ( )
inlinevirtual

Definition at line 91 of file ReweightUserHooks.h.

91 {}

Member Function Documentation

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

Definition at line 95 of file ReweightUserHooks.h.

References create_public_lumi_plots::exp, create_public_lumi_plots::log, funct::pow(), power, pt, yCM_power, yCMsigma, yLab_power, and yLabsigma.

97  {
98  //the variable selBias of the base class should be used;
99  if ((sigmaProcessPtr->nFinal() == 2)) {
100  double x1 = phaseSpacePtr->x1();
101  double x2 = phaseSpacePtr->x2();
102  double yLab = 0.5*log(x1/x2);
103  double yCM = 0.5*log( phaseSpacePtr->tHat() / phaseSpacePtr->uHat() );
104  double pTHat = phaseSpacePtr->pTHat();
105  double sigmaLab = yLabsigma.Eval(pTHat);
106  double sigmaCM = yCMsigma.Eval(pTHat);
107  // empirical reweighting function
108  selBias = pow(pTHat / pt, power) * exp( pow(fabs(yLab),yLab_power)/(2*sigmaLab*sigmaLab) +
109  pow(fabs(yCM),yCM_power)/(2*sigmaCM*sigmaCM) );
110  return selBias;
111  }
112  selBias = 1.;
113  return selBias;
114  }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual bool PtHatRapReweightUserHook::canBiasSelection ( )
inlinevirtual

Definition at line 93 of file ReweightUserHooks.h.

93 { return true; }

Member Data Documentation

double PtHatRapReweightUserHook::power
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

double PtHatRapReweightUserHook::pt
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

double PtHatRapReweightUserHook::pTHatMax
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

double PtHatRapReweightUserHook::pTHatMin
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().

double PtHatRapReweightUserHook::yCM_power
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

TF1 PtHatRapReweightUserHook::yCMsigma
private

Definition at line 119 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

std::string PtHatRapReweightUserHook::yCMsigma_func
private

Definition at line 117 of file ReweightUserHooks.h.

double PtHatRapReweightUserHook::yLab_power
private

Definition at line 118 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

TF1 PtHatRapReweightUserHook::yLabsigma
private

Definition at line 119 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatRapReweightUserHook().

std::string PtHatRapReweightUserHook::yLabsigma_func
private

Definition at line 117 of file ReweightUserHooks.h.

Referenced by PtHatRapReweightUserHook().