CMS 3D CMS Logo

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::PtHatEmpReweightUserHook ( const std::string &  tuneName = "")
inline

Definition at line 29 of file ReweightUserHooks.h.

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  }

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

◆ ~PtHatEmpReweightUserHook()

PtHatEmpReweightUserHook::~PtHatEmpReweightUserHook ( )
inlineoverride

Definition at line 46 of file ReweightUserHooks.h.

46 {}

Member Function Documentation

◆ biasSelectionBy()

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

Definition at line 50 of file ReweightUserHooks.h.

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  }

References sigma.

◆ canBiasSelection()

bool PtHatEmpReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 48 of file ReweightUserHooks.h.

48 { return true; }

Member Data Documentation

◆ p

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

Definition at line 63 of file ReweightUserHooks.h.

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

◆ sigma

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

Definition at line 64 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatEmpReweightUserHook().

DDAxes::x
PtHatEmpReweightUserHook::sigma
std::function< double(double)> sigma
Definition: ReweightUserHooks.h:64
PtHatEmpReweightUserHook::p
std::vector< double > p
Definition: ReweightUserHooks.h:63
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30