17 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
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) {
178 std::vector<const reco::GenParticle*> rads;
182 if (dynamic_cast<const reco::GenParticle*>(&(*
part)) ==
nullptr) {
186 rads.push_back(
part->clone());
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
int numberOfBQuarks(bool fromTopQuark=true) const
return number of b quarks in the decay chain
reco::GenParticleRefProd parts_
reference to the top decay chain (has to be kept in the event!)
const reco::GenParticle * daughterQuarkOfTop(bool invertCharge=false) const
return daughter quark of top quark (which can have flavor b, s or d)
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain
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
reco::GenParticleRefProd initPartons_
reference to the list of initial partons (has to be kept in the event!)
int pdgId() const final
PDG identifier.
std::vector< const reco::GenParticle * > radiatedGluons(int pdgId) const
return radiated gluons from particle with pdgId
std::vector< const reco::GenParticle * > lightQuarks(bool includingBQuarks=false) const
return all light quarks or all quarks including b's
const_iterator end() const
last daughter const_iterator
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
std::vector< const reco::GenParticle * > topSisters() const
return number of top anti-top sisters
const reco::GenParticle * top() const
return top if available; 0 else
int flavour(const Candidate &part)
const_iterator begin() const
first daughter const_iterator