Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
SubCut.h
1/*
2 * SubCut.h
3 *
4 * Created on: 10 gru 2016
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALSUBCUT_H_
10#define HALSUBCUT_H_
11
12#include <TObject.h>
13#include <TString.h>
14
15
16class TH1;
17
21namespace Hal {
22 class Cut;
23 class Package;
24 class SubCut : public TObject {
25 Int_t fSize;
26 Double_t* fMin; //[fSize]
27 Double_t* fMax; //[fSize]
28 Double_t* fValue; //[fSize]
29 TString* fUnitName; //[fSize]
30 public:
35 SubCut(Int_t size = 1);
41 void SetUnitName(TString name, Int_t i = 0) { fUnitName[i] = name; };
47 void SetMin(Double_t val, Int_t i = 0);
53 void SetMax(Double_t val, Int_t i = 0);
58 Bool_t Validate();
64 Bool_t ValidateAbs();
70 TString GetUnit(Int_t i) const { return fUnitName[i]; };
76 SubCut& operator=(const SubCut& other);
81 inline Int_t GetSize() const { return fSize; };
87 inline void SetValue(Double_t val, Int_t i = 0) { fValue[i] = val; };
93 inline Double_t GetMin(Int_t i) const { return fMin[i]; };
99 inline Double_t GetMax(Int_t i) const { return fMax[i]; };
105 inline Double_t GetValue(Int_t i) const { return fValue[i]; };
110 SubCut(const SubCut& other);
111 virtual ~SubCut();
112 ClassDef(SubCut, 1)
113 };
114
119 class SubCutHisto : public TObject {
120 Int_t fSize;
121 TH1* fAcceptanceHistogram;
122 Int_t fParX;
123 Int_t fParY;
124 Int_t fParZ;
125
126 public:
131 SubCutHisto(Int_t size = 3);
136 Int_t GetSize() const { return fSize; };
144 Bool_t SetAcceptanceHistogram(const TH1& h);
149 Bool_t Validate(Double_t x, Double_t y = 0, Double_t z = 0);
155 Bool_t ValidateAbs(Double_t x, Double_t y = 0, Double_t z = 0);
161 SubCutHisto& operator=(const SubCutHisto& other);
166 TH1* GetHisto() const { return fAcceptanceHistogram; };
175 Bool_t Init(const Cut& thisCut, Int_t par1, Int_t par2 = -1, Int_t par3 = -1);
180 SubCutHisto(const SubCutHisto& other);
184 void AddToReport(Package* report) const;
185 virtual ~SubCutHisto();
186 ClassDef(SubCutHisto, 1)
187 };
188
192 class SubCutRectangle : public TObject {
193 std::vector<Double_t> fMinX;
194 std::vector<Double_t> fMaxX;
195 std::vector<Double_t> fMinY;
196 std::vector<Double_t> fMaxY;
197 TString fNameX;
198 TString fNameY;
199 Int_t fParX;
200 Int_t fParY;
201
202 public:
204 void AddSquare(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
212 Bool_t Init(const Cut& thisCut, Int_t par1, Int_t par2 = 1);
218 Int_t Validate(Double_t x, Double_t y);
222 Int_t GetAreasNo() { return fMinX.size(); };
226 void AddToReport(Package* report) const;
227 virtual ~SubCutRectangle();
228 ClassDef(SubCutRectangle, 1);
229 };
230} // namespace Hal
231
232#endif /* NICASUBCUT_H_ */
Definition Cut.h:40
Bool_t ValidateAbs(Double_t x, Double_t y=0, Double_t z=0)
Definition SubCut.cxx:141
Bool_t SetAcceptanceHistogram(const TH1 &h)
Definition SubCut.cxx:153
TH1 * GetHisto() const
Definition SubCut.h:166
Int_t GetSize() const
Definition SubCut.h:136
SubCutHisto(Int_t size=3)
Definition SubCut.cxx:109
void AddToReport(Package *report) const
Definition SubCut.cxx:88
SubCutHisto & operator=(const SubCutHisto &other)
Definition SubCut.cxx:184
Bool_t Init(const Cut &thisCut, Int_t par1, Int_t par2=-1, Int_t par3=-1)
Definition SubCut.cxx:145
Bool_t Validate(Double_t x, Double_t y=0, Double_t z=0)
Definition SubCut.cxx:123
Int_t Validate(Double_t x, Double_t y)
Definition SubCut.cxx:217
Bool_t Init(const Cut &thisCut, Int_t par1, Int_t par2=1)
Definition SubCut.cxx:239
void AddToReport(Package *report) const
Definition SubCut.cxx:225
void SetMax(Double_t val, Int_t i=0)
Definition SubCut.cxx:86
TString GetUnit(Int_t i) const
Definition SubCut.h:70
Bool_t ValidateAbs()
Definition SubCut.cxx:99
void SetUnitName(TString name, Int_t i=0)
Definition SubCut.h:41
void SetMin(Double_t val, Int_t i=0)
Definition SubCut.cxx:84
void SetValue(Double_t val, Int_t i=0)
Definition SubCut.h:87
SubCut(Int_t size=1)
Definition SubCut.cxx:22
Double_t GetMax(Int_t i) const
Definition SubCut.h:99
Bool_t Validate()
Definition SubCut.cxx:92
Double_t GetMin(Int_t i) const
Definition SubCut.h:93
Double_t GetValue(Int_t i) const
Definition SubCut.h:105
SubCut & operator=(const SubCut &other)
Definition SubCut.cxx:65
Int_t GetSize() const
Definition SubCut.h:81