CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
PtHatEmpReweightUserHook Class Reference

#include <ReweightUserHooks.h>

Inheritance diagram for PtHatEmpReweightUserHook:

Public Member Functions

double biasSelectionBy (const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
 
bool canBiasSelection () override
 
 PtHatEmpReweightUserHook (const std::string &tuneName="")
 
 ~PtHatEmpReweightUserHook () override
 

Private Attributes

std::vector< double > p
 
std::function< double(double)> sigma
 

Detailed Description

Definition at line 27 of file ReweightUserHooks.h.

Constructor & Destructor Documentation

PtHatEmpReweightUserHook::PtHatEmpReweightUserHook ( const std::string &  tuneName = "")
inline

Definition at line 29 of file ReweightUserHooks.h.

References log, p, funct::pow(), sigma, and x.

29  {
30  if (tuneName == "CP5")
31  p = {7377.94700788, 8.38168461349, -4.70983112392, -0.0310148108446, -0.028798537937, 925.335472326};
32  //Default reweighting - works good for tune CUEPT8M1
33  else
34  p = {5.3571961909810e+13,
35  1.0907678218282e+01,
36  -2.5898069229451e+00,
37  -5.1575514014931e-01,
38  5.5951279807561e-02,
39  3.5e+02};
40  sigma = [this](double x) -> double {
41  return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) *
42  pow(1 - 2 * x / (13000. + p[5]), p[1])) *
43  x;
44  };
45  }
static std::vector< std::string > checklist log
std::function< double(double)> sigma
std::vector< double > p
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
PtHatEmpReweightUserHook::~PtHatEmpReweightUserHook ( )
inlineoverride

Definition at line 46 of file ReweightUserHooks.h.

46 {}

Member Function Documentation

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

Definition at line 50 of file ReweightUserHooks.h.

References sigma.

52  {
53  //the variable selBias of the base class should be used;
54  if ((sigmaProcessPtr->nFinal() == 2)) {
55  selBias = 1.0 / sigma(phaseSpacePtr->pTHat());
56  return selBias;
57  }
58  selBias = 1.;
59  return selBias;
60  }
std::function< double(double)> sigma
bool PtHatEmpReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 48 of file ReweightUserHooks.h.

48 { return true; }

Member Data Documentation

std::vector<double> PtHatEmpReweightUserHook::p
private

Definition at line 63 of file ReweightUserHooks.h.

Referenced by Electron.Electron::ptErr(), and PtHatEmpReweightUserHook().

std::function<double(double)> PtHatEmpReweightUserHook::sigma
private

Definition at line 64 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatEmpReweightUserHook().