1 #ifndef _CUT_CLASSES_H_
2 #define _CUT_CLASSES_H_
49 this->insert({
"RangeCut",
Range});
52 this->insert({
"PHVTOFCut",
PHVTOF});
54 this->insert({
"GraphCut",
GrphCut});
64 static const CutTypeNameToEnum cutNameToEnum;
78 const std::vector<double>& a_Ys={})
88 void setRange(
double a_min,
double a_max);
97 std::string a_name =
"CUTG"
99 virtual std::vector< std::pair<double,double> >
getNPoints(
int a_N,
120 void setCut(
double a_cutValue);
124 const std::vector<double>& a_Ys={})
const;
127 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
142 void setCut(
double a_cutValue);
145 const std::vector<double>& a_Ys={})
const;
148 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
169 const std::vector<double>& a_Ys={})
const;
172 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
193 void setCoeffs(std::vector<double> a_coeffs);
201 const std::vector<double>& a_Ys={})
const;
204 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
211 std::vector< std::pair<double,double> >
getLine(
int a_N,
218 std::vector<double> m_coeffs;
235 const std::vector<double>& a_Ys={})
const;
238 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
258 const std::vector<double>& a_Ys={})
const;
261 std::vector<int> m_integerList;
272 void setPoints(std::vector< std::pair<double,double>> a_points);
274 const std::vector<double>& a_Ys={})
const;
276 std::vector< std::pair<double,double> >
getNPoints(
int a_N,
282 std::vector< std::pair<double,double> > m_points;
290 return a_X > m_cutValue;
295 return a_X < m_cutValue;
300 return a_X < m_upperBound && a_X > m_lowerBound;
Definition: CutClasses.h:70
double m_rMax
Definition: CutClasses.h:108
std::string getVarXName() const
Definition: CutClasses.cpp:49
virtual CutBase * clone()=0
void setVarXName(std::string a_varXName)
Definition: CutClasses.cpp:58
virtual std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX=0, double a_maxX=0)
Definition: CutClasses.cpp:131
CutBase()
Definition: CutClasses.cpp:37
virtual bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const =0
std::string getVarYName() const
Definition: CutClasses.cpp:53
virtual ~CutBase()
Definition: CutClasses.cpp:72
void setRange(double a_min, double a_max)
Definition: CutClasses.cpp:66
std::string m_varYName
Definition: CutClasses.h:106
TCutG * getTCut(int a_N=10, double a_minX=0, double a_maxX=0, std::string a_name="CUTG")
Definition: CutClasses.cpp:81
bool m_hasRange
Definition: CutClasses.h:109
double m_rMin
Definition: CutClasses.h:107
void setVarYName(std::string a_varYName)
Definition: CutClasses.cpp:62
std::string m_varXName
Definition: CutClasses.h:105
Definition: CutClasses.h:268
GraphCut * clone()
Definition: CutClasses.cpp:493
void setPoints(std::vector< std::pair< double, double >> a_points)
Definition: CutClasses.cpp:462
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.cpp:474
GraphCut()
default constrcutor
Definition: CutClasses.cpp:458
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:485
Definition: CutClasses.h:251
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.cpp:439
IntegerListCut()
default constructor
Definition: CutClasses.cpp:430
void setIntegerList(std::vector< int > a_integerList)
Definition: CutClasses.cpp:435
IntegerListCut * clone()
Definition: CutClasses.cpp:453
used to implement cuts requiring all values to be above a value
Definition: CutClasses.h:116
LowerBoundCut * clone()
Definition: CutClasses.cpp:175
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.h:288
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:158
LowerBoundCut()
Definition: CutClasses.cpp:139
void setCut(double a_cutValue)
Definition: CutClasses.cpp:151
double getCutValue()
Definition: CutClasses.cpp:147
ya this should be abstracted ad
Definition: CutClasses.h:36
CutTypeNameToEnum()
Definition: CutClasses.h:45
CutType operator[](std::string a_typeName) const
Definition: CutClasses.cpp:19
Definition: CutClasses.h:188
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.cpp:294
std::vector< double > getCoeffs() const
Definition: CutClasses.cpp:284
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:305
PolyBoundCut()
default constructor makes this a linear cut above 0.
Definition: CutClasses.cpp:266
std::vector< std::pair< double, double > > getLine(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:347
void setUpper(bool a_log)
Definition: CutClasses.cpp:279
void setCoeffs(std::vector< double > a_coeffs)
Definition: CutClasses.cpp:274
PolyBoundCut * clone()
Definition: CutClasses.cpp:364
bool isUpper() const
Definition: CutClasses.cpp:288
Definition: CutClasses.h:226
void setLowerBoundCoeffs(std::vector< double > a_coeffs)
Definition: CutClasses.cpp:375
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.cpp:391
std::vector< double > getUpperBoundCoeffs() const
Definition: CutClasses.cpp:387
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:406
void setUpperBoundCoeffs(std::vector< double > a_coeffs)
Definition: CutClasses.cpp:379
PolyRangeCut()
Definition: CutClasses.cpp:369
PolyRangeCut * clone()
Definition: CutClasses.cpp:424
std::vector< double > getLowerBoundCoeffs() const
Definition: CutClasses.cpp:383
Definition: CutClasses.h:158
RangeCut()
Definition: CutClasses.cpp:220
void setUpperBound(double a_cutValue)
Definition: CutClasses.cpp:236
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.h:298
void setLowerBound(double a_cutValue)
Definition: CutClasses.cpp:232
double getUpperBound()
Definition: CutClasses.cpp:228
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:243
double getLowerBound()
Definition: CutClasses.cpp:224
RangeCut * clone()
Definition: CutClasses.cpp:260
used to provide cuts requiring all values to be below a specific value
Definition: CutClasses.h:138
std::vector< std::pair< double, double > > getNPoints(int a_N, double a_minX, double a_maxX)
Definition: CutClasses.cpp:197
UpperBoundCut * clone()
Definition: CutClasses.cpp:214
UpperBoundCut()
Definition: CutClasses.cpp:180
double getCutValue()
Definition: CutClasses.cpp:187
void setCut(double a_cutValue)
Definition: CutClasses.cpp:191
bool passesCut(double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutClasses.h:293
Definition: CutClasses.h:13
CutType
Definition: CutClasses.h:19
@ NA
Definition: CutClasses.h:28
@ PolyBound
Definition: CutClasses.h:23
@ IntListCut
Definition: CutClasses.h:26
@ Range
Definition: CutClasses.h:22
@ PHVTOF
Definition: CutClasses.h:25
@ PolyRange
Definition: CutClasses.h:24
@ GrphCut
Definition: CutClasses.h:27
@ LowerBound
Definition: CutClasses.h:20
@ UpperBound
Definition: CutClasses.h:21