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 double energy() const GCC11_FINAL
energy
virtual const CandidatePtr & masterClonePtr() const
returns reference to master clone pointer
const reco::ShallowClonePtrCandidate & matchedJet() const
virtual double pz() const GCC11_FINAL
z coordinate of momentum vector
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
FLAVOR_T flavorSource() const
collection_type::const_iterator const_iterator
bool isNonnull() const
Checks for non-null.
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
Abs< T >::type abs(const T &t)
FlavorHistory::FLAVOR_T flavorSource
const reco::CandidatePtr & parton() const