#include <HLTriggerOffline/BJet/interface/FlavouredJetPlots.h>
Public Member Functions | |
FlavouredJetPlots | efficiency (const FlavouredJetPlots &denominator) |
void | fill (const reco::Jet &jet, const reco::TrackRefVector &tracks, flavour_t flavour) |
void | fill (const reco::Jet &jet, flavour_t flavour) |
void | init (const std::string &name, const std::string &title, const std::vector< flavours_t > &flavours, const std::vector< std::string > &labels, unsigned int energyBins, double minEnergy, double maxEnergy, unsigned int geometryBins, double maxEta, bool hasTracks=false) |
void | save (TDirectory &file) |
Public Attributes | |
std::vector< flavours_t > | m_flavours |
std::vector< std::string > | m_labels |
std::vector< JetPlots > | m_plots |
Definition at line 19 of file FlavouredJetPlots.h.
FlavouredJetPlots FlavouredJetPlots::efficiency | ( | const FlavouredJetPlots & | denominator | ) | [inline] |
Definition at line 73 of file FlavouredJetPlots.h.
References i, m_flavours, m_labels, and m_plots.
00073 { 00074 FlavouredJetPlots efficiency; 00075 efficiency.m_flavours = m_flavours; 00076 efficiency.m_labels = m_labels; 00077 efficiency.m_plots.resize(m_flavours.size() + 1); 00078 for (unsigned int i = 0; i <= m_flavours.size(); ++i) 00079 efficiency.m_plots[i] = m_plots[i].efficiency( denominator.m_plots[i] ); 00080 return efficiency; 00081 }
void FlavouredJetPlots::fill | ( | const reco::Jet & | jet, | |
const reco::TrackRefVector & | tracks, | |||
flavour_t | flavour | |||
) | [inline] |
Definition at line 56 of file FlavouredJetPlots.h.
References begin, end, find(), i, m_flavours, m_plots, and edm::match().
00056 { 00057 bool match = false; 00058 for (unsigned int i = 0; i < m_flavours.size(); ++i) { 00059 if (std::find(m_flavours[i].begin(), m_flavours[i].end(), flavour) != m_flavours[i].end()) { 00060 m_plots[i].fill(jet, tracks); 00061 match = true; 00062 } 00063 } 00064 if (not match) 00065 m_plots[m_flavours.size()].fill(jet); 00066 }
Definition at line 44 of file FlavouredJetPlots.h.
References begin, end, find(), i, m_flavours, m_plots, and edm::match().
00044 { 00045 bool match = false; 00046 for (unsigned int i = 0; i < m_flavours.size(); ++i) { 00047 if (std::find(m_flavours[i].begin(), m_flavours[i].end(), flavour) != m_flavours[i].end()) { 00048 m_plots[i].fill(jet); 00049 match = true; 00050 } 00051 } 00052 if (not match) 00053 m_plots[m_flavours.size()].fill(jet); 00054 }
void FlavouredJetPlots::init | ( | const std::string & | name, | |
const std::string & | title, | |||
const std::vector< flavours_t > & | flavours, | |||
const std::vector< std::string > & | labels, | |||
unsigned int | energyBins, | |||
double | minEnergy, | |||
double | maxEnergy, | |||
unsigned int | geometryBins, | |||
double | maxEta, | |||
bool | hasTracks = false | |||
) | [inline] |
Definition at line 25 of file FlavouredJetPlots.h.
References i, m_flavours, m_labels, and m_plots.
00036 { 00037 m_flavours = flavours; 00038 m_labels = labels; m_labels.push_back("other"); 00039 m_plots.resize( m_flavours.size() + 1); 00040 for (unsigned int i = 0; i <= m_flavours.size(); ++i) 00041 m_plots[i].init(name + "_" + m_labels[i], title + " (" + m_labels[i] + ")", energyBins, minEnergy, maxEnergy, geometryBins, maxEta, hasTracks); 00042 }
void FlavouredJetPlots::save | ( | TDirectory & | file | ) | [inline] |
Definition at line 68 of file FlavouredJetPlots.h.
References i, m_flavours, and m_plots.
00068 { 00069 for (unsigned int i = 0; i <= m_flavours.size(); ++i) 00070 m_plots[i].save(file); 00071 }
std::vector<flavours_t> FlavouredJetPlots::m_flavours |
Definition at line 21 of file FlavouredJetPlots.h.
Referenced by efficiency(), fill(), init(), and save().
std::vector<std::string> FlavouredJetPlots::m_labels |
std::vector<JetPlots> FlavouredJetPlots::m_plots |
Definition at line 23 of file FlavouredJetPlots.h.
Referenced by efficiency(), fill(), init(), and save().