File indexing completed on 2023-03-17 10:46:34
0001 #ifndef BTagCalibration_H
0002 #define BTagCalibration_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <map>
0019 #include <vector>
0020 #include <string>
0021 #include <istream>
0022 #include <ostream>
0023
0024 #include "CondFormats/Serialization/interface/Serializable.h"
0025 #include "CondFormats/BTauObjects/interface/BTagEntry.h"
0026
0027 class BTagCalibration {
0028 public:
0029 BTagCalibration() {}
0030 BTagCalibration(const std::string &tagger);
0031 BTagCalibration(const std::string &tagger, const std::string &filename, bool validate);
0032 ~BTagCalibration() {}
0033
0034 std::string tagger() const { return tagger_; }
0035
0036 void addEntry(const BTagEntry &entry);
0037 const std::vector<BTagEntry> &getEntries(const BTagEntry::Parameters &par) const;
0038
0039 void readCSV(std::istream &s, bool validate);
0040 void readCSV(const std::string &s, bool validate);
0041 void makeCSV(std::ostream &s) const;
0042 std::string makeCSV() const;
0043
0044 protected:
0045 static std::string token(const BTagEntry::Parameters &par);
0046
0047 std::string tagger_;
0048 std::map<std::string, std::vector<BTagEntry> > data_;
0049
0050 COND_SERIALIZABLE;
0051 };
0052
0053 #endif