All Packages Class Hierarchy This Package Previous Next Index
Class hep.analysis.DoubleCut
java.lang.Object
|
+----hep.analysis.Cut
|
+----hep.analysis.DoubleCut
- public final class DoubleCut
- extends Cut
Use to discriminate between numerical values. The object holds a single
cutoff value, and a set of flags determines what relationship a value
must have to that cutoff in order to be included in the cut. For example,
to allow anything less than or equal to the cutoff, use
DoubleCut.PASS_IF_LESS | DoubleCut.PASS_IF_EQUALS
as flags. This cut supports calls to apply(..)
using
types int
and double
.
-
PASS_IF_EQUAL
- Set this flag to allow vales equal to the cutoff value to pass.
-
PASS_IF_GREATER
- Set this flag to allow vales greater than the cutoff value to pass.
-
PASS_IF_LESS
- Set this flag to allow vales less than the cutoff value to pass.
-
DoubleCut(String, CutFolder, int, double, boolean)
- Create an object that will evaluate the relationship of a
value to a cutoff.
-
DoubleCut(String, int, double, boolean)
- Create an object that will evaluate the relationship of a
value to a cutoff.
-
apply(double)
- Determines if the given value meets the criteria specified by the cutoff anf flags.
-
apply(int)
- Casts
value
to double
and does a normal comparison.
-
destroyPartition()
- Destroy the partition if it exists.
-
getConstructor(CutProperties, String)
- Override and return a constructor that corresponds to the given properties.
-
getDescription(CutProperties, String)
- Override and return a description that corresponds to the given properties.
-
getPartition()
- Override and return the partition your cut keeps if it keeps a partition.
-
getProperties()
- Return a
CutProperties
object that encapsulates the current properties.
-
getType()
- Return a string that describes the type.
-
setCutoff(double)
- Sets the cutoff value.
-
setFlags(int)
- Set the policy for what relationship a given value must have to the
cutoff in order to pass.
-
setKeepsPartition(boolean)
- Sets whether a partition is kept.
-
setProperties(CutProperties)
- Set the properties to those specified by the parameter
prop
.
-
toString()
-
PASS_IF_LESS
public static final int PASS_IF_LESS
- Set this flag to allow vales less than the cutoff value to pass.
PASS_IF_GREATER
public static final int PASS_IF_GREATER
- Set this flag to allow vales greater than the cutoff value to pass.
PASS_IF_EQUAL
public static final int PASS_IF_EQUAL
- Set this flag to allow vales equal to the cutoff value to pass.
DoubleCut
public DoubleCut(String name,
int initialFlags,
double initialCutoff,
boolean keepPartition)
- Create an object that will evaluate the relationship of a
value to a cutoff. Provide an initial set of flags and
an initial cutoff value.
DoubleCut
public DoubleCut(String name,
CutFolder folder,
int initialFlags,
double initialCutoff,
boolean keepPartition)
- Create an object that will evaluate the relationship of a
value to a cutoff. Provide an initial set of flags and
an initial cutoff value.
apply
public boolean apply(double value)
- Determines if the given value meets the criteria specified by the cutoff anf flags.
- Overrides:
- apply in class Cut
apply
public boolean apply(int value)
- Casts
value
to double
and does a normal comparison.
- Overrides:
- apply in class Cut
setFlags
public void setFlags(int flags)
- Set the policy for what relationship a given value must have to the
cutoff in order to pass. For example, to allow anything less than
or equal to the cutoff, use
setFlags(DoubleCut.PASS_IF_LESS | DoubleCut.PASS_IF_EQUALS)
setCutoff
public void setCutoff(double cutoff)
- Sets the cutoff value.
destroyPartition
public void destroyPartition()
- Destroy the partition if it exists.
- Overrides:
- destroyPartition in class Cut
setKeepsPartition
public void setKeepsPartition(boolean aFlag)
- Sets whether a partition is kept.
getType
public String getType()
- Return a string that describes the type.
- Overrides:
- getType in class Cut
setProperties
public void setProperties(CutProperties prop)
- Set the properties to those specified by the parameter
prop
.
- Overrides:
- setProperties in class Cut
getProperties
public CutProperties getProperties()
- Return a
CutProperties
object that encapsulates the current properties.
- Overrides:
- getProperties in class Cut
toString
public String toString()
- Overrides:
- toString in class Object
getDescription
public static String getDescription(CutProperties prop,
String name)
- Override and return a description that corresponds to the given properties.
getConstructor
public static String getConstructor(CutProperties prop,
String name)
- Override and return a constructor that corresponds to the given properties.
getPartition
protected Partition getPartition()
- Override and return the partition your cut keeps if it keeps a partition.
- Overrides:
- getPartition in class Cut
All Packages Class Hierarchy This Package Previous Next Index