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
RapReweightUserHook Class Reference

#include <ReweightUserHooks.h>

Inheritance diagram for RapReweightUserHook:

Public Member Functions

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

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

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

35  :
36  yLabsigma_func(_yLabsigma_func), yCMsigma_func(_yCMsigma_func),
37  yLab_power(_yLab_power), yCM_power(_yCM_power),
38  pTHatMin(_pTHatMin), pTHatMax(_pTHatMax)
39  {
40  // empirical parametrizations defined in configuration file
41  yLabsigma = TF1("yLabsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
42  yCMsigma = TF1("yCMsigma", yLabsigma_func.c_str(), pTHatMin, pTHatMax);
43  }
std::string yLabsigma_func
virtual RapReweightUserHook::~RapReweightUserHook ( )
inlinevirtual

Definition at line 44 of file ReweightUserHooks.h.

44 {}

Member Function Documentation

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

Definition at line 48 of file ReweightUserHooks.h.

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

50  {
51  //the variable selBias of the base class should be used;
52  if ((sigmaProcessPtr->nFinal() == 2)) {
53  double x1 = phaseSpacePtr->x1();
54  double x2 = phaseSpacePtr->x2();
55  double yLab = 0.5*log(x1/x2);
56  double yCM = 0.5*log( phaseSpacePtr->tHat() / phaseSpacePtr->uHat() );
57  double pTHat = phaseSpacePtr->pTHat();
58  double sigmaLab = yLabsigma.Eval(pTHat);
59  double sigmaCM = yCMsigma.Eval(pTHat);
60  // empirical reweighting function
61  selBias = exp( pow(fabs(yLab),yLab_power)/(2*sigmaLab*sigmaLab) +
62  pow(fabs(yCM),yCM_power)/(2*sigmaCM*sigmaCM) );
63  return selBias;
64  }
65  selBias = 1.;
66  return selBias;
67  }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual bool RapReweightUserHook::canBiasSelection ( )
inlinevirtual

Definition at line 46 of file ReweightUserHooks.h.

46 { return true; }

Member Data Documentation

double RapReweightUserHook::pTHatMax
private

Definition at line 71 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().

double RapReweightUserHook::pTHatMin
private

Definition at line 71 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().

double RapReweightUserHook::yCM_power
private

Definition at line 71 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

TF1 RapReweightUserHook::yCMsigma
private

Definition at line 72 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and RapReweightUserHook().

std::string RapReweightUserHook::yCMsigma_func
private

Definition at line 70 of file ReweightUserHooks.h.

double RapReweightUserHook::yLab_power
private

Definition at line 71 of file ReweightUserHooks.h.

Referenced by biasSelectionBy().

TF1 RapReweightUserHook::yLabsigma
private

Definition at line 72 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and RapReweightUserHook().

std::string RapReweightUserHook::yLabsigma_func
private

Definition at line 70 of file ReweightUserHooks.h.

Referenced by RapReweightUserHook().