5 #ifndef TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H
6 #define TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H 1
166 namespace Stage1_2_Fine {
291 #ifdef ROOT_TLorentzVector
293 typedef TLorentzVector TLV;
294 typedef std::vector<TLV> TLVs;
296 template <
class vec4>
297 TLV MakeTLV(vec4
const &
p) {
return TLV(
p.px(),
p.py(),
p.pz(),
p.E()); }
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));
308 struct HiggsClassification {
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;
365 int P = (
int)(stage1 / 100);
366 int F = (
int)(stage1 % 100);
374 return (49 + 2*(tH-1) +fwdH);
379 std::vector<int> pMode_offset = {0,0,13,19,25};
380 if (
P==2)
return (F + pMode_offset[prodMode]);
384 std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
385 return (F + catP_offset[
P]);
388 inline int HTXSstage1_to_HTXSstage1FineIndex(
const HiggsClassification &stxs,
391 jets_pT25==
false?stxs.stage1_cat_pTjet30GeV:
392 stxs.stage1_cat_pTjet25GeV;
393 return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
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};
410 int P = (
int)(stage1_2 / 100);
411 int F = (
int)(stage1_2 % 100);
419 return (94 + 2*(tH-1) +fwdH);
424 std::vector<int> pMode_offset = {0,0,35,46,57};
425 if (
P==2)
return (F + pMode_offset[prodMode]);
431 std::vector<int> catP_offset = {0,1,0,68,74,80,86,92};
432 return (F + catP_offset[
P]);
435 inline int HTXSstage1_2_to_HTXSstage1_2_FineIndex(
const HiggsClassification &stxs,
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);
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};
457 int P = (
int)(Stage1_2_Fine / 100);
458 int F = (
int)(Stage1_2_Fine % 100);
466 return (189 + 2*(tH-1) +fwdH);
471 std::vector<int> pMode_offset = {0,0,57,82,107};
472 if (
P==2)
return (F + pMode_offset[prodMode]);
478 std::vector<int> catP_offset = {0,1,0,132,148,164,180,187};
479 return (F + catP_offset[
P]);
482 inline int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(
const HiggsClassification &stxs,
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);
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};
500 #endif // ROOT_TLorentzVector
505 #ifdef RIVET_Particle_HH
513 struct HiggsClassification {
521 Rivet::FourMomentum p4decay_higgs;
523 Rivet::FourMomentum p4decay_V;
525 Rivet::Jets jets25, jets30;
541 bool isZ2vvDecay=
false;
546 #endif // RIVET_Particle_HH
550 #endif // TRUTHRIVETTOOLS_HIGGSTEMPLATECROSSSECTIONSDEFS_H