<div dir="ltr">Dear Rivet authors,<div><br></div><div>I'm just trying to implement a Rivet routine for a W+b ATLAS measurement and was wondering what the preferred way of doing particle-level b-tagging in Rivet is?</div><div><br></div><div>Naively, I would think that the easiest way to decide whether a jet is a b-jet is to use the HeavyHadrons projection, e.g. like so</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">addProjection(HeavyHadrons(-2.5, 2.5, 5.0*GeV), "BHadrons");<br></font><font face="monospace, monospace">...<br></font><font face="monospace, monospace">const Particles& bHadrons = applyProjection<HeavyHadrons>(event, "BHadrons").bHadrons();<br></font><font face="monospace, monospace">...<br></font><font face="monospace, monospace">// for each jet "j":<br></font><font face="monospace, monospace">foreach(const Particle& b, bHadrons) {<br></font><font face="monospace, monospace"> if( (b.pT() > 5.0*GeV) && (deltaR(j, b) < 0.3) ) {<br></font><font face="monospace, monospace"> // jet matched to B hadron!<br></font><font face="monospace, monospace"> ...</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> break;<br></font><font face="monospace, monospace"> }<br></font><font face="monospace, monospace">}</font></blockquote><div><div><br></div><div>Turns out, this doesn't do anything at all because bHadrons has always size 0 for some reason. Is this to be expected or likely to be some sort of bug (on my side)?</div><div><br></div><div>On the other hand, if I use the approach that was used in the Z+b(b) analysis (ATLAS_2014_I1306294), i.e. something like</div><font face="monospace, monospace"><br></font><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">bool hasB = false;</font> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">foreach(const GenParticle* b, particles(event.genEvent())) {<br></font><font face="monospace, monospace"> if(b->momentum().perp() < 5.0*GeV) continue;<br></font><font face="monospace, monospace"> for(uint k=0; k < stableB.size(); ++k) {<br></font><font face="monospace, monospace"> if( fabs(b->pdg_id()) == stableB[k] ) {<br></font><font face="monospace, monospace"> if( deltaR(j.momentum().eta(), j.momentum().phi(), b->momentum().eta(), b->momentum().phi()) < 0.3 ) {<br></font><font face="monospace, monospace"> // jet matched to B hadron!</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> hasB = true;<br></font><font face="monospace, monospace"> break; <br></font><font face="monospace, monospace"> }<br></font><font face="monospace, monospace"> }<br></font><font face="monospace, monospace"> }<br></font><font face="monospace, monospace"> if(hasB) break;<br></font><font face="monospace, monospace">}</font></blockquote><div><div><br></div><div>where stableB is a custom-made vector of the B-hadron PDG IDs, then I do find the B hadrons in the event and can successfully match my jets to them.</div><div><br></div><div>I think it's safe to say that while the latter option does the trick, it is a bit of an awkward way to code this up. (Presumably that's the reason why the Z+b(b) analysis is still dwelling in the contributions area...?) Is there a better way of doing this? </div><div><br></div><div>Many thanks for your advice in advance!</div><div><br></div><div>Cheers,</div><div>Chris</div><div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><br></div><div> Dr. Christian Gütschow</div><div><br></div><div> TU Dresden</div><div> Institut für Kern- und Teilchenphysik</div><div> Zellescher Weg 19</div><div> 01069 Dresden</div><div><br></div><div> > E17, Andreas-Schubert-Bau<span style="color:rgb(0,0,0);font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px"> </span></div><div> > <a href="mailto:chris.g@cern.ch" target="_blank">chris.g@cern.ch</a></div><div><br></div></div></div></div></div></div>
</div></div></div></div>