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.


Variable Index

 o PASS_IF_EQUAL
Set this flag to allow vales equal to the cutoff value to pass.
 o PASS_IF_GREATER
Set this flag to allow vales greater than the cutoff value to pass.
 o PASS_IF_LESS
Set this flag to allow vales less than the cutoff value to pass.

Constructor Index

 o DoubleCut(String, CutFolder, int, double, boolean)
Create an object that will evaluate the relationship of a value to a cutoff.
 o DoubleCut(String, int, double, boolean)
Create an object that will evaluate the relationship of a value to a cutoff.

Method Index

 o apply(double)
Determines if the given value meets the criteria specified by the cutoff anf flags.
 o apply(int)
Casts value to double and does a normal comparison.
 o destroyPartition()
Destroy the partition if it exists.
 o getConstructor(CutProperties, String)
Override and return a constructor that corresponds to the given properties.
 o getDescription(CutProperties, String)
Override and return a description that corresponds to the given properties.
 o getPartition()
Override and return the partition your cut keeps if it keeps a partition.
 o getProperties()
Return a CutProperties object that encapsulates the current properties.
 o getType()
Return a string that describes the type.
 o setCutoff(double)
Sets the cutoff value.
 o setFlags(int)
Set the policy for what relationship a given value must have to the cutoff in order to pass.
 o setKeepsPartition(boolean)
Sets whether a partition is kept.
 o setProperties(CutProperties)
Set the properties to those specified by the parameter prop.
 o toString()

Variables

 o PASS_IF_LESS
 public static final int PASS_IF_LESS
Set this flag to allow vales less than the cutoff value to pass.

 o PASS_IF_GREATER
 public static final int PASS_IF_GREATER
Set this flag to allow vales greater than the cutoff value to pass.

 o PASS_IF_EQUAL
 public static final int PASS_IF_EQUAL
Set this flag to allow vales equal to the cutoff value to pass.

Constructors

 o 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.

 o 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.

Methods

 o 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
 o apply
 public boolean apply(int value)
Casts value to double and does a normal comparison.

Overrides:
apply in class Cut
 o 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)

 o setCutoff
 public void setCutoff(double cutoff)
Sets the cutoff value.

 o destroyPartition
 public void destroyPartition()
Destroy the partition if it exists.

Overrides:
destroyPartition in class Cut
 o setKeepsPartition
 public void setKeepsPartition(boolean aFlag)
Sets whether a partition is kept.

 o getType
 public String getType()
Return a string that describes the type.

Overrides:
getType in class Cut
 o setProperties
 public void setProperties(CutProperties prop)
Set the properties to those specified by the parameter prop.

Overrides:
setProperties in class Cut
 o getProperties
 public CutProperties getProperties()
Return a CutProperties object that encapsulates the current properties.

Overrides:
getProperties in class Cut
 o toString
 public String toString()
Overrides:
toString in class Object
 o getDescription
 public static String getDescription(CutProperties prop,
                                     String name)
Override and return a description that corresponds to the given properties.

 o getConstructor
 public static String getConstructor(CutProperties prop,
                                     String name)
Override and return a constructor that corresponds to the given properties.

 o 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