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 | Protected Member Functions | Protected Attributes | List of all members
SuperDijetMela Class Reference

#include <SuperDijetMela.h>

Public Member Functions

 SuperDijetMela (float sqrts_, TVar::VerbosityLevel verbosity_)
 
 SuperDijetMela (const SuperDijetMela &other)
 
 ~SuperDijetMela ()
 
void SetVerbosity (const TVar::VerbosityLevel verbosity_)
 
void SetupResolutionModel (TVar::Production prod)
 
float GetConvBW (TVar::Production prod, MELACandidate *cand, bool useTrueBW)
 

Protected Member Functions

void Build ()
 

Protected Attributes

float sqrts
 
TVar::VerbosityLevel verbosity
 
std::unordered_map< int, MELADifermionResolutionModel * > ResolutionModelMap
 

Detailed Description

Definition at line 8 of file SuperDijetMela.h.

Constructor & Destructor Documentation

◆ SuperDijetMela() [1/2]

SuperDijetMela::SuperDijetMela ( float  sqrts_,
TVar::VerbosityLevel  verbosity_ 
)

Definition at line 14 of file SuperDijetMela.cc.

14  :
15 sqrts(sqrts_),
16 verbosity(verbosity_)
17 {
18  Build();
19 }

◆ SuperDijetMela() [2/2]

SuperDijetMela::SuperDijetMela ( const SuperDijetMela other)

Definition at line 20 of file SuperDijetMela.cc.

20  :
21 sqrts(other.sqrts),
22 verbosity(other.verbosity)
23 {
24  Build();
25 }

◆ ~SuperDijetMela()

SuperDijetMela::~SuperDijetMela ( )

Definition at line 26 of file SuperDijetMela.cc.

26  {
27  for (auto it=ResolutionModelMap.begin(); it!=ResolutionModelMap.end(); it++) delete it->second;
28 }

Member Function Documentation

◆ Build()

void SuperDijetMela::Build ( )
protected

Definition at line 30 of file SuperDijetMela.cc.

◆ GetConvBW()

float SuperDijetMela::GetConvBW ( TVar::Production  prod,
MELACandidate cand,
bool  useTrueBW 
)

Definition at line 64 of file SuperDijetMela.cc.

64  {
65  float result=-1;
66  int iprod = (int)prod;
67  if (cand!=0){
68  float mJJval=-1;
69  bool modelExists = (ResolutionModelMap.find(iprod)!=ResolutionModelMap.end());
70  int AssociationVCompatibility=0;
71 
72  if (modelExists || useTrueBW){
73  // Get a simple event record, safest way to handle jet mass corrections
74  int nRequested_AssociatedJets=0;
75  int partIncCode=TVar::kNoAssociated; // Just to avoid warnings
76  if (prod == TVar::Had_ZH || prod == TVar::Had_WH){ // Only use associated partons
77  partIncCode=TVar::kUseAssociated_Jets;
78  nRequested_AssociatedJets=2;
79  }
80  if (prod==TVar::Had_WH) AssociationVCompatibility=24;
81  else if (prod==TVar::Had_ZH) AssociationVCompatibility=23;
82  simple_event_record mela_event;
83  mela_event.AssociationCode=partIncCode;
84  mela_event.AssociationVCompatibility=AssociationVCompatibility;
85  mela_event.nRequested_AssociatedJets=nRequested_AssociatedJets;
87  cand,
88  mela_event,
89  verbosity
90  );
91 
92  vector<TLorentzVector> pJets;
93  const SimpleParticleCollection_t& pAssociated = mela_event.pAssociated;
94  for (auto& part : pAssociated){
95  if (PDGHelpers::isAJet(part.first)) pJets.push_back(part.second);
96  if (pJets.size()==2) break;
97  }
98  if (pJets.size()==2) mJJval = (pJets[0] + pJets[1]).M();
99  }
100 
101  if (useTrueBW){
102  float truePoleMass=-1;
103  float truePoleWidth=-1;
104 
105  if (AssociationVCompatibility!=0){
106  truePoleMass=TUtil::GetMass(AssociationVCompatibility);
107  truePoleWidth=TUtil::GetDecayWidth(AssociationVCompatibility);
108  if (mJJval>=0.) result = 1./(pow(pow(mJJval, 2)-pow(truePoleMass, 2), 2) + pow(truePoleMass*truePoleWidth, 2));
109  }
110 
112  << "SuperDijetMela::GetConvBW[idV=" << AssociationVCompatibility << "]::"
113  << "sqrt(s) = " << mJJval
114  << ", true (m,Gamma) = ( " << truePoleMass << " , " << truePoleWidth << " )"
115  << ", ideal BW = " << result
116  << endl;
117  }
118  else if (modelExists){
119  result = ResolutionModelMap[iprod]->getVal(mJJval);
121  << "SuperDijetMela::GetConvBW[" << TVar::ProductionName(prod) << "]::"
122  << "sqrt(s) = " << mJJval
123  << ", reco BW = " << result
124  << endl;
125  }
126  else{
128  << "SuperDijetMela::GetConvBW:: No method for " << TVar::ProductionName(prod) << " is known. "
129  << "sqrt(s) = " << mJJval
130  << ", return value = " << result
131  << endl;
132  }
133  }
134  return result;
135 }

◆ SetupResolutionModel()

void SuperDijetMela::SetupResolutionModel ( TVar::Production  prod)

Definition at line 35 of file SuperDijetMela.cc.

35  {
36  // Setup file path
37  const string MELAPKGPATH = TVar::GetMELAPath();
38  TString path = TString(MELAPKGPATH.c_str()) + "data/resolution_mJJ_recoVStrue_";
39  TString prodName;
40  switch (prod){
41  case TVar::Had_ZH:
42  prodName = "ZH";
43  break;
44  case TVar::Had_WH:
45  prodName = "WH";
46  break;
47  default:
48  MELAout << "SuperDijetMela::SetupResolutionModel: Production " << TVar::ProductionName(prod) << " is unknown." << endl;
49  return;
50  }
51  sqrts = floor(sqrts); // interim solution until 13.6 TeV production is ready
52 
53  path += prodName;
54  path += Form("_%.0fTeV%s", sqrts, ".root");
55 
56  TString appendName = Form("mJJReso_%.0fTeV", sqrts);
58  if (model->isValid()){
59  int iprod = (int)prod;
60  ResolutionModelMap[iprod] = model;
61  }
62  else MELAerr << "SuperDijetMela::SetupResolutionModel: Model MELADifermionResolutionModel(" << TVar::ProductionName(prod) << ", " << sqrts << ", " << path << ", " << appendName << ") cannot be built." << endl;
63 }

◆ SetVerbosity()

void SuperDijetMela::SetVerbosity ( const TVar::VerbosityLevel  verbosity_)
inline

Definition at line 23 of file SuperDijetMela.h.

23 { verbosity=verbosity_; }

Member Data Documentation

◆ ResolutionModelMap

std::unordered_map<int, MELADifermionResolutionModel*> SuperDijetMela::ResolutionModelMap
protected

Definition at line 13 of file SuperDijetMela.h.

◆ sqrts

float SuperDijetMela::sqrts
protected

Definition at line 10 of file SuperDijetMela.h.

◆ verbosity

TVar::VerbosityLevel SuperDijetMela::verbosity
protected

Definition at line 11 of file SuperDijetMela.h.


The documentation for this class was generated from the following files:
SuperDijetMela::ResolutionModelMap
std::unordered_map< int, MELADifermionResolutionModel * > ResolutionModelMap
Definition: SuperDijetMela.h:13
TVar::kUseAssociated_Jets
@ kUseAssociated_Jets
Definition: TVar.hh:33
TVar::simple_event_record::nRequested_AssociatedJets
int nRequested_AssociatedJets
Definition: TVar.hh:230
TVar::ProductionName
TString ProductionName(TVar::Production temp)
Definition: TVar.cc:64
mela.prod
prod
Definition: mela.py:806
MELADifermionResolutionModel
Definition: MELADifermionResolutionModel.h:8
TVar::simple_event_record::AssociationVCompatibility
int AssociationVCompatibility
Definition: TVar.hh:229
MELAStreamHelpers::MELAout
MELAOutputStreamer MELAout
TVar::kNoAssociated
@ kNoAssociated
Definition: TVar.hh:30
testME_all.int
int
Definition: testME_all.py:13
TVar::simple_event_record::AssociationCode
int AssociationCode
Definition: TVar.hh:228
TVar::GetMELAPath
std::string GetMELAPath()
Definition: TVar.cc:121
SuperDijetMela::Build
void Build()
Definition: SuperDijetMela.cc:30
TUtil::GetDecayWidth
double GetDecayWidth(int ipart)
Definition: TUtil.cc:1566
SuperDijetMela::sqrts
float sqrts
Definition: SuperDijetMela.h:10
TVar::Had_ZH
@ Had_ZH
Definition: TVar.hh:75
TUtil::GetMass
double GetMass(int ipart)
Definition: TUtil.cc:1529
MELAStreamHelpers::MELAerr
MELAOutputStreamer MELAerr
MELADifermionResolutionModel::isValid
bool isValid()
Definition: MELADifermionResolutionModel.h:22
SuperDijetMela::verbosity
TVar::VerbosityLevel verbosity
Definition: SuperDijetMela.h:11
TVar::simple_event_record::pAssociated
SimpleParticleCollection_t pAssociated
Definition: TVar.hh:239
TVar::DEBUG
@ DEBUG
Definition: TVar.hh:51
SimpleParticleCollection_t
std::vector< SimpleParticle_t > SimpleParticleCollection_t
Definition: TVar.hh:25
TVar::Had_WH
@ Had_WH
Definition: TVar.hh:76
TVar::simple_event_record
Definition: TVar.hh:227
SuperDijetMela::SetupResolutionModel
void SetupResolutionModel(TVar::Production prod)
Definition: SuperDijetMela.cc:35
TUtil::GetBoostedParticleVectors
void GetBoostedParticleVectors(MELACandidate *melaCand, TVar::simple_event_record &mela_event, TVar::VerbosityLevel verbosity=TVar::DEBUG)
Definition: TUtil.cc:7947
PDGHelpers::isAJet
bool isAJet(const int id)
Definition: PDGHelpers.cc:18