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
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
CI
Core
include
src
EventData
Geometry
MagneticField
Material
Propagator
Surfaces
detail
AnnulusBounds.cpp
ConeBounds.cpp
ConeSurface.cpp
ConvexPolygonBounds.cpp
CylinderBounds.cpp
CylinderSurface.cpp
DiamondBounds.cpp
DiscSurface.cpp
DiscTrapezoidBounds.cpp
EllipseBounds.cpp
IntersectionHelper2D.cpp
LineBounds.cpp
LineSurface.cpp
PerigeeSurface.cpp
PlaneSurface.cpp
RadialBounds.cpp
RectangleBounds.cpp
StrawSurface.cpp
Surface.cpp
SurfaceArray.cpp
TrapezoidBounds.cpp
VerticesHelper.cpp
Utilities
Vertexing
Visualization
docs
Examples
Fatras
Plugins
Tests
thirdparty
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DiamondBounds.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DiamondBounds.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/DiamondBounds.hpp
"
10
11
#include "
Acts/Utilities/ThrowAssert.hpp
"
12
13
#include <iomanip>
14
#include <iostream>
15
16
Acts::SurfaceBounds::BoundsType
Acts::DiamondBounds::type
()
const
{
17
return
SurfaceBounds::eDiamond
;
18
}
19
20
bool
Acts::DiamondBounds::inside
(
const
Acts::Vector2D
& lposition,
21
const
Acts::BoundaryCheck
& bcheck)
const
{
22
return
bcheck.
isInside
(lposition, vertices());
23
}
24
25
std::vector<Acts::Vector2D>
Acts::DiamondBounds::vertices
(
26
unsigned
int
/*lseg*/
)
const
{
27
// Vertices starting at lower left (min rel. phi)
28
// counter-clockwise
29
double
x1 =
get
(
DiamondBounds::eHalfLengthXnegY
);
30
double
y1 =
get
(
DiamondBounds::eHalfLengthYneg
);
31
double
x2
=
get
(
DiamondBounds::eHalfLengthXzeroY
);
32
double
y2 = 0.;
33
double
x3
=
get
(
DiamondBounds::eHalfLengthXposY
);
34
double
y3
=
get
(
DiamondBounds::eHalfLengthYpos
);
35
return
{{-x1, -y1}, {x1, -y1}, {
x2
, y2}, {
x3
, y3}, {-
x3
, y3}, {-
x2
, y2}};
36
}
37
38
const
Acts::RectangleBounds
&
Acts::DiamondBounds::boundingBox
()
const
{
39
return
m_boundingBox;
40
}
41
42
std::ostream&
Acts::DiamondBounds::toStream
(std::ostream& sl)
const
{
43
sl << std::setiosflags(std::ios::fixed);
44
sl << std::setprecision(7);
45
sl <<
"Acts::DiamondBounds: (halfXatYneg, halfXatYzero, halfXatYpos, "
46
"halfYneg, halfYpos) = "
;
47
sl <<
"("
<<
get
(
DiamondBounds::eHalfLengthXnegY
) <<
", "
48
<<
get
(
DiamondBounds::eHalfLengthXzeroY
) <<
", "
49
<<
get
(
DiamondBounds::eHalfLengthXposY
) <<
", "
50
<<
get
(
DiamondBounds::eHalfLengthYneg
) <<
", "
51
<<
get
(
DiamondBounds::eHalfLengthYpos
) <<
")"
;
52
sl << std::setprecision(-1);
53
return
sl;
54
}
acts
blob
sPHENIX
Core
src
Surfaces
DiamondBounds.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration