21 : m_constrains(0), m_envelope(envelope) {
32 const std::vector<BinningValue>& bValues,
33 bool applyEnv,
bool fillHistograms) {
34 for (
auto bValue : bValues) {
38 m_valueHistograms[bValue].push_back(cValue);
41 ActsScalar lEnv = applyEnv ? m_envelope[bValue][0] : 0.;
42 ActsScalar hEnv = applyEnv ? m_envelope[bValue][1] : 0.;
45 if (bValue ==
binR and mValue < 0.) {
46 mValue = std::max(mValue, 0.);
48 if (constrains(bValue)) {
49 m_range[bValue].expand(mValue, cValue + hEnv);
51 m_range[bValue].shrink(mValue, cValue + hEnv);
53 m_constrains.set(bValue);
58 const std::vector<BinningValue>& bValues,
60 for (
auto bValue : bValues) {
63 ActsScalar lEnv = applyEnv ? m_envelope[bValue][0] : 0.;
64 ActsScalar hEnv = applyEnv ? m_envelope[bValue][1] : 0.;
65 if (constrains(bValue)) {
66 m_range[bValue].expand(rhs.
range()[bValue].
min() - lEnv,
69 m_range[bValue].shrink(rhs.
range()[bValue].
min() - lEnv,
72 m_constrains.set(bValue);
75 m_range[bValue].expand(m_range[bValue].
min() - rhs.
envelope()[bValue][0],
76 m_range[bValue].max() + rhs.
envelope()[bValue][1]);
77 m_constrains.set(bValue);
85 if (rhs.
constrains(bValue) and not constrains(bValue)) {
86 const auto& cRange = rhs.
range(bValue);
87 m_range[bValue].
setMin(cRange.min() + envelope[bValue][0
u]);
88 m_range[bValue].setMax(cRange.max() + envelope[bValue][1
u]);
89 m_constrains.set(bValue);
96 if (bValue ==
binR and minval < 0.) {
99 m_range[bValue] =
Range1D{minval, max};
100 m_constrains.
set(bValue);
104 m_envelope = envelope;
110 if (not constrains(bvc)) {
113 return (rhs.
range()[bvc] <= m_range[bvc]);
118 for (
int ibv = 0; ibv < (int)
binValues; ++ibv) {
126 return checkContainment(bValue);
132 if (not constrains(bvc) or not rhs.
constrains(bvc)) {
135 return (m_range[bvc] && rhs.
range()[bvc]);
140 for (
int ibv = 0; ibv < (int)
binValues; ++ibv) {
148 return checkIntersect(bValue);
153 return (m_constrains.count() > 0);
155 return m_constrains.test(
size_t(bValue));
165 if (not(m_range == e.
m_range)) {
175 std::stringstream sl;
176 sl << indent <<
"Extent in space : " << std::endl;
177 for (
size_t ib = 0; ib < static_cast<size_t>(
binValues); ++
ib) {
180 <<
" | range = [" << m_range[
ib].min() <<
", " << m_range[
ib].max()