CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 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_, bool statistics_, bool update, std::string folder, unsigned int mc, bool createProfile)
 
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_s () const
 
TH2F * histo_u () const
 
double lowerBoundX () const
 
double lowerBoundY () const
 
int nBinsX () const
 
int nBinsY () const
 
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_s () const
 
TProfile * profile_u () const
 
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_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_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_,
bool  statistics_,
bool  update,
std::string  folder,
unsigned int  mc,
bool  createProfile 
)

Definition at line 171 of file FlavourHistorgrams2D.h.

References HistoProviderDQM::access(), 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_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_s, FlavourHistograms2D< T, G >::theProfile_u, FlavourHistograms2D< T, G >::theStatistics, FlavourHistograms2D< T, G >::theUpperBoundX, and FlavourHistograms2D< T, G >::theUpperBoundY.

175  :
176  // BaseFlavourHistograms2D () ,
177  // theVariable ( variable_ ) ,
178  theMaxDimension(-1), theIndexToPlot(-1), theBaseNameTitle ( baseNameTitle_ ) , theBaseNameDescription ( baseNameDescription_ ) ,
179  theNBinsX ( nBinsX_ ) , theNBinsY (nBinsY_),
180  theLowerBoundX ( lowerBoundX_ ) , theUpperBoundX ( upperBoundX_ ) ,
181  theLowerBoundY ( lowerBoundY_ ) , theUpperBoundY ( upperBoundY_ ) ,
182  theStatistics ( statistics_ ) , theMin(-1.), theMax(-1.), mcPlots_(mc), createProfile_(createProfile)
183 {
184  // defaults for array dimensions
185  theArrayDimension = 0 ;
186 
187  if (!update) {
188  // book histos
189  HistoProviderDQM prov("Btag",folder);
191  else theHisto_all = 0;
192  if (mcPlots_) {
193  if (mcPlots_>2) {
199  }
200  else {
201  theHisto_d = 0;
202  theHisto_u = 0;
203  theHisto_s = 0;
204  theHisto_g = 0;
205  theHisto_dus = 0;
206  }
211  }else{
212  theHisto_d = 0;
213  theHisto_u = 0;
214  theHisto_s = 0;
215  theHisto_c = 0;
216  theHisto_b = 0;
217  theHisto_g = 0;
218  theHisto_ni = 0;
219  theHisto_dus = 0;
220  theHisto_dusg = 0;
221  }
222 
223  if (createProfile_) {
224  if(mcPlots_%2 == 0) theProfile_all = (prov.bookProfile( theBaseNameTitle + "_Profile_ALL" , theBaseNameDescription + " all jets" , theNBinsX, theLowerBoundX, theUpperBoundX, theNBinsY, theLowerBoundY, theUpperBoundY));
225  else theProfile_all = 0;
226  if (mcPlots_) {
227  if (mcPlots_>2) {
232  theProfile_dus = (prov.bookProfile ( theBaseNameTitle + "_Profile_DUS" , theBaseNameDescription + " dus-jets" , theNBinsX , theLowerBoundX , theUpperBoundX , theNBinsY, theLowerBoundY, theUpperBoundY)) ;
233  }
234  else {
235  theProfile_d = 0;
236  theProfile_u = 0;
237  theProfile_s = 0;
238  theProfile_g = 0;
239  theProfile_dus = 0;
240  }
244  theProfile_dusg = (prov.bookProfile ( theBaseNameTitle + "_Profile_DUSG" , theBaseNameDescription + " dusg-jets" , theNBinsX , theLowerBoundX , theUpperBoundX , theNBinsY, theLowerBoundY, theUpperBoundY)) ;
245  } else{
246  theProfile_d = 0;
247  theProfile_u = 0;
248  theProfile_s = 0;
249  theProfile_c = 0;
250  theProfile_b = 0;
251  theProfile_g = 0;
252  theProfile_ni = 0;
253  theProfile_dus = 0;
254  theProfile_dusg = 0;
255  }
256  } else {
257  theProfile_all = 0;
258  theProfile_d = 0;
259  theProfile_u = 0;
260  theProfile_s = 0;
261  theProfile_c = 0;
262  theProfile_b = 0;
263  theProfile_g = 0;
264  theProfile_ni = 0;
265  theProfile_dus = 0;
266  theProfile_dusg = 0;
267  }
268  // statistics if requested
269  if ( theStatistics ) {
270  if(theHisto_all) theHisto_all ->getTH2F()->Sumw2() ;
271  if(createProfile)
272  if(theProfile_all) theProfile_all ->getTProfile()->Sumw2() ;
273  if (mcPlots_) {
274  if (mcPlots_>2) {
275  theHisto_d ->getTH2F()->Sumw2() ;
276  theHisto_u ->getTH2F()->Sumw2() ;
277  theHisto_s ->getTH2F()->Sumw2() ;
278  theHisto_g ->getTH2F()->Sumw2() ;
279  theHisto_dus ->getTH2F()->Sumw2() ;
280  }
281  theHisto_c ->getTH2F()->Sumw2() ;
282  theHisto_b ->getTH2F()->Sumw2() ;
283  theHisto_ni ->getTH2F()->Sumw2() ;
284  theHisto_dusg->getTH2F()->Sumw2() ;
285 
286  if(createProfile) {
287  if (mcPlots_>2) {
288  theProfile_d ->getTProfile()->Sumw2() ;
289  theProfile_u ->getTProfile()->Sumw2() ;
290  theProfile_s ->getTProfile()->Sumw2() ;
291  theProfile_g ->getTProfile()->Sumw2() ;
292  theProfile_dus ->getTProfile()->Sumw2() ;
293  }
294  theProfile_c ->getTProfile()->Sumw2() ;
295  theProfile_b ->getTProfile()->Sumw2() ;
296  theProfile_ni ->getTProfile()->Sumw2() ;
297  theProfile_dusg->getTProfile()->Sumw2() ;
298  }
299  }
300  }
301  } else {
302  HistoProviderDQM prov("Btag",folder);
303  if(theHisto_all) theHisto_all = prov.access(theBaseNameTitle + "ALL" ) ;
304  if (mcPlots_) {
305  if (mcPlots_>2) {
306  theHisto_d = prov.access(theBaseNameTitle + "D" ) ;
307  theHisto_u = prov.access(theBaseNameTitle + "U" ) ;
308  theHisto_s = prov.access(theBaseNameTitle + "S" ) ;
309  theHisto_g = prov.access(theBaseNameTitle + "G" ) ;
310  theHisto_dus = prov.access(theBaseNameTitle + "DUS" ) ;
311  }
312  theHisto_c = prov.access(theBaseNameTitle + "C" ) ;
313  theHisto_b = prov.access(theBaseNameTitle + "B" ) ;
314  theHisto_ni = prov.access(theBaseNameTitle + "NI" ) ;
315  theHisto_dusg = prov.access(theBaseNameTitle + "DUSG") ;
316  }
317 
318  if(createProfile_) {
319  if(theProfile_all) theProfile_all = prov.access(theBaseNameTitle + "_Profile_ALL");
320  if(mcPlots_) {
321  if (mcPlots_>2) {
322  theProfile_d = prov.access(theBaseNameTitle + "_Profile_D" ) ;
323  theProfile_u = prov.access(theBaseNameTitle + "_Profile_U" ) ;
324  theProfile_s = prov.access(theBaseNameTitle + "_Profile_S" ) ;
325  theProfile_g = prov.access(theBaseNameTitle + "_Profile_G" ) ;
326  theProfile_dus = prov.access(theBaseNameTitle + "_Profile_DUS" ) ;
327  }
328  theProfile_c = prov.access(theBaseNameTitle + "_Profile_C" ) ;
329  theProfile_b = prov.access(theBaseNameTitle + "_Profile_B" ) ;
330  theProfile_ni = prov.access(theBaseNameTitle + "_Profile_NI" ) ;
331  theProfile_dusg = prov.access(theBaseNameTitle + "_Profile_DUSG") ;
332  }
333  }
334  }
335 }
std::string theBaseNameDescription
MonitorElement * theProfile_s
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
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
#define update(a, b)
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 339 of file FlavourHistorgrams2D.h.

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

Definition at line 161 of file FlavourHistorgrams2D.h.

161 {}

Member Function Documentation

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

Definition at line 68 of file FlavourHistorgrams2D.h.

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

Definition at line 67 of file FlavourHistorgrams2D.h.

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

Definition at line 455 of file FlavourHistorgrams2D.h.

References MultipleCompare::Divide(), 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_s(), and FlavourHistograms2D< T, G >::histo_u().

Referenced by python.rootplot.utilities.Hist::__div__(), and cuy.FindIssue::__init__().

455  {
456  // divide histos using binomial errors
457  //
458  // ATTENTION: It's the responsability of the user to make sure that the HistoDescriptions
459  // involved in this operation have been constructed with the statistics option switched on!!
460  //
461  if(theHisto_all) theHisto_all ->getTH2F()-> Divide ( theHisto_all->getTH2F() , bHD.histo_all () , 1.0 , 1.0 , "b" ) ;
462  if (mcPlots_) {
463  if (mcPlots_>2) {
464  theHisto_d ->getTH2F()-> Divide ( theHisto_d ->getTH2F() , bHD.histo_d () , 1.0 , 1.0 , "b" ) ;
465  theHisto_u ->getTH2F()-> Divide ( theHisto_u ->getTH2F() , bHD.histo_u () , 1.0 , 1.0 , "b" ) ;
466  theHisto_s ->getTH2F()-> Divide ( theHisto_s ->getTH2F() , bHD.histo_s () , 1.0 , 1.0 , "b" ) ;
467  theHisto_g ->getTH2F()-> Divide ( theHisto_g ->getTH2F() , bHD.histo_g () , 1.0 , 1.0 , "b" ) ;
468  theHisto_dus ->getTH2F()-> Divide ( theHisto_dus->getTH2F() , bHD.histo_dus () , 1.0 , 1.0 , "b" ) ;
469  }
470  theHisto_c ->getTH2F()-> Divide ( theHisto_c ->getTH2F() , bHD.histo_c () , 1.0 , 1.0 , "b" ) ;
471  theHisto_b ->getTH2F()-> Divide ( theHisto_b ->getTH2F() , bHD.histo_b () , 1.0 , 1.0 , "b" ) ;
472  theHisto_ni ->getTH2F()-> Divide ( theHisto_ni->getTH2F() , bHD.histo_ni () , 1.0 , 1.0 , "b" ) ;
473  theHisto_dusg ->getTH2F()-> Divide ( theHisto_dusg->getTH2F() , bHD.histo_dusg() , 1.0 , 1.0 , "b" ) ;
474  }
475 }
MonitorElement * theHisto_g
TH2F * histo_all() const
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_dus
TH2F * histo_dusg() const
MonitorElement * theHisto_s
TH2F * histo_dus() const
TH2F * histo_ni() const
MonitorElement * theHisto_all
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
TH2F * getTH2F(void) const
MonitorElement * theHisto_b
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T, class G>
void FlavourHistograms2D< T, G >::fill ( const int &  flavour,
const T variableX,
const G &  variableY 
) const

Definition at line 360 of file FlavourHistorgrams2D.h.

References lumiContext::fill.

Referenced by TrackIPTagPlotter::analyzeTag(), and TagCorrelationPlotter::analyzeTags().

361 {
362  fill ( flavour , variableX , variableY , 1. ) ;
363 }
void fill(const int &flavour, const T &variableX, const G &variableY) const
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
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 353 of file FlavourHistorgrams2D.h.

354 {
355  // For single variables and arrays (for arrays only a single index can be filled)
356  fillVariable ( flavour , variableX , variableY , w ) ;
357 }
T w() const
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
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 394 of file FlavourHistorgrams2D.h.

References lumiContext::fill.

395 {
396  fill ( flavour, variableX , variableY , 1. );
397 }
void fill(const int &flavour, const T &variableX, const G &variableY) const
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
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 366 of file FlavourHistorgrams2D.h.

References i.

367 {
368  if ( theArrayDimension == 0 ) {
369  // single variable
370  fillVariable ( flavour , *variableX, *variableY , w) ;
371  } else {
372  // array
373  int iMax = *theArrayDimension ;
375  //
376  for ( int i = 0 ; i != iMax ; ++i ) {
377  // check if only one index to be plotted (<0: switched off -> plot all)
378  if ( ( theIndexToPlot < 0 ) || ( i == theIndexToPlot ) ) {
379  fillVariable ( flavour , *(variableX+i) , *(variableY+i) , w) ;
380  }
381  }
382 
383  // if single index to be filled but not enough entries: fill 0.0 (convention!)
384  if ( theIndexToPlot >= iMax ) {
385  // cout << "==>> The index to be filled is too big -> fill 0.0 : " << theBaseNameTitle << " : " << theIndexToPlot << " >= " << iMax << endl ;
386  const T& theZeroT = static_cast<T> ( 0.0) ;
387  const G& theZeroG = static_cast<T> ( 0.0 );
388  fillVariable ( flavour , theZeroT , theZeroG , w ) ;
389  }
390  }
391 }
int i
Definition: DBlmapReader.cc:9
T w() const
long double T
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
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 479 of file FlavourHistorgrams2D.h.

479  {
480  // all
481  if(theHisto_all) theHisto_all->Fill ( varX, varY,w ) ;
482  if(createProfile_)
483  //if(theProfile_all) theProfile_all->Fill( varX, varY, w );
484  if(theProfile_all) theProfile_all->Fill( varX, varY);
485 
486  //exit(-1);
487  // flavour specific
488  if (!mcPlots_) return;
489 
490  switch( flavour ) {
491  case 1:
492  if (mcPlots_>2) {
493  theHisto_d->Fill( varX, varY,w );
494  theHisto_dus->Fill( varX, varY,w );
495  }
496  theHisto_dusg->Fill( varX, varY,w );
497  if(createProfile_) {
498  //theProfile_d->Fill(varX, varY,w);
499  //theProfile_dus->Fill(varX, varY,w);
500  //theProfile_dusg->Fill(varX, varY,w);
501  if (mcPlots_>2) {
502  theProfile_d->Fill(varX, varY);
503  theProfile_dus->Fill(varX, varY);
504  }
505  theProfile_dusg->Fill(varX, varY);
506  }
507  return;
508  case 2:
509  if (mcPlots_>2) {
510  theHisto_u->Fill( varX, varY,w );
511  theHisto_dus->Fill( varX, varY,w );
512  }
513  theHisto_dusg->Fill( varX, varY,w );
514  if(createProfile_) {
515  //theProfile_u->Fill(varX, varY,w);
516  //theProfile_dus->Fill(varX, varY,w);
517  //theProfile_dusg->Fill(varX, varY,w);
518  if (mcPlots_>2) {
519  theProfile_u->Fill(varX, varY);
520  theProfile_dus->Fill(varX, varY);
521  }
522  theProfile_dusg->Fill(varX, varY);
523  }
524  return;
525  case 3:
526  if (mcPlots_>2) {
527  theHisto_s->Fill( varX, varY,w );
528  theHisto_dus->Fill( varX, varY,w );
529  }
530  theHisto_dusg->Fill( varX, varY,w );
531  if(createProfile_) {
532  //theProfile_s->Fill(varX, varY,w);
533  //theProfile_dus->Fill(varX, varY,w);
534  //theProfile_dusg->Fill(varX, varY,w);
535  if (mcPlots_>2) {
536  theProfile_s->Fill(varX, varY);
537  theProfile_dus->Fill(varX, varY);
538  }
539  theProfile_dusg->Fill(varX, varY);
540  }
541  return;
542  case 4:
543  theHisto_c->Fill( varX, varY,w );
544  //if(createProfile_) theProfile_c->Fill(varX, varY,w);
545  if(createProfile_) theProfile_c->Fill(varX, varY);
546  return;
547  case 5:
548  theHisto_b->Fill( varX, varY,w );
549  //if(createProfile_) theProfile_b->Fill(varX, varY,w);
550  if(createProfile_) theProfile_b->Fill(varX, varY);
551  return;
552  case 21:
553  if (mcPlots_>2) theHisto_g->Fill( varX, varY,w );
554  theHisto_dusg->Fill( varX, varY,w );
555  if(createProfile_) {
556  //theProfile_g->Fill(varX, varY,w);
557  //theProfile_dusg->Fill(varX, varY,w);
558  if (mcPlots_>2) theProfile_g->Fill(varX, varY);
559  theProfile_dusg->Fill(varX, varY);
560  }
561  return;
562  default:
563  theHisto_ni->Fill( varX, varY,w );
564  //if(createProfile_) theProfile_ni->Fill(varX, varY,w);
565  if(createProfile_) theProfile_ni->Fill(varX, varY);
566  return;
567  }
568 }
MonitorElement * theProfile_s
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
void Fill(long long x)
MonitorElement * theHisto_c
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
T w() const
MonitorElement * theProfile_g
MonitorElement * theHisto_b
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
MonitorElement * theHisto_ni
MonitorElement * theHisto_d
template<class T , class G >
std::vector< TH2F * > FlavourHistograms2D< T, G >::getHistoVector ( ) const

Definition at line 571 of file FlavourHistorgrams2D.h.

References getTH2F().

572 {
573  std::vector<TH2F*> histoVector;
574  if(theHisto_all) histoVector.push_back ( theHisto_all->getTH2F() );
575  if (mcPlots_) {
576  if (mcPlots_>2) {
577  histoVector.push_back ( theHisto_d->getTH2F() );
578  histoVector.push_back ( theHisto_u->getTH2F() );
579  histoVector.push_back ( theHisto_s->getTH2F() );
580  histoVector.push_back ( theHisto_g ->getTH2F() );
581  histoVector.push_back ( theHisto_dus->getTH2F() );
582  }
583  histoVector.push_back ( theHisto_c->getTH2F() );
584  histoVector.push_back ( theHisto_b->getTH2F() );
585  histoVector.push_back ( theHisto_ni->getTH2F() );
586  histoVector.push_back ( theHisto_dusg->getTH2F());
587  }
588  return histoVector;
589 }
MonitorElement * theHisto_g
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
MonitorElement * theHisto_dus
MonitorElement * theHisto_s
MonitorElement * theHisto_all
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
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 592 of file FlavourHistorgrams2D.h.

References getTProfile().

593 {
594  std::vector<TProfile*> profileVector;
595  if(createProfile_) {
596  if(theProfile_all) profileVector.push_back ( theProfile_all->getTProfile() );
597  if (mcPlots_) {
598  if (mcPlots_>2) {
599  profileVector.push_back ( theProfile_d->getTProfile() );
600  profileVector.push_back ( theProfile_u->getTProfile() );
601  profileVector.push_back ( theProfile_s->getTProfile() );
602  profileVector.push_back ( theProfile_g ->getTProfile() );
603  profileVector.push_back ( theProfile_dus->getTProfile() );
604  }
605  profileVector.push_back ( theProfile_c->getTProfile() );
606  profileVector.push_back ( theProfile_b->getTProfile() );
607  profileVector.push_back ( theProfile_ni->getTProfile() );
608  profileVector.push_back ( theProfile_dusg->getTProfile());
609  }
610  }
611  return profileVector;
612 }
MonitorElement * theProfile_s
TProfile * getTProfile(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
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 78 of file FlavourHistorgrams2D.h.

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

78 { 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 83 of file FlavourHistorgrams2D.h.

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

83 { 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 82 of file FlavourHistorgrams2D.h.

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

82 { 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 79 of file FlavourHistorgrams2D.h.

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

79 { 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 86 of file FlavourHistorgrams2D.h.

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

86 { 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 87 of file FlavourHistorgrams2D.h.

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

87 { 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 84 of file FlavourHistorgrams2D.h.

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

84 { 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 85 of file FlavourHistorgrams2D.h.

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

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

Definition at line 81 of file FlavourHistorgrams2D.h.

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

81 { 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 80 of file FlavourHistorgrams2D.h.

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

80 { 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 71 of file FlavourHistorgrams2D.h.

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

Definition at line 73 of file FlavourHistorgrams2D.h.

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

Definition at line 69 of file FlavourHistorgrams2D.h.

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

Definition at line 70 of file FlavourHistorgrams2D.h.

70 { return theNBinsY ; }
template<class T, class G>
TProfile* FlavourHistograms2D< T, G >::profile_all ( ) const
inline

Definition at line 89 of file FlavourHistorgrams2D.h.

89 { 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 94 of file FlavourHistorgrams2D.h.

94 { 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 93 of file FlavourHistorgrams2D.h.

93 { 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 90 of file FlavourHistorgrams2D.h.

90 { 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 97 of file FlavourHistorgrams2D.h.

97 { 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 98 of file FlavourHistorgrams2D.h.

98 { 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 95 of file FlavourHistorgrams2D.h.

95 { 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 96 of file FlavourHistorgrams2D.h.

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

Definition at line 92 of file FlavourHistorgrams2D.h.

92 { 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 91 of file FlavourHistorgrams2D.h.

91 { return theProfile_u->getTProfile() ; }
MonitorElement * theProfile_u
TProfile * getTProfile(void) const
template<class T, class G>
void FlavourHistograms2D< T, G >::SetMaximum ( const double &  max)
inline

Definition at line 62 of file FlavourHistorgrams2D.h.

62 { theMax = max;}
const T & max(const T &a, const T &b)
template<class T, class G>
void FlavourHistograms2D< T, G >::SetMinimum ( const double &  min)
inline

Definition at line 63 of file FlavourHistorgrams2D.h.

template<class T , class G >
void FlavourHistograms2D< T, G >::settitle ( const char *  titleX,
const char *  titleY 
)

Definition at line 400 of file FlavourHistorgrams2D.h.

Referenced by TagCorrelationPlotter::TagCorrelationPlotter().

400  {
401  if(theHisto_all) theHisto_all ->setAxisTitle(titleX) ;
402  if(theHisto_all) theHisto_all ->setAxisTitle(titleY, 2) ;
403  if (mcPlots_) {
404 
405  if(theHisto_d) theHisto_d ->setAxisTitle(titleX) ;
406  if(theHisto_u) theHisto_u ->setAxisTitle(titleX) ;
407  if(theHisto_s) theHisto_s ->setAxisTitle(titleX) ;
408  if(theHisto_c) theHisto_c ->setAxisTitle(titleX) ;
409  if(theHisto_b) theHisto_b ->setAxisTitle(titleX) ;
410  if(theHisto_g) theHisto_g ->setAxisTitle(titleX) ;
411  if(theHisto_ni) theHisto_ni ->setAxisTitle(titleX) ;
412  if(theHisto_dus) theHisto_dus ->setAxisTitle(titleX) ;
414  if(theHisto_d) theHisto_d ->setAxisTitle(titleY, 2) ;
415  if(theHisto_u) theHisto_u ->setAxisTitle(titleY, 2) ;
416  if(theHisto_s) theHisto_s ->setAxisTitle(titleY, 2) ;
417  if(theHisto_c) theHisto_c ->setAxisTitle(titleY, 2) ;
418  if(theHisto_b) theHisto_b ->setAxisTitle(titleY, 2) ;
419  if(theHisto_g) theHisto_g ->setAxisTitle(titleY, 2) ;
420  if(theHisto_ni) theHisto_ni ->setAxisTitle(titleY, 2) ;
421  if(theHisto_dus) theHisto_dus ->setAxisTitle(titleY, 2) ;
422  if(theHisto_dusg)theHisto_dusg->setAxisTitle(titleY, 2) ;
423  }
424 
425  if(createProfile_) {
427  if(theProfile_all) theProfile_all ->setAxisTitle(titleY, 2) ;
428  if (mcPlots_) {
429 
430  if(theProfile_d) theProfile_d ->setAxisTitle(titleX) ;
431  if(theProfile_u) theProfile_u ->setAxisTitle(titleX) ;
432  if(theProfile_s) theProfile_s ->setAxisTitle(titleX) ;
433  if(theProfile_c) theProfile_c ->setAxisTitle(titleX) ;
434  if(theProfile_b) theProfile_b ->setAxisTitle(titleX) ;
435  if(theProfile_g) theProfile_g ->setAxisTitle(titleX) ;
439  if(theProfile_d) theProfile_d ->setAxisTitle(titleY, 2) ;
440  if(theProfile_u) theProfile_u ->setAxisTitle(titleY, 2) ;
441  if(theProfile_s) theProfile_s ->setAxisTitle(titleY, 2) ;
442  if(theProfile_c) theProfile_c ->setAxisTitle(titleY, 2) ;
443  if(theProfile_b) theProfile_b ->setAxisTitle(titleY, 2) ;
444  if(theProfile_g) theProfile_g ->setAxisTitle(titleY, 2) ;
445  if(theProfile_ni) theProfile_ni ->setAxisTitle(titleY, 2) ;
446  if(theProfile_dus) theProfile_dus ->setAxisTitle(titleY, 2) ;
448  }
449  }
450 }
MonitorElement * theProfile_s
MonitorElement * theHisto_g
MonitorElement * theProfile_dusg
MonitorElement * theHisto_dusg
MonitorElement * theHisto_u
MonitorElement * theHisto_c
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 75 of file FlavourHistorgrams2D.h.

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

Definition at line 72 of file FlavourHistorgrams2D.h.

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

Definition at line 74 of file FlavourHistorgrams2D.h.

74 { 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_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 119 of file FlavourHistorgrams2D.h.

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 118 of file FlavourHistorgrams2D.h.

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_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