JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
MELAHXSWidth Class Reference

#include <MELAHXSWidth.h>

Public Member Functions

 MELAHXSWidth (std::string fileLoc="../txtFiles", std::string strAppend="YR3", TVar::VerbosityLevel verbosity_=TVar::ERROR)
 
 MELAHXSWidth (const MELAHXSWidth &other)
 
 ~MELAHXSWidth ()
 
double HiggsWidth (double mH) const
 

Protected Member Functions

void build ()
 

Protected Attributes

std::string fileName
 
std::vector< double > mass_BR
 
std::vector< double > BR
 
double * xmhW
 
double * sigW
 
TGraph * graphW
 
TSpline3 * gsW
 
TVar::VerbosityLevel verbosity
 

Detailed Description

Definition at line 10 of file MELAHXSWidth.h.

Constructor & Destructor Documentation

◆ MELAHXSWidth() [1/2]

MELAHXSWidth::MELAHXSWidth ( std::string  fileLoc = "../txtFiles",
std::string  strAppend = "YR3",
TVar::VerbosityLevel  verbosity_ = TVar::ERROR 
)

Definition at line 15 of file MELAHXSWidth.cc.

15  :
16  xmhW(nullptr),
17  sigW(nullptr),
18  graphW(nullptr),
19  gsW(nullptr),
20  verbosity(verbosity_)
21 {
22  fileName = fileLoc + "/HiggsTotalWidth_" + strAppend + ".txt";
23  build();
24 }

◆ MELAHXSWidth() [2/2]

MELAHXSWidth::MELAHXSWidth ( const MELAHXSWidth other)

Definition at line 25 of file MELAHXSWidth.cc.

25  :
26  fileName(other.fileName),
27  xmhW(nullptr),
28  sigW(nullptr),
29  graphW(nullptr),
30  gsW(nullptr),
31  verbosity(other.verbosity)
32 {
33  build();
34 }

◆ ~MELAHXSWidth()

MELAHXSWidth::~MELAHXSWidth ( )

Definition at line 65 of file MELAHXSWidth.cc.

65  {
66  delete gsW; gsW=nullptr;
67  delete graphW; graphW=nullptr;
68  delete[] xmhW; xmhW=nullptr;
69  delete[] sigW; sigW=nullptr;
70 }

Member Function Documentation

◆ build()

void MELAHXSWidth::build ( )
protected

Definition at line 35 of file MELAHXSWidth.cc.

35  {
36  if (verbosity>=TVar::DEBUG) MELAout << "MELAHXSWidth::build: Cross section file path: " << fileName.data() << endl;
37  ifstream file;
38  file.open(fileName.c_str());
39  while (!file.eof()){
40  double mass=0, br=0;
41  file >> mass >> br;
42  if (mass>0. && br>0.){
43  mass_BR.push_back(mass);
44  BR.push_back(br);
45  }
46  }
47  file.close();
48  const unsigned int indexW = mass_BR.size();
49  if (indexW>1){
50  xmhW = new double[indexW];
51  sigW = new double[indexW];
52  for (unsigned int ix=0; ix<indexW; ix++){
53  xmhW[ix] = mass_BR.at(ix);
54  sigW[ix] = BR.at(ix);
55  }
56  double dbegin = (sigW[1]-sigW[0])/(xmhW[1]-xmhW[0]);
57  double cB = (sigW[indexW-1]-sigW[indexW-2])/(pow(xmhW[indexW-1], 3)-pow(xmhW[indexW-2], 3));
58  double dend = 3.*cB*pow(xmhW[indexW-1], 2);
59  graphW = new TGraph(indexW, xmhW, sigW);
60  gsW = new TSpline3("gsW", graphW, "b1e1", dbegin, dend);
61  }
62 }

◆ HiggsWidth()

double MELAHXSWidth::HiggsWidth ( double  mH) const

Definition at line 72 of file MELAHXSWidth.cc.

72  {
73  double result = 0;
74  const unsigned int indexW = mass_BR.size();
75  if (gsW){
76  if (mH<xmhW[indexW-1]) result = (double)gsW->Eval(mH);
77  else{
78  double cB = (sigW[indexW-1]-sigW[indexW-2])/(pow(xmhW[indexW-1], 3)-pow(xmhW[indexW-2], 3));
79  double cA = sigW[indexW-1] - cB*pow(xmhW[indexW-1], 3);
80  result = cA + cB*pow(mH, 3);
81  }
82  }
83  return result;
84 }

Member Data Documentation

◆ BR

std::vector<double> MELAHXSWidth::BR
protected

Definition at line 20 of file MELAHXSWidth.h.

◆ fileName

std::string MELAHXSWidth::fileName
protected

Definition at line 18 of file MELAHXSWidth.h.

◆ graphW

TGraph* MELAHXSWidth::graphW
protected

Definition at line 23 of file MELAHXSWidth.h.

◆ gsW

TSpline3* MELAHXSWidth::gsW
protected

Definition at line 24 of file MELAHXSWidth.h.

◆ mass_BR

std::vector<double> MELAHXSWidth::mass_BR
protected

Definition at line 19 of file MELAHXSWidth.h.

◆ sigW

double* MELAHXSWidth::sigW
protected

Definition at line 22 of file MELAHXSWidth.h.

◆ verbosity

TVar::VerbosityLevel MELAHXSWidth::verbosity
protected

Definition at line 26 of file MELAHXSWidth.h.

◆ xmhW

double* MELAHXSWidth::xmhW
protected

Definition at line 21 of file MELAHXSWidth.h.


The documentation for this class was generated from the following files:
MELAHXSWidth::xmhW
double * xmhW
Definition: MELAHXSWidth.h:21
MELAHXSWidth::sigW
double * sigW
Definition: MELAHXSWidth.h:22
MELAStreamHelpers::MELAout
MELAOutputStreamer MELAout
MELAHXSWidth::build
void build()
Definition: MELAHXSWidth.cc:35
MELAHXSWidth::mass_BR
std::vector< double > mass_BR
Definition: MELAHXSWidth.h:19
MELAHXSWidth::fileName
std::string fileName
Definition: MELAHXSWidth.h:18
MELAHXSWidth::graphW
TGraph * graphW
Definition: MELAHXSWidth.h:23
modparameters::br
real(8), public br
Definition: mod_Parameters.F90:1067
MELAHXSWidth::gsW
TSpline3 * gsW
Definition: MELAHXSWidth.h:24
TVar::DEBUG
@ DEBUG
Definition: TVar.hh:51
MELAHXSWidth::BR
std::vector< double > BR
Definition: MELAHXSWidth.h:20
MELAHXSWidth::verbosity
TVar::VerbosityLevel verbosity
Definition: MELAHXSWidth.h:26