Fraction

object Fraction extends Factory

Accumulate two aggregators, one containing only entries that pass a given selection (numerator) and another that contains all entries (denominator).

The aggregator may be a simple org.dianahep.histogrammar.Count to measure the efficiency of a cut, a org.dianahep.histogrammar.Bin to plot a turn-on curve, or anything else to be tested with and without a cut.

As a side effect of NaN values returning false for any comparison, a NaN return value from the selection is treated as a failed cut (the denominator is filled but the numerator is not).

Factory produces mutable org.dianahep.histogrammar.Fractioning and immutable org.dianahep.histogrammar.Fractioned objects.

Linear Supertypes
Factory, AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Fraction
2. Factory
3. AnyRef
4. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

Value Members

1. final def !=(arg0: AnyRef): Boolean

Definition Classes
AnyRef
2. final def !=(arg0: Any): Boolean

Definition Classes
Any
3. final def ##(): Int

Definition Classes
AnyRef → Any
4. final def ==(arg0: AnyRef): Boolean

Definition Classes
AnyRef
5. final def ==(arg0: Any): Boolean

Definition Classes
Any
6. def apply[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }](quantity: UserFcn[DATUM, Double], value: ⇒ V = Count()): Fractioning[DATUM, V]

Create an empty, mutable org.dianahep.histogrammar.Fractioning.

Create an empty, mutable org.dianahep.histogrammar.Fractioning.

value

Template used to create zero values (by calling this `value`'s `zero` method).

7. final def asInstanceOf[T0]: T0

Definition Classes
Any
8. def build[N <: Container[N], D <: Container[D]](numerator: N, denominator: D): Fractioned[N, D]

Alternate constructor for org.dianahep.histogrammar.Fractioned that builds from a pre-aggregated numerator and denominator.

Alternate constructor for org.dianahep.histogrammar.Fractioned that builds from a pre-aggregated numerator and denominator.

This could be used for any bin-by-bin ratio (or even a difference or other reduction), such as a data/Monte Caro ratio. The purpose of binding the histograms together like this is to verify that they have compatible bins and to provide access to existing methods for creating ratio plots from Fractioned objects.

9. def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
10. val detailedHelp: String

Help text that can be queried interactively: more detail than `help`.

Help text that can be queried interactively: more detail than `help`. (FIXME: currently only contains the `apply` signature.)

Definition Classes
FractionFactory
11. def ed[V <: Container[V] with NoAggregation](entries: Double, numerator: V, denominator: V): Fractioned[V, V]

Create an immutable org.dianahep.histogrammar.Fractioned from arguments (instead of JSON).

Create an immutable org.dianahep.histogrammar.Fractioned from arguments (instead of JSON).

entries

Weighted number of entries (sum of all observed weights without the cut applied).

numerator

Container for data that passed the given selection.

denominator

Container for all data, regardless of whether it passed the given selection.

12. final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
13. def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
14. def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
15. def fromJsonFragment(json: Json, nameFromParent: Option[String]): Container[_] with NoAggregation

Reconstructs a container of known type from JSON.

Reconstructs a container of known type from JSON. General users should call the `Factory` object's `fromJson`, which uses header data to identify the container type. (This is called by `fromJson`.)

Definition Classes
FractionFactory
16. final def getClass(): Class[_]

Definition Classes
AnyRef → Any
17. def hashCode(): Int

Definition Classes
AnyRef → Any
18. val help: String

Help text that can be queried interactively: a one-liner that can be included in a menu.

Help text that can be queried interactively: a one-liner that can be included in a menu.

Definition Classes
FractionFactory
19. def ing[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }](quantity: UserFcn[DATUM, Double], value: ⇒ V = Count()): Fractioning[DATUM, V]

Synonym for `apply`.

20. final def isInstanceOf[T0]: Boolean

Definition Classes
Any
21. val name: String

Name of the concrete `Factory` as a string; used to label the container type in JSON.

Name of the concrete `Factory` as a string; used to label the container type in JSON.

Definition Classes
FractionFactory
22. final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
23. final def notify(): Unit

Definition Classes
AnyRef
24. final def notifyAll(): Unit

Definition Classes
AnyRef
25. final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
26. def toString(): String

Definition Classes
AnyRef → Any
27. final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
28. final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
29. final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )