Main classificaion method.
126 {
127
128
129 HiggsClassification cat;
130 cat.prodMode = prodMode;
139
142 "Unkown Higgs production mechanism. Cannot classify event."
143 " Classification for all events will most likely fail.");
144
145
146
147
148
149
150
152 int Nhiggs=0;
153 for (
auto ptcl : Rivet::HepMCUtils::particles(
event.genEvent()) ) {
154
155
156 if ( !PID::isHiggs(ptcl->pdg_id()) ) continue;
157
158 if ( ptcl->end_vertex() && !
hasChild(ptcl,PID::HIGGS) ) {
159 cat.higgs =
Particle(ptcl); ++Nhiggs;
160 }
161
162
163 if ( HSvtx==
nullptr && ptcl->production_vertex() && !
hasParent(ptcl,PID::HIGGS) )
164 HSvtx = ptcl->production_vertex();
165 }
166
167
168 if (Nhiggs!=1)
170 "Current event has "+std::to_string(Nhiggs)+" Higgs bosons. There must be only one.");
171 if (cat.higgs.children().size()<2)
173 "Could not identify Higgs boson decay products.");
174
175 if (HSvtx == nullptr)
177
178
179
180
181
182
183
184 bool is_uncatdV = false;
186 FourMomentum uncatV_p4(0,0,0,0);
187 FourVector uncatV_v4(0,0,0,0);
188 int nWs=0, nZs=0;
189 if (
isVH(prodMode) ) {
190 for (auto ptcl:Rivet::HepMCUtils::particles(HSvtx,Relatives::CHILDREN)) {
191 if (PID::isW(ptcl->pdg_id())) { ++nWs; cat.V=
Particle(ptcl); }
192 if (PID::isZ(ptcl->pdg_id())) { ++nZs; cat.V=
Particle(std::move(ptcl)); }
193 }
195 else {
196 for (auto ptcl:Rivet::HepMCUtils::particles(HSvtx,Relatives::CHILDREN)) {
197 if (!PID::isHiggs(ptcl->pdg_id())) {
199 uncatV_p4 +=
Particle(ptcl).momentum();
200 uncatV_v4 +=
Particle(std::move(ptcl)).origin();
201 }
202 }
203 is_uncatdV =
true; cat.V =
Particle(24,uncatV_p4,uncatV_v4);
204 }
205 }
206
207 if ( !is_uncatdV ){
208
209 if (
isVH(prodMode) && !cat.V.genParticle()->end_vertex() )
211
212 if (
isVH(prodMode) && cat.V.children().size()<2 )
214
215 if ( ( prodMode==
HTXS::WH && (nZs>0||nWs!=1) ) ||
218 std::to_string(nZs)+" Z-bosons. Inconsitent with VH expectation.");
219 }
220
221
224
225 for ( auto ptcl : Rivet::HepMCUtils::particles(std::move(HSvtx),Relatives::CHILDREN) ) {
226 if ( !PID::isTop(ptcl->pdg_id()) ) continue;
228 if (
top.genParticle()->end_vertex() )
229 for (
const auto &child:
top.children())
231 }
232 }
233
234
235 if ( (prodMode==
HTXS::TTH && Ws.size()<2) || (prodMode==
HTXS::TH && Ws.size()<1 ) )
237
238
239
240
241
242
243
244
245
246
248 if ( !is_uncatdV ){
250 }else leptonicVs = std::move(uncatV_decays);
251 for (
const auto & W:Ws )
if (
W.genParticle()->end_vertex() && !
quarkDecay(W) ) leptonicVs +=
W;
252
253
254 const Particles FS = apply<FinalState>(event,
"FS").particles();
256 FourMomentum
sum(0,0,0,0), vSum(0,0,0,0), hSum(0,0,0,0);
257 for ( const Particle &p : FS ) {
258
260
261 if (
originateFrom(p,cat.higgs) ) { hSum +=
p.momentum();
continue; }
262
264
265 if ( leptonicVs.size() &&
originateFrom(p,leptonicVs) )
continue;
266
268 }
269
270 cat.p4decay_higgs = hSum;
271 cat.p4decay_V = vSum;
272
273 FinalState fps_temp;
274 FastJets
jets(fps_temp,
275#if RIVET_VERSION_CODE >= 40000
276 JetAlg::ANTIKT,
277#else
278 FastJets::ANTIKT,
279#endif
280 0.4 );
282
283 cat.jets25 =
jets.jetsByPt( Cuts::pT > 25.0 );
284 cat.jets30 =
jets.jetsByPt( Cuts::pT > 30.0 );
285
286
289 std::to_string(
sum.pt())+
" GeV and m = "+std::to_string(
sum.mass())+
" GeV");
290
291
292
293 if(is_uncatdV)
295
296
297
298
299
300
301
302 cat.isZ2vvDecay = false;
305 cat.stage1_cat_pTjet25GeV =
getStage1Category(prodMode,cat.higgs,cat.jets25,cat.V);
306 cat.stage1_cat_pTjet30GeV =
getStage1Category(prodMode,cat.higgs,cat.jets30,cat.V);
312
313 return cat;
314 }
bool originateFrom(const Particle &p, const Particles &ptcls) const
Whether particle p originate from any of the ptcls.
HiggsClassification error(HiggsClassification &cat, HTXS::ErrorCode err, std::string msg="", int NmaxWarnings=20) const
Returns the classification object with the error code set.
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::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
GenVertex * signal_process_vertex(const GenEvent *e)
Particle_v1 Particle
Define the latest version of the particle class.