| 
    GammaCombo
    Rev:Unversioneddirectory
    
   | 
 
Class that makes CL intervals from 1-CL histograms. More...
#include <CLIntervalMaker.h>

Public Member Functions | |
| void | calcCLintervals () | 
| Calculate the CL intervals.  More... | |
| CLIntervalMaker (OptParser *arg, const TH1F &pvalues) | |
| void | findMaxima (float pValueThreshold) | 
| Finds the maxima of the _pvalue histogram and fills _clintervals1sigma and _clintervals2sigma.  More... | |
| vector< CLInterval > & | getClintervals1sigma () | 
| vector< CLInterval > & | getClintervals2sigma () | 
| void | print () | 
| void | provideMorePreciseMaximum (float value, TString method) | 
| Add a maximum (e.g.  More... | |
| ~CLIntervalMaker () | |
Private Member Functions | |
| bool | binsOnSameSide (int i, float y) const | 
| Check if the two bins i and (i+1) of the _pvalues histogram are on the same side of y.  More... | |
| float | binToValue (int bin) const | 
| int | checkNeighboringBins (int i, float y) const | 
| Tries to find a bin i such that the two bins i and (i+1) are not on the same side of y.  More... | |
| void | findRawIntervals (float pvalue, vector< CLInterval > &clis) | 
| Finds the raw interval boundaries corresponding to the provided p-value The raw intervals are just connected sections where all bins of the p-value histogram _pvalues lie above the given threshold.  More... | |
| void | findRawIntervalsForCentralValues (float pvalue, vector< CLInterval > &clis) | 
| Find the interval boundaries corresponding to the central values already saved in _clintervals1sigma or _clintervals2sigma, and to the number of sigmas given.  More... | |
| void | improveIntervalsLine (vector< CLInterval > &clis) const | 
| Improve the intervals through an interpolation with a straight line.  More... | |
| void | improveIntervalsPol2fit (vector< CLInterval > &clis) const | 
| Improve the intervals through an fit with a pol2.  More... | |
| bool | interpolateLine (const TH1F *h, int i, float y, float &val) const | 
| Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.  More... | |
| bool | interpolatePol2fit (const TH1F *h, int i, float y, float central, bool upper, float &val, float &err) const | 
| Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.  More... | |
| bool | isInInterval (int binid, float pvalue) const | 
| Checks if a bin is in a CL interval: it is, when it's pvalue is above the provided threshold.  More... | |
| float | pq (float p0, float p1, float p2, float y, int whichSol) const | 
| Solve a quadratic equation by means of a modified pq formula:  
 .  More...  | |
| void | removeBadIntervals () | 
| Remove bad intervals, where findRawIntervalsForCentralValues() couldn't find interval boundaries corresponding to the central value and pvalue given.  More... | |
| bool | similarMaximumExists (float value) const | 
| void | storeRawInterval (int binidLo, int binidHi, float pvalue, vector< CLInterval > &clis) | 
| Stores a confidence interval found by findRawIntervalsForCentralValues().  More... | |
| int | valueToBin (float val) const | 
Private Attributes | |
| OptParser * | _arg | 
| command line arguments  More... | |
| vector< CLInterval > | _clintervals1sigma | 
| 1 sigma intervals  More... | |
| vector< CLInterval > | _clintervals2sigma | 
| 2 sigma intervals  More... | |
| const TH1F & | _pvalues | 
| the pvalue histogram  More... | |
Class that makes CL intervals from 1-CL histograms.
Definition at line 23 of file CLIntervalMaker.h.
| CLIntervalMaker::CLIntervalMaker | ( | OptParser * | arg, | 
| const TH1F & | pvalues | ||
| ) | 
Definition at line 3 of file CLIntervalMaker.cpp.
| CLIntervalMaker::~CLIntervalMaker | ( | ) | 
Definition at line 12 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Check if the two bins i and (i+1) of the _pvalues histogram are on the same side of y.
| i | - bin | 
| y | - y value | 
Definition at line 245 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Definition at line 503 of file CLIntervalMaker.cpp.
| void CLIntervalMaker::calcCLintervals | ( | ) | 
Calculate the CL intervals.
Definition at line 522 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Tries to find a bin i such that the two bins i and (i+1) are not on the same side of y.
If i does already satisfy the requirement, i is returned. Else also the left and right neighbor of i are checked, and returned if they satisfy the requirement.
| i | - bin ID of _pvalues histogram | 
| y | - y value | 
Definition at line 261 of file CLIntervalMaker.cpp.
| void CLIntervalMaker::findMaxima | ( | float | pValueThreshold | ) | 
Finds the maxima of the _pvalue histogram and fills _clintervals1sigma and _clintervals2sigma.
Only accepts maxima that are not similar to existing ones, that were, e.g., set by addMaximum().
| pValueThreshold | - ignore maxima under this pvalue threshold to reject low statistics plugin crap | 
Definition at line 51 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Finds the raw interval boundaries corresponding to the provided p-value The raw intervals are just connected sections where all bins of the p-value histogram _pvalues lie above the given threshold.
| pvalue | - pvalue of the intervals to find | 
| clis | - saves intervals into this vector of confidence intervals, usually _clintervals1sigma or _clintervals2sigma | 
Definition at line 151 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Find the interval boundaries corresponding to the central values already saved in _clintervals1sigma or _clintervals2sigma, and to the number of sigmas given.
Saves the result into the intevals in _clintervals1sigma or _clintervals2sigma.
| pvalue | - pvalue of the intervals to find | 
| clis | - list of confidence intervals holding the central value | 
Definition at line 185 of file CLIntervalMaker.cpp.
      
  | 
  inline | 
Definition at line 31 of file CLIntervalMaker.h.
      
  | 
  inline | 
Definition at line 32 of file CLIntervalMaker.h.
      
  | 
  private | 
Improve the intervals through an interpolation with a straight line.
| clis | - list of confidence intervals holding the central value and min and max boundaries | 
Definition at line 304 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Improve the intervals through an fit with a pol2.
| clis | - list of confidence intervals holding the central value and min and max boundaries | 
Definition at line 336 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.
Interpolates by means of a straight line between two known points.
| h | - the histogram to be interpolated | 
| i | - interpolate around this bin. Must be a bin such that i and i+1 are above and below val | 
| y | - the y position we want to find the interpolated x for | 
| val | - Return value: interpolated x position | 
Definition at line 283 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.
Interpolates by means of fitting a second grade polynomial to up to five adjacent points. Because that's giving us two solutions, we use the central value and knowledge about if it is supposed to be an upper or lower boundary to pick one.
| h | - the histogram to be interpolated | 
| i | - interpolate around this bin. Must be a bin such that i and i+1 are above and below val | 
| y | - the y position we want to find the interpolated x for | 
| central | - Central value of the solution we're trying to get the CL interval for. | 
| upper | - Set to true if we're computing an upper interval boundary. | 
| val | - Return value: interpolated x position | 
| err | - Return value: estimated interpolation error | 
Definition at line 389 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Checks if a bin is in a CL interval: it is, when it's pvalue is above the provided threshold.
| binid | - bin id of _pvalues histogram | 
| pvalue | - the p value threshold | 
Definition at line 98 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Solve a quadratic equation by means of a modified pq formula:
.
Definition at line 367 of file CLIntervalMaker.cpp.
| void CLIntervalMaker::print | ( | ) | 
Definition at line 509 of file CLIntervalMaker.cpp.
| void CLIntervalMaker::provideMorePreciseMaximum | ( | float | value, | 
| TString | method | ||
| ) | 
Add a maximum (e.g.
found by the Prob method) to calculate the confidence intervals around it.
| value | - parameter value at the maximum | 
| method | - details on how this maximum was found | 
Definition at line 22 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Remove bad intervals, where findRawIntervalsForCentralValues() couldn't find interval boundaries corresponding to the central value and pvalue given.
Definition at line 223 of file CLIntervalMaker.cpp.
      
  | 
  private | 
      
  | 
  private | 
Stores a confidence interval found by findRawIntervalsForCentralValues().
| binidHi | - bin id of _pvalues histogram | 
| binidLo | - bin id of _pvalues histogram | 
| pvalue | - p-value threshold, accept points into interval if their p-value is above | 
| clis | - vector of confidence intervals, usually _clintervals1sigma or _clintervals2sigma | 
Definition at line 111 of file CLIntervalMaker.cpp.
      
  | 
  private | 
Definition at line 497 of file CLIntervalMaker.cpp.
      
  | 
  private | 
command line arguments
Definition at line 54 of file CLIntervalMaker.h.
      
  | 
  private | 
1 sigma intervals
Definition at line 56 of file CLIntervalMaker.h.
      
  | 
  private | 
2 sigma intervals
Definition at line 57 of file CLIntervalMaker.h.
      
  | 
  private | 
the pvalue histogram
Definition at line 55 of file CLIntervalMaker.h.
 1.8.12