Project
Loading...
Searching...
No Matches
o2::tpc::Sector Class Reference

#include <Sector.h>

Public Member Functions

 Sector ()=default
 constructor
 
 Sector (unsigned char sec)
 
bool operator== (const Sector &other) const
 comparison operator
 
bool operator!= (const Sector &other) const
 unequal operator
 
bool operator< (const Sector &other) const
 smaller operator
 
bool operator++ ()
 
 operator int () const
 
Sectoroperator= (int sector)
 assignment operator with int
 
unsigned char getSector () const
 
Side side () const
 
bool looped () const
 
double phi () const
 

Static Public Member Functions

static Sector getLeft (const Sector s)
 
static Sector getRight (const Sector s)
 
template<typename T >
static int ToSector (T x, T y, T z)
 
template<typename T >
static int ToShiftedSector (T x, T y, T z)
 

Static Public Attributes

static constexpr int MAXSECTOR = constants::MAXSECTOR
 

Detailed Description

Definition at line 40 of file Sector.h.

Constructor & Destructor Documentation

◆ Sector() [1/2]

o2::tpc::Sector::Sector ( )
default

constructor

◆ Sector() [2/2]

o2::tpc::Sector::Sector ( unsigned char  sec)
inline

construction

Parameters
[in]secsector number

Definition at line 51 of file Sector.h.

Member Function Documentation

◆ getLeft()

Sector o2::tpc::Sector::getLeft ( const Sector  s)
inlinestatic

get Sector to the left of the current one

Parameters
sSector of interest
Returns
Sector left of the current one taking into account that the sector left of 17 (35) is 0 (18)

Definition at line 145 of file Sector.h.

◆ getRight()

Sector o2::tpc::Sector::getRight ( const Sector  s)
inlinestatic

get Sector to the right of the current one

Parameters
sSector of interest
Returns
Sector right of the current one taking into account that the sector right of 0 (18) is 17 (35)

Definition at line 147 of file Sector.h.

◆ getSector()

unsigned char o2::tpc::Sector::getSector ( ) const
inline

Definition at line 94 of file Sector.h.

◆ looped()

bool o2::tpc::Sector::looped ( ) const
inline

Definition at line 98 of file Sector.h.

◆ operator int()

o2::tpc::Sector::operator int ( ) const
inline

int return operator to use similar as integer

Returns
sector number

Definition at line 85 of file Sector.h.

◆ operator!=()

bool o2::tpc::Sector::operator!= ( const Sector other) const
inline

unequal operator

Definition at line 67 of file Sector.h.

◆ operator++()

bool o2::tpc::Sector::operator++ ( )
inline

increment operator This operator can be used to iterate over all sectors e.g. Sector sec; while (++sec) { std::cout << "Sector: " << sec.getSector() << std::endl; }

Definition at line 76 of file Sector.h.

◆ operator<()

bool o2::tpc::Sector::operator< ( const Sector other) const
inline

smaller operator

Definition at line 70 of file Sector.h.

◆ operator=()

Sector & o2::tpc::Sector::operator= ( int  sector)
inline

assignment operator with int

Definition at line 88 of file Sector.h.

◆ operator==()

bool o2::tpc::Sector::operator== ( const Sector other) const
inline

comparison operator

Definition at line 64 of file Sector.h.

◆ phi()

double o2::tpc::Sector::phi ( ) const
inline

Definition at line 100 of file Sector.h.

◆ side()

Side o2::tpc::Sector::side ( ) const
inline

Definition at line 96 of file Sector.h.

◆ ToSector()

template<typename T >
static int o2::tpc::Sector::ToSector ( x,
y,
z 
)
inlinestatic

helper function to retrieve a TPC sector given cartesian coordinates

Parameters
xx position
yy position
zz position

Definition at line 107 of file Sector.h.

◆ ToShiftedSector()

template<typename T >
static int o2::tpc::Sector::ToShiftedSector ( x,
y,
z 
)
inlinestatic

helper function to retrieve a TPC sector given cartesian coordinates the sector counting is shifte by -10deg in this case, so sector 0 will be from -10 deg to +10 deg instead of 0-20

Parameters
xx position
yy position
zz position

Definition at line 126 of file Sector.h.

Member Data Documentation

◆ MAXSECTOR

constexpr int o2::tpc::Sector::MAXSECTOR = constants::MAXSECTOR
staticconstexpr

Definition at line 44 of file Sector.h.


The documentation for this class was generated from the following file: