CbmRoot
Loading...
Searching...
No Matches
cbm::ca::tools::WFExpression Class Reference

#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.
 
WFExpressionoperator= (const WFExpression &other)=delete
 Copy assignment operator.
 
WFExpressionoperator= (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.
 

Detailed Description

A helper class for ca::tools::WindowFinder to handle a particular expression (dx vs. x0 etc.) and all related methods to work with it.

Note
DISTANCE (expression, axis) – dx or dy, signed distance between the extrapolated point and real MC-point PARAMETER (expression, axis) – x0 or y0, a parameter, vs. which the distance is studied

Definition at line 26 of file CaToolsWFExpression.h.

Constructor & Destructor Documentation

◆ WFExpression() [1/4]

cbm::ca::tools::WFExpression::WFExpression ( )
delete

TMP: number of parameters.

Default constructor

◆ WFExpression() [2/4]

WFExpression::WFExpression ( TTree * pTree,
const char * exprDist,
const char * exprParam )

Constructor

Parameters
pChainA pointer to a tree with MC triplets
exprDistExpression for distance
exprParamExpression for parameter

Definition at line 23 of file CaToolsWFExpression.cxx.

References fpTree, fsExprDist, and fsExprParam.

◆ WFExpression() [3/4]

cbm::ca::tools::WFExpression::WFExpression ( const WFExpression & other)
delete

Copy constructor.

◆ WFExpression() [4/4]

cbm::ca::tools::WFExpression::WFExpression ( WFExpression && other)
delete

Move constructor.

◆ ~WFExpression()

cbm::ca::tools::WFExpression::~WFExpression ( )
default

Destructor.

Member Function Documentation

◆ CalculateParameters()

std::tuple< std::vector< float >, std::vector< float > > WFExpression::CalculateParameters ( )

Calculates parameters

Parameters
pTreePointer to a tree with MC triplets
Returns
A tuple:
  • vector of parameters for upper bound
  • vector of parameters for lower bound

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().

◆ GetConstWindowParams()

void WFExpression::GetConstWindowParams ( )
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().

◆ operator=() [1/2]

WFExpression & cbm::ca::tools::WFExpression::operator= ( const WFExpression & other)
delete

Copy assignment operator.

◆ operator=() [2/2]

WFExpression & cbm::ca::tools::WFExpression::operator= ( WFExpression && other)
delete

Move assignment operator.

◆ ProcessSlice()

std::tuple< float, float, float > WFExpression::ProcessSlice ( int iBinMin,
int iBinMax )
private

Process slice

Parameters
iBinMaxMax bin of the parameter axis to start a projection (date from the bin are included)
Returns
Tuple: lower bound, upper bound, slice center

Definition at line 92 of file CaToolsWFExpression.cxx.

References fEps, and fpHistBase.

Referenced by CalculateParameters().

◆ SetCut()

void cbm::ca::tools::WFExpression::SetCut ( const TCut & cut)
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().

◆ SetEps()

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().

◆ SetNbins()

void WFExpression::SetNbins ( int nBinsDist,
int nBinsParam )

Sets number of bins

Parameters
nBinsDistNumber of bins along the distance axis
nBinsParamNumber 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().

◆ SetNslices()

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().

◆ SetPadBase()

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().

◆ SetPadSlices()

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().

◆ SetTitle()

void cbm::ca::tools::WFExpression::SetTitle ( const char * title)
inline

Sets title of the histograms.

Definition at line 82 of file CaToolsWFExpression.h.

References fsTitle.

Referenced by cbm::ca::tools::WindowFinder::CreateSW().

Member Data Documentation

◆ fCut

TCut cbm::ca::tools::WFExpression::fCut = ""
private

Cut used to draw and expression.

Definition at line 108 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetCut().

◆ fEps

float cbm::ca::tools::WFExpression::fEps = 0.0005
private

A fraction of triplets, which can be lost.

Definition at line 110 of file CaToolsWFExpression.h.

Referenced by ProcessSlice(), and SetEps().

◆ fNbinsDist

int cbm::ca::tools::WFExpression::fNbinsDist = 400
private

Number of bins along the distance axis.

Definition at line 121 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetNbins().

◆ fNbinsParam

int cbm::ca::tools::WFExpression::fNbinsParam = 400
private

Number of bins along the parameter axis.

Definition at line 120 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetNbins().

◆ fNslices

int cbm::ca::tools::WFExpression::fNslices = 8
private

Number of slices along the parameter axis.

Definition at line 109 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetNslices().

◆ fpHistBase

TH2F* cbm::ca::tools::WFExpression::fpHistBase = nullptr
private

Base histogram (distance vs. parameter (x0 or y0))

Definition at line 103 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), GetConstWindowParams(), and ProcessSlice().

◆ fpPadBase

TPad* cbm::ca::tools::WFExpression::fpPadBase = nullptr
private

Pointer to a pad for base histogram.

Definition at line 124 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), GetConstWindowParams(), and SetPadBase().

◆ fpPadSlices

TPad* cbm::ca::tools::WFExpression::fpPadSlices = nullptr
private

Pointer to a pad for slices.

Definition at line 125 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetPadSlices().

◆ fpTree

TTree* cbm::ca::tools::WFExpression::fpTree = nullptr
private

Tree to be analyzed.

Definition at line 102 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and WFExpression().

◆ fsExprDist

TString cbm::ca::tools::WFExpression::fsExprDist = ""
private

Expression along the distance axis.

Definition at line 105 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and WFExpression().

◆ fsExprParam

TString cbm::ca::tools::WFExpression::fsExprParam = ""
private

Expression along the parameter axis.

Definition at line 106 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and WFExpression().

◆ fsName

TString cbm::ca::tools::WFExpression::fsName = ""
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().

◆ fsTitle

TString cbm::ca::tools::WFExpression::fsTitle = ""
private

Title of expression.

Definition at line 122 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetTitle().

◆ fvLoParams

std::vector<float> cbm::ca::tools::WFExpression::fvLoParams = std::vector<float>(kNpars)
private

Parameters for min.

Definition at line 117 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and GetConstWindowParams().

◆ fvLoSBoundaries

std::vector<float> cbm::ca::tools::WFExpression::fvLoSBoundaries = std::vector<float>(fNslices)
private

Lower boundaries for diff. slices.

Definition at line 114 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), GetConstWindowParams(), and SetNslices().

◆ fvSCenters

std::vector<float> cbm::ca::tools::WFExpression::fvSCenters = std::vector<float>(fNslices)
private

Slice centers.

Definition at line 115 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and SetNslices().

◆ fvUpParams

std::vector<float> cbm::ca::tools::WFExpression::fvUpParams = std::vector<float>(kNpars)
private

Parameters for max.

Definition at line 116 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), and GetConstWindowParams().

◆ fvUpSBoundaries

std::vector<float> cbm::ca::tools::WFExpression::fvUpSBoundaries = std::vector<float>(fNslices)
private

Upper boundaries for diff. slices.

Definition at line 113 of file CaToolsWFExpression.h.

Referenced by CalculateParameters(), GetConstWindowParams(), and SetNslices().

◆ kNpars

int cbm::ca::tools::WFExpression::kNpars = 1
staticconstexpr

Definition at line 28 of file CaToolsWFExpression.h.

Referenced by GetConstWindowParams().


The documentation for this class was generated from the following files: