![]() |
![]() |
#include <DQMOffline/RecoB/interface/EtaPtBin.h>
Public Member Functions | |
EtaPtBin (bool etaActive_, double etaMin_, double etaMax_, bool ptActive_, double ptMin_, double ptMax_) | |
EtaPtBin (bool etaActive_, double etaMin_, double etaMax_, bool ptActive_, double ptMin_, double ptMax_) | |
TString | getDescriptionString () const |
String describes rapidity/pt range. | |
TString | getDescriptionString () const |
String describes rapidity/pt range. | |
bool | getEtaActive () const |
Get rapidity/pt ranges and check whether rapidity/pt cuts are active. | |
bool | getEtaActive () const |
Get rapidity/pt ranges and check whether rapidity/pt cuts are active. | |
double | getEtaMax () const |
double | getEtaMax () const |
double | getEtaMin () const |
double | getEtaMin () const |
bool | getPtActive () const |
bool | getPtActive () const |
double | getPtMax () const |
double | getPtMax () const |
double | getPtMin () const |
double | getPtMin () const |
bool | inBin (const reco::Jet &jet) const |
bool | inBin (const double &eta, const double &pt) const |
Check if jet/parton are within rapidity/pt cuts. | |
bool | inBin (const reco::Jet &jet) const |
bool | inBin (const double &eta, const double &pt) const |
Check if jet/parton are within rapidity/pt cuts. | |
~EtaPtBin () | |
~EtaPtBin () | |
Static Public Member Functions | |
static TString | buildDescriptionString (bool etaActive_, double etaMin_, double etaMax_, bool ptActive_, double ptMin_, double ptMax_) |
method to build the string from other quantities (static for easy external use) | |
static TString | buildDescriptionString (bool etaActive_, double etaMin_, double etaMax_, bool ptActive_, double ptMin_, double ptMax_) |
method to build the string from other quantities (static for easy external use) | |
Private Attributes | |
TString | descriptionString |
bool | etaActive |
double | etaMax |
double | etaMin |
bool | ptActive |
double | ptMax |
double | ptMin |
Definition at line 14 of file EtaPtBin.h.
EtaPtBin::EtaPtBin | ( | bool | etaActive_, | |
double | etaMin_, | |||
double | etaMax_, | |||
bool | ptActive_, | |||
double | ptMin_, | |||
double | ptMax_ | |||
) |
Definition at line 6 of file EtaPtBin.cc.
References buildDescriptionString(), descriptionString, etaActive, etaMax, etaMin, ptActive, ptMax, and ptMin.
00008 : etaActive ( etaActive_ ) , etaMin ( etaMin_ ) , etaMax ( etaMax_ ) , 00009 ptActive ( ptActive_ ) , ptMin ( ptMin_ ) , ptMax ( ptMax_ ) { 00010 00011 descriptionString = buildDescriptionString ( etaActive , etaMin , etaMax , 00012 ptActive , ptMin , ptMax ); 00013 }
EtaPtBin::~EtaPtBin | ( | ) | [inline] |
EtaPtBin::EtaPtBin | ( | bool | etaActive_, | |
double | etaMin_, | |||
double | etaMax_, | |||
bool | ptActive_, | |||
double | ptMin_, | |||
double | ptMax_ | |||
) |
EtaPtBin::~EtaPtBin | ( | ) | [inline] |
static TString EtaPtBin::buildDescriptionString | ( | bool | etaActive_, | |
double | etaMin_, | |||
double | etaMax_, | |||
bool | ptActive_, | |||
double | ptMin_, | |||
double | ptMax_ | |||
) | [static] |
method to build the string from other quantities (static for easy external use)
TString EtaPtBin::buildDescriptionString | ( | bool | etaActive_, | |
double | etaMin_, | |||
double | etaMax_, | |||
bool | ptActive_, | |||
double | ptMin_, | |||
double | ptMax_ | |||
) | [static] |
method to build the string from other quantities (static for easy external use)
Definition at line 18 of file EtaPtBin.cc.
Referenced by EtaPtBin().
00020 { 00021 // create string only from the active parts 00022 TString descr ( "" ); 00023 00024 if ( etaActive_ ) { 00025 descr += "_ETA_"; 00026 descr += etaMin_; 00027 descr += "-"; 00028 descr += etaMax_; 00029 } 00030 00031 if ( ptActive_ ) { 00032 descr += "_PT_"; 00033 descr += ptMin_; 00034 descr += "-"; 00035 descr += ptMax_; 00036 } 00037 if (!(etaActive_||ptActive_)) descr="_GLOBAL"; 00038 // remove blanks which are introduced when adding doubles 00039 descr.ReplaceAll ( " " , "" ); 00040 descr.ReplaceAll ( "." , "v" ); 00041 00042 return descr; 00043 }
TString EtaPtBin::getDescriptionString | ( | ) | const [inline] |
String describes rapidity/pt range.
Definition at line 24 of file EtaPtBin.h.
References descriptionString.
00024 { return descriptionString ; }
TString EtaPtBin::getDescriptionString | ( | ) | const [inline] |
String describes rapidity/pt range.
Definition at line 24 of file EtaPtBin.h.
References descriptionString.
00024 { return descriptionString ; }
bool EtaPtBin::getEtaActive | ( | ) | const [inline] |
Get rapidity/pt ranges and check whether rapidity/pt cuts are active.
Definition at line 34 of file EtaPtBin.h.
References etaActive.
00034 { return etaActive ; }
bool EtaPtBin::getEtaActive | ( | ) | const [inline] |
Get rapidity/pt ranges and check whether rapidity/pt cuts are active.
Definition at line 34 of file EtaPtBin.h.
References etaActive.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00034 { return etaActive ; }
double EtaPtBin::getEtaMax | ( | ) | const [inline] |
double EtaPtBin::getEtaMax | ( | ) | const [inline] |
Definition at line 36 of file EtaPtBin.h.
References etaMax.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00036 { return etaMax ; }
double EtaPtBin::getEtaMin | ( | ) | const [inline] |
double EtaPtBin::getEtaMin | ( | ) | const [inline] |
Definition at line 35 of file EtaPtBin.h.
References etaMin.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00035 { return etaMin ; }
bool EtaPtBin::getPtActive | ( | ) | const [inline] |
bool EtaPtBin::getPtActive | ( | ) | const [inline] |
Definition at line 38 of file EtaPtBin.h.
References ptActive.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00038 { return ptActive ; }
double EtaPtBin::getPtMax | ( | ) | const [inline] |
double EtaPtBin::getPtMax | ( | ) | const [inline] |
Definition at line 40 of file EtaPtBin.h.
References ptMax.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00040 { return ptMax ; }
double EtaPtBin::getPtMin | ( | ) | const [inline] |
double EtaPtBin::getPtMin | ( | ) | const [inline] |
Definition at line 39 of file EtaPtBin.h.
References ptMin.
Referenced by BTagDifferentialPlot::bookHisto(), and BTagDifferentialPlot::fillHisto().
00039 { return ptMin ; }
bool EtaPtBin::inBin | ( | const double & | eta, | |
const double & | pt | |||
) | const |
Check if jet/parton are within rapidity/pt cuts.
Definition at line 45 of file EtaPtBin.cc.
References reco::Particle::eta(), inBin(), and reco::Particle::pt().
bool EtaPtBin::inBin | ( | const double & | eta, | |
const double & | pt | |||
) | const |
Check if jet/parton are within rapidity/pt cuts.
Definition at line 57 of file EtaPtBin.cc.
References etaActive, etaMax, etaMin, ptActive, ptMax, and ptMin.
Referenced by inBin().
00057 { 00058 bool inEta = true; 00059 // 00060 if ( etaActive ) { 00061 if ( fabs(eta) < etaMin ) inEta = false; 00062 if ( fabs(eta) > etaMax ) inEta = false; 00063 } 00064 00065 bool inPt = true; 00066 // 00067 if ( ptActive ) { 00068 if ( pt < ptMin ) inPt = false; 00069 if ( pt > ptMax ) inEta = false; 00070 } 00071 00072 return ( inEta && inPt ); 00073 }
TString EtaPtBin::descriptionString [private] |
bool EtaPtBin::etaActive [private] |
double EtaPtBin::etaMax [private] |
double EtaPtBin::etaMin [private] |
bool EtaPtBin::ptActive [private] |
double EtaPtBin::ptMax [private] |
double EtaPtBin::ptMin [private] |