File indexing completed on 2024-04-06 12:01:56
0001 #ifndef BTagEntry_H
0002 #define BTagEntry_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <string>
0019 #include <TF1.h>
0020 #include <TH1.h>
0021
0022 #include "CondFormats/Serialization/interface/Serializable.h"
0023
0024 class BTagEntry {
0025 public:
0026 enum OperatingPoint {
0027 OP_LOOSE = 0,
0028 OP_MEDIUM = 1,
0029 OP_TIGHT = 2,
0030 OP_RESHAPING = 3,
0031 };
0032 enum JetFlavor {
0033 FLAV_B = 0,
0034 FLAV_C = 1,
0035 FLAV_UDSG = 2,
0036 };
0037 struct Parameters {
0038 OperatingPoint operatingPoint;
0039 std::string measurementType;
0040 std::string sysType;
0041 JetFlavor jetFlavor;
0042 float etaMin;
0043 float etaMax;
0044 float ptMin;
0045 float ptMax;
0046 float discrMin;
0047 float discrMax;
0048
0049
0050 Parameters(OperatingPoint op = OP_TIGHT,
0051 std::string measurement_type = "comb",
0052 std::string sys_type = "central",
0053 JetFlavor jf = FLAV_B,
0054 float eta_min = -99999.,
0055 float eta_max = 99999.,
0056 float pt_min = 0.,
0057 float pt_max = 99999.,
0058 float discr_min = 0.,
0059 float discr_max = 99999.);
0060
0061 COND_SERIALIZABLE;
0062 };
0063
0064 BTagEntry() {}
0065 BTagEntry(const std::string& csvLine, bool validate);
0066 BTagEntry(const std::string& func, Parameters p);
0067 BTagEntry(const TF1* func, Parameters p);
0068 BTagEntry(const TH1* histo, Parameters p);
0069 ~BTagEntry() {}
0070 static std::string makeCSVHeader();
0071 std::string makeCSVLine() const;
0072 static std::string trimStr(std::string str);
0073
0074
0075 std::string formula;
0076 Parameters params;
0077
0078 COND_SERIALIZABLE;
0079 };
0080
0081 #endif