Stores various useful data and functions for functionality of GUI cutter. The only useful funtions for user are AddHistogram, ReadCutAreas, SetOutputFile, and Exec. Other functions and variables are employed automaticaly when needed.
More...
|
void | AddHistogram (TH2D *hist) |
| Add histogram.
|
|
void | ReadCutAreas (const std::string &fileName) |
| Reads cut areas from the file.
|
|
void | SetOutputFile (const std::string &fileName, const bool rewrite=false) |
| Set the file in which cut areas will be written.
|
|
void | Exec () |
| Executable to pass to TPad::AddExec(name, command) to start GUI session.
|
|
void | SetLine (TLine &line, const double x1, const double y1, const double x2, const double y2, const Color_t color=kRed) |
| Sets style to the provided TLine. This function is called automaticaly when needed.
|
|
void | Draw (const bool isRangeFixed=false) |
| Draws histogram with cuts applied. This function is called automaticaly when needed.
|
|
void | ApplyCuts (TH2D *hist) |
| Applies cuts to the passed distribution. This function is called automaticaly when needed.
|
|
void | MouseMotionAction (const double x, const double y) |
| Applies actions to kMouseMotion event. This function is called automaticaly when needed.
|
|
void | Button1DownAction (const double x, const double y) |
| Applies actions to kButton1Down event. This function is called automaticaly when needed.
|
|
void | KeyPressAction (const int button) |
| Applies actions to kKeyPress event. This function is called automaticaly when needed.
|
|
bool | IsBinCut (const int binX, const int binY) |
| Checks whether the bin is cut or not.
|
|
double | Pol1 (const double x, const double par0, const double par1) |
| Needed for angular cut mode. This function is called automaticaly when needed.
|
|
|
std::vector< TH2D * > | hists |
| stores added distributions
|
|
std::vector< TH2D * > | histsWithCuts |
| stores added distributions to which cuts will be applied
|
|
std::vector< unsigned long > | histsOrigIntegral |
| stores integrals of added uncut hists
|
|
unsigned short | currentHist = 0 |
| stores information about the index of the currently displayed histogram
|
|
std::vector< std::vector< bool > > | inputFileCutAreas |
| stores information about cut areas that were read from the input file
|
|
short | currentCutMode = -1 |
| stores information about the current cut mode
|
|
std::vector< double > | rectXMin |
| stores minimum x values of the rectangular cut mode
|
|
std::vector< double > | rectXMax |
| stores maximum x values of the rectangular cut mode
|
|
std::vector< double > | rectYMin |
| stores minimum y values of the rectangular cut mode
|
|
std::vector< double > | rectYMax |
| stores maximum y values of the rectangular cut mode
|
|
std::vector< double > | lineXMin |
| stores minimum x values of x linear cut mode
|
|
std::vector< double > | lineXMax |
| stores maximum x values of x linear cut mode
|
|
std::vector< double > | lineYMin |
| stores minimum y values of y linear cut mode
|
|
std::vector< double > | lineYMax |
| stores maximum y values of y linear cut mode
|
|
std::vector< double > | invRectXMin |
| stores minimum x values of inverse rectangular cut mode
|
|
std::vector< double > | invRectXMax |
| stores maximum x values of inverse rectangular cut mode
|
|
std::vector< double > | invRectYMin |
| stores minimum y values of inverse rectangular cut mode
|
|
std::vector< double > | invRectYMax |
| stores maximum y values of inverse rectangular cut mode
|
|
std::vector< double > | angledLine1X1 |
| stores x1 values of the 1st line of angled line cuts
|
|
std::vector< double > | angledLine1X2 |
| stores x2 values of the 1st line of angled line cuts
|
|
std::vector< double > | angledLine1Y1 |
| stores y1 values of the 1st line of angled line cuts
|
|
std::vector< double > | angledLine1Y2 |
| stores y2 values of the 1st line of angled line cuts
|
|
std::vector< double > | angledLine2X1 |
| stores x1 values of the 2nd line of angled line cuts
|
|
std::vector< double > | angledLine2X2 |
| stores x2 values of the 2nd line of angled line cuts
|
|
std::vector< double > | angledLine2Y1 |
| stores y1 values of the 2nd line of angled line cuts
|
|
std::vector< double > | angledLine2Y2 |
| stores y2 values of the 2nd line of angled line cuts
|
|
std::vector< double > | tanAlpha1 |
| stores tangent of alpha of the 1st line of angled line cuts
|
|
std::vector< double > | tanAlpha2 |
| stores tangent of alpha of the 2nd line of angled line cuts
|
|
std::vector< double > | shiftY1 |
| stores y shifts of the 1st line of angled line cuts
|
|
std::vector< double > | shiftY2 |
| stores y shifts of the 2nd line of angled line cuts
|
|
std::vector< double > | singleBinXCut |
| stores x values of the single pixel cut mode
|
|
std::vector< double > | singleBinYCut |
| stores y values of the single pixel cut mode
|
|
std::array< bool, 5 > | isMin = {true, true, true, true, true} |
| stores information that shows whether the first point was chosen for the given cut mode
|
|
std::string | outputFileName |
| name of the file in which cuts will be written
|
|
bool | isOutputFileSet = false |
| shows whether the output file was set
|
|
bool | isHistogramAdded = false |
| shows whether at least one histogram was added
|
|
bool | isFirstDraw = true |
| checks if the histogram was drawn the first time
|
|
Stores various useful data and functions for functionality of GUI cutter. The only useful funtions for user are AddHistogram, ReadCutAreas, SetOutputFile, and Exec. Other functions and variables are employed automaticaly when needed.
void GUIDistrCutter2D::SetOutputFile |
( |
const std::string & | fileName, |
|
|
const bool | rewrite = false ) |
Set the file in which cut areas will be written.
Data will be written for output file for every bin 0 or 1, i.e. whether the bin was or was not cut. Additionaly, in the beginning of the file number of x bins, x range, number of y bins, y range are written.
- Parameters
-
[in] | fileName | name of the output file in which the data will be written. |
[in] | rewrite | if true the file will be rewritten without warning. Else if the file with the same name exists, the old file will be renamed to (fileName + ".backup") and the data will be written into file (fileName). |