BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
makett.C File Reference
#include "BmnAlignModels.h"
#include "BmnAlignReport.h"
#include "BmnAlignTestTask.h"
#include "BmnAligner.h"
#include "fairlogger/Logger.h"
#include <TRandom3.h>
#include <fstream>
#include <string>
Include dependency graph for makett.C:

Go to the source code of this file.

Macros

#define DEF_THREADS_COUNT   16

Functions

int makett (const char *fileListPath="/home/igor/bmnroot/align_new/cfg/run9/9555.noa_rlerr.list", const char *testTaskPath="/home/igor/data.cache/tt9555.r9_lin3.00.root", const char *testSolPath="/home/igor/data.cache/tt9555.r9_lin3.00.solution.json", const char *constraintsPath="/home/igor/bmnroot/align_new/cfg/constraints/cnstr_r9_lin3.json", const char *truthSigmaPath="/home/igor/bmnroot/align_new/cfg/presigmas/psg_r9_lin3-testTruth.json", Double_t sigmaScale=0.25, Bool_t showTask=kTRUE, UInt_t seed=137)
 Build a synthetic alignment task with a known answer.

Macro Definition Documentation

◆ DEF_THREADS_COUNT

#define DEF_THREADS_COUNT   16

Definition at line 26 of file makett.C.

Referenced by makett().

Function Documentation

◆ makett()

int makett ( const char * fileListPath = "/home/igor/bmnroot/align_new/cfg/run9/9555.noa_rlerr.list",
const char * testTaskPath = "/home/igor/data.cache/tt9555.r9_lin3.00.root",
const char * testSolPath = "/home/igor/data.cache/tt9555.r9_lin3.00.solution.json",
const char * constraintsPath = "/home/igor/bmnroot/align_new/cfg/constraints/cnstr_r9_lin3.json",
const char * truthSigmaPath = "/home/igor/bmnroot/align_new/cfg/presigmas/psg_r9_lin3-testTruth.json",
Double_t sigmaScale = 0.25,
Bool_t showTask = kTRUE,
UInt_t seed = 137 )

Reads real tracks, fits straight lines to them, displaces the detector by a randomly drawn solution and writes out hits lying exactly on the displaced model, together with the solution that produced them. Feeding the result back into align.C tests the solver against a truth instead of against itself.

The truth is drawn from the truth sigmas and obeys the constraints (see BmnAlignTestTask), so align.C must use the same constraints file on the task. The solver's own presigmas play no part here: both aligners below take the truth sigmas as their presigmas, the generator to draw the truth from them, the viewer only to display the task.

Parameters
fileListPathtext file listing the source .root files, one per line
testTaskPath.root file to write the synthetic hits into
testSolPath.json file to write the truth solution into
constraintsPath.json constraints, the same align.C will use on the task
truthSigmaPath.json truth sigmas in the presigma format; every composite parameter not fixed by a constraint needs one, see BmnAlignPriors::Check()
sigmaScaletruth StdDev = truth sigma * sigmaScale, 0 for the nominal geometry
showTaskkTRUE to reload the generated task and draw it afterwards
seedPRNG seed for the truth and the noise, 0 for a new one each run (it is logged)
Returns
0 on success, -1 if any stage failed

Definition at line 54 of file makett.C.

References DEF_THREADS_COUNT, BmnAlignReport::Draw(), BmnDetectorModel::Init(), BmnAligner::Initialized(), TRandom::Integer(), BmnAlignTestTask::kHitErrors, BmnAligner::LoadSolution(), BmnAlignTestTask::Make(), BmnAligner::PrepareData(), and BmnAlignReport::Results().

Here is the call graph for this function: