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 
93 //#ifdef ROOT_TLorentzVector
94  //typedef TLorentzVector TLV;
96  typedef std::vector<TLV> TLVs;
97 
98  template <class vec4>
99  TLV MakeTLV(vec4 const p) { return TLV(p.px(),p.py(),p.pz(),p.E()); }
100 
101  template <class Vvec4>
102  inline TLVs MakeTLVs(Vvec4 const &rivet_jets){
103  TLVs jets; for ( auto jet:rivet_jets ) jets.push_back(MakeTLV(jet));
104  return jets;
105  }
106 
107  // Structure holding information about the current event:
108  // Four-momenta and event classification according to the
109  // Higgs Template Cross Section
111  // Higgs production mode
113  // The Higgs boson
114  TLV higgs;
115  // The Higgs boson decay products
117  // Associated vector bosons
118  TLV V;
119  // The V-boson decay products
121  // Jets are built ignoring Higgs decay products and leptons from V decays
122  // jets with pT > 25 GeV and 30 GeV
123  TLVs jets25, jets30;
124  // Event categorization according to YR4 wrtietup
125  // https://cds.cern.ch/record/2138079
129  // Error code :: classification was succesful or some error occured
131  };
132 
133  template <class category>
134  inline HTXS::HiggsClassification Rivet2Root(category const &htxs_cat_rivet){
136  cat.prodMode = htxs_cat_rivet.prodMode;
137  cat.errorCode = htxs_cat_rivet.errorCode;
138  cat.higgs = MakeTLV(htxs_cat_rivet.higgs);
139  cat.V = MakeTLV(htxs_cat_rivet.V);
140  cat.p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
141  cat.p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
142  cat.jets25 = MakeTLVs(htxs_cat_rivet.jets25);
143  cat.jets30 = MakeTLVs(htxs_cat_rivet.jets30);
144  cat.stage0_cat = htxs_cat_rivet.stage0_cat;
145  cat.stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
146  cat.stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
147  return cat;
148  }
149 
150 
151 
153  HiggsProdMode prodMode, tH_type tH) {
154 
155  if(stage1==HTXS::Stage1::Category::UNKNOWN) return 0;
156  int P = (int)(stage1 / 100);
157  int F = (int)(stage1 % 100);
158  // 1.a spit tH categories
159  if (prodMode==HiggsProdMode::TH) {
160  // check that tH splitting is valid for Stage-1 FineIndex
161  // else return unknown category
162  if(tH==tH_type::noTH) return 0;
163  // check if forward tH
164  int fwdH = F==0?0:1;
165  return (49 + 2*(tH-1) +fwdH);
166  }
167  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
168  // offset vector 1: input is the Higgs prodMode
169  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
170  std::vector<int> pMode_offset = {0,0,13,19,25};
171  if (P==2) return (F + pMode_offset[prodMode]);
172  // 1.c remaining categories
173  // offset vector 2: input is the Stage-1 category P
174  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
175  std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
176  return (F + catP_offset[P]);
177  }
178 
180  tH_type tH=noTH, bool jets_pT25 = false) {
181  HTXS::Stage1::Category stage1 =
182  jets_pT25==false?stxs.stage1_cat_pTjet30GeV:
184  return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
185  }
186 
188  // the Stage-1 categories
189  int P = (int)(stage1 / 100);
190  int F = (int)(stage1 % 100);
191  std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
192  // convert to linear values
193  return ( F + offset[P] );
194  }
195 
196 
197 // #endif
198 
199 } // namespace HTXS
200 
201 
202 #ifdef RIVET_Particle_HH
203 //#ifdef HIGGSTRUTHCLASSIFIER_HIGGSTRUTHCLASSIFIER_CC
204 //#include "Rivet/Particle.hh"
205 namespace Rivet {
206 
211  struct HiggsClassification {
213  HTXS::HiggsProdMode prodMode;
215  Rivet::Particle higgs;
217  Rivet::Particle V;
219  Rivet::FourMomentum p4decay_higgs;
221  Rivet::FourMomentum p4decay_V;
223  Rivet::Jets jets25, jets30;
225  HTXS::Stage0::Category stage0_cat;
227  HTXS::Stage1::Category stage1_cat_pTjet25GeV;
229  HTXS::Stage1::Category stage1_cat_pTjet30GeV;
231  HTXS::ErrorCode errorCode;
232  };
233 } // namespace Rivet
234 #endif
235 
236 
237 
238 #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.
Definition: VBF.py:1
def cat(path)
Definition: eostools.py:400
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
failed to identify Higgs boson
failed to identify hard scatter vertex
std::pair< OmniClusterRef, TrackingParticleRef > P
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