#include <FlavourHistorgrams.h>
Public Member Functions | |
int * | arrayDimension () const |
std::string | baseNameDescription () const |
std::string | baseNameTitle () const |
void | divide (const FlavourHistograms< T > &bHD) const |
void | epsPlot (const std::string &name) |
void | fill (const int &flavour, const T *variable) const |
void | fill (const int &flavour, const T &variable) const |
FlavourHistograms (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) | |
std::vector< TH1F * > | getHistoVector () const |
TH1F * | histo_all () const |
TH1F * | histo_b () const |
TH1F * | histo_c () const |
TH1F * | histo_d () const |
TH1F * | histo_dus () const |
TH1F * | histo_dusg () const |
TH1F * | histo_g () const |
TH1F * | histo_ni () const |
TH1F * | histo_s () const |
TH1F * | histo_u () const |
int | indexToPlot () const |
double | lowerBound () const |
int | maxDimension () const |
int | nBins () const |
void | plot (TPad *theCanvas=0) |
std::string | plotFirst () const |
bool | plotLog () const |
bool | plotNormalized () const |
void | SetMaximum (const double &max) |
void | SetMinimum (const double &min) |
void | settitle (const char *title) |
bool | statistics () const |
double | upperBound () const |
virtual | ~FlavourHistograms () |
Protected Member Functions | |
void | fillVariable (const int &flavour, const T &var) const |
Protected Attributes | |
int * | theArrayDimension |
std::string | theBaseNameDescription |
std::string | theBaseNameTitle |
TCanvas * | theCanvas |
MonitorElement * | theHisto_all |
MonitorElement * | theHisto_b |
MonitorElement * | theHisto_c |
MonitorElement * | theHisto_d |
MonitorElement * | theHisto_dus |
MonitorElement * | theHisto_dusg |
MonitorElement * | theHisto_g |
MonitorElement * | theHisto_ni |
MonitorElement * | theHisto_s |
MonitorElement * | theHisto_u |
int | theIndexToPlot |
double | theLowerBound |
double | theMax |
int | theMaxDimension |
double | theMin |
int | theNBins |
std::string | thePlotFirst |
bool | thePlotLog |
bool | thePlotNormalized |
bool | theStatistics |
double | theUpperBound |
Private Member Functions | |
FlavourHistograms () | |
Private Attributes | |
bool | mcPlots_ |
Definition at line 28 of file FlavourHistorgrams.h.
FlavourHistograms< T >::FlavourHistograms | ( | 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 | ||
) |
Definition at line 145 of file FlavourHistorgrams.h.
References HistoProviderDQM::access(), HistoProviderDQM::book1D(), gather_cfg::cout, MonitorElement::getTH1F(), FlavourHistograms< T >::mcPlots_, FlavourHistograms< T >::theArrayDimension, FlavourHistograms< T >::theBaseNameDescription, FlavourHistograms< T >::theBaseNameTitle, FlavourHistograms< T >::theCanvas, FlavourHistograms< T >::theHisto_all, FlavourHistograms< T >::theHisto_b, FlavourHistograms< T >::theHisto_c, FlavourHistograms< T >::theHisto_d, FlavourHistograms< T >::theHisto_dus, FlavourHistograms< T >::theHisto_dusg, FlavourHistograms< T >::theHisto_g, FlavourHistograms< T >::theHisto_ni, FlavourHistograms< T >::theHisto_s, FlavourHistograms< T >::theHisto_u, FlavourHistograms< T >::theLowerBound, FlavourHistograms< T >::theNBins, FlavourHistograms< T >::thePlotFirst, FlavourHistograms< T >::theStatistics, and FlavourHistograms< T >::theUpperBound.
: // BaseFlavourHistograms () , // theVariable ( variable_ ) , theMaxDimension(-1), theIndexToPlot(-1), theBaseNameTitle ( baseNameTitle_ ) , theBaseNameDescription ( baseNameDescription_ ) , theNBins ( nBins_ ) , theLowerBound ( lowerBound_ ) , theUpperBound ( upperBound_ ) , theStatistics ( statistics_ ) , thePlotLog ( plotLog_ ) , thePlotNormalized ( plotNormalized_ ) , thePlotFirst ( plotFirst_ ), theMin(-1.), theMax(-1.), mcPlots_(mc) { // defaults for array dimensions theArrayDimension = 0 ; // check plot order string if ( thePlotFirst == "l" || thePlotFirst == "c" || thePlotFirst == "b" ) { // OK } else { // not correct: print warning and set default (l) std::cout << "FlavourHistograms::FlavourHistograms : thePlotFirst was not correct : " << thePlotFirst << std::endl ; std::cout << "FlavourHistograms::FlavourHistograms : Set it to default value (l)! " << std::endl ; thePlotFirst = "l" ; } if (!update) { // book histos HistoProviderDQM prov("Btag",folder); theHisto_all = (prov.book1D( theBaseNameTitle + "ALL" , theBaseNameDescription + " all jets" , theNBins , theLowerBound , theUpperBound )) ; if (mcPlots_) { theHisto_d = (prov.book1D ( theBaseNameTitle + "D" , theBaseNameDescription + " d-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_u = (prov.book1D ( theBaseNameTitle + "U" , theBaseNameDescription + " u-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_s = (prov.book1D ( theBaseNameTitle + "S" , theBaseNameDescription + " s-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_c = (prov.book1D ( theBaseNameTitle + "C" , theBaseNameDescription + " c-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_b = (prov.book1D ( theBaseNameTitle + "B" , theBaseNameDescription + " b-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_g = (prov.book1D ( theBaseNameTitle + "G" , theBaseNameDescription + " g-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_ni = (prov.book1D ( theBaseNameTitle + "NI" , theBaseNameDescription + " ni-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_dus = (prov.book1D ( theBaseNameTitle + "DUS" , theBaseNameDescription + " dus-jets" , theNBins , theLowerBound , theUpperBound )) ; theHisto_dusg = (prov.book1D ( theBaseNameTitle + "DUSG" , theBaseNameDescription + " dusg-jets" , theNBins , theLowerBound , theUpperBound )) ; }else{ theHisto_d = 0; theHisto_u = 0; theHisto_s = 0; theHisto_c = 0; theHisto_b = 0; theHisto_g = 0; theHisto_ni = 0; theHisto_dus = 0; theHisto_dusg = 0; } // statistics if requested if ( theStatistics ) { theHisto_all ->getTH1F()->Sumw2() ; if (mcPlots_ ) { theHisto_d ->getTH1F()->Sumw2() ; theHisto_u ->getTH1F()->Sumw2() ; theHisto_s ->getTH1F()->Sumw2() ; theHisto_c ->getTH1F()->Sumw2() ; theHisto_b ->getTH1F()->Sumw2() ; theHisto_g ->getTH1F()->Sumw2() ; theHisto_ni ->getTH1F()->Sumw2() ; theHisto_dus ->getTH1F()->Sumw2() ; theHisto_dusg->getTH1F()->Sumw2() ; } } } else { HistoProviderDQM prov("Btag",folder); theHisto_all = prov.access(theBaseNameTitle + "ALL" ) ; if (mcPlots_) { theHisto_d = prov.access(theBaseNameTitle + "D" ) ; theHisto_u = prov.access(theBaseNameTitle + "U" ) ; theHisto_s = prov.access(theBaseNameTitle + "S" ) ; theHisto_c = prov.access(theBaseNameTitle + "C" ) ; theHisto_b =prov.access(theBaseNameTitle + "B" ) ; theHisto_g =prov.access(theBaseNameTitle + "G" ) ; theHisto_ni =prov.access(theBaseNameTitle + "NI" ) ; theHisto_dus =prov.access(theBaseNameTitle + "DUS" ) ; theHisto_dusg =prov.access(theBaseNameTitle + "DUSG") ; } } // defaults for other data members theCanvas = 0 ; }
FlavourHistograms< T >::~FlavourHistograms | ( | ) | [virtual] |
Definition at line 234 of file FlavourHistorgrams.h.
{ // delete the canvas*/ delete theCanvas ; }
FlavourHistograms< T >::FlavourHistograms | ( | ) | [inline, private] |
Definition at line 138 of file FlavourHistorgrams.h.
{}
int* FlavourHistograms< T >::arrayDimension | ( | ) | const [inline] |
Definition at line 75 of file FlavourHistorgrams.h.
Referenced by TrackIPHistograms< T >::fill().
{ return theArrayDimension; }
std::string FlavourHistograms< T >::baseNameDescription | ( | ) | const [inline] |
Definition at line 67 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
{ return theBaseNameDescription ; }
std::string FlavourHistograms< T >::baseNameTitle | ( | ) | const [inline] |
Definition at line 66 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
{ return theBaseNameTitle ; }
void FlavourHistograms< T >::divide | ( | const FlavourHistograms< T > & | bHD | ) | const |
Definition at line 452 of file FlavourHistorgrams.h.
References MultipleCompare::Divide(), getTH1F(), FlavourHistograms< T >::histo_all(), FlavourHistograms< T >::histo_b(), FlavourHistograms< T >::histo_c(), FlavourHistograms< T >::histo_d(), FlavourHistograms< T >::histo_dus(), FlavourHistograms< T >::histo_dusg(), FlavourHistograms< T >::histo_g(), FlavourHistograms< T >::histo_ni(), FlavourHistograms< T >::histo_s(), and FlavourHistograms< T >::histo_u().
Referenced by EffPurFromHistos::EffPurFromHistos().
{ // divide histos using binomial errors // // ATTENTION: It's the responsability of the user to make sure that the HistoDescriptions // involved in this operation have been constructed with the statistics option switched on!! // theHisto_all ->getTH1F()-> Divide ( theHisto_all->getTH1F() , bHD.histo_all () , 1.0 , 1.0 , "b" ) ; if (mcPlots_) { theHisto_d ->getTH1F()-> Divide ( theHisto_d ->getTH1F() , bHD.histo_d () , 1.0 , 1.0 , "b" ) ; theHisto_u ->getTH1F()-> Divide ( theHisto_u ->getTH1F() , bHD.histo_u () , 1.0 , 1.0 , "b" ) ; theHisto_s ->getTH1F()-> Divide ( theHisto_s ->getTH1F() , bHD.histo_s () , 1.0 , 1.0 , "b" ) ; theHisto_c ->getTH1F()-> Divide ( theHisto_c ->getTH1F() , bHD.histo_c () , 1.0 , 1.0 , "b" ) ; theHisto_b ->getTH1F()-> Divide ( theHisto_b ->getTH1F() , bHD.histo_b () , 1.0 , 1.0 , "b" ) ; theHisto_g ->getTH1F()-> Divide ( theHisto_g ->getTH1F() , bHD.histo_g () , 1.0 , 1.0 , "b" ) ; theHisto_ni ->getTH1F()-> Divide ( theHisto_ni->getTH1F() , bHD.histo_ni () , 1.0 , 1.0 , "b" ) ; theHisto_dus ->getTH1F()-> Divide ( theHisto_dus->getTH1F() , bHD.histo_dus () , 1.0 , 1.0 , "b" ) ; theHisto_dusg ->getTH1F()-> Divide ( theHisto_dusg->getTH1F() , bHD.histo_dusg() , 1.0 , 1.0 , "b" ) ; } }
void FlavourHistograms< T >::epsPlot | ( | const std::string & | name | ) |
Definition at line 440 of file FlavourHistorgrams.h.
References plotResiduals::plot().
Referenced by TrackProbabilityTagPlotter::epsPlot(), SoftLeptonTagPlotter::epsPlot(), JetTagPlotter::epsPlot(), TrackCountingTagPlotter::epsPlot(), EffPurFromHistos::epsPlot(), and TrackIPTagPlotter::epsPlot().
{ TCanvas tc(theBaseNameTitle.c_str() , theBaseNameDescription.c_str()); plot(&tc); tc.Print((name + theBaseNameTitle + ".eps").c_str()); }
void FlavourHistograms< T >::fill | ( | const int & | flavour, |
const T & | variable | ||
) | const |
Definition at line 251 of file FlavourHistorgrams.h.
Referenced by TrackCountingTagPlotter::analyzeTag(), TrackIPTagPlotter::analyzeTag(), JetTagPlotter::analyzeTag(), SoftLeptonTagPlotter::analyzeTag(), and TrackIPHistograms< T >::fill().
{ // For single variables and arrays (for arrays only a single index can be filled) fillVariable ( flavour , variable ) ; }
void FlavourHistograms< T >::fill | ( | const int & | flavour, |
const T * | variable | ||
) | const |
Definition at line 258 of file FlavourHistorgrams.h.
References i.
{ if ( theArrayDimension == 0 ) { // single variable fillVariable ( flavour , *variable ) ; } else { // array int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension ; // for ( int i = 0 ; i != iMax ; ++i ) { // check if only one index to be plotted (<0: switched off -> plot all) if ( ( theIndexToPlot < 0 ) || ( i == theIndexToPlot ) ) { fillVariable ( flavour , *(variable+i) ) ; } } // if single index to be filled but not enough entries: fill 0.0 (convention!) if ( theIndexToPlot >= iMax ) { // cout << "==>> The index to be filled is too big -> fill 0.0 : " << theBaseNameTitle << " : " << theIndexToPlot << " >= " << iMax << endl ; const T& theZero = static_cast<T> ( 0.0 ) ; fillVariable ( flavour , theZero ) ; } } }
void FlavourHistograms< T >::fillVariable | ( | const int & | flavour, |
const T & | var | ||
) | const [protected] |
Definition at line 474 of file FlavourHistorgrams.h.
{ // all theHisto_all ->Fill ( var ) ; // flavour specific if (!mcPlots_) return; switch(flavour) { case 1: theHisto_d->Fill( var ); theHisto_dus->Fill( var ); theHisto_dusg->Fill( var ); return; case 2: theHisto_u->Fill( var ); theHisto_dus->Fill( var ); theHisto_dusg->Fill( var ); return; case 3: theHisto_s->Fill( var ); theHisto_dus->Fill( var ); theHisto_dusg->Fill( var ); return; case 4: theHisto_c->Fill( var ); return; case 5: theHisto_b->Fill( var ); return; case 21: theHisto_g->Fill( var ); theHisto_dusg->Fill( var ); return; default: theHisto_ni->Fill( var ); return; } }
std::vector< TH1F * > FlavourHistograms< T >::getHistoVector | ( | ) | const |
Definition at line 513 of file FlavourHistorgrams.h.
References getTH1F().
Referenced by EffPurFromHistos::EffPurFromHistos().
{ std::vector<TH1F*> histoVector; histoVector.push_back ( theHisto_all->getTH1F() ); if (mcPlots_) { histoVector.push_back ( theHisto_d->getTH1F() ); histoVector.push_back ( theHisto_u->getTH1F() ); histoVector.push_back ( theHisto_s->getTH1F() ); histoVector.push_back ( theHisto_c->getTH1F() ); histoVector.push_back ( theHisto_b->getTH1F() ); histoVector.push_back ( theHisto_g ->getTH1F() ); histoVector.push_back ( theHisto_ni->getTH1F() ); histoVector.push_back ( theHisto_dus->getTH1F() ); histoVector.push_back ( theHisto_dusg->getTH1F()); } return histoVector; }
TH1F* FlavourHistograms< T >::histo_all | ( | ) | const [inline] |
Definition at line 80 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide().
{ return theHisto_all->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_b | ( | ) | const [inline] |
Definition at line 85 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_b->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_c | ( | ) | const [inline] |
Definition at line 84 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_c->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_d | ( | ) | const [inline] |
Definition at line 81 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_d ->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_dus | ( | ) | const [inline] |
Definition at line 88 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_dus->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_dusg | ( | ) | const [inline] |
Definition at line 89 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_dusg->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_g | ( | ) | const [inline] |
Definition at line 86 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_g->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_ni | ( | ) | const [inline] |
Definition at line 87 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_ni->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_s | ( | ) | const [inline] |
Definition at line 83 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_s->getTH1F() ; }
TH1F* FlavourHistograms< T >::histo_u | ( | ) | const [inline] |
Definition at line 82 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::divide(), and EffPurFromHistos::EffPurFromHistos().
{ return theHisto_u->getTH1F() ; }
int FlavourHistograms< T >::indexToPlot | ( | ) | const [inline] |
Definition at line 77 of file FlavourHistorgrams.h.
Referenced by TrackIPHistograms< T >::fill().
{return theIndexToPlot; }
double FlavourHistograms< T >::lowerBound | ( | ) | const [inline] |
Definition at line 69 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
{ return theLowerBound ; }
int FlavourHistograms< T >::maxDimension | ( | ) | const [inline] |
Definition at line 76 of file FlavourHistorgrams.h.
Referenced by TrackIPHistograms< T >::fill().
{return theMaxDimension; }
int FlavourHistograms< T >::nBins | ( | ) | const [inline] |
Definition at line 68 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
{ return theNBins ; }
void FlavourHistograms< T >::plot | ( | TPad * | theCanvas = 0 | ) |
Definition at line 303 of file FlavourHistorgrams.h.
References getTH1F(), MonitorElement::getTH1F(), timingPdfMaker::histo, i, max(), and RecoBTag::setTDRStyle().
Referenced by SoftLeptonTagPlotter::psPlot(), JetTagPlotter::psPlot(), TrackCountingTagPlotter::psPlot(), TrackIPTagPlotter::psPlot(), and TrackProbabilityTagPlotter::psPlot().
{ //fixme: bool btppNI = false; bool btppColour = true; if (theCanvas) theCanvas->cd(); RecoBTag::setTDRStyle()->cd(); gPad->UseCurrentStyle(); // if ( !btppTitle ) gStyle->SetOptTitle ( 0 ) ; // // // here: plot histograms in a canvas // theCanvas = new TCanvas ( "C" + theBaseNameTitle , "C" + theBaseNameDescription , // btppXCanvas , btppYCanvas ) ; // theCanvas->SetFillColor ( 0 ) ; // theCanvas->cd ( 1 ) ; gPad->SetLogy ( 0 ) ; if ( thePlotLog ) gPad->SetLogy ( 1 ) ; gPad->SetGridx ( 0 ) ; gPad->SetGridy ( 0 ) ; gPad->SetTitle ( 0 ) ; MonitorElement * histo[4]; int col[4], lineStyle[4], markerStyle[4]; int lineWidth = 1 ; const double markerSize = gPad->GetWh() * gPad->GetHNDC() / 500.; // default (l) histo[0] = theHisto_dusg ; //CW histo_1 = theHisto_dus ; histo[1] = theHisto_b ; histo[2] = theHisto_c ; histo[3]= 0 ; double max = theMax; if (theMax<=0.) { max = theHisto_dusg->getTH1F()->GetMaximum(); if (theHisto_b->getTH1F()->GetMaximum() > max) max = theHisto_b->getTH1F()->GetMaximum(); if (theHisto_c->getTH1F()->GetMaximum() > max) max = theHisto_c->getTH1F()->GetMaximum(); } if (btppNI) { histo[3] = theHisto_ni ; if (theHisto_ni->getTH1F()->GetMaximum() > max) max = theHisto_ni->getTH1F()->GetMaximum(); } if ( btppColour ) { // print colours col[0] = 4 ; col[1] = 2 ; col[2] = 6 ; col[3] = 3 ; lineStyle[0] = 1 ; lineStyle[1] = 1 ; lineStyle[2] = 1 ; lineStyle[3] = 1 ; markerStyle[0] = 20 ; markerStyle[1] = 21 ; markerStyle[2] = 22 ; markerStyle[3] = 23 ; lineWidth = 1 ; } else { // different marker/line styles col[1] = 1 ; col[2] = 1 ; col[3] = 1 ; col[0] = 1 ; lineStyle[0] = 2 ; lineStyle[1] = 1 ; lineStyle[2] = 3 ; lineStyle[3] = 4 ; markerStyle[0] = 20 ; markerStyle[1] = 21 ; markerStyle[2] = 22 ; markerStyle[3] = 23 ; } // if changing order (NI stays always last) // c to plot first if ( thePlotFirst == "c" ) { histo[0] = theHisto_c ; if ( btppColour ) col[0] = 6 ; if ( !btppColour ) lineStyle[0] = 3 ; histo[2] = theHisto_dusg ; if ( btppColour ) col[2] = 4 ; if ( !btppColour ) lineStyle[2] = 2 ; } // b to plot first if ( thePlotFirst == "b" ) { histo[0] = theHisto_b ; if ( btppColour ) col[0] = 2 ; if ( !btppColour ) lineStyle[0] = 1 ; histo[1] = theHisto_dusg ; if ( btppColour ) col[1] = 4 ; if ( !btppColour ) lineStyle[1] = 2 ; } histo[0] ->getTH1F()->GetXaxis()->SetTitle ( theBaseNameDescription.c_str() ) ; histo[0] ->getTH1F()->GetYaxis()->SetTitle ( "Arbitrary Units" ) ; histo[0] ->getTH1F()->GetYaxis()->SetTitleOffset(1.25) ; for (int i=0; i != 4; ++i) { if (histo[i]== 0 ) continue; histo[i] ->getTH1F()->SetStats ( false ) ; histo[i] ->getTH1F()->SetLineStyle ( lineStyle[i] ) ; histo[i] ->getTH1F()->SetLineWidth ( lineWidth ) ; histo[i] ->getTH1F()->SetLineColor ( col[i] ) ; histo[i] ->getTH1F()->SetMarkerStyle ( markerStyle[i] ) ; histo[i] ->getTH1F()->SetMarkerColor ( col[i] ) ; histo[i] ->getTH1F()->SetMarkerSize ( markerSize ) ; } if ( thePlotNormalized ) { // cout <<histo[0]->GetEntries() <<" "<< histo[1]->GetEntries() <<" "<< histo[2]->GetEntries()<<" "<<histo[3]->GetEntries()<<endl; if (histo[0]->getTH1F()->GetEntries() != 0) {histo[0]->getTH1F() ->DrawNormalized() ;} else { histo[0]->getTH1F() ->SetMaximum(1.0); histo[0] ->getTH1F()->Draw() ;} if (histo[1]->getTH1F()->GetEntries() != 0) histo[1] ->getTH1F()->DrawNormalized("Same") ; if (histo[2]->getTH1F()->GetEntries() != 0) histo[2]->getTH1F() ->DrawNormalized("Same") ; if ((histo[3] != 0) && (histo[3]->getTH1F()->GetEntries() != 0)) histo[3] ->getTH1F()->DrawNormalized("Same") ; } else { histo[0]->getTH1F()->SetMaximum(max*1.05); if (theMin!=-1.) histo[0]->getTH1F()->SetMinimum(theMin); histo[0]->getTH1F()->Draw() ; histo[1]->getTH1F()->Draw("Same") ; histo[2]->getTH1F()->Draw("Same") ; if ( histo[3] != 0 ) histo[3]->getTH1F()->Draw("Same") ; } }
std::string FlavourHistograms< T >::plotFirst | ( | ) | const [inline] |
Definition at line 74 of file FlavourHistorgrams.h.
{ return thePlotFirst ; }
bool FlavourHistograms< T >::plotLog | ( | ) | const [inline] |
Definition at line 72 of file FlavourHistorgrams.h.
{ return thePlotLog ; }
bool FlavourHistograms< T >::plotNormalized | ( | ) | const [inline] |
Definition at line 73 of file FlavourHistorgrams.h.
{ return thePlotNormalized ; }
void FlavourHistograms< T >::SetMaximum | ( | const double & | max | ) | [inline] |
Definition at line 61 of file FlavourHistorgrams.h.
void FlavourHistograms< T >::SetMinimum | ( | const double & | min | ) | [inline] |
Definition at line 62 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
void FlavourHistograms< T >::settitle | ( | const char * | title | ) |
Reimplemented in TrackIPHistograms< T >, TrackIPHistograms< double >, TrackIPHistograms< float >, and TrackIPHistograms< int >.
Definition at line 285 of file FlavourHistorgrams.h.
Referenced by JetTagPlotter::JetTagPlotter(), and TrackIPHistograms< T >::settitle().
{ if(theHisto_all) theHisto_all ->setAxisTitle(title) ; if (mcPlots_) { theHisto_d ->setAxisTitle(title) ; theHisto_u ->setAxisTitle(title) ; theHisto_s ->setAxisTitle(title) ; theHisto_c ->setAxisTitle(title) ; theHisto_b ->setAxisTitle(title) ; theHisto_g ->setAxisTitle(title) ; theHisto_ni ->setAxisTitle(title) ; theHisto_dus ->setAxisTitle(title) ; theHisto_dusg->setAxisTitle(title) ; } }
bool FlavourHistograms< T >::statistics | ( | ) | const [inline] |
Definition at line 71 of file FlavourHistorgrams.h.
{ return theStatistics ; }
double FlavourHistograms< T >::upperBound | ( | ) | const [inline] |
Definition at line 70 of file FlavourHistorgrams.h.
Referenced by EffPurFromHistos::EffPurFromHistos().
{ return theUpperBound ; }
bool FlavourHistograms< T >::mcPlots_ [private] |
Definition at line 140 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms().
int* FlavourHistograms< T >::theArrayDimension [protected] |
Definition at line 105 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::arrayDimension(), and FlavourHistograms< T >::FlavourHistograms().
std::string FlavourHistograms< T >::theBaseNameDescription [protected] |
Definition at line 110 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::baseNameDescription(), and FlavourHistograms< T >::FlavourHistograms().
std::string FlavourHistograms< T >::theBaseNameTitle [protected] |
Definition at line 109 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::baseNameTitle(), and FlavourHistograms< T >::FlavourHistograms().
TCanvas* FlavourHistograms< T >::theCanvas [protected] |
Definition at line 136 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms().
MonitorElement* FlavourHistograms< T >::theHisto_all [protected] |
Definition at line 121 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_all().
MonitorElement* FlavourHistograms< T >::theHisto_b [protected] |
Definition at line 126 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_b().
MonitorElement* FlavourHistograms< T >::theHisto_c [protected] |
Definition at line 125 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_c().
MonitorElement* FlavourHistograms< T >::theHisto_d [protected] |
Definition at line 122 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_d().
MonitorElement* FlavourHistograms< T >::theHisto_dus [protected] |
Definition at line 129 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_dus().
MonitorElement* FlavourHistograms< T >::theHisto_dusg [protected] |
Definition at line 130 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_dusg().
MonitorElement* FlavourHistograms< T >::theHisto_g [protected] |
Definition at line 127 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_g().
MonitorElement* FlavourHistograms< T >::theHisto_ni [protected] |
Definition at line 128 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_ni().
MonitorElement* FlavourHistograms< T >::theHisto_s [protected] |
Definition at line 124 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_s().
MonitorElement* FlavourHistograms< T >::theHisto_u [protected] |
Definition at line 123 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::histo_u().
int FlavourHistograms< T >::theIndexToPlot [protected] |
Definition at line 107 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::indexToPlot().
double FlavourHistograms< T >::theLowerBound [protected] |
Definition at line 112 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::lowerBound().
double FlavourHistograms< T >::theMax [protected] |
Definition at line 118 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::SetMaximum().
int FlavourHistograms< T >::theMaxDimension [protected] |
Definition at line 106 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::maxDimension().
double FlavourHistograms< T >::theMin [protected] |
Definition at line 118 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::SetMinimum().
int FlavourHistograms< T >::theNBins [protected] |
Definition at line 111 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::nBins().
std::string FlavourHistograms< T >::thePlotFirst [protected] |
Definition at line 117 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::plotFirst().
bool FlavourHistograms< T >::thePlotLog [protected] |
Definition at line 115 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::plotLog().
bool FlavourHistograms< T >::thePlotNormalized [protected] |
Definition at line 116 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< int >::plotNormalized().
bool FlavourHistograms< T >::theStatistics [protected] |
Definition at line 114 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::statistics().
double FlavourHistograms< T >::theUpperBound [protected] |
Definition at line 113 of file FlavourHistorgrams.h.
Referenced by FlavourHistograms< T >::FlavourHistograms(), and FlavourHistograms< int >::upperBound().