Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:43

0001 #ifndef BTagCalibrationReader_H
0002 #define BTagCalibrationReader_H
0003 
0004 /**
0005  * BTagCalibrationReader
0006  *
0007  * Helper class to pull out a specific set of BTagEntry's out of a
0008  * BTagCalibration. TF1 functions are set up at initialization time.
0009  *
0010  ************************************************************/
0011 
0012 #include <memory>
0013 #include <string>
0014 
0015 #include "CondFormats/BTauObjects/interface/BTagEntry.h"
0016 #include "CondFormats/BTauObjects/interface/BTagCalibration.h"
0017 
0018 class BTagCalibrationReader {
0019 public:
0020   class BTagCalibrationReaderImpl;
0021 
0022   BTagCalibrationReader() {}
0023   BTagCalibrationReader(BTagEntry::OperatingPoint op,
0024                         const std::string& sysType = "central",
0025                         const std::vector<std::string>& otherSysTypes = {});
0026 
0027   void load(const BTagCalibration& c, BTagEntry::JetFlavor jf, const std::string& measurementType = "comb");
0028 
0029   double eval(BTagEntry::JetFlavor jf, float eta, float pt, float discr = 0.) const;
0030 
0031   double eval_auto_bounds(const std::string& sys, BTagEntry::JetFlavor jf, float eta, float pt, float discr = 0.) const;
0032 
0033   std::pair<float, float> min_max_pt(BTagEntry::JetFlavor jf, float eta, float discr = 0.) const;
0034 
0035 protected:
0036   std::shared_ptr<BTagCalibrationReaderImpl> pimpl;
0037 };
0038 
0039 #endif  // BTagCalibrationReader_H