CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

FlavourHistograms< T > Class Template Reference

#include <FlavourHistorgrams.h>

Inheritance diagram for FlavourHistograms< T >:
TrackIPHistograms< T >

List of all members.

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
MonitorElementtheHisto_all
MonitorElementtheHisto_b
MonitorElementtheHisto_c
MonitorElementtheHisto_d
MonitorElementtheHisto_dus
MonitorElementtheHisto_dusg
MonitorElementtheHisto_g
MonitorElementtheHisto_ni
MonitorElementtheHisto_s
MonitorElementtheHisto_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_

Detailed Description

template<class T>
class FlavourHistograms< T >

Definition at line 28 of file FlavourHistorgrams.h.


Constructor & Destructor Documentation

template<class T >
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 ;
}
template<class T >
FlavourHistograms< T >::~FlavourHistograms ( ) [virtual]

Definition at line 234 of file FlavourHistorgrams.h.

                                          {
  // delete the canvas*/
  delete theCanvas ;
}
template<class T>
FlavourHistograms< T >::FlavourHistograms ( ) [inline, private]

Definition at line 138 of file FlavourHistorgrams.h.

{}

Member Function Documentation

template<class T>
int* FlavourHistograms< T >::arrayDimension ( ) const [inline]

Definition at line 75 of file FlavourHistorgrams.h.

Referenced by TrackIPHistograms< T >::fill().

{ return theArrayDimension; }
template<class T>
std::string FlavourHistograms< T >::baseNameDescription ( ) const [inline]

Definition at line 67 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

template<class T>
std::string FlavourHistograms< T >::baseNameTitle ( ) const [inline]

Definition at line 66 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

{ return theBaseNameTitle       ; }
template<class T>
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" ) ;
    }
}
template<class T >
void FlavourHistograms< T >::epsPlot ( const std::string &  name)
template<class T>
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 ) ;
}
template<class T>
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 ) ;
    }
  }
} 
template<class T>
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;
  }
}
template<class T >
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;
}
template<class T>
TH1F* FlavourHistograms< T >::histo_all ( ) const [inline]

Definition at line 80 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< T >::divide().

{ return theHisto_all->getTH1F()  ; }    
template<class T>
TH1F* FlavourHistograms< T >::histo_b ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_c ( ) const [inline]
template<class T>
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()   ; }    
template<class T>
TH1F* FlavourHistograms< T >::histo_dus ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_dusg ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_g ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_ni ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_s ( ) const [inline]
template<class T>
TH1F* FlavourHistograms< T >::histo_u ( ) const [inline]
template<class T>
int FlavourHistograms< T >::indexToPlot ( ) const [inline]

Definition at line 77 of file FlavourHistorgrams.h.

Referenced by TrackIPHistograms< T >::fill().

{return theIndexToPlot; }
template<class T>
double FlavourHistograms< T >::lowerBound ( ) const [inline]

Definition at line 69 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

{ return theLowerBound          ; } 
template<class T>
int FlavourHistograms< T >::maxDimension ( ) const [inline]

Definition at line 76 of file FlavourHistorgrams.h.

Referenced by TrackIPHistograms< T >::fill().

{return theMaxDimension; }
template<class T>
int FlavourHistograms< T >::nBins ( ) const [inline]

Definition at line 68 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

{ return theNBins               ; }
template<class T >
void FlavourHistograms< T >::plot ( TPad *  theCanvas = 0)

Definition at line 303 of file FlavourHistorgrams.h.

References getTH1F(), MonitorElement::getTH1F(), interpolateCardsSimple::histo, i, max(), and RecoBTag::setTDRStyle().

Referenced by SoftLeptonTagPlotter::psPlot(), JetTagPlotter::psPlot(), TrackCountingTagPlotter::psPlot(), TrackProbabilityTagPlotter::psPlot(), and TrackIPTagPlotter::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") ;
  }

}
template<class T>
std::string FlavourHistograms< T >::plotFirst ( ) const [inline]

Definition at line 74 of file FlavourHistorgrams.h.

{ return thePlotFirst           ; }
template<class T>
bool FlavourHistograms< T >::plotLog ( ) const [inline]

Definition at line 72 of file FlavourHistorgrams.h.

{ return thePlotLog             ; }
template<class T>
bool FlavourHistograms< T >::plotNormalized ( ) const [inline]

Definition at line 73 of file FlavourHistorgrams.h.

{ return thePlotNormalized      ; }
template<class T>
void FlavourHistograms< T >::SetMaximum ( const double &  max) [inline]

Definition at line 61 of file FlavourHistorgrams.h.

{ theMax = max;}
template<class T>
void FlavourHistograms< T >::SetMinimum ( const double &  min) [inline]

Definition at line 62 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

{ theMin = min;}
template<class T >
void FlavourHistograms< T >::settitle ( const char *  title)
template<class T>
bool FlavourHistograms< T >::statistics ( ) const [inline]

Definition at line 71 of file FlavourHistorgrams.h.

{ return theStatistics          ; }
template<class T>
double FlavourHistograms< T >::upperBound ( ) const [inline]

Definition at line 70 of file FlavourHistorgrams.h.

Referenced by EffPurFromHistos::EffPurFromHistos().

{ return theUpperBound          ; }

Member Data Documentation

template<class T>
bool FlavourHistograms< T >::mcPlots_ [private]

Definition at line 140 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< T >::FlavourHistograms().

template<class T>
int* FlavourHistograms< T >::theArrayDimension [protected]
template<class T>
std::string FlavourHistograms< T >::theBaseNameDescription [protected]
template<class T>
std::string FlavourHistograms< T >::theBaseNameTitle [protected]
template<class T>
TCanvas* FlavourHistograms< T >::theCanvas [protected]

Definition at line 136 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< T >::FlavourHistograms().

template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_all [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_b [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_c [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_d [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_dus [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_dusg [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_g [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_ni [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_s [protected]
template<class T>
MonitorElement* FlavourHistograms< T >::theHisto_u [protected]
template<class T>
int FlavourHistograms< T >::theIndexToPlot [protected]

Definition at line 107 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::indexToPlot().

template<class T>
double FlavourHistograms< T >::theLowerBound [protected]
template<class T>
double FlavourHistograms< T >::theMax [protected]

Definition at line 118 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::SetMaximum().

template<class T>
int FlavourHistograms< T >::theMaxDimension [protected]

Definition at line 106 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::maxDimension().

template<class T>
double FlavourHistograms< T >::theMin [protected]

Definition at line 118 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::SetMinimum().

template<class T>
int FlavourHistograms< T >::theNBins [protected]
template<class T>
std::string FlavourHistograms< T >::thePlotFirst [protected]
template<class T>
bool FlavourHistograms< T >::thePlotLog [protected]

Definition at line 115 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::plotLog().

template<class T>
bool FlavourHistograms< T >::thePlotNormalized [protected]

Definition at line 116 of file FlavourHistorgrams.h.

Referenced by FlavourHistograms< int >::plotNormalized().

template<class T>
bool FlavourHistograms< T >::theStatistics [protected]
template<class T>
double FlavourHistograms< T >::theUpperBound [protected]