EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrapezoidBounds.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrapezoidBounds.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
Acts/Surfaces/TrapezoidBounds.hpp
"
10
11
#include <cmath>
12
#include <iomanip>
13
#include <iostream>
14
15
Acts::TrapezoidBounds::~TrapezoidBounds
() =
default
;
16
17
Acts::SurfaceBounds::BoundsType
Acts::TrapezoidBounds::type
()
const
{
18
return
SurfaceBounds::eTrapezoid
;
19
}
20
21
bool
Acts::TrapezoidBounds::inside
(
const
Acts::Vector2D
& lposition,
22
const
Acts::BoundaryCheck
& bcheck)
const
{
23
return
bcheck.
isInside
(lposition, vertices());
24
}
25
26
std::vector<Acts::Vector2D>
Acts::TrapezoidBounds::vertices
(
27
unsigned
int
/*lseg*/
)
const
{
28
double
minhx =
get
(
TrapezoidBounds::eHalfLengthXnegY
);
29
double
maxhx =
get
(
TrapezoidBounds::eHalfLengthXposY
);
30
double
hy
=
get
(
TrapezoidBounds::eHalfLengthY
);
31
return
{{-minhx, -hy}, {minhx, -hy}, {maxhx, hy}, {-maxhx, hy}};
32
}
33
34
const
Acts::RectangleBounds
&
Acts::TrapezoidBounds::boundingBox
()
const
{
35
return
m_boundingBox;
36
}
37
38
std::ostream&
Acts::TrapezoidBounds::toStream
(std::ostream& sl)
const
{
39
sl << std::setiosflags(std::ios::fixed);
40
sl << std::setprecision(7);
41
sl <<
"Acts::TrapezoidBounds: (halfXnegY, halfXposY, halfY) = "
42
<<
"("
<<
get
(eHalfLengthXnegY) <<
", "
<<
get
(eHalfLengthXposY) <<
", "
43
<<
get
(eHalfLengthY) <<
")"
;
44
sl << std::setprecision(-1);
45
return
sl;
46
}
acts
blob
sPHENIX
Core
src
Surfaces
TrapezoidBounds.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration