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
|
#ifndef BTagCalibration_H
#define BTagCalibration_H
/**
* BTagCalibration
*
* The 'hierarchy' of stored information is this:
* - by tagger (BTagCalibration)
* - by operating point or reshape bin
* - by jet parton flavor
* - by type of measurement
* - by systematic
* - by eta bin
* - as 1D-function dependent of pt or discriminant
*
************************************************************/
#include <map>
#include <vector>
#include <string>
#include <istream>
#include <ostream>
#include "CondFormats/Serialization/interface/Serializable.h"
#include "CondFormats/BTauObjects/interface/BTagEntry.h"
class BTagCalibration {
public:
BTagCalibration() {}
BTagCalibration(const std::string &tagger);
BTagCalibration(const std::string &tagger, const std::string &filename, bool validate);
~BTagCalibration() {}
std::string tagger() const { return tagger_; }
void addEntry(const BTagEntry &entry);
const std::vector<BTagEntry> &getEntries(const BTagEntry::Parameters &par) const;
void readCSV(std::istream &s, bool validate);
void readCSV(const std::string &s, bool validate);
void makeCSV(std::ostream &s) const;
std::string makeCSV() const;
protected:
static std::string token(const BTagEntry::Parameters &par);
std::string tagger_;
std::map<std::string, std::vector<BTagEntry> > data_;
COND_SERIALIZABLE;
};
#endif // BTagCalibration_H
|