CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
FlavourHistograms2D< T, G > Class Template Reference

#include <FlavourHistorgrams2D.h>

Public Member Functions

std::string baseNameDescription () const
 
std::string baseNameTitle () const
 
void divide (const FlavourHistograms2D< T, G > &bHD) const
 
void epsPlot (const std::string &name)
 
void fill (const int &flavour, const T &variableX, const G &variableY) const
 
void fill (const int &flavour, const T &variableX, const G &variableY, const float &w) const
 
void fill (const int &flavour, const T *variableX, const G *variableY) const
 
void fill (const int &flavour, const T *variableX, const G *variableY, const float &w) const
 
 FlavourHistograms2D (TString baseNameTitle_, TString baseNameDescription_, int nBinsX_, double lowerBoundX_, double upperBoundX_, int nBinsY_, double lowerBoundY_, double upperBoundY_, std::string folder, unsigned int mc, bool createProfile, DQMStore::IGetter &iget)
 
 FlavourHistograms2D (TString baseNameTitle_, TString baseNameDescription_, int nBinsX_, double lowerBoundX_, double upperBoundX_, int nBinsY_, double lowerBoundY_, double upperBoundY_, bool statistics_, std::string folder, unsigned int mc, bool createProfile, DQMStore::IBooker &ibook)
 
std::vector< TH2F * > getHistoVector () const
 
std::vector< TProfile * > getProfileVector () const
 
TH2F * histo_all () const
 
TH2F * histo_b () const
 
TH2F * histo_c () const
 
TH2F * histo_d () const
 
TH2F * histo_dus () const
 
TH2F * histo_dusg () const
 
TH2F * histo_g () const
 
TH2F * histo_ni () const
 
TH2F * histo_pu () const
 
TH2F * histo_s () const
 
TH2F * histo_u () const
 
double lowerBoundX () const
 
double lowerBoundY () const
 
int nBinsX () const
 
int nBinsY () const
 
void plot (TPad *theCanvas=0)
 
TProfile * profile_all () const
 
TProfile * profile_b () const
 
TProfile * profile_c () const
 
TProfile * profile_d () const
 
TProfile * profile_dus () const
 
TProfile * profile_dusg () const
 
TProfile * profile_g () const
 
TProfile * profile_ni () const
 
TProfile * profile_pu () const
 
TProfile * profile_s () const
 
TProfile * profile_u () const
 
void setEfficiencyFlag ()
 
void SetMaximum (const double &max)
 
void SetMinimum (const double &min)
 
void settitle (const char *titleX, const char *titleY)
 
bool statistics () const
 
double upperBoundX () const
 
double upperBoundY () const
 
virtual ~FlavourHistograms2D ()
 

Protected Member Functions

void fillVariable (const int &flavour, const T &varX, const G &varY, const float &w) const
 

Protected Attributes

int * theArrayDimension
 
std::string theBaseNameDescription
 
std::string theBaseNameTitle
 
MonitorElementtheHisto_all
 
MonitorElementtheHisto_b
 
MonitorElementtheHisto_c
 
MonitorElementtheHisto_d
 
MonitorElementtheHisto_dus
 
MonitorElementtheHisto_dusg
 
MonitorElementtheHisto_g
 
MonitorElementtheHisto_ni
 
MonitorElementtheHisto_pu
 
MonitorElementtheHisto_s
 
MonitorElementtheHisto_u
 
int theIndexToPlot
 
double theLowerBoundX
 
double theLowerBoundY
 
double theMax
 
int theMaxDimension
 
double theMin
 
int theNBinsX
 
int theNBinsY
 
MonitorElementtheProfile_all
 
MonitorElementtheProfile_b
 
MonitorElementtheProfile_c
 
MonitorElementtheProfile_d
 
MonitorElementtheProfile_dus
 
MonitorElementtheProfile_dusg
 
MonitorElementtheProfile_g
 
MonitorElementtheProfile_ni
 
MonitorElementtheProfile_pu
 
MonitorElementtheProfile_s
 
MonitorElementtheProfile_u
 
bool theStatistics
 
double theUpperBoundX
 
double theUpperBoundY
 

Private Member Functions

 FlavourHistograms2D ()
 

Private Attributes

bool createProfile_
 
unsigned int mcPlots_
 

Detailed Description

template<class T, class G>
class FlavourHistograms2D< T, G >

Definition at line 30 of file FlavourHistorgrams2D.h.

Constructor & Destructor Documentation

template<class T , class G >
FlavourHistograms2D< T, G >::FlavourHistograms2D ( TString  baseNameTitle_,
TString  baseNameDescription_,
int  nBinsX_,
double  lowerBoundX_,
double  upperBoundX_,
int  nBinsY_,
double  lowerBoundY_,
double  upperBoundY_,
std::string  folder,
unsigned int  mc,
bool  createProfile,
DQMStore::IGetter iget 
)

Definition at line 185 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::createProfile_, DQMStore::IGetter::get(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theArrayDimension, FlavourHistograms2D< T, G >::theBaseNameTitle, FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, FlavourHistograms2D< T, G >::theHisto_u, FlavourHistograms2D< T, G >::theProfile_all, FlavourHistograms2D< T, G >::theProfile_b, FlavourHistograms2D< T, G >::theProfile_c, FlavourHistograms2D< T, G >::theProfile_d, FlavourHistograms2D< T, G >::theProfile_dus, FlavourHistograms2D< T, G >::theProfile_dusg, FlavourHistograms2D< T, G >::theProfile_g, FlavourHistograms2D< T, G >::theProfile_ni, FlavourHistograms2D< T, G >::theProfile_pu, FlavourHistograms2D< T, G >::theProfile_s, and FlavourHistograms2D< T, G >::theProfile_u.

188  :
189  // BaseFlavourHistograms2D () ,
190  // theVariable ( variable_ ) ,
191  theMaxDimension(-1), theIndexToPlot(-1), theBaseNameTitle ( baseNameTitle_.Data() ) , theBaseNameDescription ( baseNameDescription_.Data() ) ,
192  theNBinsX ( nBinsX_ ) , theNBinsY (nBinsY_),
193  theLowerBoundX ( lowerBoundX_ ) , theUpperBoundX ( upperBoundX_ ) ,
194  theLowerBoundY ( lowerBoundY_ ) , theUpperBoundY ( upperBoundY_ ) ,
195  theMin(-1.), theMax(-1.), mcPlots_(mc), createProfile_(createProfile)
196 {
197  // defaults for array dimensions
198  theArrayDimension = 0 ;
199 
200  if(mcPlots_%2 == 0) theHisto_all = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "ALL" ) ;
201  else theHisto_all = 0;
202  if (mcPlots_) {
203  if (mcPlots_>2) {
204  theHisto_d = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "D" ) ;
205  theHisto_u = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "U" ) ;
206  theHisto_s = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "S" ) ;
207  theHisto_g = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "G" ) ;
208  theHisto_dus = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "DUS" ) ;
209  }
210  else {
211  theHisto_d = 0;
212  theHisto_u = 0;
213  theHisto_s = 0;
214  theHisto_g = 0;
215  theHisto_dus = 0;
216  }
217  theHisto_c = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "C" ) ;
218  theHisto_b = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "B" ) ;
219  theHisto_ni = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "NI" ) ;
220  theHisto_dusg = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "DUSG") ;
221  theHisto_pu = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "PU" ) ;
222  }
223  else{
224  theHisto_d = 0;
225  theHisto_u = 0;
226  theHisto_s = 0;
227  theHisto_c = 0;
228  theHisto_b = 0;
229  theHisto_g = 0;
230  theHisto_ni = 0;
231  theHisto_dus = 0;
232  theHisto_dusg = 0;
233  theHisto_pu = 0;
234  }
235 
236  if(createProfile_) {
237  if(mcPlots_%2 == 0) theProfile_all = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_ALL");
238  else theProfile_all = 0;
239  if(mcPlots_) {
240  if (mcPlots_>2) {
241  theProfile_d = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_D" ) ;
242  theProfile_u = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_U" ) ;
243  theProfile_s = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_S" ) ;
244  theProfile_g = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_G" ) ;
245  theProfile_dus = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_DUS" ) ;
246  }
247  else {
248  theProfile_d = 0;
249  theProfile_u = 0;
250  theProfile_s = 0;
251  theProfile_g = 0;
252  theProfile_dus = 0;
253  }
254  theProfile_c = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_C" ) ;
255  theProfile_b = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_B" ) ;
256  theProfile_ni = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_NI" ) ;
257  theProfile_dusg = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_DUSG") ;
258  theProfile_pu = iget.get("Btag/" + folder + "/" + theBaseNameTitle + "_Profile_PU" ) ;
259  }
260  else{
261  theProfile_d = 0;
262  theProfile_u = 0;
263  theProfile_s = 0;
264  theProfile_c = 0;
265  theProfile_b = 0;
266  theProfile_g = 0;
267  theProfile_ni = 0;
268  theProfile_dus = 0;
269  theProfile_dusg = 0;
270  theProfile_pu = 0;
271  }
272  }
273  else {
274  theProfile_all = 0;
275  theProfile_d = 0;
276  theProfile_u = 0;
277  theProfile_s = 0;
278  theProfile_c = 0;
279  theProfile_b = 0;
280  theProfile_g = 0;
281  theProfile_ni = 0;
282  theProfile_dus = 0;
283  theProfile_dusg = 0;
284  theProfile_pu = 0;
285  }
286 }
std::string theBaseNameDescription
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theHisto_dus
MonitorElement * theProfile_u
MonitorElement * theHisto_s
MonitorElement * theProfile_b
MonitorElement * theProfile_c
MonitorElement * theProfile_d
MonitorElement * theProfile_dus
MonitorElement * theHisto_all
MonitorElement * theProfile_g
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
FlavourHistograms2D< T, G >::FlavourHistograms2D ( TString  baseNameTitle_,
TString  baseNameDescription_,
int  nBinsX_,
double  lowerBoundX_,
double  upperBoundX_,
int  nBinsY_,
double  lowerBoundY_,
double  upperBoundY_,
bool  statistics_,
std::string  folder,
unsigned int  mc,
bool  createProfile,
DQMStore::IBooker ibook 
)

Definition at line 289 of file FlavourHistorgrams2D.h.

References HistoProviderDQM::book2D(), HistoProviderDQM::bookProfile(), FlavourHistograms2D< T, G >::createProfile_, MonitorElement::getTH2F(), MonitorElement::getTProfile(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theArrayDimension, FlavourHistograms2D< T, G >::theBaseNameDescription, FlavourHistograms2D< T, G >::theBaseNameTitle, FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, FlavourHistograms2D< T, G >::theHisto_u, FlavourHistograms2D< T, G >::theLowerBoundX, FlavourHistograms2D< T, G >::theLowerBoundY, FlavourHistograms2D< T, G >::theNBinsX, FlavourHistograms2D< T, G >::theNBinsY, FlavourHistograms2D< T, G >::theProfile_all, FlavourHistograms2D< T, G >::theProfile_b, FlavourHistograms2D< T, G >::theProfile_c, FlavourHistograms2D< T, G >::theProfile_d, FlavourHistograms2D< T, G >::theProfile_dus, FlavourHistograms2D< T, G >::theProfile_dusg, FlavourHistograms2D< T, G >::theProfile_g, FlavourHistograms2D< T, G >::theProfile_ni, FlavourHistograms2D< T, G >::theProfile_pu, FlavourHistograms2D< T, G >::theProfile_s, FlavourHistograms2D< T, G >::theProfile_u, FlavourHistograms2D< T, G >::theStatistics, FlavourHistograms2D< T, G >::theUpperBoundX, and FlavourHistograms2D< T, G >::theUpperBoundY.

293  :
294  theMaxDimension(-1), theIndexToPlot(-1), theBaseNameTitle ( baseNameTitle_.Data() ) , theBaseNameDescription ( baseNameDescription_.Data() ) ,
295  theNBinsX ( nBinsX_ ) , theNBinsY (nBinsY_),
296  theLowerBoundX ( lowerBoundX_ ) , theUpperBoundX ( upperBoundX_ ) ,
297  theLowerBoundY ( lowerBoundY_ ) , theUpperBoundY ( upperBoundY_ ) ,
298  theStatistics ( statistics_ ) , theMin(-1.), theMax(-1.), mcPlots_(mc), createProfile_(createProfile)
299 {
300  // defaults for array dimensions
301  theArrayDimension = 0 ;
302 
303  // book histos
304  HistoProviderDQM prov("Btag",folder,ibook);
306  else theHisto_all = 0;
307  if (mcPlots_) {
308  if (mcPlots_>2) {
314  }
315  else {
316  theHisto_d = 0;
317  theHisto_u = 0;
318  theHisto_s = 0;
319  theHisto_g = 0;
320  theHisto_dus = 0;
321  }
327  }else{
328  theHisto_d = 0;
329  theHisto_u = 0;
330  theHisto_s = 0;
331  theHisto_c = 0;
332  theHisto_b = 0;
333  theHisto_g = 0;
334  theHisto_ni = 0;
335  theHisto_dus = 0;
336  theHisto_dusg = 0;
337  theHisto_pu = 0;
338  }
339 
340  if (createProfile_) {
341  if(mcPlots_%2 == 0) theProfile_all = (prov.bookProfile( theBaseNameTitle + "_Profile_ALL" , theBaseNameDescription + " all jets" , theNBinsX, theLowerBoundX, theUpperBoundX, theNBinsY, theLowerBoundY, theUpperBoundY));
342  else theProfile_all = 0;
343  if (mcPlots_) {
344  if (mcPlots_>2) {
349  theProfile_dus = (prov.bookProfile ( theBaseNameTitle + "_Profile_DUS" , theBaseNameDescription + " dus-jets" , theNBinsX , theLowerBoundX , theUpperBoundX , theNBinsY, theLowerBoundY, theUpperBoundY)) ;
350  }
351  else {
352  theProfile_d = 0;
353  theProfile_u = 0;
354  theProfile_s = 0;
355  theProfile_g = 0;
356  theProfile_dus = 0;
357  }
361  theProfile_dusg = (prov.bookProfile ( theBaseNameTitle + "_Profile_DUSG" , theBaseNameDescription + " dusg-jets" , theNBinsX , theLowerBoundX , theUpperBoundX , theNBinsY, theLowerBoundY, theUpperBoundY)) ;
363  } else{
364  theProfile_d = 0;
365  theProfile_u = 0;
366  theProfile_s = 0;
367  theProfile_c = 0;
368  theProfile_b = 0;
369  theProfile_g = 0;
370  theProfile_ni = 0;
371  theProfile_dus = 0;
372  theProfile_dusg = 0;
373  theProfile_pu = 0;
374  }
375  } else {
376  theProfile_all = 0;
377  theProfile_d = 0;
378  theProfile_u = 0;
379  theProfile_s = 0;
380  theProfile_c = 0;
381  theProfile_b = 0;
382  theProfile_g = 0;
383  theProfile_ni = 0;
384  theProfile_dus = 0;
385  theProfile_dusg = 0;
386  theProfile_pu = 0;
387  }
388  // statistics if requested
389  if ( theStatistics ) {
390  if(theHisto_all) theHisto_all ->getTH2F()->Sumw2() ;
391  if(createProfile)
392  if(theProfile_all) theProfile_all ->getTProfile()->Sumw2() ;
393  if (mcPlots_) {
394  if (mcPlots_>2) {
395  theHisto_d ->getTH2F()->Sumw2() ;
396  theHisto_u ->getTH2F()->Sumw2() ;
397  theHisto_s ->getTH2F()->Sumw2() ;
398  theHisto_g ->getTH2F()->Sumw2() ;
399  theHisto_dus ->getTH2F()->Sumw2() ;
400  }
401  theHisto_c ->getTH2F()->Sumw2() ;
402  theHisto_b ->getTH2F()->Sumw2() ;
403  theHisto_ni ->getTH2F()->Sumw2() ;
404  theHisto_dusg->getTH2F()->Sumw2() ;
405  theHisto_pu ->getTH2F()->Sumw2() ;
406 
407  if(createProfile) {
408  if (mcPlots_>2) {
409  theProfile_d ->getTProfile()->Sumw2() ;
410  theProfile_u ->getTProfile()->Sumw2() ;
411  theProfile_s ->getTProfile()->Sumw2() ;
412  theProfile_g ->getTProfile()->Sumw2() ;
413  theProfile_dus ->getTProfile()->Sumw2() ;
414  }
415  theProfile_c ->getTProfile()->Sumw2() ;
416  theProfile_b ->getTProfile()->Sumw2() ;
417  theProfile_ni ->getTProfile()->Sumw2() ;
418  theProfile_dusg->getTProfile()->Sumw2() ;
419  theProfile_pu ->getTProfile()->Sumw2() ;
420  }
421  }
422  }
423 }
std::string theBaseNameDescription
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theHisto_dus
MonitorElement * theProfile_u
MonitorElement * theHisto_s
MonitorElement * theProfile_b
MonitorElement * theProfile_c
MonitorElement * theProfile_d
MonitorElement * theProfile_dus
MonitorElement * theHisto_all
TProfile * getTProfile(void) const
TH2F * getTH2F(void) const
MonitorElement * theProfile_g
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
FlavourHistograms2D< T, G >::~FlavourHistograms2D ( )
virtual

Definition at line 426 of file FlavourHistorgrams2D.h.

426 {}
template<class T, class G>
FlavourHistograms2D< T, G >::FlavourHistograms2D ( )
inlineprivate

Definition at line 175 of file FlavourHistorgrams2D.h.

175 {}

Member Function Documentation

template<class T, class G>
std::string FlavourHistograms2D< T, G >::baseNameDescription ( ) const
inline

Definition at line 78 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

78 { return theBaseNameDescription ; }
std::string theBaseNameDescription
template<class T, class G>
std::string FlavourHistograms2D< T, G >::baseNameTitle ( ) const
inline

Definition at line 77 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

77 { return theBaseNameTitle ; }
template<class T, class G>
void FlavourHistograms2D< T, G >::divide ( const FlavourHistograms2D< T, G > &  bHD) const

Definition at line 636 of file FlavourHistorgrams2D.h.

References MultipleCompare::Divide(), MonitorElement::getTH2F(), FlavourHistograms2D< T, G >::histo_all(), FlavourHistograms2D< T, G >::histo_b(), FlavourHistograms2D< T, G >::histo_c(), FlavourHistograms2D< T, G >::histo_d(), FlavourHistograms2D< T, G >::histo_dus(), FlavourHistograms2D< T, G >::histo_dusg(), FlavourHistograms2D< T, G >::histo_g(), FlavourHistograms2D< T, G >::histo_ni(), FlavourHistograms2D< T, G >::histo_pu(), FlavourHistograms2D< T, G >::histo_s(), FlavourHistograms2D< T, G >::histo_u(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, and FlavourHistograms2D< T, G >::theHisto_u.

Referenced by python.rootplot.utilities.Hist::__div__().

636  {
637  // divide histos using binomial errors
638  //
639  // ATTENTION: It's the responsability of the user to make sure that the HistoDescriptions
640  // involved in this operation have been constructed with the statistics option switched on!!
641  //
642  if(theHisto_all) theHisto_all ->getTH2F()-> Divide ( theHisto_all->getTH2F() , bHD.histo_all () , 1.0 , 1.0 , "b" ) ;
643  if (mcPlots_) {
644  if (mcPlots_>2) {
645  theHisto_d ->getTH2F()-> Divide ( theHisto_d ->getTH2F() , bHD.histo_d () , 1.0 , 1.0 , "b" ) ;
646  theHisto_u ->getTH2F()-> Divide ( theHisto_u ->getTH2F() , bHD.histo_u () , 1.0 , 1.0 , "b" ) ;
647  theHisto_s ->getTH2F()-> Divide ( theHisto_s ->getTH2F() , bHD.histo_s () , 1.0 , 1.0 , "b" ) ;
648  theHisto_g ->getTH2F()-> Divide ( theHisto_g ->getTH2F() , bHD.histo_g () , 1.0 , 1.0 , "b" ) ;
649  theHisto_dus ->getTH2F()-> Divide ( theHisto_dus->getTH2F() , bHD.histo_dus () , 1.0 , 1.0 , "b" ) ;
650  }
651  theHisto_c ->getTH2F()-> Divide ( theHisto_c ->getTH2F() , bHD.histo_c () , 1.0 , 1.0 , "b" ) ;
652  theHisto_b ->getTH2F()-> Divide ( theHisto_b ->getTH2F() , bHD.histo_b () , 1.0 , 1.0 , "b" ) ;
653  theHisto_ni ->getTH2F()-> Divide ( theHisto_ni->getTH2F() , bHD.histo_ni () , 1.0 , 1.0 , "b" ) ;
654  theHisto_dusg ->getTH2F()-> Divide ( theHisto_dusg->getTH2F() , bHD.histo_dusg() , 1.0 , 1.0 , "b" ) ;
655  theHisto_pu ->getTH2F()-> Divide ( theHisto_pu->getTH2F() , bHD.histo_pu () , 1.0 , 1.0 , "b" ) ;
656  }
657 }
def Divide(hNum, hDen)
MonitorElement * theHisto_g
TH2F * histo_all() const
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theHisto_dus
TH2F * histo_dusg() const
MonitorElement * theHisto_s
TH2F * histo_dus() const
TH2F * histo_pu() const
TH2F * histo_ni() const
MonitorElement * theHisto_all
TH2F * getTH2F(void) const
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
void FlavourHistograms2D< T, G >::epsPlot ( const std::string &  name)

Definition at line 625 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::plot(), FlavourHistograms2D< T, G >::theBaseNameDescription, and FlavourHistograms2D< T, G >::theBaseNameTitle.

626 {
627  TCanvas tc(theBaseNameTitle.c_str() , theBaseNameDescription.c_str());
628 
629  plot(&tc);
630  tc.Print((name + theBaseNameTitle + ".eps").c_str());
631 }
std::string theBaseNameDescription
void plot(TPad *theCanvas=0)
template<class T, class G>
void FlavourHistograms2D< T, G >::fill ( const int &  flavour,
const T variableX,
const G &  variableY 
) const

Definition at line 437 of file FlavourHistorgrams2D.h.

Referenced by IPTagPlotter< Container, Base >::analyzeTag(), TagCorrelationPlotter::analyzeTags(), and FlavourHistograms2D< T, G >::fill().

438 {
439  fill ( flavour , variableX , variableY , 1. ) ;
440 }
void fill(const int &flavour, const T &variableX, const G &variableY) const
template<class T, class G>
void FlavourHistograms2D< T, G >::fill ( const int &  flavour,
const T variableX,
const G &  variableY,
const float &  w 
) const

Definition at line 430 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::fillVariable().

431 {
432  // For single variables and arrays (for arrays only a single index can be filled)
433  fillVariable ( flavour , variableX , variableY , w ) ;
434 }
const double w
Definition: UKUtility.cc:23
void fillVariable(const int &flavour, const T &varX, const G &varY, const float &w) const
template<class T, class G>
void FlavourHistograms2D< T, G >::fill ( const int &  flavour,
const T variableX,
const G *  variableY 
) const

Definition at line 471 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::fill().

472 {
473  fill ( flavour, variableX , variableY , 1. );
474 }
void fill(const int &flavour, const T &variableX, const G &variableY) const
template<class T, class G>
void FlavourHistograms2D< T, G >::fill ( const int &  flavour,
const T variableX,
const G *  variableY,
const float &  w 
) const

Definition at line 443 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::fillVariable(), callgraph::G, mps_fire::i, FlavourHistograms2D< T, G >::theArrayDimension, FlavourHistograms2D< T, G >::theIndexToPlot, and FlavourHistograms2D< T, G >::theMaxDimension.

444 {
445  if ( theArrayDimension == 0 ) {
446  // single variable
447  fillVariable ( flavour , *variableX, *variableY , w) ;
448  } else {
449  // array
450  int iMax = *theArrayDimension ;
452  //
453  for ( int i = 0 ; i != iMax ; ++i ) {
454  // check if only one index to be plotted (<0: switched off -> plot all)
455  if ( ( theIndexToPlot < 0 ) || ( i == theIndexToPlot ) ) {
456  fillVariable ( flavour , *(variableX+i) , *(variableY+i) , w) ;
457  }
458  }
459 
460  // if single index to be filled but not enough entries: fill 0.0 (convention!)
461  if ( theIndexToPlot >= iMax ) {
462  // cout << "==>> The index to be filled is too big -> fill 0.0 : " << theBaseNameTitle << " : " << theIndexToPlot << " >= " << iMax << endl ;
463  const T& theZeroT = static_cast<T> ( 0.0) ;
464  const G& theZeroG = static_cast<T> ( 0.0 );
465  fillVariable ( flavour , theZeroT , theZeroG , w ) ;
466  }
467  }
468 }
const double w
Definition: UKUtility.cc:23
long double T
void fillVariable(const int &flavour, const T &varX, const G &varY, const float &w) const
template<class T, class G>
void FlavourHistograms2D< T, G >::fillVariable ( const int &  flavour,
const T varX,
const G &  varY,
const float &  w 
) const
protected

Definition at line 679 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::createProfile_, MonitorElement::Fill(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, FlavourHistograms2D< T, G >::theHisto_u, FlavourHistograms2D< T, G >::theProfile_all, FlavourHistograms2D< T, G >::theProfile_b, FlavourHistograms2D< T, G >::theProfile_c, FlavourHistograms2D< T, G >::theProfile_d, FlavourHistograms2D< T, G >::theProfile_dus, FlavourHistograms2D< T, G >::theProfile_dusg, FlavourHistograms2D< T, G >::theProfile_g, FlavourHistograms2D< T, G >::theProfile_ni, FlavourHistograms2D< T, G >::theProfile_pu, FlavourHistograms2D< T, G >::theProfile_s, and FlavourHistograms2D< T, G >::theProfile_u.

Referenced by FlavourHistograms2D< T, G >::fill(), and FlavourHistograms2D< double, double >::profile_pu().

679  {
680  // all
681  if(theHisto_all) theHisto_all->Fill ( varX, varY,w ) ;
682  if(createProfile_)
683  //if(theProfile_all) theProfile_all->Fill( varX, varY, w );
684  if(theProfile_all) theProfile_all->Fill( varX, varY);
685 
686  //exit(-1);
687  // flavour specific
688  if (!mcPlots_) return;
689 
690  switch( flavour ) {
691  case 1:
692  if (mcPlots_>2) {
693  theHisto_d->Fill( varX, varY,w );
694  theHisto_dus->Fill( varX, varY,w );
695  }
696  theHisto_dusg->Fill( varX, varY,w );
697  if(createProfile_) {
698  //theProfile_d->Fill(varX, varY,w);
699  //theProfile_dus->Fill(varX, varY,w);
700  //theProfile_dusg->Fill(varX, varY,w);
701  if (mcPlots_>2) {
702  theProfile_d->Fill(varX, varY);
703  theProfile_dus->Fill(varX, varY);
704  }
705  theProfile_dusg->Fill(varX, varY);
706  }
707  return;
708  case 2:
709  if (mcPlots_>2) {
710  theHisto_u->Fill( varX, varY,w );
711  theHisto_dus->Fill( varX, varY,w );
712  }
713  theHisto_dusg->Fill( varX, varY,w );
714  if(createProfile_) {
715  //theProfile_u->Fill(varX, varY,w);
716  //theProfile_dus->Fill(varX, varY,w);
717  //theProfile_dusg->Fill(varX, varY,w);
718  if (mcPlots_>2) {
719  theProfile_u->Fill(varX, varY);
720  theProfile_dus->Fill(varX, varY);
721  }
722  theProfile_dusg->Fill(varX, varY);
723  }
724  return;
725  case 3:
726  if (mcPlots_>2) {
727  theHisto_s->Fill( varX, varY,w );
728  theHisto_dus->Fill( varX, varY,w );
729  }
730  theHisto_dusg->Fill( varX, varY,w );
731  if(createProfile_) {
732  //theProfile_s->Fill(varX, varY,w);
733  //theProfile_dus->Fill(varX, varY,w);
734  //theProfile_dusg->Fill(varX, varY,w);
735  if (mcPlots_>2) {
736  theProfile_s->Fill(varX, varY);
737  theProfile_dus->Fill(varX, varY);
738  }
739  theProfile_dusg->Fill(varX, varY);
740  }
741  return;
742  case 4:
743  theHisto_c->Fill( varX, varY,w );
744  //if(createProfile_) theProfile_c->Fill(varX, varY,w);
745  if(createProfile_) theProfile_c->Fill(varX, varY);
746  return;
747  case 5:
748  theHisto_b->Fill( varX, varY,w );
749  //if(createProfile_) theProfile_b->Fill(varX, varY,w);
750  if(createProfile_) theProfile_b->Fill(varX, varY);
751  return;
752  case 21:
753  if (mcPlots_>2) theHisto_g->Fill( varX, varY,w );
754  theHisto_dusg->Fill( varX, varY,w );
755  if(createProfile_) {
756  //theProfile_g->Fill(varX, varY,w);
757  //theProfile_dusg->Fill(varX, varY,w);
758  if (mcPlots_>2) theProfile_g->Fill(varX, varY);
759  theProfile_dusg->Fill(varX, varY);
760  }
761  return;
762  case 20:
763  theHisto_pu->Fill( varX, varY,w );
764  //if(createProfile_) theProfile_pu->Fill(varX, varY,w);
765  if(createProfile_) theProfile_pu->Fill(varX, varY);
766  return;
767  default:
768  theHisto_ni->Fill( varX, varY,w );
769  //if(createProfile_) theProfile_ni->Fill(varX, varY,w);
770  if(createProfile_) theProfile_ni->Fill(varX, varY);
771  return;
772  }
773 }
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
const double w
Definition: UKUtility.cc:23
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
void Fill(long long x)
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theHisto_dus
MonitorElement * theProfile_u
MonitorElement * theHisto_s
MonitorElement * theProfile_b
MonitorElement * theProfile_c
MonitorElement * theProfile_d
MonitorElement * theProfile_dus
MonitorElement * theHisto_all
MonitorElement * theProfile_g
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
std::vector< TH2F * > FlavourHistograms2D< T, G >::getHistoVector ( ) const

Definition at line 776 of file FlavourHistorgrams2D.h.

References MonitorElement::getTH2F(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, and FlavourHistograms2D< T, G >::theHisto_u.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D(), and FlavourHistograms2D< double, double >::profile_pu().

777 {
778  std::vector<TH2F*> histoVector;
779  if(theHisto_all) histoVector.push_back ( theHisto_all->getTH2F() );
780  if (mcPlots_) {
781  if (mcPlots_>2) {
782  histoVector.push_back ( theHisto_d->getTH2F() );
783  histoVector.push_back ( theHisto_u->getTH2F() );
784  histoVector.push_back ( theHisto_s->getTH2F() );
785  histoVector.push_back ( theHisto_g ->getTH2F() );
786  histoVector.push_back ( theHisto_dus->getTH2F() );
787  }
788  histoVector.push_back ( theHisto_c->getTH2F() );
789  histoVector.push_back ( theHisto_b->getTH2F() );
790  histoVector.push_back ( theHisto_ni->getTH2F() );
791  histoVector.push_back ( theHisto_dusg->getTH2F());
792  histoVector.push_back ( theHisto_pu->getTH2F() );
793  }
794  return histoVector;
795 }
MonitorElement * theHisto_g
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theHisto_dus
MonitorElement * theHisto_s
MonitorElement * theHisto_all
TH2F * getTH2F(void) const
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
std::vector< TProfile * > FlavourHistograms2D< T, G >::getProfileVector ( ) const

Definition at line 798 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::createProfile_, MonitorElement::getTProfile(), FlavourHistograms2D< T, G >::mcPlots_, FlavourHistograms2D< T, G >::theProfile_all, FlavourHistograms2D< T, G >::theProfile_b, FlavourHistograms2D< T, G >::theProfile_c, FlavourHistograms2D< T, G >::theProfile_d, FlavourHistograms2D< T, G >::theProfile_dus, FlavourHistograms2D< T, G >::theProfile_dusg, FlavourHistograms2D< T, G >::theProfile_g, FlavourHistograms2D< T, G >::theProfile_ni, FlavourHistograms2D< T, G >::theProfile_pu, FlavourHistograms2D< T, G >::theProfile_s, and FlavourHistograms2D< T, G >::theProfile_u.

Referenced by FlavourHistograms2D< double, double >::profile_pu().

799 {
800  std::vector<TProfile*> profileVector;
801  if(createProfile_) {
802  if(theProfile_all) profileVector.push_back ( theProfile_all->getTProfile() );
803  if (mcPlots_) {
804  if (mcPlots_>2) {
805  profileVector.push_back ( theProfile_d->getTProfile() );
806  profileVector.push_back ( theProfile_u->getTProfile() );
807  profileVector.push_back ( theProfile_s->getTProfile() );
808  profileVector.push_back ( theProfile_g ->getTProfile() );
809  profileVector.push_back ( theProfile_dus->getTProfile() );
810  }
811  profileVector.push_back ( theProfile_c->getTProfile() );
812  profileVector.push_back ( theProfile_b->getTProfile() );
813  profileVector.push_back ( theProfile_ni->getTProfile() );
814  profileVector.push_back ( theProfile_dusg->getTProfile());
815  profileVector.push_back ( theProfile_pu->getTProfile() );
816  }
817  }
818  return profileVector;
819 }
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
MonitorElement * theProfile_dusg
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theProfile_u
MonitorElement * theProfile_b
MonitorElement * theProfile_c
MonitorElement * theProfile_d
MonitorElement * theProfile_dus
TProfile * getTProfile(void) const
MonitorElement * theProfile_g
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_all ( ) const
inline

Definition at line 88 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

88 { return theHisto_all->getTH2F() ; }
MonitorElement * theHisto_all
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_b ( ) const
inline

Definition at line 93 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

93 { return theHisto_b->getTH2F() ; }
TH2F * getTH2F(void) const
MonitorElement * theHisto_b
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_c ( ) const
inline

Definition at line 92 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

92 { return theHisto_c->getTH2F() ; }
MonitorElement * theHisto_c
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_d ( ) const
inline

Definition at line 89 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

89 { return theHisto_d ->getTH2F() ; }
TH2F * getTH2F(void) const
MonitorElement * theHisto_d
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_dus ( ) const
inline

Definition at line 96 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

96 { return theHisto_dus->getTH2F() ; }
MonitorElement * theHisto_dus
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_dusg ( ) const
inline

Definition at line 97 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

97 { return theHisto_dusg->getTH2F() ; }
MonitorElement * theHisto_dusg
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_g ( ) const
inline

Definition at line 94 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

94 { return theHisto_g->getTH2F() ; }
MonitorElement * theHisto_g
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_ni ( ) const
inline

Definition at line 95 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

95 { return theHisto_ni->getTH2F() ; }
TH2F * getTH2F(void) const
MonitorElement * theHisto_ni
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_pu ( ) const
inline

Definition at line 98 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

98 { return theHisto_pu->getTH2F() ; }
MonitorElement * theHisto_pu
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_s ( ) const
inline

Definition at line 91 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

91 { return theHisto_s->getTH2F() ; }
MonitorElement * theHisto_s
TH2F * getTH2F(void) const
template<class T, class G>
TH2F* FlavourHistograms2D< T, G >::histo_u ( ) const
inline

Definition at line 90 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::divide().

90 { return theHisto_u->getTH2F() ; }
MonitorElement * theHisto_u
TH2F * getTH2F(void) const
template<class T, class G>
double FlavourHistograms2D< T, G >::lowerBoundX ( ) const
inline

Definition at line 81 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

81 { return theLowerBoundX ; }
template<class T, class G>
double FlavourHistograms2D< T, G >::lowerBoundY ( ) const
inline

Definition at line 83 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

83 { return theLowerBoundY ; }
template<class T, class G>
int FlavourHistograms2D< T, G >::nBinsX ( ) const
inline

Definition at line 79 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

79 { return theNBinsX ; }
template<class T, class G>
int FlavourHistograms2D< T, G >::nBinsY ( ) const
inline

Definition at line 80 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

80 { return theNBinsY ; }
template<class T , class G >
void FlavourHistograms2D< T, G >::plot ( TPad *  theCanvas = 0)

Definition at line 532 of file FlavourHistorgrams2D.h.

References cuy::col, MonitorElement::getTH2F(), trackerHits::histo, mps_fire::i, RecoTauValidation_cfi::lineStyle, RecoTauValidation_cfi::lineWidth, RecoTauValidation_cfi::markerSize, RecoTauValidation_cfi::markerStyle, hpstanc_transforms::max, RecoBTag::setTDRStyle(), FlavourHistograms2D< T, G >::theBaseNameDescription, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theMax, and FlavourHistograms2D< T, G >::theMin.

Referenced by FlavourHistograms2D< T, G >::epsPlot().

532  {
533 
534 //fixme:
535  bool btppNI = false;
536  bool btppColour = true;
537 
538  if (theCanvas)
539  theCanvas->cd();
540 
541  RecoBTag::setTDRStyle()->cd();
542  gPad->UseCurrentStyle();
543  gPad->SetLogy ( 0 ) ;
544  gPad->SetGridx ( 0 ) ;
545  gPad->SetGridy ( 0 ) ;
546  gPad->SetTitle ( 0 ) ;
547 
548  MonitorElement * histo[4];
549  int col[4], lineStyle[4], markerStyle[4];
550  int lineWidth = 1 ;
551 
552  const double markerSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
553  histo[0] = theHisto_dusg ;
554  histo[1] = theHisto_b ;
555  histo[2] = theHisto_c ;
556  histo[3]= 0 ;
557 
558  double max = theMax;
559  if (theMax<=0.) {
560  max = theHisto_dusg->getTH2F()->GetMaximum();
561  if (theHisto_b->getTH2F()->GetMaximum() > max) max = theHisto_b->getTH2F()->GetMaximum();
562  if (theHisto_c->getTH2F()->GetMaximum() > max) max = theHisto_c->getTH2F()->GetMaximum();
563  }
564 
565  if (btppNI) {
566  histo[3] = theHisto_ni ;
567  if (theHisto_ni->getTH2F()->GetMaximum() > max) max = theHisto_ni->getTH2F()->GetMaximum();
568  }
569 
570  if ( btppColour ) { // print colours
571  col[0] = 4 ;
572  col[1] = 2 ;
573  col[2] = 6 ;
574  col[3] = 3 ;
575  lineStyle[0] = 1 ;
576  lineStyle[1] = 1 ;
577  lineStyle[2] = 1 ;
578  lineStyle[3] = 1 ;
579  markerStyle[0] = 20 ;
580  markerStyle[1] = 21 ;
581  markerStyle[2] = 22 ;
582  markerStyle[3] = 23 ;
583  lineWidth = 1 ;
584  }
585  else { // different marker/line styles
586  col[1] = 1 ;
587  col[2] = 1 ;
588  col[3] = 1 ;
589  col[0] = 1 ;
590  lineStyle[0] = 2 ;
591  lineStyle[1] = 1 ;
592  lineStyle[2] = 3 ;
593  lineStyle[3] = 4 ;
594  markerStyle[0] = 20 ;
595  markerStyle[1] = 21 ;
596  markerStyle[2] = 22 ;
597  markerStyle[3] = 23 ;
598  }
599 
600  histo[0] ->getTH2F()->GetXaxis()->SetTitle ( theBaseNameDescription.c_str() ) ;
601  histo[0] ->getTH2F()->GetYaxis()->SetTitle ( "Arbitrary Units" ) ;
602  histo[0] ->getTH2F()->GetYaxis()->SetTitleOffset(1.25) ;
603 
604  for (int i=0; i != 4; ++i) {
605  if (histo[i]== 0 ) continue;
606  histo[i] ->getTH2F()->SetStats ( false ) ;
607  histo[i] ->getTH2F()->SetLineStyle ( lineStyle[i] ) ;
608  histo[i] ->getTH2F()->SetLineWidth ( lineWidth ) ;
609  histo[i] ->getTH2F()->SetLineColor ( col[i] ) ;
610  histo[i] ->getTH2F()->SetMarkerStyle ( markerStyle[i] ) ;
611  histo[i] ->getTH2F()->SetMarkerColor ( col[i] ) ;
612  histo[i] ->getTH2F()->SetMarkerSize ( markerSize ) ;
613  }
614 
615  histo[0]->getTH2F()->SetMaximum(max*1.05);
616  if (theMin!=-1.) histo[0]->getTH2F()->SetMinimum(theMin);
617  histo[0]->getTH2F()->Draw() ;
618  histo[1]->getTH2F()->Draw("Same") ;
619  histo[2]->getTH2F()->Draw("Same") ;
620  if ( histo[3] != 0 ) histo[3]->getTH2F()->Draw("Same") ;
621 
622 }
std::string theBaseNameDescription
MonitorElement * theHisto_dusg
TStyle * setTDRStyle()
Definition: Tools.cc:346
MonitorElement * theHisto_c
col
Definition: cuy.py:1008
TH2F * getTH2F(void) const
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_all ( ) const
inline

Definition at line 100 of file FlavourHistorgrams2D.h.

100 { return theProfile_all->getTProfile() ; }
MonitorElement * theProfile_all
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_b ( ) const
inline

Definition at line 105 of file FlavourHistorgrams2D.h.

105 { return theProfile_b->getTProfile() ; }
MonitorElement * theProfile_b
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_c ( ) const
inline

Definition at line 104 of file FlavourHistorgrams2D.h.

104 { return theProfile_c->getTProfile() ; }
MonitorElement * theProfile_c
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_d ( ) const
inline

Definition at line 101 of file FlavourHistorgrams2D.h.

101 { return theProfile_d ->getTProfile() ; }
MonitorElement * theProfile_d
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_dus ( ) const
inline

Definition at line 108 of file FlavourHistorgrams2D.h.

108 { return theProfile_dus->getTProfile() ; }
MonitorElement * theProfile_dus
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_dusg ( ) const
inline

Definition at line 109 of file FlavourHistorgrams2D.h.

109 { return theProfile_dusg->getTProfile() ; }
MonitorElement * theProfile_dusg
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_g ( ) const
inline

Definition at line 106 of file FlavourHistorgrams2D.h.

106 { return theProfile_g->getTProfile() ; }
TProfile * getTProfile(void) const
MonitorElement * theProfile_g
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_ni ( ) const
inline

Definition at line 107 of file FlavourHistorgrams2D.h.

107 { return theProfile_ni->getTProfile() ; }
MonitorElement * theProfile_ni
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_pu ( ) const
inline

Definition at line 110 of file FlavourHistorgrams2D.h.

110 { return theProfile_pu->getTProfile() ; }
MonitorElement * theProfile_pu
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_s ( ) const
inline

Definition at line 103 of file FlavourHistorgrams2D.h.

103 { return theProfile_s->getTProfile() ; }
MonitorElement * theProfile_s
TProfile * getTProfile(void) const
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_u ( ) const
inline

Definition at line 102 of file FlavourHistorgrams2D.h.

102 { return theProfile_u->getTProfile() ; }
MonitorElement * theProfile_u
TProfile * getTProfile(void) const
template<class T , class G >
void FlavourHistograms2D< T, G >::setEfficiencyFlag ( )

Definition at line 660 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::mcPlots_, MonitorElement::setEfficiencyFlag(), FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, and FlavourHistograms2D< T, G >::theHisto_u.

660  {
662  if (mcPlots_) {
663  if (mcPlots_>2 ) {
669  }
675  }
676 }
MonitorElement * theHisto_g
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theHisto_dus
MonitorElement * theHisto_s
MonitorElement * theHisto_all
void setEfficiencyFlag(void)
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T, class G>
void FlavourHistograms2D< T, G >::SetMaximum ( const double &  max)
inline
template<class T, class G>
void FlavourHistograms2D< T, G >::SetMinimum ( const double &  min)
inline

Definition at line 73 of file FlavourHistorgrams2D.h.

73 { theMin = min;}
T min(T a, T b)
Definition: MathUtil.h:58
template<class T , class G >
void FlavourHistograms2D< T, G >::settitle ( const char *  titleX,
const char *  titleY 
)

Definition at line 477 of file FlavourHistorgrams2D.h.

References FlavourHistograms2D< T, G >::createProfile_, FlavourHistograms2D< T, G >::mcPlots_, MonitorElement::setAxisTitle(), FlavourHistograms2D< T, G >::theHisto_all, FlavourHistograms2D< T, G >::theHisto_b, FlavourHistograms2D< T, G >::theHisto_c, FlavourHistograms2D< T, G >::theHisto_d, FlavourHistograms2D< T, G >::theHisto_dus, FlavourHistograms2D< T, G >::theHisto_dusg, FlavourHistograms2D< T, G >::theHisto_g, FlavourHistograms2D< T, G >::theHisto_ni, FlavourHistograms2D< T, G >::theHisto_pu, FlavourHistograms2D< T, G >::theHisto_s, FlavourHistograms2D< T, G >::theHisto_u, FlavourHistograms2D< T, G >::theProfile_all, FlavourHistograms2D< T, G >::theProfile_b, FlavourHistograms2D< T, G >::theProfile_c, FlavourHistograms2D< T, G >::theProfile_d, FlavourHistograms2D< T, G >::theProfile_dus, FlavourHistograms2D< T, G >::theProfile_dusg, FlavourHistograms2D< T, G >::theProfile_g, FlavourHistograms2D< T, G >::theProfile_ni, FlavourHistograms2D< T, G >::theProfile_pu, FlavourHistograms2D< T, G >::theProfile_s, and FlavourHistograms2D< T, G >::theProfile_u.

Referenced by TagCorrelationPlotter::TagCorrelationPlotter().

477  {
478  if(theHisto_all) theHisto_all ->setAxisTitle(titleX) ;
479  if(theHisto_all) theHisto_all ->setAxisTitle(titleY, 2) ;
480  if (mcPlots_) {
481 
482  if(theHisto_d) theHisto_d ->setAxisTitle(titleX) ;
483  if(theHisto_u) theHisto_u ->setAxisTitle(titleX) ;
484  if(theHisto_s) theHisto_s ->setAxisTitle(titleX) ;
485  if(theHisto_c) theHisto_c ->setAxisTitle(titleX) ;
486  if(theHisto_b) theHisto_b ->setAxisTitle(titleX) ;
487  if(theHisto_g) theHisto_g ->setAxisTitle(titleX) ;
488  if(theHisto_ni) theHisto_ni ->setAxisTitle(titleX) ;
489  if(theHisto_dus) theHisto_dus ->setAxisTitle(titleX) ;
491  if(theHisto_d) theHisto_d ->setAxisTitle(titleY, 2) ;
492  if(theHisto_u) theHisto_u ->setAxisTitle(titleY, 2) ;
493  if(theHisto_s) theHisto_s ->setAxisTitle(titleY, 2) ;
494  if(theHisto_c) theHisto_c ->setAxisTitle(titleY, 2) ;
495  if(theHisto_b) theHisto_b ->setAxisTitle(titleY, 2) ;
496  if(theHisto_g) theHisto_g ->setAxisTitle(titleY, 2) ;
497  if(theHisto_ni) theHisto_ni ->setAxisTitle(titleY, 2) ;
498  if(theHisto_dus) theHisto_dus ->setAxisTitle(titleY, 2) ;
499  if(theHisto_dusg)theHisto_dusg->setAxisTitle(titleY, 2) ;
500  if(theHisto_pu) theHisto_pu ->setAxisTitle(titleY, 2) ;
501  }
502 
503  if(createProfile_) {
505  if(theProfile_all) theProfile_all ->setAxisTitle(titleY, 2) ;
506  if (mcPlots_) {
507 
508  if(theProfile_d) theProfile_d ->setAxisTitle(titleX) ;
509  if(theProfile_u) theProfile_u ->setAxisTitle(titleX) ;
510  if(theProfile_s) theProfile_s ->setAxisTitle(titleX) ;
511  if(theProfile_c) theProfile_c ->setAxisTitle(titleX) ;
512  if(theProfile_b) theProfile_b ->setAxisTitle(titleX) ;
513  if(theProfile_g) theProfile_g ->setAxisTitle(titleX) ;
517  if(theProfile_d) theProfile_d ->setAxisTitle(titleY, 2) ;
518  if(theProfile_u) theProfile_u ->setAxisTitle(titleY, 2) ;
519  if(theProfile_s) theProfile_s ->setAxisTitle(titleY, 2) ;
520  if(theProfile_c) theProfile_c ->setAxisTitle(titleY, 2) ;
521  if(theProfile_b) theProfile_b ->setAxisTitle(titleY, 2) ;
522  if(theProfile_g) theProfile_g ->setAxisTitle(titleY, 2) ;
523  if(theProfile_ni) theProfile_ni ->setAxisTitle(titleY, 2) ;
524  if(theProfile_dus) theProfile_dus ->setAxisTitle(titleY, 2) ;
526  if(theProfile_pu) theProfile_pu ->setAxisTitle(titleY, 2) ;
527  }
528  }
529 }
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theHisto_dus
MonitorElement * theProfile_u
MonitorElement * theHisto_s
MonitorElement * theProfile_b
MonitorElement * theProfile_c
MonitorElement * theProfile_d
MonitorElement * theProfile_dus
MonitorElement * theHisto_all
MonitorElement * theProfile_g
MonitorElement * theHisto_b
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T, class G>
bool FlavourHistograms2D< T, G >::statistics ( ) const
inline

Definition at line 85 of file FlavourHistorgrams2D.h.

85 { return theStatistics ; }
template<class T, class G>
double FlavourHistograms2D< T, G >::upperBoundX ( ) const
inline

Definition at line 82 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

82 { return theUpperBoundX ; }
template<class T, class G>
double FlavourHistograms2D< T, G >::upperBoundY ( ) const
inline

Definition at line 84 of file FlavourHistorgrams2D.h.

Referenced by EffPurFromHistos2D::EffPurFromHistos2D().

84 { return theUpperBoundY ; }

Member Data Documentation

template<class T, class G>
bool FlavourHistograms2D< T, G >::createProfile_
private
template<class T, class G>
unsigned int FlavourHistograms2D< T, G >::mcPlots_
private
template<class T, class G>
int* FlavourHistograms2D< T, G >::theArrayDimension
protected
template<class T, class G>
std::string FlavourHistograms2D< T, G >::theBaseNameDescription
protected
template<class T, class G>
std::string FlavourHistograms2D< T, G >::theBaseNameTitle
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_all
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_b
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_c
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_d
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_dus
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_dusg
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_g
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_ni
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_pu
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_s
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theHisto_u
protected
template<class T, class G>
int FlavourHistograms2D< T, G >::theIndexToPlot
protected

Definition at line 131 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::fill().

template<class T, class G>
double FlavourHistograms2D< T, G >::theLowerBoundX
protected
template<class T, class G>
double FlavourHistograms2D< T, G >::theLowerBoundY
protected
template<class T, class G>
double FlavourHistograms2D< T, G >::theMax
protected
template<class T, class G>
int FlavourHistograms2D< T, G >::theMaxDimension
protected

Definition at line 130 of file FlavourHistorgrams2D.h.

Referenced by FlavourHistograms2D< T, G >::fill().

template<class T, class G>
double FlavourHistograms2D< T, G >::theMin
protected
template<class T, class G>
int FlavourHistograms2D< T, G >::theNBinsX
protected
template<class T, class G>
int FlavourHistograms2D< T, G >::theNBinsY
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_all
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_b
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_c
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_d
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_dus
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_dusg
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_g
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_ni
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_pu
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_s
protected
template<class T, class G>
MonitorElement* FlavourHistograms2D< T, G >::theProfile_u
protected
template<class T, class G>
bool FlavourHistograms2D< T, G >::theStatistics
protected
template<class T, class G>
double FlavourHistograms2D< T, G >::theUpperBoundX
protected
template<class T, class G>
double FlavourHistograms2D< T, G >::theUpperBoundY
protected