CbmRoot
|
#include <CaToolsWFExpression.h>
Public Member Functions | |
WFExpression ()=delete | |
TMP: number of parameters. | |
WFExpression (TTree *pTree, const char *exprDist, const char *exprParam) | |
WFExpression (const WFExpression &other)=delete | |
Copy constructor. | |
WFExpression (WFExpression &&other)=delete | |
Move constructor. | |
~WFExpression ()=default | |
Destructor. | |
WFExpression & | operator= (const WFExpression &other)=delete |
Copy assignment operator. | |
WFExpression & | operator= (WFExpression &&other)=delete |
Move assignment operator. | |
std::tuple< std::vector< float >, std::vector< float > > | CalculateParameters () |
void | SetCut (const TCut &cut) |
Sets cut, including information on the station and track finder iteration. | |
void | SetEps (float eps) |
Sets fraction of the events, which can be left out of boundaries. | |
void | SetNslices (int nSlices) |
Sets number of slices. | |
void | SetNbins (int nBinsDist, int nBinsParam) |
void | SetPadBase (TPad *pad) |
Sets base pad pointer. | |
void | SetPadSlices (TPad *pad) |
Sets slices pad pointer. | |
void | SetTitle (const char *title) |
Sets title of the histograms. | |
Static Public Attributes | |
static constexpr int | kNpars = 1 |
Private Member Functions | |
std::tuple< float, float, float > | ProcessSlice (int iBinMin, int iBinMax) |
void | GetConstWindowParams () |
Gets window parameterisations assuming there is no dependence from parameter. | |
Private Attributes | |
TTree * | fpTree = nullptr |
Tree to be analyzed. | |
TH2F * | fpHistBase = nullptr |
Base histogram (distance vs. parameter (x0 or y0)) | |
TString | fsExprDist = "" |
Expression along the distance axis. | |
TString | fsExprParam = "" |
Expression along the parameter axis. | |
TCut | fCut = "" |
Cut used to draw and expression. | |
int | fNslices = 8 |
Number of slices along the parameter axis. | |
float | fEps = 0.0005 |
A fraction of triplets, which can be lost. | |
std::vector< float > | fvUpSBoundaries = std::vector<float>(fNslices) |
Upper boundaries for diff. slices. | |
std::vector< float > | fvLoSBoundaries = std::vector<float>(fNslices) |
Lower boundaries for diff. slices. | |
std::vector< float > | fvSCenters = std::vector<float>(fNslices) |
Slice centers. | |
std::vector< float > | fvUpParams = std::vector<float>(kNpars) |
Parameters for max. | |
std::vector< float > | fvLoParams = std::vector<float>(kNpars) |
Parameters for min. | |
int | fNbinsParam = 400 |
Number of bins along the parameter axis. | |
int | fNbinsDist = 400 |
Number of bins along the distance axis. | |
TString | fsTitle = "" |
Title of expression. | |
TString | fsName = "" |
Name of the expression (expr + cut, must be unique!!, TODO: make a check) | |
TPad * | fpPadBase = nullptr |
Pointer to a pad for base histogram. | |
TPad * | fpPadSlices = nullptr |
Pointer to a pad for slices. | |
A helper class for ca::tools::WindowFinder to handle a particular expression (dx vs. x0 etc.) and all related methods to work with it.
Definition at line 26 of file CaToolsWFExpression.h.
|
delete |
TMP: number of parameters.
Default constructor
WFExpression::WFExpression | ( | TTree * | pTree, |
const char * | exprDist, | ||
const char * | exprParam ) |
Constructor
pChain | A pointer to a tree with MC triplets |
exprDist | Expression for distance |
exprParam | Expression for parameter |
Definition at line 23 of file CaToolsWFExpression.cxx.
References fpTree, fsExprDist, and fsExprParam.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
default |
Destructor.
std::tuple< std::vector< float >, std::vector< float > > WFExpression::CalculateParameters | ( | ) |
Calculates parameters
pTree | Pointer to a tree with MC triplets |
Vectors to store the upper and lower boundaries from each slice
Definition at line 37 of file CaToolsWFExpression.cxx.
References fCut, fNbinsDist, fNbinsParam, fNslices, fpHistBase, fpPadBase, fpPadSlices, fpTree, fsExprDist, fsExprParam, fsName, fsTitle, fvLoParams, fvLoSBoundaries, fvSCenters, fvUpParams, fvUpSBoundaries, GetConstWindowParams(), and ProcessSlice().
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
|
private |
Gets window parameterisations assuming there is no dependence from parameter.
Definition at line 141 of file CaToolsWFExpression.cxx.
References fpHistBase, fpPadBase, fvLoParams, fvLoSBoundaries, fvUpParams, fvUpSBoundaries, and kNpars.
Referenced by CalculateParameters().
|
delete |
Copy assignment operator.
|
delete |
Move assignment operator.
|
private |
Process slice
iBinMax | Max bin of the parameter axis to start a projection (date from the bin are included) |
Definition at line 92 of file CaToolsWFExpression.cxx.
References fEps, and fpHistBase.
Referenced by CalculateParameters().
|
inline |
Sets cut, including information on the station and track finder iteration.
Definition at line 62 of file CaToolsWFExpression.h.
References fCut.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
void WFExpression::SetEps | ( | float | eps | ) |
Sets fraction of the events, which can be left out of boundaries.
Definition at line 166 of file CaToolsWFExpression.cxx.
References fEps.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
void WFExpression::SetNbins | ( | int | nBinsDist, |
int | nBinsParam ) |
Sets number of bins
nBinsDist | Number of bins along the distance axis |
nBinsParam | Number of bins along the parameter axis |
Definition at line 188 of file CaToolsWFExpression.cxx.
References fNbinsDist, and fNbinsParam.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
void WFExpression::SetNslices | ( | int | nSlices | ) |
Sets number of slices.
Definition at line 174 of file CaToolsWFExpression.cxx.
References fNslices, fvLoSBoundaries, fvSCenters, and fvUpSBoundaries.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
void WFExpression::SetPadBase | ( | TPad * | pad | ) |
Sets base pad pointer.
Definition at line 198 of file CaToolsWFExpression.cxx.
References fpPadBase.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
void WFExpression::SetPadSlices | ( | TPad * | pad | ) |
Sets slices pad pointer.
Definition at line 206 of file CaToolsWFExpression.cxx.
References fpPadSlices.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
|
inline |
Sets title of the histograms.
Definition at line 82 of file CaToolsWFExpression.h.
References fsTitle.
Referenced by cbm::ca::tools::WindowFinder::CreateSW().
|
private |
Cut used to draw and expression.
Definition at line 108 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetCut().
|
private |
A fraction of triplets, which can be lost.
Definition at line 110 of file CaToolsWFExpression.h.
Referenced by ProcessSlice(), and SetEps().
|
private |
Number of bins along the distance axis.
Definition at line 121 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetNbins().
|
private |
Number of bins along the parameter axis.
Definition at line 120 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetNbins().
|
private |
Number of slices along the parameter axis.
Definition at line 109 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetNslices().
|
private |
Base histogram (distance vs. parameter (x0 or y0))
Definition at line 103 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), GetConstWindowParams(), and ProcessSlice().
|
private |
Pointer to a pad for base histogram.
Definition at line 124 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), GetConstWindowParams(), and SetPadBase().
|
private |
Pointer to a pad for slices.
Definition at line 125 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetPadSlices().
|
private |
Tree to be analyzed.
Definition at line 102 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and WFExpression().
|
private |
Expression along the distance axis.
Definition at line 105 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and WFExpression().
|
private |
Expression along the parameter axis.
Definition at line 106 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and WFExpression().
|
private |
Name of the expression (expr + cut, must be unique!!, TODO: make a check)
Definition at line 123 of file CaToolsWFExpression.h.
Referenced by CalculateParameters().
|
private |
Title of expression.
Definition at line 122 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetTitle().
|
private |
Parameters for min.
Definition at line 117 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and GetConstWindowParams().
|
private |
Lower boundaries for diff. slices.
Definition at line 114 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), GetConstWindowParams(), and SetNslices().
|
private |
Slice centers.
Definition at line 115 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and SetNslices().
|
private |
Parameters for max.
Definition at line 116 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), and GetConstWindowParams().
|
private |
Upper boundaries for diff. slices.
Definition at line 113 of file CaToolsWFExpression.h.
Referenced by CalculateParameters(), GetConstWindowParams(), and SetNslices().
|
staticconstexpr |
Definition at line 28 of file CaToolsWFExpression.h.
Referenced by GetConstWindowParams().