20 for(
unsigned int i = 0;
i < partsColl.size(); ++
i ) {
22 if(parentId==0?
true:partsColl[
i].mother()&&
std::abs(partsColl[
i].mother()->
pdgId())==(int)parentId){
35 <<
"--------------------------------------\n"
36 <<
"- Dump TopGenEvent Content -\n"
37 <<
"--------------------------------------\n";
38 for (reco::GenParticleCollection::const_iterator
part =
parts_->begin();
40 log <<
"pdgId:" << std::setw(5) <<
part->pdgId() <<
", "
41 <<
"mass:" << std::setw(11) <<
part->p4().mass() <<
", "
42 <<
"energy:" << std::setw(11) <<
part->energy() <<
", "
43 <<
"pt:" << std::setw(11) <<
part->pt() <<
"\n";
52 for(
unsigned int i = 0;
i < partsColl.size(); ++
i) {
71 switch(typeRestriction){
88 for(
unsigned int i = 0;
i < partsColl.size(); ++
i) {
116 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
132 std::vector<const reco::GenParticle*>
135 std::vector<const reco::GenParticle*> sisters;
140 if( dynamic_cast<const reco::GenParticle*>( &(*
part) ) == 0){
143 sisters.push_back(
part->clone() );
174 for (
unsigned int i = 0;
i < partsColl.size(); ++
i) {
177 cand = &partsColl[
i];
183 std::vector<const reco::GenParticle*>
189 if( dynamic_cast<const reco::GenParticle*>( &(*
part) ) == 0){
192 lightQuarks.push_back(
part->clone() );
198 std::vector<const reco::GenParticle*>
200 std::vector<const reco::GenParticle*> rads;
204 if( dynamic_cast<const reco::GenParticle*>( &(*
part) ) == 0){
208 rads.push_back(
part->clone() );
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
virtual int pdgId() const
PDG identifier.
reco::GenParticleRefProd parts_
reference to the top decay chain (has to be kept in the event!)
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!)
virtual const_iterator begin() const
first daughter const_iterator
std::vector< const reco::GenParticle * > lightQuarks(bool includingBQuarks=false) const
return all light quarks or all quarks including b's
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
Log< T >::type log(const T &t)
std::vector< const reco::GenParticle * > radiatedGluons(int pdgId) const
return radiated gluons from particle with pdgId
virtual const_iterator end() const
last daughter const_iterator
int flavour(const Candidate &part)
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain