File indexing completed on 2024-09-20 07:05:38
0001 #pragma once
0002
0003 #include <stdio.h>
0004 #include <stdlib.h>
0005 #include <iostream>
0006 #include <sstream>
0007
0008
0009 #include <TSystem.h>
0010 #include <TObject.h>
0011 #include <TNamed.h>
0012 #include <TString.h>
0013 #include <TMath.h>
0014 #include <TAxis.h>
0015 #include <TObjArray.h>
0016
0017
0018 #include "CutDef.h"
0019
0020
0021 class BinSet : public TObject
0022 {
0023 public:
0024
0025
0026
0027 BinSet(TString varName_="unknown", TString varTitle_="unknown");
0028 BinSet(const BinSet &BS);
0029 ~BinSet();
0030
0031
0032 TObjArray *GetBinList() { return binList; };
0033 Int_t GetNumBins() { return (Int_t) binList->GetEntries(); };
0034
0035
0036 Double_t GetMin();
0037 Double_t GetMax();
0038
0039
0040 TString GetVarName() { return varName; };
0041 TString GetVarTitle() { return varTitle; };
0042
0043
0044
0045
0046
0047
0048
0049
0050 void BuildBin(TString cutType_, Double_t arg1_=-1, Double_t arg2_=-1);
0051 void BuildBin(CutDef *cut_);
0052
0053
0054
0055
0056
0057
0058
0059 void BuildBins(Int_t nbins_, Double_t min_, Double_t max_, Bool_t log_=false);
0060 void BuildBins(TAxis *ax, Bool_t log_=false);
0061
0062 void BuildExternalBin(TString cutID_,TString cutTitle_);
0063
0064
0065 CutDef *Cut(Int_t binNum) { return (CutDef*)binList->At(binNum); };
0066
0067
0068
0069
0070
0071
0072 static void BinLog(TAxis *ax);
0073
0074 private:
0075 TObjArray *binList;
0076 TString varName,varTitle;
0077
0078 ClassDef(BinSet,1);
0079 };