CbmRoot
Loading...
Searching...
No Matches
GeoVolume.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Sergei Zharko [committer] */
4
9
10
#include "
algo/setup/GeoVolume.h
"
11
12
#include <sstream>
13
14
using
cbm::algo::GeoVolume
;
15
16
// ---------------------------------------------------------------------------------------------------------------------
17
//
18
GeoVolume::GeoVolume
(
double
xMin,
double
xMax,
double
yMin,
double
yMax,
double
zMin,
double
zMax)
19
:
fX
(
Dimension
{xMin, xMax})
20
,
fY
(
Dimension
{yMin, yMax})
21
,
fZ
(
Dimension
{zMin, zMax})
22
{
23
}
24
25
// ---------------------------------------------------------------------------------------------------------------------
26
//
27
GeoVolume::GeoVolume
(std::pair<double, double>
x
, std::pair<double, double>
y
, std::pair<double, double> z)
28
:
GeoVolume
(
x
.
first
,
x
.second,
y
.
first
,
y
.second, z.
first
, z.second)
29
{
30
}
31
32
// ---------------------------------------------------------------------------------------------------------------------
33
//
34
GeoVolume
&
GeoVolume::operator+=
(
const
GeoVolume
& other)
35
{
36
fX
+= other.
fX
;
37
fY
+= other.
fY
;
38
fZ
+= other.
fZ
;
39
return
*
this
;
40
}
41
42
// ---------------------------------------------------------------------------------------------------------------------
43
//
44
bool
GeoVolume::HasOverlapWith
(
const
GeoVolume
& other)
const
45
{
46
return
fX
.HasOverlapWith(other.
fX
) &&
fY
.HasOverlapWith(other.
fY
) &&
fZ
.HasOverlapWith(other.
fZ
);
47
}
48
49
// ---------------------------------------------------------------------------------------------------------------------
50
//
51
std::string
GeoVolume::ToString
()
const
52
{
53
std::stringstream msg;
54
msg <<
"zRef = "
<<
fZ
.Center() <<
"zMin = "
<<
fZ
.lo <<
", zMax = "
<<
fZ
.up <<
", xMin = "
<<
fX
.lo
55
<<
", xMax = "
<<
fX
.up <<
", yMin = "
<<
fY
.lo <<
", yMax = "
<<
fY
.up;
56
return
msg.str();
57
}
y
Double_t y
Definition
CbmMvdSensorDigiToHitTask.cxx:64
x
Double_t x
Definition
CbmMvdSensorDigiToHitTask.cxx:64
GeoVolume.h
A class for a geometrical volume representation in the reconstruction setup.
first
bool first
Definition
LKFMinuit.cxx:149
GeoVolume::GeoVolume
GeoVolume()=default
Default constructor.
cbm::algo::GeoVolume
A representation of a geometrical volume of different tracking stations.
Definition
GeoVolume.h:25
cbm::algo::GeoVolume::HasOverlapWith
bool HasOverlapWith(const GeoVolume &other) const
Checks, if the volume overlaps with another volume.
Definition
GeoVolume.cxx:44
cbm::algo::GeoVolume::fX
Dimension fX
x dimension
Definition
GeoVolume.h:144
cbm::algo::GeoVolume::fZ
Dimension fZ
z dimension
Definition
GeoVolume.h:146
cbm::algo::GeoVolume::fY
Dimension fY
y dimension
Definition
GeoVolume.h:145
cbm::algo::GeoVolume::operator+=
GeoVolume & operator+=(const GeoVolume &other)
Compound assignment of another volume.
Definition
GeoVolume.cxx:34
cbm::algo::GeoVolume::ToString
std::string ToString() const
String representation of the class.
Definition
GeoVolume.cxx:51
cbm::algo::GeoVolume::GeoVolume
GeoVolume()=default
Default constructor.
cbm::algo::GeoVolume::Dimension
A volume dimension representation.
Definition
GeoVolume.h:28
algo
setup
GeoVolume.cxx
Generated on Fri Jan 30 2026 23:05:19 for CbmRoot by
1.13.2