JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
Python Functions that are pass-by-reference in C++

These functions are pass-by-reference in C++ and turned into functions that return values for usage in Python. More...

Collaboration diagram for Python Functions that are pass-by-reference in C++:

Functions

float computeP (Mela &mela, bool useConstant=true)
 analog of Mela::computeP More...
 
float computeProdP (Mela &mela, bool useConstant=true)
 analog of Mela::computeProdP More...
 
float computeProdDecP (Mela &mela, bool useConstant=true)
 analog of MelThey cover a slew of uses, from converting a::computeProdDecP More...
 
float computeD_CP (Mela &mela, TVar::MatrixElement myME, TVar::Process myType)
 analog of Mela::computeD_CP More...
 
float computeProdP_VH (Mela &mela, bool includeHiggsDecay, bool useConstant)
 analog of Mela::computeProdP_VH More...
 
float computeProdP_ttH (Mela &mela, int topProcess, int topDecay, bool useConstant)
 analog of Mela::computeProdP_ttH More...
 
float compute4FermionWeight (Mela &mela)
 analog of Mela::compute4FermionWeight More...
 
float getXPropagator (Mela &mela, TVar::ResonancePropagatorScheme scheme)
 analog of Mela::getXPropagator More...
 
float computePM4l (Mela &mela, TVar::SuperMelaSyst syst)
 analog of Mela::computePM4l More...
 
float computeD_gg (Mela &mela, TVar::MatrixElement myME, TVar::Process myType)
 analog of Mela::computeD_gg More...
 
float getConstant (Mela &mela)
 the analog of Mela::getConstant More...
 
float computeDijetConvBW (Mela &mela, bool useTrueBW)
 the analog of Mela::computeDijetConvBW More...
 
py::array getWeightedMEArray (Mela &mela)
 the analog of MelaIO::getWeightedMEArray More...
 
py::array getUnweightedMEArray (Mela &mela)
 the analog of MelaIO::getUnweightedMEArray More...
 
py::tuple getPartonWeights (Mela &mela)
 the analog of MelaIO::getPartonWeights More...
 
float getPAux (Mela &mela)
 the analog of Mela::getPAux More...
 
array< float, 8 > computeDecayAngles (Mela &mela)
 the analog of Mela::computeDecayAngles More...
 
array< float, 7 > computeVBFAngles (Mela &mela)
 analog of Mela::computeVBFAngles More...
 
array< float, 9 > computeVBFAngles_ComplexBoost (Mela &mela)
 analog of Mela::computeVBFAngles_ComplexBoost More...
 
array< float, 7 > computeVHAngles (Mela &mela, TVar::Production prod)
 analog of Mela::computeVHAngles More...
 

Detailed Description

These functions are pass-by-reference in C++ and turned into functions that return values for usage in Python.

Function Documentation

◆ compute4FermionWeight()

float compute4FermionWeight ( Mela mela)

analog of Mela::compute4FermionWeight

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of Mela::compute4FermionWeight

Definition at line 107 of file mela_binding.cpp.

107  {
108  float result;
109  mela.compute4FermionWeight(result);
110  return result;
111 }

◆ computeD_CP()

float computeD_CP ( Mela mela,
TVar::MatrixElement  myME,
TVar::Process  myType 
)

analog of Mela::computeD_CP

Parameters
melaMela object instance (for python function calling using obj.<function>)
myMEThe Matrix element to be used
myTypeThe process to be used in the calculation
Returns
the result of Mela::computeD_CP

Definition at line 72 of file mela_binding.cpp.

72  {
73  float result;
74  mela.computeD_CP(myME, myType, result);
75  return result;
76 }

◆ computeD_gg()

float computeD_gg ( Mela mela,
TVar::MatrixElement  myME,
TVar::Process  myType 
)

analog of Mela::computeD_gg

Parameters
melaMela object instance (for python function calling using obj.<function>)
myMEThe matrix element you would like to use
myTypeThe process you would like to use
Returns
the result of Mela::computeD_gg

Definition at line 141 of file mela_binding.cpp.

141  {
142  float result;
143  mela.computeD_gg(myME, myType, result);
144  return result;
145 }

◆ computeDecayAngles()

array<float, 8> computeDecayAngles ( Mela mela)

the analog of Mela::computeDecayAngles

Parameters
melaMela object instance (for python function calling using obj.<function>)
Note
The order of the values is mH, m1, m2 (usually Z1 and Z2), cos(theta1), cos(theta2), phi, cos(theta-star), phi1
Returns
the result of Mela::computeDecayAngles

Definition at line 237 of file mela_binding.cpp.

237  {
238  array<float, 8> result;
239  mela.computeDecayAngles(
240  result[0],
241  result[1],
242  result[2],
243  result[3],
244  result[4],
245  result[5],
246  result[6],
247  result[7]
248  );
249  return result;
250 }

◆ computeDijetConvBW()

float computeDijetConvBW ( Mela mela,
bool  useTrueBW 
)

the analog of Mela::computeDijetConvBW

Parameters
melaMela object instance (for python function calling using obj.<function>)
useTrueBW
Returns
the result of Mela::computeDijetConvBW

Definition at line 162 of file mela_binding.cpp.

162  {
163  float result;
164  mela.computeDijetConvBW(result, useTrueBW);
165  return result;
166 }

◆ computeP()

float computeP ( Mela mela,
bool  useConstant = true 
)

analog of Mela::computeP

Parameters
melaMela object instance (for python function calling using obj.<function>)
useConstantBoolean for using a multiplicative constant
Returns
the result of Mela::computeP

Definition at line 38 of file mela_binding.cpp.

38  {
39  float result;
40  mela.computeP(result, useConstant);
41  return result;
42 }

◆ computePM4l()

float computePM4l ( Mela mela,
TVar::SuperMelaSyst  syst 
)

analog of Mela::computePM4l

Parameters
melaMela object instance (for python function calling using obj.<function>)
syst
Returns
the result of Mela::computePM4l

Definition at line 129 of file mela_binding.cpp.

129  {
130  float result;
131  mela.computePM4l(syst, result);
132  return result;
133 }

◆ computeProdDecP()

float computeProdDecP ( Mela mela,
bool  useConstant = true 
)

analog of MelThey cover a slew of uses, from converting a::computeProdDecP

Parameters
melaMela object instance (for python function calling using obj.<function>)
useConstantBoolean for using a multiplicative constant
Returns
the result of Mela::computeProdDecP

Definition at line 60 of file mela_binding.cpp.

60  {
61  float result;
62  mela.computeProdDecP(result, useConstant);
63  return result;
64 }

◆ computeProdP()

float computeProdP ( Mela mela,
bool  useConstant = true 
)

analog of Mela::computeProdP

Parameters
melaMela object instance (for python function calling using obj.<function>)
useConstantBoolean for using a multiplicative constant
Returns
the result of Mela::computeProdP

Definition at line 49 of file mela_binding.cpp.

49  {
50  float result;
51  mela.computeProdP(result, useConstant);
52  return result;
53 }

◆ computeProdP_ttH()

float computeProdP_ttH ( Mela mela,
int  topProcess,
int  topDecay,
bool  useConstant 
)

analog of Mela::computeProdP_ttH

Parameters
melaMela object instance (for python function calling using obj.<function>)
topProcess
topDecay
useConstantBoolean for using a multiplicative constant
Returns
the result of Mela::computeProdP_ttH

Definition at line 97 of file mela_binding.cpp.

97  {
98  float result;
99  mela.computeProdP_ttH(result, topProcess, topDecay, useConstant);
100  return result;
101 }

◆ computeProdP_VH()

float computeProdP_VH ( Mela mela,
bool  includeHiggsDecay,
bool  useConstant 
)

analog of Mela::computeProdP_VH

Parameters
melaMela object instance (for python function calling using obj.<function>)
includeHiggsDecayWhether you would like to include Higgs decay in your calculation
useConstantBoolean for using a multiplicative constant
Returns
the result of Mela::computePropP_VH

Definition at line 84 of file mela_binding.cpp.

84  {
85  float result;
86  mela.computeProdP_VH(result, includeHiggsDecay, useConstant);
87  return result;
88 }

◆ computeVBFAngles()

array<float, 7> computeVBFAngles ( Mela mela)

analog of Mela::computeVBFAngles

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of Mela::computeVBFAngles

Definition at line 256 of file mela_binding.cpp.

256  {
257  array<float, 7> result;
258  mela.computeVBFAngles(
259  result[0],
260  result[1],
261  result[2],
262  result[3],
263  result[4],
264  result[5],
265  result[6]
266  );
267  return result;
268 }

◆ computeVBFAngles_ComplexBoost()

array<float, 9> computeVBFAngles_ComplexBoost ( Mela mela)

analog of Mela::computeVBFAngles_ComplexBoost

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of Mela::computeVBFAngles_ComplexBoost

Definition at line 274 of file mela_binding.cpp.

274  {
275  array<float, 9> result;
277  result[0],
278  result[1],
279  result[2],
280  result[3],
281  result[4],
282  result[5],
283  result[6],
284  result[7],
285  result[8]
286  );
287  return result;
288 }

◆ computeVHAngles()

array<float, 7> computeVHAngles ( Mela mela,
TVar::Production  prod 
)

analog of Mela::computeVHAngles

Parameters
melaMela object instance (for python function calling using obj.<function>)
prodthe result of Mela::computeVHAngles
Returns

Definition at line 295 of file mela_binding.cpp.

295  {
297  array<float, 7> result;
298  mela.computeVHAngles(
299  result[0],
300  result[1],
301  result[2],
302  result[3],
303  result[4],
304  result[5],
305  result[6]
306  );
307  return result;
308 }

◆ getConstant()

float getConstant ( Mela mela)

the analog of Mela::getConstant

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of Mela::getConstant

Definition at line 151 of file mela_binding.cpp.

151  {
152  float result;
153  mela.getConstant(result);
154  return result;
155 }

◆ getPartonWeights()

py::tuple getPartonWeights ( Mela mela)

the analog of MelaIO::getPartonWeights

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of MelaIO::getPartonWeights

Definition at line 212 of file mela_binding.cpp.

212  {
213  std::pair<vector<double>, vector<double>> result;
214  result.first.resize(nmsq);
215  result.second.resize(nmsq);
216  MelaIO* melaio = mela.getIORecord();
217  melaio->getPartonWeights(result.first.data(), result.second.data());
218  py::tuple py_result = py::make_tuple(py::cast(result.first), py::cast(result.second));
219  return py_result;
220 }

◆ getPAux()

float getPAux ( Mela mela)

the analog of Mela::getPAux

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of Mela::getPAux

Definition at line 226 of file mela_binding.cpp.

226  {
227  float result;
228  mela.getPAux(result);
229  return result;
230 }

◆ getUnweightedMEArray()

py::array getUnweightedMEArray ( Mela mela)

the analog of MelaIO::getUnweightedMEArray

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of MelaIO::getUnweightedMEArray

Definition at line 192 of file mela_binding.cpp.

192  {
193  double resultarray[nmsq][nmsq];
194  MelaIO* melaio = mela.getIORecord();
195  melaio->getUnweightedMEArray(resultarray);
196  vector<vector<double>> result;
197  for (const auto& lst : resultarray) {
198  vector<double> vctr;
199  for (const auto& number : lst) {
200  vctr.push_back(number);
201  }
202  result.push_back(vctr);
203  }
204  py::array py_result = py::cast(result);
205  return py_result;
206 }

◆ getWeightedMEArray()

py::array getWeightedMEArray ( Mela mela)

the analog of MelaIO::getWeightedMEArray

Parameters
melaMela object instance (for python function calling using obj.<function>)
Returns
the result of MelaIO::getWeightedMEArray

Definition at line 172 of file mela_binding.cpp.

172  {
173  double resultarray[nmsq][nmsq] = {{0}};
174  MelaIO* melaio = mela.getIORecord();
175  melaio->getWeightedMEArray(resultarray);
176  vector<vector<double>> result;
177  for (const auto& lst : resultarray) {
178  vector<double> vctr;
179  for (const auto& number : lst) {
180  vctr.push_back(number);
181  }
182  result.push_back(vctr);
183  }
184  py::array py_result = py::cast(result);
185  return py_result;
186 }

◆ getXPropagator()

float getXPropagator ( Mela mela,
TVar::ResonancePropagatorScheme  scheme 
)

analog of Mela::getXPropagator

Parameters
melaMela object instance (for python function calling using obj.<function>)
schemeThe Propagator scheme you would like to use
Returns
the result of Mela::getXPropagator

Definition at line 118 of file mela_binding.cpp.

118  {
119  float result;
120  mela.getXPropagator(scheme, result);
121  return result;
122 }
Mela::getConstant
void getConstant(float &prob)
This function returns a multiplicative constant to the matrix element calculation.
Definition: Mela.cc:2207
MelaIO::getUnweightedMEArray
void getUnweightedMEArray(double MEsq_[nmsq][nmsq]) const
Definition: MelaIO.h:116
MelaIO
Definition: MelaIO.h:8
Mela::computeDecayAngles
void computeDecayAngles(float &qH, float &m1, float &m2, float &costheta1, float &costheta2, float &Phi, float &costhetastar, float &Phi1)
computes the decay angles for gg -> H -> ZZ as defined in Figure 1 of arXiv:1001.3396
Definition: Mela.cc:598
Mela::computeProdP_VH
void computeProdP_VH(double selfDHvvcoupl_input[nSupportedHiggses][SIZE_HVV][2], float &prob, bool includeHiggsDecay=false, bool useConstant=true)
Definition: Mela.cc:1769
Mela::compute4FermionWeight
void compute4FermionWeight(float &w)
Definition: Mela.cc:1846
Mela::getIORecord
MelaIO * getIORecord()
Returns the MELAIO object, and by consequence, the entire parton-by-parton matrix element record.
Definition: Mela.cc:584
Mela::getPAux
void getPAux(float &prob)
Definition: Mela.cc:594
nmsq
@ nmsq
Definition: TMCFM.hh:24
Mela::computeD_CP
void computeD_CP(TVar::MatrixElement myME, TVar::Process myType, float &prob)
computes the value of D_CP
Definition: Mela.cc:1378
Mela::computeProdP
void computeProdP(double selfDHggcoupl_input[SIZE_HGG][2], double selfDHvvcoupl_input[nSupportedHiggses][SIZE_HVV][2], double selfDHwwcoupl_input[nSupportedHiggses][SIZE_HVV][2], float &prob, bool useConstant=true)
computes Production side probabilities while taking in coupling arrays
Definition: Mela.cc:1540
Mela::computeVBFAngles
void computeVBFAngles(float &Q2V1, float &Q2V2, float &costheta1, float &costheta2, float &Phi, float &costhetastar, float &Phi1)
computes the production angles for Vector Boson Fusion (VBF) -> H -> ZZ as defined in Figure 1 of arX...
Definition: Mela.cc:660
Mela::setProcess
void setProcess(TVar::Process myModel, TVar::MatrixElement myME, TVar::Production myProduction)
Sets the process, matrix element, and production that MELA is to use for this event....
Definition: Mela.cc:309
Mela::computeVHAngles
void computeVHAngles(float &mVstar, float &mV, float &costheta1, float &costheta2, float &Phi, float &costhetastar, float &Phi1)
computes the production for Vector Boson Fusion (VBF) -> H -> ZZ as defined in Figure 1 of arXiv:1208...
Definition: Mela.cc:826
Mela::computeP
void computeP(float &prob, bool useConstant=true)
Computes the probability for the probabilities on the decay side of things using the constituent daug...
Definition: Mela.cc:1223
TVar::HSMHiggs
@ HSMHiggs
Definition: TVar.hh:125
Mela::computePM4l
void computePM4l(TVar::SuperMelaSyst syst, float &prob)
Definition: Mela.cc:1903
MelaIO::getWeightedMEArray
void getWeightedMEArray(double MEsq_[nmsq][nmsq])
Definition: MelaIO.h:111
Mela::getXPropagator
void getXPropagator(TVar::ResonancePropagatorScheme scheme, float &prop)
Definition: Mela.cc:1838
Mela::computeProdDecP
void computeProdDecP(double selfDHvvcoupl_input[nSupportedHiggses][SIZE_HVV][2], double selfDHwwcoupl_input[nSupportedHiggses][SIZE_HVV][2], double selfDaTQGCcoupl_input[SIZE_ATQGC][2], double selfDAZffcoupl_input[SIZE_AZff][2], float &prob, bool useConstant=true)
computes the combined production and decay probability while taking in coupling arrays
Definition: Mela.cc:1469
TVar::JHUGen
@ JHUGen
Definition: TVar.hh:57
Mela::computeVBFAngles_ComplexBoost
void computeVBFAngles_ComplexBoost(float &Q2V1, float &Q2V2, float &costheta1_real, float &costheta1_imag, float &costheta2_real, float &costheta2_imag, float &Phi, float &costhetastar, float &Phi1)
Definition: Mela.cc:742
Mela::computeProdP_ttH
void computeProdP_ttH(float &prob, int topProcess=2, int topDecay=0, bool useConstant=true)
Definition: Mela.cc:1817
Mela::computeD_gg
void computeD_gg(TVar::MatrixElement myME, TVar::Process myType, float &prob)
Definition: Mela.cc:1973
Mela::computeDijetConvBW
void computeDijetConvBW(float &prob, bool useTrueBW=false)
Definition: Mela.cc:2831
MelaIO::getPartonWeights
void getPartonWeights(double partonOneWeight_[nmsq], double partonTwoWeight_[nmsq]) const
Definition: MelaIO.h:121