JHUGen MELA  v2.4.1
Matrix element calculations as used in JHUGen. MELA is an important tool that was used for the Higgs boson discovery and for precise measurements of its structure and interactions. Please see the website https://spin.pha.jhu.edu/ and papers cited there for more details, and kindly cite those papers when using this code.
Public Member Functions | Public Attributes | Protected Attributes | List of all members
MelaIO Class Reference

#include <MelaIO.h>

Collaboration diagram for MelaIO:
Collaboration graph
[legend]

Public Member Functions

void reset ()
 
MelaIOgetRef ()
 
void setPartonWeights (double partonOneWeight_[nmsq], double partonTwoWeight_[nmsq])
 
void setMEArray (double MEsq_[nmsq][nmsq], bool transpose=false)
 
void addMEArray (double MEsq_[nmsq][nmsq], double factor=1., bool transpose=false)
 
void addMERecord (MelaIO *rcd, double factor=1., bool overwrite=false)
 
void computeWeightedMEArray ()
 
 MelaIO ()
 
virtual ~MelaIO ()
 
double getSumME () const
 
void setMEConst (const double &val)
 
void setMEConst (const float &val)
 
double getMEConst () const
 
void getWeightedMEArray (double MEsq_[nmsq][nmsq])
 
void getUnweightedMEArray (double MEsq_[nmsq][nmsq]) const
 
void getPartonWeights (double partonOneWeight_[nmsq], double partonTwoWeight_[nmsq]) const
 
void setRenormalizationScale (const double &val)
 
double getRenormalizationScale () const
 
void setFactorizationScale (const double &val)
 
double getFactorizationScale () const
 
void setAlphaS (const double &val)
 
double getAlphaS () const
 
void setAlphaSatMZ (const double &val)
 
double getAlphaSatMZ () const
 
void setHiggsMassWidth (const double &mass_, const double &width_, int jh)
 
void getHiggsMassWidth (double &mass_, double &width_, int jh) const
 
void setVDaughterCouplings (const double &left, const double &right, int iv)
 
void getVDaughterCouplings (double &left, double &right, int iv) const
 

Public Attributes

MELACandidatemelaCand
 

Protected Attributes

double partonWeight [2][nmsq]
 
double MEsq [nmsq][nmsq]
 
double weightedMEsq [nmsq][nmsq]
 
double sumME
 
double MEConst
 
double Qren
 
double Qfac
 
double alphas_mz
 
double alphas_Qren
 
double MH_GaH [nSupportedHiggses][2]
 
double VDau1coupl [2]
 
double VDau2coupl [2]
 

Detailed Description

Definition at line 8 of file MelaIO.h.

Constructor & Destructor Documentation

◆ MelaIO()

MelaIO::MelaIO ( )
inline

Definition at line 104 of file MelaIO.h.

104 { melaCand=0; reset(); }

◆ ~MelaIO()

virtual MelaIO::~MelaIO ( )
inlinevirtual

Definition at line 105 of file MelaIO.h.

105 {};

Member Function Documentation

◆ addMEArray()

void MelaIO::addMEArray ( double  MEsq_[nmsq][nmsq],
double  factor = 1.,
bool  transpose = false 
)
inline

Definition at line 72 of file MelaIO.h.

72  {
73  for (int ix=0; ix<nmsq; ix++){
74  for (int iy=0; iy<nmsq; iy++){
75  int jx=(transpose ? iy : ix);
76  int jy=(transpose ? ix : iy);
77  MEsq[ix][iy]+=MEsq_[jx][jy]*factor;
78  }
79  }
80  if (sumME!=0) computeWeightedMEArray();
81  }

◆ addMERecord()

void MelaIO::addMERecord ( MelaIO rcd,
double  factor = 1.,
bool  overwrite = false 
)
inline

Definition at line 82 of file MelaIO.h.

82  {
83  double MEsq_[nmsq][nmsq]={ { 0 } };
84  double partonOneWeight_[nmsq]={ 0 };
85  double partonTwoWeight_[nmsq]={ 0 };
86  rcd->getUnweightedMEArray(MEsq_);
87  rcd->getPartonWeights(partonOneWeight_, partonTwoWeight_);
88 
89  if (overwrite) reset();
90  setPartonWeights(partonOneWeight_, partonTwoWeight_);
91  addMEArray(MEsq_, factor);
92  }

◆ computeWeightedMEArray()

void MelaIO::computeWeightedMEArray ( )
inline

Definition at line 94 of file MelaIO.h.

94  {
95  sumME=0;
96  for (int ix=0; ix<nmsq; ix++){
97  for (int iy=0; iy<nmsq; iy++){
98  weightedMEsq[ix][iy]=partonWeight[0][ix]*MEsq[ix][iy]*partonWeight[1][iy];
99  sumME += weightedMEsq[ix][iy];
100  }
101  }
102  }

◆ getAlphaS()

double MelaIO::getAlphaS ( ) const
inline

Definition at line 138 of file MelaIO.h.

138 { return alphas_Qren; }

◆ getAlphaSatMZ()

double MelaIO::getAlphaSatMZ ( ) const
inline

Definition at line 140 of file MelaIO.h.

140 { return alphas_mz; }

◆ getFactorizationScale()

double MelaIO::getFactorizationScale ( ) const
inline

Definition at line 136 of file MelaIO.h.

136 { return Qfac; }

◆ getHiggsMassWidth()

void MelaIO::getHiggsMassWidth ( double &  mass_,
double &  width_,
int  jh 
) const
inline

Definition at line 144 of file MelaIO.h.

144 { if (jh<nSupportedHiggses){ mass_=MH_GaH[jh][0]; width_=MH_GaH[jh][1]; } }

◆ getMEConst()

double MelaIO::getMEConst ( ) const
inline

Definition at line 110 of file MelaIO.h.

110 { return MEConst; }

◆ getPartonWeights()

void MelaIO::getPartonWeights ( double  partonOneWeight_[nmsq],
double  partonTwoWeight_[nmsq] 
) const
inline

Definition at line 121 of file MelaIO.h.

124  {
125  for (int ix=0; ix<nmsq; ix++){
126  partonOneWeight_[ix] = partonWeight[0][ix];
127  partonTwoWeight_[ix] = partonWeight[1][ix];
128  }
129  }

◆ getRef()

MelaIO* MelaIO::getRef ( )
inline

Definition at line 51 of file MelaIO.h.

51 { return this; }

◆ getRenormalizationScale()

double MelaIO::getRenormalizationScale ( ) const
inline

Definition at line 134 of file MelaIO.h.

134 { return Qren; }

◆ getSumME()

double MelaIO::getSumME ( ) const
inline

Definition at line 107 of file MelaIO.h.

107 { return sumME; }

◆ getUnweightedMEArray()

void MelaIO::getUnweightedMEArray ( double  MEsq_[nmsq][nmsq]) const
inline

Definition at line 116 of file MelaIO.h.

116  {
117  for (int ix=0; ix<nmsq; ix++){
118  for (int iy=0; iy<nmsq; iy++) MEsq_[ix][iy] = MEsq[ix][iy];
119  }
120  }

◆ getVDaughterCouplings()

void MelaIO::getVDaughterCouplings ( double &  left,
double &  right,
int  iv 
) const
inline

Definition at line 151 of file MelaIO.h.

151  {
152  if (iv==0){ left=VDau1coupl[0]; right=VDau1coupl[1]; }
153  else if (iv==1){ left=VDau2coupl[0]; right=VDau2coupl[1]; }
154  }

◆ getWeightedMEArray()

void MelaIO::getWeightedMEArray ( double  MEsq_[nmsq][nmsq])
inline

Definition at line 111 of file MelaIO.h.

111  {
112  for (int ix=0; ix<nmsq; ix++){
113  for (int iy=0; iy<nmsq; iy++) MEsq_[ix][iy] = weightedMEsq[ix][iy];
114  }
115  }

◆ reset()

void MelaIO::reset ( )
inline

Definition at line 31 of file MelaIO.h.

31  {
32  sumME=0;
33  MEConst=1;
34  for (int ix=0; ix<nmsq; ix++){
35  for (int pp=0; pp<2; pp++) partonWeight[pp][ix]=0;
36  for (int iy=0; iy<nmsq; iy++){
37  MEsq[ix][iy]=0;
38  weightedMEsq[ix][iy]=0;
39  }
40  }
41  Qren=0;
42  Qfac=0;
43  alphas_mz=0;
44  alphas_Qren=0;
45  for (unsigned int jh=0; jh<nSupportedHiggses; jh++){ for (unsigned int img=0; img<2; img++) MH_GaH[jh][img]=0; }
46  for (unsigned int ic=0; ic<2; ic++){
47  VDau1coupl[ic]=0;
48  VDau2coupl[ic]=0;
49  }
50  }

◆ setAlphaS()

void MelaIO::setAlphaS ( const double &  val)
inline

Definition at line 137 of file MelaIO.h.

137 { alphas_Qren=val; }

◆ setAlphaSatMZ()

void MelaIO::setAlphaSatMZ ( const double &  val)
inline

Definition at line 139 of file MelaIO.h.

139 { alphas_mz=val; }

◆ setFactorizationScale()

void MelaIO::setFactorizationScale ( const double &  val)
inline

Definition at line 135 of file MelaIO.h.

135 { Qfac=val; }

◆ setHiggsMassWidth()

void MelaIO::setHiggsMassWidth ( const double &  mass_,
const double &  width_,
int  jh 
)
inline

Definition at line 143 of file MelaIO.h.

143 { if (jh<nSupportedHiggses){ MH_GaH[jh][0]=mass_; MH_GaH[jh][1]=width_; } }

◆ setMEArray()

void MelaIO::setMEArray ( double  MEsq_[nmsq][nmsq],
bool  transpose = false 
)
inline

Definition at line 63 of file MelaIO.h.

63  {
64  for (int ix=0; ix<nmsq; ix++){
65  for (int iy=0; iy<nmsq; iy++){
66  int jx=(transpose ? iy : ix);
67  int jy=(transpose ? ix : iy);
68  MEsq[ix][iy]=MEsq_[jx][jy];
69  }
70  }
71  }

◆ setMEConst() [1/2]

void MelaIO::setMEConst ( const double &  val)
inline

Definition at line 108 of file MelaIO.h.

108 { MEConst=val; }

◆ setMEConst() [2/2]

void MelaIO::setMEConst ( const float &  val)
inline

Definition at line 109 of file MelaIO.h.

109 { MEConst=(double)val; }

◆ setPartonWeights()

void MelaIO::setPartonWeights ( double  partonOneWeight_[nmsq],
double  partonTwoWeight_[nmsq] 
)
inline

Definition at line 54 of file MelaIO.h.

57  {
58  for (int ix=0; ix<nmsq; ix++){
59  partonWeight[0][ix]=partonOneWeight_[ix];
60  partonWeight[1][ix]=partonTwoWeight_[ix];
61  }
62  }

◆ setRenormalizationScale()

void MelaIO::setRenormalizationScale ( const double &  val)
inline

Definition at line 133 of file MelaIO.h.

133 { Qren=val; }

◆ setVDaughterCouplings()

void MelaIO::setVDaughterCouplings ( const double &  left,
const double &  right,
int  iv 
)
inline

Definition at line 147 of file MelaIO.h.

147  {
148  if (iv==0){ VDau1coupl[0]=left; VDau1coupl[1]=right; }
149  else if (iv==1){ VDau2coupl[0]=left; VDau2coupl[1]=right; }
150  }

Member Data Documentation

◆ alphas_mz

double MelaIO::alphas_mz
protected

Definition at line 19 of file MelaIO.h.

◆ alphas_Qren

double MelaIO::alphas_Qren
protected

Definition at line 20 of file MelaIO.h.

◆ MEConst

double MelaIO::MEConst
protected

Definition at line 15 of file MelaIO.h.

◆ melaCand

MELACandidate* MelaIO::melaCand

Definition at line 29 of file MelaIO.h.

◆ MEsq

double MelaIO::MEsq[nmsq][nmsq]
protected

Definition at line 12 of file MelaIO.h.

◆ MH_GaH

double MelaIO::MH_GaH[nSupportedHiggses][2]
protected

Definition at line 22 of file MelaIO.h.

◆ partonWeight

double MelaIO::partonWeight[2][nmsq]
protected

Definition at line 11 of file MelaIO.h.

◆ Qfac

double MelaIO::Qfac
protected

Definition at line 18 of file MelaIO.h.

◆ Qren

double MelaIO::Qren
protected

Definition at line 17 of file MelaIO.h.

◆ sumME

double MelaIO::sumME
protected

Definition at line 14 of file MelaIO.h.

◆ VDau1coupl

double MelaIO::VDau1coupl[2]
protected

Definition at line 24 of file MelaIO.h.

◆ VDau2coupl

double MelaIO::VDau2coupl[2]
protected

Definition at line 25 of file MelaIO.h.

◆ weightedMEsq

double MelaIO::weightedMEsq[nmsq][nmsq]
protected

Definition at line 13 of file MelaIO.h.


The documentation for this class was generated from the following file:
MelaIO::getUnweightedMEArray
void getUnweightedMEArray(double MEsq_[nmsq][nmsq]) const
Definition: MelaIO.h:116
MelaIO::computeWeightedMEArray
void computeWeightedMEArray()
Definition: MelaIO.h:94
MelaIO::MEsq
double MEsq[nmsq][nmsq]
Definition: MelaIO.h:12
MelaIO::reset
void reset()
Definition: MelaIO.h:31
MelaIO::VDau2coupl
double VDau2coupl[2]
Definition: MelaIO.h:25
MelaIO::Qfac
double Qfac
Definition: MelaIO.h:18
MelaIO::setPartonWeights
void setPartonWeights(double partonOneWeight_[nmsq], double partonTwoWeight_[nmsq])
Definition: MelaIO.h:54
MelaIO::sumME
double sumME
Definition: MelaIO.h:14
nSupportedHiggses
@ nSupportedHiggses
Definition: TMCFM.hh:15
MelaIO::addMEArray
void addMEArray(double MEsq_[nmsq][nmsq], double factor=1., bool transpose=false)
Definition: MelaIO.h:72
nmsq
@ nmsq
Definition: TMCFM.hh:24
MelaIO::alphas_Qren
double alphas_Qren
Definition: MelaIO.h:20
MelaIO::weightedMEsq
double weightedMEsq[nmsq][nmsq]
Definition: MelaIO.h:13
MelaIO::alphas_mz
double alphas_mz
Definition: MelaIO.h:19
MelaIO::Qren
double Qren
Definition: MelaIO.h:17
MelaIO::getPartonWeights
void getPartonWeights(double partonOneWeight_[nmsq], double partonTwoWeight_[nmsq]) const
Definition: MelaIO.h:121
MelaIO::partonWeight
double partonWeight[2][nmsq]
Definition: MelaIO.h:11
MelaIO::MEConst
double MEConst
Definition: MelaIO.h:15
MelaIO::melaCand
MELACandidate * melaCand
Definition: MelaIO.h:29
MelaIO::MH_GaH
double MH_GaH[nSupportedHiggses][2]
Definition: MelaIO.h:22
MelaIO::VDau1coupl
double VDau1coupl[2]
Definition: MelaIO.h:24