ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
RegSelLUT
RegSelLUT
RegSelRoI.h
Go to the documentation of this file.
1
// emacs: this is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
/**************************************************************************
8
**
9
** File: RegSelRoI.h
10
**
11
** Description: a useful RoI descriptor that can define an RoI with
12
** arbitrary extent in z and phi, and with independent
13
** RoI slopes at either end in z
14
**
15
** Author: M.Sutton
16
**
17
** Created: Thu Feb 15 00:15:26 GMT 2007
18
** Modified:
19
**
20
**
21
**
22
**************************************************************************/
23
24
25
#ifndef REGSELROI_H
26
#define REGSELROI_H
27
28
#include <iostream>
29
30
#include <cmath>
31
32
class
RegSelRoI
{
33
34
public
:
35
36
RegSelRoI
() { }
37
38
RegSelRoI
(
double
zMin,
double
zMax,
39
double
phiMin,
double
phiMax,
40
double
etaMin,
double
etaMax);
41
42
~RegSelRoI
() =
default
;
43
44
double
getzMin
()
const
{
return
m_zMin
; }
45
double
getzMax
()
const
{
return
m_zMax
; }
46
double
getphiMin
()
const
{
return
m_phiMin
; }
47
double
getphiMax
()
const
{
return
m_phiMax
; }
48
double
getetaMin
()
const
{
return
m_etaMin
; }
49
double
getetaMax
()
const
{
return
m_etaMax
; }
50
double
getaMin
()
const
{
return
m_aMin
; }
51
double
getaMax
()
const
{
return
m_aMax
; }
52
bool
getsplit
()
const
{
return
m_split
; }
53
54
double
getphiWidth
()
const
{
return
(
m_phiMax
>=
m_phiMin
?
m_phiMax
-
m_phiMin
:
m_phiMax
-
m_phiMin
+2*
M_PI
); }
55
double
getzWidth
()
const
{
return
m_zMax
-
m_zMin
; }
56
57
// given a radius calculate the min and max z values of the RoI
58
double
getzMin
(
const
double
r
)
const
{
return
r
*
m_aMin
+
m_zMin
; }
59
double
getzMax
(
const
double
r
)
const
{
return
r
*
m_aMax
+
m_zMax
; }
60
61
// given a z position calculate the min and max r values of the RoI
62
double
getrMin
(
const
double
z
)
const
{
return
(
z
-
m_zMin
)*
m_invaMin
; }
63
double
getrMax
(
const
double
z
)
const
{
return
(
z
-
m_zMax
)*
m_invaMax
; }
64
65
68
double
etaMinLimit
(
double
r
)
const
{
69
double
x
=
r
*
m_aMin
-
getzWidth
();
70
if
(
x
==0 )
return
0;
71
double
tantheta =
r
/
x
;
72
double
theta
= std::atan(tantheta);
73
if
(
theta
<0 )
theta
+=
M_PI
;
74
return
-std::log(std::tan(0.5*
theta
));
75
}
76
79
double
etaMaxLimit
(
double
r
)
const
{
80
double
x
=
r
*
m_aMax
+
getzWidth
();
81
if
(
x
==0 )
return
0;
82
double
tantheta =
r
/
x
;
83
double
theta
= std::atan(tantheta);
84
if
(
theta
<0 )
theta
+=
M_PI
;
85
return
-std::log(std::tan(0.5*
theta
));
86
}
87
88
private
:
89
90
double
m_zMin
,
m_zMax
;
// z positions at front and back of RoI
91
double
m_phiMin
,
m_phiMax
;
// phi at either side
92
double
m_etaMin
,
m_etaMax
;
// eta at front and back
93
double
m_invaMin
,
m_invaMax
;
// gradient dr/dz
94
double
m_aMin
,
m_aMax
;
// gradient dz/dr
95
96
bool
m_split
;
// is the roi split over the pi boundary
97
98
};
99
100
101
102
std::ostream&
operator<<
(std::ostream& s,
const
RegSelRoI
&
r
);
103
104
105
#endif
/* REGSELROI_H */
106
107
108
109
110
111
112
113
114
115
M_PI
#define M_PI
Definition
ActiveFraction.h:14
theta
Scalar theta() const
theta method
Definition
AmgMatrixBasePlugin.h:75
operator<<
std::ostream & operator<<(std::ostream &s, const RegSelRoI &r)
Definition
RegSelRoI.cxx:77
x
#define x
z
#define z
RegSelRoI
Definition
RegSelRoI.h:32
RegSelRoI::getzMin
double getzMin() const
Definition
RegSelRoI.h:44
RegSelRoI::m_etaMin
double m_etaMin
Definition
RegSelRoI.h:92
RegSelRoI::etaMinLimit
double etaMinLimit(double r) const
find the min eta limits for an object fully contained within an roi, bounded with the specifed radius
Definition
RegSelRoI.h:68
RegSelRoI::getaMax
double getaMax() const
Definition
RegSelRoI.h:51
RegSelRoI::getetaMin
double getetaMin() const
Definition
RegSelRoI.h:48
RegSelRoI::getaMin
double getaMin() const
Definition
RegSelRoI.h:50
RegSelRoI::~RegSelRoI
~RegSelRoI()=default
RegSelRoI::m_aMin
double m_aMin
Definition
RegSelRoI.h:94
RegSelRoI::RegSelRoI
RegSelRoI()
Definition
RegSelRoI.h:36
RegSelRoI::m_zMax
double m_zMax
Definition
RegSelRoI.h:90
RegSelRoI::m_phiMax
double m_phiMax
Definition
RegSelRoI.h:91
RegSelRoI::m_aMax
double m_aMax
Definition
RegSelRoI.h:94
RegSelRoI::getzMax
double getzMax() const
Definition
RegSelRoI.h:45
RegSelRoI::getrMin
double getrMin(const double z) const
Definition
RegSelRoI.h:62
RegSelRoI::getetaMax
double getetaMax() const
Definition
RegSelRoI.h:49
RegSelRoI::getphiWidth
double getphiWidth() const
Definition
RegSelRoI.h:54
RegSelRoI::getsplit
bool getsplit() const
Definition
RegSelRoI.h:52
RegSelRoI::m_invaMax
double m_invaMax
Definition
RegSelRoI.h:93
RegSelRoI::m_invaMin
double m_invaMin
Definition
RegSelRoI.h:93
RegSelRoI::etaMaxLimit
double etaMaxLimit(double r) const
find the max eta limits for an object fully contained within an roi, bounded with the specifed radius
Definition
RegSelRoI.h:79
RegSelRoI::m_split
bool m_split
Definition
RegSelRoI.h:96
RegSelRoI::m_zMin
double m_zMin
Definition
RegSelRoI.h:90
RegSelRoI::getzMax
double getzMax(const double r) const
Definition
RegSelRoI.h:59
RegSelRoI::getzMin
double getzMin(const double r) const
Definition
RegSelRoI.h:58
RegSelRoI::m_etaMax
double m_etaMax
Definition
RegSelRoI.h:92
RegSelRoI::getphiMin
double getphiMin() const
Definition
RegSelRoI.h:46
RegSelRoI::m_phiMin
double m_phiMin
Definition
RegSelRoI.h:91
RegSelRoI::getzWidth
double getzWidth() const
Definition
RegSelRoI.h:55
RegSelRoI::getphiMax
double getphiMax() const
Definition
RegSelRoI.h:47
RegSelRoI::getrMax
double getrMax(const double z) const
Definition
RegSelRoI.h:63
r
int r
Definition
globals.cxx:22
Generated on
for ATLAS Offline Software by
1.17.0