17 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
18 if (partsColl[
i].pdgId() ==
id) {
19 if (parentId == 0 ?
true : partsColl[
i].mother() &&
std::abs(partsColl[
i].mother()->pdgId()) == (int)parentId) {
30 <<
"--------------------------------------\n"
31 <<
"- Dump TopGenEvent Content -\n"
32 <<
"--------------------------------------\n";
34 log <<
"pdgId:" << std::setw(5) <<
part->pdgId() <<
", "
35 <<
"mass:" << std::setw(11) <<
part->p4().mass() <<
", "
36 <<
"energy:" << std::setw(11) <<
part->energy() <<
", "
37 <<
"pt:" << std::setw(11) <<
part->pt() <<
"\n";
44 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
60 switch (typeRestriction) {
77 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
102 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
118 std::vector<const reco::GenParticle*> sisters;
123 if (dynamic_cast<const reco::GenParticle*>(&(*
part)) ==
nullptr) {
126 sisters.push_back(
part->clone());
134 for (reco::GenParticleCollection::const_iterator
top =
parts_->begin();
top <
parts_->end(); ++
top) {
139 if (cand ==
nullptr) {
153 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
154 if (partsColl[
i].mother() &&
158 cand = &partsColl[
i];
168 if (dynamic_cast<const reco::GenParticle*>(&(*
part)) ==
nullptr) {
171 lightQuarks.push_back(
part->clone());
178 std::vector<const reco::GenParticle*> rads;
180 if (
part->mother() &&
part->mother()->pdgId() == pdgId) {
182 if (dynamic_cast<const reco::GenParticle*>(&(*
part)) ==
nullptr) {
186 rads.push_back(
part->clone());
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
reco::GenParticleRefProd parts_
reference to the top decay chain (has to be kept in the event!)
static std::vector< std::string > checklist log
uint16_t *__restrict__ id
std::vector< const reco::GenParticle * > topSisters() const
return number of top anti-top sisters
bool isLepton(const Candidate &part)
TopGenEvent()
empty constructor
const reco::GenParticle * daughterQuarkOfWPlus(bool invertQuarkCharge=false, bool invertBosonCharge=false) const
return quark daughter quark of W boson
const reco::GenParticle * top() const
return top if available; 0 else
const reco::GenParticle * daughterQuarkOfTop(bool invertCharge=false) const
return daughter quark of top quark (which can have flavor b, s or d)
reco::GenParticleRefProd initPartons_
reference to the list of initial partons (has to be kept in the event!)
int pdgId() const final
PDG identifier.
const_iterator end() const
last daughter const_iterator
std::vector< const reco::GenParticle * > lightQuarks(bool includingBQuarks=false) const
return all light quarks or all quarks including b's
Abs< T >::type abs(const T &t)
const reco::GenParticle * candidate(int id, unsigned int parentId=0) const
get candidate with given pdg id if available; 0 else
int numberOfBQuarks(bool fromTopQuark=true) const
return number of b quarks in the decay chain
std::vector< const reco::GenParticle * > radiatedGluons(int pdgId) const
return radiated gluons from particle with pdgId
const_iterator begin() const
first daughter const_iterator
int flavour(const Candidate &part)
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain