![]() |
CHeT Library
|
Global Settings namespace containing configuration structures, physical constants, and utility functions for the detector geometry. More...
Classes | |
| struct | BundlesIntersection |
| Represents a geometric intersection between two bundles. More... | |
| struct | CylinderConfig |
| Configuration for a full cylinder (Inner + Outer layers). More... | |
| struct | FiberProp |
| Properties of a specific reconstructed fiber. More... | |
| struct | LayerConfig |
| Configuration for a single fiber layer. More... | |
Functions | |
| double | GetStereoAngle (double radius, double deltaPhi=M_PI, double length=2.0 *L_HALF) |
| Computes the analytical stereo angle for a given radius. | |
| double | GetOffsetExp () |
| Retrieves the current experimental angular offset (OFFSET_EXP). | |
| void | SetOffsetExp (double val) |
| Sets the experimental angular offset (OFFSET_EXP). | |
| double | GetDeltaI (int cylIdx) |
| Retrieves the current experimental parameter DELTA for a specific cylinder. | |
| void | SetDeltaI (int cylIdx, double val) |
| Sets the experimental parameter DELTA for a specific cylinder. | |
| void | SetDeltas (const std::vector< double > &deltas) |
| Sets the experimental parameter DELTA for all cylinders. | |
| std::vector< double > | GetDeltas () |
| Gets the experimental parameter DELTA for all cylinders. | |
| void | SetRotation (double rx, double ry, double rz) |
| Sets the global rotation of the detector using Euler angles. Rotations are applied in order: X, then Y, then Z. | |
| void | GetRotation (double &rx, double &ry, double &rz) |
| Retrieves the current global rotation angles. | |
| void | SetTranslation (double tx, double ty, double tz) |
| Sets the global translation of the detector origin. | |
| void | GetTranslation (double &tx, double &ty, double &tz) |
| Retrieves the current global translation. | |
| void | ApplyRotation (double &x, double &y, double &z) |
| Rotates a 3D VECTOR in-place from the Detector Local Frame to the Global Lab Frame. Uses the currently set rotation angles. This applies ONLY rotation (suitable for direction vectors). | |
| void | ApplyInverseRotation (double &x, double &y, double &z) |
| Rotates a 3D VECTOR in-place from the Global Lab Frame to the Detector Local Frame. (Inverse of ApplyRotation). This applies ONLY rotation (suitable for direction vectors). | |
| void | ApplyTransformation (double &x, double &y, double &z) |
| Transforms a 3D POINT in-place from the Detector Local Frame to the Global Lab Frame. Applies Rotation then Translation. P_global = R * P_local + T. | |
| void | ApplyInverseTransformation (double &x, double &y, double &z) |
| Transforms a 3D POINT in-place from the Global Lab Frame to the Detector Local Frame. Applies Inverse Translation then Inverse Rotation. P_local = R^T * (P_global - T) | |
| int | GetBoardGlobalOffset (int board_id) |
| Returns the global offset (bundle count) for a specific board. | |
| void | SetActiveCylinders (const std::vector< int > &active_ids) |
| Sets the list of active cylinder IDs. This defines the physical composition of the detector for the current run/simulation. Only these cylinders will be returned by GetCylinders(). | |
| std::vector< int > | GetActiveCylinders () |
| Retrieves the list of currently active cylinder IDs. | |
| const std::vector< CylinderConfig > & | GetCylinders () |
| Retrieves the configuration for all active cylinders. | |
| double | wrap0_2pi (double angle) |
| Wraps an angle into the [0, 2*PI) range. | |
| FiberProp | GetFiberProp (int b_id) |
| Retrieves fiber properties given a global bundle ID. | |
| int | GetGlobalBundleId (int board_id, int channel_id) |
| Converts Hardware Board/Channel to Global Bundle ID. | |
| std::vector< BundlesIntersection > | FindIntersections (const std::vector< int > &hit_ids) |
| Finds 3D intersections between a list of hit bundles. | |
| int | GetGlobalIdFromGeometry (int cyl_id, int layer_id, int layer_idx) |
| Helper: Converts Geometry (Cyl, Layer, Index) to Global ID. | |
| void | PrintBundleMapping (int global_id) |
| Helper: Prints mapping details for a given Global ID to stdout. | |
| void | MapExplorer () |
| Interactive CLI menu to explore the mapping. | |
Variables | |
| constexpr double | L_HALF = 150.0 |
| Half-length of the detector [mm]. | |
| constexpr double | FIBER_WIDTH = 0.5 |
| Physical width of a single fiber [mm]. | |
| constexpr int | FIBERS_PER_SIPM = 4 |
| Number of fibers per SiPM (bundle) | |
| constexpr double | BUNDLE_WIDTH = FIBER_WIDTH * FIBERS_PER_SIPM |
| Physical width of a bundle [mm]. | |
Global Settings namespace containing configuration structures, physical constants, and utility functions for the detector geometry.
| void CHeT::Config::ApplyInverseRotation | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) |
Rotates a 3D VECTOR in-place from the Global Lab Frame to the Detector Local Frame. (Inverse of ApplyRotation). This applies ONLY rotation (suitable for direction vectors).
| x | X component |
| y | Y component |
| z | Z component |
Definition at line 217 of file CHeTGlobalSettings.cc.
| void CHeT::Config::ApplyInverseTransformation | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) |
Transforms a 3D POINT in-place from the Global Lab Frame to the Detector Local Frame. Applies Inverse Translation then Inverse Rotation. P_local = R^T * (P_global - T)
| x | X coordinate [mm] |
| y | Y coordinate [mm] |
| z | Z coordinate [mm] |
Definition at line 243 of file CHeTGlobalSettings.cc.
| void CHeT::Config::ApplyRotation | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) |
Rotates a 3D VECTOR in-place from the Detector Local Frame to the Global Lab Frame. Uses the currently set rotation angles. This applies ONLY rotation (suitable for direction vectors).
| x | X component |
| y | Y component |
| z | Z component |
Definition at line 203 of file CHeTGlobalSettings.cc.
| void CHeT::Config::ApplyTransformation | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) |
Transforms a 3D POINT in-place from the Detector Local Frame to the Global Lab Frame. Applies Rotation then Translation. P_global = R * P_local + T.
| x | X coordinate [mm] |
| y | Y coordinate [mm] |
| z | Z coordinate [mm] |
Definition at line 232 of file CHeTGlobalSettings.cc.
| std::vector< BundlesIntersection > CHeT::Config::FindIntersections | ( | const std::vector< int > & | hit_ids | ) |
Finds 3D intersections between a list of hit bundles.
| hit_ids | Vector of global bundle IDs that fired. |
Definition at line 425 of file CHeTGlobalSettings.cc.
| std::vector< int > CHeT::Config::GetActiveCylinders | ( | ) |
Retrieves the list of currently active cylinder IDs.
Definition at line 275 of file CHeTGlobalSettings.cc.
| int CHeT::Config::GetBoardGlobalOffset | ( | int | board_id | ) |
Returns the global offset (bundle count) for a specific board.
| board_id | The hardware board ID. |
Definition at line 254 of file CHeTGlobalSettings.cc.
| const std::vector< CylinderConfig > & CHeT::Config::GetCylinders | ( | ) |
Retrieves the configuration for all active cylinders.
Definition at line 282 of file CHeTGlobalSettings.cc.
| double CHeT::Config::GetDeltaI | ( | int | cylIdx | ) |
Retrieves the current experimental parameter DELTA for a specific cylinder.
| cylIdx | The index of the cylinder (0 to 5). |
Definition at line 97 of file CHeTGlobalSettings.cc.
| std::vector< double > CHeT::Config::GetDeltas | ( | ) |
Gets the experimental parameter DELTA for all cylinders.
Definition at line 122 of file CHeTGlobalSettings.cc.
| FiberProp CHeT::Config::GetFiberProp | ( | int | b_id | ) |
Retrieves fiber properties given a global bundle ID.
| b_id | Global bundle ID. |
Definition at line 363 of file CHeTGlobalSettings.cc.
| int CHeT::Config::GetGlobalBundleId | ( | int | board_id, |
| int | channel_id | ||
| ) |
Converts Hardware Board/Channel to Global Bundle ID.
| board_id | Hardware board ID. |
| channel_id | Hardware channel ID. |
Definition at line 394 of file CHeTGlobalSettings.cc.
| int CHeT::Config::GetGlobalIdFromGeometry | ( | int | cyl_id, |
| int | layer_id, | ||
| int | layer_idx | ||
| ) |
Helper: Converts Geometry (Cyl, Layer, Index) to Global ID.
Definition at line 486 of file CHeTGlobalSettings.cc.
| double CHeT::Config::GetOffsetExp | ( | ) |
Retrieves the current experimental angular offset (OFFSET_EXP).
Definition at line 87 of file CHeTGlobalSettings.cc.
| void CHeT::Config::GetRotation | ( | double & | rx, |
| double & | ry, | ||
| double & | rz | ||
| ) |
Retrieves the current global rotation angles.
| rx | Output rotation around X axis [rad] |
| ry | Output rotation around Y axis [rad] |
| rz | Output rotation around Z axis [rad] |
Definition at line 182 of file CHeTGlobalSettings.cc.
|
inline |
Computes the analytical stereo angle for a given radius.
| radius | The radius of the cylinder layer [mm] |
| deltaPhi | The total twist angle of the fiber from end to end [rad] (default: PI) |
| length | The total longitudinal length of the cylinder [mm] (default: 2 * L_HALF) |
Definition at line 96 of file CHeTGlobalSettings.hh.
| void CHeT::Config::GetTranslation | ( | double & | tx, |
| double & | ty, | ||
| double & | tz | ||
| ) |
Retrieves the current global translation.
| tx | Output Translation X [mm] |
| ty | Output Translation Y [mm] |
| tz | Output Translation Z [mm] |
Definition at line 196 of file CHeTGlobalSettings.cc.
| void CHeT::Config::MapExplorer | ( | ) |
Interactive CLI menu to explore the mapping.
Definition at line 575 of file CHeTGlobalSettings.cc.
| void CHeT::Config::PrintBundleMapping | ( | int | global_id | ) |
Helper: Prints mapping details for a given Global ID to stdout.
Definition at line 515 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetActiveCylinders | ( | const std::vector< int > & | active_ids | ) |
Sets the list of active cylinder IDs. This defines the physical composition of the detector for the current run/simulation. Only these cylinders will be returned by GetCylinders().
| active_ids | Vector of cylinder IDs. |
Definition at line 269 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetDeltaI | ( | int | cylIdx, |
| double | val | ||
| ) |
Sets the experimental parameter DELTA for a specific cylinder.
| cylIdx | The index of the cylinder (0 to 5). |
| val | The new value for DELTA. |
Definition at line 104 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetDeltas | ( | const std::vector< double > & | deltas | ) |
Sets the experimental parameter DELTA for all cylinders.
| deltas | A vector containing the DELTA values for all cylinders. |
Definition at line 113 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetOffsetExp | ( | double | val | ) |
Sets the experimental angular offset (OFFSET_EXP).
| val | The new offset value in radians. |
Definition at line 91 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetRotation | ( | double | rx, |
| double | ry, | ||
| double | rz | ||
| ) |
Sets the global rotation of the detector using Euler angles. Rotations are applied in order: X, then Y, then Z.
| rx | Rotation around X axis [rad] |
| ry | Rotation around Y axis [rad] |
| rz | Rotation around Z axis [rad] |
Definition at line 127 of file CHeTGlobalSettings.cc.
| void CHeT::Config::SetTranslation | ( | double | tx, |
| double | ty, | ||
| double | tz | ||
| ) |
Sets the global translation of the detector origin.
| tx | Translation X [mm] |
| ty | Translation Y [mm] |
| tz | Translation Z [mm] |
Definition at line 189 of file CHeTGlobalSettings.cc.
| double CHeT::Config::wrap0_2pi | ( | double | angle | ) |
Wraps an angle into the [0, 2*PI) range.
| angle | Input angle in radians. |
Definition at line 355 of file CHeTGlobalSettings.cc.
|
constexpr |
Physical width of a bundle [mm].
Definition at line 87 of file CHeTGlobalSettings.hh.
|
constexpr |
Physical width of a single fiber [mm].
Definition at line 85 of file CHeTGlobalSettings.hh.
|
constexpr |
Number of fibers per SiPM (bundle)
Definition at line 86 of file CHeTGlobalSettings.hh.
|
constexpr |
Half-length of the detector [mm].
Definition at line 84 of file CHeTGlobalSettings.hh.