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
294namespace Stage1_3 {
297 // Gluon fusion
323 // EW qqH
339 // qq -> WH
349 // qq -> ZH
359 // gg -> ZH
369 // ttH
370 TTH_FWDH = 600,
378 // bbH
379 BBH_FWDH = 700,
380 BBH = 701,
381 // tH
382 TH_FWDH = 800,
383 TH = 801
384};
385} // namespace Stage1_3
386
387namespace Stage1_3_Fine {
390 // Gluon fusion
453 // EW qqH
540 // qq -> WH
560 // qq -> ZH
580 // gg -> ZH
600 // ttH
601 TTH_FWDH = 600,
609 // bbH
610 BBH_FWDH = 700,
611 BBH = 701,
612 // tH
613 THQ_FWDH = 800,
614 THQ = 801,
615 THW_FWDH = 802,
616 THW = 803,
617};
618} // namespace Stage1_3_Fine
619
620
621
622
623#ifdef ROOT_TLorentzVector
624
625 typedef TLorentzVector TLV;
626 typedef std::vector<TLV> TLVs;
627
628 template <class vec4>
629 TLV MakeTLV(vec4 const & p) { return TLV(p.px(),p.py(),p.pz(),p.E()); }
630
631 template <class Vvec4>
632 inline TLVs MakeTLVs(Vvec4 const &rivet_jets){
633 TLVs jets; for ( const auto & jet:rivet_jets ) jets.push_back(MakeTLV(jet));
634 return jets;
635 }
636
637 // Structure holding information about the current event:
638 // Four-momenta and event classification according to the
639 // Higgs Template Cross Section
640 struct HiggsClassification {
641 // Higgs production mode
643 // The Higgs boson
644 TLV higgs;
645 // The Higgs boson decay products
646 TLV p4decay_higgs;
647 // Associated vector bosons
648 TLV V;
649 // The V-boson decay products
650 TLV p4decay_V;
651 // Jets are built ignoring Higgs decay products and leptons from V decays
652 // jets with pT > 25 GeV and 30 GeV
653 TLVs jets25, jets30;
654 // Event categorization according to YR4 wrtietup
655 // https://cds.cern.ch/record/2138079
656 HTXS::Stage0::Category stage0_cat;
657 HTXS::Stage1::Category stage1_cat_pTjet25GeV;
658 HTXS::Stage1::Category stage1_cat_pTjet30GeV;
659 HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
660 HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
661 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
662 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
663 HTXS::Stage1_3::Category stage1_3_cat_pTjet25GeV;
664 HTXS::Stage1_3::Category stage1_3_cat_pTjet30GeV;
665 HTXS::Stage1_3_Fine::Category stage1_3_fine_cat_pTjet25GeV;
666 HTXS::Stage1_3_Fine::Category stage1_3_fine_cat_pTjet30GeV;
667 // Flag for Z->vv decay mode (needed to split QQ2ZH and GG2ZH)
668 bool isZ2vvDecay{};
669 // Flag to distinguish tHW from tHq using the event record.
670 bool isTHW{};
671 // Error code :: classification was succesful or some error occured
673 };
674
675 template <class category>
676 inline HiggsClassification* Rivet2Root(category const &htxs_cat_rivet){
677 HTXS::HiggsClassification* cat = new HTXS::HiggsClassification;
678 cat->prodMode = htxs_cat_rivet.prodMode;
679 cat->errorCode = htxs_cat_rivet.errorCode;
680 cat->higgs = MakeTLV(htxs_cat_rivet.higgs);
681 cat->V = MakeTLV(htxs_cat_rivet.V);
682 cat->p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
683 cat->p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
684 cat->jets25 = MakeTLVs(htxs_cat_rivet.jets25);
685 cat->jets30 = MakeTLVs(htxs_cat_rivet.jets30);
686 cat->stage0_cat = htxs_cat_rivet.stage0_cat;
687 cat->stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
688 cat->stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
689 cat->stage1_2_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_cat_pTjet25GeV;
690 cat->stage1_2_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_cat_pTjet30GeV;
691 cat->stage1_2_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet25GeV;
692 cat->stage1_2_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet30GeV;
693 cat->stage1_3_cat_pTjet25GeV = htxs_cat_rivet.stage1_3_cat_pTjet25GeV;
694 cat->stage1_3_cat_pTjet30GeV = htxs_cat_rivet.stage1_3_cat_pTjet30GeV;
695 cat->stage1_3_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_3_fine_cat_pTjet25GeV;
696 cat->stage1_3_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_3_fine_cat_pTjet30GeV;
697 cat->isZ2vvDecay = htxs_cat_rivet.isZ2vvDecay;
698 cat->isTHW = htxs_cat_rivet.isTHW;
699 return cat;
700 }
701
702
703
704 inline int HTXSstage1_to_HTXSstage1FineIndex(HTXS::Stage1::Category stage1,
705 HiggsProdMode prodMode, tH_type tH) {
706
707 if(stage1==HTXS::Stage1::Category::UNKNOWN) return 0;
708 int P = (int)(stage1 / 100);
709 int F = (int)(stage1 % 100);
710 // 1.a spit tH categories
711 if (prodMode==HiggsProdMode::TH) {
712 // check that tH splitting is valid for Stage-1 FineIndex
713 // else return unknown category
714 if(tH==tH_type::noTH) return 0;
715 // check if forward tH
716 int fwdH = F==0?0:1;
717 return (49 + 2*(tH-1) +fwdH);
718 }
719 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
720 // offset vector 1: input is the Higgs prodMode
721 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
722 std::vector<int> pMode_offset = {0,0,13,19,25};
723 if (P==2) return (F + pMode_offset[prodMode]);
724 // 1.c remaining categories
725 // offset vector 2: input is the Stage-1 category P
726 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
727 std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
728 return (F + catP_offset[P]);
729 }
730
731 inline int HTXSstage1_to_HTXSstage1FineIndex(const HiggsClassification &stxs,
732 tH_type tH=noTH, bool jets_pT25 = false) {
733 HTXS::Stage1::Category stage1 =
734 jets_pT25==false?stxs.stage1_cat_pTjet30GeV:
735 stxs.stage1_cat_pTjet25GeV;
736 return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
737 }
738
739 inline int HTXSstage1_to_index(HTXS::Stage1::Category stage1) {
740 // the Stage-1 categories
741 int P = (int)(stage1 / 100);
742 int F = (int)(stage1 % 100);
743 std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
744 // convert to linear values
745 return ( F + offset[P] );
746 }
747
748 //Same for Stage1_2 categories
749 inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(HTXS::Stage1_2::Category stage1_2,
750 HiggsProdMode prodMode, tH_type tH) {
751
752 if(stage1_2==HTXS::Stage1_2::Category::UNKNOWN) return 0;
753 int P = (int)(stage1_2 / 100);
754 int F = (int)(stage1_2 % 100);
755 // 1.a spit tH categories
756 if (prodMode==HiggsProdMode::TH) {
757 // check that tH splitting is valid for Stage-1 FineIndex
758 // else return unknown category
759 if(tH==tH_type::noTH) return 0;
760 // check if forward tH
761 int fwdH = F==0?0:1;
762 return (94 + 2*(tH-1) +fwdH);
763 }
764 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
765 // offset vector 1: input is the Higgs prodMode
766 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
767 std::vector<int> pMode_offset = {0,0,35,46,57};
768 if (P==2) return (F + pMode_offset[prodMode]);
769 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
770 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 18;
771 // 1.d remaining categories
772 // offset vector 2: input is the Stage-1 category P
773 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
774 std::vector<int> catP_offset = {0,1,0,68,74,80,86,92};
775 return (F + catP_offset[P]);
776 }
777
778 inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(const HiggsClassification &stxs,
779 tH_type tH=noTH, bool jets_pT25 = false) {
780 HTXS::Stage1_2::Category stage1_2 =
781 jets_pT25==false?stxs.stage1_2_cat_pTjet30GeV:
782 stxs.stage1_2_cat_pTjet25GeV;
783 return HTXSstage1_2_to_HTXSstage1_2_FineIndex(stage1_2,stxs.prodMode,tH);
784 }
785
786 inline int HTXSstage1_2_to_index(HTXS::Stage1_2::Category stage1_2) {
787 // the Stage-1 categories
788 int P = (int)(stage1_2 / 100);
789 int F = (int)(stage1_2 % 100);
790 std::vector<int> offset{0,1,18,29,35,41,47,53,55,57};
791 // convert to linear values
792 return ( F + offset[P] );
793 }
794
795 //Same for Stage1_2_Fine categories
796 inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(HTXS::Stage1_2_Fine::Category Stage1_2_Fine,
797 HiggsProdMode prodMode, tH_type tH) {
798
800 int P = (int)(Stage1_2_Fine / 100);
801 int F = (int)(Stage1_2_Fine % 100);
802 // 1.a spit tH categories
803 if (prodMode==HiggsProdMode::TH) {
804 // check that tH splitting is valid for Stage-1 FineIndex
805 // else return unknown category
806 if(tH==tH_type::noTH) return 0;
807 // check if forward tH
808 int fwdH = F==0?0:1;
809 return (189 + 2*(tH-1) +fwdH);
810 }
811 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
812 // offset vector 1: input is the Higgs prodMode
813 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
814 std::vector<int> pMode_offset = {0,0,57,82,107};
815 if (P==2) return (F + pMode_offset[prodMode]);
816 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
817 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 29;
818 // 1.d remaining categories
819 // offset vector 2: input is the Stage-1 category P
820 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
821 std::vector<int> catP_offset = {0,1,0,132,148,164,180,187};
822 return (F + catP_offset[P]);
823 }
824
825 inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(const HiggsClassification &stxs,
826 tH_type tH=noTH, bool jets_pT25 = false) {
828 jets_pT25==false?stxs.stage1_2_fine_cat_pTjet30GeV:
829 stxs.stage1_2_fine_cat_pTjet25GeV;
830 return HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(Stage1_2_Fine,stxs.prodMode,tH);
831 }
832
833 inline int HTXSstage1_2_Fine_to_index(HTXS::Stage1_2_Fine::Category Stage1_2_Fine) {
834 // the Stage-1_2_Fine categories
835 int P = (int)(Stage1_2_Fine / 100);
836 int F = (int)(Stage1_2_Fine % 100);
837 std::vector<int> offset{0,1,29,54,70,86,102,109,111,113};
838 // convert to linear values
839 return ( F + offset[P] );
840 }
841
842 //Same for Stage1_3 categories
843 inline int HTXSstage1_3_to_HTXSstage1_3_FineIndex(HTXS::Stage1_3::Category stage1_3,
844 HiggsProdMode prodMode, tH_type tH) {
845
846 if(stage1_3==HTXS::Stage1_3::Category::UNKNOWN) return 0;
847 int P = (int)(stage1_3 / 100);
848 int F = (int)(stage1_3 % 100);
849 // 1.a spit tH categories
850 if (prodMode==HiggsProdMode::TH) {
851 // check that tH splitting is valid for Stage-1 FineIndex
852 // else return unknown category
853 if(tH==tH_type::noTH) return 0;
854 // check if forward tH
855 int fwdH = F==0?0:1;
856 return (133 + 2*(tH-1) +fwdH);
857 }
858 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
859 // offset vector 1: input is the Higgs prodMode
860 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
861 std::vector<int> pMode_offset = {0,0,51,66,81};
862 if (P==2) return (F + pMode_offset[prodMode]);
863 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
864 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 26;
865 // 1.d remaining categories
866 // offset vector 2: input is the Stage-1 category P
867 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
868 std::vector<int> catP_offset = {0,1,0,96,105,114,123,131};
869 return (F + catP_offset[P]);
870 }
871
872 inline int HTXSstage1_3_to_HTXSstage1_3_FineIndex(const HiggsClassification &stxs,
873 tH_type tH=noTH, bool jets_pT25 = false) {
874 HTXS::Stage1_3::Category stage1_3 =
875 jets_pT25==false?stxs.stage1_3_cat_pTjet30GeV:
876 stxs.stage1_3_cat_pTjet25GeV;
877 return HTXSstage1_3_to_HTXSstage1_3_FineIndex(stage1_3,stxs.prodMode,tH);
878 }
879
880 inline int HTXSstage1_3_to_index(HTXS::Stage1_3::Category stage1_3) {
881 // the Stage-1_3 categories
882 int P = (int)(stage1_3 / 100);
883 int F = (int)(stage1_3 % 100);
884 std::vector<int> offset{0,1,26,41,50,59,68,76,78,80};
885 // convert to linear values
886 return ( F + offset[P] );
887 }
888
889 //Same for Stage1_3_Fine categories
890 inline int HTXSstage1_3_Fine_to_HTXSstage1_3_Fine_FineIndex(HTXS::Stage1_3_Fine::Category Stage1_3_Fine,
891 HiggsProdMode prodMode, tH_type tH) {
892
894 int P = (int)(Stage1_3_Fine / 100);
895 int F = (int)(Stage1_3_Fine % 100);
896 // 1.a spit tH categories
897 if (prodMode==HiggsProdMode::TH) {
898 // check that tH splitting is valid for Stage-1 FineIndex
899 // else return unknown category
900 if(tH==tH_type::noTH) return 0;
901 // check if forward tH
902 int fwdH = F==0 || F==2 ? 0:1;
903 return (450 + 2*(tH-1) +fwdH);
904 }
905 // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
906 // offset vector 1: input is the Higgs prodMode
907 // first two indicies are dummies, given that this is only called for prodMode=2,3,4
908 std::vector<int> pMode_offset = {0,0,125,211,297};
909 if (P==2) return (F + pMode_offset[prodMode]);
910 // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
911 if (prodMode==HiggsProdMode::GG2ZH && P==1) return F + 63;
912 // 1.d remaining categories
913 // offset vector 2: input is the Stage-1 category P
914 // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
915 std::vector<int> catP_offset = {0,1,0,383,402,421,440,448};
916 return (F + catP_offset[P]);
917 }
918
919 inline int HTXSstage1_3_Fine_to_HTXSstage1_3_Fine_FineIndex(const HiggsClassification &stxs,
920 tH_type tH=noTH, bool jets_pT25 = false) {
922 jets_pT25==false?stxs.stage1_3_fine_cat_pTjet30GeV:
923 stxs.stage1_3_fine_cat_pTjet25GeV;
924 return HTXSstage1_3_Fine_to_HTXSstage1_3_Fine_FineIndex(Stage1_3_Fine,stxs.prodMode,tH);
925 }
926
927 inline int HTXSstage1_3_Fine_to_index(HTXS::Stage1_3_Fine::Category Stage1_3_Fine) {
928 // the Stage-1_3_Fine categories
929 int P = (int)(Stage1_3_Fine / 100);
930 int F = (int)(Stage1_3_Fine % 100);
931 std::vector<int> offset{0,1,63,149,168,187,206,214,216,219};
932 // convert to linear values
933 return ( F + offset[P] );
934 }
935
936
937
938#endif // ROOT_TLorentzVector
939
940} // namespace HTXS
941
942
943#ifdef RIVET_Particle_HH
944
945namespace Rivet {
946
951 struct HiggsClassification {
953 HTXS::HiggsProdMode prodMode;
955 Rivet::Particle higgs;
957 Rivet::Particle V;
959 Rivet::FourMomentum p4decay_higgs;
961 Rivet::FourMomentum p4decay_V;
963 Rivet::Jets jets25, jets30;
965 HTXS::Stage0::Category stage0_cat;
967 HTXS::Stage1::Category stage1_cat_pTjet25GeV;
969 HTXS::Stage1::Category stage1_cat_pTjet30GeV;
972 HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
975 HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
978 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
981 HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
984 HTXS::Stage1_3::Category stage1_3_cat_pTjet25GeV;
987 HTXS::Stage1_3::Category stage1_3_cat_pTjet30GeV;
990 HTXS::Stage1_3_Fine::Category stage1_3_fine_cat_pTjet25GeV;
993 HTXS::Stage1_3_Fine::Category stage1_3_fine_cat_pTjet30GeV;
995 bool isZ2vvDecay=false;
997 bool isTHW=false;
999 HTXS::ErrorCode errorCode;
1000 };
1001} // namespace Rivet
1002#endif // RIVET_Particle_HH
1003
1004
1005
1006#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.3: 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.