Main classificaion method.
132 {
133
134
135 HiggsClassification cat;
136 cat.prodMode = prodMode;
149 cat.isTHW = false;
150
153 "Unkown Higgs production mechanism. Cannot classify event."
154 " Classification for all events will most likely fail.");
155
156
157
158
159
160
161
163 int Nhiggs=0;
164 for (
auto ptcl : Rivet::HepMCUtils::particles(
event.genEvent()) ) {
165
166
167 if ( !PID::isHiggs(ptcl->pdg_id()) ) continue;
168
169 if ( ptcl->end_vertex() && !
hasChild(ptcl,PID::HIGGS) ) {
170 cat.higgs =
Particle(ptcl); ++Nhiggs;
171 }
172
173
174 if ( HSvtx==
nullptr && ptcl->production_vertex() && !
hasParent(ptcl,PID::HIGGS) )
175 HSvtx = ptcl->production_vertex();
176 }
177
178
179 if (Nhiggs!=1)
181 "Current event has "+std::to_string(Nhiggs)+" Higgs bosons. There must be only one.");
182 if (cat.higgs.children().size()<2)
184 "Could not identify Higgs boson decay products.");
185
186 if (HSvtx == nullptr)
188
189
190
191
192
193
194
195 bool is_uncatdV = false;
197 FourMomentum uncatV_p4(0,0,0,0);
199 int nWs=0, nZs=0;
200 if (
isVH(prodMode) ) {
201 for (auto ptcl:Rivet::HepMCUtils::particles(HSvtx,Relatives::CHILDREN)) {
202 if (PID::isW(ptcl->pdg_id())) { ++nWs; cat.V=
Particle(ptcl); }
203 if (PID::isZ(ptcl->pdg_id())) { ++nZs; cat.V=
Particle(std::move(ptcl)); }
204 }
206 else {
207 for (auto ptcl:Rivet::HepMCUtils::particles(HSvtx,Relatives::CHILDREN)) {
208 if (!PID::isHiggs(ptcl->pdg_id())) {
210 uncatV_p4 +=
Particle(ptcl).momentum();
211 uncatV_v4 +=
Particle(std::move(ptcl)).origin();
212 }
213 }
214 is_uncatdV =
true; cat.V =
Particle(24,uncatV_p4,uncatV_v4);
215 }
216 }
217
218 if ( !is_uncatdV ){
219
220 if (
isVH(prodMode) && !cat.V.genParticle()->end_vertex() )
222
223 if (
isVH(prodMode) && cat.V.children().size()<2 )
225
226 if ( ( prodMode==
HTXS::WH && (nZs>0||nWs!=1) ) ||
229 std::to_string(nZs)+" Z-bosons. Inconsitent with VH expectation.");
230 }
231
232
235
236 for ( auto ptcl : Rivet::HepMCUtils::particles(std::move(HSvtx),Relatives::CHILDREN) ) {
237 if ( !PID::isTop(ptcl->pdg_id()) ) continue;
239 if (
top.genParticle()->end_vertex() )
240 for (
const auto &child:
top.children())
242 }
243 }
244
245
246 if ( (prodMode==
HTXS::TTH && Ws.size()<2) || (prodMode==
HTXS::TH && Ws.size()<1 ) )
248
249
251 for ( auto ptcl : Rivet::HepMCUtils::particles(std::move(HSvtx),Relatives::CHILDREN) ) {
252 if (PID::isW(ptcl->pdg_id())) {
253 cat.isTHW = true;
254 break;
255 }
256 }
257 }
258
259
260
261
262
263
264
265
266
267
269 if ( !is_uncatdV ){
271 }else leptonicVs = std::move(uncatV_decays);
272 for (
const auto & W:Ws )
if (
W.genParticle()->end_vertex() && !
quarkDecay(W) ) leptonicVs +=
W;
273
274
275 const Particles FS = apply<FinalState>(event,
"FS").particles();
277 FourMomentum
sum(0,0,0,0), vSum(0,0,0,0), hSum(0,0,0,0);
278 for ( const Particle &p : FS ) {
279
281
282 if (
originateFrom(p,cat.higgs) ) { hSum +=
p.momentum();
continue; }
283
285
286 if ( leptonicVs.size() &&
originateFrom(p,leptonicVs) )
continue;
287
289 }
290
291 cat.p4decay_higgs = hSum;
292 cat.p4decay_V = vSum;
293
294 FinalState fps_temp;
295 FastJets
jets(fps_temp,
296#if RIVET_VERSION_CODE >= 40000
297 JetAlg::ANTIKT,
298#else
299 FastJets::ANTIKT,
300#endif
301 0.4 );
303
304 cat.jets25 =
jets.jetsByPt( Cuts::pT > 25.0 );
305 cat.jets30 =
jets.jetsByPt( Cuts::pT > 30.0 );
306
307
310 std::to_string(
sum.pt())+
" GeV and m = "+std::to_string(
sum.mass())+
" GeV");
311
312
313
314 if(is_uncatdV)
316
317
318
319
320
321
322
323 cat.isZ2vvDecay = false;
326 cat.stage1_cat_pTjet25GeV =
getStage1Category(prodMode,cat.higgs,cat.jets25,cat.V);
327 cat.stage1_cat_pTjet30GeV =
getStage1Category(prodMode,cat.higgs,cat.jets30,cat.V);
337
338 return cat;
339 }
HiggsClassification error(HiggsClassification &cat, HTXS::ErrorCode err, std::string_view msg={}, int NmaxWarnings=20) const
Returns the classification object with the error code set.
bool originateFrom(const Particle &p, const Particles &ptcls) const
Whether particle p originate from any of the ptcls.
HTXS::Stage1_3::Category getStage1_3_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V) const
Stage-1.3 categorization.
bool isVH(HTXS::HiggsProdMode p) const
Whether the Higgs is produced in association with a vector boson (VH).
Particle getLastInstance(const Particle &ptcl) const
follow a "propagating" particle and return its last instance
HTXS::Stage1_2_Fine::Category getStage1_2_Fine_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V) const
Stage-1.2_Fine categorization.
bool quarkDecay(const Particle &p) const
Return true is particle decays to quarks.
bool hasParent(HepMC::ConstGenParticlePtr ptcl, int pdgID) const
Checks whether the input particle has a parent with a given PDGID.
bool hasChild(HepMC::ConstGenParticlePtr ptcl, int pdgID) const
Checks whether the input particle has a child with a given PDGID.
HTXS::Stage1::Category getStage1Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V) const
Stage-1 categorization.
HTXS::Stage1_3_Fine::Category getStage1_3_Fine_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V, const bool isTHW) const
Stage-1.3 Fine categorization.
HTXS::Stage0::Category getStage0Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Particle &V) const
Stage-0 HTXS categorization.
bool ChLeptonDecay(const Particle &p) const
Return true if particle decays to charged leptons.
HTXS::Stage1_2::Category getStage1_2_Category(const HTXS::HiggsProdMode prodMode, const Particle &higgs, const Jets &jets, const Particle &V) const
Stage-1.2 categorization.
@ HS_VTX_IDENTIFICATION
failed to identify hard scatter vertex
@ PRODMODE_DEFINED
production mode not defined
@ SUCCESS
successful classification
@ VH_DECAY_IDENTIFICATION
failed to identify associated vector boson decay products
@ HIGGS_IDENTIFICATION
failed to identify Higgs boson
@ TOP_W_IDENTIFICATION
failed to identify top decay
@ HIGGS_DECAY_IDENTIFICATION
failed to identify Higgs boson decay products
@ MOMENTUM_CONSERVATION
failed momentum conservation
@ VH_IDENTIFICATION
failed to identify associated vector boson
HepMC3::FourVector FourVector
ConstGenVertexPtr signal_process_vertex(const GenEvent *e)
Particle_v1 Particle
Define the latest version of the particle class.