ndmspc  0.20250128.0
PointDraw.h
1 #ifndef NdmspcCorePointDraw_H
2 #define NdmspcCorePointDraw_H
3 
4 #include <TObject.h>
5 #include <TFile.h>
6 #include <THnSparse.h>
7 #include <TH1.h>
8 #include <TVirtualPad.h>
9 #include <TObject.h>
10 #include <nlohmann/json.hpp>
11 using json = nlohmann::json;
12 namespace Ndmspc {
13 
20 
21 class PointDraw : public TObject {
22  public:
23  PointDraw();
24  virtual ~PointDraw();
25 
26  int Draw(std::string config = "myAnalysis.json", std::string userConfig = "", std::string environment = "",
27  std::string userConfigRaw = "");
28 
29  protected:
30  TFile * fIn = nullptr;
31  THnSparse * fResultHnSparse = nullptr;
32  std::string fCurrentParameterName;
33  std::string fCurrentContentPath;
34  std::vector<int> fParameterPoint;
35  std::vector<int> fProjectionAxes;
36  TH1 * fMapAxesType = nullptr;
37  std::string fMapTitle;
38  TH1 * fParamMapHistogram = nullptr;
39  int fNDimCuts = 0;
40  std::vector<std::string> fData{};
41  std::vector<int> fDataId{};
42  std::vector<std::string> fMc{};
43  std::vector<int> fMcId{};
44  static std::string fgEnvironment;
45 
46  public:
47  void HighlightMain(TVirtualPad * pad, TObject * obj, Int_t xBin, Int_t yBin);
48  void HighlightParam(TVirtualPad * pad, TObject * obj, Int_t xBin, Int_t yBin);
49  void HighlightData(TVirtualPad * pad, TObject * obj, Int_t xBin, Int_t yBin);
50  void HighlightProjectionPoint(TVirtualPad * pad, TObject * obj, Int_t xBin, Int_t yBin);
51  void UpdateRanges();
52  void DrawProjections(bool ignoreMapping = false);
53  void DrawUser();
54  static void SetEnvironment(std::string env) { fgEnvironment = env; }
55 
57  ClassDef(PointDraw, 1);
59 };
60 } // namespace Ndmspc
61 #endif /* PointRun_H */
virtual ~PointDraw()
Definition: PointDraw.cxx:31
int Draw(std::string config="myAnalysis.json", std::string userConfig="", std::string environment="", std::string userConfigRaw="")
Definition: PointDraw.cxx:38