Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:03:50

0001 #ifndef SimDataFormats_GeneratorProducts_HiggsTemplateCrossSections_h
0002 #define SimDataFormats_GeneratorProducts_HiggsTemplateCrossSections_h
0003 
0004 #include "DataFormats/Math/interface/LorentzVector.h"
0005 #include <vector>
0006 
0007 /// Higgs Template Cross Section namespace
0008 namespace HTXS {
0009 
0010   /// Error code: whether the classification was successful or failed
0011   enum ErrorCode {
0012     UNDEFINED = -99,
0013     SUCCESS = 0,                     ///< successful classification
0014     PRODMODE_DEFINED = 1,            ///< production mode not defined
0015     MOMENTUM_CONSERVATION = 2,       ///< failed momentum conservation
0016     HIGGS_IDENTIFICATION = 3,        ///< failed to identify Higgs boson
0017     HIGGS_DECAY_IDENTIFICATION = 4,  ///< failed to identify Higgs boson decay products
0018     HS_VTX_IDENTIFICATION = 5,       ///< failed to identify hard scatter vertex
0019     VH_IDENTIFICATION = 6,           ///< failed to identify associated vector boson
0020     VH_DECAY_IDENTIFICATION = 7,     ///< failed to identify associated vector boson decay products
0021     TOP_W_IDENTIFICATION = 8         ///< failed to identify top decay
0022   };
0023 
0024   /// Higgs production modes, corresponding to input sample
0025   enum HiggsProdMode { UNKNOWN = 0, GGF = 1, VBF = 2, WH = 3, QQ2ZH = 4, GG2ZH = 5, TTH = 6, BBH = 7, TH = 8 };
0026 
0027   /// Additional identifier flag for TH production modes
0028   enum tH_type { noTH = 0, THQB = 1, TWH = 2 };
0029 
0030   ///   Two digit number of format PF
0031   ///   P is digit for the physics process
0032   ///   and F is 0 for |yH|>2.5 and 11 for |yH|<2.5 ("in fiducial")
0033 
0034   /// Namespace for Stage0 categorization
0035   namespace Stage0 {
0036     /// @enum Stage-0 ategorization: Two-digit number of format PF, with P for process and F being 0 for |yH|>2.5 and 1 for |yH|<2.5
0037     enum Category {
0038       UNKNOWN = 0,
0039       GG2H_FWDH = 10,
0040       GG2H = 11,
0041       VBF_FWDH = 20,
0042       VBF = 21,
0043       VH2HQQ_FWDH = 22,
0044       VH2HQQ = 23,
0045       QQ2HLNU_FWDH = 30,
0046       QQ2HLNU = 31,
0047       QQ2HLL_FWDH = 40,
0048       QQ2HLL = 41,
0049       GG2HLL_FWDH = 50,
0050       GG2HLL = 51,
0051       TTH_FWDH = 60,
0052       TTH = 61,
0053       BBH_FWDH = 70,
0054       BBH = 71,
0055       TH_FWDH = 80,
0056       TH = 81
0057     };
0058   }  // namespace Stage0
0059 
0060   /// Categorization Stage 1:
0061   /// Three digit integer of format PF
0062   /// Where P is a digit representing the process
0063   /// F is a unique integer ( F < 99 ) corresponding to each Stage1 phase-space region (bin)
0064   namespace Stage1 {
0065     enum Category {
0066       UNKNOWN = 0,
0067       // Gluon fusion
0068       GG2H_FWDH = 100,
0069       GG2H_VBFTOPO_JET3VETO = 101,
0070       GG2H_VBFTOPO_JET3 = 102,
0071       GG2H_0J = 103,
0072       GG2H_1J_PTH_0_60 = 104,
0073       GG2H_1J_PTH_60_120 = 105,
0074       GG2H_1J_PTH_120_200 = 106,
0075       GG2H_1J_PTH_GT200 = 107,
0076       GG2H_GE2J_PTH_0_60 = 108,
0077       GG2H_GE2J_PTH_60_120 = 109,
0078       GG2H_GE2J_PTH_120_200 = 110,
0079       GG2H_GE2J_PTH_GT200 = 111,
0080       // "VBF"
0081       QQ2HQQ_FWDH = 200,
0082       QQ2HQQ_VBFTOPO_JET3VETO = 201,
0083       QQ2HQQ_VBFTOPO_JET3 = 202,
0084       QQ2HQQ_VH2JET = 203,
0085       QQ2HQQ_REST = 204,
0086       QQ2HQQ_PTJET1_GT200 = 205,
0087       // qq -> WH
0088       QQ2HLNU_FWDH = 300,
0089       QQ2HLNU_PTV_0_150 = 301,
0090       QQ2HLNU_PTV_150_250_0J = 302,
0091       QQ2HLNU_PTV_150_250_GE1J = 303,
0092       QQ2HLNU_PTV_GT250 = 304,
0093       // qq -> ZH
0094       QQ2HLL_FWDH = 400,
0095       QQ2HLL_PTV_0_150 = 401,
0096       QQ2HLL_PTV_150_250_0J = 402,
0097       QQ2HLL_PTV_150_250_GE1J = 403,
0098       QQ2HLL_PTV_GT250 = 404,
0099       // gg -> ZH
0100       GG2HLL_FWDH = 500,
0101       GG2HLL_PTV_0_150 = 501,
0102       GG2HLL_PTV_GT150_0J = 502,
0103       GG2HLL_PTV_GT150_GE1J = 503,
0104       // ttH
0105       TTH_FWDH = 600,
0106       TTH = 601,
0107       // bbH
0108       BBH_FWDH = 700,
0109       BBH = 701,
0110       // tH
0111       TH_FWDH = 800,
0112       TH = 801
0113     };
0114   }  // namespace Stage1
0115 
0116   namespace Stage1_1 {
0117     enum Category {
0118       UNKNOWN = 0,
0119       // Gluon fusion
0120       GG2H_FWDH = 100,
0121       GG2H_PTH_GT200 = 101,
0122       GG2H_0J_PTH_0_10 = 102,
0123       GG2H_0J_PTH_GT10 = 103,
0124       GG2H_1J_PTH_0_60 = 104,
0125       GG2H_1J_PTH_60_120 = 105,
0126       GG2H_1J_PTH_120_200 = 106,
0127       GG2H_GE2J_MJJ_0_350_PTH_0_60 = 107,
0128       GG2H_GE2J_MJJ_0_350_PTH_60_120 = 108,
0129       GG2H_GE2J_MJJ_0_350_PTH_120_200 = 109,
0130       GG2H_MJJ_350_700_PTHJJ_0_25 = 110,
0131       GG2H_MJJ_350_700_PTHJJ_GT25 = 111,
0132       GG2H_MJJ_GT700_PTHJJ_0_25 = 112,
0133       GG2H_MJJ_GT700_PTHJJ_GT25 = 113,
0134       // "VBF"
0135       QQ2HQQ_FWDH = 200,
0136       QQ2HQQ_0J = 201,
0137       QQ2HQQ_1J = 202,
0138       QQ2HQQ_MJJ_0_60 = 203,
0139       QQ2HQQ_MJJ_60_120 = 204,
0140       QQ2HQQ_MJJ_120_350 = 205,
0141       QQ2HQQ_MJJ_GT350_PTH_GT200 = 206,
0142       QQ2HQQ_MJJ_350_700_PTHJJ_0_25 = 207,
0143       QQ2HQQ_MJJ_350_700_PTHJJ_GT25 = 208,
0144       QQ2HQQ_MJJ_GT700_PTHJJ_0_25 = 209,
0145       QQ2HQQ_MJJ_GT700_PTHJJ_GT25 = 210,
0146       // qq -> WH
0147       QQ2HLNU_FWDH = 300,
0148       QQ2HLNU_PTV_0_75 = 301,
0149       QQ2HLNU_PTV_75_150 = 302,
0150       QQ2HLNU_PTV_150_250_0J = 303,
0151       QQ2HLNU_PTV_150_250_GE1J = 304,
0152       QQ2HLNU_PTV_GT250 = 305,
0153       // qq -> ZH
0154       QQ2HLL_FWDH = 400,
0155       QQ2HLL_PTV_0_75 = 401,
0156       QQ2HLL_PTV_75_150 = 402,
0157       QQ2HLL_PTV_150_250_0J = 403,
0158       QQ2HLL_PTV_150_250_GE1J = 404,
0159       QQ2HLL_PTV_GT250 = 405,
0160       // gg -> ZH
0161       GG2HLL_FWDH = 500,
0162       GG2HLL_PTV_0_75 = 501,
0163       GG2HLL_PTV_75_150 = 502,
0164       GG2HLL_PTV_150_250_0J = 503,
0165       GG2HLL_PTV_150_250_GE1J = 504,
0166       GG2HLL_PTV_GT250 = 505,
0167       // ttH
0168       TTH_FWDH = 600,
0169       TTH = 601,
0170       // bbH
0171       BBH_FWDH = 700,
0172       BBH = 701,
0173       // tH
0174       TH_FWDH = 800,
0175       TH = 801
0176     };
0177   }  // namespace Stage1_1
0178 
0179   namespace Stage1_1_Fine {
0180     enum Category {
0181       UNKNOWN = 0,
0182       // Gluon fusion
0183       GG2H_FWDH = 100,
0184       GG2H_PTH_GT200 = 101,
0185       GG2H_0J_PTH_0_10 = 102,
0186       GG2H_0J_PTH_GT10 = 103,
0187       GG2H_1J_PTH_0_60 = 104,
0188       GG2H_1J_PTH_60_120 = 105,
0189       GG2H_1J_PTH_120_200 = 106,
0190       GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25 = 107,
0191       GG2H_GE2J_MJJ_0_350_PTH_60_120_PTHJJ_0_25 = 108,
0192       GG2H_GE2J_MJJ_0_350_PTH_120_200_PTHJJ_0_25 = 109,
0193       GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25 = 110,
0194       GG2H_GE2J_MJJ_0_350_PTH_60_120_PTHJJ_GT25 = 111,
0195       GG2H_GE2J_MJJ_0_350_PTH_120_200_PTHJJ_GT25 = 112,
0196       GG2H_MJJ_350_700_PTHJJ_0_25 = 113,
0197       GG2H_MJJ_350_700_PTHJJ_GT25 = 114,
0198       GG2H_MJJ_700_1000_PTHJJ_0_25 = 115,
0199       GG2H_MJJ_700_1000_PTHJJ_GT25 = 116,
0200       GG2H_MJJ_1000_1500_PTHJJ_0_25 = 117,
0201       GG2H_MJJ_1000_1500_PTHJJ_GT25 = 118,
0202       GG2H_MJJ_GT1500_PTHJJ_0_25 = 119,
0203       GG2H_MJJ_GT1500_PTHJJ_GT25 = 120,
0204       // "VBF"
0205       QQ2HQQ_FWDH = 200,
0206       QQ2HQQ_0J = 201,
0207       QQ2HQQ_1J = 202,
0208       QQ2HQQ_MJJ_0_60_PTHJJ_0_25 = 203,
0209       QQ2HQQ_MJJ_60_120_PTHJJ_0_25 = 204,
0210       QQ2HQQ_MJJ_120_350_PTHJJ_0_25 = 205,
0211       QQ2HQQ_MJJ_0_60_PTHJJ_GT25 = 206,
0212       QQ2HQQ_MJJ_60_120_PTHJJ_GT25 = 207,
0213       QQ2HQQ_MJJ_120_350_PTHJJ_GT25 = 208,
0214       QQ2HQQ_MJJ_350_700_PTHJJ_0_25 = 209,
0215       QQ2HQQ_MJJ_350_700_PTHJJ_GT25 = 210,
0216       QQ2HQQ_MJJ_700_1000_PTHJJ_0_25 = 211,
0217       QQ2HQQ_MJJ_700_1000_PTHJJ_GT25 = 212,
0218       QQ2HQQ_MJJ_1000_1500_PTHJJ_0_25 = 213,
0219       QQ2HQQ_MJJ_1000_1500_PTHJJ_GT25 = 214,
0220       QQ2HQQ_MJJ_GT1500_PTHJJ_0_25 = 215,
0221       QQ2HQQ_MJJ_GT1500_PTHJJ_GT25 = 216,
0222       QQ2HQQ_PTH_GT200_MJJ_350_700_PTHJJ_0_25 = 217,
0223       QQ2HQQ_PTH_GT200_MJJ_350_700_PTHJJ_GT25 = 218,
0224       QQ2HQQ_PTH_GT200_MJJ_700_1000_PTHJJ_0_25 = 219,
0225       QQ2HQQ_PTH_GT200_MJJ_700_1000_PTHJJ_GT25 = 220,
0226       QQ2HQQ_PTH_GT200_MJJ_1000_1500_PTHJJ_0_25 = 221,
0227       QQ2HQQ_PTH_GT200_MJJ_1000_1500_PTHJJ_GT25 = 222,
0228       QQ2HQQ_PTH_GT200_MJJ_GT1500_PTHJJ_0_25 = 223,
0229       QQ2HQQ_PTH_GT200_MJJ_GT1500_PTHJJ_GT25 = 224,
0230       // qq -> WH
0231       QQ2HLNU_FWDH = 300,
0232       QQ2HLNU_PTV_0_75_0J = 301,
0233       QQ2HLNU_PTV_75_150_0J = 302,
0234       QQ2HLNU_PTV_150_250_0J = 303,
0235       QQ2HLNU_PTV_250_400_0J = 304,
0236       QQ2HLNU_PTV_GT400_0J = 305,
0237       QQ2HLNU_PTV_0_75_1J = 306,
0238       QQ2HLNU_PTV_75_150_1J = 307,
0239       QQ2HLNU_PTV_150_250_1J = 308,
0240       QQ2HLNU_PTV_250_400_1J = 309,
0241       QQ2HLNU_PTV_GT400_1J = 310,
0242       QQ2HLNU_PTV_0_75_GE2J = 311,
0243       QQ2HLNU_PTV_75_150_GE2J = 312,
0244       QQ2HLNU_PTV_150_250_GE2J = 313,
0245       QQ2HLNU_PTV_250_400_GE2J = 314,
0246       QQ2HLNU_PTV_GT400_GE2J = 315,
0247       // qq -> ZH
0248       QQ2HLL_FWDH = 400,
0249       QQ2HLL_PTV_0_75_0J = 401,
0250       QQ2HLL_PTV_75_150_0J = 402,
0251       QQ2HLL_PTV_150_250_0J = 403,
0252       QQ2HLL_PTV_250_400_0J = 404,
0253       QQ2HLL_PTV_GT400_0J = 405,
0254       QQ2HLL_PTV_0_75_1J = 406,
0255       QQ2HLL_PTV_75_150_1J = 407,
0256       QQ2HLL_PTV_150_250_1J = 408,
0257       QQ2HLL_PTV_250_400_1J = 409,
0258       QQ2HLL_PTV_GT400_1J = 410,
0259       QQ2HLL_PTV_0_75_GE2J = 411,
0260       QQ2HLL_PTV_75_150_GE2J = 412,
0261       QQ2HLL_PTV_150_250_GE2J = 413,
0262       QQ2HLL_PTV_250_400_GE2J = 414,
0263       QQ2HLL_PTV_GT400_GE2J = 415,
0264       // gg -> ZH
0265       GG2HLL_FWDH = 500,
0266       GG2HLL_PTV_0_75_0J = 501,
0267       GG2HLL_PTV_75_150_0J = 502,
0268       GG2HLL_PTV_150_250_0J = 503,
0269       GG2HLL_PTV_250_400_0J = 504,
0270       GG2HLL_PTV_GT400_0J = 505,
0271       GG2HLL_PTV_0_75_1J = 506,
0272       GG2HLL_PTV_75_150_1J = 507,
0273       GG2HLL_PTV_150_250_1J = 508,
0274       GG2HLL_PTV_250_400_1J = 509,
0275       GG2HLL_PTV_GT400_1J = 510,
0276       GG2HLL_PTV_0_75_GE2J = 511,
0277       GG2HLL_PTV_75_150_GE2J = 512,
0278       GG2HLL_PTV_150_250_GE2J = 513,
0279       GG2HLL_PTV_250_400_GE2J = 514,
0280       GG2HLL_PTV_GT400_GE2J = 515,
0281       // ttH
0282       TTH_FWDH = 600,
0283       TTH = 601,
0284       // bbH
0285       BBH_FWDH = 700,
0286       BBH = 701,
0287       // tH
0288       TH_FWDH = 800,
0289       TH = 801
0290     };
0291   }  // namespace Stage1_1_Fine
0292 
0293   /// Categorization Stage 1.2:
0294   /// Three digit integer of format PF
0295   /// Where P is a digit representing the process
0296   /// F is a unique integer ( F < 99 ) corresponding to each Stage1_2 phase-space region (bin)
0297   namespace Stage1_2 {
0298     enum Category {
0299       UNKNOWN = 0,
0300       // Gluon fusion
0301       GG2H_FWDH = 100,
0302       GG2H_PTH_200_300 = 101,
0303       GG2H_PTH_300_450 = 102,
0304       GG2H_PTH_450_650 = 103,
0305       GG2H_PTH_GT650 = 104,
0306       GG2H_0J_PTH_0_10 = 105,
0307       GG2H_0J_PTH_GT10 = 106,
0308       GG2H_1J_PTH_0_60 = 107,
0309       GG2H_1J_PTH_60_120 = 108,
0310       GG2H_1J_PTH_120_200 = 109,
0311       GG2H_GE2J_MJJ_0_350_PTH_0_60 = 110,
0312       GG2H_GE2J_MJJ_0_350_PTH_60_120 = 111,
0313       GG2H_GE2J_MJJ_0_350_PTH_120_200 = 112,
0314       GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25 = 113,
0315       GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_GT25 = 114,
0316       GG2H_GE2J_MJJ_GT700_PTH_0_200_PTHJJ_0_25 = 115,
0317       GG2H_GE2J_MJJ_GT700_PTH_0_200_PTHJJ_GT25 = 116,
0318       // "VBF"
0319       QQ2HQQ_FWDH = 200,
0320       QQ2HQQ_0J = 201,
0321       QQ2HQQ_1J = 202,
0322       QQ2HQQ_GE2J_MJJ_0_60 = 203,
0323       QQ2HQQ_GE2J_MJJ_60_120 = 204,
0324       QQ2HQQ_GE2J_MJJ_120_350 = 205,
0325       QQ2HQQ_GE2J_MJJ_GT350_PTH_GT200 = 206,
0326       QQ2HQQ_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25 = 207,
0327       QQ2HQQ_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_GT25 = 208,
0328       QQ2HQQ_GE2J_MJJ_GT700_PTH_0_200_PTHJJ_0_25 = 209,
0329       QQ2HQQ_GE2J_MJJ_GT700_PTH_0_200_PTHJJ_GT25 = 210,
0330       // qq -> WH
0331       QQ2HLNU_FWDH = 300,
0332       QQ2HLNU_PTV_0_75 = 301,
0333       QQ2HLNU_PTV_75_150 = 302,
0334       QQ2HLNU_PTV_150_250_0J = 303,
0335       QQ2HLNU_PTV_150_250_GE1J = 304,
0336       QQ2HLNU_PTV_GT250 = 305,
0337       // qq -> ZH
0338       QQ2HLL_FWDH = 400,
0339       QQ2HLL_PTV_0_75 = 401,
0340       QQ2HLL_PTV_75_150 = 402,
0341       QQ2HLL_PTV_150_250_0J = 403,
0342       QQ2HLL_PTV_150_250_GE1J = 404,
0343       QQ2HLL_PTV_GT250 = 405,
0344       // gg -> ZH
0345       GG2HLL_FWDH = 500,
0346       GG2HLL_PTV_0_75 = 501,
0347       GG2HLL_PTV_75_150 = 502,
0348       GG2HLL_PTV_150_250_0J = 503,
0349       GG2HLL_PTV_150_250_GE1J = 504,
0350       GG2HLL_PTV_GT250 = 505,
0351       // ttH
0352       TTH_FWDH = 600,
0353       TTH_PTH_0_60 = 601,
0354       TTH_PTH_60_120 = 602,
0355       TTH_PTH_120_200 = 603,
0356       TTH_PTH_200_300 = 604,
0357       TTH_PTH_GT300 = 605,
0358       // bbH
0359       BBH_FWDH = 700,
0360       BBH = 701,
0361       // tH
0362       TH_FWDH = 800,
0363       TH = 801
0364     };
0365   }  // namespace Stage1_2
0366 
0367   namespace Stage1_2_Fine {
0368     enum Category {
0369       UNKNOWN = 0,
0370       // Gluon fusion
0371       GG2H_FWDH = 100,
0372       GG2H_PTH_200_300_PTHJoverPTH_0_15 = 101,
0373       GG2H_PTH_300_450_PTHJoverPTH_0_15 = 102,
0374       GG2H_PTH_450_650_PTHJoverPTH_0_15 = 103,
0375       GG2H_PTH_GT650_PTHJoverPTH_0_15 = 104,
0376       GG2H_PTH_200_300_PTHJoverPTH_GT15 = 105,
0377       GG2H_PTH_300_450_PTHJoverPTH_GT15 = 106,
0378       GG2H_PTH_450_650_PTHJoverPTH_GT15 = 107,
0379       GG2H_PTH_GT650_PTHJoverPTH_GT15 = 108,
0380       GG2H_0J_PTH_0_10 = 109,
0381       GG2H_0J_PTH_GT10 = 110,
0382       GG2H_1J_PTH_0_60 = 111,
0383       GG2H_1J_PTH_60_120 = 112,
0384       GG2H_1J_PTH_120_200 = 113,
0385       GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25 = 114,
0386       GG2H_GE2J_MJJ_0_350_PTH_60_120_PTHJJ_0_25 = 115,
0387       GG2H_GE2J_MJJ_0_350_PTH_120_200_PTHJJ_0_25 = 116,
0388       GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25 = 117,
0389       GG2H_GE2J_MJJ_0_350_PTH_60_120_PTHJJ_GT25 = 118,
0390       GG2H_GE2J_MJJ_0_350_PTH_120_200_PTHJJ_GT25 = 119,
0391       GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25 = 120,
0392       GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_GT25 = 121,
0393       GG2H_GE2J_MJJ_700_1000_PTH_0_200_PTHJJ_0_25 = 122,
0394       GG2H_GE2J_MJJ_700_1000_PTH_0_200_PTHJJ_GT25 = 123,
0395       GG2H_GE2J_MJJ_1000_1500_PTH_0_200_PTHJJ_0_25 = 124,
0396       GG2H_GE2J_MJJ_1000_1500_PTH_0_200_PTHJJ_GT25 = 125,
0397       GG2H_GE2J_MJJ_GT1500_PTH_0_200_PTHJJ_0_25 = 126,
0398       GG2H_GE2J_MJJ_GT1500_PTH_0_200_PTHJJ_GT25 = 127,
0399       // "VBF"
0400       QQ2HQQ_FWDH = 200,
0401       QQ2HQQ_0J = 201,
0402       QQ2HQQ_1J = 202,
0403       QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_0_25 = 203,
0404       QQ2HQQ_GE2J_MJJ_60_120_PTHJJ_0_25 = 204,
0405       QQ2HQQ_GE2J_MJJ_120_350_PTHJJ_0_25 = 205,
0406       QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_GT25 = 206,
0407       QQ2HQQ_GE2J_MJJ_60_120_PTHJJ_GT25 = 207,
0408       QQ2HQQ_GE2J_MJJ_120_350_PTHJJ_GT25 = 208,
0409       QQ2HQQ_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25 = 209,
0410       QQ2HQQ_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_GT25 = 210,
0411       QQ2HQQ_GE2J_MJJ_700_1000_PTH_0_200_PTHJJ_0_25 = 211,
0412       QQ2HQQ_GE2J_MJJ_700_1000_PTH_0_200_PTHJJ_GT25 = 212,
0413       QQ2HQQ_GE2J_MJJ_1000_1500_PTH_0_200_PTHJJ_0_25 = 213,
0414       QQ2HQQ_GE2J_MJJ_1000_1500_PTH_0_200_PTHJJ_GT25 = 214,
0415       QQ2HQQ_GE2J_MJJ_GT1500_PTH_0_200_PTHJJ_0_25 = 215,
0416       QQ2HQQ_GE2J_MJJ_GT1500_PTH_0_200_PTHJJ_GT25 = 216,
0417       QQ2HQQ_GE2J_MJJ_350_700_PTH_GT200_PTHJJ_0_25 = 217,
0418       QQ2HQQ_GE2J_MJJ_350_700_PTH_GT200_PTHJJ_GT25 = 218,
0419       QQ2HQQ_GE2J_MJJ_700_1000_PTH_GT200_PTHJJ_0_25 = 219,
0420       QQ2HQQ_GE2J_MJJ_700_1000_PTH_GT200_PTHJJ_GT25 = 220,
0421       QQ2HQQ_GE2J_MJJ_1000_1500_PTH_GT200_PTHJJ_0_25 = 221,
0422       QQ2HQQ_GE2J_MJJ_1000_1500_PTH_GT200_PTHJJ_GT25 = 222,
0423       QQ2HQQ_GE2J_MJJ_GT1500_PTH_GT200_PTHJJ_0_25 = 223,
0424       QQ2HQQ_GE2J_MJJ_GT1500_PTH_GT200_PTHJJ_GT25 = 224,
0425       // qq -> WH
0426       QQ2HLNU_FWDH = 300,
0427       QQ2HLNU_PTV_0_75_0J = 301,
0428       QQ2HLNU_PTV_75_150_0J = 302,
0429       QQ2HLNU_PTV_150_250_0J = 303,
0430       QQ2HLNU_PTV_250_400_0J = 304,
0431       QQ2HLNU_PTV_GT400_0J = 305,
0432       QQ2HLNU_PTV_0_75_1J = 306,
0433       QQ2HLNU_PTV_75_150_1J = 307,
0434       QQ2HLNU_PTV_150_250_1J = 308,
0435       QQ2HLNU_PTV_250_400_1J = 309,
0436       QQ2HLNU_PTV_GT400_1J = 310,
0437       QQ2HLNU_PTV_0_75_GE2J = 311,
0438       QQ2HLNU_PTV_75_150_GE2J = 312,
0439       QQ2HLNU_PTV_150_250_GE2J = 313,
0440       QQ2HLNU_PTV_250_400_GE2J = 314,
0441       QQ2HLNU_PTV_GT400_GE2J = 315,
0442       // qq -> ZH
0443       QQ2HLL_FWDH = 400,
0444       QQ2HLL_PTV_0_75_0J = 401,
0445       QQ2HLL_PTV_75_150_0J = 402,
0446       QQ2HLL_PTV_150_250_0J = 403,
0447       QQ2HLL_PTV_250_400_0J = 404,
0448       QQ2HLL_PTV_GT400_0J = 405,
0449       QQ2HLL_PTV_0_75_1J = 406,
0450       QQ2HLL_PTV_75_150_1J = 407,
0451       QQ2HLL_PTV_150_250_1J = 408,
0452       QQ2HLL_PTV_250_400_1J = 409,
0453       QQ2HLL_PTV_GT400_1J = 410,
0454       QQ2HLL_PTV_0_75_GE2J = 411,
0455       QQ2HLL_PTV_75_150_GE2J = 412,
0456       QQ2HLL_PTV_150_250_GE2J = 413,
0457       QQ2HLL_PTV_250_400_GE2J = 414,
0458       QQ2HLL_PTV_GT400_GE2J = 415,
0459       // gg -> ZH
0460       GG2HLL_FWDH = 500,
0461       GG2HLL_PTV_0_75_0J = 501,
0462       GG2HLL_PTV_75_150_0J = 502,
0463       GG2HLL_PTV_150_250_0J = 503,
0464       GG2HLL_PTV_250_400_0J = 504,
0465       GG2HLL_PTV_GT400_0J = 505,
0466       GG2HLL_PTV_0_75_1J = 506,
0467       GG2HLL_PTV_75_150_1J = 507,
0468       GG2HLL_PTV_150_250_1J = 508,
0469       GG2HLL_PTV_250_400_1J = 509,
0470       GG2HLL_PTV_GT400_1J = 510,
0471       GG2HLL_PTV_0_75_GE2J = 511,
0472       GG2HLL_PTV_75_150_GE2J = 512,
0473       GG2HLL_PTV_150_250_GE2J = 513,
0474       GG2HLL_PTV_250_400_GE2J = 514,
0475       GG2HLL_PTV_GT400_GE2J = 515,
0476       // ttH
0477       TTH_FWDH = 600,
0478       TTH_PTH_0_60 = 601,
0479       TTH_PTH_60_120 = 602,
0480       TTH_PTH_120_200 = 603,
0481       TTH_PTH_200_300 = 604,
0482       TTH_PTH_300_450 = 605,
0483       TTH_PTH_GT450 = 606,
0484       // bbH
0485       BBH_FWDH = 700,
0486       BBH = 701,
0487       // tH
0488       TH_FWDH = 800,
0489       TH = 801
0490     };
0491   }  // namespace Stage1_2_Fine
0492 
0493   //#ifdef ROOT_TLorentzVector
0494   //typedef TLorentzVector TLV;
0495   typedef math::XYZTLorentzVectorD TLV;
0496   typedef std::vector<TLV> TLVs;
0497 
0498   template <class vec4>
0499   TLV MakeTLV(vec4 const p) {
0500     return TLV(p.px(), p.py(), p.pz(), p.E());
0501   }
0502 
0503   template <class Vvec4>
0504   inline TLVs MakeTLVs(Vvec4 const &rivet_jets) {
0505     TLVs jets;
0506     for (const auto &jet : rivet_jets)
0507       jets.push_back(MakeTLV(jet));
0508     return jets;
0509   }
0510 
0511   // Structure holding information about the current event:
0512   // Four-momenta and event classification according to the
0513   // Higgs Template Cross Section
0514   struct HiggsClassification {
0515     // Higgs production mode
0516     HTXS::HiggsProdMode prodMode;
0517     // The Higgs boson
0518     TLV higgs;
0519     // The Higgs boson decay products
0520     TLV p4decay_higgs;
0521     // Associated vector bosons
0522     TLV V;
0523     // The V-boson decay products
0524     TLV p4decay_V;
0525     // Jets are built ignoring Higgs decay products and leptons from V decays
0526     // jets with pT > 25 GeV and 30 GeV
0527     TLVs jets25, jets30;
0528     // Event categorization according to YR4 wrtietup
0529     // https://cds.cern.ch/record/2138079
0530     HTXS::Stage0::Category stage0_cat;
0531     HTXS::Stage1::Category stage1_cat_pTjet25GeV;
0532     HTXS::Stage1::Category stage1_cat_pTjet30GeV;
0533     HTXS::Stage1_1::Category stage1_1_cat_pTjet25GeV;
0534     HTXS::Stage1_1::Category stage1_1_cat_pTjet30GeV;
0535     HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet25GeV;
0536     HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet30GeV;
0537     HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
0538     HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
0539     HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
0540     HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
0541     // Flag for Z->vv decay mode (needed to split QQ2ZH and GG2ZH)
0542     bool isZ2vvDecay = false;
0543     // Error code :: classification was succesful or some error occured
0544     HTXS::ErrorCode errorCode;
0545   };
0546 
0547   template <class category>
0548   inline HTXS::HiggsClassification Rivet2Root(category const &htxs_cat_rivet) {
0549     HTXS::HiggsClassification cat;
0550     cat.prodMode = htxs_cat_rivet.prodMode;
0551     cat.errorCode = htxs_cat_rivet.errorCode;
0552     cat.higgs = MakeTLV(htxs_cat_rivet.higgs);
0553     cat.V = MakeTLV(htxs_cat_rivet.V);
0554     cat.p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
0555     cat.p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
0556     cat.jets25 = MakeTLVs(htxs_cat_rivet.jets25);
0557     cat.jets30 = MakeTLVs(htxs_cat_rivet.jets30);
0558     cat.stage0_cat = htxs_cat_rivet.stage0_cat;
0559     cat.stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
0560     cat.stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
0561     cat.stage1_1_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_cat_pTjet25GeV;
0562     cat.stage1_1_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_cat_pTjet30GeV;
0563     cat.stage1_1_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet25GeV;
0564     cat.stage1_1_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet30GeV;
0565     cat.stage1_2_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_cat_pTjet25GeV;
0566     cat.stage1_2_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_cat_pTjet30GeV;
0567     cat.stage1_2_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet25GeV;
0568     cat.stage1_2_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet30GeV;
0569     cat.isZ2vvDecay = htxs_cat_rivet.isZ2vvDecay;
0570     return cat;
0571   }
0572 
0573   inline int HTXSstage1_to_HTXSstage1FineIndex(HTXS::Stage1::Category stage1, HiggsProdMode prodMode, tH_type tH) {
0574     if (stage1 == HTXS::Stage1::Category::UNKNOWN)
0575       return 0;
0576     int P = (int)(stage1 / 100);
0577     int F = (int)(stage1 % 100);
0578     // 1.a spit tH categories
0579     if (prodMode == HiggsProdMode::TH) {
0580       // check that tH splitting is valid for Stage-1 FineIndex
0581       // else return unknown category
0582       if (tH == tH_type::noTH)
0583         return 0;
0584       // check if forward tH
0585       int fwdH = F == 0 ? 0 : 1;
0586       return (49 + 2 * (tH - 1) + fwdH);
0587     }
0588     // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
0589     // offset vector 1: input is the Higgs prodMode
0590     // first two indicies are dummies, given that this is only called for prodMode=2,3,4
0591     std::vector<int> pMode_offset = {0, 0, 13, 19, 25};
0592     if (P == 2)
0593       return (F + pMode_offset[prodMode]);
0594     // 1.c remaining categories
0595     // offset vector 2: input is the Stage-1 category P
0596     // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
0597     std::vector<int> catP_offset = {0, 1, 0, 31, 36, 41, 45, 47};
0598     return (F + catP_offset[P]);
0599   }
0600 
0601   inline int HTXSstage1_to_HTXSstage1FineIndex(const HiggsClassification &stxs,
0602                                                tH_type tH = noTH,
0603                                                bool jets_pT25 = false) {
0604     HTXS::Stage1::Category stage1 = jets_pT25 == false ? stxs.stage1_cat_pTjet30GeV : stxs.stage1_cat_pTjet25GeV;
0605     return HTXSstage1_to_HTXSstage1FineIndex(stage1, stxs.prodMode, tH);
0606   }
0607 
0608   inline int HTXSstage1_to_index(HTXS::Stage1::Category stage1) {
0609     // the Stage-1 categories
0610     int P = (int)(stage1 / 100);
0611     int F = (int)(stage1 % 100);
0612     std::vector<int> offset{0, 1, 13, 19, 24, 29, 33, 35, 37, 39};
0613     // convert to linear values
0614     return (F + offset[P]);
0615   }
0616 
0617   inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(HTXS::Stage1_2::Category stage1_2,
0618                                                     HiggsProdMode prodMode,
0619                                                     tH_type tH) {
0620     if (stage1_2 == HTXS::Stage1_2::Category::UNKNOWN)
0621       return 0;
0622     int P = (int)(stage1_2 / 100);
0623     int F = (int)(stage1_2 % 100);
0624     // 1.a spit tH categories
0625     if (prodMode == HiggsProdMode::TH) {
0626       // check that tH splitting is valid for Stage-1 FineIndex
0627       // else return unknown category
0628       if (tH == tH_type::noTH)
0629         return 0;
0630       // check if forward tH
0631       int fwdH = F == 0 ? 0 : 1;
0632       return (94 + 2 * (tH - 1) + fwdH);
0633     }
0634     // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
0635     // offset vector 1: input is the Higgs prodMode
0636     // first two indicies are dummies, given that this is only called for prodMode=2,3,4
0637     std::vector<int> pMode_offset = {0, 0, 35, 46, 57};
0638     if (P == 2)
0639       return (F + pMode_offset[prodMode]);
0640     // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
0641     if (prodMode == HiggsProdMode::GG2ZH && P == 1)
0642       return F + 18;
0643     // 1.d remaining categories
0644     // offset vector 2: input is the Stage-1 category P
0645     // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
0646     std::vector<int> catP_offset = {0, 1, 0, 68, 74, 80, 86, 92};
0647     return (F + catP_offset[P]);
0648   }
0649 
0650   inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(const HiggsClassification &stxs,
0651                                                     tH_type tH = noTH,
0652                                                     bool jets_pT25 = false) {
0653     HTXS::Stage1_2::Category stage1_2 =
0654         jets_pT25 == false ? stxs.stage1_2_cat_pTjet30GeV : stxs.stage1_2_cat_pTjet25GeV;
0655     return HTXSstage1_2_to_HTXSstage1_2_FineIndex(stage1_2, stxs.prodMode, tH);
0656   }
0657 
0658   inline int HTXSstage1_2_to_index(HTXS::Stage1_2::Category stage1_2) {
0659     // the Stage-1 categories
0660     int P = (int)(stage1_2 / 100);
0661     int F = (int)(stage1_2 % 100);
0662     //std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
0663     std::vector<int> offset{0, 1, 18, 29, 35, 41, 47, 53, 55, 57};
0664     // convert to linear values
0665     return (F + offset[P]);
0666   }
0667 
0668   //Same for Stage1_2_Fine categories
0669   inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(HTXS::Stage1_2_Fine::Category Stage1_2_Fine,
0670                                                               HiggsProdMode prodMode,
0671                                                               tH_type tH) {
0672     if (Stage1_2_Fine == HTXS::Stage1_2_Fine::Category::UNKNOWN)
0673       return 0;
0674     int P = (int)(Stage1_2_Fine / 100);
0675     int F = (int)(Stage1_2_Fine % 100);
0676     // 1.a spit tH categories
0677     if (prodMode == HiggsProdMode::TH) {
0678       // check that tH splitting is valid for Stage-1 FineIndex
0679       // else return unknown category
0680       if (tH == tH_type::noTH)
0681         return 0;
0682       // check if forward tH
0683       int fwdH = F == 0 ? 0 : 1;
0684       return (189 + 2 * (tH - 1) + fwdH);
0685     }
0686     // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
0687     // offset vector 1: input is the Higgs prodMode
0688     // first two indicies are dummies, given that this is only called for prodMode=2,3,4
0689     std::vector<int> pMode_offset = {0, 0, 57, 82, 107};
0690     if (P == 2)
0691       return (F + pMode_offset[prodMode]);
0692     // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
0693     if (prodMode == HiggsProdMode::GG2ZH && P == 1)
0694       return F + 29;
0695     // 1.d remaining categories
0696     // offset vector 2: input is the Stage-1 category P
0697     // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
0698     std::vector<int> catP_offset = {0, 1, 0, 132, 148, 164, 180, 187};
0699     return (F + catP_offset[P]);
0700   }
0701 
0702   inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(const HiggsClassification &stxs,
0703                                                               tH_type tH = noTH,
0704                                                               bool jets_pT25 = false) {
0705     HTXS::Stage1_2_Fine::Category Stage1_2_Fine =
0706         jets_pT25 == false ? stxs.stage1_2_fine_cat_pTjet30GeV : stxs.stage1_2_fine_cat_pTjet25GeV;
0707     return HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(Stage1_2_Fine, stxs.prodMode, tH);
0708   }
0709 
0710   inline int HTXSstage1_2_Fine_to_index(HTXS::Stage1_2_Fine::Category Stage1_2_Fine) {
0711     // the Stage-1_2_Fine categories
0712     int P = (int)(Stage1_2_Fine / 100);
0713     int F = (int)(Stage1_2_Fine % 100);
0714     std::vector<int> offset{0, 1, 29, 54, 70, 86, 102, 109, 111, 113};
0715     // convert to linear values
0716     return (F + offset[P]);
0717   }
0718 
0719   // #endif
0720 
0721 }  // namespace HTXS
0722 
0723 #ifdef RIVET_Particle_HH
0724 //#ifdef HIGGSTRUTHCLASSIFIER_HIGGSTRUTHCLASSIFIER_CC
0725 //#include "Rivet/Particle.hh"
0726 namespace Rivet {
0727 
0728   /// @struct HiggsClassification
0729   /// @brief Structure holding information about the current event:
0730   ///        Four-momenta and event classification according to the
0731   ///        Higgs Template Cross Section
0732   struct HiggsClassification {
0733     /// Higgs production mode
0734     HTXS::HiggsProdMode prodMode;
0735     /// The Higgs boson
0736     Rivet::Particle higgs;
0737     /// Vector boson produced in asscoiation with the Higgs
0738     Rivet::Particle V;
0739     /// The four momentum sum of all stable decay products orignating from the Higgs boson
0740     Rivet::FourMomentum p4decay_higgs;
0741     /// The four momentum sum of all stable decay products orignating from the vector boson in associated production
0742     Rivet::FourMomentum p4decay_V;
0743     /// Jets built ignoring Higgs decay products and leptons from V decays, pT thresholds at 25 GeV and 30 GeV
0744     Rivet::Jets jets25, jets30;
0745     /// Stage-0 HTXS event classifcation, see: https://cds.cern.ch/record/2138079
0746     HTXS::Stage0::Category stage0_cat;
0747     /// Stage-1 HTXS event classifcation, see: https://cds.cern.ch/record/2138079
0748     HTXS::Stage1::Category stage1_cat_pTjet25GeV;
0749     /// Stage-1 HTXS event classifcation, see: https://cds.cern.ch/record/2138079
0750     HTXS::Stage1::Category stage1_cat_pTjet30GeV;
0751     /// Error code: Whether classification was succesful or some error occured
0752     HTXS::Stage1_1::Category stage1_1_cat_pTjet25GeV;
0753     /// Stage-1 STXS event classifcation, see: https://cds.cern.ch/record/2138079
0754     HTXS::Stage1_1::Category stage1_1_cat_pTjet30GeV;
0755     /// Stage-1_1 STXS event classifcation, see: https://twiki.cern.ch/twiki/bin/view/LHCPhysics/LHCHXSWGFiducialAndSTXS#Stage_1_1
0756     HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet25GeV;
0757     /// Stage-1_1 STXS event classifcation, see: https://twiki.cern.ch/twiki/bin/view/LHCPhysics/LHCHXSWGFiducialAndSTXS#Stage_1_1
0758     HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet30GeV;
0759     /// Stage-1 STXS event classifcation, see: https://cds.cern.ch/record/2138079
0760     HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV;
0761     /// Stage-1 STXS event classifcation, see: https://cds.cern.ch/record/2138079
0762     HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV;
0763     /// Stage-1_2 STXS event classifcation, see: https://twiki.cern.ch/twiki/bin/view/LHCPhysics/LHCHXSWGFiducialAndSTXS#Stage_1_1
0764     HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV;
0765     /// Stage-1_2 STXS event classifcation, see: https://twiki.cern.ch/twiki/bin/view/LHCPhysics/LHCHXSWGFiducialAndSTXS#Stage_1_1
0766     HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV;
0767     /// Flag to distiguish the Z->vv and Z->l+l- decay modes
0768     bool isZ2vvDecay = false;
0769     /// Error code: Whether classification was succesful or some error occured
0770     HTXS::ErrorCode errorCode;
0771   };
0772 }  // namespace Rivet
0773 #endif
0774 
0775 #endif