Skimming tool that requires exactly one lepton and truth-level m_ttbar > cut.
More...
#include <BoostedTTbarSkimmingToolAlg.h>
|
| Gaudi::Property< double > | m_ttbarCut {this, "ttbarCut", 0.0, "ttbar mass cut"} |
| | Property: m_ttbar cut in MeV.
|
|
| std::atomic< unsigned int > | m_ntot {0} |
| std::atomic< unsigned int > | m_npass {0} |
Skimming tool that requires exactly one lepton and truth-level m_ttbar > cut.
Definition at line 18 of file BoostedTTbarSkimmingToolAlg.h.
◆ BoostedTTbarSkimmingToolAlg()
| DerivationFramework::BoostedTTbarSkimmingToolAlg::BoostedTTbarSkimmingToolAlg |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
◆ ~BoostedTTbarSkimmingToolAlg()
| virtual DerivationFramework::BoostedTTbarSkimmingToolAlg::~BoostedTTbarSkimmingToolAlg |
( |
| ) |
|
|
virtualdefault |
◆ eventPassesFilter()
| bool DerivationFramework::BoostedTTbarSkimmingToolAlg::eventPassesFilter |
( |
const EventContext & | ctx | ) |
const |
|
overridevirtual |
Returns true if event passes the filter.
Definition at line 25 of file BoostedTTbarSkimmingToolAlg.cxx.
26{
28
29
31 if (evtStore()->retrieve(truth, "TruthParticles").isFailure()) {
33 return false;
34 }
35
36 TLorentzVector
top, antitop;
37
38 for (const auto* p : *truth) {
39 if (std::abs(
p->pdgId()) != 6)
continue;
40
41 bool hasW = false;
42 bool hasB = false;
43 for (
unsigned int ic = 0;
ic <
p->nChildren(); ++
ic) {
45 if (!child) continue;
46 if (std::abs(child->
pdgId()) == 24) hasW =
true;
47 if (std::abs(child->
pdgId()) == 5) hasB =
true;
48 }
49 if (!hasW || !hasB) continue;
50
52 vec.SetPtEtaPhiM(
p->pt(),
p->eta(),
p->phi(),
p->m());
55 }
56
57 double mass_ttbar = -1.;
58 if (
top.Pt() > 0 && antitop.Pt() > 0) mass_ttbar = (
top + antitop).M();
59
61
63 return true;
64}
std::vector< size_t > vec
int pdgId() const
PDG ID code.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
◆ finalize()
| StatusCode DerivationFramework::BoostedTTbarSkimmingToolAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| virtual StatusCode DerivationFramework::BoostedTTbarSkimmingToolAlg::initialize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ m_npass
| std::atomic<unsigned int> DerivationFramework::BoostedTTbarSkimmingToolAlg::m_npass {0} |
|
mutableprivate |
◆ m_ntot
| std::atomic<unsigned int> DerivationFramework::BoostedTTbarSkimmingToolAlg::m_ntot {0} |
|
mutableprivate |
◆ m_ttbarCut
| Gaudi::Property<double> DerivationFramework::BoostedTTbarSkimmingToolAlg::m_ttbarCut {this, "ttbarCut", 0.0, "ttbar mass cut"} |
The documentation for this class was generated from the following files: