JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
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);
84  void ResetRenFacScaleMode();
85 
86  // Convert std::vectors to MELAPArticle* and MELACandidate* objects, stored in particleList and candList, respectively.
87  // Also set melaCand to this candidsate if it is valid.
88  void SetInputEvent(
89  SimpleParticleCollection_t* pDaughters,
90  SimpleParticleCollection_t* pAssociated=0,
91  SimpleParticleCollection_t* pMothers=0,
92  bool isGen=false
93  );
95  void ResetInputEvent();
96 
97  // Reset the IO record, called at te beginning of each comoputation
98  void ResetIORecord();
99 
100  double XsecCalc_XVV();
101 
102  double XsecCalc_VVXVV();
103 
104  double XsecCalcXJJ();
105 
106  double XsecCalcXJ();
107 
108  double XsecCalc_VX(
109  bool includeHiggsDecay
110  );
111 
112  double XsecCalc_TTX(
113  int topProcess, int topDecay
114  );
115 
117 
118  // Get-functions
119  MELAHXSWidth const* GetHXSWidthEstimator() const;
126  double GetPrimaryHiggsMass();
127  double GetPrimaryMass(int ipart);
128  double GetPrimaryWidth(int ipart);
129  double GetHiggsWidthAtPoleMass(double mass);
130  MelaIO* GetIORecord();
132  int GetCurrentCandidateIndex(); // Return the index of current melaCand in the candList array, or -1 if it does not exist
133  int GetNCandidates();
134  std::vector<MELATopCandidate_t*>* GetTopCandidates();
135 
136 protected:
137  //--------------------
138  // Variables
139  //--------------------
140  const char* pathtoPDFSet_;
147  double PrimaryHMass;
148  double _hmass;
149  double _hwidth;
150  double _h2mass;
151  double _h2width;
152  double EBEAM;
155 
163 
164  MELACandidate* melaCand; // Only a pointer to the top-level (input) candList object
165  std::vector<MELAParticle*> particleList; // Container of intermediate objects, for bookkeeping to delete later
166  std::vector<MELACandidate*> candList; // Container of candidate objects, for bookkeeping to delete later
167  std::vector<MELATopCandidate_t*> topCandList; // Container of candidate objects, for bookkeeping to delete later
168 
169  // Initialization functions
170  void InitializeMCFM();
171  void InitializeJHUGen(const char* pathtoPDFSet, int PDFMember);
172  void CrossInitialize();
173 
174  // Check if at least one input candidate is present
175  bool CheckInputPresent();
176  void SetRcdCandPtr();
177 
178  // Check if self-defined couplings are specified
186 
187  // Constructor wrapper
188  void Build();
189 
190 };
191 
192 #endif
193 
TVar::ERROR
@ ERROR
Definition: TVar.hh:49
TEvtProb::XsecCalc_TTX
double XsecCalc_TTX(int topProcess, int topDecay)
Definition: TEvtProb.cc:992
TEvtProb::particleList
std::vector< MELAParticle * > particleList
Definition: TEvtProb.hh:165
TMCFM.hh
TEvtProb::leptonInterf
TVar::LeptonInterference leptonInterf
Definition: TEvtProb.hh:146
TEvtProb::CheckInputPresent
bool CheckInputPresent()
Definition: TEvtProb.cc:396
TEvtProb::RcdME
MelaIO RcdME
Definition: TEvtProb.hh:162
aTQGCCouplings
Definition: TCouplings.hh:131
TEvtProb::SetCandidateDecayMode
void SetCandidateDecayMode(TVar::CandidateDecayMode mode)
Definition: TEvtProb.cc:209
TEvtProb::GetHiggsWidthAtPoleMass
double GetHiggsWidthAtPoleMass(double mass)
Definition: TEvtProb.cc:378
MelaIO
Definition: MelaIO.h:8
TVar::LeptonInterference
LeptonInterference
Definition: TVar.hh:105
TEvtProb::ResetRenFacScaleMode
void ResetRenFacScaleMode()
Definition: TEvtProb.cc:318
TEvtProb::GetNCandidates
int GetNCandidates()
Definition: TEvtProb.cc:391
TVar::VerbosityLevel
VerbosityLevel
Definition: TVar.hh:47
TEvtProb::GetSelfDaTQGCCouplings
aTQGCCouplings * GetSelfDaTQGCCouplings()
Definition: TEvtProb.cc:367
TEvtProb::GetSelfDVprimeCouplings
VprimeCouplings * GetSelfDVprimeCouplings()
Definition: TEvtProb.cc:366
TEvtProb::verbosity
TVar::VerbosityLevel verbosity
Definition: TEvtProb.hh:145
TEvtProb::candList
std::vector< MELACandidate * > candList
Definition: TEvtProb.hh:166
TEvtProb::XsecCalcXJ
double XsecCalcXJ()
Definition: TEvtProb.cc:885
TEvtProb::CheckSelfDCouplings_Hgg
bool CheckSelfDCouplings_Hgg()
Definition: TEvtProb.cc:1036
TEvtProb::SetHiggsMass
void SetHiggsMass(double mass, double wHiggs=-1., int whichResonance=-1)
Definition: TEvtProb.cc:221
TVar::event_scales_type
Definition: TVar.hh:259
TEvtProb::SetRcdCandPtr
void SetRcdCandPtr()
Definition: TEvtProb.cc:305
AZffCouplings
Definition: TCouplings.hh:146
TEvtProb::GetTopCandidates
std::vector< MELATopCandidate_t * > * GetTopCandidates()
Definition: TEvtProb.cc:392
TEvtProb::ResetCouplings
void ResetCouplings()
Definition: TEvtProb.cc:335
MELAHXSWidth
Definition: MELAHXSWidth.h:10
TEvtProb::GetSelfDSpinOneCouplings
SpinOneCouplings * GetSelfDSpinOneCouplings()
Definition: TEvtProb.cc:364
TEvtProb::GetPrimaryWidth
double GetPrimaryWidth(int ipart)
Definition: TEvtProb.cc:374
TEvtProb::EBEAM
double EBEAM
Definition: TEvtProb.hh:152
TEvtProb::XsecCalc_XVV
double XsecCalc_XVV()
Definition: TEvtProb.cc:414
TVar::CandidateDecayMode
CandidateDecayMode
Definition: TVar.hh:37
TEvtProb::_h2width
double _h2width
Definition: TEvtProb.hh:151
TEvtProb::CheckSelfDCouplings_Htt
bool CheckSelfDCouplings_Htt()
Definition: TEvtProb.cc:1082
TEvtProb::GetPrimaryHiggsMass
double GetPrimaryHiggsMass()
Definition: TEvtProb.cc:369
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:334
TEvtProb::ResetInputEvent
void ResetInputEvent()
Definition: TEvtProb.cc:345
TEvtProb::SetWprimeMassWidth
void SetWprimeMassWidth(double inmass, double inwidth)
Definition: TEvtProb.cc:321
TVar::Process
Process
Definition: TVar.hh:124
TVar::EventScaleScheme
EventScaleScheme
Definition: TVar.hh:195
TEvtProb::_h2mass
double _h2mass
Definition: TEvtProb.hh:150
TEvtProb::PDFMember_
int PDFMember_
Definition: TEvtProb.hh:141
TEvtProb::TEvtProb
TEvtProb()
Definition: TEvtProb.hh:53
TEvtProb::InitializeMCFM
void InitializeMCFM()
Definition: TEvtProb.cc:83
TEvtProb::InitializeJHUGen
void InitializeJHUGen(const char *pathtoPDFSet, int PDFMember)
Definition: TEvtProb.cc:143
TEvtProb::AppendTopCandidate
void AppendTopCandidate(SimpleParticleCollection_t *TopDaughters)
Definition: TEvtProb.cc:294
TEvtProb::CheckSelfDCouplings_Hbb
bool CheckSelfDCouplings_Hbb()
Definition: TEvtProb.cc:1107
TEvtProb::selfDSpinZeroCoupl
SpinZeroCouplings selfDSpinZeroCoupl
Definition: TEvtProb.hh:156
TEvtProb::selfDVprimeCoupl
VprimeCouplings selfDVprimeCoupl
Definition: TEvtProb.hh:159
TEvtProb::GetRenFacScaleMode
const TVar::event_scales_type & GetRenFacScaleMode() const
Definition: TEvtProb.cc:216
TEvtProb::event_scales
TVar::event_scales_type event_scales
Definition: TEvtProb.hh:154
TEvtProb::SetRenFacScaleMode
void SetRenFacScaleMode(TVar::EventScaleScheme renormalizationSch, TVar::EventScaleScheme factorizationSch, double ren_sf, double fac_sf)
Definition: TEvtProb.cc:210
TEvtProb::myCSW_
MELAHXSWidth myCSW_
Definition: TEvtProb.hh:153
TEvtProb::SetLeptonInterf
void SetLeptonInterf(TVar::LeptonInterference tmp)
Definition: TEvtProb.cc:208
TEvtProb::GetHXSWidthEstimator
MELAHXSWidth const * GetHXSWidthEstimator() const
Definition: TEvtProb.cc:362
TEvtProb::production
TVar::Production production
Definition: TEvtProb.hh:144
MELAHXSWidth.h
TEvtProb::SetCurrentCandidateFromIndex
void SetCurrentCandidateFromIndex(unsigned int icand)
Definition: TEvtProb.cc:306
TEvtProb::melaCand
MELACandidate * melaCand
Definition: TEvtProb.hh:164
TEvtProb
Definition: TEvtProb.hh:48
TEvtProb::_hwidth
double _hwidth
Definition: TEvtProb.hh:149
SpinOneCouplings
Definition: TCouplings.hh:68
TEvtProb::_hmass
double _hmass
Definition: TEvtProb.hh:148
TEvtProb::SetInputEvent
void SetInputEvent(SimpleParticleCollection_t *pDaughters, SimpleParticleCollection_t *pAssociated=0, SimpleParticleCollection_t *pMothers=0, bool isGen=false)
Definition: TEvtProb.cc:279
TEvtProb::matrixElement
TVar::MatrixElement matrixElement
Definition: TEvtProb.hh:143
TEvtProb::selfDAZffCoupl
AZffCouplings selfDAZffCoupl
Definition: TEvtProb.hh:161
TEvtProb::XsecCalc_VVXVV
double XsecCalc_VVXVV()
Definition: TEvtProb.cc:746
TEvtProb::CheckSelfDCouplings_AZff
bool CheckSelfDCouplings_AZff()
Definition: TEvtProb.cc:1167
TEvtProb::GetSelfDSpinTwoCouplings
SpinTwoCouplings * GetSelfDSpinTwoCouplings()
Definition: TEvtProb.cc:365
TEvtProb::Build
void Build()
Definition: TEvtProb.cc:52
TEvtProb::CheckSelfDCouplings_HVV
bool CheckSelfDCouplings_HVV()
Definition: TEvtProb.cc:1132
TEvtProb::selfDSpinOneCoupl
SpinOneCouplings selfDSpinOneCoupl
Definition: TEvtProb.hh:157
TEvtProb::CrossInitialize
void CrossInitialize()
Definition: TEvtProb.cc:150
TEvtProb::XsecCalcXJJ
double XsecCalcXJJ()
Definition: TEvtProb.cc:796
TUtil.hh
TEvtProb::GetIORecord
MelaIO * GetIORecord()
Definition: TEvtProb.cc:382
TEvtProb::ResetMass
void ResetMass(double inmass, int ipart)
Definition: TEvtProb.cc:319
TEvtProb::SetProcess
void SetProcess(TVar::Process proc, TVar::MatrixElement me, TVar::Production prod)
Definition: TEvtProb.cc:193
TEvtProb::selfDSpinTwoCoupl
SpinTwoCouplings selfDSpinTwoCoupl
Definition: TEvtProb.hh:158
TVar::MatrixElement
MatrixElement
Definition: TVar.hh:55
TEvtProb::pathtoPDFSet_
const char * pathtoPDFSet_
Definition: TEvtProb.hh:140
TEvtProb::GetPrimaryMass
double GetPrimaryMass(int ipart)
Definition: TEvtProb.cc:370
TEvtProb::GetCurrentCandidateIndex
int GetCurrentCandidateIndex()
Definition: TEvtProb.cc:384
TEvtProb::SetVerbosity
void SetVerbosity(TVar::VerbosityLevel tmp)
Definition: TEvtProb.cc:207
TEvtProb::Set_LHAgrid
void Set_LHAgrid(const char *path, int pdfmember=0)
Definition: TEvtProb.cc:186
TEvtProb::selfDaTQGCCoupl
aTQGCCouplings selfDaTQGCCoupl
Definition: TEvtProb.hh:160
TEvtProb::SetZprimeMassWidth
void SetZprimeMassWidth(double inmass, double inwidth)
Definition: TEvtProb.cc:320
TVar::ResonancePropagatorScheme
ResonancePropagatorScheme
Definition: TVar.hh:116
VprimeCouplings
Definition: TCouplings.hh:108
TEvtProb::GetSelfDSpinZeroCouplings
SpinZeroCouplings * GetSelfDSpinZeroCouplings()
Definition: TEvtProb.cc:363
TEvtProb::GetCurrentCandidate
MELACandidate * GetCurrentCandidate()
Definition: TEvtProb.cc:383
TEvtProb::ResetWidth
void ResetWidth(double inwidth, int ipart)
Definition: TEvtProb.cc:322
TEvtProb::AllowSeparateWWCouplings
void AllowSeparateWWCouplings(bool doAllow=false)
Definition: TEvtProb.cc:219
SpinZeroCouplings
Definition: TCouplings.hh:7
TEvtProb::SetPrimaryHiggsMass
void SetPrimaryHiggsMass(double mass)
Definition: TEvtProb.cc:220
TEvtProb::XsecCalc_VX
double XsecCalc_VX(bool includeHiggsDecay)
Definition: TEvtProb.cc:916
TVar.hh
TEvtProb::GetSelfDAZffCouplings
AZffCouplings * GetSelfDAZffCouplings()
Definition: TEvtProb.cc:368
TEvtProb::CheckSelfDCouplings_Hqq
bool CheckSelfDCouplings_Hqq()
Definition: TEvtProb.cc:1061
TEvtProb::CheckSelfDCouplings_aTQGC
bool CheckSelfDCouplings_aTQGC()
Definition: TEvtProb.cc:1157
TEvtProb::~TEvtProb
~TEvtProb()
Definition: TEvtProb.cc:75
MELACandidate
Definition: MELACandidate.h:7
SimpleParticleCollection_t
std::vector< SimpleParticle_t > SimpleParticleCollection_t
Definition: TVar.hh:25
TEvtProb::PrimaryHMass
double PrimaryHMass
Definition: TEvtProb.hh:147
SpinTwoCouplings
Definition: TCouplings.hh:85
TEvtProb::topCandList
std::vector< MELATopCandidate_t * > topCandList
Definition: TEvtProb.hh:167
TEvtProb::SetCurrentCandidate
void SetCurrentCandidate(MELACandidate *cand)
Definition: TEvtProb.cc:310
TEvtProb::GetXPropagator
double GetXPropagator(TVar::ResonancePropagatorScheme scheme)
Definition: TEvtProb.cc:1028
TVar::Production
Production
Definition: TVar.hh:61
hto_masses::me
real *8, parameter me
Definition: CALLING_cpHTO.f:77
TCouplings.hh
TEvtProb::ResetIORecord
void ResetIORecord()
Definition: TEvtProb.cc:317
TEvtProb::ResetQuarkMasses
void ResetQuarkMasses()
Definition: TEvtProb.cc:323
TEvtProb::process
TVar::Process process
Definition: TEvtProb.hh:142