31 #ifndef FALAISE_SNEMO_GEOMETRY_XCALO_LOCATOR_H 32 #define FALAISE_SNEMO_GEOMETRY_XCALO_LOCATOR_H 1 39 #include <boost/cstdint.hpp> 79 xcalo_locator(const ::geomtools::manager& gmgr_, uint32_t module_number_);
92 bool id_is_valid(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_)
const;
97 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
100 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
107 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE);
158 double get_wall_y(uint32_t side_, uint32_t wall_)
const;
168 double get_column_x(uint32_t side_, uint32_t wall_, uint32_t column_)
const;
173 double get_row_z(uint32_t side_, uint32_t wall_, uint32_t row_)
const;
191 uint32_t row_)
const;
197 uint32_t row_)
const;
215 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
221 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
227 uint32_t column_, uint32_t row_,
228 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
234 uint32_t wall_, uint32_t column_, uint32_t row_,
235 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
251 void get_neighbours_ids(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_,
252 std::vector<geomtools::geom_id>& ids_,
269 void get_block_position(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_,
301 virtual void tree_dump(std::ostream& out_ = std::clog,
const std::string& title_ =
"",
302 const std::string& indent_ =
"",
bool inherit_ =
false)
const;
305 void dump(std::ostream& out_)
const;
321 uint32_t _module_number_;
322 uint32_t _block_part_;
325 uint32_t _module_type_;
326 uint32_t _tracker_submodule_type_;
327 uint32_t _block_type_;
328 uint32_t _wrapper_type_;
329 bool _block_partitioned_;
338 bool _composite_block_shape_;
347 double _block_width_;
348 double _block_height_;
349 double _block_thickness_;
352 int _module_address_index_;
353 int _side_address_index_;
354 int _wall_address_index_;
355 int _column_address_index_;
356 int _row_address_index_;
357 int _part_address_index_;
360 bool _submodules_[2];
367 #endif // FALAISE_SNEMO_GEOMETRY_XCALO_LOCATOR_H bool is_block_partitioned() const
bool find_block_geom_id(const geomtools::vector_3d &world_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
double get_wall_y(uint32_t side_, uint32_t wall_) const
void _hack_trace()
Hack trace.
double get_row_z(uint32_t side_, uint32_t wall_, uint32_t row_) const
geomtools::vector_3d get_block_window_position(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_) const
int get_side_address_index() const
void transform_module_to_world(const geomtools::vector_3d &module_position_, geomtools::vector_3d &world_position_) const
bool is_world_position_in_block(const geomtools::vector_3d &world_position_, uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
double get_block_width() const
static const unsigned int NWALLS_PER_SIDE
Number of X-calorimeter walls per side (on the Y-axis)
Definition: xcalo_locator.h:64
double get_block_height() const
bool is_in_block(const geomtools::vector_3d &module_position_, uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
uint32_t extract_column(const geomtools::geom_id &gid_) const
uint32_t extract_module(const geomtools::geom_id &gid_) const
double get_wall_window_y(uint32_t side_, uint32_t wall_) const
Fast locator class for SuperNEMO X calorimeter scintillator block volumes.
Definition: xcalo_locator.h:61
xcalo_locator()
Constructor.
double get_block_thickness() const
bool has_submodule(uint32_t side_) const
bool is_in_module(const geomtools::vector_3d &module_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
int get_row_address_index() const
bool id_is_valid(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_) const
uint32_t extract_row(const geomtools::geom_id &gid_) const
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Right wall.
Definition: xcalo_locator.h:70
D : nearest diagonal.
Definition: utils.h:91
void dump(std::ostream &out_) const
Dump.
int get_part_address_index() const
int get_module_address_index() const
int get_wall_address_index() const
bool is_calo_block(const geomtools::geom_id &gid_) const
Definition: calo_tapered_scin_box_model.h:54
void set_module_number(uint32_t module_number_)
uint32_t extract_wall(const geomtools::geom_id &gid_) const
uint32_t get_module_number() const
virtual bool is_initialized() const
geomtools::vector_3d get_block_position(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_) const
wall_type
Wall identifier constants (SuperNEMO module Y axis)
Definition: xcalo_locator.h:67
Invalid/undefined wall.
Definition: xcalo_locator.h:68
int get_column_address_index() const
void transform_world_to_module(const geomtools::vector_3d &world_position_, geomtools::vector_3d &module_position_) const
size_t get_number_of_neighbours(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const
virtual ~xcalo_locator()
Destructor.
void compute_block_position(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const
uint32_t extract_part(const geomtools::geom_id &gid_) const
size_t get_number_of_walls() const
void compute_block_window_position(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const
uint32_t extract_side(const geomtools::geom_id &gid_) const
Left wall.
Definition: xcalo_locator.h:69
double get_column_x(uint32_t side_, uint32_t wall_, uint32_t column_) const
size_t get_number_of_rows(uint32_t side_, uint32_t wall_) const
bool is_world_position_in_module(const geomtools::vector_3d &world_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
virtual bool find_geom_id(const geomtools::vector_3d &world_position_, int type_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
size_t get_number_of_columns(uint32_t side_, uint32_t wall_) const
void _assert_initialized(const std::string &where_) const
bool is_calo_block_in_current_module(const geomtools::geom_id &gid_) const
size_t get_number_of_sides() const
bool find_block_geom_id_(const geomtools::vector_3d &in_module_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE)
void get_neighbours_ids(uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, std::vector< geomtools::geom_id > &ids_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const