2 #ifndef FlavourHistograms2D_H 3 #define FlavourHistograms2D_H 29 template <
class T,
class G>
35 int nBinsX_ ,
double lowerBoundX_ ,
double upperBoundX_ ,
36 int nBinsY_ ,
double lowerBoundY_ ,
double upperBoundY_ ,
41 int nBinsX_ ,
double lowerBoundX_ ,
double upperBoundX_ ,
42 int nBinsY_ ,
double lowerBoundY_ ,
double upperBoundY_ ,
43 bool statistics_ ,
std::string folder,
unsigned int mc,
54 void fill (
const int &
flavour,
const T & variableX,
const G & variableY)
const;
55 void fill (
const int & flavour,
const T & variableX,
const G & variableY,
const float &
w)
const;
58 void fill (
const int & flavour,
const T * variableX,
const G * variableY)
const;
59 void fill (
const int & flavour,
const T * variableX,
const G * variableY,
const float & w)
const;
62 void settitle(
const char* titleX,
const char* titleY) ;
64 void plot (TPad * theCanvas = 0) ;
120 void fillVariable (
const int & flavour ,
const T & varX ,
const G & varY ,
const float & w)
const;
184 template <
class T,
class G>
186 int nBinsX_ ,
double lowerBoundX_ ,
double upperBoundX_ ,
288 template <
class T,
class G>
290 int nBinsX_ ,
double lowerBoundX_ ,
double upperBoundX_ ,
291 int nBinsY_ ,
double lowerBoundY_ ,
double upperBoundY_ ,
425 template <
class T,
class G>
429 template <
class T,
class G>
void 436 template <
class T,
class G>
void 439 fill ( flavour , variableX , variableY , 1. ) ;
442 template <
class T,
class G>
void 453 for (
int i = 0 ;
i != iMax ; ++
i ) {
463 const T& theZeroT =
static_cast<T> ( 0.0) ;
464 const G& theZeroG =
static_cast<T> ( 0.0 );
470 template <
class T,
class G>
void 473 fill ( flavour, variableX , variableY , 1. );
476 template <
class T,
class G>
531 template <
class T,
class G>
536 bool btppColour =
true;
542 gPad->UseCurrentStyle();
543 gPad->SetLogy ( 0 ) ;
544 gPad->SetGridx ( 0 ) ;
545 gPad->SetGridy ( 0 ) ;
546 gPad->SetTitle ( 0 ) ;
552 const double markerSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
579 markerStyle[0] = 20 ;
580 markerStyle[1] = 21 ;
581 markerStyle[2] = 22 ;
582 markerStyle[3] = 23 ;
594 markerStyle[0] = 20 ;
595 markerStyle[1] = 21 ;
596 markerStyle[2] = 22 ;
597 markerStyle[3] = 23 ;
601 histo[0] ->
getTH2F()->GetYaxis()->SetTitle (
"Arbitrary Units" ) ;
602 histo[0] ->
getTH2F()->GetYaxis()->SetTitleOffset(1.25) ;
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 ) ;
615 histo[0]->
getTH2F()->SetMaximum(max*1.05);
618 histo[1]->
getTH2F()->Draw(
"Same") ;
619 histo[2]->
getTH2F()->Draw(
"Same") ;
620 if ( histo[3] != 0 ) histo[3]->
getTH2F()->Draw(
"Same") ;
624 template <
class T,
class G>
635 template <
class T,
class G>
659 template <
class T,
class G>
678 template <
class T,
class G>
775 template <
class T,
class G>
778 std::vector<TH2F*> histoVector;
785 histoVector.push_back (
theHisto_g ->getTH2F() );
797 template <
class T,
class G>
800 std::vector<TProfile*> profileVector;
808 profileVector.push_back (
theProfile_g ->getTProfile() );
818 return profileVector;
TProfile * profile_c() const
std::string theBaseNameDescription
MonitorElement * theProfile_s
MonitorElement * theProfile_pu
double lowerBoundX() const
double lowerBoundY() const
MonitorElement * theHisto_g
void SetMaximum(const double &max)
MonitorElement * theProfile_dusg
void settitle(const char *titleX, const char *titleY)
MonitorElement * theHisto_dusg
MonitorElement * get(const std::string &path)
MonitorElement * theHisto_u
virtual MonitorElement * bookProfile(const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
TProfile * profile_pu() const
virtual MonitorElement * book2D(const std::string &name, const std::string &title, const int &nchX, const double &lowX, const double &highX, const int &nchY, const double &lowY, const double &highY)
void plot(TPad *theCanvas=0)
virtual ~FlavourHistograms2D()
std::string baseNameTitle() const
TProfile * profile_b() const
std::string theBaseNameTitle
void divide(const FlavourHistograms2D< T, G > &bHD) const
MonitorElement * theHisto_c
MonitorElement * theHisto_pu
void fill(const int &flavour, const T &variableX, const G &variableY) const
MonitorElement * theProfile_all
MonitorElement * theProfile_ni
MonitorElement * theHisto_dus
TH2F * histo_dusg() const
MonitorElement * theProfile_u
MonitorElement * theHisto_s
std::vector< TProfile * > getProfileVector() const
TProfile * profile_u() const
TProfile * profile_all() const
MonitorElement * theProfile_b
void SetMinimum(const double &min)
MonitorElement * theProfile_c
double upperBoundX() const
std::vector< TH2F * > getHistoVector() const
MonitorElement * theProfile_d
std::string baseNameDescription() const
TProfile * profile_d() const
MonitorElement * theProfile_dus
MonitorElement * theHisto_all
TProfile * profile_ni() const
void epsPlot(const std::string &name)
TProfile * getTProfile(void) const
TProfile * profile_s() const
void setEfficiencyFlag(void)
TH2F * getTH2F(void) const
MonitorElement * theProfile_g
TProfile * profile_dusg() const
double upperBoundY() const
MonitorElement * theHisto_b
TProfile * profile_dus() const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void fillVariable(const int &flavour, const T &varX, const G &varY, const float &w) const
TProfile * profile_g() const
MonitorElement * theHisto_ni
MonitorElement * theHisto_d