ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
RegSelRoI Class Reference

#include <RegSelRoI.h>

Collaboration diagram for RegSelRoI:

Public Member Functions

 RegSelRoI ()
 
 RegSelRoI (double zMin, double zMax, double phiMin, double phiMax, double etaMin, double etaMax)
 
 ~RegSelRoI ()=default
 
double getzMin () const
 
double getzMax () const
 
double getphiMin () const
 
double getphiMax () const
 
double getetaMin () const
 
double getetaMax () const
 
double getaMin () const
 
double getaMax () const
 
bool getsplit () const
 
double getphiWidth () const
 
double getzWidth () const
 
double getzMin (const double r) const
 
double getzMax (const double r) const
 
double getrMin (const double z) const
 
double getrMax (const double z) const
 
double etaMinLimit (double r) const
 find the min eta limits for an object fully contained within an roi, bounded with the specifed radius More...
 
double etaMaxLimit (double r) const
 find the max eta limits for an object fully contained within an roi, bounded with the specifed radius More...
 

Private Attributes

double m_zMin
 
double m_zMax
 
double m_phiMin
 
double m_phiMax
 
double m_etaMin
 
double m_etaMax
 
double m_invaMin
 
double m_invaMax
 
double m_aMin
 
double m_aMax
 
bool m_split
 

Detailed Description

Definition at line 32 of file RegSelRoI.h.

Constructor & Destructor Documentation

◆ RegSelRoI() [1/2]

RegSelRoI::RegSelRoI ( )
inline

Definition at line 51 of file RegSelRoI.h.

51 { return m_aMax; }

◆ RegSelRoI() [2/2]

RegSelRoI::RegSelRoI ( double  zMin,
double  zMax,
double  phiMin,
double  phiMax,
double  etaMin,
double  etaMax 
)

prefer std::fabs here since want manifest double precision

shouldn't be needed now if the float(M_PI) tests work but leave for more guaranteed robustness

Definition at line 31 of file RegSelRoI.cxx.

34  : m_zMin(zMin), m_zMax(zMax),
35  m_phiMin(phiMin), m_phiMax(phiMax),
37  m_split(false)
38 {
39  // calculate and store inverses
42  m_aMin = 1/m_invaMin;
43  m_aMax = 1/m_invaMax;
44 
45  // just check explicitly, in case either range individually
46  // is set to pi
47  if ( m_phiMin==float(-M_PI) ) m_phiMin=-M_PI;
48  if ( m_phiMax==float( M_PI) ) m_phiMax= M_PI;
49 
50  // AAARGH!!!! Check that the roi is in the correct range
51  double deltaphi = m_phiMax-m_phiMin;
52 
53  if ( m_phiMax<m_phiMin ) deltaphi+=M_2PI;
54 
56  if ( std::fabs(deltaphi-M_2PI)>1e-6 ) {
57  if ( m_phiMin> M_PI ) m_phiMin -= M_2PI;
58  if ( m_phiMin<-M_PI ) m_phiMin += M_2PI;
59 
60  if ( m_phiMax> M_PI ) m_phiMax -= M_2PI;
61  if ( m_phiMax<-M_PI ) m_phiMax += M_2PI;
62  }
63  else {
66  m_phiMin = -M_PI;
67  m_phiMax = M_PI;
68  }
69 
71 
72 }

◆ ~RegSelRoI()

RegSelRoI::~RegSelRoI ( )
default

Member Function Documentation

◆ etaMaxLimit()

double RegSelRoI::etaMaxLimit ( double  r) const
inline

find the max eta limits for an object fully contained within an roi, bounded with the specifed radius

Definition at line 94 of file RegSelRoI.h.

◆ etaMinLimit()

double RegSelRoI::etaMinLimit ( double  r) const
inline

find the min eta limits for an object fully contained within an roi, bounded with the specifed radius

Definition at line 83 of file RegSelRoI.h.

88  :
89 
90  double m_zMin, m_zMax; // z positions at front and back of RoI

◆ getaMax()

double RegSelRoI::getaMax ( ) const
inline

Definition at line 66 of file RegSelRoI.h.

68 {

◆ getaMin()

double RegSelRoI::getaMin ( ) const
inline

Definition at line 65 of file RegSelRoI.h.

68 {

◆ getetaMax()

double RegSelRoI::getetaMax ( ) const
inline

Definition at line 64 of file RegSelRoI.h.

68 {

◆ getetaMin()

double RegSelRoI::getetaMin ( ) const
inline

Definition at line 63 of file RegSelRoI.h.

63 { return (z-m_zMax)*m_invaMax; }

◆ getphiMax()

double RegSelRoI::getphiMax ( ) const
inline

Definition at line 62 of file RegSelRoI.h.

62 { return (z-m_zMin)*m_invaMin; }

◆ getphiMin()

double RegSelRoI::getphiMin ( ) const
inline

Definition at line 61 of file RegSelRoI.h.

62 { return (z-m_zMin)*m_invaMin; }

◆ getphiWidth()

double RegSelRoI::getphiWidth ( ) const
inline

Definition at line 69 of file RegSelRoI.h.

◆ getrMax()

double RegSelRoI::getrMax ( const double  z) const
inline

Definition at line 78 of file RegSelRoI.h.

79 {

◆ getrMin()

double RegSelRoI::getrMin ( const double  z) const
inline

Definition at line 77 of file RegSelRoI.h.

79 {

◆ getsplit()

bool RegSelRoI::getsplit ( ) const
inline

Definition at line 67 of file RegSelRoI.h.

68 {

◆ getzMax() [1/2]

double RegSelRoI::getzMax ( ) const
inline

Definition at line 60 of file RegSelRoI.h.

62 { return (z-m_zMin)*m_invaMin; }

◆ getzMax() [2/2]

double RegSelRoI::getzMax ( const double  r) const
inline

Definition at line 74 of file RegSelRoI.h.

79 {

◆ getzMin() [1/2]

double RegSelRoI::getzMin ( ) const
inline

Definition at line 59 of file RegSelRoI.h.

59 { return r*m_aMax+m_zMax; }

◆ getzMin() [2/2]

double RegSelRoI::getzMin ( const double  r) const
inline

Definition at line 73 of file RegSelRoI.h.

◆ getzWidth()

double RegSelRoI::getzWidth ( ) const
inline

Definition at line 70 of file RegSelRoI.h.

Member Data Documentation

◆ m_aMax

double RegSelRoI::m_aMax
private

Definition at line 109 of file RegSelRoI.h.

◆ m_aMin

double RegSelRoI::m_aMin
private

Definition at line 109 of file RegSelRoI.h.

◆ m_etaMax

double RegSelRoI::m_etaMax
private

Definition at line 107 of file RegSelRoI.h.

◆ m_etaMin

double RegSelRoI::m_etaMin
private

Definition at line 107 of file RegSelRoI.h.

◆ m_invaMax

double RegSelRoI::m_invaMax
private

Definition at line 108 of file RegSelRoI.h.

◆ m_invaMin

double RegSelRoI::m_invaMin
private

Definition at line 108 of file RegSelRoI.h.

◆ m_phiMax

double RegSelRoI::m_phiMax
private

Definition at line 106 of file RegSelRoI.h.

◆ m_phiMin

double RegSelRoI::m_phiMin
private

Definition at line 106 of file RegSelRoI.h.

◆ m_split

bool RegSelRoI::m_split
private

Definition at line 111 of file RegSelRoI.h.

◆ m_zMax

double RegSelRoI::m_zMax
private

Definition at line 105 of file RegSelRoI.h.

◆ m_zMin

double RegSelRoI::m_zMin
private

Definition at line 105 of file RegSelRoI.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
RegSelRoI::m_invaMin
double m_invaMin
Definition: RegSelRoI.h:108
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
RegSelRoI::m_zMin
double m_zMin
Definition: RegSelRoI.h:105
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
RegSelRoI::m_aMin
double m_aMin
Definition: RegSelRoI.h:109
z
#define z
RegSelRoI::m_invaMax
double m_invaMax
Definition: RegSelRoI.h:108
RegSelRoI::m_split
bool m_split
Definition: RegSelRoI.h:111
RegSelRoI::m_phiMin
double m_phiMin
Definition: RegSelRoI.h:106
RegSelRoI::m_aMax
double m_aMax
Definition: RegSelRoI.h:109
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
RegSelRoI::m_phiMax
double m_phiMax
Definition: RegSelRoI.h:106
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
M_2PI
#define M_2PI
Definition: CaloGpuGeneral_fnc.cxx:8
RegSelRoI::m_zMax
double m_zMax
Definition: RegSelRoI.h:105
RegSelRoI::m_etaMin
double m_etaMin
Definition: RegSelRoI.h:107
RegSelRoI::m_etaMax
double m_etaMax
Definition: RegSelRoI.h:107