jhpro.stat
Class DataSource
- java.lang.Object
-
- jhpro.stat.DataSource
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class DataSource extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableThis 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
Constructors Constructor and Description 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, java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddChannel(DataKeeper s, DataKeeper b, DataKeeper d)Adds a channel with signal, background and data given as input.voidaddChannel(DataKeeper s, DataKeeper b, DataKeeper d, double es, double eb, double ed, java.lang.String name)Adds a channel with signal, background and data given as input.voidaddChannel(H1D s, H1D b, H1D d)Adds a channel with signal, background and data given as input.voidaddChannel(H1D s, H1D b, H1D d, double es, double eb, double ed, java.lang.String name)Adds a channel with signal, background and data given as input.voidaddChannel(P1D s, P1D b, P1D d)Adds a channel with signal, background and data given as input.voidaddChannel(P1D s, P1D b, P1D d, double es, double eb, double ed, java.lang.String name)Adds a channel with signal, background and data given as input.java.lang.Objectclone()Allow cloningjava.util.ArrayList<DataKeeper>getBackground()Get data for backgroundjava.util.ArrayList<DataKeeper>getCandidates()Get data with candidatesjava.util.ArrayList<java.lang.String>getErrorNames()Get names of the errorsjava.util.ArrayList<java.lang.Double>getErrorOnBackground()Get systematics on background for all channelsjava.util.ArrayList<java.lang.Double>getErrorOnData()Get systematics on data for all channelsjava.util.ArrayList<java.lang.Double>getErrorOnSignal()Get errors on signal on all channelsintgetNumberChennels()Get total numberer of channelsjava.util.ArrayList<DataKeeper>getSignal()Get data for signalvoidSetOwner()Initialize all arrays
-
-
-
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 histogramb- Background histogramd- 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- Signalb- Backgroundd- Data
-
DataSource
public DataSource(H1D s, H1D b, H1D d, double es, double eb, double ed, java.lang.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 histogramb- Background histogramd- Data histogrames- Error on signaleb- Error on backgrounded- Error on dataname- name indicating this systematics
-
-
Method Detail
-
clone
public java.lang.Object clone()
Allow cloning- Overrides:
clonein classjava.lang.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 histogramb- Background histogramd- 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- Signalb- Backgroundd- Data
-
addChannel
public void addChannel(DataKeeper s, DataKeeper b, DataKeeper d, double es, double eb, double ed, java.lang.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 expectedb- Background expectedd- Data observedes- Systematic error on signaleb- Systematic error on backgrounded- Systematic error on dataname- 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 expectedb- Background expectedd- Data observed
-
getSignal
public java.util.ArrayList<DataKeeper> getSignal()
Get data for signal- Returns:
-
getBackground
public java.util.ArrayList<DataKeeper> getBackground()
Get data for background- Returns:
-
getCandidates
public java.util.ArrayList<DataKeeper> getCandidates()
Get data with candidates- Returns:
-
getErrorOnSignal
public java.util.ArrayList<java.lang.Double> getErrorOnSignal()
Get errors on signal on all channels- Returns:
-
getErrorOnBackground
public java.util.ArrayList<java.lang.Double> getErrorOnBackground()
Get systematics on background for all channels- Returns:
-
getErrorOnData
public java.util.ArrayList<java.lang.Double> getErrorOnData()
Get systematics on data for all channels- Returns:
-
getErrorNames
public java.util.ArrayList<java.lang.String> getErrorNames()
Get names of the errors- Returns:
-
addChannel
public void addChannel(H1D s, H1D b, H1D d, double es, double eb, double ed, java.lang.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 histogramb- Background histogramd- Data histogrames- Systematic on signaleb- Systematic on backgrounded- Systematic on dataname- Name for this channel
-
addChannel
public void addChannel(P1D s, P1D b, P1D d, double es, double eb, double ed, java.lang.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 P1Db- Expected background P1Dd- Measured data P1Des- systematic on signaleb- systematic on backgrounded- systematic on dataname- name for this channel
-
getNumberChennels
public int getNumberChennels()
Get total numberer of channels- Returns:
-
SetOwner
public void SetOwner()
Initialize all arrays- Parameters:
swtch-
-
-
DMelt 3.0 © DataMelt by jWork.ORG