2 #include "TLorentzVector.h"
16 if ( verbose )
cout <<
"----- Caching Flavor History Event -----" << endl;
26 vector<helpers::FlavorHistoryEventHelper> classification;
30 ibegin = histories_.begin(),
31 iend = histories_.end();
34 for ( ; i != iend; ++
i ) {
36 if ( verbose )
cout <<
" Processing flavor history: " << i - ibegin <<
" = " << endl << flavHist << endl;
46 TLorentzVector p41 ( matchedJet.
px(), matchedJet.
py(), matchedJet.
pz(), matchedJet.
energy() );
47 if ( pdgId == 5 ) nb_++;
48 if ( pdgId == 4 ) nc_++;
52 TLorentzVector p42 ( sisterJet.
px(), sisterJet.
py(), sisterJet.
pz(), sisterJet.
energy() );
58 dR = p41.DeltaR( p42 );
61 if ( verbose )
cout <<
"Adding classification: pdgId = " << pdgId <<
", flavorSource = " << flavorSource <<
", dR = " << dR << endl;
64 if ( verbose )
cout <<
"No matched jet found, not adding to classification list" << endl;
80 if ( classification.size() > 0 ) {
83 std::sort( classification.begin(), classification.end() );
85 if ( verbose ){
cout <<
"Writing out list of classifications" << endl;
86 copy(classification.begin(), classification.end(),
87 ostream_iterator<helpers::FlavorHistoryEventHelper>(
cout,
""));
92 highestFlavor_ = best.
flavor;
virtual const CandidatePtr & masterClonePtr() const
returns reference to master clone pointer
const reco::ShallowClonePtrCandidate & matchedJet() const
FLAVOR_T flavorSource() const
collection_type::const_iterator const_iterator
virtual double energy() const
energy
bool isNonnull() const
Checks for non-null.
Abs< T >::type abs(const T &t)
virtual double px() const
x coordinate of momentum vector
virtual double pz() const
z coordinate of momentum vector
FlavorHistory::FLAVOR_T flavorSource
virtual double py() const
y coordinate of momentum vector
const reco::CandidatePtr & parton() const