1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef EtaPtBin_H
#define EtaPtBin_H
#include <string>
#include "DataFormats/JetReco/interface/Jet.h"
// #include "RecoBTag/MCTools/interface/JetFlavour.h"
/** \class EtaPtBin
*
* Decide if jet/parton lie within desired abs(pseudo-rapidity)/pt range.
*
*/
class EtaPtBin {
public:
EtaPtBin(const bool& etaActive_,
const double& etaMin_,
const double& etaMax_,
const bool& ptActive_,
const double& ptMin_,
const double& ptMax_);
~EtaPtBin() {}
/// String describes rapidity/pt range.
std::string getDescriptionString() const { return descriptionString; }
/// method to build the string from other quantities
/// (static for easy external use)
static std::string buildDescriptionString(const bool& etaActive_,
const double& etaMin_,
const double& etaMax_,
const bool& ptActive_,
const double& ptMin_,
const double& ptMax_); // pt
/// Get rapidity/pt ranges and check whether rapidity/pt cuts are active.
bool getEtaActive() const { return etaActive; }
double getEtaMin() const { return etaMin; }
double getEtaMax() const { return etaMax; }
bool getPtActive() const { return ptActive; }
double getPtMin() const { return ptMin; }
double getPtMax() const { return ptMax; }
/// Check if jet/parton are within rapidity/pt cuts.
bool inBin(const double& eta, const double& pt) const;
bool inBin(const reco::Jet& jet, const double jec) const;
// bool inBin(const BTagMCTools::JetFlavour & jetFlavour) const;
private:
// definition of the bin
bool etaActive; // should cuts be applied?
double etaMin;
double etaMax;
bool ptActive; // should cuts be applied?
double ptMin;
double ptMax;
// description string as built from bin definition
std::string descriptionString;
};
#endif
|