CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Rivet::HiggsTemplateCrossSections Class Reference

Rivet routine for classifying MC events according to the Higgs template cross section categories. More...

Inheritance diagram for Rivet::HiggsTemplateCrossSections:

Public Member Functions

HiggsClassification classifyEvent (const Event &event, const HTXS::HiggsProdMode prodMode)
 Main classificaion method. More...
 
 HiggsTemplateCrossSections ()
 
Utility methods

Methods to identify the Higgs boson and associated vector boson and to build jets

Particle getLastInstance (Particle ptcl)
 follow a "propagating" particle and return its last instance More...
 
bool originateFrom (const Particle &p, const Particles &ptcls)
 Whether particle p originate from any of the ptcls. More...
 
bool originateFrom (const Particle &p, const Particle &p2)
 Whether particle p originates from p2. More...
 
bool hasChild (const GenParticle *ptcl, int pdgID)
 Checks whether the input particle has a child with a given PDGID. More...
 
bool hasParent (const GenParticle *ptcl, int pdgID)
 Checks whether the input particle has a parent with a given PDGID. More...
 
bool quarkDecay (const Particle &p)
 Return true is particle decays to quarks. More...
 
bool ChLeptonDecay (const Particle &p)
 Return true if particle decays to charged leptons. More...
 
HiggsClassification error (HiggsClassification &cat, HTXS::ErrorCode err, std::string msg="", int NmaxWarnings=20)
 Returns the classification object with the error code set. Prints an warning message, and keeps track of number of errors. More...
 
Categorization methods

Methods to assign the truth category based on the identified Higgs boson and associated vector bosons and/or reconstructed jets

int getBin (double x, std::vector< double > bins)
 Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin. More...
 
int vbfTopology (const Jets &jets, const Particle &higgs)
 VBF topolog selection 0 = fail loose selction: m_jj > 400 GeV and Dy_jj > 2.8 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass tight selection. More...
 
int vbfTopology_Stage1_X (const Jets &jets, const Particle &higgs)
 VBF topology selection Stage1.1 and Stage1.2 0 = fail loose selection: m_jj > 350 GeV 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass pT(Hjj)>25 selection 3 pass tight (m_jj>700 GeV), but fail additional cut pT(Hjj)<25. 4 pass pT(Hjj)>25 selection. More...
 
int vbfTopology_Stage1_X_Fine (const Jets &jets, const Particle &higgs)
 VBF topology selection for Stage1.1 and Stage 1.2 Fine 0 = fail loose selection: m_jj > 350 GeV 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass pT(Hjj)>25 selection 3 pass 700<m_jj<1000 GeV, but fail additional cut pT(Hjj)<25. 4 pass pT(Hjj)>25 selection 5 pass 1000<m_jj<1500 GeV, but fail additional cut pT(Hjj)<25. 6 pass pT(Hjj)>25 selection 7 pass m_jj>1500 GeV, but fail additional cut pT(Hjj)<25. 8 pass pT(Hjj)>25 selection. More...
 
bool isVH (HTXS::HiggsProdMode p)
 Whether the Higgs is produced in association with a vector boson (VH) More...
 
HTXS::Stage0::Category getStage0Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Particle &V)
 Stage-0 HTXS categorization. More...
 
HTXS::Stage1::Category getStage1Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
 Stage-1 categorization. More...
 
HTXS::Stage1_1::Category getStage1_1_Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
 Stage-1.1 categorization. More...
 
HTXS::Stage1_1_Fine::Category getStage1_1_Fine_Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
 Stage-1_1 categorization. More...
 
HTXS::Stage1_2::Category getStage1_2_Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
 Stage-1.2 categorization. More...
 
HTXS::Stage1_2_Fine::Category getStage1_2_Fine_Category (const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
 Stage-1.2 Fine categorization. More...
 
Default Rivet analysis methods and steering methods
void setHiggsProdMode (HTXS::HiggsProdMode prodMode)
 Sets the Higgs production mode. More...
 
void init () override
 default Rivet Analysis::init method Booking of histograms, initializing Rivet projection Extracts Higgs production mode from shell variable if not set manually using setHiggsProdMode More...
 
void analyze (const Event &event) override
 
void printClassificationSummary ()
 
void finalize () override
 
void initializeHistos ()
 

Private Attributes

Histo1DPtr hist_deltay_jj
 
Histo1DPtr hist_dijet_mass
 
Histo1DPtr hist_isZ2vv
 
Histo1DPtr hist_Njets25
 
Histo1DPtr hist_Njets30
 
Histo1DPtr hist_pT_Higgs
 
Histo1DPtr hist_pT_Hjj
 
Histo1DPtr hist_pT_jet1
 
Histo1DPtr hist_pT_V
 
Histo1DPtr hist_stage0
 
Histo1DPtr hist_stage1_2_fine_pTjet25
 
Histo1DPtr hist_stage1_2_fine_pTjet30
 
Histo1DPtr hist_stage1_2_pTjet25
 
Histo1DPtr hist_stage1_2_pTjet30
 
Histo1DPtr hist_stage1_pTjet25
 
Histo1DPtr hist_stage1_pTjet30
 
Histo1DPtr hist_y_Higgs
 
std::map< HTXS::ErrorCode, size_t > m_errorCount
 
HTXS::HiggsProdMode m_HiggsProdMode
 
double m_sumw
 

Detailed Description

Rivet routine for classifying MC events according to the Higgs template cross section categories.

Author
Jim Lacey (DESY) <james.nosp@m..lac.nosp@m.ey@ce.nosp@m.rn.c.nosp@m.h,jlace.nosp@m.y@de.nosp@m.sy.de>
Dag Gillberg (Carleton University) dag.g.nosp@m.illb.nosp@m.erg@c.nosp@m.ern..nosp@m.ch

Definition at line 21 of file HiggsTemplateCrossSections.cc.

Constructor & Destructor Documentation

Rivet::HiggsTemplateCrossSections::HiggsTemplateCrossSections ( )
inline

Definition at line 24 of file HiggsTemplateCrossSections.cc.

25  : Analysis("HiggsTemplateCrossSections"),

Member Function Documentation

void Rivet::HiggsTemplateCrossSections::analyze ( const Event event)
inlineoverride

Definition at line 882 of file HiggsTemplateCrossSections.cc.

References funct::abs(), eostools::cat(), classifyEvent(), F(), hist_deltay_jj, hist_dijet_mass, hist_isZ2vv, hist_Njets25, hist_Njets30, hist_pT_Higgs, hist_pT_Hjj, hist_pT_jet1, hist_pT_V, hist_stage0, hist_stage1_2_fine_pTjet25, hist_stage1_2_fine_pTjet30, hist_stage1_2_pTjet25, hist_stage1_2_pTjet30, hist_stage1_pTjet25, hist_stage1_pTjet30, hist_y_Higgs, m_HiggsProdMode, m_sumw, ResonanceBuilder::mass, PFRecoTauDiscriminationByIsolation_cfi::offset, EnergyCorrector::pt, and mps_merge::weight.

882  {
883 
884  // get the classification
885  HiggsClassification cat = classifyEvent(event,m_HiggsProdMode);
886 
887  // Fill histograms: categorization --> linerize the categories
888  const double weight = event.weight();
889  m_sumw += weight;
890 
891  int F=cat.stage0_cat%10, P=cat.stage1_cat_pTjet30GeV/100;
892  hist_stage0->fill( cat.stage0_cat/10*2+F, weight );
893 
894  // Stage 1 enum offsets for each production mode: GGF=12, VBF=6, WH= 5, QQ2ZH=5, GG2ZH=4, TTH=2, BBH=2, TH=2
895  vector<int> offset({0,1,13,19,24,29,33,35,37,39});
896  int off = offset[P];
897  hist_stage1_pTjet25->fill(cat.stage1_cat_pTjet25GeV%100 + off, weight);
898  hist_stage1_pTjet30->fill(cat.stage1_cat_pTjet30GeV%100 + off, weight);
899 
900  // Stage 1_2 enum offsets for each production mode: GGF=17, VBF=11, WH= 6, QQ2ZH=6, GG2ZH=6, TTH=6, BBH=2, TH=2
901  static vector<int> offset1_2({0, 1, 18, 29, 35, 41, 47, 53, 55, 57});
902  int off1_2 = offset1_2[P];
903  // Stage 1_2 Fine enum offsets for each production mode: GGF=28, VBF=25, WH= 16, QQ2ZH=16, GG2ZH=16, TTH=7, BBH=2, TH=2
904  static vector<int> offset1_2f({0, 1, 29, 54, 70, 86, 102, 109, 111, 113});
905  int off1_2f = offset1_2f[P];
906  hist_stage1_2_pTjet25->fill(cat.stage1_2_cat_pTjet25GeV % 100 + off1_2, weight);
907  hist_stage1_2_pTjet30->fill(cat.stage1_2_cat_pTjet30GeV % 100 + off1_2, weight);
908  hist_stage1_2_fine_pTjet25->fill(cat.stage1_2_fine_cat_pTjet25GeV % 100 + off1_2f, weight);
909  hist_stage1_2_fine_pTjet30->fill(cat.stage1_2_fine_cat_pTjet30GeV % 100 + off1_2f, weight);
910 
911  // Fill histograms: variables used in the categorization
912  hist_pT_Higgs->fill(cat.higgs.pT(),weight);
913  hist_y_Higgs->fill(cat.higgs.rapidity(),weight);
914  hist_pT_V->fill(cat.V.pT(),weight);
915 
916  hist_Njets25->fill(cat.jets25.size(),weight);
917  hist_Njets30->fill(cat.jets30.size(),weight);
918 
919  hist_isZ2vv->fill(cat.isZ2vvDecay, weight);
920 
921  // Jet variables. Use jet collection with pT threshold at 30 GeV
922  if (!cat.jets30.empty()) hist_pT_jet1->fill(cat.jets30[0].pt(),weight);
923  if (cat.jets30.size()>=2) {
924  const FourMomentum &j1 = cat.jets30[0].momentum(), &j2 = cat.jets30[1].momentum();
925  hist_deltay_jj->fill(std::abs(j1.rapidity()-j2.rapidity()),weight);
926  hist_dijet_mass->fill((j1+j2).mass(),weight);
927  hist_pT_Hjj->fill((j1+j2+cat.higgs.momentum()).pt(),weight);
928  }
929  }
Definition: weight.py:1
def cat(path)
Definition: eostools.py:400
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HiggsClassification classifyEvent(const Event &event, const HTXS::HiggsProdMode prodMode)
Main classificaion method.
std::pair< OmniClusterRef, TrackingParticleRef > P
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
Definition: event.py:1
bool Rivet::HiggsTemplateCrossSections::ChLeptonDecay ( const Particle p)
inline

Return true if particle decays to charged leptons.

Definition at line 86 of file HiggsTemplateCrossSections.cc.

Referenced by classifyEvent().

86  {
87  for (auto child : p.children()) {
88  if (PID::isChLepton(child.pdgId())) {
89  return true;
90  }
91  }
92  return false;
93  }
HiggsClassification Rivet::HiggsTemplateCrossSections::classifyEvent ( const Event event,
const HTXS::HiggsProdMode  prodMode 
)
inline

Main classificaion method.

Definition at line 113 of file HiggsTemplateCrossSections.cc.

References eostools::cat(), class-composition::children, ChLeptonDecay(), error(), event(), getLastInstance(), getStage0Category(), getStage1_1_Category(), getStage1_1_Fine_Category(), getStage1_2_Category(), getStage1_2_Fine_Category(), getStage1Category(), HTXS::GG2ZH, hasChild(), hasParent(), HTXS::HIGGS_DECAY_IDENTIFICATION, HTXS::HIGGS_IDENTIFICATION, HTXS::HS_VTX_IDENTIFICATION, isVH(), fwrapper::jets, m_errorCount, m_HiggsProdMode, originateFrom(), AlCaHLTBitMon_ParallelJobs::p, HadronAndPartonSelector_cfi::particles, HTXS::PRODMODE_DEFINED, PVValHelper::pT, HTXS::QQ2ZH, quarkDecay(), HTXS::SUCCESS, HTXS::TH, HTXS::TOP_W_IDENTIFICATION, HTXS::TTH, HTXS::UNDEFINED, HTXS::UNKNOWN, HTXS::Stage0::UNKNOWN, HTXS::Stage1::UNKNOWN, HTXS::Stage1_1::UNKNOWN, HTXS::Stage1_1_Fine::UNKNOWN, HTXS::Stage1_2::UNKNOWN, HTXS::Stage1_2_Fine::UNKNOWN, HTXS::VH_DECAY_IDENTIFICATION, HTXS::VH_IDENTIFICATION, and HTXS::WH.

Referenced by analyze().

113  {
114 
116 
117  // the classification object
118  HiggsClassification cat;
119  cat.prodMode = prodMode;
120  cat.errorCode = HTXS::UNDEFINED;
121  cat.stage0_cat = HTXS::Stage0::UNKNOWN;
122  cat.stage1_cat_pTjet25GeV = HTXS::Stage1::UNKNOWN;
123  cat.stage1_cat_pTjet30GeV = HTXS::Stage1::UNKNOWN;
124  cat.stage1_1_cat_pTjet25GeV = HTXS::Stage1_1::UNKNOWN;
125  cat.stage1_1_cat_pTjet30GeV = HTXS::Stage1_1::UNKNOWN;
126  cat.stage1_1_fine_cat_pTjet25GeV = HTXS::Stage1_1_Fine::UNKNOWN;
127  cat.stage1_1_fine_cat_pTjet30GeV = HTXS::Stage1_1_Fine::UNKNOWN;
128  cat.stage1_2_cat_pTjet25GeV = HTXS::Stage1_2::UNKNOWN;
129  cat.stage1_2_cat_pTjet30GeV = HTXS::Stage1_2::UNKNOWN;
130  cat.stage1_2_fine_cat_pTjet25GeV = HTXS::Stage1_2_Fine::UNKNOWN;
131  cat.stage1_2_fine_cat_pTjet30GeV = HTXS::Stage1_2_Fine::UNKNOWN;
132 
133  if (prodMode == HTXS::UNKNOWN)
134  return error(cat,HTXS::PRODMODE_DEFINED,
135  "Unkown Higgs production mechanism. Cannot classify event."
136  " Classification for all events will most likely fail.");
137 
138  /*****
139  * Step 1.
140  * Idenfify the Higgs boson and the hard scatter vertex
141  * There should be only one of each.
142  */
143 
144  GenVertex *HSvtx = event.genEvent()->signal_process_vertex();
145  int Nhiggs=0;
146  for ( const GenParticle *ptcl : Rivet::particles(event.genEvent()) ) {
147 
148  // a) Reject all non-Higgs particles
149  if ( !PID::isHiggs(ptcl->pdg_id()) ) continue;
150  // b) select only the final Higgs boson copy, prior to decay
151  if ( ptcl->end_vertex() && !hasChild(ptcl,PID::HIGGS) ) {
152  cat.higgs = Particle(ptcl); ++Nhiggs;
153  }
154  // c) if HepMC::signal_proces_vertex is missing
155  // set hard-scatter vertex based on first Higgs boson
156  if ( HSvtx==nullptr && ptcl->production_vertex() && !hasParent(ptcl,PID::HIGGS) )
157  HSvtx = ptcl->production_vertex();
158  }
159 
160  // Make sure things are in order so far
161  if (Nhiggs!=1)
163  "Current event has "+std::to_string(Nhiggs)+" Higgs bosons. There must be only one.");
164  if (cat.higgs.children().size()<2)
166  "Could not identify Higgs boson decay products.");
167 
168  if (HSvtx == nullptr)
169  return error(cat,HTXS::HS_VTX_IDENTIFICATION,"Cannot find hard-scatter vertex of current event.");
170 
171  /*****
172  * Step 2.
173  * Identify associated vector bosons
174  */
175 
176  // Find associated vector bosons
177  bool is_uncatdV = false;
178  Particles uncatV_decays;
179  FourMomentum uncatV_p4(0,0,0,0);
180  FourVector uncatV_v4(0,0,0,0);
181  int nWs=0, nZs=0, nTop=0;
182  if ( isVH(prodMode) ) {
183  for (auto ptcl:particles(HSvtx,HepMC::children)) {
184  if (PID::isW(ptcl->pdg_id())) { ++nWs; cat.V=Particle(ptcl); }
185  if (PID::isZ(ptcl->pdg_id())) { ++nZs; cat.V=Particle(ptcl); }
186  }
187  if(nWs+nZs>0) cat.V = getLastInstance(cat.V);
188  else {
189  for (auto ptcl:particles(HSvtx,HepMC::children)) {
190  if (!PID::isHiggs(ptcl->pdg_id())) {
191  uncatV_decays += Particle(ptcl);
192  uncatV_p4 += Particle(ptcl).momentum();
193  // uncatV_v4 += Particle(ptcl).origin();
194  }
195  }
196  // is_uncatdV = true; cat.V = Particle(24,uncatV_p4,uncatV_v4);
197  is_uncatdV = true; cat.V = Particle(24,uncatV_p4);
198  }
199  }
200 
201  if ( !is_uncatdV ){
202 
203  if ( isVH(prodMode) && !cat.V.genParticle()->end_vertex() )
204  return error(cat,HTXS::VH_DECAY_IDENTIFICATION,"Vector boson does not decay!");
205 
206  if ( isVH(prodMode) && cat.V.children().size()<2 )
207  return error(cat,HTXS::VH_DECAY_IDENTIFICATION,"Vector boson does not decay!");
208 
209  if ( ( prodMode==HTXS::WH && (nZs>0||nWs!=1) ) ||
210  ( (prodMode==HTXS::QQ2ZH||prodMode==HTXS::GG2ZH) && (nZs!=1||nWs>0) ) )
211  return error(cat,HTXS::VH_IDENTIFICATION,"Found "+std::to_string(nWs)+" W-bosons and "+
212  std::to_string(nZs)+" Z-bosons. Inconsitent with VH expectation.");
213  }
214 
215  // Find and store the W-bosons from ttH->WbWbH
216  Particles Ws;
217  if ( prodMode==HTXS::TTH || prodMode==HTXS::TH ){
218  // loop over particles produced in hard-scatter vertex
219  for ( auto ptcl : particles(HSvtx,HepMC::children) ) {
220  if ( !PID::isTop(ptcl->pdg_id()) ) continue;
221  ++nTop;
222  Particle top = getLastInstance(Particle(ptcl));
223  if ( top.genParticle()->end_vertex() )
224  for (auto child:top.children())
225  if ( PID::isW(child.pdgId()) ) Ws += getLastInstance(child);
226  }
227  }
228 
229  // Make sure result make sense
230  if ( (prodMode==HTXS::TTH && Ws.size()<2) || (prodMode==HTXS::TH && Ws.empty() ) )
231  return error(cat,HTXS::TOP_W_IDENTIFICATION,"Failed to identify W-boson(s) from t-decay!");
232 
233  /*****
234  * Step 3.
235  * Build jets
236  * Make sure all stable particles are present
237  */
238 
239  // Create a list of the vector bosons that decay leptonically
240  // Either the vector boson produced in association with the Higgs boson,
241  // or the ones produced from decays of top quarks produced with the Higgs
242  Particles leptonicVs;
243  if ( !is_uncatdV ){
244  if ( isVH(prodMode) && !quarkDecay(cat.V) ) leptonicVs += cat.V;
245  }else leptonicVs = uncatV_decays;
246  for ( auto W:Ws ) if ( W.genParticle()->end_vertex() && !quarkDecay(W) ) leptonicVs += W;
247 
248  // Obtain all stable, final-state particles
249  const ParticleVector FS = applyProjection<FinalState>(event, "FS").particles();
250  Particles hadrons;
251  FourMomentum sum(0,0,0,0), vSum(0,0,0,0), hSum(0,0,0,0);
252  for ( const Particle &p : FS ) {
253  // Add up the four momenta of all stable particles as a cross check
254  sum += p.momentum();
255  // ignore particles from the Higgs boson
256  if ( originateFrom(p,cat.higgs) ) { hSum += p.momentum(); continue; }
257  // Cross-check the V decay products for VH
258  if ( isVH(prodMode) && !is_uncatdV && originateFrom(p,Ws) ) vSum += p.momentum();
259  // ignore final state particles from leptonic V decays
260  if ( !leptonicVs.empty() && originateFrom(p,leptonicVs) ) continue;
261  // All particles reaching here are considered hadrons and will be used to build jets
262  hadrons += p;
263  }
264 
265  cat.p4decay_higgs = hSum;
266  cat.p4decay_V = vSum;
267 
268  FinalState fps_temp;
269  FastJets jets(fps_temp, FastJets::ANTIKT, 0.4 );
270  jets.calc(hadrons);
271 
272  cat.jets25 = jets.jetsByPt( Cuts::pT > 25.0 );
273  cat.jets30 = jets.jetsByPt( Cuts::pT > 30.0 );
274 
275  // check that four mometum sum of all stable particles satisfies momentum consevation
276 /*
277  if ( sum.pt()>0.1 )
278  return error(cat,HTXS::MOMENTUM_CONSERVATION,"Four vector sum does not amount to pT=0, m=E=sqrt(s), but pT="+
279  std::to_string(sum.pt())+" GeV and m = "+std::to_string(sum.mass())+" GeV");
280 */
281  // check if V-boson was not included in the event record but decay particles were
282  // EFT contact interaction: return UNKNOWN for category but set all event/particle kinematics
283  if(is_uncatdV)
284  return error(cat,HTXS::VH_IDENTIFICATION,"Failed to identify associated V-boson!");
285 
286  /*****
287  * Step 4.
288  * Classify and save output
289  */
290 
291  // Apply the categorization categorization
292  cat.isZ2vvDecay = false;
293  if ((prodMode == HTXS::GG2ZH || prodMode == HTXS::QQ2ZH) && !quarkDecay(cat.V) && !ChLeptonDecay(cat.V))
294  cat.isZ2vvDecay = true;
295  cat.stage0_cat = getStage0Category(prodMode, cat.higgs, cat.V);
296  cat.stage1_cat_pTjet25GeV = getStage1Category(prodMode, cat.higgs, cat.jets25, cat.V);
297  cat.stage1_cat_pTjet30GeV = getStage1Category(prodMode, cat.higgs, cat.jets30, cat.V);
298  cat.stage1_1_cat_pTjet25GeV = getStage1_1_Category(prodMode, cat.higgs, cat.jets25, cat.V);
299  cat.stage1_1_cat_pTjet30GeV = getStage1_1_Category(prodMode, cat.higgs, cat.jets30, cat.V);
300  cat.stage1_1_fine_cat_pTjet25GeV = getStage1_1_Fine_Category(prodMode, cat.higgs, cat.jets25, cat.V);
301  cat.stage1_1_fine_cat_pTjet30GeV = getStage1_1_Fine_Category(prodMode, cat.higgs, cat.jets30, cat.V);
302  cat.stage1_2_cat_pTjet25GeV = getStage1_2_Category(prodMode, cat.higgs, cat.jets25, cat.V);
303  cat.stage1_2_cat_pTjet30GeV = getStage1_2_Category(prodMode, cat.higgs, cat.jets30, cat.V);
304  cat.stage1_2_fine_cat_pTjet25GeV = getStage1_2_Fine_Category(prodMode, cat.higgs, cat.jets25, cat.V);
305  cat.stage1_2_fine_cat_pTjet30GeV = getStage1_2_Fine_Category(prodMode, cat.higgs, cat.jets30, cat.V);
306 
307  cat.errorCode = HTXS::SUCCESS;
309 
310  return cat;
311  }
std::map< HTXS::ErrorCode, size_t > m_errorCount
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
failed to identify associated vector boson
HTXS::Stage1_2_Fine::Category getStage1_2_Fine_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
Stage-1.2 Fine categorization.
successful classification
bool hasParent(const GenParticle *ptcl, int pdgID)
Checks whether the input particle has a parent with a given PDGID.
HTXS::Stage1::Category getStage1Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
Stage-1 categorization.
failed to identify Higgs boson decay products
HTXS::Stage1_1::Category getStage1_1_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
Stage-1.1 categorization.
bool ChLeptonDecay(const Particle &p)
Return true if particle decays to charged leptons.
def cat(path)
Definition: eostools.py:400
HTXS::Stage1_1_Fine::Category getStage1_1_Fine_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
Stage-1_1 categorization.
bool hasChild(const GenParticle *ptcl, int pdgID)
Checks whether the input particle has a child with a given PDGID.
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Particle getLastInstance(Particle ptcl)
follow a "propagating" particle and return its last instance
failed to identify associated vector boson decay products
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
failed to identify Higgs boson
failed to identify hard scatter vertex
HTXS::Stage0::Category getStage0Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Particle &V)
Stage-0 HTXS categorization.
HiggsClassification error(HiggsClassification &cat, HTXS::ErrorCode err, std::string msg="", int NmaxWarnings=20)
Returns the classification object with the error code set. Prints an warning message, and keeps track of number of errors.
bool originateFrom(const Particle &p, const Particles &ptcls)
Whether particle p originate from any of the ptcls.
HTXS::Stage1_2::Category getStage1_2_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V)
Stage-1.2 categorization.
production mode not defined
Definition: event.py:1
failed to identify top decay
HiggsClassification Rivet::HiggsTemplateCrossSections::error ( HiggsClassification &  cat,
HTXS::ErrorCode  err,
std::string  msg = "",
int  NmaxWarnings = 20 
)
inline

Returns the classification object with the error code set. Prints an warning message, and keeps track of number of errors.

Definition at line 97 of file HiggsTemplateCrossSections.cc.

References eostools::cat(), m_errorCount, and mps_check::msg.

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag(), and classifyEvent().

98  {
99  // Set the error, and keep statistics
100  cat.errorCode = err;
101  ++m_errorCount[err];
102 
103  // Print warning message to the screen/log
104  static std::atomic<int> Nwarnings{0};
105  if ( !msg.empty() && ++Nwarnings < NmaxWarnings )
106  MSG_WARNING(msg);
107 
108  return cat;
109  }
std::map< HTXS::ErrorCode, size_t > m_errorCount
def cat(path)
Definition: eostools.py:400
tuple msg
Definition: mps_check.py:277
void Rivet::HiggsTemplateCrossSections::finalize ( void  )
inlineoverride

Definition at line 953 of file HiggsTemplateCrossSections.cc.

References create_public_lumi_plots::hist, hist_deltay_jj, hist_dijet_mass, hist_Njets25, hist_Njets30, hist_pT_Higgs, hist_pT_Hjj, hist_pT_jet1, hist_pT_V, hist_stage0, hist_stage1_2_fine_pTjet25, hist_stage1_2_fine_pTjet30, hist_stage1_2_pTjet25, hist_stage1_2_pTjet30, hist_stage1_pTjet25, hist_stage1_pTjet30, hist_y_Higgs, m_sumw, printClassificationSummary(), and Scenarios_cff::scale.

953  {
955  double sf = m_sumw > 0 ? 1.0 / m_sumw : 1.0;
956  for (auto hist : {hist_stage0,
963  hist_Njets25,
964  hist_Njets30,
966  hist_y_Higgs,
967  hist_pT_V,
968  hist_pT_jet1,
971  hist_pT_Hjj})
972  scale(hist, sf);
973  }
int Rivet::HiggsTemplateCrossSections::getBin ( double  x,
std::vector< double >  bins 
)
inline

Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.

Definition at line 320 of file HiggsTemplateCrossSections.cc.

References mps_fire::i.

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl(), getStage1_1_Category(), getStage1_1_Fine_Category(), getStage1_2_Category(), getStage1_2_Fine_Category(), and getStage1Category().

320  {
321  for (size_t i=1;i<bins.size();++i)
322  if (x<bins[i]) return i-1;
323  return bins.size()-1;
324  }
Particle Rivet::HiggsTemplateCrossSections::getLastInstance ( Particle  ptcl)
inline

follow a "propagating" particle and return its last instance

Definition at line 36 of file HiggsTemplateCrossSections.cc.

References hasChild().

Referenced by classifyEvent().

36  {
37  if ( ptcl.genParticle()->end_vertex() ) {
38  if ( !hasChild(ptcl.genParticle(),ptcl.pdgId()) ) return ptcl;
39  else return getLastInstance(ptcl.children()[0]);
40  }
41  return ptcl;
42  }
bool hasChild(const GenParticle *ptcl, int pdgID)
Checks whether the input particle has a child with a given PDGID.
Particle getLastInstance(Particle ptcl)
follow a "propagating" particle and return its last instance
HTXS::Stage0::Category Rivet::HiggsTemplateCrossSections::getStage0Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Particle V 
)
inline

Stage-0 HTXS categorization.

Definition at line 380 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::GG2ZH, HTXS::GGF, HTXS::QQ2ZH, quarkDecay(), HTXS::Stage0::VH2HQQ, HTXS::Stage0::VH2HQQ_FWDH, and HTXS::WH.

Referenced by classifyEvent().

382  {
383  using namespace HTXS::Stage0;
384  int ctrlHiggs = std::abs(higgs.rapidity())<2.5;
385  // Special cases first, qq→Hqq
386  if ( (prodMode==HTXS::WH||prodMode==HTXS::QQ2ZH) && quarkDecay(V) ) {
387  return ctrlHiggs ? VH2HQQ : VH2HQQ_FWDH;
388  } else if ( prodMode==HTXS::GG2ZH && quarkDecay(V) ) {
389  return Category(HTXS::GGF*10 + ctrlHiggs);
390  }
391  // General case after
392  return Category(prodMode*10 + ctrlHiggs);
393  }
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Namespace for Stage0 categorization.
HTXS::Stage1_1::Category Rivet::HiggsTemplateCrossSections::getStage1_1_Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Jets &  jets,
const Particle V 
)
inline

Stage-1.1 categorization.

Definition at line 462 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::BBH, HTXS::Stage0::BBH_FWDH, getBin(), HTXS::Stage1_1::GG2H_0J_PTH_0_10, HTXS::Stage1_1::GG2H_0J_PTH_GT10, HTXS::Stage1::GG2H_1J_PTH_0_60, HTXS::Stage0::GG2H_FWDH, HTXS::Stage1_1::GG2H_GE2J_MJJ_0_350_PTH_0_60, HTXS::Stage1_1::GG2H_MJJ_350_700_PTHJJ_0_25, HTXS::Stage1_1::GG2H_PTH_GT200, HTXS::Stage0::GG2HLL_FWDH, HTXS::Stage1_1::GG2HLL_PTV_0_75, HTXS::Stage1_1::GG2HLL_PTV_150_250_0J, HTXS::Stage1_1::GG2HLL_PTV_150_250_GE1J, HTXS::Stage1_1::GG2HLL_PTV_75_150, HTXS::Stage1_1::GG2HLL_PTV_GT250, HTXS::GG2ZH, HTXS::GGF, isVH(), ResonanceBuilder::mass, ECF_cff::Njets, HTXS::Stage0::QQ2HLL_FWDH, HTXS::Stage1_1::QQ2HLL_PTV_0_75, HTXS::Stage1::QQ2HLL_PTV_150_250_0J, HTXS::Stage1::QQ2HLL_PTV_150_250_GE1J, HTXS::Stage1_1::QQ2HLL_PTV_75_150, HTXS::Stage1::QQ2HLL_PTV_GT250, HTXS::Stage0::QQ2HLNU_FWDH, HTXS::Stage1_1::QQ2HLNU_PTV_0_75, HTXS::Stage1::QQ2HLNU_PTV_150_250_0J, HTXS::Stage1::QQ2HLNU_PTV_150_250_GE1J, HTXS::Stage1_1::QQ2HLNU_PTV_75_150, HTXS::Stage1::QQ2HLNU_PTV_GT250, HTXS::Stage1_1::QQ2HQQ_0J, HTXS::Stage1_1::QQ2HQQ_1J, HTXS::Stage1::QQ2HQQ_FWDH, HTXS::Stage1_1::QQ2HQQ_MJJ_0_60, HTXS::Stage1_1::QQ2HQQ_MJJ_120_350, HTXS::Stage1_1::QQ2HQQ_MJJ_60_120, HTXS::Stage1_1::QQ2HQQ_MJJ_GT350_PTH_GT200, HTXS::QQ2ZH, quarkDecay(), HTXS::TH, HTXS::Stage0::TH_FWDH, HTXS::TTH, HTXS::Stage0::TTH_FWDH, pat::UNKNOWN, HTXS::VBF, vbfTopology_Stage1_X(), and HTXS::WH.

Referenced by classifyEvent().

465  {
466  using namespace HTXS::Stage1_1;
467  int Njets = jets.size(), ctrlHiggs = std::abs(higgs.rapidity()) < 2.5, fwdHiggs = !ctrlHiggs;
468  int vbfTopo = vbfTopology_Stage1_X(jets, higgs);
469 
470  // 1. GGF Stage 1 categories
471  // Following YR4 write-up: XXXXX
472  if (prodMode==HTXS::GGF || (prodMode==HTXS::GG2ZH && quarkDecay(V)) ) {
473  if (fwdHiggs) return GG2H_FWDH;
474  if ( higgs.pt()>200 ) return GG2H_PTH_GT200;
475  if (Njets==0) return higgs.pt()<10 ? GG2H_0J_PTH_0_10 : GG2H_0J_PTH_GT10;
476  if (Njets==1) return Category(GG2H_1J_PTH_0_60+getBin(higgs.pt(),{0,60,120,200}));
477  if (Njets>1){
478  //VBF topology
479  if(vbfTopo) return Category(GG2H_MJJ_350_700_PTHJJ_0_25+vbfTopo-1);
480  //Njets >= 2jets without VBF topology (mjj<350)
481  return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60+getBin(higgs.pt(),{0,60,120,200}));
482  }
483  }
484 
485  // 2. Electroweak qq->Hqq Stage 1.1 categories
486  else if (prodMode==HTXS::VBF || ( isVH(prodMode) && quarkDecay(V)) ) {
487  if (std::abs(higgs.rapidity())>2.5) return QQ2HQQ_FWDH;
488  int Njets=jets.size();
489  if (Njets==0) return QQ2HQQ_0J;
490  else if (Njets==1) return QQ2HQQ_1J;
491  else if (Njets>=2) {
492  double mjj = (jets[0].mom()+jets[1].mom()).mass();
493  if ( mjj < 60 ) return QQ2HQQ_MJJ_0_60;
494  else if ( 60 < mjj && mjj < 120 ) return QQ2HQQ_MJJ_60_120;
495  else if ( 120 < mjj && mjj < 350 ) return QQ2HQQ_MJJ_120_350;
496  else if ( mjj > 350 ) {
497  if (higgs.pt()>200) return QQ2HQQ_MJJ_GT350_PTH_GT200;
498  if(vbfTopo) return Category(QQ2HQQ_MJJ_GT350_PTH_GT200+vbfTopo);
499  }
500  }
501  }
502  // 3. WH->Hlv categories
503  else if (prodMode==HTXS::WH) {
504  if (fwdHiggs) return QQ2HLNU_FWDH;
505  else if (V.pt()<75) return QQ2HLNU_PTV_0_75;
506  else if (V.pt()<150) return QQ2HLNU_PTV_75_150;
507  else if (V.pt()>250) return QQ2HLNU_PTV_GT250;
508  // 150 < pTV/GeV < 250
510  }
511  // 4. qq->ZH->llH categories
512  else if (prodMode==HTXS::QQ2ZH) {
513  if (fwdHiggs) return QQ2HLL_FWDH;
514  else if (V.pt()<75) return QQ2HLL_PTV_0_75;
515  else if (V.pt()<150) return QQ2HLL_PTV_75_150;
516  else if (V.pt()>250) return QQ2HLL_PTV_GT250;
517  // 150 < pTV/GeV < 250
519  }
520  // 5. gg->ZH->llH categories
521  else if (prodMode==HTXS::GG2ZH ) {
522  if (fwdHiggs) return GG2HLL_FWDH;
523  else if (V.pt()<75) return GG2HLL_PTV_0_75;
524  else if (V.pt()<150) return GG2HLL_PTV_75_150;
525  else if (V.pt()>250) return GG2HLL_PTV_GT250;
527  }
528  // 6.ttH,bbH,tH categories
529  else if (prodMode==HTXS::TTH) return Category(TTH_FWDH+ctrlHiggs);
530  else if (prodMode==HTXS::BBH) return Category(BBH_FWDH+ctrlHiggs);
531  else if (prodMode==HTXS::TH ) return Category(TH_FWDH+ctrlHiggs);
532  return UNKNOWN;
533  }
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
int getBin(double x, std::vector< double > bins)
Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int vbfTopology_Stage1_X(const Jets &jets, const Particle &higgs)
VBF topology selection Stage1.1 and Stage1.2 0 = fail loose selection: m_jj > 350 GeV 1 pass loose...
HTXS::Stage1_1_Fine::Category Rivet::HiggsTemplateCrossSections::getStage1_1_Fine_Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Jets &  jets,
const Particle V 
)
inline

Stage-1_1 categorization.

Definition at line 536 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::BBH, HTXS::Stage0::BBH_FWDH, getBin(), HTXS::Stage1_1::GG2H_0J_PTH_0_10, HTXS::Stage1_1::GG2H_0J_PTH_GT10, HTXS::Stage1::GG2H_1J_PTH_0_60, HTXS::Stage0::GG2H_FWDH, HTXS::Stage1_1_Fine::GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25, HTXS::Stage1_1_Fine::GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25, HTXS::Stage1_1::GG2H_MJJ_350_700_PTHJJ_0_25, HTXS::Stage1_1::GG2H_PTH_GT200, HTXS::Stage0::GG2HLL_FWDH, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_0J, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_1J, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_GE2J, HTXS::GG2ZH, HTXS::GGF, isVH(), ResonanceBuilder::mass, ECF_cff::Njets, EnergyCorrector::pt, HTXS::Stage0::QQ2HLL_FWDH, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_0J, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_1J, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_GE2J, HTXS::Stage0::QQ2HLNU_FWDH, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_0J, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_1J, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_GE2J, HTXS::Stage1_1::QQ2HQQ_0J, HTXS::Stage1_1::QQ2HQQ_1J, HTXS::Stage1::QQ2HQQ_FWDH, HTXS::Stage1_1_Fine::QQ2HQQ_MJJ_0_60_PTHJJ_0_25, HTXS::Stage1_1_Fine::QQ2HQQ_MJJ_0_60_PTHJJ_GT25, HTXS::Stage1_1::QQ2HQQ_MJJ_350_700_PTHJJ_0_25, HTXS::Stage1_1_Fine::QQ2HQQ_PTH_GT200_MJJ_350_700_PTHJJ_0_25, HTXS::QQ2ZH, quarkDecay(), HTXS::TH, HTXS::Stage0::TH_FWDH, HTXS::TTH, HTXS::Stage0::TTH_FWDH, pat::UNKNOWN, HTXS::VBF, vbfTopology_Stage1_X_Fine(), and HTXS::WH.

Referenced by classifyEvent().

539  {
540  using namespace HTXS::Stage1_1_Fine;
541  int Njets = jets.size(), ctrlHiggs = std::abs(higgs.rapidity()) < 2.5, fwdHiggs = !ctrlHiggs;
542  int vbfTopo = vbfTopology_Stage1_X_Fine(jets, higgs);
543 
544  // 1. GGF Stage 1.1 categories
545  // Following YR4 write-up: XXXXX
546  if (prodMode==HTXS::GGF || (prodMode==HTXS::GG2ZH && quarkDecay(V)) ) {
547  if (fwdHiggs) return GG2H_FWDH;
548  if ( higgs.pt()>200 ) return GG2H_PTH_GT200;
549  if (Njets==0) return higgs.pt()<10 ? GG2H_0J_PTH_0_10 : GG2H_0J_PTH_GT10;
550  if (Njets==1) return Category(GG2H_1J_PTH_0_60+getBin(higgs.pt(),{0,60,120,200}));
551  if (Njets>1){
552  //double mjj = (jets[0].mom()+jets[1].mom()).mass();
553  double pTHjj = (jets[0].momentum()+jets[1].momentum()+higgs.momentum()).pt();
554  //VBF topology
555  if(vbfTopo) return Category(GG2H_MJJ_350_700_PTHJJ_0_25+vbfTopo-1);
556  //Njets >= 2jets without VBF topology (mjj<350)
557  if (pTHjj<25) return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25+getBin(higgs.pt(),{0,60,120,200}));
558  else return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25+getBin(higgs.pt(),{0,60,120,200}));
559  }
560  }
561 
562  // 2. Electroweak qq->Hqq Stage 1.1 categories
563  else if (prodMode==HTXS::VBF || ( isVH(prodMode) && quarkDecay(V)) ) {
564  if (std::abs(higgs.rapidity())>2.5) return QQ2HQQ_FWDH;
565  int Njets=jets.size();
566  if (Njets==0) return QQ2HQQ_0J;
567  else if (Njets==1) return QQ2HQQ_1J;
568  else if (Njets>=2) {
569  double mjj = (jets[0].mom()+jets[1].mom()).mass();
570  double pTHjj = (jets[0].momentum()+jets[1].momentum()+higgs.momentum()).pt();
571  if (mjj<350){
572  if (pTHjj<25) return Category(QQ2HQQ_MJJ_0_60_PTHJJ_0_25+getBin(mjj,{0,60,120,350}));
573  else return Category(QQ2HQQ_MJJ_0_60_PTHJJ_GT25+getBin(mjj,{0,60,120,350}));
574  } else { //mjj>350 GeV
575  if (higgs.pt()<200){
576  return Category(QQ2HQQ_MJJ_350_700_PTHJJ_0_25+vbfTopo-1);
577  } else {
579  }
580  }
581  }
582  }
583  // 3. WH->Hlv categories
584  else if (prodMode==HTXS::WH) {
585  if (fwdHiggs) return QQ2HLNU_FWDH;
586  int Njets=jets.size();
587  if (Njets==0) return Category(QQ2HLNU_PTV_0_75_0J+getBin(V.pt(),{0,75,150,250,400}));
588  if (Njets==1) return Category(QQ2HLNU_PTV_0_75_1J+getBin(V.pt(),{0,75,150,250,400}));
589  return Category(QQ2HLNU_PTV_0_75_GE2J+getBin(V.pt(),{0,75,150,250,400}));
590  }
591  // 4. qq->ZH->llH categories
592  else if (prodMode==HTXS::QQ2ZH) {
593  if (fwdHiggs) return QQ2HLL_FWDH;
594  int Njets=jets.size();
595  if (Njets==0) return Category(QQ2HLL_PTV_0_75_0J+getBin(V.pt(),{0,75,150,250,400}));
596  if (Njets==1) return Category(QQ2HLL_PTV_0_75_1J+getBin(V.pt(),{0,75,150,250,400}));
597  return Category(QQ2HLL_PTV_0_75_GE2J+getBin(V.pt(),{0,75,150,250,400}));
598  }
599  // 5. gg->ZH->llH categories
600  else if (prodMode==HTXS::GG2ZH ) {
601  if (fwdHiggs) return GG2HLL_FWDH;
602  int Njets=jets.size();
603  if (Njets==0) return Category(GG2HLL_PTV_0_75_0J+getBin(V.pt(),{0,75,150,250,400}));
604  if (Njets==1) return Category(GG2HLL_PTV_0_75_1J+getBin(V.pt(),{0,75,150,250,400}));
605  return Category(GG2HLL_PTV_0_75_GE2J+getBin(V.pt(),{0,75,150,250,400}));
606  }
607  // 6.ttH,bbH,tH categories
608  else if (prodMode==HTXS::TTH) return Category(TTH_FWDH+ctrlHiggs);
609  else if (prodMode==HTXS::BBH) return Category(BBH_FWDH+ctrlHiggs);
610  else if (prodMode==HTXS::TH ) return Category(TH_FWDH+ctrlHiggs);
611  return UNKNOWN;
612  }
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
int getBin(double x, std::vector< double > bins)
Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.
int vbfTopology_Stage1_X_Fine(const Jets &jets, const Particle &higgs)
VBF topology selection for Stage1.1 and Stage 1.2 Fine 0 = fail loose selection: m_jj > 350 GeV 1 pas...
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HTXS::Stage1_2::Category Rivet::HiggsTemplateCrossSections::getStage1_2_Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Jets &  jets,
const Particle V 
)
inline

Stage-1.2 categorization.

Definition at line 615 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::BBH, HTXS::Stage0::BBH_FWDH, getBin(), HTXS::Stage1_1::GG2H_0J_PTH_0_10, HTXS::Stage1_1::GG2H_0J_PTH_GT10, HTXS::Stage1::GG2H_1J_PTH_0_60, HTXS::Stage0::GG2H_FWDH, HTXS::Stage1_1::GG2H_GE2J_MJJ_0_350_PTH_0_60, HTXS::Stage1_2::GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25, HTXS::Stage1_2::GG2H_PTH_200_300, HTXS::Stage0::GG2HLL_FWDH, HTXS::Stage1_1::GG2HLL_PTV_0_75, HTXS::Stage1_1::GG2HLL_PTV_150_250_0J, HTXS::Stage1_1::GG2HLL_PTV_150_250_GE1J, HTXS::Stage1_1::GG2HLL_PTV_75_150, HTXS::Stage1_1::GG2HLL_PTV_GT250, HTXS::GG2ZH, HTXS::GGF, isVH(), ResonanceBuilder::mass, ECF_cff::Njets, HTXS::Stage0::QQ2HLL_FWDH, HTXS::Stage1_1::QQ2HLL_PTV_0_75, HTXS::Stage1::QQ2HLL_PTV_150_250_0J, HTXS::Stage1::QQ2HLL_PTV_150_250_GE1J, HTXS::Stage1_1::QQ2HLL_PTV_75_150, HTXS::Stage1::QQ2HLL_PTV_GT250, HTXS::Stage0::QQ2HLNU_FWDH, HTXS::Stage1_1::QQ2HLNU_PTV_0_75, HTXS::Stage1::QQ2HLNU_PTV_150_250_0J, HTXS::Stage1::QQ2HLNU_PTV_150_250_GE1J, HTXS::Stage1_1::QQ2HLNU_PTV_75_150, HTXS::Stage1::QQ2HLNU_PTV_GT250, HTXS::Stage1_1::QQ2HQQ_0J, HTXS::Stage1_1::QQ2HQQ_1J, HTXS::Stage1::QQ2HQQ_FWDH, HTXS::Stage1_2::QQ2HQQ_GE2J_MJJ_0_60, HTXS::Stage1_2::QQ2HQQ_GE2J_MJJ_120_350, HTXS::Stage1_2::QQ2HQQ_GE2J_MJJ_60_120, HTXS::Stage1_2::QQ2HQQ_GE2J_MJJ_GT350_PTH_GT200, HTXS::QQ2ZH, quarkDecay(), HTXS::TH, HTXS::Stage0::TH_FWDH, HTXS::TTH, HTXS::Stage0::TTH_FWDH, HTXS::Stage1_2::TTH_PTH_0_60, pat::UNKNOWN, HTXS::VBF, vbfTopology_Stage1_X(), and HTXS::WH.

Referenced by classifyEvent().

618  {
619  using namespace HTXS::Stage1_2;
620  int Njets = jets.size(), ctrlHiggs = std::abs(higgs.rapidity()) < 2.5, fwdHiggs = !ctrlHiggs;
621  int vbfTopo = vbfTopology_Stage1_X(jets, higgs);
622 
623  // 1. GGF Stage 1 categories
624  // Following YR4 write-up: XXXXX
625  if (prodMode == HTXS::GGF || (prodMode == HTXS::GG2ZH && quarkDecay(V))) {
626  if (fwdHiggs)
627  return GG2H_FWDH;
628  if (higgs.pt() > 200)
629  return Category(GG2H_PTH_200_300 + getBin(higgs.pt(), {200, 300, 450, 650}));
630  if (Njets == 0)
631  return higgs.pt() < 10 ? GG2H_0J_PTH_0_10 : GG2H_0J_PTH_GT10;
632  if (Njets == 1)
633  return Category(GG2H_1J_PTH_0_60 + getBin(higgs.pt(), {0, 60, 120, 200}));
634  if (Njets > 1) {
635  //VBF topology
636  if (vbfTopo)
638  //Njets >= 2jets without VBF topology (mjj<350)
639  return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60 + getBin(higgs.pt(), {0, 60, 120, 200}));
640  }
641  }
642 
643  // 2. Electroweak qq->Hqq Stage 1.2 categories
644  else if (prodMode == HTXS::VBF || (isVH(prodMode) && quarkDecay(V))) {
645  if (std::abs(higgs.rapidity()) > 2.5)
646  return QQ2HQQ_FWDH;
647  int Njets = jets.size();
648  if (Njets == 0)
649  return QQ2HQQ_0J;
650  else if (Njets == 1)
651  return QQ2HQQ_1J;
652  else if (Njets >= 2) {
653  double mjj = (jets[0].mom() + jets[1].mom()).mass();
654  if (mjj < 60)
655  return QQ2HQQ_GE2J_MJJ_0_60;
656  else if (60 < mjj && mjj < 120)
657  return QQ2HQQ_GE2J_MJJ_60_120;
658  else if (120 < mjj && mjj < 350)
660  else if (mjj > 350) {
661  if (higgs.pt() > 200)
663  if (vbfTopo)
664  return Category(QQ2HQQ_GE2J_MJJ_GT350_PTH_GT200 + vbfTopo);
665  }
666  }
667  }
668  // 3. WH->Hlv categories
669  else if (prodMode == HTXS::WH) {
670  if (fwdHiggs)
671  return QQ2HLNU_FWDH;
672  else if (V.pt() < 75)
673  return QQ2HLNU_PTV_0_75;
674  else if (V.pt() < 150)
675  return QQ2HLNU_PTV_75_150;
676  else if (V.pt() > 250)
677  return QQ2HLNU_PTV_GT250;
678  // 150 < pTV/GeV < 250
680  }
681  // 4. qq->ZH->llH categories
682  else if (prodMode == HTXS::QQ2ZH) {
683  if (fwdHiggs)
684  return QQ2HLL_FWDH;
685  else if (V.pt() < 75)
686  return QQ2HLL_PTV_0_75;
687  else if (V.pt() < 150)
688  return QQ2HLL_PTV_75_150;
689  else if (V.pt() > 250)
690  return QQ2HLL_PTV_GT250;
691  // 150 < pTV/GeV < 250
693  }
694  // 5. gg->ZH->llH categories
695  else if (prodMode == HTXS::GG2ZH) {
696  if (fwdHiggs)
697  return GG2HLL_FWDH;
698  else if (V.pt() < 75)
699  return GG2HLL_PTV_0_75;
700  else if (V.pt() < 150)
701  return GG2HLL_PTV_75_150;
702  else if (V.pt() > 250)
703  return GG2HLL_PTV_GT250;
705  }
706  // 6.ttH,bbH,tH categories
707  else if (prodMode == HTXS::TTH) {
708  if (fwdHiggs)
709  return TTH_FWDH;
710  else
711  return Category(TTH_PTH_0_60 + getBin(higgs.pt(), {0, 60, 120, 200, 300}));
712  } else if (prodMode == HTXS::BBH)
713  return Category(BBH_FWDH + ctrlHiggs);
714  else if (prodMode == HTXS::TH)
715  return Category(TH_FWDH + ctrlHiggs);
716  return UNKNOWN;
717  }
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
int getBin(double x, std::vector< double > bins)
Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int vbfTopology_Stage1_X(const Jets &jets, const Particle &higgs)
VBF topology selection Stage1.1 and Stage1.2 0 = fail loose selection: m_jj > 350 GeV 1 pass loose...
HTXS::Stage1_2_Fine::Category Rivet::HiggsTemplateCrossSections::getStage1_2_Fine_Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Jets &  jets,
const Particle V 
)
inline

Stage-1.2 Fine categorization.

Definition at line 720 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::BBH, HTXS::Stage0::BBH_FWDH, getBin(), HTXS::Stage1_1::GG2H_0J_PTH_0_10, HTXS::Stage1_1::GG2H_0J_PTH_GT10, HTXS::Stage1::GG2H_1J_PTH_0_60, HTXS::Stage0::GG2H_FWDH, HTXS::Stage1_1_Fine::GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25, HTXS::Stage1_1_Fine::GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25, HTXS::Stage1_2::GG2H_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25, HTXS::Stage1_2_Fine::GG2H_PTH_200_300_PTHJoverPTH_0_15, HTXS::Stage1_2_Fine::GG2H_PTH_200_300_PTHJoverPTH_GT15, HTXS::Stage0::GG2HLL_FWDH, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_0J, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_1J, HTXS::Stage1_1_Fine::GG2HLL_PTV_0_75_GE2J, HTXS::GG2ZH, HTXS::GGF, isVH(), ResonanceBuilder::mass, ECF_cff::Njets, EnergyCorrector::pt, HTXS::Stage0::QQ2HLL_FWDH, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_0J, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_1J, HTXS::Stage1_1_Fine::QQ2HLL_PTV_0_75_GE2J, HTXS::Stage0::QQ2HLNU_FWDH, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_0J, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_1J, HTXS::Stage1_1_Fine::QQ2HLNU_PTV_0_75_GE2J, HTXS::Stage1_1::QQ2HQQ_0J, HTXS::Stage1_1::QQ2HQQ_1J, HTXS::Stage1::QQ2HQQ_FWDH, HTXS::Stage1_2_Fine::QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_0_25, HTXS::Stage1_2_Fine::QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_GT25, HTXS::Stage1_2::QQ2HQQ_GE2J_MJJ_350_700_PTH_0_200_PTHJJ_0_25, HTXS::Stage1_2_Fine::QQ2HQQ_GE2J_MJJ_350_700_PTH_GT200_PTHJJ_0_25, HTXS::QQ2ZH, quarkDecay(), HTXS::TH, HTXS::Stage0::TH_FWDH, HTXS::TTH, HTXS::Stage0::TTH_FWDH, HTXS::Stage1_2::TTH_PTH_0_60, pat::UNKNOWN, HTXS::VBF, vbfTopology_Stage1_X_Fine(), and HTXS::WH.

Referenced by classifyEvent().

723  {
724  using namespace HTXS::Stage1_2_Fine;
725  int Njets = jets.size(), ctrlHiggs = std::abs(higgs.rapidity()) < 2.5, fwdHiggs = !ctrlHiggs;
726  int vbfTopo = vbfTopology_Stage1_X_Fine(jets, higgs);
727 
728  // 1. GGF Stage 1.2 categories
729  // Following YR4 write-up: XXXXX
730  if (prodMode == HTXS::GGF || (prodMode == HTXS::GG2ZH && quarkDecay(V))) {
731  if (fwdHiggs)
732  return GG2H_FWDH;
733  if (higgs.pt() > 200) {
734  if (Njets > 0) {
735  double pTHj = (jets[0].momentum() + higgs.momentum()).pt();
736  if (pTHj / higgs.pt() > 0.15)
737  return Category(GG2H_PTH_200_300_PTHJoverPTH_GT15 + getBin(higgs.pt(), {200, 300, 450, 650}));
738  else
739  return Category(GG2H_PTH_200_300_PTHJoverPTH_0_15 + getBin(higgs.pt(), {200, 300, 450, 650}));
740  } else
741  return Category(GG2H_PTH_200_300_PTHJoverPTH_0_15 + getBin(higgs.pt(), {200, 300, 450, 650}));
742  }
743  if (Njets == 0)
744  return higgs.pt() < 10 ? GG2H_0J_PTH_0_10 : GG2H_0J_PTH_GT10;
745  if (Njets == 1)
746  return Category(GG2H_1J_PTH_0_60 + getBin(higgs.pt(), {0, 60, 120, 200}));
747  if (Njets > 1) {
748  //double mjj = (jets[0].mom()+jets[1].mom()).mass();
749  double pTHjj = (jets[0].momentum() + jets[1].momentum() + higgs.momentum()).pt();
750  //VBF topology
751  if (vbfTopo)
753  //Njets >= 2jets without VBF topology (mjj<350)
754  if (pTHjj < 25)
755  return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_0_25 + getBin(higgs.pt(), {0, 60, 120, 200}));
756  else
757  return Category(GG2H_GE2J_MJJ_0_350_PTH_0_60_PTHJJ_GT25 + getBin(higgs.pt(), {0, 60, 120, 200}));
758  }
759  }
760 
761  // 2. Electroweak qq->Hqq Stage 1.2 categories
762  else if (prodMode == HTXS::VBF || (isVH(prodMode) && quarkDecay(V))) {
763  if (std::abs(higgs.rapidity()) > 2.5)
764  return QQ2HQQ_FWDH;
765  int Njets = jets.size();
766  if (Njets == 0)
767  return QQ2HQQ_0J;
768  else if (Njets == 1)
769  return QQ2HQQ_1J;
770  else if (Njets >= 2) {
771  double mjj = (jets[0].mom() + jets[1].mom()).mass();
772  double pTHjj = (jets[0].momentum() + jets[1].momentum() + higgs.momentum()).pt();
773  if (mjj < 350) {
774  if (pTHjj < 25)
775  return Category(QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_0_25 + getBin(mjj, {0, 60, 120, 350}));
776  else
777  return Category(QQ2HQQ_GE2J_MJJ_0_60_PTHJJ_GT25 + getBin(mjj, {0, 60, 120, 350}));
778  } else { //mjj>350 GeV
779  if (higgs.pt() < 200) {
781  } else {
783  }
784  }
785  }
786  }
787  // 3. WH->Hlv categories
788  else if (prodMode == HTXS::WH) {
789  if (fwdHiggs)
790  return QQ2HLNU_FWDH;
791  int Njets = jets.size();
792  if (Njets == 0)
793  return Category(QQ2HLNU_PTV_0_75_0J + getBin(V.pt(), {0, 75, 150, 250, 400}));
794  if (Njets == 1)
795  return Category(QQ2HLNU_PTV_0_75_1J + getBin(V.pt(), {0, 75, 150, 250, 400}));
796  return Category(QQ2HLNU_PTV_0_75_GE2J + getBin(V.pt(), {0, 75, 150, 250, 400}));
797  }
798  // 4. qq->ZH->llH categories
799  else if (prodMode == HTXS::QQ2ZH) {
800  if (fwdHiggs)
801  return QQ2HLL_FWDH;
802  int Njets = jets.size();
803  if (Njets == 0)
804  return Category(QQ2HLL_PTV_0_75_0J + getBin(V.pt(), {0, 75, 150, 250, 400}));
805  if (Njets == 1)
806  return Category(QQ2HLL_PTV_0_75_1J + getBin(V.pt(), {0, 75, 150, 250, 400}));
807  return Category(QQ2HLL_PTV_0_75_GE2J + getBin(V.pt(), {0, 75, 150, 250, 400}));
808  }
809  // 5. gg->ZH->llH categories
810  else if (prodMode == HTXS::GG2ZH) {
811  if (fwdHiggs)
812  return GG2HLL_FWDH;
813  int Njets = jets.size();
814  if (Njets == 0)
815  return Category(GG2HLL_PTV_0_75_0J + getBin(V.pt(), {0, 75, 150, 250, 400}));
816  if (Njets == 1)
817  return Category(GG2HLL_PTV_0_75_1J + getBin(V.pt(), {0, 75, 150, 250, 400}));
818  return Category(GG2HLL_PTV_0_75_GE2J + getBin(V.pt(), {0, 75, 150, 250, 400}));
819  }
820  // 6.ttH,bbH,tH categories
821  else if (prodMode == HTXS::TTH) {
822  if (fwdHiggs)
823  return TTH_FWDH;
824  else
825  return Category(TTH_PTH_0_60 + getBin(higgs.pt(), {0, 60, 120, 200, 300, 450}));
826  } else if (prodMode == HTXS::BBH)
827  return Category(BBH_FWDH + ctrlHiggs);
828  else if (prodMode == HTXS::TH)
829  return Category(TH_FWDH + ctrlHiggs);
830  return UNKNOWN;
831  }
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
int getBin(double x, std::vector< double > bins)
Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.
int vbfTopology_Stage1_X_Fine(const Jets &jets, const Particle &higgs)
VBF topology selection for Stage1.1 and Stage 1.2 Fine 0 = fail loose selection: m_jj > 350 GeV 1 pas...
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HTXS::Stage1::Category Rivet::HiggsTemplateCrossSections::getStage1Category ( const HTXS::HiggsProdMode  prodMode,
const Particle higgs,
const Jets &  jets,
const Particle V 
)
inline

Stage-1 categorization.

Definition at line 396 of file HiggsTemplateCrossSections.cc.

References funct::abs(), HTXS::BBH, HTXS::Stage0::BBH_FWDH, getBin(), HTXS::Stage1::GG2H_0J, HTXS::Stage1::GG2H_1J_PTH_0_60, HTXS::Stage0::GG2H_FWDH, HTXS::Stage1::GG2H_GE2J_PTH_0_60, HTXS::Stage1::GG2H_VBFTOPO_JET3, HTXS::Stage1::GG2H_VBFTOPO_JET3VETO, HTXS::Stage0::GG2HLL_FWDH, HTXS::Stage1::GG2HLL_PTV_0_150, HTXS::Stage1::GG2HLL_PTV_GT150_0J, HTXS::Stage1::GG2HLL_PTV_GT150_GE1J, HTXS::GG2ZH, HTXS::GGF, isVH(), ResonanceBuilder::mass, ECF_cff::Njets, HTXS::Stage0::QQ2HLL_FWDH, HTXS::Stage1::QQ2HLL_PTV_0_150, HTXS::Stage1::QQ2HLL_PTV_150_250_0J, HTXS::Stage1::QQ2HLL_PTV_150_250_GE1J, HTXS::Stage1::QQ2HLL_PTV_GT250, HTXS::Stage0::QQ2HLNU_FWDH, HTXS::Stage1::QQ2HLNU_PTV_0_150, HTXS::Stage1::QQ2HLNU_PTV_150_250_0J, HTXS::Stage1::QQ2HLNU_PTV_150_250_GE1J, HTXS::Stage1::QQ2HLNU_PTV_GT250, HTXS::Stage1::QQ2HQQ_FWDH, HTXS::Stage1::QQ2HQQ_PTJET1_GT200, HTXS::Stage1::QQ2HQQ_REST, HTXS::Stage1::QQ2HQQ_VBFTOPO_JET3, HTXS::Stage1::QQ2HQQ_VBFTOPO_JET3VETO, HTXS::Stage1::QQ2HQQ_VH2JET, HTXS::QQ2ZH, quarkDecay(), HTXS::TH, HTXS::Stage0::TH_FWDH, HTXS::TTH, HTXS::Stage0::TTH_FWDH, pat::UNKNOWN, HTXS::VBF, vbfTopology(), and HTXS::WH.

Referenced by classifyEvent().

399  {
400  using namespace HTXS::Stage1;
401  int Njets=jets.size(), ctrlHiggs = std::abs(higgs.rapidity())<2.5, fwdHiggs = !ctrlHiggs;
402  double pTj1 = !jets.empty() ? jets[0].momentum().pt() : 0;
403  int vbfTopo = vbfTopology(jets,higgs);
404 
405  // 1. GGF Stage 1 categories
406  // Following YR4 write-up: XXXXX
407  if (prodMode==HTXS::GGF || (prodMode==HTXS::GG2ZH && quarkDecay(V)) ) {
408  if (fwdHiggs) return GG2H_FWDH;
409  if (Njets==0) return GG2H_0J;
410  else if (Njets==1) return Category(GG2H_1J_PTH_0_60+getBin(higgs.pt(),{0,60,120,200}));
411  else if (Njets>=2) {
412  // events with pT_H>200 get priority over VBF cuts
413  if(higgs.pt()<=200){
414  if (vbfTopo==2) return GG2H_VBFTOPO_JET3VETO;
415  else if (vbfTopo==1) return GG2H_VBFTOPO_JET3;
416  }
417  // Njets >= 2jets without VBF topology
418  return Category(GG2H_GE2J_PTH_0_60+getBin(higgs.pt(),{0,60,120,200}));
419  }
420  }
421  // 2. Electroweak qq->Hqq Stage 1 categories
422  else if (prodMode==HTXS::VBF || ( isVH(prodMode) && quarkDecay(V)) ) {
423  if (std::abs(higgs.rapidity())>2.5) return QQ2HQQ_FWDH;
424  if (pTj1>200) return QQ2HQQ_PTJET1_GT200;
425  if (vbfTopo==2) return QQ2HQQ_VBFTOPO_JET3VETO;
426  if (vbfTopo==1) return QQ2HQQ_VBFTOPO_JET3;
427  double mjj = jets.size()>1 ? (jets[0].mom()+jets[1].mom()).mass():0;
428  if ( 60 < mjj && mjj < 120 ) return QQ2HQQ_VH2JET;
429  return QQ2HQQ_REST;
430  }
431  // 3. WH->Hlv categories
432  else if (prodMode==HTXS::WH) {
433  if (fwdHiggs) return QQ2HLNU_FWDH;
434  else if (V.pt()<150) return QQ2HLNU_PTV_0_150;
435  else if (V.pt()>250) return QQ2HLNU_PTV_GT250;
436  // 150 < pTV/GeV < 250
438  }
439  // 4. qq->ZH->llH categories
440  else if (prodMode==HTXS::QQ2ZH) {
441  if (fwdHiggs) return QQ2HLL_FWDH;
442  else if (V.pt()<150) return QQ2HLL_PTV_0_150;
443  else if (V.pt()>250) return QQ2HLL_PTV_GT250;
444  // 150 < pTV/GeV < 250
446  }
447  // 5. gg->ZH->llH categories
448  else if (prodMode==HTXS::GG2ZH ) {
449  if (fwdHiggs) return GG2HLL_FWDH;
450  if (V.pt()<150) return GG2HLL_PTV_0_150;
451  else if (jets.empty()) return GG2HLL_PTV_GT150_0J;
452  return GG2HLL_PTV_GT150_GE1J;
453  }
454  // 6.ttH,bbH,tH categories
455  else if (prodMode==HTXS::TTH) return Category(TTH_FWDH+ctrlHiggs);
456  else if (prodMode==HTXS::BBH) return Category(BBH_FWDH+ctrlHiggs);
457  else if (prodMode==HTXS::TH ) return Category(TH_FWDH+ctrlHiggs);
458  return UNKNOWN;
459  }
int vbfTopology(const Jets &jets, const Particle &higgs)
VBF topolog selection 0 = fail loose selction: m_jj > 400 GeV and Dy_jj > 2.8 1 pass loose...
bool isVH(HTXS::HiggsProdMode p)
Whether the Higgs is produced in association with a vector boson (VH)
int getBin(double x, std::vector< double > bins)
Return bin index of x given the provided bin edges. 0=first bin, -1=underflow bin.
0: Unidentified isolated particle
Definition: ParticleCode.h:19
bool quarkDecay(const Particle &p)
Return true is particle decays to quarks.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool Rivet::HiggsTemplateCrossSections::hasChild ( const GenParticle *  ptcl,
int  pdgID 
)
inline

Checks whether the input particle has a child with a given PDGID.

Definition at line 63 of file HiggsTemplateCrossSections.cc.

Referenced by classifyEvent(), and getLastInstance().

63  {
64  for (auto child:Particle(*ptcl).children()) {
65  if (child.pdgId()==pdgID) return true;
66  }
67  return false;
68  }
bool Rivet::HiggsTemplateCrossSections::hasParent ( const GenParticle *  ptcl,
int  pdgID 
)
inline

Checks whether the input particle has a parent with a given PDGID.

Definition at line 71 of file HiggsTemplateCrossSections.cc.

References class-composition::parent, parents, and HadronAndPartonSelector_cfi::particles.

Referenced by classifyEvent().

71  {
72  for (auto parent:particles(ptcl->production_vertex(),HepMC::parents))
73  if (parent->pdg_id()==pdgID) return true;
74  return false;
75  }
TPRegexp parents
Definition: eve_filter.cc:21
void Rivet::HiggsTemplateCrossSections::init ( void  )
inlineoverride

default Rivet Analysis::init method Booking of histograms, initializing Rivet projection Extracts Higgs production mode from shell variable if not set manually using setHiggsProdMode

Definition at line 845 of file HiggsTemplateCrossSections.cc.

References HTXS::BBH, HTXS::GG2ZH, HTXS::GGF, initializeHistos(), m_HiggsProdMode, m_sumw, HTXS::QQ2ZH, HTXS::TH, HTXS::TTH, HTXS::UNKNOWN, HTXS::VBF, and HTXS::WH.

845  {
846  printf("==============================================================\n");
847  printf("======== HiggsTemplateCrossSections Initialization =========\n");
848  printf("==============================================================\n");
849  // check that the production mode has been set
850  // if running in standalone Rivet the production mode is set through an env variable
852  char *pm_env = getenv("HIGGSPRODMODE");
853  string pm(pm_env==nullptr?"":pm_env);
854  if ( pm == "GGF" ) m_HiggsProdMode = HTXS::GGF;
855  else if ( pm == "VBF" ) m_HiggsProdMode = HTXS::VBF;
856  else if ( pm == "WH" ) m_HiggsProdMode = HTXS::WH;
857  else if ( pm == "ZH" ) m_HiggsProdMode = HTXS::QQ2ZH;
858  else if ( pm == "QQ2ZH" ) m_HiggsProdMode = HTXS::QQ2ZH;
859  else if ( pm == "GG2ZH" ) m_HiggsProdMode = HTXS::GG2ZH;
860  else if ( pm == "TTH" ) m_HiggsProdMode = HTXS::TTH;
861  else if ( pm == "BBH" ) m_HiggsProdMode = HTXS::BBH;
862  else if ( pm == "TH" ) m_HiggsProdMode = HTXS::TH;
863  else {
864  MSG_WARNING("No HIGGSPRODMODE shell variable found. Needed when running Rivet stand-alone.");
865  }
866  }
867 
868  // Projections for final state particles
869  const FinalState FS;
870  addProjection(FS,"FS");
871 
872  // initialize the histograms with for each of the stages
874  m_sumw = 0.0;
875  printf("==============================================================\n");
876  printf("======== Higgs prod mode %d =========\n",m_HiggsProdMode);
877  printf("======== Sucessful Initialization =========\n");
878  printf("==============================================================\n");
879  }
void Rivet::HiggsTemplateCrossSections::initializeHistos ( )
inline

Definition at line 979 of file HiggsTemplateCrossSections.cc.

References hist_deltay_jj, hist_dijet_mass, hist_isZ2vv, hist_Njets25, hist_Njets30, hist_pT_Higgs, hist_pT_Hjj, hist_pT_jet1, hist_pT_V, hist_stage0, hist_stage1_2_fine_pTjet25, hist_stage1_2_fine_pTjet30, hist_stage1_2_pTjet25, hist_stage1_2_pTjet30, hist_stage1_pTjet25, hist_stage1_pTjet30, and hist_y_Higgs.

Referenced by init().

979  {
980  hist_stage0 = bookHisto1D("HTXS_stage0",20,0,20);
981  hist_stage1_pTjet25 = bookHisto1D("HTXS_stage1_pTjet25",40,0,40);
982  hist_stage1_pTjet30 = bookHisto1D("HTXS_stage1_pTjet30",40,0,40);
983  hist_stage1_2_pTjet25 = bookHisto1D("HTXS_stage1_2_pTjet25",57,0,57);
984  hist_stage1_2_pTjet30 = bookHisto1D("HTXS_stage1_2_pTjet30",57,0,57);
985  hist_stage1_2_fine_pTjet25 = bookHisto1D("HTXS_stage1_2_fine_pTjet25",113,0,113);
986  hist_stage1_2_fine_pTjet30 = bookHisto1D("HTXS_stage1_2_fine_pTjet30",113,0,113);
987  hist_pT_Higgs = bookHisto1D("pT_Higgs",80,0,400);
988  hist_y_Higgs = bookHisto1D("y_Higgs",80,-4,4);
989  hist_pT_V = bookHisto1D("pT_V",80,0,400);
990  hist_pT_jet1 = bookHisto1D("pT_jet1",80,0,400);
991  hist_deltay_jj = bookHisto1D("deltay_jj",50,0,10);
992  hist_dijet_mass = bookHisto1D("m_jj",50,0,2000);
993  hist_pT_Hjj = bookHisto1D("pT_Hjj",50,0,250);
994  hist_Njets25 = bookHisto1D("Njets25",10,0,10);
995  hist_Njets30 = bookHisto1D("Njets30",10,0,10);
996  hist_isZ2vv = bookHisto1D("isZ2vv",2,0,2);
997  }
bool Rivet::HiggsTemplateCrossSections::isVH ( HTXS::HiggsProdMode  p)
inline
bool Rivet::HiggsTemplateCrossSections::originateFrom ( const Particle p,
const Particles &  ptcls 
)
inline

Whether particle p originate from any of the ptcls.

Definition at line 45 of file HiggsTemplateCrossSections.cc.

References HadronAndPartonSelector_cfi::particles.

Referenced by classifyEvent(), and originateFrom().

45  {
46  const GenVertex* prodVtx = p.genParticle()->production_vertex();
47  if (prodVtx == nullptr) return false;
48  // for each ancestor, check if it matches any of the input particles
49  for (const auto & ancestor:particles(prodVtx, HepMC::ancestors)){
50  for ( auto part:ptcls )
51  if ( ancestor==part.genParticle() ) return true;
52  }
53  // if we get here, no ancetor matched any input particle
54  return false;
55  }
part
Definition: HCALResponse.h:20
bool Rivet::HiggsTemplateCrossSections::originateFrom ( const Particle p,
const Particle p2 
)
inline

Whether particle p originates from p2.

Definition at line 58 of file HiggsTemplateCrossSections.cc.

References originateFrom().

58  {
59  Particles ptcls = {p2}; return originateFrom(p,ptcls);
60  }
double p2[4]
Definition: TauolaWrapper.h:90
bool originateFrom(const Particle &p, const Particles &ptcls)
Whether particle p originate from any of the ptcls.
void Rivet::HiggsTemplateCrossSections::printClassificationSummary ( )
inline

Definition at line 931 of file HiggsTemplateCrossSections.cc.

References HTXS::HIGGS_IDENTIFICATION, HTXS::HS_VTX_IDENTIFICATION, m_errorCount, HTXS::MOMENTUM_CONSERVATION, simpleEdmComparison::numEvents, HTXS::PRODMODE_DEFINED, HTXS::SUCCESS, HTXS::TOP_W_IDENTIFICATION, and HTXS::VH_IDENTIFICATION.

Referenced by finalize().

931  {
932  MSG_INFO (" ====================================================== ");
933  MSG_INFO (" Higgs Template X-Sec Categorization Tool ");
934  MSG_INFO (" Status Code Summary ");
935  MSG_INFO (" ====================================================== ");
936  bool allSuccess = (numEvents()==m_errorCount[HTXS::SUCCESS]);
937  if ( allSuccess ) MSG_INFO (" >>>> All "<< m_errorCount[HTXS::SUCCESS] <<" events successfully categorized!");
938  else{
939  MSG_INFO (" >>>> "<< m_errorCount[HTXS::SUCCESS] <<" events successfully categorized");
940  MSG_INFO (" >>>> --> the following errors occured:");
941  MSG_INFO (" >>>> "<< m_errorCount[HTXS::PRODMODE_DEFINED] <<" had an undefined Higgs production mode.");
942  MSG_INFO (" >>>> "<< m_errorCount[HTXS::MOMENTUM_CONSERVATION] <<" failed momentum conservation.");
943  MSG_INFO (" >>>> "<< m_errorCount[HTXS::HIGGS_IDENTIFICATION] <<" failed to identify a valid Higgs boson.");
944  MSG_INFO (" >>>> "<< m_errorCount[HTXS::HS_VTX_IDENTIFICATION] <<" failed to identify the hard scatter vertex.");
945  MSG_INFO (" >>>> "<< m_errorCount[HTXS::VH_IDENTIFICATION] <<" VH: to identify a valid V-boson.");
946  MSG_INFO (" >>>> "<< m_errorCount[HTXS::TOP_W_IDENTIFICATION] <<" failed to identify valid Ws from top decay.");
947  }
948  MSG_INFO (" ====================================================== ");
949  MSG_INFO (" ====================================================== ");
950  }
std::map< HTXS::ErrorCode, size_t > m_errorCount
failed to identify associated vector boson
successful classification
failed momentum conservation
failed to identify Higgs boson
failed to identify hard scatter vertex
production mode not defined
failed to identify top decay
bool Rivet::HiggsTemplateCrossSections::quarkDecay ( const Particle p)
inline

Return true is particle decays to quarks.

Definition at line 78 of file HiggsTemplateCrossSections.cc.

Referenced by classifyEvent(), getStage0Category(), getStage1_1_Category(), getStage1_1_Fine_Category(), getStage1_2_Category(), getStage1_2_Fine_Category(), and getStage1Category().

78  {
79  for (auto child:p.children()) {
80  if (PID::isQuark(child.pdgId())) return true;
81  }
82  return false;
83  }
void Rivet::HiggsTemplateCrossSections::setHiggsProdMode ( HTXS::HiggsProdMode  prodMode)
inline

Sets the Higgs production mode.

Definition at line 840 of file HiggsTemplateCrossSections.cc.

References m_HiggsProdMode.

840 { m_HiggsProdMode = prodMode; }
int Rivet::HiggsTemplateCrossSections::vbfTopology ( const Jets &  jets,
const Particle higgs 
)
inline

VBF topolog selection 0 = fail loose selction: m_jj > 400 GeV and Dy_jj > 2.8 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass tight selection.

Definition at line 329 of file HiggsTemplateCrossSections.cc.

References funct::abs(), ResonanceBuilder::mass, and EnergyCorrector::pt.

Referenced by getStage1Category().

329  {
330  if (jets.size()<2) return 0;
331  const FourMomentum &j1=jets[0].momentum(), &j2=jets[1].momentum();
332  bool VBFtopo = (j1+j2).mass() > 400.0 && std::abs(j1.rapidity()-j2.rapidity()) > 2.8;
333  return VBFtopo ? (j1+j2+higgs.momentum()).pt()<25 ? 2 : 1 : 0;
334  }
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int Rivet::HiggsTemplateCrossSections::vbfTopology_Stage1_X ( const Jets &  jets,
const Particle higgs 
)
inline

VBF topology selection Stage1.1 and Stage1.2 0 = fail loose selection: m_jj > 350 GeV 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass pT(Hjj)>25 selection 3 pass tight (m_jj>700 GeV), but fail additional cut pT(Hjj)<25. 4 pass pT(Hjj)>25 selection.

Definition at line 340 of file HiggsTemplateCrossSections.cc.

References ResonanceBuilder::mass, and EnergyCorrector::pt.

Referenced by getStage1_1_Category(), and getStage1_2_Category().

340  {
341  if (jets.size() < 2)
342  return 0;
343  const FourMomentum &j1 = jets[0].momentum(), &j2 = jets[1].momentum();
344  double mjj = (j1 + j2).mass();
345  if (mjj > 350 && mjj <= 700)
346  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 1 : 2;
347  else if (mjj > 700)
348  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 3 : 4;
349  else
350  return 0;
351  }
vector< PseudoJet > jets
int Rivet::HiggsTemplateCrossSections::vbfTopology_Stage1_X_Fine ( const Jets &  jets,
const Particle higgs 
)
inline

VBF topology selection for Stage1.1 and Stage 1.2 Fine 0 = fail loose selection: m_jj > 350 GeV 1 pass loose, but fail additional cut pT(Hjj)<25. 2 pass pT(Hjj)>25 selection 3 pass 700<m_jj<1000 GeV, but fail additional cut pT(Hjj)<25. 4 pass pT(Hjj)>25 selection 5 pass 1000<m_jj<1500 GeV, but fail additional cut pT(Hjj)<25. 6 pass pT(Hjj)>25 selection 7 pass m_jj>1500 GeV, but fail additional cut pT(Hjj)<25. 8 pass pT(Hjj)>25 selection.

Definition at line 359 of file HiggsTemplateCrossSections.cc.

References ResonanceBuilder::mass, and EnergyCorrector::pt.

Referenced by getStage1_1_Fine_Category(), and getStage1_2_Fine_Category().

359  {
360  if (jets.size() < 2)
361  return 0;
362  const FourMomentum &j1 = jets[0].momentum(), &j2 = jets[1].momentum();
363  double mjj = (j1 + j2).mass();
364  if (mjj > 350 && mjj <= 700)
365  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 1 : 2;
366  else if (mjj > 700 && mjj <= 1000)
367  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 3 : 4;
368  else if (mjj > 1000 && mjj <= 1500)
369  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 5 : 6;
370  else if (mjj > 1500)
371  return (j1 + j2 + higgs.momentum()).pt() < 25 ? 7 : 8;
372  else
373  return 0;
374  }
vector< PseudoJet > jets

Member Data Documentation

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_deltay_jj
private

Definition at line 1014 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_dijet_mass
private

Definition at line 1014 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_isZ2vv
private

Definition at line 1016 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_Njets25
private

Definition at line 1015 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_Njets30
private

Definition at line 1015 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_pT_Higgs
private

Definition at line 1012 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_pT_Hjj
private

Definition at line 1014 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_pT_jet1
private

Definition at line 1013 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_pT_V
private

Definition at line 1013 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage0
private

Definition at line 1008 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_2_fine_pTjet25
private

Definition at line 1011 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_2_fine_pTjet30
private

Definition at line 1011 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_2_pTjet25
private

Definition at line 1010 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_2_pTjet30
private

Definition at line 1010 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_pTjet25
private

Definition at line 1009 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_stage1_pTjet30
private

Definition at line 1009 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

Histo1DPtr Rivet::HiggsTemplateCrossSections::hist_y_Higgs
private

Definition at line 1012 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and initializeHistos().

std::map<HTXS::ErrorCode,size_t> Rivet::HiggsTemplateCrossSections::m_errorCount
private
HTXS::HiggsProdMode Rivet::HiggsTemplateCrossSections::m_HiggsProdMode
private

Definition at line 1006 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), classifyEvent(), init(), and setHiggsProdMode().

double Rivet::HiggsTemplateCrossSections::m_sumw
private

Definition at line 1005 of file HiggsTemplateCrossSections.cc.

Referenced by analyze(), finalize(), and init().