File indexing completed on 2025-01-18 10:11:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_THRESHOLD_CATEGORY
0017 #define ROO_THRESHOLD_CATEGORY
0018
0019 #include "RooAbsCategory.h"
0020 #include "RooRealProxy.h"
0021 #include <vector>
0022 #include <utility>
0023
0024 class RooThresholdCategory : public RooAbsCategory {
0025
0026 public:
0027
0028 RooThresholdCategory() {};
0029 RooThresholdCategory(const char *name, const char *title, RooAbsReal& inputVar,
0030 const char* defCatName="Default", Int_t defCatIdx=0);
0031 RooThresholdCategory(const RooThresholdCategory& other, const char *name=nullptr) ;
0032 TObject* clone(const char* newname) const override { return new RooThresholdCategory(*this, newname); }
0033
0034
0035 bool addThreshold(double upperLimit, const char* catName, Int_t catIdx=-99999) ;
0036
0037
0038 void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override ;
0039
0040 void writeToStream(std::ostream& os, bool compact) const override ;
0041
0042 protected:
0043
0044 RooRealProxy _inputVar ;
0045 const value_type _defIndex{std::numeric_limits<value_type>::min()};
0046 std::vector<std::pair<double,value_type>> _threshList;
0047
0048 value_type evaluate() const override ;
0049
0050 void recomputeShape() override { }
0051
0052 ClassDefOverride(RooThresholdCategory, 3)
0053 };
0054
0055 #endif