CbmRoot
Loading...
Searching...
No Matches
KfMaterialMapFactory.h
Go to the documentation of this file.
1
/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Sergei Zharko [committer] */
4
10
11
#pragma once
12
13
#include "
KfIMaterialMapFactory.h
"
14
#include "Rtypes.h"
15
#include "TObject.h"
16
17
class
TGeoNavigator;
18
namespace
cbm::algo::kf
19
{
20
class
MaterialMap;
21
}
22
23
namespace
kf::tools
24
{
27
class
MaterialMapFactory
:
public
cbm::algo::kf::IMaterialMapFactory
{
28
public
:
31
MaterialMapFactory
(
int
verbose = 0);
32
34
~MaterialMapFactory
();
35
38
void
SetDoRadialProjection
(
double
targetZ)
39
{
40
fDoRadialProjection
=
true
;
41
fTargetZ
= targetZ;
42
}
43
45
void
SetDoHorisontalProjection
() {
fDoRadialProjection
=
false
; }
46
48
void
SetNraysPerDim
(
int
nRaysDim) {
fNraysBinPerDim
= (nRaysDim > 0) ? nRaysDim : 1; }
49
50
69
cbm::algo::kf::MaterialMap
GenerateMaterialMap
(
double
zRef,
double
zMin,
double
zMax,
double
xyMax,
70
int
nBinsDim)
override
;
71
73
void
SetSafeMaterialInitialization
(
bool
val =
true
) {
fDoSafeInitialization
= val; }
74
75
private
:
77
void
InitThreads
();
78
80
void
CleanUpThreads
();
81
85
TGeoNavigator*
GetCurrentNavigator
(
int
iThread);
86
87
private
:
88
static
constexpr
double
kMinRadLength
= 0.3;
89
90
std::vector<TGeoNavigator*>
fNavigators
{};
91
double
fTargetZ
{0.};
92
int
fNthreadsOld
{0};
93
int
fNthreads
{0};
94
int
fNraysBinPerDim
{3};
95
int
fVerbose
{0};
96
bool
fDoRadialProjection
{
false
};
97
bool
fDoSafeInitialization
{
false
};
99
};
100
101
}
// namespace kf::tools
KfIMaterialMapFactory.h
Interface to the material map creator.
cbm::algo::kf::IMaterialMapFactory
Interface to the material map creator.
Definition
KfIMaterialMapFactory.h:18
cbm::algo::kf::MaterialMap
A map of station thickness in units of radiation length (X0) to the specific point in XY plane.
Definition
KfMaterialMap.h:27
kf::tools::MaterialMapFactory
An utility class to create a material budget map from the TGeo.
Definition
KfMaterialMapFactory.h:27
kf::tools::MaterialMapFactory::MaterialMapFactory
MaterialMapFactory(int verbose=0)
Constructor from parameters.
Definition
KfMaterialMapFactory.cxx:31
kf::tools::MaterialMapFactory::fNthreadsOld
int fNthreadsOld
number of threads in TGeoManager before the helper was created
Definition
KfMaterialMapFactory.h:92
kf::tools::MaterialMapFactory::fNthreads
int fNthreads
number of threads
Definition
KfMaterialMapFactory.h:93
kf::tools::MaterialMapFactory::fVerbose
int fVerbose
verbosity level
Definition
KfMaterialMapFactory.h:95
kf::tools::MaterialMapFactory::SetDoRadialProjection
void SetDoRadialProjection(double targetZ)
Project rays radially from the targetZ througth the XY-bins at a reference z.
Definition
KfMaterialMapFactory.h:38
kf::tools::MaterialMapFactory::fNavigators
std::vector< TGeoNavigator * > fNavigators
list of created navigators
Definition
KfMaterialMapFactory.h:90
kf::tools::MaterialMapFactory::SetSafeMaterialInitialization
void SetSafeMaterialInitialization(bool val=true)
Enables safe mode of the material initialization.
Definition
KfMaterialMapFactory.h:73
kf::tools::MaterialMapFactory::fDoRadialProjection
bool fDoRadialProjection
if project rays horizontally along the Z axis (special mode)
Definition
KfMaterialMapFactory.h:96
kf::tools::MaterialMapFactory::~MaterialMapFactory
~MaterialMapFactory()
Destructor.
Definition
KfMaterialMapFactory.cxx:146
kf::tools::MaterialMapFactory::GenerateMaterialMap
cbm::algo::kf::MaterialMap GenerateMaterialMap(double zRef, double zMin, double zMax, double xyMax, int nBinsDim) override
Generates a material budget map.
Definition
KfMaterialMapFactory.cxx:233
kf::tools::MaterialMapFactory::GetCurrentNavigator
TGeoNavigator * GetCurrentNavigator(int iThread)
Gets navigator for current thread, creates it if it does not exist.
Definition
KfMaterialMapFactory.cxx:175
kf::tools::MaterialMapFactory::CleanUpThreads
void CleanUpThreads()
Cleans up the TGeoManager: threadIds, create a default navigator.
Definition
KfMaterialMapFactory.cxx:203
kf::tools::MaterialMapFactory::fTargetZ
double fTargetZ
z of the target for the radial projection
Definition
KfMaterialMapFactory.h:91
kf::tools::MaterialMapFactory::kMinRadLength
static constexpr double kMinRadLength
Minimal radiational length allowed [cm].
Definition
KfMaterialMapFactory.h:88
kf::tools::MaterialMapFactory::fDoSafeInitialization
bool fDoSafeInitialization
Definition
KfMaterialMapFactory.h:97
kf::tools::MaterialMapFactory::InitThreads
void InitThreads()
Initializes the necessary amount of threads in TGeoManager.
Definition
KfMaterialMapFactory.cxx:215
kf::tools::MaterialMapFactory::SetDoHorisontalProjection
void SetDoHorisontalProjection()
Project rays horisontally along the Z axis (default)
Definition
KfMaterialMapFactory.h:45
kf::tools::MaterialMapFactory::fNraysBinPerDim
int fNraysBinPerDim
shoot fNraysBinPerDim * fNraysBinPerDim rays in each map bin
Definition
KfMaterialMapFactory.h:94
kf::tools::MaterialMapFactory::SetNraysPerDim
void SetNraysPerDim(int nRaysDim)
Shoots nRaysDim * nRaysDim rays for each bin in the map.
Definition
KfMaterialMapFactory.h:48
cbm::algo::kf
Definition
KfMeasurementTime.cxx:14
kf::tools
Definition
KfMaterialMapFactory.h:24
reco
kfnew
tools
KfMaterialMapFactory.h
Generated on Sun Dec 22 2024 23:04:16 for CbmRoot by
1.12.0