jhpro.stat
Class DataSource

java.lang.Object
  extended by jhpro.stat.DataSource
All Implemented Interfaces:
Serializable, Cloneable

public class DataSource
extends Object
implements Cloneable, Serializable

This class serves as input for the Limit.ComputeLimit method. It takes the signal, background and data histograms to form a channel. More channels can be added using AddChannel(), as well as different systematics sources.

See Also:
Serialized Form

Constructor Summary
DataSource()
          Simplest constructor.
DataSource(H1D s, H1D b, H1D d)
          Adds one channel with signal, background and data given as input.
DataSource(H1D s, H1D b, H1D d, double es, double eb, double ed, String name)
          Another constructor, directly adds one channel with signal, background and data given as input.
DataSource(P1D s, P1D b, P1D d)
          Adds one channel with signal, background and data given as input.
 
Method Summary
 void addChannel(DataKeeper s, DataKeeper b, DataKeeper d)
          Adds a channel with signal, background and data given as input.
 void addChannel(DataKeeper s, DataKeeper b, DataKeeper d, double es, double eb, double ed, String name)
          Adds a channel with signal, background and data given as input.
 void addChannel(H1D s, H1D b, H1D d)
          Adds a channel with signal, background and data given as input.
 void addChannel(H1D s, H1D b, H1D d, double es, double eb, double ed, String name)
          Adds a channel with signal, background and data given as input.
 void addChannel(P1D s, P1D b, P1D d)
          Adds a channel with signal, background and data given as input.
 void addChannel(P1D s, P1D b, P1D d, double es, double eb, double ed, String name)
          Adds a channel with signal, background and data given as input.
 Object clone()
          Allow cloning
 ArrayList<DataKeeper> getBackground()
          Get data for background
 ArrayList<DataKeeper> getCandidates()
          Get data with candidates
 ArrayList<String> getErrorNames()
          Get names of the errors
 ArrayList<Double> getErrorOnBackground()
          Get systematics on background for all channels
 ArrayList<Double> getErrorOnData()
          Get systematics on data for all channels
 ArrayList<Double> getErrorOnSignal()
          Get errors on signal on all channels
 int getNumberChennels()
          Get total numberer of channels
 ArrayList<DataKeeper> getSignal()
          Get data for signal
 void SetOwner()
          Initialize all arrays
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSource

public DataSource()
Simplest constructor. Use addChannel to add data.


DataSource

public DataSource(H1D s,
                  H1D b,
                  H1D d)
Adds one channel with signal, background and data given as input. Systematic is assumed to be zero for data, signal and background.

Parameters:
s - Signal histogram
b - Background histogram
d - Observed data histogram

DataSource

public DataSource(P1D s,
                  P1D b,
                  P1D d)
Adds one channel with signal, background and data given as input. Systematic is assumed to be zero for data, signal and background.

Parameters:
s - Signal
b - Background
d - Data

DataSource

public DataSource(H1D s,
                  H1D b,
                  H1D d,
                  double es,
                  double eb,
                  double ed,
                  String name)
Another constructor, directly adds one channel with signal, background and data given as input. One can specify systematic uncertainty for signal, background and data. For example, 0.05 value for signal means that signal should be scaled up by 5%. If it is -0.05, signal should be scaled down by 0.05%.

Parameters:
s - Signal histogram
b - Background histogram
d - Data histogram
es - Error on signal
eb - Error on background
ed - Error on data
name - name indicating this systematics
Method Detail

clone

public Object clone()
Allow cloning

Overrides:
clone in class Object

addChannel

public void addChannel(H1D s,
                       H1D b,
                       H1D d)
Adds a channel with signal, background and data given as input. All systematic errors are assumed to be 0.

Parameters:
s - Signal histogram
b - Background histogram
d - Observed data histogram

addChannel

public void addChannel(P1D s,
                       P1D b,
                       P1D d)
Adds a channel with signal, background and data given as input. All systematic errors are set to zero. The name is set to the channel number.

Parameters:
s - Signal
b - Background
d - Data

addChannel

public void addChannel(DataKeeper s,
                       DataKeeper b,
                       DataKeeper d,
                       double es,
                       double eb,
                       double ed,
                       String name)
Adds a channel with signal, background and data given as input. One can specify name for this channel and systematic errors. This is the main constructor.

Parameters:
s - Signal expected
b - Background expected
d - Data observed
es - Systematic error on signal
eb - Systematic error on background
ed - Systematic error on data
name - Name for this data source

addChannel

public void addChannel(DataKeeper s,
                       DataKeeper b,
                       DataKeeper d)
Adds a channel with signal, background and data given as input.

Parameters:
s - Signal expected
b - Background expected
d - Data observed

getSignal

public ArrayList<DataKeeper> getSignal()
Get data for signal

Returns:

getBackground

public ArrayList<DataKeeper> getBackground()
Get data for background

Returns:

getCandidates

public ArrayList<DataKeeper> getCandidates()
Get data with candidates

Returns:

getErrorOnSignal

public ArrayList<Double> getErrorOnSignal()
Get errors on signal on all channels

Returns:

getErrorOnBackground

public ArrayList<Double> getErrorOnBackground()
Get systematics on background for all channels

Returns:

getErrorOnData

public ArrayList<Double> getErrorOnData()
Get systematics on data for all channels

Returns:

getErrorNames

public ArrayList<String> getErrorNames()
Get names of the errors

Returns:

addChannel

public void addChannel(H1D s,
                       H1D b,
                       H1D d,
                       double es,
                       double eb,
                       double ed,
                       String name)
Adds a channel with signal, background and data given as input. In addition, systematic error can be set for signal, background, data. For example, systematic error 0.05 on background means scaling background by 1+0.05 factor (i.e. added 5% systematics). If it is -0.05, this will scale background by 1-0.05.

Parameters:
s - Signal histogram
b - Background histogram
d - Data histogram
es - Systematic on signal
eb - Systematic on background
ed - Systematic on data
name - Name for this channel

addChannel

public void addChannel(P1D s,
                       P1D b,
                       P1D d,
                       double es,
                       double eb,
                       double ed,
                       String name)
Adds a channel with signal, background and data given as input. In addition, error sources are defined. TH1 are here used for convenience: each bin has to be seen as an error source (relative). names is an array of strings containing the names of the sources. Sources with the same name are correlated.

Parameters:
s - Expected signal P1D
b - Expected background P1D
d - Measured data P1D
es - systematic on signal
eb - systematic on background
ed - systematic on data
name - name for this channel

getNumberChennels

public int getNumberChennels()
Get total numberer of channels

Returns:

SetOwner

public void SetOwner()
Initialize all arrays

Parameters:
swtch -


jHepWork 3.1 ©