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.
TEvtProb.hh
Go to the documentation of this file.
1 #ifndef _TEVTPROB_HH_
2 #define _TEVTPROB_HH_
3 //-----------------------------------------------------------------------------
4 // Description: Class TEvtProb: EvtProb base class
5 // ------------
6 //
7 // Event Probability Density Calculation
8 //
9 // Feb 21 2011
10 // Sergo Jindariani
11 // Yanyan Gao
12 //
13 // June 2016
14 // Ulascan Sarica
15 //
16 //-----------------------------------------------------------------------------
17 //
18 // STD includes
19 #include <iostream>
20 #include <sstream>
21 #include <cstdio>
22 #include <vector>
23 #include <string>
24 #include <iomanip>
25 #include <ostream>
26 #include <fstream>
27 #include <cassert>
28 // ME related includes
29 #include "TMCFM.hh"
30 #include "TCouplings.hh"
31 #include "TVar.hh"
32 #include "TUtil.hh"
33 #include "MELAHXSWidth.h"
34 // ROOT includes
35 #include "TObject.h"
36 #include "TLorentzVector.h"
37 #include "TMath.h"
38 #include "TTree.h"
39 #include "TChain.h"
40 #include "TFile.h"
41 #include "TString.h"
42 #include "TROOT.h"
43 
44 
45 //----------------------------------------
46 // Class TEvtProb
47 //----------------------------------------
48 class TEvtProb{
49 public:
50  //---------------------------------------------------------------------------
51  // Constructors and Destructor
52  //---------------------------------------------------------------------------
53  TEvtProb() {};
54  TEvtProb(const char* pathtoXSW, double ebeam, const char* pathtoPDFSet, int PDFMember=0, TVar::VerbosityLevel verbosity_=TVar::ERROR);
55  TEvtProb(const TEvtProb& other);
56  ~TEvtProb();
57 
58  //----------------------
59  // Functions
60  //----------------------
61  void Set_LHAgrid(const char* path, int pdfmember=0);
65 
67  void SetCurrentCandidateFromIndex(unsigned int icand);
69 
70  void AllowSeparateWWCouplings(bool doAllow=false);
71  void ResetMass(double inmass, int ipart);
72  void ResetWidth(double inwidth, int ipart);
73  void SetZprimeMassWidth(double inmass, double inwidth);
74  void SetWprimeMassWidth(double inmass, double inwidth);
75  void ResetQuarkMasses();
76  void ResetMCFM_EWKParameters(double ext_Gf, double ext_aemmz, double ext_mW, double ext_mZ, double ext_xW, int ext_ewscheme=3);
77  void ResetCouplings();
78 
79  void SetPrimaryHiggsMass(double mass);
80  void SetHiggsMass(double mass, double wHiggs=-1., int whichResonance=-1);
81 
82  void SetRenFacScaleMode(TVar::EventScaleScheme renormalizationSch, TVar::EventScaleScheme factorizationSch, double ren_sf, double fac_sf);
83  void ResetRenFacScaleMode();
84 
85  // Convert std::vectors to MELAPArticle* and MELACandidate* objects, stored in particleList and candList, respectively.
86  // Also set melaCand to this candidsate if it is valid.
87  void SetInputEvent(
88  SimpleParticleCollection_t* pDaughters,
89  SimpleParticleCollection_t* pAssociated=0,
90  SimpleParticleCollection_t* pMothers=0,
91  bool isGen=false
92  );
94  void ResetInputEvent();
95 
96  // Reset the IO record, called at te beginning of each comoputation
97  void ResetIORecord();
98 
99  double XsecCalc_XVV();
100 
101  double XsecCalc_VVXVV();
102 
103  double XsecCalcXJJ();
104 
105  double XsecCalcXJ();
106 
107  double XsecCalc_VX(
108  bool includeHiggsDecay
109  );
110 
111  double XsecCalc_TTX(
112  int topProcess, int topDecay
113  );
114 
116 
117  // Get-functions
118  MELAHXSWidth const* GetHXSWidthEstimator() const;
125  double GetPrimaryHiggsMass();
126  double GetPrimaryMass(int ipart);
127  double GetPrimaryWidth(int ipart);
128  double GetHiggsWidthAtPoleMass(double mass);
129  MelaIO* GetIORecord();
131  int GetCurrentCandidateIndex(); // Return the index of current melaCand in the candList array, or -1 if it does not exist
132  int GetNCandidates();
133  std::vector<MELATopCandidate_t*>* GetTopCandidates();
134 
135 protected:
136  //--------------------
137  // Variables
138  //--------------------
139  const char* pathtoPDFSet_;
146  double PrimaryHMass;
147  double _hmass;
148  double _hwidth;
149  double _h2mass;
150  double _h2width;
151  double EBEAM;
154 
162 
163  MELACandidate* melaCand; // Only a pointer to the top-level (input) candList object
164  std::vector<MELAParticle*> particleList; // Container of intermediate objects, for bookkeeping to delete later
165  std::vector<MELACandidate*> candList; // Container of candidate objects, for bookkeeping to delete later
166  std::vector<MELATopCandidate_t*> topCandList; // Container of candidate objects, for bookkeeping to delete later
167 
168  // Initialization functions
169  void InitializeMCFM();
170  void InitializeJHUGen(const char* pathtoPDFSet, int PDFMember);
171  void CrossInitialize();
172 
173  // Check if at least one input candidate is present
174  bool CheckInputPresent();
175  void SetRcdCandPtr();
176 
177  // Check if self-defined couplings are specified
185 
186  // Constructor wrapper
187  void Build();
188 
189 };
190 
191 #endif
192 
TVar::ERROR
@ ERROR
Definition: TVar.hh:49
TEvtProb::XsecCalc_TTX
double XsecCalc_TTX(int topProcess, int topDecay)
Definition: TEvtProb.cc:975
TEvtProb::particleList
std::vector< MELAParticle * > particleList
Definition: TEvtProb.hh:164
TMCFM.hh
TEvtProb::leptonInterf
TVar::LeptonInterference leptonInterf
Definition: TEvtProb.hh:145
TEvtProb::CheckInputPresent
bool CheckInputPresent()
Definition: TEvtProb.cc:389
TEvtProb::RcdME
MelaIO RcdME
Definition: TEvtProb.hh:161
aTQGCCouplings
Definition: TCouplings.hh:128
TEvtProb::SetCandidateDecayMode
void SetCandidateDecayMode(TVar::CandidateDecayMode mode)
Definition: TEvtProb.cc:208
TEvtProb::GetHiggsWidthAtPoleMass
double GetHiggsWidthAtPoleMass(double mass)
Definition: TEvtProb.cc:371
MelaIO
Definition: MelaIO.h:8
TVar::LeptonInterference
LeptonInterference
Definition: TVar.hh:106
TEvtProb::ResetRenFacScaleMode
void ResetRenFacScaleMode()
Definition: TEvtProb.cc:311
TEvtProb::GetNCandidates
int GetNCandidates()
Definition: TEvtProb.cc:384
TVar::VerbosityLevel
VerbosityLevel
Definition: TVar.hh:47
TEvtProb::GetSelfDaTQGCCouplings
aTQGCCouplings * GetSelfDaTQGCCouplings()
Definition: TEvtProb.cc:360
TEvtProb::GetSelfDVprimeCouplings
VprimeCouplings * GetSelfDVprimeCouplings()
Definition: TEvtProb.cc:359
TEvtProb::verbosity
TVar::VerbosityLevel verbosity
Definition: TEvtProb.hh:144
TEvtProb::candList
std::vector< MELACandidate * > candList
Definition: TEvtProb.hh:165
TEvtProb::XsecCalcXJ
double XsecCalcXJ()
Definition: TEvtProb.cc:868
TEvtProb::CheckSelfDCouplings_Hgg
bool CheckSelfDCouplings_Hgg()
Definition: TEvtProb.cc:1019
TEvtProb::SetHiggsMass
void SetHiggsMass(double mass, double wHiggs=-1., int whichResonance=-1)
Definition: TEvtProb.cc:217
TVar::event_scales_type
Definition: TVar.hh:260
TEvtProb::SetRcdCandPtr
void SetRcdCandPtr()
Definition: TEvtProb.cc:298
AZffCouplings
Definition: TCouplings.hh:143
TEvtProb::GetTopCandidates
std::vector< MELATopCandidate_t * > * GetTopCandidates()
Definition: TEvtProb.cc:385
TEvtProb::ResetCouplings
void ResetCouplings()
Definition: TEvtProb.cc:328
MELAHXSWidth
Definition: MELAHXSWidth.h:10
TEvtProb::GetSelfDSpinOneCouplings
SpinOneCouplings * GetSelfDSpinOneCouplings()
Definition: TEvtProb.cc:357
TEvtProb::GetPrimaryWidth
double GetPrimaryWidth(int ipart)
Definition: TEvtProb.cc:367
TEvtProb::EBEAM
double EBEAM
Definition: TEvtProb.hh:151
TEvtProb::XsecCalc_XVV
double XsecCalc_XVV()
Definition: TEvtProb.cc:407
TVar::CandidateDecayMode
CandidateDecayMode
Definition: TVar.hh:37
TEvtProb::_h2width
double _h2width
Definition: TEvtProb.hh:150
TEvtProb::CheckSelfDCouplings_Htt
bool CheckSelfDCouplings_Htt()
Definition: TEvtProb.cc:1065
TEvtProb::GetPrimaryHiggsMass
double GetPrimaryHiggsMass()
Definition: TEvtProb.cc:362
TEvtProb::ResetMCFM_EWKParameters
void ResetMCFM_EWKParameters(double ext_Gf, double ext_aemmz, double ext_mW, double ext_mZ, double ext_xW, int ext_ewscheme=3)
Definition: TEvtProb.cc:327
TEvtProb::ResetInputEvent
void ResetInputEvent()
Definition: TEvtProb.cc:338
TEvtProb::SetWprimeMassWidth
void SetWprimeMassWidth(double inmass, double inwidth)
Definition: TEvtProb.cc:314
TVar::Process
Process
Definition: TVar.hh:125
TVar::EventScaleScheme
EventScaleScheme
Definition: TVar.hh:196
TEvtProb::_h2mass
double _h2mass
Definition: TEvtProb.hh:149
mela.prod
prod
Definition: mela.py:806
TEvtProb::PDFMember_
int PDFMember_
Definition: TEvtProb.hh:140
TEvtProb::TEvtProb
TEvtProb()
Definition: TEvtProb.hh:53
TEvtProb::InitializeMCFM
void InitializeMCFM()
Definition: TEvtProb.cc:82
TEvtProb::InitializeJHUGen
void InitializeJHUGen(const char *pathtoPDFSet, int PDFMember)
Definition: TEvtProb.cc:142
TEvtProb::AppendTopCandidate
void AppendTopCandidate(SimpleParticleCollection_t *TopDaughters)
Definition: TEvtProb.cc:287
TEvtProb::CheckSelfDCouplings_Hbb
bool CheckSelfDCouplings_Hbb()
Definition: TEvtProb.cc:1090
TEvtProb::selfDSpinZeroCoupl
SpinZeroCouplings selfDSpinZeroCoupl
Definition: TEvtProb.hh:155
TEvtProb::selfDVprimeCoupl
VprimeCouplings selfDVprimeCoupl
Definition: TEvtProb.hh:158
TEvtProb::event_scales
TVar::event_scales_type event_scales
Definition: TEvtProb.hh:153
TEvtProb::SetRenFacScaleMode
void SetRenFacScaleMode(TVar::EventScaleScheme renormalizationSch, TVar::EventScaleScheme factorizationSch, double ren_sf, double fac_sf)
Definition: TEvtProb.cc:209
TEvtProb::myCSW_
MELAHXSWidth myCSW_
Definition: TEvtProb.hh:152
TEvtProb::SetLeptonInterf
void SetLeptonInterf(TVar::LeptonInterference tmp)
Definition: TEvtProb.cc:207
TEvtProb::GetHXSWidthEstimator
MELAHXSWidth const * GetHXSWidthEstimator() const
Definition: TEvtProb.cc:355
TEvtProb::production
TVar::Production production
Definition: TEvtProb.hh:143
MELAHXSWidth.h
TEvtProb::SetCurrentCandidateFromIndex
void SetCurrentCandidateFromIndex(unsigned int icand)
Definition: TEvtProb.cc:299
TEvtProb::melaCand
MELACandidate * melaCand
Definition: TEvtProb.hh:163
TEvtProb
Definition: TEvtProb.hh:48
TEvtProb::_hwidth
double _hwidth
Definition: TEvtProb.hh:148
SpinOneCouplings
Definition: TCouplings.hh:65
TEvtProb::_hmass
double _hmass
Definition: TEvtProb.hh:147
TEvtProb::SetInputEvent
void SetInputEvent(SimpleParticleCollection_t *pDaughters, SimpleParticleCollection_t *pAssociated=0, SimpleParticleCollection_t *pMothers=0, bool isGen=false)
Definition: TEvtProb.cc:272
TEvtProb::matrixElement
TVar::MatrixElement matrixElement
Definition: TEvtProb.hh:142
TEvtProb::selfDAZffCoupl
AZffCouplings selfDAZffCoupl
Definition: TEvtProb.hh:160
TEvtProb::XsecCalc_VVXVV
double XsecCalc_VVXVV()
Definition: TEvtProb.cc:729
TEvtProb::CheckSelfDCouplings_AZff
bool CheckSelfDCouplings_AZff()
Definition: TEvtProb.cc:1150
TEvtProb::GetSelfDSpinTwoCouplings
SpinTwoCouplings * GetSelfDSpinTwoCouplings()
Definition: TEvtProb.cc:358
TEvtProb::Build
void Build()
Definition: TEvtProb.cc:51
TEvtProb::CheckSelfDCouplings_HVV
bool CheckSelfDCouplings_HVV()
Definition: TEvtProb.cc:1115
TEvtProb::selfDSpinOneCoupl
SpinOneCouplings selfDSpinOneCoupl
Definition: TEvtProb.hh:156
TEvtProb::CrossInitialize
void CrossInitialize()
Definition: TEvtProb.cc:149
TEvtProb::XsecCalcXJJ
double XsecCalcXJJ()
Definition: TEvtProb.cc:779
TUtil.hh
TEvtProb::GetIORecord
MelaIO * GetIORecord()
Definition: TEvtProb.cc:375
TEvtProb::ResetMass
void ResetMass(double inmass, int ipart)
Definition: TEvtProb.cc:312
TEvtProb::SetProcess
void SetProcess(TVar::Process proc, TVar::MatrixElement me, TVar::Production prod)
Definition: TEvtProb.cc:192
TEvtProb::selfDSpinTwoCoupl
SpinTwoCouplings selfDSpinTwoCoupl
Definition: TEvtProb.hh:157
TVar::MatrixElement
MatrixElement
Definition: TVar.hh:55
TEvtProb::pathtoPDFSet_
const char * pathtoPDFSet_
Definition: TEvtProb.hh:139
TEvtProb::GetPrimaryMass
double GetPrimaryMass(int ipart)
Definition: TEvtProb.cc:363
TEvtProb::GetCurrentCandidateIndex
int GetCurrentCandidateIndex()
Definition: TEvtProb.cc:377
TEvtProb::SetVerbosity
void SetVerbosity(TVar::VerbosityLevel tmp)
Definition: TEvtProb.cc:206
TEvtProb::Set_LHAgrid
void Set_LHAgrid(const char *path, int pdfmember=0)
Definition: TEvtProb.cc:185
TEvtProb::selfDaTQGCCoupl
aTQGCCouplings selfDaTQGCCoupl
Definition: TEvtProb.hh:159
TEvtProb::SetZprimeMassWidth
void SetZprimeMassWidth(double inmass, double inwidth)
Definition: TEvtProb.cc:313
TVar::ResonancePropagatorScheme
ResonancePropagatorScheme
Definition: TVar.hh:117
VprimeCouplings
Definition: TCouplings.hh:105
TEvtProb::GetSelfDSpinZeroCouplings
SpinZeroCouplings * GetSelfDSpinZeroCouplings()
Definition: TEvtProb.cc:356
TEvtProb::GetCurrentCandidate
MELACandidate * GetCurrentCandidate()
Definition: TEvtProb.cc:376
TEvtProb::ResetWidth
void ResetWidth(double inwidth, int ipart)
Definition: TEvtProb.cc:315
TEvtProb::AllowSeparateWWCouplings
void AllowSeparateWWCouplings(bool doAllow=false)
Definition: TEvtProb.cc:215
SpinZeroCouplings
Definition: TCouplings.hh:7
TEvtProb::SetPrimaryHiggsMass
void SetPrimaryHiggsMass(double mass)
Definition: TEvtProb.cc:216
TEvtProb::XsecCalc_VX
double XsecCalc_VX(bool includeHiggsDecay)
Definition: TEvtProb.cc:899
TVar.hh
TEvtProb::GetSelfDAZffCouplings
AZffCouplings * GetSelfDAZffCouplings()
Definition: TEvtProb.cc:361
TEvtProb::CheckSelfDCouplings_Hqq
bool CheckSelfDCouplings_Hqq()
Definition: TEvtProb.cc:1044
TEvtProb::CheckSelfDCouplings_aTQGC
bool CheckSelfDCouplings_aTQGC()
Definition: TEvtProb.cc:1140
TEvtProb::~TEvtProb
~TEvtProb()
Definition: TEvtProb.cc:74
MELACandidate
Definition: MELACandidate.h:7
SimpleParticleCollection_t
std::vector< SimpleParticle_t > SimpleParticleCollection_t
Definition: TVar.hh:25
TEvtProb::PrimaryHMass
double PrimaryHMass
Definition: TEvtProb.hh:146
SpinTwoCouplings
Definition: TCouplings.hh:82
TEvtProb::topCandList
std::vector< MELATopCandidate_t * > topCandList
Definition: TEvtProb.hh:166
TEvtProb::SetCurrentCandidate
void SetCurrentCandidate(MELACandidate *cand)
Definition: TEvtProb.cc:303
TEvtProb::GetXPropagator
double GetXPropagator(TVar::ResonancePropagatorScheme scheme)
Definition: TEvtProb.cc:1011
TVar::Production
Production
Definition: TVar.hh:60
hto_masses::me
real *8, parameter me
Definition: CALLING_cpHTO.f:77
TCouplings.hh
TEvtProb::ResetIORecord
void ResetIORecord()
Definition: TEvtProb.cc:310
TEvtProb::ResetQuarkMasses
void ResetQuarkMasses()
Definition: TEvtProb.cc:316
TEvtProb::process
TVar::Process process
Definition: TEvtProb.hh:141