![]() |
Project
|
A CathodeSegmentation lets you find pads on a given plane (cathode) of a detection element and then inspect those pads. More...
#include <CathodeSegmentation.h>
Public Member Functions | |
CathodeSegmentation (int detElemId, bool isBendingPlane) | |
This ctor throws if detElemId is invalid. | |
bool | operator== (const CathodeSegmentation &rhs) const |
bool | operator!= (const CathodeSegmentation &rhs) const |
CathodeSegmentation (const CathodeSegmentation &seg) | |
CathodeSegmentation & | operator= (CathodeSegmentation seg) |
~CathodeSegmentation () | |
void | forEachDualSampa (std::function< void(int dualSampaId)> func) const |
Loop over dual sampas of this detection element. | |
Pad Unique Identifier | |
Pads are identified by a unique integer, catPadIndex.
| |
bool | isValid (int catPadIndex) const |
Not every integer is a valid catPadIndex. This method will tell if catPadIndex is a valid one. | |
Pad finding. | |
Methods to find a pad. In each case the returned integer represents either a catPadIndex if a pad is found or an integer representing an invalid catPadIndex otherwise. Validity of the returned value can be tested using isValid() | |
int | findPadByPosition (double x, double y) const |
int | findPadByFEE (int dualSampaId, int dualSampaChannel) const |
Pad information retrieval. | |
Given a valid catPadIndex those methods return information (position, size, fee) about that pad. | |
double | padPositionX (int catPadIndex) const |
double | padPositionY (int catPadIndex) const |
double | padSizeX (int catPadIndex) const |
double | padSizeY (int catPadIndex) const |
int | padDualSampaId (int catPadIndex) const |
int | padDualSampaChannel (int catPadIndex) const |
std::string | padAsString (int catPadIndex) const |
Some general characteristics of this segmentation. | |
bool | isBendingPlane () const |
int | nofDualSampas () const |
int | nofPads () const |
int | dualSampaId (int dualSampaIndex) const |
ForEach methods. | |
Those methods let you execute a function on each of the pads belonging to some group. | |
template<typename CALLABLE > | |
void | forEachPadInDualSampa (int dualSampaId, CALLABLE &&func) const |
template<typename CALLABLE > | |
void | forEachPadInArea (double xmin, double ymin, double xmax, double ymax, CALLABLE &&func) const |
template<typename CALLABLE > | |
void | forEachPad (CALLABLE &&func) const |
template<typename CALLABLE > | |
void | forEachNeighbouringPad (int catPadIndex, CALLABLE &&func) const |
Friends | |
void | swap (CathodeSegmentation &a, CathodeSegmentation &b) |
A CathodeSegmentation lets you find pads on a given plane (cathode) of a detection element and then inspect those pads.
Note that instead of CathodeSegmentation most users will prefer to use the Segmentation class which handles both cathodes of a detection element at once.
Pads can be found by :
What you get back from the find methods are not pad objects directly but a reference (integer) that can then be used to query the segmentation object about that pad. That reference integer (catPadIndex) is an index between 0 and nofPads()-1. The exact ordering of this index is implementation dependent though.
Pad information that can be retrieved :
In addition, you can apply some function to a group of pads using one of the the forEach methods :
Definition at line 63 of file CathodeSegmentation.h.
|
inline |
This ctor throws if detElemId is invalid.
Definition at line 67 of file CathodeSegmentation.h.
|
inline |
Definition at line 114 of file CathodeSegmentation.h.
|
inline |
Definition at line 129 of file CathodeSegmentation.h.
dualSampaIndex | must be in the range 0..nofDualSampas()-1 |
Definition at line 183 of file CathodeSegmentation.h.
|
inline |
Find the pad connected to the given channel of the given dual sampa.
Definition at line 154 of file CathodeSegmentation.h.
|
inline |
Find the pad at position (x,y) (in cm).
Definition at line 151 of file CathodeSegmentation.h.
|
inline |
Loop over dual sampas of this detection element.
Definition at line 252 of file CathodeSegmentation.h.
void o2::mch::mapping::CathodeSegmentation::forEachNeighbouringPad | ( | int | catPadIndex, |
CALLABLE && | func | ||
) | const |
Definition at line 243 of file CathodeSegmentation.h.
void o2::mch::mapping::CathodeSegmentation::forEachPad | ( | CALLABLE && | func | ) | const |
Definition at line 235 of file CathodeSegmentation.h.
void o2::mch::mapping::CathodeSegmentation::forEachPadInArea | ( | double | xmin, |
double | ymin, | ||
double | xmax, | ||
double | ymax, | ||
CALLABLE && | func | ||
) | const |
Definition at line 225 of file CathodeSegmentation.h.
void o2::mch::mapping::CathodeSegmentation::forEachPadInDualSampa | ( | int | dualSampaId, |
CALLABLE && | func | ||
) | const |
Definition at line 215 of file CathodeSegmentation.h.
|
inline |
Definition at line 178 of file CathodeSegmentation.h.
|
inline |
Not every integer is a valid catPadIndex. This method will tell if catPadIndex is a valid one.
Definition at line 139 of file CathodeSegmentation.h.
|
inline |
Definition at line 179 of file CathodeSegmentation.h.
|
inline |
Definition at line 180 of file CathodeSegmentation.h.
|
inline |
Definition at line 101 of file CathodeSegmentation.h.
|
inline |
Definition at line 123 of file CathodeSegmentation.h.
|
inline |
Definition at line 96 of file CathodeSegmentation.h.
|
inline |
Convenience method to get a string representation of a pad.
Definition at line 284 of file CathodeSegmentation.h.
Definition at line 172 of file CathodeSegmentation.h.
Definition at line 171 of file CathodeSegmentation.h.
|
inline |
Definition at line 167 of file CathodeSegmentation.h.
|
inline |
Definition at line 168 of file CathodeSegmentation.h.
|
inline |
Definition at line 169 of file CathodeSegmentation.h.
|
inline |
Definition at line 170 of file CathodeSegmentation.h.
|
friend |
Definition at line 103 of file CathodeSegmentation.h.