ATLAS Offline Software
Loading...
Searching...
No Matches
HiggsTemplateCrossSectionsDefs.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H
6#define TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H 1
7
9namespace HTXS {
10
25
29 GGF = 1, VBF = 2, WH = 3, QQ2ZH = 4, GG2ZH = 5,
30 TTH = 6, BBH = 7, TH = 8
31 };
32
34 enum tH_type { noTH=0, THQB=1, TWH=2 };
35
39
41 namespace Stage0 {
43 enum Category {
44 UNKNOWN = 0, GG2H_FWDH = 10, GG2H = 11, VBF_FWDH = 20, VBF = 21, VH2HQQ_FWDH = 22, VH2HQQ = 23,
45 QQ2HLNU_FWDH = 30, QQ2HLNU = 31, QQ2HLL_FWDH = 40, QQ2HLL = 41, GG2HLL_FWDH = 50, GG2HLL = 51,
46 TTH_FWDH = 60, TTH = 61, BBH_FWDH = 70, BBH = 71, TH_FWDH = 80, TH = 81 };
47 }
48
53 namespace Stage1 {
92 } // namespace Stage1
93
98 namespace Stage1_2 {
99 enum Category {
101 // Gluon fusion
119 // "VBF"
131 // qq -> WH
138 // qq -> ZH
145 // gg -> ZH
152 // ttH
153 TTH_FWDH = 600,
159 // bbH
160 BBH_FWDH = 700, BBH = 701,
161 // tH
162 TH_FWDH = 800, TH = 801
163 };
164 } // namespace Stage1_2
165
166 namespace Stage1_2_Fine {
167 enum Category {
169 // Gluon fusion
198 // "VBF"
224 // qq -> WH
241 // qq -> ZH
258 // gg -> ZH
275 // ttH
276 TTH_FWDH = 600,
283 // bbH
284 BBH_FWDH = 700, BBH = 701,
285 // tH
286 TH_FWDH = 800, TH = 801
287 };
288 } // namespace Stage1_2_Fine
289
290
291#ifdef ROOT_TLorentzVector
292
293 typedef TLorentzVector TLV;
294 typedef std::vector<TLV> TLVs;
295
296 template <class vec4>
297 TLV MakeTLV(vec4 const & p) { return TLV(p.px(),p.py(),p.pz(),p.E()); }
298
299 template <class Vvec4>
300 inline TLVs MakeTLVs(Vvec4 const &rivet_jets){
301 TLVs jets; for ( const auto & jet:rivet_jets ) jets.push_back(MakeTLV(jet));
302 return jets;
303 }
304
305 // Structure holding information about the current event:
306 // Four-momenta and event classification according to the
307 // Higgs Template Cross Section
308 struct HiggsClassification {
309 // Higgs production mode
311 // The Higgs boson
312 TLV higgs;
313 // The Higgs boson decay products
314 TLV p4decay_higgs;
315 // Associated vector bosons
316 TLV V;
317 // The V-boson decay products
318 TLV p4decay_V;
319 // Jets are built ignoring Higgs decay products and leptons from V decays
320 // jets with pT > 25 GeV and 30 GeV
321 TLVs jets25, jets30;
322 // Event categorization according to YR4 wrtietup
323 // https://cds.cern.ch/record/2138079
324 HTXS::Stage0::Category stage0_cat;
325 HTXS::Stage1::Category stage1_cat_pTjet25GeV;
326 HTXS::Stage1::Category stage1_cat_pTjet30GeV;
327 HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
328 HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
329 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
330 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
331 // Flag for Z->vv decay mode (needed to split QQ2ZH and GG2ZH)
332 bool isZ2vvDecay{};
333 // Error code :: classification was succesful or some error occured
335 };
336
337 template <class category>
338 inline HiggsClassification* Rivet2Root(category const &htxs_cat_rivet){
339 HTXS::HiggsClassification* cat = new HTXS::HiggsClassification;
340 cat->prodMode = htxs_cat_rivet.prodMode;
341 cat->errorCode = htxs_cat_rivet.errorCode;
342 cat->higgs = MakeTLV(htxs_cat_rivet.higgs);
343 cat->V = MakeTLV(htxs_cat_rivet.V);
344 cat->p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
345 cat->p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
346 cat->jets25 = MakeTLVs(htxs_cat_rivet.jets25);
347 cat->jets30 = MakeTLVs(htxs_cat_rivet.jets30);
348 cat->stage0_cat = htxs_cat_rivet.stage0_cat;
349 cat->stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
350 cat->stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
351 cat->stage1_2_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_cat_pTjet25GeV;
352 cat->stage1_2_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_cat_pTjet30GeV;
353 cat->stage1_2_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet25GeV;
354 cat->stage1_2_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet30GeV;
355 cat->isZ2vvDecay = htxs_cat_rivet.isZ2vvDecay;
356 return cat;
357 }
358
359
360
361 inline int HTXSstage1_to_HTXSstage1FineIndex(HTXS::Stage1::Category stage1,
362 HiggsProdMode prodMode, tH_type tH) {
363
364 if(stage1==HTXS::Stage1::Category::UNKNOWN) return 0;
365 int P = (int)(stage1 / 100);
366 int F = (int)(stage1 % 100);
367 // 1.a spit tH categories
368 if (prodMode==HiggsProdMode::TH) {
369 // check that tH splitting is valid for Stage-1 FineIndex
370 // else return unknown category
371 if(tH==tH_type::noTH) return 0;
372 // check if forward tH
373 int fwdH = F==0?0:1;
374 return (49 + 2*(tH-1) +fwdH);
375 }
376 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
377 // offset vector 1: input is the Higgs prodMode
378 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
379 std::vector<int> pMode_offset = {0,0,13,19,25};
380 if (P==2) return (F + pMode_offset[prodMode]);
381 // 1.c remaining categories
382 // offset vector 2: input is the Stage-1 category P
383 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
384 std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
385 return (F + catP_offset[P]);
386 }
387
388 inline int HTXSstage1_to_HTXSstage1FineIndex(const HiggsClassification &stxs,
389 tH_type tH=noTH, bool jets_pT25 = false) {
390 HTXS::Stage1::Category stage1 =
391 jets_pT25==false?stxs.stage1_cat_pTjet30GeV:
392 stxs.stage1_cat_pTjet25GeV;
393 return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
394 }
395
396 inline int HTXSstage1_to_index(HTXS::Stage1::Category stage1) {
397 // the Stage-1 categories
398 int P = (int)(stage1 / 100);
399 int F = (int)(stage1 % 100);
400 std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
401 // convert to linear values
402 return ( F + offset[P] );
403 }
404
405 //Same for Stage1_2 categories
406 inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(HTXS::Stage1_2::Category stage1_2,
407 HiggsProdMode prodMode, tH_type tH) {
408
409 if(stage1_2==HTXS::Stage1_2::Category::UNKNOWN) return 0;
410 int P = (int)(stage1_2 / 100);
411 int F = (int)(stage1_2 % 100);
412 // 1.a spit tH categories
413 if (prodMode==HiggsProdMode::TH) {
414 // check that tH splitting is valid for Stage-1 FineIndex
415 // else return unknown category
416 if(tH==tH_type::noTH) return 0;
417 // check if forward tH
418 int fwdH = F==0?0:1;
419 return (94 + 2*(tH-1) +fwdH);
420 }
421 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
422 // offset vector 1: input is the Higgs prodMode
423 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
424 std::vector<int> pMode_offset = {0,0,35,46,57};
425 if (P==2) return (F + pMode_offset[prodMode]);
426 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
427 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 18;
428 // 1.d remaining categories
429 // offset vector 2: input is the Stage-1 category P
430 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
431 std::vector<int> catP_offset = {0,1,0,68,74,80,86,92};
432 return (F + catP_offset[P]);
433 }
434
435 inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(const HiggsClassification &stxs,
436 tH_type tH=noTH, bool jets_pT25 = false) {
437 HTXS::Stage1_2::Category stage1_2 =
438 jets_pT25==false?stxs.stage1_2_cat_pTjet30GeV:
439 stxs.stage1_2_cat_pTjet25GeV;
440 return HTXSstage1_2_to_HTXSstage1_2_FineIndex(stage1_2,stxs.prodMode,tH);
441 }
442
443 inline int HTXSstage1_2_to_index(HTXS::Stage1_2::Category stage1_2) {
444 // the Stage-1 categories
445 int P = (int)(stage1_2 / 100);
446 int F = (int)(stage1_2 % 100);
447 std::vector<int> offset{0,1,18,29,35,41,47,53,55,57};
448 // convert to linear values
449 return ( F + offset[P] );
450 }
451
452 //Same for Stage1_2_Fine categories
453 inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(HTXS::Stage1_2_Fine::Category Stage1_2_Fine,
454 HiggsProdMode prodMode, tH_type tH) {
455
457 int P = (int)(Stage1_2_Fine / 100);
458 int F = (int)(Stage1_2_Fine % 100);
459 // 1.a spit tH categories
460 if (prodMode==HiggsProdMode::TH) {
461 // check that tH splitting is valid for Stage-1 FineIndex
462 // else return unknown category
463 if(tH==tH_type::noTH) return 0;
464 // check if forward tH
465 int fwdH = F==0?0:1;
466 return (189 + 2*(tH-1) +fwdH);
467 }
468 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
469 // offset vector 1: input is the Higgs prodMode
470 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
471 std::vector<int> pMode_offset = {0,0,57,82,107};
472 if (P==2) return (F + pMode_offset[prodMode]);
473 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
474 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 29;
475 // 1.d remaining categories
476 // offset vector 2: input is the Stage-1 category P
477 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
478 std::vector<int> catP_offset = {0,1,0,132,148,164,180,187};
479 return (F + catP_offset[P]);
480 }
481
482 inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(const HiggsClassification &stxs,
483 tH_type tH=noTH, bool jets_pT25 = false) {
485 jets_pT25==false?stxs.stage1_2_fine_cat_pTjet30GeV:
486 stxs.stage1_2_fine_cat_pTjet25GeV;
487 return HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(Stage1_2_Fine,stxs.prodMode,tH);
488 }
489
490 inline int HTXSstage1_2_Fine_to_index(HTXS::Stage1_2_Fine::Category Stage1_2_Fine) {
491 // the Stage-1_2_Fine categories
492 int P = (int)(Stage1_2_Fine / 100);
493 int F = (int)(Stage1_2_Fine % 100);
494 std::vector<int> offset{0,1,29,54,70,86,102,109,111,113};
495 // convert to linear values
496 return ( F + offset[P] );
497 }
498
499
500#endif // ROOT_TLorentzVector
501
502} // namespace HTXS
503
504
505#ifdef RIVET_Particle_HH
506
507namespace Rivet {
508
513 struct HiggsClassification {
515 HTXS::HiggsProdMode prodMode;
517 Rivet::Particle higgs;
519 Rivet::Particle V;
521 Rivet::FourMomentum p4decay_higgs;
523 Rivet::FourMomentum p4decay_V;
525 Rivet::Jets jets25, jets30;
527 HTXS::Stage0::Category stage0_cat;
529 HTXS::Stage1::Category stage1_cat_pTjet25GeV;
531 HTXS::Stage1::Category stage1_cat_pTjet30GeV;
533 HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
535 HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
537 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
539 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
541 bool isZ2vvDecay=false;
543 HTXS::ErrorCode errorCode;
544 };
545} // namespace Rivet
546#endif // RIVET_Particle_HH
547
548
549
550#endif // TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H
static Double_t P(Double_t *tt, Double_t *par)
#define F(x, y, z)
Definition MD5.cxx:112
Two digit number of format PF P is digit for the physics process and F is 0 for |yH|>2....
Categorization Stage 1.2: Three digit integer of format PF Where P is a digit representing the proces...
Categorization Stage 1: Three digit integer of format PF Where P is a digit representing the process ...
Higgs Template Cross Section namespace.
ErrorCode
Error code: whether the classification was successful or failed.
@ HS_VTX_IDENTIFICATION
failed to identify hard scatter vertex
@ PRODMODE_DEFINED
production mode not defined
@ SUCCESS
successful classification
@ VH_DECAY_IDENTIFICATION
failed to identify associated vector boson decay products
@ HIGGS_IDENTIFICATION
failed to identify Higgs boson
@ TOP_W_IDENTIFICATION
failed to identify top decay
@ HIGGS_DECAY_IDENTIFICATION
failed to identify Higgs boson decay products
@ MOMENTUM_CONSERVATION
failed momentum conservation
@ NUM_ERRORCODES
number of error codes (keep this unnumbered and last)
@ VH_IDENTIFICATION
failed to identify associated vector boson
HiggsProdMode
Higgs production modes, corresponding to input sample.
tH_type
Additional identifier flag for TH production modes.