CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EtaPtBin.h
Go to the documentation of this file.
1 #ifndef EtaPtBin_H
2 #define EtaPtBin_H
3 
4 #include <string>
5 
7 // #include "RecoBTag/MCTools/interface/JetFlavour.h"
8 
15 class EtaPtBin {
16 
17  public:
18 
19  EtaPtBin(const bool& etaActive_ , const double& etaMin_ , const double& etaMax_ ,
20  const bool& ptActive_ , const double& ptMin_ , const double& ptMax_ ) ;
21 
22  ~EtaPtBin () {} ;
23 
25  std::string getDescriptionString () const { return descriptionString ; }
26 
29  static std::string buildDescriptionString
30  ( const bool& etaActive_ , const double& etaMin_ , const double& etaMax_ ,
31  const bool& ptActive_ , const double& ptMin_ , const double& ptMax_ ) ; // pt
32 
33 
35  bool getEtaActive () const { return etaActive ; }
36  double getEtaMin () const { return etaMin ; }
37  double getEtaMax () const { return etaMax ; }
38 
39  bool getPtActive () const { return ptActive ; }
40  double getPtMin () const { return ptMin ; }
41  double getPtMax () const { return ptMax ; }
42 
43 
45  bool inBin(const double & eta , const double & pt) const;
46  bool inBin(const reco::Jet & jet) const;
47 // bool inBin(const BTagMCTools::JetFlavour & jetFlavour) const;
48 
49  private:
50 
51  // definition of the bin
52 
53  bool etaActive ; // should cuts be applied?
54  double etaMin ;
55  double etaMax ;
56 
57  bool ptActive ; // should cuts be applied?
58  double ptMin ;
59  double ptMax ;
60 
61 
62  // description string as built from bin definition
63  std::string descriptionString ;
64 
65 
66 } ;
67 
68 
69 #endif
std::string getDescriptionString() const
String describes rapidity/pt range.
Definition: EtaPtBin.h:25
Base class for all types of Jets.
Definition: Jet.h:21
double ptMin
Definition: EtaPtBin.h:58
std::string descriptionString
Definition: EtaPtBin.h:63
double getEtaMax() const
Definition: EtaPtBin.h:37
static std::string buildDescriptionString(const bool &etaActive_, const double &etaMin_, const double &etaMax_, const bool &ptActive_, const double &ptMin_, const double &ptMax_)
Definition: EtaPtBin.cc:21
double getEtaMin() const
Definition: EtaPtBin.h:36
double getPtMin() const
Definition: EtaPtBin.h:40
T eta() const
bool getEtaActive() const
Get rapidity/pt ranges and check whether rapidity/pt cuts are active.
Definition: EtaPtBin.h:35
bool getPtActive() const
Definition: EtaPtBin.h:39
bool inBin(const double &eta, const double &pt) const
Check if jet/parton are within rapidity/pt cuts.
Definition: EtaPtBin.cc:56
double etaMax
Definition: EtaPtBin.h:55
double etaMin
Definition: EtaPtBin.h:54
double getPtMax() const
Definition: EtaPtBin.h:41
EtaPtBin(const bool &etaActive_, const double &etaMin_, const double &etaMax_, const bool &ptActive_, const double &ptMin_, const double &ptMax_)
Definition: EtaPtBin.cc:9
bool ptActive
Definition: EtaPtBin.h:57
bool etaActive
Definition: EtaPtBin.h:53
double ptMax
Definition: EtaPtBin.h:59
~EtaPtBin()
Definition: EtaPtBin.h:22