#include <TrackIPHistograms.h>
Public Member Functions | |
void | fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T &variable, const bool &hasTrack) const |
void | fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T *variable, const bool &hasTrack) const |
void | settitle (const char *title) |
TrackIPHistograms (const std::string &baseNameTitle_, const std::string &baseNameDescription_, const int &nBins_, const double &lowerBound_, const double &upperBound_, const bool &statistics, const bool &plotLog_, const bool &plotNormalized_, const std::string &plotFirst_, const bool &update, const std::string &folder, const bool &mc, const bool &quality) | |
virtual | ~TrackIPHistograms () |
Protected Member Functions | |
void | fillVariable (const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const |
Protected Attributes | |
bool | quality_ |
MonitorElement * | theQual_highpur |
MonitorElement * | theQual_loose |
MonitorElement * | theQual_tight |
MonitorElement * | theQual_undefined |
Private Member Functions | |
TrackIPHistograms () |
Definition at line 10 of file TrackIPHistograms.h.
TrackIPHistograms< T >::TrackIPHistograms | ( | const std::string & | baseNameTitle_, |
const std::string & | baseNameDescription_, | ||
const int & | nBins_, | ||
const double & | lowerBound_, | ||
const double & | upperBound_, | ||
const bool & | statistics, | ||
const bool & | plotLog_, | ||
const bool & | plotNormalized_, | ||
const std::string & | plotFirst_, | ||
const bool & | update, | ||
const std::string & | folder, | ||
const bool & | mc, | ||
const bool & | quality | ||
) |
Definition at line 43 of file TrackIPHistograms.h.
References HistoProviderDQM::access(), HistoProviderDQM::book1D(), MonitorElement::getTH1F(), TrackIPHistograms< T >::quality_, TrackIPHistograms< T >::theQual_highpur, TrackIPHistograms< T >::theQual_loose, TrackIPHistograms< T >::theQual_tight, and TrackIPHistograms< T >::theQual_undefined.
: FlavourHistograms<T>(baseNameTitle_, baseNameDescription_, nBins_, lowerBound_, upperBound_, statistics_, plotLog_, plotNormalized_, plotFirst_, update, folder, mc), quality_(quality) { if(quality_) { if(!update) { HistoProviderDQM prov("Btag",folder); theQual_undefined = prov.book1D( baseNameTitle_ + "QualUnDef" , baseNameDescription_ + " Undefined Quality", nBins_, lowerBound_, upperBound_); theQual_loose = prov.book1D( baseNameTitle_ + "QualLoose" , baseNameDescription_ + " Loose Quality", nBins_, lowerBound_, upperBound_); theQual_tight = prov.book1D( baseNameTitle_ + "QualTight" , baseNameDescription_ + " Tight Quality", nBins_, lowerBound_, upperBound_); theQual_highpur = prov.book1D( baseNameTitle_ + "QualHighPur" , baseNameDescription_ + " High Purity Quality", nBins_, lowerBound_, upperBound_); if( statistics_ ) { theQual_undefined->getTH1F()->Sumw2(); theQual_loose->getTH1F()->Sumw2(); theQual_tight->getTH1F()->Sumw2(); theQual_highpur->getTH1F()->Sumw2(); } } else { HistoProviderDQM prov("Btag",folder); theQual_undefined = prov.access(baseNameTitle_ + "QualUnDef"); theQual_loose = prov.access(baseNameTitle_ + "QualLoose"); theQual_tight = prov.access(baseNameTitle_ + "QualTight"); theQual_highpur = prov.access(baseNameTitle_ + "QualHighPur"); } } }
virtual TrackIPHistograms< T >::~TrackIPHistograms | ( | ) | [inline, virtual] |
Definition at line 19 of file TrackIPHistograms.h.
{};
TrackIPHistograms< T >::TrackIPHistograms | ( | ) | [inline, private] |
Definition at line 39 of file TrackIPHistograms.h.
{}
void TrackIPHistograms< T >::fill | ( | const int & | flavour, |
const reco::TrackBase::TrackQuality & | quality, | ||
const T & | variable, | ||
const bool & | hasTrack | ||
) | const |
Definition at line 75 of file TrackIPHistograms.h.
References FlavourHistograms< T >::fill().
Referenced by TrackIPTagPlotter::analyzeTag().
{ FlavourHistograms<T>::fill(flavour, variable); if(quality_) fillVariable(quality, variable, hasTrack); }
void TrackIPHistograms< T >::fill | ( | const int & | flavour, |
const reco::TrackBase::TrackQuality & | quality, | ||
const T * | variable, | ||
const bool & | hasTrack | ||
) | const |
Definition at line 83 of file TrackIPHistograms.h.
References FlavourHistograms< T >::arrayDimension(), FlavourHistograms< T >::fill(), i, FlavourHistograms< T >::indexToPlot(), and FlavourHistograms< T >::maxDimension().
{ const int* theArrayDimension = FlavourHistograms<T>::arrayDimension(); const int& theMaxDimension = FlavourHistograms<T>::maxDimension(); const int& theIndexToPlot = FlavourHistograms<T>::indexToPlot(); FlavourHistograms<T>::fill(flavour, variable); if( theArrayDimension == 0 && quality_) { fillVariable( quality, *variable); } else { int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension ; for(int i = 0; i != iMax; ++i) { if( quality_ && (( theIndexToPlot < 0) || ( i == theIndexToPlot)) ) { fillVariable ( flavour , *(variable + i), hasTrack); } } if(theIndexToPlot >= iMax && quality_) { const T& theZero = static_cast<T> (0.0); fillVariable ( quality, theZero, hasTrack); } } }
void TrackIPHistograms< T >::fillVariable | ( | const reco::TrackBase::TrackQuality & | qual, |
const T & | var, | ||
const bool & | hasTrack | ||
) | const [protected] |
Definition at line 118 of file TrackIPHistograms.h.
References reco::TrackBase::highPurity, reco::TrackBase::loose, and reco::TrackBase::tight.
{ if(!hasTrack || !quality_) return; switch(qual) { case reco::TrackBase::loose: theQual_loose->Fill(var); break; case reco::TrackBase::tight: theQual_tight->Fill(var); break; case reco::TrackBase::highPurity: theQual_highpur->Fill(var); break; default: theQual_undefined->Fill(var); break; } }
void TrackIPHistograms< T >::settitle | ( | const char * | title | ) |
Reimplemented from FlavourHistograms< T >.
Definition at line 108 of file TrackIPHistograms.h.
References FlavourHistograms< T >::settitle().
bool TrackIPHistograms< T >::quality_ [protected] |
Definition at line 31 of file TrackIPHistograms.h.
Referenced by TrackIPHistograms< T >::TrackIPHistograms().
MonitorElement* TrackIPHistograms< T >::theQual_highpur [protected] |
Definition at line 36 of file TrackIPHistograms.h.
Referenced by TrackIPHistograms< T >::TrackIPHistograms().
MonitorElement* TrackIPHistograms< T >::theQual_loose [protected] |
Definition at line 34 of file TrackIPHistograms.h.
Referenced by TrackIPHistograms< T >::TrackIPHistograms().
MonitorElement* TrackIPHistograms< T >::theQual_tight [protected] |
Definition at line 35 of file TrackIPHistograms.h.
Referenced by TrackIPHistograms< T >::TrackIPHistograms().
MonitorElement* TrackIPHistograms< T >::theQual_undefined [protected] |
Definition at line 33 of file TrackIPHistograms.h.
Referenced by TrackIPHistograms< T >::TrackIPHistograms().