Public Member Functions | |
std::string | channel (size_t i) |
int | convert (std::string s) |
std::string | convert (int pid) |
std::string | ConvertIndex (int index) |
int | isDecayParticle (int pid) |
MonitoredDecays (const edm::ParameterSet &iConfig) | |
unsigned int | NDecayParticles () |
size_t | position (int pid1, int pid2) |
size_t | size () |
size_t | stable () |
size_t | undetermined () |
~MonitoredDecays () | |
Private Member Functions | |
void | fill (std::string s) |
void | fillMap () |
Private Attributes | |
std::vector< std::pair< int, int > > | channels |
std::map< std::string, int > | namePidMap |
unsigned int | nparticles_ |
Definition at line 51 of file HiggsValidation.h.
HiggsValidation::MonitoredDecays::MonitoredDecays | ( | const edm::ParameterSet & | iConfig | ) | [inline] |
Definition at line 54 of file HiggsValidation.h.
References fill(), fillMap(), edm::ParameterSet::getParameter(), i, and LaserDQM_cfg::input.
HiggsValidation::MonitoredDecays::~MonitoredDecays | ( | ) | [inline] |
Definition at line 62 of file HiggsValidation.h.
{};
std::string HiggsValidation::MonitoredDecays::channel | ( | size_t | i | ) | [inline] |
int HiggsValidation::MonitoredDecays::convert | ( | std::string | s | ) | [inline] |
Definition at line 83 of file HiggsValidation.h.
References namePidMap, and alignCSCRings::s.
Referenced by channel(), and fill().
{ if( namePidMap.count(s)){ return namePidMap[s]; } return 0; }
std::string HiggsValidation::MonitoredDecays::convert | ( | int | pid | ) | [inline] |
Definition at line 90 of file HiggsValidation.h.
References abs, i, and namePidMap.
std::string HiggsValidation::MonitoredDecays::ConvertIndex | ( | int | index | ) | [inline] |
Definition at line 110 of file HiggsValidation.h.
References i, and namePidMap.
Referenced by HiggsValidation::beginJob().
{ int idx=0; for(std::map<std::string,int>::const_iterator i = namePidMap.begin(); i!= namePidMap.end(); ++i) { if(idx==index) return i->first; idx++; } return "unknown"; }
void HiggsValidation::MonitoredDecays::fill | ( | std::string | s | ) | [inline, private] |
Definition at line 120 of file HiggsValidation.h.
References channels, convert(), and pos.
Referenced by MonitoredDecays().
void HiggsValidation::MonitoredDecays::fillMap | ( | ) | [inline, private] |
Definition at line 130 of file HiggsValidation.h.
References i, namePidMap, and nparticles_.
Referenced by MonitoredDecays().
{ namePidMap["d"] = 1; namePidMap["u"] = 2; namePidMap["s"] = 3; namePidMap["c"] = 4; namePidMap["b"] = 5; namePidMap["t"] = 6; namePidMap["e"] = 11; namePidMap["nu"] = 12; namePidMap["mu"] = 13; namePidMap["tau"] = 15; namePidMap["gamma"] = 22; namePidMap["Z"] = 23; namePidMap["W"] = 24; nparticles_=0; for(std::map<std::string,int>::const_iterator i = namePidMap.begin(); i!= namePidMap.end(); ++i){ nparticles_++; } }
int HiggsValidation::MonitoredDecays::isDecayParticle | ( | int | pid | ) | [inline] |
Definition at line 101 of file HiggsValidation.h.
References i, and namePidMap.
Referenced by HiggsValidation::analyze().
{ int idx=0; for(std::map<std::string,int>::const_iterator i = namePidMap.begin(); i!= namePidMap.end(); ++i) { if(i->second == pid) return idx; idx++; } return -1; }
unsigned int HiggsValidation::MonitoredDecays::NDecayParticles | ( | ) | [inline] |
Definition at line 99 of file HiggsValidation.h.
References nparticles_.
Referenced by HiggsValidation::beginJob().
{return nparticles_;}
size_t HiggsValidation::MonitoredDecays::position | ( | int | pid1, |
int | pid2 | ||
) | [inline] |
Definition at line 64 of file HiggsValidation.h.
References abs, channels, first, i, and edm::second().
Referenced by HiggsValidation::findHiggsDecayChannel().
{ if(abs(pid1) == 14 || abs(pid1) == 16) pid1 = 12; if(abs(pid2) == 14 || abs(pid2) == 16) pid2 = 12; for(size_t i = 0; i < channels.size(); ++i){ if((channels[i].first == abs(pid1) && channels[i].second == abs(pid2)) || (channels[i].first == abs(pid2) && channels[i].second == abs(pid1))) return i+1; } return channels.size()+1; }
size_t HiggsValidation::MonitoredDecays::size | ( | void | ) | [inline] |
Definition at line 74 of file HiggsValidation.h.
References channels.
Referenced by HiggsValidation::beginJob(), and stable().
{return channels.size() + 2;}
size_t HiggsValidation::MonitoredDecays::stable | ( | ) | [inline] |
Definition at line 76 of file HiggsValidation.h.
References size().
Referenced by HiggsValidation::findHiggsDecayChannel().
{return size();}
size_t HiggsValidation::MonitoredDecays::undetermined | ( | ) | [inline] |
Definition at line 75 of file HiggsValidation.h.
Referenced by HiggsValidation::findHiggsDecayChannel().
{return 0;}
std::vector<std::pair<int,int> > HiggsValidation::MonitoredDecays::channels [private] |
Definition at line 152 of file HiggsValidation.h.
Referenced by channel(), fill(), position(), and size().
std::map<std::string,int> HiggsValidation::MonitoredDecays::namePidMap [private] |
Definition at line 150 of file HiggsValidation.h.
Referenced by convert(), ConvertIndex(), fillMap(), and isDecayParticle().
unsigned int HiggsValidation::MonitoredDecays::nparticles_ [private] |
Definition at line 153 of file HiggsValidation.h.
Referenced by fillMap(), and NDecayParticles().