23#include <boost/archive/text_oarchive.hpp>
28#include <yaml-cpp/yaml.h>
53 LOG(error) <<
"WindowFinder::AddInputFile: File \"" << filename <<
"\" cannot be added to the MC triplets chain, "
54 <<
"some errors occurred\n";
66 if (TString(
fExtraCut.GetTitle()).Length()) {
71 TString sUniqueName = cut.GetTitle();
72 sUniqueName.ReplaceAll(
" ",
"");
75 TString canvName = TString(
"canv_") + sUniqueName;
76 TCanvas* canv =
new TCanvas(canvName, canvName, 3000, 2000);
81 padBase[
EExpr::kDxVsX0] =
new TPad(
"padBase_dx_x0",
"padBase_dx_x0", 0.00, 0.50, 0.25, 0.80);
82 padBase[
EExpr::kDxVsY0] =
new TPad(
"padBase_dx_y0",
"padBase_dx_y0", 0.25, 0.50, 0.50, 0.80);
83 padBase[
EExpr::kDyVsX0] =
new TPad(
"padBase_dy_x0",
"padBase_dy_x0", 0.50, 0.50, 0.75, 0.80);
84 padBase[
EExpr::kDyVsY0] =
new TPad(
"padBase_dy_y0",
"padBase_dy_y0", 0.75, 0.50, 1.00, 0.80);
88 padSlices[
EExpr::kDxVsX0] =
new TPad(
"padSlices_dx_x0",
"padSlices_dx_x0", 0.00, 0.00, 0.25, 0.50);
89 padSlices[
EExpr::kDxVsY0] =
new TPad(
"padSlices_dx_y0",
"padSlices_dx_y0", 0.25, 0.00, 0.50, 0.50);
90 padSlices[
EExpr::kDyVsX0] =
new TPad(
"padSlices_dy_x0",
"padSlices_dy_x0", 0.50, 0.00, 0.75, 0.50);
91 padSlices[
EExpr::kDyVsY0] =
new TPad(
"padSlices_dy_y0",
"padSlices_dy_y0", 0.75, 0.00, 1.00, 0.50);
94 padSlices[iExpr]->Draw();
95 padBase[iExpr]->Draw();
99 TPad* padDescr =
new TPad(
"padDescr",
"padDescr", 0.00, 0.80, 1.00, 1.00);
111 exprDxVsX0.
SetTitle(
"dx vs. x0;x0 [cm];dx [cm]");
120 exprDxVsY0.
SetTitle(
"dx vs. y0;y0 [cm];dx [cm]");
129 exprDyVsX0.
SetTitle(
"dy vs. x0;x0 [cm];dy [cm]");
138 exprDyVsY0.
SetTitle(
"dy vs. y0;y0 [cm];dy [cm]");
152 for (
int iP = 0; iP <
fNparams; ++iP) {
169 for (
int iC = 0; iC < (int)
fvpCanvases.size(); ++iC) {
170 TString sCanvName = Form(
"%s_%d.pdf", filename, iC);
201 cut = cut && Form(
"s==%d", iStation - 1);
204 cut = cut && Form(
"abs(q/p)<%f", caIter.
GetMaxQp());
207 cut = cut && (caIter.
GetPrimaryFlag() ?
"processId==0" :
"processId!=0");
219 TPaveText* textL =
new TPaveText(0.01, 0.01, 0.49, 0.99);
220 textL->SetBorderSize(1);
221 textL->SetTextFont(42);
222 textL->SetFillColor(kWhite);
223 textL->SetTextAlign(11);
224 textL->SetTextSize(0.1);
225 textL->AddText(Form(
"Global index of active station: %d", iStation));
226 textL->AddText(Form(
"Track finder iteration: %s", caIter.
GetName().c_str()));
227 textL->AddText(Form(
" - |q/p| < %.2f e(Gev/c)^{-1}", caIter.
GetMaxQp()));
228 textL->AddText(Form(
" - primary: %s", caIter.
GetPrimaryFlag() ?
"yes" :
"no"));
229 if (TString(
fExtraCut.GetTitle()).Length()) {
230 textL->AddText(Form(
"Optional cut: %s",
fExtraCut.GetTitle()));
234 TPaveText* textR =
new TPaveText(0.51, 0.01, 0.99, 0.99);
235 textR->SetBorderSize(1);
236 textR->SetTextFont(42);
237 textR->SetTextAlign(11);
238 textR->SetTextSize(0.1);
239 textR->SetFillColor(kWhite);
240 textR->AddText(
"Distance expressions:");
254 LOG(error) <<
"WindowFinder: failed opening file \"" <<
fsOutputName <<
" for writing search windows\"";
258 boost::archive::text_oarchive oa(ofs);
263 LOG(info) <<
"WindowFinder: processing global active station index " <<
clrs::CLb << iStation <<
clrs::CL
283 LOG(info) << iter.ToString() <<
'\n';
306 assert(eps > 0. && eps <= 1.);
323 for (
auto iSt : vStationIndexes) {
325 LOG(warn) <<
"WindowFinder::SetStationIndexes: attempt to estimate searching window for station with index "
326 << iSt <<
" < 1. This index will be omitted";
Configuration parameter file reader for the CA tracking algorithm (header)
Compile-time constants definition for the CA tracking algorithm.
A reader for the CA parameters from the YAML configuration files.
std::vector< Iteration > ReadCAIterationVector()
Reads CA track finder iterations from YAML node.
void SetMainConfigPath(const std::string &path)
Sets main config file.
A set of parameters for the CA Track finder iteration.
float GetMaxQp() const
Gets max considered q/p for tracks.
bool GetPrimaryFlag() const
Checks flag: true - only primary tracks are searched, false - [all or only secondary?...
const std::string & GetName() const
Gets the name of the iteration.
Class L1SearchWindow defines a parameterisation of hits search window for CA tracking algorithm TODO:...
void SetParamDxMinVsX0(int id, float val)
Sets parameters for dx_min(x0)
void SetParamDyMaxVsX0(int id, float val)
Sets parameters for dy_max(x0)
void SetParamDxMaxVsY0(int id, float val)
Sets parameters for dx_max(y0)
void SetParamDyMinVsX0(int id, float val)
Sets parameters for dy_min(x0)
void SetParamDyMaxVsY0(int id, float val)
Sets parameters for dy_max(y0)
void SetParamDxMinVsY0(int id, float val)
Sets parameters for dx_min(y0)
void SetParamDyMinVsY0(int id, float val)
Sets parameters for dy_min(y0)
void SetParamDxMaxVsX0(int id, float val)
Sets parameters for dx_max(x0)
void SetTag(const char *name)
Sets tag.
constexpr char GNb[]
bold green
constexpr char CLb[]
clear bold