CbmRoot
|
TODO: ... write an instruction ... More...
#include <CaToolsWindowFinder.h>
Public Member Functions | |
WindowFinder () | |
Default constructor. | |
virtual | ~WindowFinder ()=default |
Destructor. | |
WindowFinder (const WindowFinder &)=delete | |
Copy and move are forbidden. | |
WindowFinder (WindowFinder &&)=delete | |
WindowFinder & | operator= (const WindowFinder &)=delete |
WindowFinder & | operator= (WindowFinder &&)=delete |
void | AddInputFile (const char *filename) |
void | DumpCanvasesToPdf (const char *filename="WFLog") const |
Saves canvases to a set of canvases to pdf. | |
void | Process (Option_t *opt="") |
void | ReadTrackingIterationsFromYAML (const char *filename) |
Reads the iterations from YAML config. | |
void | SetBinning (int nBinsX, int nBinsY) |
void | SetEpsilon (float eps) |
Sets a fraction of triplets (doublets), which can be omitted by the window. | |
void | SetExtraCut (const TCut &cut) |
void | SetNslices (int nSlices) |
void | SetOutputName (const char *filename) |
void | SetStationIndexes (const std::vector< int > &vStationIndexes) |
void | SetTarget (double x, double y, double z) |
Static Public Attributes | |
static constexpr const char * | kTreeName = "t" |
Name of the input MC triplets tree. | |
Private Member Functions | |
ca::SearchWindow | CreateSW (int iStation, const ca::Iteration &caIter) |
Creates a search window for a selected station and iteration. | |
const char * | GetDistExpr (EExpr expr) const |
Returns expression for dx or dy to be drawn in a tree. | |
TCut | GetTrackSelectionCut (int iStation, const ca::Iteration &caIter) const |
void | PrintCaseInformation (TPad *pPad, int iStation, const ca::Iteration &caIter) const |
ClassDef (WindowFinder, 0) | |
Private Attributes | |
int | fNparams = 1 |
number of parameters of the searching window | |
std::string | fsOutputName = "SearchWindows.dat" |
Name for output file with estimated search windows. | |
std::vector< ca::Iteration > | fvCaIters = {} |
Tracking iterations. | |
std::vector< int > | fvStationIndexes = {} |
Global indexes of active stations to find the windows. | |
std::array< double, 3 > | fTargetPos = {0} |
Target position {x, y, z} [cm]. | |
TCut | fExtraCut = TCut("") |
Optional cut on the triplets/doublets. | |
int | fNbinsX = 400 |
Number of bins for the X axis of the distribution. | |
int | fNbinsY = 400 |
Number of bins for the Y axis of the distribution. | |
int | fNslices = 1 |
Number of slices along the X axis. | |
float | fEps = 0.001 |
Fraction of triplets (doublets), which can be omitted. | |
TChain * | fpMcTripletsTree = nullptr |
Chain of trees containing MC triplets, generated in CbmL1 Performance. | |
std::vector< TCanvas * > | fvpCanvases |
TODO: ... write an instruction ...
Definition at line 46 of file CaToolsWindowFinder.h.
WindowFinder::WindowFinder | ( | ) |
Default constructor.
Definition at line 41 of file CaToolsWindowFinder.cxx.
References cbm::algo::ca::constants::clrs::CL, cbm::algo::ca::constants::clrs::CLb, and cbm::algo::ca::constants::clrs::GNb.
|
virtualdefault |
Destructor.
|
delete |
Copy and move are forbidden.
|
delete |
void WindowFinder::AddInputFile | ( | const char * | filename | ) |
Adds an input file with a tree object of MC triplets
Definition at line 48 of file CaToolsWindowFinder.cxx.
References fpMcTripletsTree.
|
private |
|
private |
Creates a search window for a selected station and iteration.
dx vs. x0, dx vs. y0, dy vs. x0, dy vs. y0
projections
Definitions of dx and dy, cut
Definition at line 60 of file CaToolsWindowFinder.cxx.
References cbm::ca::tools::WFExpression::CalculateParameters(), fEps, fExtraCut, fNbinsX, fNbinsY, fNparams, fNslices, fpMcTripletsTree, fvCaIters, fvpCanvases, GetDistExpr(), cbm::algo::ca::Iteration::GetName(), GetTrackSelectionCut(), cbm::ca::tools::kDxVsX0, cbm::ca::tools::kDxVsY0, cbm::ca::tools::kDyVsX0, cbm::ca::tools::kDyVsY0, cbm::ca::tools::kEND, PrintCaseInformation(), cbm::ca::tools::WFExpression::SetCut(), cbm::ca::tools::WFExpression::SetEps(), cbm::ca::tools::WFExpression::SetNbins(), cbm::ca::tools::WFExpression::SetNslices(), cbm::ca::tools::WFExpression::SetPadBase(), cbm::ca::tools::WFExpression::SetPadSlices(), cbm::algo::ca::SearchWindow::SetParamDxMaxVsX0(), cbm::algo::ca::SearchWindow::SetParamDxMaxVsY0(), cbm::algo::ca::SearchWindow::SetParamDxMinVsX0(), cbm::algo::ca::SearchWindow::SetParamDxMinVsY0(), cbm::algo::ca::SearchWindow::SetParamDyMaxVsX0(), cbm::algo::ca::SearchWindow::SetParamDyMaxVsY0(), cbm::algo::ca::SearchWindow::SetParamDyMinVsX0(), cbm::algo::ca::SearchWindow::SetParamDyMinVsY0(), cbm::algo::ca::SearchWindow::SetTag(), and cbm::ca::tools::WFExpression::SetTitle().
Referenced by Process().
void WindowFinder::DumpCanvasesToPdf | ( | const char * | filename = "WFLog" | ) | const |
Saves canvases to a set of canvases to pdf.
Definition at line 167 of file CaToolsWindowFinder.cxx.
References fvpCanvases.
|
private |
Returns expression for dx or dy to be drawn in a tree.
Definition at line 177 of file CaToolsWindowFinder.cxx.
References fTargetPos, cbm::ca::tools::kDxVsX0, cbm::ca::tools::kDxVsY0, cbm::ca::tools::kDyVsX0, and cbm::ca::tools::kDyVsY0.
Referenced by CreateSW(), and PrintCaseInformation().
|
private |
Gets a cut for doublets/triplets defined by station and a tracking iteration
iStation | Global index of an active station |
caIter | CA track finder iteration object |
Definition at line 192 of file CaToolsWindowFinder.cxx.
References cbm::algo::ca::Iteration::GetMaxQp(), and cbm::algo::ca::Iteration::GetPrimaryFlag().
Referenced by CreateSW().
|
delete |
|
delete |
|
private |
Prints information on the dx and dy expression as well as used cuts on the pad
pPad | A pad to print the information |
iStation | Global index of an active station |
caIter | CA track finder iteration object |
Definition at line 215 of file CaToolsWindowFinder.cxx.
References fExtraCut, GetDistExpr(), cbm::algo::ca::Iteration::GetMaxQp(), cbm::algo::ca::Iteration::GetName(), cbm::algo::ca::Iteration::GetPrimaryFlag(), cbm::ca::tools::kDxVsY0, and cbm::ca::tools::kDyVsY0.
Referenced by CreateSW().
void WindowFinder::Process | ( | Option_t * | opt = "" | ) |
Process a tree (TEST)
opt | Define options to process: 'T' - triplets are used instead of doublets |
Definition at line 250 of file CaToolsWindowFinder.cxx.
References cbm::algo::ca::constants::clrs::CL, cbm::algo::ca::constants::clrs::CLb, CreateSW(), fNparams, fsOutputName, fvCaIters, and fvStationIndexes.
void WindowFinder::ReadTrackingIterationsFromYAML | ( | const char * | filename | ) |
Reads the iterations from YAML config.
Definition at line 273 of file CaToolsWindowFinder.cxx.
References fvCaIters, cbm::algo::ca::ConfigReader::ReadCAIterationVector(), and cbm::algo::ca::ConfigReader::SetMainConfigPath().
void WindowFinder::SetBinning | ( | int | nBinsX, |
int | nBinsY ) |
Sets binning of the dx (dy) distribution
nBinsX | Number of bins for the x-axis |
nBinsY | Number of bins for the y-axis |
Definition at line 294 of file CaToolsWindowFinder.cxx.
void WindowFinder::SetEpsilon | ( | float | eps | ) |
Sets a fraction of triplets (doublets), which can be omitted by the window.
Definition at line 304 of file CaToolsWindowFinder.cxx.
References fEps.
|
inline |
Sets additional cut (can be useful to reduce distribution contamination by outliers)
cut | A cut object |
Definition at line 89 of file CaToolsWindowFinder.h.
References fExtraCut.
void WindowFinder::SetNslices | ( | int | nSlices | ) |
Sets number of slices along the x-axiso If the number of slices larger then 1, the window bounds will be fitted with a function (...which TODO). Otherwise, the bounds will be represented with constants (independent from x0 or y0)
Definition at line 312 of file CaToolsWindowFinder.cxx.
References fNslices.
|
inline |
Sets name of output file with search windows array
filename | Name of the file |
Definition at line 100 of file CaToolsWindowFinder.h.
References fsOutputName.
void WindowFinder::SetStationIndexes | ( | const std::vector< int > & | vStationIndexes | ) |
Define indexes of stations for which windows are needed
Definition at line 320 of file CaToolsWindowFinder.cxx.
References fvStationIndexes.
void WindowFinder::SetTarget | ( | double | x, |
double | y, | ||
double | z ) |
Sets components of the target center position
x | Position x-component [cm] |
y | Position y-component [cm] |
z | Position z-component [cm] |
Definition at line 335 of file CaToolsWindowFinder.cxx.
References fTargetPos, x, and y.
|
private |
Fraction of triplets (doublets), which can be omitted.
Definition at line 151 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and SetEpsilon().
|
private |
Optional cut on the triplets/doublets.
Definition at line 145 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), PrintCaseInformation(), and SetExtraCut().
|
private |
Number of bins for the X axis of the distribution.
Definition at line 148 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and SetBinning().
|
private |
Number of bins for the Y axis of the distribution.
Definition at line 149 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and SetBinning().
|
private |
number of parameters of the searching window
Definition at line 136 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and Process().
|
private |
Number of slices along the X axis.
Definition at line 150 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and SetNslices().
|
private |
Chain of trees containing MC triplets, generated in CbmL1 Performance.
Definition at line 153 of file CaToolsWindowFinder.h.
Referenced by AddInputFile(), and CreateSW().
|
private |
Name for output file with estimated search windows.
Definition at line 138 of file CaToolsWindowFinder.h.
Referenced by Process(), and SetOutputName().
|
private |
Target position {x, y, z} [cm].
Definition at line 143 of file CaToolsWindowFinder.h.
Referenced by GetDistExpr(), and SetTarget().
|
private |
Tracking iterations.
Definition at line 141 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), Process(), and ReadTrackingIterationsFromYAML().
|
private |
Definition at line 155 of file CaToolsWindowFinder.h.
Referenced by CreateSW(), and DumpCanvasesToPdf().
|
private |
Global indexes of active stations to find the windows.
Definition at line 142 of file CaToolsWindowFinder.h.
Referenced by Process(), and SetStationIndexes().
|
staticconstexpr |
Name of the input MC triplets tree.
Definition at line 49 of file CaToolsWindowFinder.h.