17 if (module < 0 || module >=
static_cast<int>(
module_z_.size())) {
18 EXCEPTION_RAISE(
"TrigScintGeometry",
19 "Requested module " + std::to_string(module) +
20 " is out of range [0," +
23 if (bar < 0 || bar >=
n_bars_) {
24 EXCEPTION_RAISE(
"TrigScintGeometry",
"Requested bar " +
26 " is out of range [0," +
27 std::to_string(
n_bars_) +
").");
31 const int in_layer = bar / 2;
32 const int layer = bar % 2;
35 return ROOT::Math::XYZVector(0.0, y, z);
Class that translates a trigger-scintillator (module, bar) into a global bar-center position.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Bar-center positions of the trigger-scintillator modules.
double layer_z_sep_
z separation between the two layers within a module [mm]
double layer_pitch_
in-layer y pitch [mm]
TrigScintGeometry(const framework::config::Parameters &ps)
Build from a python-configured parameter set.
double layer_y_shift_
y stagger of layer 1 relative to layer 0 [mm]
double y0_
global y of bar 0 [mm] (bar 0 is most +y)
ROOT::Math::XYZVector getBarPosition(int module, int bar) const
Global bar-center position for a (module, bar).
std::vector< double > module_z_
global z of each module's (layer-pair) center [mm]
int n_bars_
number of bars (channels) per module
All classes in the ldmx-sw project use this namespace.