org.dianahep.histogrammar

Stack

object Stack extends Factory

Accumulates a suite of aggregators, each filtered with a tighter selection on the same quantity.

This is a generalization of org.dianahep.histogrammar.Fraction, which fills two aggregators, one with a cut, the other without. Stack fills N + 1 aggregators with N successively tighter cut thresholds. The first is always filled (like the denominator of Fraction), the second is filled if the computed quantity exceeds its threshold, the next is filled if the computed quantity exceeds a higher threshold, and so on.

The thresholds are presented in increasing order and the computed value must be greater than or equal to a threshold to fill the corresponding bin, and therefore the number of entries in each filled bin is greatest in the first and least in the last.

Although this aggregation could be visualized as a stack of histograms, stacked histograms usually represent a different thing: data from different sources, rather than different cuts on the same source. For example, it is common to stack Monte Carlo samples from different backgrounds to show that they add up to the observed data. The Stack aggregator does not make plots of this type because aggregation trees in Histogrammar draw data from exactly one source.

To make plots from different sources in Histogrammar, one must perform separate aggregation runs. It may then be convenient to stack the results of those runs as though they were created with a Stack aggregation, so that plotting code can treat both cases uniformly. For this reason, Stack has an alternate constructor to build a Stack manually from distinct aggregators, even if those aggregators came from different aggregation runs.

Factory produces mutable org.dianahep.histogrammar.Stacking and immutable org.dianahep.histogrammar.Stacked objects.

Linear Supertypes
Factory, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Stack
  2. Factory
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
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 }, N <: Container[N] with Aggregation { type Datum >: DATUM }](bins: Iterable[Double], quantity: UserFcn[DATUM, Double], value: ⇒ V = Count(), nanflow: N = Count()): Stacking[DATUM, V, N]

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

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

    bins

    Thresholds that will be used to determine which datum goes into a given container; this list gets sorted, duplicates get removed, and negative infinity gets added as the first element.

    quantity

    Numerical quantity whose value is compared with the given thresholds.

    value

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

    nanflow

    Container for data that resulted in NaN.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def build[V <: Container[V]](x: V, xs: Container[_]*): Stacked[V, Counted]

    Alternate constructor for org.dianahep.histogrammar.Stacked that builds from N pre-aggregated primitives (N > 0).

    Alternate constructor for org.dianahep.histogrammar.Stacked that builds from N pre-aggregated primitives (N > 0).

    The first result is the one that gets filled with contributions from all others, and should be plotted behind all others (first, if overlays cover each other in the usual order).

    Since this kind of stacked plot is not made from numerical bins, the numerical values of the bins are all NaN.

  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
    StackFactory
  11. def ed[V <: Container[V] with NoAggregation, N <: Container[N] with NoAggregation](entries: Double, bins: Iterable[(Double, V)], nanflow: N): Stacked[V, N]

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

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

    entries

    Weighted number of entries (sum of all observed weights).

    bins

    Lower thresholds and their associated containers, starting with negative infinity.

    nanflow

    Container for data that resulted in NaN.

  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
    StackFactory
  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
    StackFactory
  19. def ing[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](bins: Iterable[Double], quantity: UserFcn[DATUM, Double], value: ⇒ V = Count(), nanflow: N = Count()): Stacking[DATUM, V, N]

    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
    StackFactory
  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( ... )

Inherited from Factory

Inherited from AnyRef

Inherited from Any

Ungrouped