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

Definition at line 465 of file HiggsTemplateCrossSections.h.

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

Definition at line 466 of file HiggsTemplateCrossSections.h.

Enumeration Type Documentation

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

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.

Additional identifier flag for TH production modes.

Enumerator
noTH 
THQB 
TWH 

Definition at line 32 of file HiggsTemplateCrossSections.h.

Function Documentation

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 641 of file HiggsTemplateCrossSections.h.

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

Referenced by HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex().

643  {
644  if (Stage1_2_Fine == HTXS::Stage1_2_Fine::Category::UNKNOWN)
645  return 0;
646  int P = (int)(Stage1_2_Fine / 100);
647  int F = (int)(Stage1_2_Fine % 100);
648  // 1.a spit tH categories
649  if (prodMode == HiggsProdMode::TH) {
650  // check that tH splitting is valid for Stage-1 FineIndex
651  // else return unknown category
652  if (tH == tH_type::noTH)
653  return 0;
654  // check if forward tH
655  int fwdH = F == 0 ? 0 : 1;
656  return (189 + 2 * (tH - 1) + fwdH);
657  }
658  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
659  // offset vector 1: input is the Higgs prodMode
660  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
661  std::vector<int> pMode_offset = {0, 0, 57, 82, 107};
662  if (P == 2)
663  return (F + pMode_offset[prodMode]);
664  // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
665  if (prodMode == HiggsProdMode::GG2ZH && P == 1)
666  return F + 29;
667  // 1.d remaining categories
668  // offset vector 2: input is the Stage-1 category P
669  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
670  std::vector<int> catP_offset = {0, 1, 0, 132, 148, 164, 180, 187};
671  return (F + catP_offset[P]);
672  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
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 674 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.

676  {
677  HTXS::Stage1_2_Fine::Category Stage1_2_Fine =
678  jets_pT25 == false ? stxs.stage1_2_fine_cat_pTjet30GeV : stxs.stage1_2_fine_cat_pTjet25GeV;
679  return HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(Stage1_2_Fine, stxs.prodMode, tH);
680  }
int HTXSstage1_2_Fine_to_HTXSstage1_2_Fine_FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
int HTXS::HTXSstage1_2_Fine_to_index ( HTXS::Stage1_2_Fine::Category  Stage1_2_Fine)
inline

Definition at line 682 of file HiggsTemplateCrossSections.h.

References F(), createfilelist::int, PFRecoTauDiscriminationByIsolation_cfi::offset, particlelevel_cff::stage1_1_cat_pTjet25GeV, particlelevel_cff::stage1_1_cat_pTjet30GeV, particlelevel_cff::stage1_1_fine_cat_pTjet25GeV, particlelevel_cff::stage1_1_fine_cat_pTjet30GeV, particlelevel_cff::stage1_2_cat_pTjet25GeV, particlelevel_cff::stage1_2_cat_pTjet30GeV, particlelevel_cff::stage1_2_fine_cat_pTjet25GeV, and particlelevel_cff::stage1_2_fine_cat_pTjet30GeV.

682  {
683  // the Stage-1_2_Fine categories
684  int P = (int)(Stage1_2_Fine / 100);
685  int F = (int)(Stage1_2_Fine % 100);
686  std::vector<int> offset{0, 1, 29, 54, 70, 86, 102, 109, 111, 113};
687  // convert to linear values
688  return (F + offset[P]);
689  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
int HTXS::HTXSstage1_2_to_HTXSstage1_2_FineIndex ( HTXS::Stage1_2::Category  stage1_2,
HiggsProdMode  prodMode,
tH_type  tH 
)
inline

Definition at line 589 of file HiggsTemplateCrossSections.h.

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

Referenced by HTXSstage1_2_to_HTXSstage1_2_FineIndex().

591  {
592  if (stage1_2 == HTXS::Stage1_2::Category::UNKNOWN)
593  return 0;
594  int P = (int)(stage1_2 / 100);
595  int F = (int)(stage1_2 % 100);
596  // 1.a spit tH categories
597  if (prodMode == HiggsProdMode::TH) {
598  // check that tH splitting is valid for Stage-1 FineIndex
599  // else return unknown category
600  if (tH == tH_type::noTH)
601  return 0;
602  // check if forward tH
603  int fwdH = F == 0 ? 0 : 1;
604  return (94 + 2 * (tH - 1) + fwdH);
605  }
606  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
607  // offset vector 1: input is the Higgs prodMode
608  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
609  std::vector<int> pMode_offset = {0, 0, 35, 46, 57};
610  if (P == 2)
611  return (F + pMode_offset[prodMode]);
612  // 1.c GG2ZH split into gg->ZH-had and gg->ZH-lep
613  if (prodMode == HiggsProdMode::GG2ZH && P == 1)
614  return F + 18;
615  // 1.d remaining categories
616  // offset vector 2: input is the Stage-1 category P
617  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
618  std::vector<int> catP_offset = {0, 1, 0, 68, 74, 80, 86, 92};
619  return (F + catP_offset[P]);
620  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
int HTXS::HTXSstage1_2_to_HTXSstage1_2_FineIndex ( const HiggsClassification stxs,
tH_type  tH = noTH,
bool  jets_pT25 = false 
)
inline

Definition at line 622 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.

624  {
625  HTXS::Stage1_2::Category stage1_2 =
626  jets_pT25 == false ? stxs.stage1_2_cat_pTjet30GeV : stxs.stage1_2_cat_pTjet25GeV;
627  return HTXSstage1_2_to_HTXSstage1_2_FineIndex(stage1_2, stxs.prodMode, tH);
628  }
int HTXSstage1_2_to_HTXSstage1_2_FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
int HTXS::HTXSstage1_2_to_index ( HTXS::Stage1_2::Category  stage1_2)
inline

Definition at line 630 of file HiggsTemplateCrossSections.h.

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

630  {
631  // the Stage-1 categories
632  int P = (int)(stage1_2 / 100);
633  int F = (int)(stage1_2 % 100);
634  //std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
635  std::vector<int> offset{0, 1, 18, 29, 35, 41, 47, 53, 55, 57};
636  // convert to linear values
637  return (F + offset[P]);
638  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
int HTXS::HTXSstage1_to_HTXSstage1FineIndex ( HTXS::Stage1::Category  stage1,
HiggsProdMode  prodMode,
tH_type  tH 
)
inline

Definition at line 543 of file HiggsTemplateCrossSections.h.

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

Referenced by HTXSstage1_to_HTXSstage1FineIndex().

544  {
545  if(stage1==HTXS::Stage1::Category::UNKNOWN) return 0;
546  int P = (int)(stage1 / 100);
547  int F = (int)(stage1 % 100);
548  // 1.a spit tH categories
549  if (prodMode==HiggsProdMode::TH) {
550  // check that tH splitting is valid for Stage-1 FineIndex
551  // else return unknown category
552  if(tH==tH_type::noTH) return 0;
553  // check if forward tH
554  int fwdH = F==0?0:1;
555  return (49 + 2*(tH-1) +fwdH);
556  }
557  // 1.b QQ2HQQ --> split into VBF, WH, ZH -> HQQ
558  // offset vector 1: input is the Higgs prodMode
559  // first two indicies are dummies, given that this is only called for prodMode=2,3,4
560  std::vector<int> pMode_offset = {0,0,13,19,25};
561  if (P==2) return (F + pMode_offset[prodMode]);
562  // 1.c remaining categories
563  // offset vector 2: input is the Stage-1 category P
564  // third index is dummy, given that this is called for category P=0,1,3,4,5,6,7
565  std::vector<int> catP_offset = {0,1,0,31,36,41,45,47};
566  return (F + catP_offset[P]);
567  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
int HTXS::HTXSstage1_to_HTXSstage1FineIndex ( const HiggsClassification stxs,
tH_type  tH = noTH,
bool  jets_pT25 = false 
)
inline

Definition at line 569 of file HiggsTemplateCrossSections.h.

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

570  {
571  HTXS::Stage1::Category stage1 =
572  jets_pT25==false?stxs.stage1_cat_pTjet30GeV:
573  stxs.stage1_cat_pTjet25GeV;
574  return HTXSstage1_to_HTXSstage1FineIndex(stage1,stxs.prodMode,tH);
575  }
int HTXSstage1_to_HTXSstage1FineIndex(const HiggsClassification &stxs, tH_type tH=noTH, bool jets_pT25=false)
int HTXS::HTXSstage1_to_index ( HTXS::Stage1::Category  stage1)
inline

Definition at line 577 of file HiggsTemplateCrossSections.h.

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

577  {
578  // the Stage-1 categories
579  int P = (int)(stage1 / 100);
580  int F = (int)(stage1 % 100);
581  std::vector<int> offset{0,1,13,19,24,29,33,35,37,39};
582  // convert to linear values
583  return ( F + offset[P] );
584  }
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
template<class vec4 >
TLV HTXS::MakeTLV ( vec4 const  p)

Definition at line 469 of file HiggsTemplateCrossSections.h.

Referenced by MakeTLVs(), and Rivet2Root().

469  {
470  return TLV(p.px(), p.py(), p.pz(), p.E());
471  }
math::XYZTLorentzVectorD TLV
template<class Vvec4 >
TLVs HTXS::MakeTLVs ( Vvec4 const &  rivet_jets)
inline

Definition at line 474 of file HiggsTemplateCrossSections.h.

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

Referenced by Rivet2Root().

474  {
475  TLVs jets;
476  for (auto jet : rivet_jets)
477  jets.push_back(MakeTLV(jet));
478  return jets;
479  }
std::vector< TLV > TLVs
vector< PseudoJet > jets
TLV MakeTLV(vec4 const p)
template<class category >
HTXS::HiggsClassification HTXS::Rivet2Root ( category const &  htxs_cat_rivet)
inline

Definition at line 518 of file HiggsTemplateCrossSections.h.

References eostools::cat(), HTXS::HiggsClassification::errorCode, HTXS::HiggsClassification::higgs, HTXS::HiggsClassification::isZ2vvDecay, HTXS::HiggsClassification::jets25, HTXS::HiggsClassification::jets30, MakeTLV(), MakeTLVs(), HTXS::HiggsClassification::p4decay_higgs, HTXS::HiggsClassification::p4decay_V, HTXS::HiggsClassification::prodMode, HTXS::HiggsClassification::stage0_cat, HTXS::HiggsClassification::stage1_1_cat_pTjet25GeV, HTXS::HiggsClassification::stage1_1_cat_pTjet30GeV, HTXS::HiggsClassification::stage1_1_fine_cat_pTjet25GeV, HTXS::HiggsClassification::stage1_1_fine_cat_pTjet30GeV, HTXS::HiggsClassification::stage1_2_cat_pTjet25GeV, HTXS::HiggsClassification::stage1_2_cat_pTjet30GeV, HTXS::HiggsClassification::stage1_2_fine_cat_pTjet25GeV, HTXS::HiggsClassification::stage1_2_fine_cat_pTjet30GeV, HTXS::HiggsClassification::stage1_cat_pTjet25GeV, HTXS::HiggsClassification::stage1_cat_pTjet30GeV, and HTXS::HiggsClassification::V.

Referenced by HTXSRivetProducer::produce().

518  {
520  cat.prodMode = htxs_cat_rivet.prodMode;
521  cat.errorCode = htxs_cat_rivet.errorCode;
522  cat.higgs = MakeTLV(htxs_cat_rivet.higgs);
523  cat.V = MakeTLV(htxs_cat_rivet.V);
524  cat.p4decay_higgs = MakeTLV(htxs_cat_rivet.p4decay_higgs);
525  cat.p4decay_V = MakeTLV(htxs_cat_rivet.p4decay_V);
526  cat.jets25 = MakeTLVs(htxs_cat_rivet.jets25);
527  cat.jets30 = MakeTLVs(htxs_cat_rivet.jets30);
528  cat.stage0_cat = htxs_cat_rivet.stage0_cat;
529  cat.stage1_cat_pTjet25GeV = htxs_cat_rivet.stage1_cat_pTjet25GeV;
530  cat.stage1_cat_pTjet30GeV = htxs_cat_rivet.stage1_cat_pTjet30GeV;
531  cat.stage1_1_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_cat_pTjet25GeV;
532  cat.stage1_1_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_cat_pTjet30GeV;
533  cat.stage1_1_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet25GeV;
534  cat.stage1_1_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_1_fine_cat_pTjet30GeV;
535  cat.stage1_2_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_cat_pTjet25GeV;
536  cat.stage1_2_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_cat_pTjet30GeV;
537  cat.stage1_2_fine_cat_pTjet25GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet25GeV;
538  cat.stage1_2_fine_cat_pTjet30GeV = htxs_cat_rivet.stage1_2_fine_cat_pTjet30GeV;
539  cat.isZ2vvDecay = htxs_cat_rivet.isZ2vvDecay;
540  return cat;
541  }
HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet25GeV
HTXS::Stage1::Category stage1_cat_pTjet25GeV
HTXS::Stage1_2::Category stage1_2_cat_pTjet30GeV
HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet30GeV
def cat(path)
Definition: eostools.py:400
HTXS::Stage1_1_Fine::Category stage1_1_fine_cat_pTjet25GeV
TLV MakeTLV(vec4 const p)
HTXS::Stage1::Category stage1_cat_pTjet30GeV
HTXS::Stage1_1::Category stage1_1_cat_pTjet25GeV
HTXS::Stage1_2::Category stage1_2_cat_pTjet25GeV
HTXS::Stage1_1::Category stage1_1_cat_pTjet30GeV
HTXS::Stage1_2_Fine::Category stage1_2_fine_cat_pTjet30GeV
TLVs MakeTLVs(Vvec4 const &rivet_jets)