#include "DataFormats/HepMCCandidate/interface/FlavorHistory.h"
Go to the source code of this file.
Functions | |
ostream & | operator<< (ostream &out, Candidate const &cand) |
ostream & | operator<< (ostream &out, FlavorHistory const &cand) |
ostream& operator<< | ( | ostream & | out, |
Candidate const & | cand | ||
) |
Definition at line 64 of file FlavorHistory.cc.
References reco::Candidate::eta(), reco::Candidate::mass(), reco::Candidate::numberOfDaughters(), reco::Candidate::numberOfMothers(), dbtoconf::out, reco::Candidate::pdgId(), reco::Candidate::phi(), reco::Candidate::pt(), and reco::Candidate::status().
{ char buff[1000]; sprintf(buff, "%5d, status = %5d, nmo = %5d, nda = %5d, pt = %6.2f, eta = %6.2f, phi = %6.2f, m = %6.2f", cand.pdgId(), cand.status(), static_cast<int>(cand.numberOfMothers()), static_cast<int>(cand.numberOfDaughters()), cand.pt(), cand.eta(), cand.phi(), cand.mass() ); out << buff; return out; }
ostream& operator<< | ( | ostream & | out, |
FlavorHistory const & | cand | ||
) |
Definition at line 76 of file FlavorHistory.cc.
References reco::FlavorHistory::flavorSource(), reco::FlavorHistory::hasMatchedJet(), reco::FlavorHistory::hasParton(), reco::FlavorHistory::hasProgenitor(), reco::FlavorHistory::hasSister(), reco::FlavorHistory::hasSisterJet(), edm::Ptr< T >::key(), reco::FlavorHistory::matchedJet(), reco::Candidate::mother(), reco::Candidate::numberOfMothers(), dbtoconf::out, reco::FlavorHistory::parton(), reco::FlavorHistory::progenitor(), reco::FlavorHistory::sister(), and reco::FlavorHistory::sisterJet().
{ out << "Source = " << cand.flavorSource() << endl; if ( cand.hasParton() ) out << "Parton = " << cand.parton().key() << " : " << *(cand.parton()) << endl; if ( cand.hasProgenitor() ) out << "Progenitor = " << cand.progenitor().key() << " : " << *(cand.progenitor()) << endl; if ( cand.hasSister() ) out << "Sister = " << cand.sister().key() << " : " << *(cand.sister()) << endl; if ( cand.hasMatchedJet() ) out << "jet = " << cand.matchedJet() << endl; if ( cand.hasSisterJet() ) out << "sister jet = " << cand.sisterJet() << endl; if ( cand.hasParton() ) { out << "Ancestry: " << endl; Candidate const * ipar = cand.parton()->mother(); while ( ipar->numberOfMothers() > 0 ) { out << *ipar << endl; ipar = ipar->mother(); } } return out; }