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

Constructor & Destructor Documentation

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

Definition at line 32 of file ReweightUserHooks.h.

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

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

Definition at line 41 of file ReweightUserHooks.h.

41 {}

Member Function Documentation

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

Definition at line 45 of file ReweightUserHooks.h.

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

Definition at line 43 of file ReweightUserHooks.h.

43 { return true; }

Member Data Documentation

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

Definition at line 58 of file ReweightUserHooks.h.

Referenced by Electron.Electron::ptErr().

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

Definition at line 59 of file ReweightUserHooks.h.