CMS 3D CMS Logo

EffPurFromHistos Class Reference

#include <DQMOffline/RecoB/interface/EffPurFromHistos.h>

List of all members.

Public Member Functions

void compute ()
void compute ()
FlavourHistograms< double > * discriminatorCutEfficScan () const
FlavourHistograms< double > * discriminatorCutEfficScan () const
FlavourHistograms< double > * discriminatorNoCutEffic () const
FlavourHistograms< double > * discriminatorNoCutEffic () const
 EffPurFromHistos (const FlavourHistograms< double > *dDiscriminatorFC, int nBin=100, double startO=0.005, double endO=1.005)
 EffPurFromHistos (const TString &ext, TH1F *h_d, TH1F *h_u, TH1F *h_s, TH1F *h_c, TH1F *h_b, TH1F *h_g, TH1F *h_ni, TH1F *h_dus, TH1F *h_dusg, int nBin=100, double startO=0.005, double endO=1.005)
 EffPurFromHistos (const FlavourHistograms< double > *dDiscriminatorFC, std::string label, bool mc, int nBin=100, double startO=0.005, double endO=1.005)
 EffPurFromHistos (const TString &ext, TH1F *h_d, TH1F *h_u, TH1F *h_s, TH1F *h_c, TH1F *h_b, TH1F *h_g, TH1F *h_ni, TH1F *h_dus, TH1F *h_dusg, std::string label, bool mc, int nBin=100, double startO=0.005, double endO=1.005)
void epsPlot (const TString &name)
void epsPlot (const TString &name)
TH1F * getEffFlavVsBEff_b ()
TH1F * getEffFlavVsBEff_b ()
TH1F * getEffFlavVsBEff_c ()
TH1F * getEffFlavVsBEff_c ()
TH1F * getEffFlavVsBEff_d ()
TH1F * getEffFlavVsBEff_d ()
TH1F * getEffFlavVsBEff_dus ()
TH1F * getEffFlavVsBEff_dus ()
TH1F * getEffFlavVsBEff_dusg ()
TH1F * getEffFlavVsBEff_dusg ()
TH1F * getEffFlavVsBEff_g ()
TH1F * getEffFlavVsBEff_g ()
TH1F * getEffFlavVsBEff_ni ()
TH1F * getEffFlavVsBEff_ni ()
TH1F * getEffFlavVsBEff_s ()
TH1F * getEffFlavVsBEff_s ()
TH1F * getEffFlavVsBEff_u ()
TH1F * getEffFlavVsBEff_u ()
void plot (const TString &name, const TString &ext)
void plot (TPad *theCanvas=0)
void plot (const TString &name, const TString &ext)
void plot (TPad *theCanvas=0)
void psPlot (const TString &name)
void psPlot (const TString &name)
void write (const bool allHisto)
 ~EffPurFromHistos ()
 ~EffPurFromHistos ()

Private Member Functions

void check ()
void check ()

Private Attributes

FlavourHistograms< double > * discrCutEfficScan
FlavourHistograms< double > * discrCutEfficScan
FlavourHistograms< double > * discrNoCutEffic
FlavourHistograms< double > * discrNoCutEffic
TH1F * EffFlavVsBEff_b
MonitorElementEffFlavVsBEff_b
TH1F * EffFlavVsBEff_c
MonitorElementEffFlavVsBEff_c
TH1F * EffFlavVsBEff_d
MonitorElementEffFlavVsBEff_d
TH1F * EffFlavVsBEff_dus
MonitorElementEffFlavVsBEff_dus
TH1F * EffFlavVsBEff_dusg
MonitorElementEffFlavVsBEff_dusg
TH1F * EffFlavVsBEff_g
MonitorElementEffFlavVsBEff_g
TH1F * EffFlavVsBEff_ni
MonitorElementEffFlavVsBEff_ni
TH1F * EffFlavVsBEff_s
MonitorElementEffFlavVsBEff_s
TH1F * EffFlavVsBEff_u
MonitorElementEffFlavVsBEff_u
TH1F * effVersusDiscr_b
TH1F * effVersusDiscr_b
TH1F * effVersusDiscr_c
TH1F * effVersusDiscr_c
TH1F * effVersusDiscr_d
TH1F * effVersusDiscr_d
TH1F * effVersusDiscr_dus
TH1F * effVersusDiscr_dus
TH1F * effVersusDiscr_dusg
TH1F * effVersusDiscr_dusg
TH1F * effVersusDiscr_g
TH1F * effVersusDiscr_g
TH1F * effVersusDiscr_ni
TH1F * effVersusDiscr_ni
TH1F * effVersusDiscr_s
TH1F * effVersusDiscr_s
TH1F * effVersusDiscr_u
TH1F * effVersusDiscr_u
double endOutput
bool fromDiscriminatorDistr
TString histoExtension
std::string label_
bool mcPlots_
int nBinOutput
double startOutput


Detailed Description

Definition at line 14 of file EffPurFromHistos.h.


Constructor & Destructor Documentation

EffPurFromHistos::EffPurFromHistos ( const TString &  ext,
TH1F *  h_d,
TH1F *  h_u,
TH1F *  h_s,
TH1F *  h_c,
TH1F *  h_b,
TH1F *  h_g,
TH1F *  h_ni,
TH1F *  h_dus,
TH1F *  h_dusg,
std::string  label,
bool  mc,
int  nBin = 100,
double  startO = 0.005,
double  endO = 1.005 
)

Definition at line 20 of file EffPurFromHistos.cc.

References check(), and fromDiscriminatorDistr.

00022                                                                                                    :
00023         //BTagPlotPrintC(),
00024         histoExtension(ext), effVersusDiscr_d(h_d), effVersusDiscr_u(h_u),
00025         effVersusDiscr_s(h_s), effVersusDiscr_c(h_c), effVersusDiscr_b(h_b),
00026         effVersusDiscr_g(h_g), effVersusDiscr_ni(h_ni), effVersusDiscr_dus(h_dus),
00027         effVersusDiscr_dusg(h_dusg), nBinOutput(nBin), startOutput(startO),
00028         endOutput(endO),  mcPlots_(mc), label_(label)
00029 {
00030   fromDiscriminatorDistr = false;
00031   // consistency check
00032   check();
00033 }

EffPurFromHistos::EffPurFromHistos ( const FlavourHistograms< double > *  dDiscriminatorFC,
std::string  label,
bool  mc,
int  nBin = 100,
double  startO = 0.005,
double  endO = 1.005 
)

Definition at line 36 of file EffPurFromHistos.cc.

References FlavourHistograms< T >::baseNameDescription(), FlavourHistograms< T >::baseNameTitle(), discrCutEfficScan, discrNoCutEffic, FlavourHistograms< T >::divide(), effVersusDiscr_b, effVersusDiscr_c, effVersusDiscr_d, effVersusDiscr_dus, effVersusDiscr_dusg, effVersusDiscr_g, effVersusDiscr_ni, effVersusDiscr_s, effVersusDiscr_u, fromDiscriminatorDistr, FlavourHistograms< T >::getHistoVector(), 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(), FlavourHistograms< T >::histo_u(), histoExtension, FlavourHistograms< T >::lowerBound(), mcPlots_, FlavourHistograms< T >::nBins(), FlavourHistograms< T >::SetMinimum(), funct::sqrt(), sum(), and FlavourHistograms< T >::upperBound().

00037                                     :
00038           nBinOutput(nBin), startOutput(startO), endOutput(endO),  mcPlots_(mc), label_(label){
00039   histoExtension = "_"+dDiscriminatorFC->baseNameTitle();
00040 
00041 
00042   fromDiscriminatorDistr = true;
00043   discrNoCutEffic = new FlavourHistograms<double> (
00044         "totalEntries" + histoExtension, "Total Entries: " + dDiscriminatorFC->baseNameDescription(),
00045         dDiscriminatorFC->nBins(), dDiscriminatorFC->lowerBound(),
00046         dDiscriminatorFC->upperBound(), false, true, false, "b", false, label, mcPlots_ );
00047 
00048   // conditional discriminator cut for efficiency histos
00049 
00050   discrCutEfficScan = new FlavourHistograms<double> (
00051         "effVsDiscrCut" + histoExtension, "Eff. vs Disc. Cut: " + dDiscriminatorFC->baseNameDescription(),
00052         dDiscriminatorFC->nBins(), dDiscriminatorFC->lowerBound(),
00053         dDiscriminatorFC->upperBound(), false, true, false, "b", false, label , mcPlots_ );
00054   discrCutEfficScan->SetMinimum(1E-4);
00055   if (mcPlots_ == true){ 
00056     
00057     effVersusDiscr_d =    discrCutEfficScan->histo_d   ();
00058     effVersusDiscr_u =    discrCutEfficScan->histo_u   ();
00059     effVersusDiscr_s =    discrCutEfficScan->histo_s   ();
00060     effVersusDiscr_c =    discrCutEfficScan->histo_c   ();
00061     effVersusDiscr_b =    discrCutEfficScan->histo_b   ();
00062   effVersusDiscr_g =    discrCutEfficScan->histo_g   ();
00063   effVersusDiscr_ni =   discrCutEfficScan->histo_ni  ();
00064   effVersusDiscr_dus =  discrCutEfficScan->histo_dus ();
00065   effVersusDiscr_dusg = discrCutEfficScan->histo_dusg();
00066   
00067   
00068 
00069   effVersusDiscr_d->SetXTitle ( "Discriminant" );
00070   effVersusDiscr_d->GetXaxis()->SetTitleOffset ( 0.75 );
00071   effVersusDiscr_u->SetXTitle ( "Discriminant" );
00072   effVersusDiscr_u->GetXaxis()->SetTitleOffset ( 0.75 );
00073   effVersusDiscr_s->SetXTitle ( "Discriminant" );
00074   effVersusDiscr_s->GetXaxis()->SetTitleOffset ( 0.75 );
00075   effVersusDiscr_c->SetXTitle ( "Discriminant" );
00076   effVersusDiscr_c->GetXaxis()->SetTitleOffset ( 0.75 );
00077   effVersusDiscr_b->SetXTitle ( "Discriminant" );
00078   effVersusDiscr_b->GetXaxis()->SetTitleOffset ( 0.75 );
00079   effVersusDiscr_g->SetXTitle ( "Discriminant" );
00080   effVersusDiscr_g->GetXaxis()->SetTitleOffset ( 0.75 );
00081   effVersusDiscr_ni->SetXTitle ( "Discriminant" );
00082   effVersusDiscr_ni->GetXaxis()->SetTitleOffset ( 0.75 );
00083   effVersusDiscr_dus->SetXTitle ( "Discriminant" );
00084   effVersusDiscr_dus->GetXaxis()->SetTitleOffset ( 0.75 );
00085   effVersusDiscr_dusg->SetXTitle ( "Discriminant" );
00086   effVersusDiscr_dusg->GetXaxis()->SetTitleOffset ( 0.75 );
00087   }else{
00088     effVersusDiscr_d =    0;
00089     effVersusDiscr_u =    0; 
00090     effVersusDiscr_s =     0;
00091     effVersusDiscr_c =    0; 
00092     effVersusDiscr_b =     0;
00093     effVersusDiscr_g =     0;
00094     effVersusDiscr_ni =    0;
00095     effVersusDiscr_dus =   0;
00096     effVersusDiscr_dusg =  0;
00097 }
00098 
00099   // discr. for computation
00100   vector<TH1F*> discrCfHistos = dDiscriminatorFC->getHistoVector();
00101 
00102   // discr no cut
00103   vector<TH1F*> discrNoCutHistos = discrNoCutEffic->getHistoVector();
00104 
00105   // discr no cut
00106   vector<TH1F*> discrCutHistos = discrCutEfficScan->getHistoVector();
00107 
00108   int dimHistos = discrCfHistos.size(); // they all have the same size
00109 
00110   // DISCR-CUT LOOP:
00111   // fill the histos for eff-pur computations by scanning the discriminatorFC histogram
00112 
00113   // better to loop over bins -> discrCut no longer needed
00114   int nBins = dDiscriminatorFC->nBins();
00115 
00116   // loop over flavours
00117   for ( int iFlav = 0; iFlav < dimHistos; iFlav++ ) {
00118     if (discrCfHistos[iFlav] == 0) continue;
00119     discrNoCutHistos[iFlav]->SetXTitle ( "Discriminant" );
00120     discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset ( 0.75 );
00121 
00122     // In Root histos, bin counting starts at 1 to nBins.
00123     // bin 0 is the underflow, and nBins+1 is the overflow.
00124     double nJetsFlav = discrCfHistos[iFlav]->GetEntries ();
00125     double sum = discrCfHistos[iFlav]->GetBinContent( nBins+1 ); //+1 to get the overflow.
00126     
00127     for ( int iDiscr = nBins; iDiscr > 0 ; --iDiscr ) {
00128       // fill all jets into NoCut histo
00129       discrNoCutHistos[iFlav]->SetBinContent ( iDiscr, nJetsFlav );
00130       discrNoCutHistos[iFlav]->SetBinError   ( iDiscr, sqrt(nJetsFlav) );
00131       sum += discrCfHistos[iFlav]->GetBinContent( iDiscr );
00132       discrCutHistos[iFlav]->SetBinContent ( iDiscr, sum );
00133       discrCutHistos[iFlav]->SetBinError   ( iDiscr, sqrt(sum) );
00134     }
00135   }
00136 
00137 
00138   // divide to get efficiency vs. discriminator cut from absolute numbers
00139   discrCutEfficScan->divide ( *discrNoCutEffic );  // does: histos including discriminator cut / flat histo
00140 }

EffPurFromHistos::~EffPurFromHistos (  ) 

Definition at line 143 of file EffPurFromHistos.cc.

00143                                      {
00144   /*  delete EffFlavVsBEff_d   ;
00145   delete EffFlavVsBEff_u   ;
00146   delete EffFlavVsBEff_s   ;
00147   delete EffFlavVsBEff_c   ;
00148   delete EffFlavVsBEff_b   ;
00149   delete EffFlavVsBEff_g   ;
00150   delete EffFlavVsBEff_ni  ;
00151   delete EffFlavVsBEff_dus ;
00152   delete EffFlavVsBEff_dusg;
00153   if ( fromDiscriminatorDistr) {
00154     delete discrNoCutEffic;
00155     delete discrCutEfficScan;
00156     }*/
00157 }

EffPurFromHistos::EffPurFromHistos ( const TString &  ext,
TH1F *  h_d,
TH1F *  h_u,
TH1F *  h_s,
TH1F *  h_c,
TH1F *  h_b,
TH1F *  h_g,
TH1F *  h_ni,
TH1F *  h_dus,
TH1F *  h_dusg,
int  nBin = 100,
double  startO = 0.005,
double  endO = 1.005 
)

Definition at line 14 of file EffPurFromHistos.cc.

References check(), and fromDiscriminatorDistr.

00016                                                                            :
00017         //BTagPlotPrintC(),
00018         histoExtension(ext), effVersusDiscr_d(h_d), effVersusDiscr_u(h_u),
00019         effVersusDiscr_s(h_s), effVersusDiscr_c(h_c), effVersusDiscr_b(h_b),
00020         effVersusDiscr_g(h_g), effVersusDiscr_ni(h_ni), effVersusDiscr_dus(h_dus),
00021         effVersusDiscr_dusg(h_dusg), nBinOutput(nBin), startOutput(startO),
00022         endOutput(endO)
00023 {
00024   fromDiscriminatorDistr = false;
00025   // consistency check
00026   check();
00027 }

EffPurFromHistos::EffPurFromHistos ( const FlavourHistograms< double > *  dDiscriminatorFC,
int  nBin = 100,
double  startO = 0.005,
double  endO = 1.005 
)

Definition at line 30 of file EffPurFromHistos.cc.

References FlavourHistograms< T >::baseNameDescription(), FlavourHistograms< T >::baseNameTitle(), discrCutEfficScan, discrNoCutEffic, FlavourHistograms< T >::divide(), effVersusDiscr_b, effVersusDiscr_c, effVersusDiscr_d, effVersusDiscr_dus, effVersusDiscr_dusg, effVersusDiscr_g, effVersusDiscr_ni, effVersusDiscr_s, effVersusDiscr_u, fromDiscriminatorDistr, FlavourHistograms< T >::getHistoVector(), 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(), FlavourHistograms< T >::histo_u(), histoExtension, FlavourHistograms< T >::lowerBound(), FlavourHistograms< T >::nBins(), FlavourHistograms< T >::SetMinimum(), funct::sqrt(), sum(), and FlavourHistograms< T >::upperBound().

00031                                     :
00032         nBinOutput(nBin), startOutput(startO), endOutput(endO)
00033 {
00034   histoExtension = "_"+dDiscriminatorFC->baseNameTitle();
00035 
00036   fromDiscriminatorDistr = true;
00037   discrNoCutEffic = new FlavourHistograms<double> (
00038         "totalEntries" + histoExtension, "Total Entries: " + dDiscriminatorFC->baseNameDescription(),
00039         dDiscriminatorFC->nBins(), dDiscriminatorFC->lowerBound(),
00040         dDiscriminatorFC->upperBound(), true, true, false, "b" );
00041 
00042   // conditional discriminator cut for efficiency histos
00043 
00044   discrCutEfficScan = new FlavourHistograms<double> (
00045         "effVsDiscrCut" + histoExtension, "Eff. vs Disc. Cut: " + dDiscriminatorFC->baseNameDescription(),
00046         dDiscriminatorFC->nBins(), dDiscriminatorFC->lowerBound(),
00047         dDiscriminatorFC->upperBound(), true, true, false, "b" );
00048   discrCutEfficScan->SetMinimum(1E-4);
00049 
00050   effVersusDiscr_d =    discrCutEfficScan->histo_d   ();
00051   effVersusDiscr_u =    discrCutEfficScan->histo_u   ();
00052   effVersusDiscr_s =    discrCutEfficScan->histo_s   ();
00053   effVersusDiscr_c =    discrCutEfficScan->histo_c   ();
00054   effVersusDiscr_b =    discrCutEfficScan->histo_b   ();
00055   effVersusDiscr_g =    discrCutEfficScan->histo_g   ();
00056   effVersusDiscr_ni =   discrCutEfficScan->histo_ni  ();
00057   effVersusDiscr_dus =  discrCutEfficScan->histo_dus ();
00058   effVersusDiscr_dusg = discrCutEfficScan->histo_dusg();
00059 
00060   effVersusDiscr_d->SetXTitle ( "Discriminant" );
00061   effVersusDiscr_d->GetXaxis()->SetTitleOffset ( 0.75 );
00062   effVersusDiscr_u->SetXTitle ( "Discriminant" );
00063   effVersusDiscr_u->GetXaxis()->SetTitleOffset ( 0.75 );
00064   effVersusDiscr_s->SetXTitle ( "Discriminant" );
00065   effVersusDiscr_s->GetXaxis()->SetTitleOffset ( 0.75 );
00066   effVersusDiscr_c->SetXTitle ( "Discriminant" );
00067   effVersusDiscr_c->GetXaxis()->SetTitleOffset ( 0.75 );
00068   effVersusDiscr_b->SetXTitle ( "Discriminant" );
00069   effVersusDiscr_b->GetXaxis()->SetTitleOffset ( 0.75 );
00070   effVersusDiscr_g->SetXTitle ( "Discriminant" );
00071   effVersusDiscr_g->GetXaxis()->SetTitleOffset ( 0.75 );
00072   effVersusDiscr_ni->SetXTitle ( "Discriminant" );
00073   effVersusDiscr_ni->GetXaxis()->SetTitleOffset ( 0.75 );
00074   effVersusDiscr_dus->SetXTitle ( "Discriminant" );
00075   effVersusDiscr_dus->GetXaxis()->SetTitleOffset ( 0.75 );
00076   effVersusDiscr_dusg->SetXTitle ( "Discriminant" );
00077   effVersusDiscr_dusg->GetXaxis()->SetTitleOffset ( 0.75 );
00078 
00079   // discr. for computation
00080   vector<TH1F*> discrCfHistos = dDiscriminatorFC->getHistoVector();
00081 
00082   // discr no cut
00083   vector<TH1F*> discrNoCutHistos = discrNoCutEffic->getHistoVector();
00084 
00085   // discr no cut
00086   vector<TH1F*> discrCutHistos = discrCutEfficScan->getHistoVector();
00087 
00088   int dimHistos = discrCfHistos.size(); // they all have the same size
00089 
00090   // DISCR-CUT LOOP:
00091   // fill the histos for eff-pur computations by scanning the discriminatorFC histogram
00092 
00093   // better to loop over bins -> discrCut no longer needed
00094   int nBins = dDiscriminatorFC->nBins();
00095 
00096   // loop over flavours
00097   for ( int iFlav = 0; iFlav < dimHistos; iFlav++ ) {
00098     if (discrCfHistos[iFlav] == 0) continue;
00099     discrNoCutHistos[iFlav]->SetXTitle ( "Discriminant" );
00100     discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset ( 0.75 );
00101 
00102     // In Root histos, bin counting starts at 1 to nBins.
00103     // bin 0 is the underflow, and nBins+1 is the overflow.
00104     double nJetsFlav = discrCfHistos[iFlav]->GetEntries ();
00105     double sum = discrCfHistos[iFlav]->GetBinContent( nBins+1 ); //+1 to get the overflow.
00106     
00107     for ( int iDiscr = nBins; iDiscr > 0 ; --iDiscr ) {
00108       // fill all jets into NoCut histo
00109       discrNoCutHistos[iFlav]->SetBinContent ( iDiscr, nJetsFlav );
00110       discrNoCutHistos[iFlav]->SetBinError   ( iDiscr, sqrt(nJetsFlav) );
00111       sum += discrCfHistos[iFlav]->GetBinContent( iDiscr );
00112       discrCutHistos[iFlav]->SetBinContent ( iDiscr, sum );
00113       discrCutHistos[iFlav]->SetBinError   ( iDiscr, sqrt(sum) );
00114     }
00115   }
00116 
00117 
00118   // divide to get efficiency vs. discriminator cut from absolute numbers
00119   discrCutEfficScan->divide ( *discrNoCutEffic );  // does: histos including discriminator cut / flat histo
00120 }

EffPurFromHistos::~EffPurFromHistos (  ) 


Member Function Documentation

void EffPurFromHistos::check (  )  [private]

void EffPurFromHistos::check (  )  [private]

Definition at line 314 of file EffPurFromHistos.cc.

References effVersusDiscr_b, effVersusDiscr_c, effVersusDiscr_d, effVersusDiscr_dus, effVersusDiscr_dusg, effVersusDiscr_g, effVersusDiscr_ni, effVersusDiscr_s, effVersusDiscr_u, and Exception.

Referenced by EffPurFromHistos().

00314                               {
00315   // number of bins
00316   int nBins_d    = effVersusDiscr_d    -> GetNbinsX();
00317   int nBins_u    = effVersusDiscr_u    -> GetNbinsX();
00318   int nBins_s    = effVersusDiscr_s    -> GetNbinsX();
00319   int nBins_c    = effVersusDiscr_c    -> GetNbinsX();
00320   int nBins_b    = effVersusDiscr_b    -> GetNbinsX();
00321   int nBins_g    = effVersusDiscr_g    -> GetNbinsX();
00322   int nBins_ni   = effVersusDiscr_ni   -> GetNbinsX();
00323   int nBins_dus  = effVersusDiscr_dus  -> GetNbinsX();
00324   int nBins_dusg = effVersusDiscr_dusg -> GetNbinsX();
00325 
00326   bool lNBins =
00327     ( nBins_d == nBins_u    &&
00328       nBins_d == nBins_s    &&
00329       nBins_d == nBins_c    &&
00330       nBins_d == nBins_b    &&
00331       nBins_d == nBins_g    &&
00332       nBins_d == nBins_ni   &&
00333       nBins_d == nBins_dus  &&
00334       nBins_d == nBins_dusg     );
00335 
00336   if ( !lNBins ) {
00337     throw cms::Exception("Configuration")
00338       << "Input histograms do not all have the same number of bins!\n";
00339   }
00340 
00341 
00342   // start
00343   float sBin_d    = effVersusDiscr_d    -> GetBinCenter(1);
00344   float sBin_u    = effVersusDiscr_u    -> GetBinCenter(1);
00345   float sBin_s    = effVersusDiscr_s    -> GetBinCenter(1);
00346   float sBin_c    = effVersusDiscr_c    -> GetBinCenter(1);
00347   float sBin_b    = effVersusDiscr_b    -> GetBinCenter(1);
00348   float sBin_g    = effVersusDiscr_g    -> GetBinCenter(1);
00349   float sBin_ni   = effVersusDiscr_ni   -> GetBinCenter(1);
00350   float sBin_dus  = effVersusDiscr_dus  -> GetBinCenter(1);
00351   float sBin_dusg = effVersusDiscr_dusg -> GetBinCenter(1);
00352 
00353   bool lSBin =
00354     ( sBin_d == sBin_u    &&
00355       sBin_d == sBin_s    &&
00356       sBin_d == sBin_c    &&
00357       sBin_d == sBin_b    &&
00358       sBin_d == sBin_g    &&
00359       sBin_d == sBin_ni   &&
00360       sBin_d == sBin_dus  &&
00361       sBin_d == sBin_dusg     );
00362 
00363   if ( !lSBin ) {
00364     throw cms::Exception("Configuration")
00365       << "EffPurFromHistos::check() : Input histograms do not all have the same start bin!\n";
00366   }
00367 
00368 
00369   // end
00370   float eBin_d    = effVersusDiscr_d    -> GetBinCenter( nBins_d - 1 );
00371   float eBin_u    = effVersusDiscr_u    -> GetBinCenter( nBins_d - 1 );
00372   float eBin_s    = effVersusDiscr_s    -> GetBinCenter( nBins_d - 1 );
00373   float eBin_c    = effVersusDiscr_c    -> GetBinCenter( nBins_d - 1 );
00374   float eBin_b    = effVersusDiscr_b    -> GetBinCenter( nBins_d - 1 );
00375   float eBin_g    = effVersusDiscr_g    -> GetBinCenter( nBins_d - 1 );
00376   float eBin_ni   = effVersusDiscr_ni   -> GetBinCenter( nBins_d - 1 );
00377   float eBin_dus  = effVersusDiscr_dus  -> GetBinCenter( nBins_d - 1 );
00378   float eBin_dusg = effVersusDiscr_dusg -> GetBinCenter( nBins_d - 1 );
00379 
00380   bool lEBin =
00381     ( eBin_d == eBin_u    &&
00382       eBin_d == eBin_s    &&
00383       eBin_d == eBin_c    &&
00384       eBin_d == eBin_b    &&
00385       eBin_d == eBin_g    &&
00386       eBin_d == eBin_ni   &&
00387       eBin_d == eBin_dus  &&
00388       eBin_d == eBin_dusg     );
00389 
00390   if ( !lEBin ) {
00391     throw cms::Exception("Configuration")
00392       << "EffPurFromHistos::check() : Input histograms do not all have the same end bin!\n";
00393   }
00394 }

void EffPurFromHistos::compute (  ) 

void EffPurFromHistos::compute (  ) 

Definition at line 397 of file EffPurFromHistos.cc.

References HistoProviderDQM::book1D(), EffFlavVsBEff_b, EffFlavVsBEff_c, EffFlavVsBEff_d, EffFlavVsBEff_dus, EffFlavVsBEff_dusg, EffFlavVsBEff_g, EffFlavVsBEff_ni, EffFlavVsBEff_s, EffFlavVsBEff_u, effVersusDiscr_b, effVersusDiscr_c, effVersusDiscr_d, effVersusDiscr_dus, effVersusDiscr_dusg, effVersusDiscr_g, effVersusDiscr_ni, effVersusDiscr_s, effVersusDiscr_u, endOutput, RecoBTag::findBinClosestYValue(), MonitorElement::getTH1F(), histoExtension, label_, mcPlots_, nBinOutput, and startOutput.

Referenced by JetTagPlotter::finalize().

00398 {
00399   if (mcPlots_ == false) {
00400 
00401     EffFlavVsBEff_d = 0;
00402        EffFlavVsBEff_u = 0; 
00403        EffFlavVsBEff_s = 0; 
00404        EffFlavVsBEff_c = 0; 
00405        EffFlavVsBEff_b = 0; 
00406        EffFlavVsBEff_g = 0; 
00407        EffFlavVsBEff_ni = 0; 
00408        EffFlavVsBEff_dus = 0; 
00409        EffFlavVsBEff_dusg = 0; 
00410     
00411     return; 
00412  
00413   }
00414  
00415 
00416   // to have shorter names ......
00417   TString & hE = histoExtension;
00418   TString hB = "FlavEffVsBEff_";
00419 
00420 
00421   // create histograms from base name and extension as given from user
00422   // BINNING MUST BE IDENTICAL FOR ALL OF THEM!!
00423   HistoProviderDQM prov("Btag",label_);
00424   EffFlavVsBEff_d    = (prov.book1D ( hB + "D"    + hE , hB + "D"    + hE , nBinOutput , startOutput , endOutput ));
00425   EffFlavVsBEff_u    = (prov.book1D ( hB + "U"    + hE , hB + "U"    + hE , nBinOutput , startOutput , endOutput )) ;
00426   EffFlavVsBEff_s    = (prov.book1D ( hB + "S"    + hE , hB + "S"    + hE , nBinOutput , startOutput , endOutput )) ;
00427   EffFlavVsBEff_c    = (prov.book1D ( hB + "C"    + hE , hB + "C"    + hE , nBinOutput , startOutput , endOutput )) ;
00428   EffFlavVsBEff_b    = (prov.book1D ( hB + "B"    + hE , hB + "B"    + hE , nBinOutput , startOutput , endOutput )) ;
00429   EffFlavVsBEff_g    = (prov.book1D ( hB + "G"    + hE , hB + "G"    + hE , nBinOutput , startOutput , endOutput )) ;
00430   EffFlavVsBEff_ni   = (prov.book1D ( hB + "NI"   + hE , hB + "NI"   + hE , nBinOutput , startOutput , endOutput )) ;
00431   EffFlavVsBEff_dus  = (prov.book1D ( hB + "DUS"  + hE , hB + "DUS"  + hE , nBinOutput , startOutput , endOutput )) ;
00432   EffFlavVsBEff_dusg = (prov.book1D ( hB + "DUSG" + hE , hB + "DUSG" + hE , nBinOutput , startOutput , endOutput )) ;
00433 
00434   EffFlavVsBEff_d->getTH1F()->SetXTitle ( "b-jet efficiency" );
00435   EffFlavVsBEff_d->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00436   EffFlavVsBEff_d->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00437   EffFlavVsBEff_d->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00438   EffFlavVsBEff_u->getTH1F()->SetXTitle ( "b-jet efficiency" );
00439   EffFlavVsBEff_u->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00440   EffFlavVsBEff_u->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00441   EffFlavVsBEff_u->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00442   EffFlavVsBEff_s->getTH1F()->SetXTitle ( "b-jet efficiency" );
00443   EffFlavVsBEff_s->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00444   EffFlavVsBEff_s->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00445   EffFlavVsBEff_s->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00446   EffFlavVsBEff_c->getTH1F()->SetXTitle ( "b-jet efficiency" );
00447   EffFlavVsBEff_c->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00448   EffFlavVsBEff_s->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00449   EffFlavVsBEff_s->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00450   EffFlavVsBEff_b->getTH1F()->SetXTitle ( "b-jet efficiency" );
00451   EffFlavVsBEff_b->getTH1F()->SetYTitle ( "b-jet efficiency" );
00452   EffFlavVsBEff_b->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00453   EffFlavVsBEff_b->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00454   EffFlavVsBEff_g->getTH1F()->SetXTitle ( "b-jet efficiency" );
00455   EffFlavVsBEff_g->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00456   EffFlavVsBEff_g->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00457   EffFlavVsBEff_g->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00458   EffFlavVsBEff_ni->getTH1F()->SetXTitle ( "b-jet efficiency" );
00459   EffFlavVsBEff_ni->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00460   EffFlavVsBEff_ni->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00461   EffFlavVsBEff_ni->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00462   EffFlavVsBEff_dus->getTH1F()->SetXTitle ( "b-jet efficiency" );
00463   EffFlavVsBEff_dus->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00464   EffFlavVsBEff_dus->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00465   EffFlavVsBEff_dus->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00466   EffFlavVsBEff_dusg->getTH1F()->SetXTitle ( "b-jet efficiency" );
00467   EffFlavVsBEff_dusg->getTH1F()->SetYTitle ( "non b-jet efficiency" );
00468   EffFlavVsBEff_dusg->getTH1F()->GetXaxis()->SetTitleOffset ( 0.75 );
00469   EffFlavVsBEff_dusg->getTH1F()->GetYaxis()->SetTitleOffset ( 0.75 );
00470 
00471 
00472   // loop over eff. vs. discriminator cut b-histo and look in which bin the closest entry is;
00473   // use fact that eff decreases monotonously
00474 
00475   // any of the histos to be created can be taken here:
00476   MonitorElement * EffFlavVsBEff = EffFlavVsBEff_b;
00477 
00478   int nBinB = EffFlavVsBEff->getTH1F()->GetNbinsX();
00479 
00480   for ( int iBinB = 1; iBinB <= nBinB; iBinB++ ) {  // loop over the bins on the x-axis of the histograms to be filled
00481 
00482     float effBBinWidth = EffFlavVsBEff->getTH1F()->GetBinWidth  ( iBinB );
00483     float effBMid      = EffFlavVsBEff->getTH1F()->GetBinCenter ( iBinB ); // middle of b-efficiency bin
00484     float effBLeft     = effBMid - 0.5*effBBinWidth;              // left edge of bin
00485     float effBRight    = effBMid + 0.5*effBBinWidth;              // right edge of bin
00486     // find the corresponding bin in the efficiency versus discriminator cut histo: closest one in efficiency
00487     int   binClosest = findBinClosestYValue ( effVersusDiscr_b , effBMid , effBLeft , effBRight );
00488     bool  binFound   = ( binClosest > 0 ) ;
00489     //
00490     if ( binFound ) {
00491       // fill the histos
00492       EffFlavVsBEff_d    -> Fill ( effBMid , effVersusDiscr_d   ->GetBinContent ( binClosest ) );
00493       EffFlavVsBEff_u    -> Fill ( effBMid , effVersusDiscr_u   ->GetBinContent ( binClosest ) );
00494       EffFlavVsBEff_s    -> Fill ( effBMid , effVersusDiscr_s   ->GetBinContent ( binClosest ) );
00495       EffFlavVsBEff_c    -> Fill ( effBMid , effVersusDiscr_c   ->GetBinContent ( binClosest ) );
00496       EffFlavVsBEff_b    -> Fill ( effBMid , effVersusDiscr_b   ->GetBinContent ( binClosest ) );
00497       EffFlavVsBEff_g    -> Fill ( effBMid , effVersusDiscr_g   ->GetBinContent ( binClosest ) );
00498       EffFlavVsBEff_ni   -> Fill ( effBMid , effVersusDiscr_ni  ->GetBinContent ( binClosest ) );
00499       EffFlavVsBEff_dus  -> Fill ( effBMid , effVersusDiscr_dus ->GetBinContent ( binClosest ) );
00500       EffFlavVsBEff_dusg -> Fill ( effBMid , effVersusDiscr_dusg->GetBinContent ( binClosest ) );
00501 
00502       EffFlavVsBEff_d  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_d   ->GetBinError ( binClosest ) );
00503       EffFlavVsBEff_u  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_u   ->GetBinError ( binClosest ) );
00504       EffFlavVsBEff_s  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_s   ->GetBinError ( binClosest ) );
00505       EffFlavVsBEff_c  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_c   ->GetBinError ( binClosest ) );
00506       EffFlavVsBEff_b  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_b   ->GetBinError ( binClosest ) );
00507       EffFlavVsBEff_g  ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_g   ->GetBinError ( binClosest ) );
00508       EffFlavVsBEff_ni ->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_ni  ->GetBinError ( binClosest ) );
00509       EffFlavVsBEff_dus->getTH1F()  -> SetBinError ( iBinB , effVersusDiscr_dus ->GetBinError ( binClosest ) );
00510       EffFlavVsBEff_dusg->getTH1F() -> SetBinError ( iBinB , effVersusDiscr_dusg->GetBinError ( binClosest ) );
00511     }
00512     else {
00513       //CW      cout << "Did not find right bin for b-efficiency : " << effBMid << endl;
00514     }
00515     
00516   }
00517   
00518 }

FlavourHistograms<double>* EffPurFromHistos::discriminatorCutEfficScan (  )  const [inline]

Definition at line 54 of file EffPurFromHistos.h.

References discrCutEfficScan.

00054 {return discrCutEfficScan;}

FlavourHistograms<double>* EffPurFromHistos::discriminatorCutEfficScan (  )  const [inline]

Definition at line 59 of file EffPurFromHistos.h.

References discrCutEfficScan.

Referenced by JetTagPlotter::psPlot(), TrackCountingTagPlotter::psPlot(), TrackProbabilityTagPlotter::psPlot(), and TrackIPTagPlotter::psPlot().

00059 {return discrCutEfficScan;}

FlavourHistograms<double>* EffPurFromHistos::discriminatorNoCutEffic (  )  const [inline]

Definition at line 53 of file EffPurFromHistos.h.

References discrNoCutEffic.

00053 {return discrNoCutEffic;}

FlavourHistograms<double>* EffPurFromHistos::discriminatorNoCutEffic (  )  const [inline]

Definition at line 58 of file EffPurFromHistos.h.

References discrNoCutEffic.

Referenced by JetTagPlotter::psPlot(), TrackCountingTagPlotter::psPlot(), TrackProbabilityTagPlotter::psPlot(), and TrackIPTagPlotter::psPlot().

00058 {return discrNoCutEffic;}

void EffPurFromHistos::epsPlot ( const TString &  name  ) 

void EffPurFromHistos::epsPlot ( const TString &  name  ) 

Definition at line 162 of file EffPurFromHistos.cc.

References discrCutEfficScan, discrNoCutEffic, FlavourHistograms< T >::epsPlot(), fromDiscriminatorDistr, and plot().

Referenced by JetTagPlotter::epsPlot().

00163 {
00164   if ( fromDiscriminatorDistr) {
00165     discrNoCutEffic->epsPlot(name);
00166     discrCutEfficScan->epsPlot(name);
00167   }
00168   plot(name, ".eps");
00169 }

TH1F* EffPurFromHistos::getEffFlavVsBEff_b (  )  [inline]

Definition at line 35 of file EffPurFromHistos.h.

References EffFlavVsBEff_b.

00035 { return EffFlavVsBEff_b    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_b (  )  [inline]

Definition at line 40 of file EffPurFromHistos.h.

References EffFlavVsBEff_b, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00040 { return EffFlavVsBEff_b ->getTH1F()   ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_c (  )  [inline]

Definition at line 34 of file EffPurFromHistos.h.

References EffFlavVsBEff_c.

00034 { return EffFlavVsBEff_c    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_c (  )  [inline]

Definition at line 39 of file EffPurFromHistos.h.

References EffFlavVsBEff_c, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00039 { return EffFlavVsBEff_c ->getTH1F()   ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_d (  )  [inline]

Definition at line 31 of file EffPurFromHistos.h.

References EffFlavVsBEff_d.

00031 { return EffFlavVsBEff_d    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_d (  )  [inline]

Definition at line 35 of file EffPurFromHistos.h.

References EffFlavVsBEff_d, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00035                                   { 
00036     return EffFlavVsBEff_d->getTH1F()    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_dus (  )  [inline]

Definition at line 38 of file EffPurFromHistos.h.

References EffFlavVsBEff_dus.

00038 { return EffFlavVsBEff_dus  ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_dus (  )  [inline]

Definition at line 43 of file EffPurFromHistos.h.

References EffFlavVsBEff_dus, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00043 { return EffFlavVsBEff_dus ->getTH1F() ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_dusg (  )  [inline]

Definition at line 39 of file EffPurFromHistos.h.

References EffFlavVsBEff_dusg.

00039 { return EffFlavVsBEff_dusg ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_dusg (  )  [inline]

Definition at line 44 of file EffPurFromHistos.h.

References EffFlavVsBEff_dusg, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00044 { return EffFlavVsBEff_dusg ->getTH1F(); };

TH1F* EffPurFromHistos::getEffFlavVsBEff_g (  )  [inline]

Definition at line 36 of file EffPurFromHistos.h.

References EffFlavVsBEff_g.

00036 { return EffFlavVsBEff_g    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_g (  )  [inline]

Definition at line 41 of file EffPurFromHistos.h.

References EffFlavVsBEff_g, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00041 { return EffFlavVsBEff_g ->getTH1F()   ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_ni (  )  [inline]

Definition at line 37 of file EffPurFromHistos.h.

References EffFlavVsBEff_ni.

00037 { return EffFlavVsBEff_ni   ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_ni (  )  [inline]

Definition at line 42 of file EffPurFromHistos.h.

References EffFlavVsBEff_ni, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00042 { return EffFlavVsBEff_ni ->getTH1F()  ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_s (  )  [inline]

Definition at line 33 of file EffPurFromHistos.h.

References EffFlavVsBEff_s.

00033 { return EffFlavVsBEff_s    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_s (  )  [inline]

Definition at line 38 of file EffPurFromHistos.h.

References EffFlavVsBEff_s, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00038 { return EffFlavVsBEff_s ->getTH1F()   ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_u (  )  [inline]

Definition at line 32 of file EffPurFromHistos.h.

References EffFlavVsBEff_u.

00032 { return EffFlavVsBEff_u    ; };

TH1F* EffPurFromHistos::getEffFlavVsBEff_u (  )  [inline]

Definition at line 37 of file EffPurFromHistos.h.

References EffFlavVsBEff_u, and MonitorElement::getTH1F().

Referenced by BTagDifferentialPlot::fillHisto().

00037 { return EffFlavVsBEff_u->getTH1F()    ; };

void EffPurFromHistos::plot ( const TString &  name,
const TString &  ext 
)

void EffPurFromHistos::plot ( TPad *  theCanvas = 0  ) 

void EffPurFromHistos::plot ( const TString &  name,
const TString &  ext 
)

Definition at line 176 of file EffPurFromHistos.cc.

References histoExtension, plot(), and tc.

00177 {
00178    TCanvas tc ("FlavEffVsBEff" +histoExtension ,
00179         "Flavour misidentification vs. b-tagging efficiency " + histoExtension);
00180    plot(&tc);
00181    tc.Print(TString(name + "FlavEffVsBEff" + histoExtension + ext));
00182 }

void EffPurFromHistos::plot ( TPad *  theCanvas = 0  ) 

Definition at line 184 of file EffPurFromHistos.cc.

References e, EffFlavVsBEff_b, EffFlavVsBEff_c, EffFlavVsBEff_d, EffFlavVsBEff_dus, EffFlavVsBEff_dusg, EffFlavVsBEff_g, EffFlavVsBEff_ni, EffFlavVsBEff_s, EffFlavVsBEff_u, MonitorElement::getTH1F(), and RecoBTag::setTDRStyle().

Referenced by epsPlot(), plot(), JetTagPlotter::psPlot(), TrackCountingTagPlotter::psPlot(), TrackProbabilityTagPlotter::psPlot(), TrackIPTagPlotter::psPlot(), and psPlot().

00184                                                         {
00185 
00186 //fixme:
00187   bool btppNI = false;
00188   bool btppColour = true;
00189 
00190 //   if ( !btppTitle ) gStyle->SetOptTitle ( 0 );
00191   setTDRStyle()->cd();
00192 
00193   if (plotCanvas)
00194     plotCanvas->cd();
00195   
00196   gPad->UseCurrentStyle();
00197   gPad->SetFillColor ( 0 );
00198   gPad->SetLogy  ( 1 );
00199   gPad->SetGridx ( 1 );
00200   gPad->SetGridy ( 1 );
00201 
00202   int col_c  ;
00203   int col_g  ;
00204   int col_dus;
00205   int col_ni ;
00206 
00207   int mStyle_c  ;
00208   int mStyle_g  ;
00209   int mStyle_dus;
00210   int mStyle_ni ;
00211 
00212   // marker size (same for all)
00213   float mSize = gPad->GetWh() * gPad->GetHNDC() / 500.; //1.2;
00214 
00215   if ( btppColour ) {
00216     col_c    = 6;
00217     col_g    = 3; // g in green
00218     col_dus  = 4; // uds in blue
00219     col_ni   = 5; // ni in ??
00220     mStyle_c   = 20;
00221     mStyle_g   = 20;
00222     mStyle_dus = 20;
00223     mStyle_ni  = 20;
00224   }
00225   else {
00226     col_c    = 1;
00227     col_g    = 1;
00228     col_dus  = 1;
00229     col_ni   = 1;
00230     mStyle_c   = 22;
00231     mStyle_g   = 29;
00232     mStyle_dus = 20;
00233     mStyle_ni  = 27;
00234   }
00235 
00236 
00237   // for the moment: plot c,dus,g
00238   EffFlavVsBEff_dus ->getTH1F()->GetXaxis()->SetTitle ( "b-jet efficiency" );
00239   EffFlavVsBEff_dus ->getTH1F()->GetYaxis()->SetTitle ( "non b-jet efficiency" );
00240   EffFlavVsBEff_dus ->getTH1F()->GetYaxis()->SetTitleOffset ( 0.25 );
00241   EffFlavVsBEff_dus ->getTH1F()->SetMaximum     ( 1.1 );
00242   EffFlavVsBEff_dus ->getTH1F()->SetMinimum     ( 1.e-5 );
00243   EffFlavVsBEff_dus ->getTH1F()->SetMarkerColor ( col_dus );
00244   EffFlavVsBEff_dus ->getTH1F()->SetLineColor   ( col_dus );
00245   EffFlavVsBEff_dus ->getTH1F()->SetMarkerSize  ( mSize );
00246   EffFlavVsBEff_dus ->getTH1F()->SetMarkerStyle ( mStyle_dus );
00247   EffFlavVsBEff_dus ->getTH1F()->SetStats     ( false );
00248   EffFlavVsBEff_dus ->getTH1F()->Draw("pe");
00249 
00250   EffFlavVsBEff_g   ->getTH1F()->SetMarkerColor ( col_g );
00251   EffFlavVsBEff_g   ->getTH1F()->SetLineColor   ( col_g );
00252   EffFlavVsBEff_g   ->getTH1F()->SetMarkerSize  ( mSize );
00253   EffFlavVsBEff_g   ->getTH1F()->SetMarkerStyle ( mStyle_g );
00254   EffFlavVsBEff_g   ->getTH1F()->SetStats     ( false );
00255   EffFlavVsBEff_g   ->getTH1F()->Draw("peSame");
00256 
00257   EffFlavVsBEff_c   ->getTH1F()->SetMarkerColor ( col_c );
00258   EffFlavVsBEff_c   ->getTH1F()->SetLineColor   ( col_c );
00259   EffFlavVsBEff_c   ->getTH1F()->SetMarkerSize  ( mSize );
00260   EffFlavVsBEff_c   ->getTH1F()->SetMarkerStyle ( mStyle_c );
00261   EffFlavVsBEff_c   ->getTH1F()->SetStats     ( false );
00262   EffFlavVsBEff_c   ->getTH1F()->Draw("peSame");
00263 
00264   EffFlavVsBEff_d ->getTH1F()-> SetMinimum(0.01);
00265   EffFlavVsBEff_u ->getTH1F()-> SetMinimum(0.01);
00266   EffFlavVsBEff_s ->getTH1F()-> SetMinimum(0.01);
00267   EffFlavVsBEff_c ->getTH1F()-> SetMinimum(0.01);
00268   EffFlavVsBEff_b ->getTH1F()-> SetMinimum(0.01);
00269   EffFlavVsBEff_g ->getTH1F()-> SetMinimum(0.01);
00270   EffFlavVsBEff_ni ->getTH1F()-> SetMinimum(0.01);
00271   EffFlavVsBEff_dus ->getTH1F()-> SetMinimum(0.01);
00272   EffFlavVsBEff_dusg ->getTH1F()-> SetMinimum(0.01);
00273 
00274   // plot separately u,d and s
00275 //  EffFlavVsBEff_d ->GetXaxis()->SetTitle ( "b-jet efficiency" );
00276 //  EffFlavVsBEff_d ->GetYaxis()->SetTitle ( "non b-jet efficiency" );
00277 //  EffFlavVsBEff_d ->GetYaxis()->SetTitleOffset ( 1.25 );
00278 //  EffFlavVsBEff_d ->SetMaximum     ( 1.1 );
00279 //  EffFlavVsBEff_d ->SetMinimum     ( 1.e-5 );
00280 //  EffFlavVsBEff_d ->SetMarkerColor ( col_dus );
00281 //  EffFlavVsBEff_d ->SetLineColor   ( col_dus );
00282 //  EffFlavVsBEff_d ->SetMarkerSize  ( mSize );
00283 //  EffFlavVsBEff_d ->SetMarkerStyle ( mStyle_dus );
00284 //  EffFlavVsBEff_d ->SetStats     ( false );
00285 //  EffFlavVsBEff_d ->Draw("pe");
00286 //
00287 //  EffFlavVsBEff_u   ->SetMarkerColor ( col_g );
00288 //  EffFlavVsBEff_u   ->SetLineColor   ( col_g );
00289 //  EffFlavVsBEff_u   ->SetMarkerSize  ( mSize );
00290 //  EffFlavVsBEff_u   ->SetMarkerStyle ( mStyle_g );
00291 //  EffFlavVsBEff_u   ->SetStats     ( false );
00292 //  EffFlavVsBEff_u   ->Draw("peSame");
00293 //
00294 //  EffFlavVsBEff_s   ->SetMarkerColor ( col_c );
00295 //  EffFlavVsBEff_s   ->SetLineColor   ( col_c );
00296 //  EffFlavVsBEff_s   ->SetMarkerSize  ( mSize );
00297 //  EffFlavVsBEff_s   ->SetMarkerStyle ( mStyle_c );
00298 //  EffFlavVsBEff_s   ->SetStats     ( false );
00299 //  EffFlavVsBEff_s   ->Draw("peSame");
00300 
00301   // only if asked: NI
00302   if ( btppNI ) {
00303     EffFlavVsBEff_ni   ->getTH1F()->SetMarkerColor ( col_ni );
00304     EffFlavVsBEff_ni   ->getTH1F()->SetLineColor   ( col_ni );
00305     EffFlavVsBEff_ni   ->getTH1F()->SetMarkerSize  ( mSize );
00306     EffFlavVsBEff_ni   ->getTH1F()->SetMarkerStyle ( mStyle_ni );
00307     EffFlavVsBEff_ni   ->getTH1F()->SetStats     ( false );
00308     EffFlavVsBEff_ni   ->getTH1F()->Draw("peSame");
00309   }
00310 
00311 }

void EffPurFromHistos::psPlot ( const TString &  name  ) 

void EffPurFromHistos::psPlot ( const TString &  name  ) 

Definition at line 171 of file EffPurFromHistos.cc.

References plot().

00172 {
00173   plot(name, ".ps");
00174 }

void EffPurFromHistos::write ( const bool  allHisto  ) 

Definition at line 140 of file EffPurFromHistos.cc.

References discrCutEfficScan, discrNoCutEffic, EffFlavVsBEff_b, EffFlavVsBEff_c, EffFlavVsBEff_d, EffFlavVsBEff_dus, EffFlavVsBEff_dusg, EffFlavVsBEff_g, EffFlavVsBEff_ni, EffFlavVsBEff_s, EffFlavVsBEff_u, fromDiscriminatorDistr, and FlavourHistograms< T >::write().

Referenced by JetTagPlotter::write().

00140                                                  {
00141   if (allHisto) EffFlavVsBEff_d->Write();
00142   if (allHisto) EffFlavVsBEff_u->Write();
00143   if (allHisto) EffFlavVsBEff_s->Write();
00144   EffFlavVsBEff_c->Write();
00145   if (allHisto) EffFlavVsBEff_b->Write();
00146   EffFlavVsBEff_g->Write();
00147   if (allHisto) EffFlavVsBEff_ni->Write();
00148   EffFlavVsBEff_dus->Write();
00149   if (allHisto) EffFlavVsBEff_dusg->Write();
00150   if ( fromDiscriminatorDistr) {
00151     if (allHisto) discrNoCutEffic->write(allHisto);
00152     discrCutEfficScan->write(allHisto);
00153   }
00154 }


Member Data Documentation

FlavourHistograms<double> * EffPurFromHistos::discrCutEfficScan [private]

Definition at line 66 of file EffPurFromHistos.h.

FlavourHistograms<double> * EffPurFromHistos::discrCutEfficScan [private]

Definition at line 72 of file EffPurFromHistos.h.

Referenced by discriminatorCutEfficScan(), EffPurFromHistos(), epsPlot(), and write().

FlavourHistograms<double>* EffPurFromHistos::discrNoCutEffic [private]

Definition at line 66 of file EffPurFromHistos.h.

FlavourHistograms<double>* EffPurFromHistos::discrNoCutEffic [private]

Definition at line 72 of file EffPurFromHistos.h.

Referenced by discriminatorNoCutEffic(), EffPurFromHistos(), epsPlot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_b [private]

Definition at line 94 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_b [private]

Definition at line 103 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_b(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_c [private]

Definition at line 93 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_c [private]

Definition at line 102 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_c(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_d [private]

Definition at line 90 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_d [private]

Definition at line 99 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_d(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_dus [private]

Definition at line 97 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_dus [private]

Definition at line 106 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_dus(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_dusg [private]

Definition at line 98 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_dusg [private]

Definition at line 107 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_dusg(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_g [private]

Definition at line 95 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_g [private]

Definition at line 104 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_g(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_ni [private]

Definition at line 96 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_ni [private]

Definition at line 105 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_ni(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_s [private]

Definition at line 92 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_s [private]

Definition at line 101 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_s(), plot(), and write().

TH1F* EffPurFromHistos::EffFlavVsBEff_u [private]

Definition at line 91 of file EffPurFromHistos.h.

MonitorElement* EffPurFromHistos::EffFlavVsBEff_u [private]

Definition at line 100 of file EffPurFromHistos.h.

Referenced by compute(), getEffFlavVsBEff_u(), plot(), and write().

TH1F* EffPurFromHistos::effVersusDiscr_b [private]

Definition at line 76 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_b [private]

Definition at line 82 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_c [private]

Definition at line 75 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_c [private]

Definition at line 81 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_d [private]

Definition at line 72 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_d [private]

Definition at line 78 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_dus [private]

Definition at line 79 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_dus [private]

Definition at line 85 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_dusg [private]

Definition at line 80 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_dusg [private]

Definition at line 86 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_g [private]

Definition at line 77 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_g [private]

Definition at line 83 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_ni [private]

Definition at line 78 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_ni [private]

Definition at line 84 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_s [private]

Definition at line 74 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_s [private]

Definition at line 80 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

TH1F* EffPurFromHistos::effVersusDiscr_u [private]

Definition at line 73 of file EffPurFromHistos.h.

TH1F* EffPurFromHistos::effVersusDiscr_u [private]

Definition at line 79 of file EffPurFromHistos.h.

Referenced by check(), compute(), and EffPurFromHistos().

double EffPurFromHistos::endOutput [private]

Definition at line 94 of file EffPurFromHistos.h.

Referenced by compute().

bool EffPurFromHistos::fromDiscriminatorDistr [private]

Definition at line 66 of file EffPurFromHistos.h.

Referenced by EffPurFromHistos(), epsPlot(), and write().

TString EffPurFromHistos::histoExtension [private]

Definition at line 70 of file EffPurFromHistos.h.

Referenced by compute(), EffPurFromHistos(), and plot().

std::string EffPurFromHistos::label_ [private]

Definition at line 110 of file EffPurFromHistos.h.

Referenced by compute().

bool EffPurFromHistos::mcPlots_ [private]

Definition at line 96 of file EffPurFromHistos.h.

Referenced by compute(), and EffPurFromHistos().

int EffPurFromHistos::nBinOutput [private]

Definition at line 92 of file EffPurFromHistos.h.

Referenced by compute().

double EffPurFromHistos::startOutput [private]

Definition at line 93 of file EffPurFromHistos.h.

Referenced by compute().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:09 2009 for CMSSW by  doxygen 1.5.4