CMS 3D CMS Logo

HiggsTemplateCrossSections.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_GeneratorProducts_HiggsTemplateCrossSections_h
2 #define SimDataFormats_GeneratorProducts_HiggsTemplateCrossSections_h
3 
5 #include <vector>
6 
8 namespace HTXS {
9 
11  enum ErrorCode {
12  UNDEFINED=-99,
13  SUCCESS = 0,
22  };
23 
26  UNKNOWN = 0,
27  GGF = 1, VBF = 2, WH = 3, QQ2ZH = 4, GG2ZH = 5,
28  TTH = 6, BBH = 7, TH = 8
29  };
30 
32  enum tH_type { noTH=0, THQB=1, TWH=2 };
33 
37 
39  namespace Stage0 {
41  enum Category {
42  UNKNOWN = 0, GG2H_FWDH = 10, GG2H = 11, VBF_FWDH = 20, VBF = 21, VH2HQQ_FWDH = 22, VH2HQQ = 23,
43  QQ2HLNU_FWDH = 30, QQ2HLNU = 31, QQ2HLL_FWDH = 40, QQ2HLL = 41, GG2HLL_FWDH = 50, GG2HLL = 51,
44  TTH_FWDH = 60, TTH = 61, BBH_FWDH = 70, BBH = 71, TH_FWDH = 80, TH = 81 };
45  }
46 
51  namespace Stage1 {
52  enum Category {
53  UNKNOWN = 0,
54  // Gluon fusion
55  GG2H_FWDH = 100,
57  GG2H_0J = 103,
62  // "VBF"
63  QQ2HQQ_FWDH = 200,
66  // qq -> WH
67  QQ2HLNU_FWDH = 300,
72  // qq -> ZH
73  QQ2HLL_FWDH = 400,
78  // gg -> ZH
79  GG2HLL_FWDH = 500,
83  // ttH
84  TTH_FWDH = 600, TTH = 601,
85  // bbH
86  BBH_FWDH = 700, BBH = 701,
87  // tH
88  TH_FWDH = 800, TH = 801
89  };
90  } // namespace Stage1
91 
92 namespace Stage1_1 {
93  enum Category {
94  UNKNOWN = 0,
95  // Gluon fusion
96  GG2H_FWDH = 100,
110  // "VBF"
111  QQ2HQQ_FWDH = 200,
112  QQ2HQQ_0J = 201,
113  QQ2HQQ_1J = 202,
122  // qq -> WH
129  // qq -> ZH
130  QQ2HLL_FWDH = 400,
136  // gg -> ZH
137  GG2HLL_FWDH = 500,
143  // ttH
144  TTH_FWDH = 600, TTH = 601,
145  // bbH
146  BBH_FWDH = 700, BBH = 701,
147  // tH
148  TH_FWDH = 800, TH = 801
149  };
150  } // namespace Stage1_1
151 
152  namespace Stage1_1_Fine {
153  enum Category {
154  UNKNOWN = 0,
155  // Gluon fusion
156  GG2H_FWDH = 100,
177  // "VBF"
178  QQ2HQQ_FWDH = 200,
179  QQ2HQQ_0J = 201,
180  QQ2HQQ_1J = 202,
203  // qq -> WH
220  // qq -> ZH
221  QQ2HLL_FWDH = 400,
237  // gg -> ZH
238  GG2HLL_FWDH = 500,
254  // ttH
255  TTH_FWDH = 600, TTH = 601,
256  // bbH
257  BBH_FWDH = 700, BBH = 701,
258  // tH
259  TH_FWDH = 800, TH = 801
260  };
261  } // namespace Stage1_1_Fine
262 
263 
264 //#ifdef ROOT_TLorentzVector
265  //typedef TLorentzVector TLV;
267  typedef std::vector<TLV> TLVs;
268 
269  template <class vec4>
270  TLV MakeTLV(vec4 const p) { return TLV(p.px(),p.py(),p.pz(),p.E()); }
271 
272  template <class Vvec4>
273  inline TLVs MakeTLVs(Vvec4 const &rivet_jets){
274  TLVs jets; for ( auto jet:rivet_jets ) jets.push_back(MakeTLV(jet));
275  return jets;
276  }
277 
278  // Structure holding information about the current event:
279  // Four-momenta and event classification according to the
280  // Higgs Template Cross Section
282  // Higgs production mode
284  // The Higgs boson
285  TLV higgs;
286  // The Higgs boson decay products
288  // Associated vector bosons
289  TLV V;
290  // The V-boson decay products
292  // Jets are built ignoring Higgs decay products and leptons from V decays
293  // jets with pT > 25 GeV and 30 GeV
294  TLVs jets25, jets30;
295  // Event categorization according to YR4 wrtietup
296  // https://cds.cern.ch/record/2138079
304  // Error code :: classification was succesful or some error occured
306  };
307 
308  template <class category>
309  inline HTXS::HiggsClassification Rivet2Root(category const &htxs_cat_rivet){
311  cat.prodMode = htxs_cat_rivet.prodMode;
312  cat.errorCode = htxs_cat_rivet.errorCode;
313  cat.higgs = MakeTLV(htxs_cat_rivet.higgs);
314  cat.V = MakeTLV(htxs_cat_rivet.V);
315  cat.p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
316  cat.p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
317  cat.jets25 = MakeTLVs(htxs_cat_rivet.jets25);
318  cat.jets30 = MakeTLVs(htxs_cat_rivet.jets30);
319  cat.stage0_cat = htxs_cat_rivet.stage0_cat;
320  cat.stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
321  cat.stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
322  cat.stage1_1_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_cat_pTjet25GeV;
323  cat.stage1_1_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_cat_pTjet30GeV;
324  cat.stage1_1_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet25GeV;
325  cat.stage1_1_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet30GeV;
326  return cat;
327  }
328 
329 
330 
332  HiggsProdMode prodMode, tH_type tH) {
333 
334  if(stage1==HTXS::Stage1::Category::UNKNOWN) return 0;
335  int P = (int)(stage1 / 100);
336  int F = (int)(stage1 % 100);
337  // 1.a spit tH categories
338  if (prodMode==HiggsProdMode::TH) {
339  // check that tH splitting is valid for Stage-1 FineIndex
340  // else return unknown category
341  if(tH==tH_type::noTH) return 0;
342  // check if forward tH
343  int fwdH = F==0?0:1;
344  return (49 + 2*(tH-1) +fwdH);
345  }
346  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
347  // offset vector 1: input is the Higgs prodMode
348  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
349  std::vector<int> pMode_offset = {0,0,13,19,25};
350  if (P==2) return (F + pMode_offset[prodMode]);
351  // 1.c remaining categories
352  // offset vector 2: input is the Stage-1 category P
353  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
354  std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
355  return (F + catP_offset[P]);
356  }
357 
359  tH_type tH=noTH, bool jets_pT25 = false) {
360  HTXS::Stage1::Category stage1 =
361  jets_pT25==false?stxs.stage1_cat_pTjet30GeV:
363  return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
364  }
365 
367  // the Stage-1 categories
368  int P = (int)(stage1 / 100);
369  int F = (int)(stage1 % 100);
370  std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
371  // convert to linear values
372  return ( F + offset[P] );
373  }
374 
375 
376 // #endif
377 
378 } // namespace HTXS
379 
380 
381 #ifdef RIVET_Particle_HH
382 //#ifdef HIGGSTRUTHCLASSIFIER_HIGGSTRUTHCLASSIFIER_CC
383 //#include "Rivet/Particle.hh"
384 namespace Rivet {
385 
390  struct HiggsClassification {
392  HTXS::HiggsProdMode prodMode;
394  Rivet::Particle higgs;
396  Rivet::Particle V;
398  Rivet::FourMomentum p4decay_higgs;
400  Rivet::FourMomentum p4decay_V;
402  Rivet::Jets jets25, jets30;
404  HTXS::Stage0::Category stage0_cat;
406  HTXS::Stage1::Category stage1_cat_pTjet25GeV;
408  HTXS::Stage1::Category stage1_cat_pTjet30GeV;
418  HTXS::ErrorCode errorCode;
419  };
420 } // namespace Rivet
421 #endif
422 
423 
424 
425 #endif
failed to identify associated vector boson
std::vector< TLV > TLVs
ErrorCode
Error code: whether the classification was successful or failed.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
successful classification
failed to identify Higgs boson decay products
HTXS::Stage1::Category stage1_cat_pTjet25GeV
HiggsProdMode
Higgs production modes, corresponding to input sample.
HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet30GeV
Definition: VBF.py:1
def cat(path)
Definition: eostools.py:401
HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet25GeV
failed momentum conservation
int HTXSstage1_to_HTXSstage1FineIndex(HTXS::Stage1::Category stage1, HiggsProdMode prodMode, tH_type tH)
vector< PseudoJet > jets
tH_type
Additional identifier flag for TH production modes.
int HTXSstage1_to_index(HTXS::Stage1::Category stage1)
std::vector< vec3 > vec4
Definition: HCALResponse.h:18
Higgs Template Cross Section namespace.
failed to identify associated vector boson decay products
TLV MakeTLV(vec4 const p)
math::XYZTLorentzVectorD TLV
HTXS::Stage1::Category stage1_cat_pTjet30GeV
HTXS::Stage1_1::Category stage1_1_cat_pTjet25GeV
failed to identify Higgs boson
failed to identify hard scatter vertex
std::pair< OmniClusterRef, TrackingParticleRef > P
HTXS::Stage1_1::Category stage1_1_cat_pTjet30GeV
HTXS::HiggsClassification Rivet2Root(category const &htxs_cat_rivet)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
TLVs MakeTLVs(Vvec4 const &rivet_jets)
production mode not defined
failed to identify top decay