CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions
HTXS Namespace Reference

Higgs Template Cross Section namespace. More...

Namespaces

 Stage0
 Namespace for Stage0 categorization.
 
 Stage1
 
 Stage1_1
 
 Stage1_1_Fine
 
 Stage1_2
 
 Stage1_2_Fine
 

Classes

struct  HiggsClassification
 

Typedefs

typedef math::XYZTLorentzVectorD TLV
 
typedef std::vector< TLVTLVs
 

Enumerations

enum  ErrorCode {
  UNDEFINED = -99, SUCCESS = 0, PRODMODE_DEFINED = 1, MOMENTUM_CONSERVATION = 2,
  HIGGS_IDENTIFICATION = 3, HIGGS_DECAY_IDENTIFICATION = 4, HS_VTX_IDENTIFICATION = 5, VH_IDENTIFICATION = 6,
  VH_DECAY_IDENTIFICATION = 7, TOP_W_IDENTIFICATION = 8
}
 Error code: whether the classification was successful or failed. More...
 
enum  HiggsProdMode {
  UNKNOWN = 0, GGF = 1, VBF = 2, WH = 3,
  QQ2ZH = 4, GG2ZH = 5, TTH = 6, BBH = 7,
  TH = 8
}
 Higgs production modes, corresponding to input sample. More...
 
enum  tH_type { noTH = 0, THQB = 1, TWH = 2 }
 Additional identifier flag for TH production modes. More...
 

Functions

int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex (HTXS::Stage1_2_Fine::Category Stage1_2_Fine, HiggsProdMode prodMode, tH_type tH)
 
int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex (const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
 
int HTXSstage1_2_Fine_to_index (HTXS::Stage1_2_Fine::Category Stage1_2_Fine)
 
int HTXSstage1_2_to_HTXSstage1_2_FineIndex (HTXS::Stage1_2::Category stage1_2, HiggsProdMode prodMode, tH_type tH)
 
int HTXSstage1_2_to_HTXSstage1_2_FineIndex (const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
 
int HTXSstage1_2_to_index (HTXS::Stage1_2::Category stage1_2)
 
int HTXSstage1_to_HTXSstage1FineIndex (HTXS::Stage1::Category stage1, HiggsProdMode prodMode, tH_type tH)
 
int HTXSstage1_to_HTXSstage1FineIndex (const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
 
int HTXSstage1_to_index (HTXS::Stage1::Category stage1)
 
template<class vec4 >
TLV MakeTLV (vec4 const p)
 
template<class Vvec4 >
TLVs MakeTLVs (Vvec4 const &rivet_jets)
 
template<class category >
HTXS::HiggsClassification Rivet2Root (category const &htxs_cat_rivet)
 

Detailed Description

Higgs Template Cross Section namespace.

Typedef Documentation

◆ TLV

Definition at line 495 of file HiggsTemplateCrossSections.h.

◆ TLVs

typedef std::vector<TLV> HTXS::TLVs

Definition at line 496 of file HiggsTemplateCrossSections.h.

Enumeration Type Documentation

◆ ErrorCode

Error code: whether the classification was successful or failed.

Enumerator
UNDEFINED 
SUCCESS 

successful classification

PRODMODE_DEFINED 

production mode not defined

MOMENTUM_CONSERVATION 

failed momentum conservation

HIGGS_IDENTIFICATION 

failed to identify Higgs boson

HIGGS_DECAY_IDENTIFICATION 

failed to identify Higgs boson decay products

HS_VTX_IDENTIFICATION 

failed to identify hard scatter vertex

VH_IDENTIFICATION 

failed to identify associated vector boson

VH_DECAY_IDENTIFICATION 

failed to identify associated vector boson decay products

TOP_W_IDENTIFICATION 

failed to identify top decay

Definition at line 11 of file HiggsTemplateCrossSections.h.

11  {
12  UNDEFINED = -99,
13  SUCCESS = 0,
14  PRODMODE_DEFINED = 1,
19  VH_IDENTIFICATION = 6,
22  };
failed to identify associated vector boson
successful classification
failed to identify Higgs boson decay products
failed momentum conservation
failed to identify associated vector boson decay products
failed to identify Higgs boson
failed to identify hard scatter vertex
production mode not defined
failed to identify top decay

◆ HiggsProdMode

Higgs production modes, corresponding to input sample.

Enumerator
UNKNOWN 
GGF 
VBF 
WH 
QQ2ZH 
GG2ZH 
TTH 
BBH 
TH 

Definition at line 25 of file HiggsTemplateCrossSections.h.

◆ tH_type

Additional identifier flag for TH production modes.

Enumerator
noTH 
THQB 
TWH 

Definition at line 28 of file HiggsTemplateCrossSections.h.

Function Documentation

◆ HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex() [1/2]

int HTXS::HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex ( HTXS::Stage1_2_Fine::Category  Stage1_2_Fine,
HiggsProdMode  prodMode,
tH_type  tH 
)
inline

Definition at line 679 of file HiggsTemplateCrossSections.h.

References F(), GG2ZH, createfilelist::int, noTH, TH, and UNKNOWN.

Referenced by HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex().

681  {
682  if (Stage1_2_Fine == HTXS::Stage1_2_Fine::Category::UNKNOWN)
683  return 0;
684  int P = (int)(Stage1_2_Fine / 100);
685  int F = (int)(Stage1_2_Fine % 100);
686  // 1.a spit tH categories
687  if (prodMode == HiggsProdMode::TH) {
688  // check that tH splitting is valid for Stage-1 FineIndex
689  // else return unknown category
690  if (tH == tH_type::noTH)
691  return 0;
692  // check if forward tH
693  int fwdH = F == 0 ? 0 : 1;
694  return (189 + 2 * (tH - 1) + fwdH);
695  }
696  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
697  // offset vector 1: input is the Higgs prodMode
698  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
699  std::vector<int> pMode_offset = {0, 0, 57, 82, 107};
700  if (P == 2)
701  return (F + pMode_offset[prodMode]);
702  // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
703  if (prodMode == HiggsProdMode::GG2ZH && P == 1)
704  return F + 29;
705  // 1.d remaining categories
706  // offset vector 2: input is the Stage-1 category P
707  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
708  std::vector<int> catP_offset = {0, 1, 0, 132, 148, 164, 180, 187};
709  return (F + catP_offset[P]);
710  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex() [2/2]

int HTXS::HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex ( const HiggsClassification stxs,
tH_type  tH = noTH,
bool  jets_pT25 = false 
)
inline

Definition at line 712 of file HiggsTemplateCrossSections.h.

References HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(), HTXS::HiggsClassification::prodMode, HTXS::HiggsClassification::stage1_2_fine_cat_pTjet25GeV, and HTXS::HiggsClassification::stage1_2_fine_cat_pTjet30GeV.

714  {
715  HTXS::Stage1_2_Fine::Category Stage1_2_Fine =
716  jets_pT25 == false ? stxs.stage1_2_fine_cat_pTjet30GeV : stxs.stage1_2_fine_cat_pTjet25GeV;
717  return HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(Stage1_2_Fine, stxs.prodMode, tH);
718  }
int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)

◆ HTXSstage1_2_Fine_to_index()

int HTXS::HTXSstage1_2_Fine_to_index ( HTXS::Stage1_2_Fine::Category  Stage1_2_Fine)
inline

Definition at line 720 of file HiggsTemplateCrossSections.h.

References F(), createfilelist::int, and HLT_IsoTrack_cff::offset.

720  {
721  // the Stage-1_2_Fine categories
722  int P = (int)(Stage1_2_Fine / 100);
723  int F = (int)(Stage1_2_Fine % 100);
724  std::vector<int> offset{0, 1, 29, 54, 70, 86, 102, 109, 111, 113};
725  // convert to linear values
726  return (F + offset[P]);
727  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ HTXSstage1_2_to_HTXSstage1_2_FineIndex() [1/2]

int HTXS::HTXSstage1_2_to_HTXSstage1_2_FineIndex ( HTXS::Stage1_2::Category  stage1_2,
HiggsProdMode  prodMode,
tH_type  tH 
)
inline

Definition at line 627 of file HiggsTemplateCrossSections.h.

References F(), GG2ZH, createfilelist::int, noTH, TH, and UNKNOWN.

Referenced by HTXSstage1_2_to_HTXSstage1_2_FineIndex().

629  {
630  if (stage1_2 == HTXS::Stage1_2::Category::UNKNOWN)
631  return 0;
632  int P = (int)(stage1_2 / 100);
633  int F = (int)(stage1_2 % 100);
634  // 1.a spit tH categories
635  if (prodMode == HiggsProdMode::TH) {
636  // check that tH splitting is valid for Stage-1 FineIndex
637  // else return unknown category
638  if (tH == tH_type::noTH)
639  return 0;
640  // check if forward tH
641  int fwdH = F == 0 ? 0 : 1;
642  return (94 + 2 * (tH - 1) + fwdH);
643  }
644  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
645  // offset vector 1: input is the Higgs prodMode
646  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
647  std::vector<int> pMode_offset = {0, 0, 35, 46, 57};
648  if (P == 2)
649  return (F + pMode_offset[prodMode]);
650  // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
651  if (prodMode == HiggsProdMode::GG2ZH && P == 1)
652  return F + 18;
653  // 1.d remaining categories
654  // offset vector 2: input is the Stage-1 category P
655  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
656  std::vector<int> catP_offset = {0, 1, 0, 68, 74, 80, 86, 92};
657  return (F + catP_offset[P]);
658  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ HTXSstage1_2_to_HTXSstage1_2_FineIndex() [2/2]

int HTXS::HTXSstage1_2_to_HTXSstage1_2_FineIndex ( const HiggsClassification stxs,
tH_type  tH = noTH,
bool  jets_pT25 = false 
)
inline

Definition at line 660 of file HiggsTemplateCrossSections.h.

References HTXSstage1_2_to_HTXSstage1_2_FineIndex(), HTXS::HiggsClassification::prodMode, HTXS::HiggsClassification::stage1_2_cat_pTjet25GeV, and HTXS::HiggsClassification::stage1_2_cat_pTjet30GeV.

662  {
663  HTXS::Stage1_2::Category stage1_2 =
664  jets_pT25 == false ? stxs.stage1_2_cat_pTjet30GeV : stxs.stage1_2_cat_pTjet25GeV;
665  return HTXSstage1_2_to_HTXSstage1_2_FineIndex(stage1_2, stxs.prodMode, tH);
666  }
int HTXSstage1_2_to_HTXSstage1_2_FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)

◆ HTXSstage1_2_to_index()

int HTXS::HTXSstage1_2_to_index ( HTXS::Stage1_2::Category  stage1_2)
inline

Definition at line 668 of file HiggsTemplateCrossSections.h.

References F(), createfilelist::int, and HLT_IsoTrack_cff::offset.

668  {
669  // the Stage-1 categories
670  int P = (int)(stage1_2 / 100);
671  int F = (int)(stage1_2 % 100);
672  //std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
673  std::vector<int> offset{0, 1, 18, 29, 35, 41, 47, 53, 55, 57};
674  // convert to linear values
675  return (F + offset[P]);
676  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ HTXSstage1_to_HTXSstage1FineIndex() [1/2]

int HTXS::HTXSstage1_to_HTXSstage1FineIndex ( HTXS::Stage1::Category  stage1,
HiggsProdMode  prodMode,
tH_type  tH 
)
inline

Definition at line 583 of file HiggsTemplateCrossSections.h.

References F(), createfilelist::int, noTH, TH, and UNKNOWN.

Referenced by HTXSstage1_to_HTXSstage1FineIndex().

583  {
584  if (stage1 == HTXS::Stage1::Category::UNKNOWN)
585  return 0;
586  int P = (int)(stage1 / 100);
587  int F = (int)(stage1 % 100);
588  // 1.a spit tH categories
589  if (prodMode == HiggsProdMode::TH) {
590  // check that tH splitting is valid for Stage-1 FineIndex
591  // else return unknown category
592  if (tH == tH_type::noTH)
593  return 0;
594  // check if forward tH
595  int fwdH = F == 0 ? 0 : 1;
596  return (49 + 2 * (tH - 1) + fwdH);
597  }
598  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
599  // offset vector 1: input is the Higgs prodMode
600  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
601  std::vector<int> pMode_offset = {0, 0, 13, 19, 25};
602  if (P == 2)
603  return (F + pMode_offset[prodMode]);
604  // 1.c remaining categories
605  // offset vector 2: input is the Stage-1 category P
606  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
607  std::vector<int> catP_offset = {0, 1, 0, 31, 36, 41, 45, 47};
608  return (F + catP_offset[P]);
609  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ HTXSstage1_to_HTXSstage1FineIndex() [2/2]

int HTXS::HTXSstage1_to_HTXSstage1FineIndex ( const HiggsClassification stxs,
tH_type  tH = noTH,
bool  jets_pT25 = false 
)
inline

Definition at line 611 of file HiggsTemplateCrossSections.h.

References HTXSstage1_to_HTXSstage1FineIndex(), HTXS::HiggsClassification::prodMode, HTXS::HiggsClassification::stage1_cat_pTjet25GeV, and HTXS::HiggsClassification::stage1_cat_pTjet30GeV.

613  {
614  HTXS::Stage1::Category stage1 = jets_pT25 == false ? stxs.stage1_cat_pTjet30GeV : stxs.stage1_cat_pTjet25GeV;
615  return HTXSstage1_to_HTXSstage1FineIndex(stage1, stxs.prodMode, tH);
616  }
int HTXSstage1_to_HTXSstage1FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)

◆ HTXSstage1_to_index()

int HTXS::HTXSstage1_to_index ( HTXS::Stage1::Category  stage1)
inline

Definition at line 618 of file HiggsTemplateCrossSections.h.

References F(), createfilelist::int, and HLT_IsoTrack_cff::offset.

618  {
619  // the Stage-1 categories
620  int P = (int)(stage1 / 100);
621  int F = (int)(stage1 % 100);
622  std::vector<int> offset{0, 1, 13, 19, 24, 29, 33, 35, 37, 39};
623  // convert to linear values
624  return (F + offset[P]);
625  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

◆ MakeTLV()

template<class vec4 >
TLV HTXS::MakeTLV ( vec4 const  p)

Definition at line 499 of file HiggsTemplateCrossSections.h.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by MakeTLVs(), and Rivet2Root().

499  {
500  return TLV(p.px(), p.py(), p.pz(), p.E());
501  }
math::XYZTLorentzVectorD TLV

◆ MakeTLVs()

template<class Vvec4 >
TLVs HTXS::MakeTLVs ( Vvec4 const &  rivet_jets)
inline

Definition at line 504 of file HiggsTemplateCrossSections.h.

References metsig::jet, PDWG_EXODelayedJetMET_cff::jets, and MakeTLV().

Referenced by Rivet2Root().

504  {
505  TLVs jets;
506  for (const auto &jet : rivet_jets)
507  jets.push_back(MakeTLV(jet));
508  return jets;
509  }
std::vector< TLV > TLVs
TLV MakeTLV(vec4 const p)

◆ Rivet2Root()

template<class category >
HTXS::HiggsClassification HTXS::Rivet2Root ( category const &  htxs_cat_rivet)
inline

Definition at line 553 of file HiggsTemplateCrossSections.h.

References eostools::cat(), MakeTLV(), and MakeTLVs().

Referenced by HTXSRivetProducer::produce().

553  {
555  cat.prodMode = htxs_cat_rivet.prodMode;
556  cat.errorCode = htxs_cat_rivet.errorCode;
557  cat.higgs = MakeTLV(htxs_cat_rivet.higgs);
558  cat.V = MakeTLV(htxs_cat_rivet.V);
559  cat.p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
560  cat.p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
561  cat.jets25 = MakeTLVs(htxs_cat_rivet.jets25);
562  cat.jets30 = MakeTLVs(htxs_cat_rivet.jets30);
563  cat.stage0_cat = htxs_cat_rivet.stage0_cat;
564  cat.stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
565  cat.stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
566  cat.stage1_1_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_cat_pTjet25GeV;
567  cat.stage1_1_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_cat_pTjet30GeV;
568  cat.stage1_1_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet25GeV;
569  cat.stage1_1_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet30GeV;
570  cat.stage1_2_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_cat_pTjet25GeV;
571  cat.stage1_2_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_cat_pTjet30GeV;
572  cat.stage1_2_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet25GeV;
573  cat.stage1_2_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet30GeV;
574  cat.isZ2vvDecay = htxs_cat_rivet.isZ2vvDecay;
575  // Temporary fix: add variables to perform STXS 1.3 classification with nanoAOD on-the-fly
576  cat.V_pt = htxs_cat_rivet.V_pt;
577  cat.Mjj = htxs_cat_rivet.Mjj;
578  cat.ptHjj = htxs_cat_rivet.ptHjj;
579  cat.dPhijj = htxs_cat_rivet.dPhijj;
580  return cat;
581  }
def cat(path)
Definition: eostools.py:401
TLV MakeTLV(vec4 const p)
TLVs MakeTLVs(Vvec4 const &rivet_jets)