S1S2Data Class Reference

DataSet in S1 S2. More...

#include <XeAnalysis.h>

Inheritance diagram for S1S2Data:
S1S2Object DataSet XeGraphics XeObject XeStat XeCore XeCore XeMath XeObject XeCore XeCore

List of all members.

Public Member Functions

void add (S1S2Data *original, DarkMatterCut *cut)
 Add content of another data set after applying a dark matter cut.
void add (S1S2Data *original, XeSetOfCuts *cuts)
 Add content of another data set after applying a set of cuts.
void add (TGraph *gr)
 Add content of a Tgraph.
void add (double s1, int slice, double s2, int band)
 Add an entry corresponding to s1,s2 measurements, and record band/slice indices.
void add (double s1, double s2)
 Add an entry corresponding to s1,s2 measurements.
int defaultColor ()
 Return the default color while drawing.
void draw ()
 Draw the data set, as requested by this being S1S2Object.
void fillAndMarkBandsAndSlices (S1S2Bands *bands, bool mark)
 fill bands and slices and mark events with their band and slice number
int getBand (int ev)
 Return band index of a given event (if defined).
S1S2DatagetCutData ()
 get corresponding data set after cut
int getDataType ()
 Return the data type.
int getNEvents ()
 Return number of events in the data set.
double getNEventsNormalized ()
 Get normalized number of events.
double getNormalization ()
 Get normalization factor.
XeRungetRun ()
 get pointer to the run it belongs
double * getS1 ()
 get all S1 values
double getS1 (int ev)
 Return S1 value of a given event.
double * getS2 ()
 get all S2 values
double getS2 (int ev)
 Return S2 value of a given event.
double getS2overS1 (int ev)
 Return S2/S1 of a given event.
int getSlice (int ev)
 Return slice index of a given event (if defined).
string getTypeName ()
 get name of data type
double getX (int ev)
 get "X" of a given event, when drawing
double getY (int ev)
 get "Y" of a given event, when drawing
void make (S1S2Data *original, DarkMatterCut *cut)
 crate from another data set after applying a dark matter cut
void make (S1S2Data *original, XeSetOfCuts *cuts)
 Create from another data set after applying a set of cuts.
void make (TGraph *gr)
 Create from content of a Tgraph.
double maxS1 ()
 get max S1
double maxS2 ()
 get max S2
double maxS2OverS1 ()
 get max S2/S1
double maxX ()
 get max "X" value
double maxY ()
 get max "Y" value
double minS1 ()
double minS2 ()
 get min S2
double minS2OverS1 ()
 get min S2/S1
double minX ()
 get min "X" value
double minY ()
 get min "Y" value
EquiContentBinsnewEquiContentS1Bins (int ns1, double s1Mi, double s1Ma)
 Return S1 bins with equal content, giving S1 edges.
EquiContentBinsnewEquiContentS1Bins (int ns1)
 Return S1 bins with equal content, with automatic S1 edges.
XeGraphnewGraph (int plot=NONE)
 Create a graph.
TTree * newTree (S1S2Bands *referenceBands=NULL)
 Create a TTree with important quantities in.
void normalize (double ratio)
 Multiply everything by a constant.
void normalizeToEvents (double events)
 Multiply everything by a constant factor such as the total content will be as requested.
bool passes (int i, XeSetOfCuts *cuts)
bool passes (int i, DarkMatterCut *cut)
void printComputedBands (int level=1, int bandMax=ALL)
 Print the data set with the 1st bands.
bool printIt (int level=1)
 print the data set
void printSummary (string header)
 Print a summary of the content , befrore and after cut, and normalisation.
void reset ()
 Reset (empty all contents).
 S1S2Data (S1S2Data *original, DarkMatterCut *cut)
 Constructor from an existing data set, after dark matter cut.
 S1S2Data (S1S2Data *original, XeSetOfCuts *cuts)
 Constructor from an existing data set, after further cuts.
 S1S2Data (string name, int type, XeRun *run, TGraph *gr=NULL)
 Constructor ab nihilo.
void setCutData (S1S2Data *cut)
 Define the corresponding data set after cuts cut pointer to the S1S2Data data set after cuts.
void setParameters (XeRun *run, int type)
 Internal method to help the constructor by setting vital members.
void setRun (XeRun *run)
bool update ()
 Update min, max, .

Static Public Member Functions

static int defaultColor (int type)
 get default color, for a given data type
static string formatContent (int type, double c, double w, bool total=false)
 format count for a table
static string getShortTypeName (int type)
 return short type type name
static string getTheName (S1S2Data *original, DarkMatterCut *cut)
static string getTheName (S1S2Data *original, XeSetOfCuts *cuts)
static string getTypeName (int type)
 return type name
static bool isAfterCuts (int type)
 tell if a data type comes from another one after cuts
static bool isBackground (int type, bool warn=false)
 Is the type a background one?
static int mapS1Shape (int s1s2Shape)
 Map S1shape enumeration to S1S2dataType enumeration.
static void printSummaryHeader ()
 Print header of breakdown table.
static int typeAfterCut (int type)
 given a data type , return the corresponding type after cuts
static int typeBeforeCut (int type)
 given a data type , return the corresponding type before cuts

Protected Attributes

int band
vector< int > bands
S1S2DatacutData
int dataType
float flattened
float logS2S1
double nEventsNormalized
double normalization
XeRunrun
float S1
double s1Max
double s1Min
float S2
double s2Max
double s2Min
double s2overs1Max
double s2overs1Min
int slice
vector< int > slices

Detailed Description

DataSet in S1 S2.


Constructor & Destructor Documentation

S1S2Data::S1S2Data ( string  name,
int  type,
XeRun run,
TGraph *  gr = NULL 
)

Constructor ab nihilo.

Parameters:
name name of data set
run run (actually XeRun) where data come from
gr Graph where S1S2 are taken from
S1S2Data::S1S2Data ( S1S2Data original,
XeSetOfCuts cuts 
)

Constructor from an existing data set, after further cuts.

Parameters:
original original S1S2Data before cuts
cuts set of preselection cuts
S1S2Data::S1S2Data ( S1S2Data original,
DarkMatterCut cut 
)

Constructor from an existing data set, after dark matter cut.

Parameters:
original original S1S2Data before cuts
cut dark matter cut

Member Function Documentation

void S1S2Data::add ( S1S2Data original,
DarkMatterCut cut 
)

Add content of another data set after applying a dark matter cut.

Parameters:
original pointer to the original data set
cuts pointer to the Dark matter cuts
void S1S2Data::add ( S1S2Data original,
XeSetOfCuts cuts 
)

Add content of another data set after applying a set of cuts.

Parameters:
original pointer to the original data set
cuts pointer to the set of cuts
void S1S2Data::add ( TGraph *  gr  ) 

Add content of a Tgraph.

Parameters:
gr pointer to the graph whose values are S1 and log(S2/S1)
void S1S2Data::add ( double  s1,
int  slice,
double  s2,
int  band 
)

Add an entry corresponding to s1,s2 measurements, and record band/slice indices.

Parameters:
s1 S1 value
slice slice index (couting from 0)
s2 S2 value
band band index (counting from 0)
void S1S2Data::add ( double  s1,
double  s2 
)

Add an entry corresponding to s1,s2 measurements.

Parameters:
s1 S1 value
s2 S2 value
static int S1S2Data::defaultColor ( int  type  )  [static]

get default color, for a given data type

Parameters:
type Data type
void S1S2Data::fillAndMarkBandsAndSlices ( S1S2Bands bands,
bool  mark 
)

fill bands and slices and mark events with their band and slice number

Parameters:
bands S1S2Bands to be filled from which the events are read
mark mark the band and slice numbers for each event
static string S1S2Data::formatContent ( int  type,
double  c,
double  w,
bool  total = false 
) [static]

format count for a table

Parameters:
type Data type
int S1S2Data::getBand ( int  ev  ) 

Return band index of a given event (if defined).

Returns:
index of band, counted from zero
Parameters:
ev event number ,counted from zero
S1S2Data* S1S2Data::getCutData (  ) 

get corresponding data set after cut

Returns:
pointer to the S1S2Data XeObject
int S1S2Data::getDataType (  ) 

Return the data type.

Returns:
One of : AM_BE_DATA, E_GAMMA_DATA , DM_DATA , AM_BE_CUT_DATA , E_GAMMA_CUT_DATA, DM_CUT_DATA, ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND, ALL_BACKGROUNDS, DM_CUT_DATA_INTEGRATED, ALL_BACKGROUNDS_INTEGRATED , DEFAULT_SIGNAL, DEFAULT_SIGNAL_INTEGRATED
XeRun* S1S2Data::getRun (  ) 

get pointer to the run it belongs

Returns:
pointer to the XeRun XeObject
double* S1S2Data::getS1 (  ) 

get all S1 values

Returns:
pointer to array
double S1S2Data::getS1 ( int  ev  ) 

Return S1 value of a given event.

Parameters:
ev event number ,counted from zero
double* S1S2Data::getS2 (  ) 

get all S2 values

Returns:
pointer to array
double S1S2Data::getS2 ( int  ev  ) 

Return S2 value of a given event.

Parameters:
ev event number ,counted from zero
double S1S2Data::getS2overS1 ( int  ev  ) 

Return S2/S1 of a given event.

Parameters:
ev event number ,counted from zero
static string S1S2Data::getShortTypeName ( int  type  )  [static]

return short type type name

Parameters:
type Data type
int S1S2Data::getSlice ( int  ev  ) 

Return slice index of a given event (if defined).

Returns:
index of slice, counted from zero
Parameters:
ev event number ,counted from zero
static string S1S2Data::getTypeName ( int  type  )  [static]

return type name

Parameters:
type Data type
double S1S2Data::getX ( int  ev  ) 

get "X" of a given event, when drawing

Parameters:
ev event number ,counted from zero
double S1S2Data::getY ( int  ev  ) 

get "Y" of a given event, when drawing

Parameters:
ev event number ,counted from zero
static bool S1S2Data::isAfterCuts ( int  type  )  [static]

tell if a data type comes from another one after cuts

Parameters:
type Data type
static bool S1S2Data::isBackground ( int  type,
bool  warn = false 
) [static]

Is the type a background one?

Parameters:
type Data type
warn print a warning statement in case of error
void S1S2Data::make ( S1S2Data original,
DarkMatterCut cut 
)

crate from another data set after applying a dark matter cut

Parameters:
original pointer to the original data set
cuts pointer to the Dark matter cuts
void S1S2Data::make ( S1S2Data original,
XeSetOfCuts cuts 
)

Create from another data set after applying a set of cuts.

Parameters:
original pointer to the original data set
cuts pointer to the set of cuts
void S1S2Data::make ( TGraph *  gr  ) 

Create from content of a Tgraph.

Parameters:
gr pointer to the graph whose values are S1 and log(S2/S1)
static int S1S2Data::mapS1Shape ( int  s1s2Shape  )  [static]

Map S1shape enumeration to S1S2dataType enumeration.

Parameters:
shape either SHAPE_SIGNAL,SHAPE_ER_BACKGROUND,SHAPE_ER_LEAKAGE,SHAPE_NR_BACKGROUND
Returns:
the corresponding item S1S2 data type
EquiContentBins* S1S2Data::newEquiContentS1Bins ( int  ns1,
double  s1Mi,
double  s1Ma 
)

Return S1 bins with equal content, giving S1 edges.

Returns:
pointer to a newly created EquiContentBins XeBins XeObject
Parameters:
nS1 number of S1 slices
s1Mi Lower edge of S1 range
s1Ma upper esge of S1 range
EquiContentBins* S1S2Data::newEquiContentS1Bins ( int  ns1  ) 

Return S1 bins with equal content, with automatic S1 edges.

Returns:
pointer to a newly created EquiContentBins XeBins XeObject
Parameters:
nS1 number of S1 slices
XeGraph* S1S2Data::newGraph ( int  plot = NONE  ) 

Create a graph.

Returns:
pointer to the newly created XeGraph XeObject
Parameters:
plot either NONE, AUTO, LINEAR, or LOG
TTree* S1S2Data::newTree ( S1S2Bands referenceBands = NULL  ) 

Create a TTree with important quantities in.

They are S1,S2, logS2S, flattened. If reference bands are given, slice and band are also given

Returns:
a pointer to a newly created TTree
Parameters:
referenceBands Referance bands used to compute slice and band numver
void S1S2Data::normalize ( double  ratio  ) 

Multiply everything by a constant.

Parameters:
ratio multiplication factor
void S1S2Data::normalizeToEvents ( double  events  ) 

Multiply everything by a constant factor such as the total content will be as requested.

Parameters:
events requested total content
void S1S2Data::printComputedBands ( int  level = 1,
int  bandMax = ALL 
)

Print the data set with the 1st bands.

Parameters:
level print level
bandmax index of highest band to be printed (default: no limit)
bool S1S2Data::printIt ( int  level = 1  )  [virtual]

print the data set

Parameters:
level print level

Reimplemented from DataSet.

void S1S2Data::printSummary ( string  header  ) 

Print a summary of the content , befrore and after cut, and normalisation.

Parameters:
header Entry title in the table
void S1S2Data::setParameters ( XeRun run,
int  type 
)

Internal method to help the constructor by setting vital members.

Parameters:
run XeRun XeObject this data set belongs to
type Data type
static int S1S2Data::typeAfterCut ( int  type  )  [static]

given a data type , return the corresponding type after cuts

Parameters:
type Data type
static int S1S2Data::typeBeforeCut ( int  type  )  [static]

given a data type , return the corresponding type before cuts

Parameters:
type Data type
bool S1S2Data::update (  )  [virtual]

Update min, max, .

..

Reimplemented from DataSet.


The documentation for this class was generated from the following file:
 All Classes Functions Variables

Generated on 10 Apr 2015 for Xephyr by  doxygen 1.6.1