40 LOG(info) << fName <<
": configuration file was not provided. Using default settings";
53 std::set<MaterialSlice> mSlice;
57 for (
const auto* pIf : pIfs->GetActiveInterfaces()) {
58 auto detName = pIf->GetDetectorName();
59 LOG(info) << fName <<
": Generating material budget map for " << detName;
60 int nSt = pIf->GetNtrackingStations();
61 for (
int iSt = 0; iSt < nSt; ++iSt) {
63 slice.
fName = detName + Form(
"_station_%d", iSt);
64 slice.
fRefZ = pIf->GetZref(iSt);
65 slice.
fMinZ = pIf->GetZmin(iSt);
66 slice.
fMaxZ = pIf->GetZmax(iSt);
67 slice.
fMaxXY = std::max(std::fabs(pIf->GetXmax(iSt)), std::fabs(pIf->GetYmax(iSt)));
73 for (
auto it = mSlice.begin(); it != mSlice.end(); ++it) {
74 LOG(info) <<
"Creating material map for " << it->fName;
75 double z1 = it->fMaxZ;
77 auto itNext = std::next(it, 1);
78 if (itNext != mSlice.end()) {
81 double zRef = it->fRefZ;
82 double zNew = 0.5 * (z1 + z2);
84 int nBins =
static_cast<int>(std::ceil(2. * xyMax /
fConfig.
fPitch));
86 LOG(fatal) << fName <<
": selected pitch " <<
fConfig.
fPitch <<
" gives wrong number of bins = " << nBins;
96 LOG(error) << fName <<
": tracking detector interfaces are not defined, so the materials maps cannot be "
97 <<
"generated for the tracking stations";
103 LOG(info) <<
"Creating material map for " << slice.fName;
105 LOG(warn) << fName <<
": Material for slice " << slice.fName <<
" was already prepared. "
106 <<
"Please, check your configuration file";
110 double zMin = slice.fMinZ;
111 double zMax = slice.fMaxZ;
112 double zRef = slice.fRefZ;
114 int nBins =
static_cast<int>(std::ceil(2. * xyMax /
fConfig.
fPitch));
117 LOG(fatal) << fName <<
": selected pitch " <<
fConfig.
fPitch <<
" gives wrong number of bins = " << nBins;
139 for (
const auto& [name, material] :
fmMaterial) {
140 double zMin = material.GetZmin();
141 double zMax = material.GetZmax();
142 std::string title = Form(
"Material thickness in X_{0}, z region [%.2f,%.2f] cm (%s)", zMin, zMax, name.c_str());
144 title +=
"; horizontal projection";
147 title += Form(
"; radial projection from z=%f cm",
fTargetZ);
A FAIR-task to generate material maps (header)
Target property initialization and access in CBM (source)
Base abstract class for tracking detector interface to L1 (implementation of Checker)
Different ROOT utility functions for the KF-framework (header)
Steer class for executing the material budget maps generator independently from tracking.
InitStatus ReInit()
Re-initializer.
Config fConfig
Offset from target to start generating mat. maps [cm].
std::map< std::string, MaterialMap > fmMaterial
Material budget maps.
CbmGenerateMaterialMaps()
Default constructor.
static constexpr double kXYoffset
void Finish()
Finish function.
std::string fsOutputFile
Output file name.
double fTargetZ
z-coordinate of the target center
std::unique_ptr<::kf::tools::MaterialMapFactory > fpMaterialFactory
Material factory instance.
InitStatus Init()
Initializer.
void WriteMaterialMaps()
Writes material budget maps to file.
std::string fsUserConfig
User configuration file.
Data class with information on a STS local track.
static CbmTrackingDetectorInterfaceInit * Instance()
Returns a pointer to the class instance.
static Target * Instance()
Instance access.
double GetZ() const
Gets target center z-coordinate [cm].
T ReadFromFile(fs::path path)
bool fbParallelRays
Rays mode (false - radial, true - parallel to z-axis)
std::vector< MaterialSlice > fvUserSlices
Material slices defined by user.
bool fbTrackingStations
Generates material maps for the actual geometry stations.
double fPitch
Minimal bin size (cm)
int fNofRays
Number of rays per dimension in each bin.
int fMaxNofBins
Number of bins in material budged map (x and y axes)
Input parameters for the material map generation.
double fMinZ
Lower bound along z-axis [cm].
double fRefZ
Reference z-coordinate [cm].
double fMaxZ
Upper bound along z-axis [cm].
double fMaxXY
Size in the transverse plane [cm].