![]() |
Project
|
Go to the source code of this file.
Typedefs | |
typedef struct MchCathodeSegmentation * | MchCathodeSegmentationHandle |
typedef void(* | MchDetectionElementHandler) (void *clientData, int detElemId) |
typedef void(* | MchDualSampaHandler) (void *clientData, int dualSampaId) |
typedef void(* | MchPadHandler) (void *clientData, int catPadIndex) |
Functions | |
Creation and destruction of the segmentation handle. | |
Most of the functions of this library require a segmentation handle to work with. | |
MchCathodeSegmentationHandle | mchCathodeSegmentationConstruct (int detElemId, bool isBendingPlane) __attribute__((weak)) |
Create a handle to a segmentation for a given plane of a detection element. | |
void | mchCathodeSegmentationDestruct (MchCathodeSegmentationHandle segHandle) __attribute__((weak)) |
Delete a segmentation handle. | |
Pad Unique Identifier | |
Pads are identified by a unique integer, catPadIndex.
| |
int | mchCathodeSegmentationIsPadValid (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
Return > 0 if catPadIndex is a valid one or <= 1 if not. | |
Pad finding. | |
Functions 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 mchCathodeSegmentationIsPadValid() | |
int | mchCathodeSegmentationFindPadByPosition (MchCathodeSegmentationHandle segHandle, double x, double y) __attribute__((weak)) |
Find the pad at position (x,y) (in cm). | |
int | mchCathodeSegmentationFindPadByFEE (MchCathodeSegmentationHandle segHandle, int dualSampaId, int dualSampaChannel) __attribute__((weak)) |
Find the pad connected to the given channel of the given dual sampa. | |
Pad information retrieval. | |
Given a valid catPadIndex those methods return information (position, size, front-end electronics) about that pad. Positions and sizes are in centimetres. If catPadIndex is invalid, you are on your own. | |
double | mchCathodeSegmentationPadPositionX (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
double | mchCathodeSegmentationPadPositionY (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
double | mchCathodeSegmentationPadSizeX (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
double | mchCathodeSegmentationPadSizeY (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
int | mchCathodeSegmentationPadDualSampaId (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
int | mchCathodeSegmentationPadDualSampaChannel (MchCathodeSegmentationHandle segHandle, int catPadIndex) __attribute__((weak)) |
ForEach methods. | |
Functions to loop over some items : detection elements, dual sampas, and pads. | |
void | mchCathodeSegmentationForEachDetectionElement (MchDetectionElementHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForOneDetectionElementOfEachSegmentationType (MchDetectionElementHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForEachDualSampa (MchCathodeSegmentationHandle segHandle, MchDualSampaHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForEachPadInDualSampa (MchCathodeSegmentationHandle segHandle, int dualSampaId, MchPadHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForEachPadInArea (MchCathodeSegmentationHandle segHandle, double xmin, double ymin, double xmax, double ymax, MchPadHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForEachPad (MchCathodeSegmentationHandle segHandle, MchPadHandler handler, void *clientData) __attribute__((weak)) |
void | mchCathodeSegmentationForEachNeighbouringPad (MchCathodeSegmentationHandle segHandle, int catPadIndex, MchPadHandler handler, void *userData) __attribute__((weak)) |
C Interface to the Muon MCH mapping.
This interface is actually the main entrypoint to the mapping, at least if dealing with cathodes and not full detection elements. (in which case Segmentation.h is probably more convenient)
Even the C++ interface is using it (CathodeSegmentation.h).
Based on the idea of hourglass interfaces https://github.com/CppCon/CppCon2014/tree/master/Presentations/Hourglass%20Interfaces%20for%20C%2B%2B%20APIs
Definition in file CathodeSegmentationCInterface.h.
typedef struct MchCathodeSegmentation* MchCathodeSegmentationHandle |
Definition at line 34 of file CathodeSegmentationCInterface.h.
Definition at line 36 of file CathodeSegmentationCInterface.h.
Definition at line 38 of file CathodeSegmentationCInterface.h.
Definition at line 40 of file CathodeSegmentationCInterface.h.
MchCathodeSegmentationHandle mchCathodeSegmentationConstruct | ( | int | detElemId, |
bool | isBendingPlane | ||
) |
Create a handle to a segmentation for a given plane of a detection element.
Definition at line 28 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationDestruct | ( | MchCathodeSegmentationHandle | segHandle | ) |
Delete a segmentation handle.
Definition at line 35 of file CathodeSegmentationCImpl3.cxx.
int mchCathodeSegmentationFindPadByFEE | ( | MchCathodeSegmentationHandle | segHandle, |
int | dualSampaId, | ||
int | dualSampaChannel | ||
) |
Find the pad connected to the given channel of the given dual sampa.
Definition at line 51 of file CathodeSegmentationCImpl3.cxx.
int mchCathodeSegmentationFindPadByPosition | ( | MchCathodeSegmentationHandle | segHandle, |
double | x, | ||
double | y | ||
) |
Find the pad at position (x,y) (in cm).
Definition at line 45 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForEachDetectionElement | ( | MchDetectionElementHandler | handler, |
void * | clientData | ||
) |
Definition at line 57 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForEachDualSampa | ( | MchCathodeSegmentationHandle | segHandle, |
MchDualSampaHandler | handler, | ||
void * | clientData | ||
) |
Definition at line 74 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForEachNeighbouringPad | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex, | ||
MchPadHandler | handler, | ||
void * | userData | ||
) |
Definition at line 151 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForEachPad | ( | MchCathodeSegmentationHandle | segHandle, |
MchPadHandler | handler, | ||
void * | clientData | ||
) |
void mchCathodeSegmentationForEachPadInArea | ( | MchCathodeSegmentationHandle | segHandle, |
double | xmin, | ||
double | ymin, | ||
double | xmax, | ||
double | ymax, | ||
MchPadHandler | handler, | ||
void * | clientData | ||
) |
Definition at line 142 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForEachPadInDualSampa | ( | MchCathodeSegmentationHandle | segHandle, |
int | dualSampaId, | ||
MchPadHandler | handler, | ||
void * | clientData | ||
) |
Definition at line 97 of file CathodeSegmentationCImpl3.cxx.
void mchCathodeSegmentationForOneDetectionElementOfEachSegmentationType | ( | MchDetectionElementHandler | handler, |
void * | clientData | ||
) |
Definition at line 82 of file CathodeSegmentationCImpl3.cxx.
int mchCathodeSegmentationIsPadValid | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Return > 0 if catPadIndex is a valid one or <= 1 if not.
Definition at line 91 of file CathodeSegmentationCImpl3.cxx.
int mchCathodeSegmentationPadDualSampaChannel | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 136 of file CathodeSegmentationCImpl3.cxx.
int mchCathodeSegmentationPadDualSampaId | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 130 of file CathodeSegmentationCImpl3.cxx.
double mchCathodeSegmentationPadPositionX | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 106 of file CathodeSegmentationCImpl3.cxx.
double mchCathodeSegmentationPadPositionY | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 112 of file CathodeSegmentationCImpl3.cxx.
double mchCathodeSegmentationPadSizeX | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 118 of file CathodeSegmentationCImpl3.cxx.
double mchCathodeSegmentationPadSizeY | ( | MchCathodeSegmentationHandle | segHandle, |
int | catPadIndex | ||
) |
Definition at line 124 of file CathodeSegmentationCImpl3.cxx.