LDMX Software
TrigScintGeometry.h
Go to the documentation of this file.
1
7#ifndef DETDESCR_TRIGSCINTGEOMETRY_H_
8#define DETDESCR_TRIGSCINTGEOMETRY_H_
9
10#include <vector>
11
12#include "DetDescr/TrigScintID.h"
14#include "Framework/Configure/Parameters.h"
15#include "Framework/Exception/Exception.h" // IWYU pragma: keep (EXCEPTION_RAISE in TrigScintGeometry.cxx)
16#include "Math/Vector3D.h" // IWYU pragma: keep (XYZVector returned by value)
17
18namespace trigscint {
19class TrigScintGeometryProvider;
20}
21
22namespace ldmx {
23
38 public:
41 static constexpr const char* CONDITIONS_OBJECT_NAME{"trig_scint_geometry"};
42
45
46 ~TrigScintGeometry() = default;
47
54 ROOT::Math::XYZVector getBarPosition(int module, int bar) const;
55
57 ROOT::Math::XYZVector getBarPosition(ldmx::TrigScintID id) const {
58 return getBarPosition(id.module(), id.bar());
59 }
60
62 int getNumModules() const { return static_cast<int>(module_z_.size()); }
64 int getNumBars() const { return n_bars_; }
66 double getLayerZSeparation() const { return layer_z_sep_; }
67
68 private:
70 std::vector<double> module_z_;
72 double y0_;
81};
82
83} // namespace ldmx
84
85#endif // DETDESCR_TRIGSCINTGEOMETRY_H_
Base class for conditions information like pedestals, gains, electronics maps, etc.
Base class for all conditions objects, very simple.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
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)
int getNumBars() const
Number of bars (channels) per module.
ROOT::Math::XYZVector getBarPosition(int module, int bar) const
Global bar-center position for a (module, bar).
double getLayerZSeparation() const
z separation between the two layers within a module [mm].
std::vector< double > module_z_
global z of each module's (layer-pair) center [mm]
ROOT::Math::XYZVector getBarPosition(ldmx::TrigScintID id) const
Convenience overload taking a TrigScintID.
int getNumModules() const
Number of configured modules.
static constexpr const char * CONDITIONS_OBJECT_NAME
Name this conditions object is registered under (must match the python provider field name).
int n_bars_
number of bars (channels) per module
Class that defines the detector ID of the trigger scintillator.
Definition TrigScintID.h:14